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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
283a50425b5d638ba23a08584739ce8f0dc1f812
|
87901d9fd3279eb58211befa5357553d123cfe0c
|
/bin/custom/merchandise/merchandisestorefront/web/src/de/hybris/merchandise/storefront/filters/btg/CategoryVisitedBtgFilter.java
|
258033aa33e0e1f623434b034f3bab635378eeab
|
[] |
no_license
|
prafullnagane/learning
|
4d120b801222cbb0d7cc1cc329193575b1194537
|
02b46a0396cca808f4b29cd53088d2df31f43ea0
|
refs/heads/master
| 2020-03-27T23:04:17.390207
| 2014-02-27T06:19:49
| 2014-02-27T06:19:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 986
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2013 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.merchandise.storefront.filters.btg;
import de.hybris.platform.btg.events.AbstractBTGRuleDataEvent;
import de.hybris.platform.btg.events.CategoryVisitedBTGRuleDataEvent;
/**
* FilterBean to produce the BTG event {@link CategoryVisitedBTGRuleDataEvent}
* This is a spring configured filter that is executed by the PlatformFilterChain.
*/
public class CategoryVisitedBtgFilter extends AbstractPkResolvingBtgFilter
{
@Override
protected AbstractBTGRuleDataEvent internalGetEvent(final String pk)
{
return new CategoryVisitedBTGRuleDataEvent(pk);
}
}
|
[
"admin1@neev31.(none)"
] |
admin1@neev31.(none)
|
1e47c322fccb74137762d71b201c82fd67db2b25
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/Hive/4269_2.java
|
2d1ed0bbc450b3b8f982f07b74aaa50d50ebc35d
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 726
|
java
|
//,temp,ThriftHiveMetastore.java,38030,38042,temp,ThriftHiveMetastore.java,37828,37839
//,3
public class xxx {
public void onComplete(Void o) {
repl_tbl_writeid_state_result result = new repl_tbl_writeid_state_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
};
|
[
"SHOSHIN\\sgholamian@shoshin.uwaterloo.ca"
] |
SHOSHIN\sgholamian@shoshin.uwaterloo.ca
|
e3a25a0948e7571464374cdbd16e733bbfce2d00
|
adc596a481ab7eeb589942ddb0d38eb026a92f92
|
/src/edu/stanford/smi/protegex/owl/swrl/test/SWRLTest.java
|
da0d219af8bd083a97d9bc419122b55e0248e140
|
[] |
no_license
|
SteveChe/protege-owl-src-3.4.8
|
dadfddd8c8d9269decc05de47084c7425509ac7e
|
f56d3400345725991a6164d3678a9717d4c8456e
|
refs/heads/master
| 2016-09-08T01:54:33.269768
| 2013-06-28T06:11:09
| 2013-06-28T06:11:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,605
|
java
|
/*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (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.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
* the specific language governing rights and limitations under the License.
*
* The Original Code is Protege-2000.
*
* The Initial Developer of the Original Code is Stanford University. Portions
* created by Stanford University are Copyright (C) 2007. All Rights Reserved.
*
* Protege was developed by Stanford Medical Informatics
* (http://www.smi.stanford.edu) at the Stanford University School of Medicine
* with support from the National Library of Medicine, the National Science
* Foundation, and the Defense Advanced Research Projects Agency. Current
* information about Protege can be obtained at http://protege.stanford.edu.
*
*/
package edu.stanford.smi.protegex.owl.swrl.test;
import edu.stanford.smi.protegex.owl.jena.JenaOWLModel;
import edu.stanford.smi.protegex.owl.swrl.model.SWRLFactory;
import edu.stanford.smi.protegex.owl.swrl.model.SWRLImp;
import edu.stanford.smi.protegex.owl.swrl.util.SWRLOWLUtil;
public class SWRLTest
{
public static void main(String args[])
{
JenaOWLModel modelA = null, modelB = null;
SWRLFactory factoryA = null, factoryB = null;
String fileName1 = "", fileName2 = "", fileName3 = "", fileName4 = "";
if (args.length == 4) {
fileName1 = args[0];
fileName2 = args[1];
fileName3 = args[2];
fileName4 = args[3];
} else Usage();
// String uriA = "file://dionisbg.di.funpic.de/familyA.owl";
try {
modelA=SWRLOWLUtil.createJenaOWLModel(fileName1);
System.out.println("ModelA loaded ...");
} catch (java.lang.Exception e) {
e.printStackTrace();
}
factoryA = new SWRLFactory(modelA);
System.out.println("SWRL FactoryA created ...");
// -- OntologyB --
try {
modelB=SWRLOWLUtil.createJenaOWLModel(fileName2);
System.out.println("ModelB loaded ...");
}
catch (java.lang.Exception e) {
e.printStackTrace();
}
factoryB = new SWRLFactory(modelB);
System.out.println("SWRL FactoryB created ...");
// -- Copying rules between two models --
try {
System.out.print("Copying " + factoryA.getImps().size() + " rules to target ontology...");
for (Object o : factoryA.getImps()) {
if (o instanceof SWRLImp) {
SWRLImp imp = (SWRLImp)o;
System.err.println(imp.getBrowserText());
factoryB.createImp(imp.getBrowserText());
}
}
factoryA.deleteImps();
System.out.print("Saving stripped ontology to " + fileName3 + "...");
SWRLOWLUtil.writeJenaOWLModel2File(modelA, fileName3);
System.out.println("...written.");
System.out.print("Saving target ontology with rules to " + fileName4 + "...");
SWRLOWLUtil.writeJenaOWLModel2File(modelB, fileName4);
System.out.println("...written.");
} catch (Throwable e) {
e.printStackTrace();
}
} // main
private static void Usage()
{
System.err.println("Usage: SWRLTest <fileName(with rules)> <fileName>(base)<fileName (stripped of rules)> <fileName>(only rules)");
System.exit(1);
} // Usage
} // SWRLTest
|
[
"chexinshuai669@gmail.com"
] |
chexinshuai669@gmail.com
|
d21619b584767b616e59f9a32bd6c874f81af92e
|
b524efdc38d0e1a38dfe45ce6491a2b5769179af
|
/src/main/java/kitchenpos/eatinorders/tobe/domain/model/MenuDomainService.java
|
7c20d98c0a46dfc86cedae0bdef049eaeecb4c11
|
[] |
no_license
|
Jonny-Cho/ddd-tactical-design-grass
|
c74b9b984382a74a1ed379fc9130e76bbf5baf5f
|
63867ae778a71fa392dfec62286ffb369af4e525
|
refs/heads/master
| 2023-08-24T13:35:41.390272
| 2021-10-11T14:08:59
| 2021-10-11T14:08:59
| 400,942,713
| 1
| 0
| null | 2021-09-27T15:23:06
| 2021-08-29T03:37:56
|
Java
|
UTF-8
|
Java
| false
| false
| 1,712
|
java
|
package kitchenpos.eatinorders.tobe.domain.model;
import java.util.List;
import java.util.NoSuchElementException;
import java.util.stream.Collectors;
import kitchenpos.menus.tobe.menu.domain.model.Menu;
import kitchenpos.menus.tobe.menu.domain.repository.MenuRepository;
import org.springframework.stereotype.Component;
@Component
public class MenuDomainService {
private final MenuRepository menuRepository;
public MenuDomainService(final MenuRepository menuRepository) {
this.menuRepository = menuRepository;
}
public void validateOrder(final Order order) {
final List<OrderLineItem> orderLineItems = order.getOrderLineItems().getOrderLineItems();
final List<Menu> menus = menuRepository.findAllByIdIn(orderLineItems.stream()
.map(OrderLineItem::getMenuId)
.collect(Collectors.toList()));
menus.forEach(this::validateMenu);
if (menus.size() != orderLineItems.size()) {
throw new IllegalArgumentException("부적절한 메뉴는 주문할 수 없습니다.");
}
}
private void validateMenu(final Menu menu) {
if (!menu.isDisplayed()) {
throw new IllegalStateException("숨겨진 메뉴입니다.");
}
}
private Menu getMenu(final OrderLineItem orderLineItem) {
final Menu menu = menuRepository.findById(orderLineItem.getMenuId())
.orElseThrow(NoSuchElementException::new);
validateMenu(menu);
if (menu.getMenuPrice().isNotEqualTo(orderLineItem.getPrice())) {
throw new IllegalArgumentException("메뉴의 가격과 주문 항목의 가격은 같아야 합니다.");
}
return menu;
}
}
|
[
"andante2183@gmail.com"
] |
andante2183@gmail.com
|
a76bda2bdcf5adcfe470c3336e19a6c751fe0775
|
f6ed03cd319e2e404364630441d0080fef36ae45
|
/src/br/com/caelum/comparador/ComparadorPorTamanho.java
|
2576e83c87686880d0b97cfda3dc4cef0d2add54
|
[] |
no_license
|
raelAndrade/Projeto-OOP
|
1ca9490ed44da9fd80b5dbbc7565bee3f289fa7c
|
14b6db5daac5492840bb82a5df0455a9a4f59730
|
refs/heads/master
| 2020-03-29T10:06:30.786236
| 2018-10-11T12:42:35
| 2018-10-11T12:42:35
| 149,789,541
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package br.com.caelum.comparador;
import java.util.Comparator;
public class ComparadorPorTamanho implements Comparator<String> {
/*public int compare(String s1, String s2) {
if(s1.length() < s2.length())
return -1;
if(s2.length() < s1.length())
return 1;
return 0;
}*/
public int compare(String s1, String s2) {
return Integer.compare(s1.length(), s2.length());
}
}
|
[
"israelg.andrade@bol.com.br"
] |
israelg.andrade@bol.com.br
|
6d24432784a359ac1defb269db759d6c22d75449
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/27/27_d12aabad135ffe0e12a54ec088df5fba7469d573/Definition/27_d12aabad135ffe0e12a54ec088df5fba7469d573_Definition_s.java
|
4d54c0c77fa67db3eb9e33ab75620e5352cfea5d
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,457
|
java
|
/*
* HUMBOLDT: A Framework for Data Harmonisation and Service Integration.
* EU Integrated Project #030962 01.10.2006 - 30.09.2010
*
* For more information on the project, please refer to the this web site:
* http://www.esdi-humboldt.eu
*
* LICENSE: For information on the license under which this program is
* available, please refer to http:/www.esdi-humboldt.eu/license.html#core
* (c) the HUMBOLDT Consortium, 2007 to 2010.
*/
package eu.esdihumboldt.hale.schemaprovider.model;
import eu.esdihumboldt.goml.align.Entity;
/**
*
*
* @author Simon Templer
* @partner 01 / Fraunhofer Institute for Computer Graphics Research
* @version $Id$
*/
public interface Definition {
/**
* Get the definitions identifier
*
* @return the unique name of the definition
*/
public String getIdentifier();
/**
* Get the definition's display name
*
* @return the display name
*/
public String getDisplayName();
/**
* Get the description
*
* @return the description string or <code>null</code>
*/
public abstract String getDescription();
/**
* Create an entity for the definition.
* NOTE: the entity for attributes is always associated with the declaring type
*
* @return the entity
*/
public Entity getEntity();
/**
* Get the definition location
*
* @return the location
*/
public String getLocation();
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3cabfcd876d3cbe3466160b58dcc72c20b28cf79
|
02b46dfbeb8d38cad29942f5e6774b6ae28632fe
|
/loadqueue-common/src/main/java/com/test/web/loadqueue/common/FileLoadDependency.java
|
6cad342f3e5f8a7d31d26c3dd347ae646b4e6bf0
|
[] |
no_license
|
neaterbits/web
|
32b8d4d7c653e5162bd6e4dadb72c1f51b09273d
|
2d6e9c9c99b2a33e641d25690ac2405fa32ae220
|
refs/heads/master
| 2022-10-17T16:28:34.146469
| 2020-06-11T18:28:10
| 2020-06-11T18:28:10
| 105,419,612
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package com.test.web.loadqueue.common;
abstract class FileLoadDependency extends Dependency {
private final String url;
FileLoadDependency(String url) {
this.url = url;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((url == null) ? 0 : url.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
FileLoadDependency other = (FileLoadDependency) obj;
if (url == null) {
if (other.url != null)
return false;
} else if (!url.equals(other.url))
return false;
return true;
}
}
|
[
"nils.lorentzen@gmail.com"
] |
nils.lorentzen@gmail.com
|
cbf267f3b36b68ae920c8778c9b4696cce0b1536
|
ceeacb5157b67b43d40615daf5f017ae345816db
|
/generated/sdk/appservice/azure-resourcemanager-appservice-generated/src/main/java/com/azure/resourcemanager/appservice/generated/fluent/models/PremierAddOnOfferProperties.java
|
8660d072461533edb36eaf099f0dddb332c6aa7f
|
[
"LicenseRef-scancode-generic-cla"
] |
no_license
|
ChenTanyi/autorest.java
|
1dd9418566d6b932a407bf8db34b755fe536ed72
|
175f41c76955759ed42b1599241ecd876b87851f
|
refs/heads/ci
| 2021-12-25T20:39:30.473917
| 2021-11-07T17:23:04
| 2021-11-07T17:23:04
| 218,717,967
| 0
| 0
| null | 2020-11-18T14:14:34
| 2019-10-31T08:24:24
|
Java
|
UTF-8
|
Java
| false
| false
| 8,140
|
java
|
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.appservice.generated.fluent.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.util.logging.ClientLogger;
import com.azure.resourcemanager.appservice.generated.models.AppServicePlanRestrictions;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
/** PremierAddOnOffer resource specific properties. */
@Fluent
public final class PremierAddOnOfferProperties {
@JsonIgnore private final ClientLogger logger = new ClientLogger(PremierAddOnOfferProperties.class);
/*
* Premier add on SKU.
*/
@JsonProperty(value = "sku")
private String sku;
/*
* Premier add on offer Product.
*/
@JsonProperty(value = "product")
private String product;
/*
* Premier add on offer Vendor.
*/
@JsonProperty(value = "vendor")
private String vendor;
/*
* <code>true</code> if promotion code is required; otherwise,
* <code>false</code>.
*/
@JsonProperty(value = "promoCodeRequired")
private Boolean promoCodeRequired;
/*
* Premier add on offer Quota.
*/
@JsonProperty(value = "quota")
private Integer quota;
/*
* App Service plans this offer is restricted to.
*/
@JsonProperty(value = "webHostingPlanRestrictions")
private AppServicePlanRestrictions webHostingPlanRestrictions;
/*
* Privacy policy URL.
*/
@JsonProperty(value = "privacyPolicyUrl")
private String privacyPolicyUrl;
/*
* Legal terms URL.
*/
@JsonProperty(value = "legalTermsUrl")
private String legalTermsUrl;
/*
* Marketplace publisher.
*/
@JsonProperty(value = "marketplacePublisher")
private String marketplacePublisher;
/*
* Marketplace offer.
*/
@JsonProperty(value = "marketplaceOffer")
private String marketplaceOffer;
/**
* Get the sku property: Premier add on SKU.
*
* @return the sku value.
*/
public String sku() {
return this.sku;
}
/**
* Set the sku property: Premier add on SKU.
*
* @param sku the sku value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withSku(String sku) {
this.sku = sku;
return this;
}
/**
* Get the product property: Premier add on offer Product.
*
* @return the product value.
*/
public String product() {
return this.product;
}
/**
* Set the product property: Premier add on offer Product.
*
* @param product the product value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withProduct(String product) {
this.product = product;
return this;
}
/**
* Get the vendor property: Premier add on offer Vendor.
*
* @return the vendor value.
*/
public String vendor() {
return this.vendor;
}
/**
* Set the vendor property: Premier add on offer Vendor.
*
* @param vendor the vendor value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withVendor(String vendor) {
this.vendor = vendor;
return this;
}
/**
* Get the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise,
* <code>false</code>.
*
* @return the promoCodeRequired value.
*/
public Boolean promoCodeRequired() {
return this.promoCodeRequired;
}
/**
* Set the promoCodeRequired property: <code>true</code> if promotion code is required; otherwise,
* <code>false</code>.
*
* @param promoCodeRequired the promoCodeRequired value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withPromoCodeRequired(Boolean promoCodeRequired) {
this.promoCodeRequired = promoCodeRequired;
return this;
}
/**
* Get the quota property: Premier add on offer Quota.
*
* @return the quota value.
*/
public Integer quota() {
return this.quota;
}
/**
* Set the quota property: Premier add on offer Quota.
*
* @param quota the quota value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withQuota(Integer quota) {
this.quota = quota;
return this;
}
/**
* Get the webHostingPlanRestrictions property: App Service plans this offer is restricted to.
*
* @return the webHostingPlanRestrictions value.
*/
public AppServicePlanRestrictions webHostingPlanRestrictions() {
return this.webHostingPlanRestrictions;
}
/**
* Set the webHostingPlanRestrictions property: App Service plans this offer is restricted to.
*
* @param webHostingPlanRestrictions the webHostingPlanRestrictions value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withWebHostingPlanRestrictions(
AppServicePlanRestrictions webHostingPlanRestrictions) {
this.webHostingPlanRestrictions = webHostingPlanRestrictions;
return this;
}
/**
* Get the privacyPolicyUrl property: Privacy policy URL.
*
* @return the privacyPolicyUrl value.
*/
public String privacyPolicyUrl() {
return this.privacyPolicyUrl;
}
/**
* Set the privacyPolicyUrl property: Privacy policy URL.
*
* @param privacyPolicyUrl the privacyPolicyUrl value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withPrivacyPolicyUrl(String privacyPolicyUrl) {
this.privacyPolicyUrl = privacyPolicyUrl;
return this;
}
/**
* Get the legalTermsUrl property: Legal terms URL.
*
* @return the legalTermsUrl value.
*/
public String legalTermsUrl() {
return this.legalTermsUrl;
}
/**
* Set the legalTermsUrl property: Legal terms URL.
*
* @param legalTermsUrl the legalTermsUrl value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withLegalTermsUrl(String legalTermsUrl) {
this.legalTermsUrl = legalTermsUrl;
return this;
}
/**
* Get the marketplacePublisher property: Marketplace publisher.
*
* @return the marketplacePublisher value.
*/
public String marketplacePublisher() {
return this.marketplacePublisher;
}
/**
* Set the marketplacePublisher property: Marketplace publisher.
*
* @param marketplacePublisher the marketplacePublisher value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withMarketplacePublisher(String marketplacePublisher) {
this.marketplacePublisher = marketplacePublisher;
return this;
}
/**
* Get the marketplaceOffer property: Marketplace offer.
*
* @return the marketplaceOffer value.
*/
public String marketplaceOffer() {
return this.marketplaceOffer;
}
/**
* Set the marketplaceOffer property: Marketplace offer.
*
* @param marketplaceOffer the marketplaceOffer value to set.
* @return the PremierAddOnOfferProperties object itself.
*/
public PremierAddOnOfferProperties withMarketplaceOffer(String marketplaceOffer) {
this.marketplaceOffer = marketplaceOffer;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
|
[
"actions@github.com"
] |
actions@github.com
|
b6dfa3b19c7b753971ff50b589bd5a8bd5713fe5
|
ec9b1c2bbf49885c5184286eb09bb1b921b94a7e
|
/MasterMind/src/be/steven/mastermind/model/MastermindException.java
|
22ab618fd29ea73ad5cd692f26f84824f19021aa
|
[] |
no_license
|
gvdhaege/KdG
|
a7c46973be303162c85383fe5eaa2d74fda12b0a
|
9fdec9800fdcd0773340472bc5d711bfe73be3e4
|
refs/heads/master
| 2020-03-27T17:44:10.149815
| 2018-05-25T09:52:42
| 2018-05-25T09:52:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 178
|
java
|
package be.steven.mastermind.model;
public class MastermindException extends RuntimeException {
public MastermindException(String message) {
super(message);
}
}
|
[
"steven.excelmans@cegeka.com"
] |
steven.excelmans@cegeka.com
|
236e61d9e946ebd441851bdb70e911d6cf36bbb8
|
0169de90b19e031608d6ca6a7fb47bc8448953a4
|
/test/my/test/expression/ExpressionTest.java
|
bf318e16acaf2b7b222563e3d60cddf94c2605da
|
[] |
no_license
|
zwqjsj0404/H2-Research
|
70d96c1fd08c31e8bacd6579274635f5a570affd
|
bdc6b9ec1cb5c30a2c841afd478bbaf72c4d7dda
|
refs/heads/master
| 2021-01-18T00:23:41.173885
| 2013-04-09T14:42:11
| 2013-04-09T14:42:11
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,849
|
java
|
package my.test.expression;
import my.test.TestBase;
public class ExpressionTest extends TestBase {
public static void main(String[] args) throws Exception {
new ExpressionTest().start();
}
//测试org.h2.command.Parser.readCondition()
@Override
public void startInternal() throws Exception {
stmt.executeUpdate("create table IF NOT EXISTS mytable(id int primary key, name varchar(500))");
//stmt.executeUpdate("SET @topVariableName=3");
//stmt.executeUpdate("delete top @topVariableName from mytable where id>10");
//stmt.executeUpdate("delete top 3 from mytable where id>10");
//stmt.executeUpdate("delete top ?1 from mytable where id>10");
//stmt.executeUpdate("delete top true from mytable where id>10");
//stmt.executeUpdate("update mytable set name='1234567890' where id>10");
//stmt.executeUpdate("delete top rownum from mytable where id>10");
//stmt.executeUpdate("delete top CURRENT_TIME from mytable where id>10");
//stmt.executeUpdate("delete top MAX(id) from mytable where id>10");
//stmt.executeUpdate("select MAX(id) from mytable where id>10");
//ps =conn.prepareStatement("delete top ?2 from mytable where id>10");
// PreparedStatement ps =conn.prepareStatement("delete top ?2 from mytable where id>10 and name=?1");
// ps.setString(1, "abcdef1234");
// ps.setInt(2, 3);
// ps.executeUpdate();
//下面2条SQL测试org.h2.command.Parser.readCondition()中的NOT和EXISTS
//stmt.executeUpdate("delete from mytable where not (id>0)");
//stmt.executeUpdate("delete from mytable where EXISTS (select id from mytable where id>10)");
//下面5条SQL测试org.h2.command.Parser.readConcat()的5种情况
//stmt.executeUpdate("delete from mytable where name='aaa' || 'bbb' || 'ccc'");
//stmt.executeUpdate("delete from mytable where name~'aaa'");
//stmt.executeUpdate("delete from mytable where name~*'aaa'");
//stmt.executeUpdate("delete from mytable where name!~'aaa'");
//stmt.executeUpdate("delete from mytable where name!~*'aaa'");
stmt.executeUpdate("delete from mytable where name not null"); //这样不合法
//stmt.executeUpdate("delete from mytable where name is null"); //这样才合法
//stmt.executeUpdate("delete from mytable where name like 'abc' ESCAPE 'bcd'"); //ESCAPE只能是一个字符
//stmt.executeUpdate("delete from mytable where name like 'abc' ESCAPE 'b'");
//stmt.executeUpdate("delete from mytable where name REGEXP 'b-'");
// stmt.executeUpdate("delete from mytable where name is not null");
// stmt.executeUpdate("delete from mytable where name is not DISTINCT FROM 'abc'");
// stmt.executeUpdate("delete from mytable where name is not 'abc'");
// stmt.executeUpdate("delete from mytable where name is null");
// stmt.executeUpdate("delete from mytable where name is DISTINCT FROM 'abc'");
// stmt.executeUpdate("delete from mytable where name is 'abc'");
//stmt.executeUpdate("delete from mytable where name in()");
// stmt.executeUpdate("delete from mytable where name in(select name from mytable where id>10)");
// stmt.executeUpdate("delete from mytable where id in(1,2,4)");
//stmt.executeUpdate("delete from mytable where id BETWEEN 1 AND 2");
stmt.executeUpdate("delete from mytable where id > ALL(select id from mytable where id>10)");
//ANY和SOME一样
stmt.executeUpdate("delete from mytable where id > ANY(select id from mytable where id>10)");
stmt.executeUpdate("delete from mytable where id > SOME(select id from mytable where id>10)");
//stmt.executeUpdate("delete from mytable where id > 10 (+) id > 10");
//stmt.executeUpdate("delete from mytable where id > id (+)");
stmt.executeUpdate("delete from mytable where id > 10");
for (int i = 1; i <= 200; i++) {
stmt.executeUpdate("insert into mytable(id, name) values(" + i + ", 'abcdef1234')");
}
}
}
|
[
"zhh200910@gmail.com"
] |
zhh200910@gmail.com
|
d76925e7b6df481726ec8bded25ace6a62c4759d
|
69011b4a6233db48e56db40bc8a140f0dd721d62
|
/src/com/jshx/dangerUsed/entity/DangerUsed.java
|
4279c070a9fe1dc6f301a8e7ab660718eb5434b4
|
[] |
no_license
|
gechenrun/scysuper
|
bc5397e5220ee42dae5012a0efd23397c8c5cda0
|
e706d287700ff11d289c16f118ce7e47f7f9b154
|
refs/heads/master
| 2020-03-23T19:06:43.185061
| 2018-06-10T07:51:18
| 2018-06-10T07:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,308
|
java
|
package com.jshx.dangerUsed.entity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import com.jshx.core.base.entity.BaseModel;
/**
* 实体类模板(目前仅适配MS-SQLServer数据库)
* @author
*
*/
@SuppressWarnings("serial")
@Entity
@Table(name="dangerUsed")
public class DangerUsed extends BaseModel
{
/**
* 部门代码
*/
private String deptId;
/**
* 删除标记
*/
private Integer delFlag;
/**
* 所在街道
*/
private String szz;
/**
* 危险化学品名称
*/
private String dangername;
/**
* 危规号
*/
private String dannum;
/**
* 年使用量(t)
*/
private String yearuser;
/**
* 最大贮存量(t)
*/
private String maxstorge;
/**
* 贮存方式
*/
private String storgerway;
/**
* 贮存地点
*/
private String storgeaddress;
/**
* 包装方式
*/
private String packingway;
/**
* 是否是易制毒化学品
*/
private String sfsyzdhxp;
/**
* 是否是重点监管化学品
*/
private String sfzdjghxp;
/**
* 是否是易制爆化学品
*/
private String sfyzbhxp;
/**
* 是否是剧毒化学品
*/
private String sfjdhxp;
/**
* 企业类型
*/
private String qylx;
/**
* 企业名称
*/
private String qymc;
/**
* 企业id
*/
private String comid;
/**
* 企业类型
*/
private String qylxc;
/**
* 行业分类
*/
private String hyfl;
/**
* 企业规模
*/
private String qygm;
/**
* 企业注册类型
*/
private String qyzclx;
/**
* 是否危化品企业类型
*/
private String ifwhpqylx;
/**
* 是否职业危害企业类型
*/
private String ifzywhqylx;
/**
* 是否烟花爆竹经营企业
*/
private String ifyhbzjyqy;
private String szc;
private String szcname;
//heyc 20141210 修改 start
/**
* 是否非煤矿山企业
*/
private String iffmksjyqy;
@Column(name="IFFMKSJYQY")
public String getIffmksjyqy() {
return iffmksjyqy;
}
public void setIffmksjyqy(String iffmksjyqy) {
this.iffmksjyqy = iffmksjyqy;
}
//heyc 20141210 修改 end
@Column
public String getSzc() {
return szc;
}
public void setSzc(String szc) {
this.szc = szc;
}
@Column
public String getSzcname() {
return szcname;
}
public void setSzcname(String szcname) {
this.szcname = szcname;
}
public String getIfwhpqylx() {
return ifwhpqylx;
}
public void setIfwhpqylx(String ifwhpqylx) {
this.ifwhpqylx = ifwhpqylx;
}
public String getIfzywhqylx() {
return ifzywhqylx;
}
public void setIfzywhqylx(String ifzywhqylx) {
this.ifzywhqylx = ifzywhqylx;
}
public String getIfyhbzjyqy() {
return ifyhbzjyqy;
}
public void setIfyhbzjyqy(String ifyhbzjyqy) {
this.ifyhbzjyqy = ifyhbzjyqy;
}
public String getQylxc() {
return qylxc;
}
public void setQylxc(String qylxc) {
this.qylxc = qylxc;
}
public String getHyfl() {
return hyfl;
}
public void setHyfl(String hyfl) {
this.hyfl = hyfl;
}
public String getQygm() {
return qygm;
}
public void setQygm(String qygm) {
this.qygm = qygm;
}
public String getQyzclx() {
return qyzclx;
}
public void setQyzclx(String qyzclx) {
this.qyzclx = qyzclx;
}
@Column
public String getDeptId()
{
return deptId;
}
public void setDeptId(String deptId)
{
this.deptId = deptId;
}
@Column
public Integer getDelFlag()
{
return delFlag;
}
public void setDelFlag(Integer delFlag)
{
this.delFlag = delFlag;
}
@Column(name="SZZ")
public String getSzz()
{
return this.szz;
}
public void setSzz(String szz)
{
this.szz = szz;
}
@Column(name="DANGERNAME")
public String getDangername()
{
return this.dangername;
}
public void setDangername(String dangername)
{
this.dangername = dangername;
}
@Column(name="DANNUM")
public String getDannum()
{
return this.dannum;
}
public void setDannum(String dannum)
{
this.dannum = dannum;
}
@Column(name="YEARUSER")
public String getYearuser()
{
return this.yearuser;
}
public void setYearuser(String yearuser)
{
this.yearuser = yearuser;
}
@Column(name="MAXSTORGE")
public String getMaxstorge()
{
return this.maxstorge;
}
public void setMaxstorge(String maxstorge)
{
this.maxstorge = maxstorge;
}
@Column(name="STORGERWAY")
public String getStorgerway()
{
return this.storgerway;
}
public void setStorgerway(String storgerway)
{
this.storgerway = storgerway;
}
@Column(name="STORGEADDRESS")
public String getStorgeaddress()
{
return this.storgeaddress;
}
public void setStorgeaddress(String storgeaddress)
{
this.storgeaddress = storgeaddress;
}
@Column(name="PACKINGWAY")
public String getPackingway()
{
return this.packingway;
}
public void setPackingway(String packingway)
{
this.packingway = packingway;
}
@Column(name="SFSYZDHXP")
public String getSfsyzdhxp()
{
return this.sfsyzdhxp;
}
public void setSfsyzdhxp(String sfsyzdhxp)
{
this.sfsyzdhxp = sfsyzdhxp;
}
@Column(name="SFZDJGHXP")
public String getSfzdjghxp()
{
return this.sfzdjghxp;
}
public void setSfzdjghxp(String sfzdjghxp)
{
this.sfzdjghxp = sfzdjghxp;
}
@Column(name="SFYZBHXP")
public String getSfyzbhxp()
{
return this.sfyzbhxp;
}
public void setSfyzbhxp(String sfyzbhxp)
{
this.sfyzbhxp = sfyzbhxp;
}
@Column(name="SFJDHXP")
public String getSfjdhxp()
{
return this.sfjdhxp;
}
public void setSfjdhxp(String sfjdhxp)
{
this.sfjdhxp = sfjdhxp;
}
@Column(name="QYLX")
public String getQylx()
{
return this.qylx;
}
public void setQylx(String qylx)
{
this.qylx = qylx;
}
@Column(name="QYMC")
public String getQymc()
{
return this.qymc;
}
public void setQymc(String qymc)
{
this.qymc = qymc;
}
@Column(name="COMID")
public String getComid()
{
return this.comid;
}
public void setComid(String comid)
{
this.comid = comid;
}
/**
* 是否直属企业
*/
private String ifzsqy;
/**
* 企业所属监管类型
*/
private String companyType;
public String getCompanyType() {
return companyType;
}
public void setCompanyType(String companyType) {
this.companyType = companyType;
}
@Column(name="ifzsqy")
public String getIfzsqy() {
return ifzsqy;
}
public void setIfzsqy(String ifzsqy) {
this.ifzsqy = ifzsqy;
}
}
|
[
"shellchange@sina.com"
] |
shellchange@sina.com
|
f25fe5e764a30d6c090252f1c660cf3a8708edca
|
591184fe8b21134c30b47fa86d5a275edd3a6208
|
/openejb2/modules/openejb-itests/src/itest/org/openejb/test/interop/BaseInteropTestClient.java
|
2e22b775a1274eb92f511e7b382337848a60fe7c
|
[] |
no_license
|
codehaus/openejb
|
41649552c6976bf7d2e1c2fe4bb8a3c2b82f4dcb
|
c4cd8d75133345a23d5a13b9dda9cb4b43efc251
|
refs/heads/master
| 2023-09-01T00:17:38.431680
| 2006-09-14T07:14:22
| 2006-09-14T07:14:22
| 36,228,436
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,905
|
java
|
/**
*
* Copyright 2004 The Apache Software Foundation
*
* 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.openejb.test.interop;
import java.util.Properties;
import javax.naming.InitialContext;
import javax.security.auth.Subject;
import javax.security.auth.login.LoginContext;
import org.apache.geronimo.security.jaas.UsernamePasswordCallback;
import org.openejb.test.NamedTestCase;
import org.openejb.test.TestManager;
/**
* @version $Revision$ $Date$
*/
public class BaseInteropTestClient extends NamedTestCase {
protected InitialContext initialContext;
protected LoginContext public_david_login_context;
protected Subject public_david_subject;
protected LoginContext public_alan_login_context;
protected Subject public_alan_subject;
protected LoginContext public_dain_login_context;
protected Subject public_dain_subject;
protected LoginContext public_noel_login_context;
protected Subject public_noel_subject;
protected LoginContext public_geir_login_context;
protected Subject public_geir_subject;
protected LoginContext public_george_login_context;
protected Subject public_george_subject;
protected LoginContext public_gracie_login_context;
protected Subject public_gracie_subject;
protected LoginContext black_david_login_context;
protected Subject black_david_subject;
protected LoginContext black_dain_login_context;
protected Subject black_dain_subject;
public BaseInteropTestClient(String testName) {
super("Interop." + testName);
}
protected void setUp() throws Exception {
Properties properties = TestManager.getServer().getContextEnvironment();
initialContext = new InitialContext(properties);
public_david_login_context = new LoginContext("public", new UsernamePasswordCallback("david", "guitar".toCharArray()));
public_david_login_context.login();
public_david_subject = public_david_login_context.getSubject();
public_alan_login_context = new LoginContext("public", new UsernamePasswordCallback("alan", "cat".toCharArray()));
public_alan_login_context.login();
public_alan_subject = public_alan_login_context.getSubject();
public_dain_login_context = new LoginContext("public", new UsernamePasswordCallback("dain", "dog".toCharArray()));
public_dain_login_context.login();
public_dain_subject = public_dain_login_context.getSubject();
public_noel_login_context = new LoginContext("public", new UsernamePasswordCallback("noel", "nudge".toCharArray()));
public_noel_login_context.login();
public_noel_subject = public_noel_login_context.getSubject();
public_geir_login_context = new LoginContext("public", new UsernamePasswordCallback("geir", "apple".toCharArray()));
public_geir_login_context.login();
public_geir_subject = public_geir_login_context.getSubject();
public_george_login_context = new LoginContext("public", new UsernamePasswordCallback("george", "bone".toCharArray()));
public_george_login_context.login();
public_george_subject = public_george_login_context.getSubject();
public_gracie_login_context = new LoginContext("public", new UsernamePasswordCallback("gracie", "biscuit".toCharArray()));
public_gracie_login_context.login();
public_gracie_subject = public_gracie_login_context.getSubject();
black_david_login_context = new LoginContext("black", new UsernamePasswordCallback("david", "deltaforce".toCharArray()));
black_david_login_context.login();
black_david_subject = black_david_login_context.getSubject();
black_dain_login_context = new LoginContext("black", new UsernamePasswordCallback("dain", "secret".toCharArray()));
black_dain_login_context.login();
black_dain_subject = black_dain_login_context.getSubject();
}
protected void tearDown() throws Exception {
public_david_login_context.logout();
public_alan_login_context.logout();
public_dain_login_context.logout();
public_noel_login_context.logout();
public_geir_login_context.logout();
public_george_login_context.logout();
public_gracie_login_context.logout();
black_david_login_context.logout();
black_dain_login_context.logout();
}
}
|
[
"dain@2b0c1533-c60b-0410-b8bd-89f67432e5c6"
] |
dain@2b0c1533-c60b-0410-b8bd-89f67432e5c6
|
5929b2be98fa14183629d06d8888857c05a32807
|
fd533c9d0fd4beb88630036075b1a7b85110a7e3
|
/rest/src/main/java/com/github/ankurpathak/api/security/core/RestSimpleUrlAuthenticationFailureHandler.java
|
a639798c0801f2f0d2db5d04fe40d34a3e7ec463
|
[] |
no_license
|
yassinemoumenn/spring-session-test
|
82a58a0810d743eb789855bb11001a4723520583
|
fddb263a840916bbb9a92338c12d231fbd747e43
|
refs/heads/master
| 2023-04-14T19:02:38.934009
| 2019-10-31T19:31:48
| 2019-10-31T19:31:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,434
|
java
|
package com.github.ankurpathak.api.security.core;
import com.github.ankurpathak.api.service.IFilterService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.AuthenticationException;
import org.springframework.security.web.DefaultRedirectStrategy;
import org.springframework.security.web.RedirectStrategy;
import org.springframework.security.web.WebAttributes;
import org.springframework.security.web.authentication.AuthenticationFailureHandler;
import org.springframework.security.web.util.UrlUtils;
import org.springframework.stereotype.Component;
import org.springframework.util.Assert;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.io.IOException;
@Component
public class RestSimpleUrlAuthenticationFailureHandler implements AuthenticationFailureHandler {
protected static final Logger logger = LoggerFactory.getLogger(RestSimpleUrlAuthenticationFailureHandler.class);
private String defaultFailureUrl;
private boolean forwardToDestination = false;
private boolean allowSessionCreation = true;
private RedirectStrategy redirectStrategy = new DefaultRedirectStrategy();
private final IFilterService filterService;
@Autowired
public RestSimpleUrlAuthenticationFailureHandler(IFilterService filterService) {
this.filterService = filterService;
}
public RestSimpleUrlAuthenticationFailureHandler(String defaultFailureUrl, IFilterService filterService) {
this.filterService = filterService;
setDefaultFailureUrl(defaultFailureUrl);
}
public void onAuthenticationFailure(HttpServletRequest request,
HttpServletResponse response, AuthenticationException ex)
throws IOException, ServletException {
if (defaultFailureUrl == null) {
logger.error("message: {} cause: {} path: {}", ex.getMessage(), ex.getCause(), request.getRequestURI());
ex.printStackTrace();
generateResponse(request,response, ex);
}
else {
saveException(request, ex);
if (forwardToDestination) {
logger.debug("Forwarding to " + defaultFailureUrl);
request.getRequestDispatcher(defaultFailureUrl)
.forward(request, response);
}
else {
logger.debug("Redirecting to " + defaultFailureUrl);
redirectStrategy.sendRedirect(request, response, defaultFailureUrl);
}
}
}
protected final void saveException(HttpServletRequest request,
AuthenticationException exception) {
if (forwardToDestination) {
request.setAttribute(WebAttributes.AUTHENTICATION_EXCEPTION, exception);
}
else {
HttpSession session = request.getSession(false);
if (session != null || allowSessionCreation) {
request.getSession().setAttribute(WebAttributes.AUTHENTICATION_EXCEPTION,
exception);
}
}
}
public void setDefaultFailureUrl(String defaultFailureUrl) {
Assert.isTrue(UrlUtils.isValidRedirectUrl(defaultFailureUrl), "'"
+ defaultFailureUrl + "' is not a valid redirect URL");
this.defaultFailureUrl = defaultFailureUrl;
}
protected boolean isUseForward() {
return forwardToDestination;
}
public void setUseForward(boolean forwardToDestination) {
this.forwardToDestination = forwardToDestination;
}
public void setRedirectStrategy(RedirectStrategy redirectStrategy) {
this.redirectStrategy = redirectStrategy;
}
protected RedirectStrategy getRedirectStrategy() {
return redirectStrategy;
}
protected boolean isAllowSessionCreation() {
return allowSessionCreation;
}
public void setAllowSessionCreation(boolean allowSessionCreation) {
this.allowSessionCreation = allowSessionCreation;
}
private void generateResponse(HttpServletRequest request, HttpServletResponse response, AuthenticationException ex) throws IOException {
filterService.generateUnauthorized(response, ex);
}
}
|
[
"ankurpathak@live.in"
] |
ankurpathak@live.in
|
7330249ab0ca10771e036d6111ab44a3b9bf65a2
|
ec587d0aa4aff16255bcc4c7996ef57c13cb1dbe
|
/app/src/main/java/com/hbird/base/mvp/model/login/ForgetPasswordModel.java
|
33bebacab5cc227795e38189ff96e9d98d9d9ea6
|
[
"Apache-2.0"
] |
permissive
|
lwx675652056/HBirdAccount
|
5089aa168a02ac255cc420dfd953af078819ad1b
|
b4e554bb8f6e11ca8f09b6905958ebf9dc3e8ca2
|
refs/heads/master
| 2020-06-13T09:23:20.145146
| 2019-07-01T08:15:58
| 2019-07-01T08:15:58
| 194,610,303
| 0
| 0
|
Apache-2.0
| 2019-07-01T06:55:57
| 2019-07-01T06:09:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,225
|
java
|
package com.hbird.base.mvp.model.login;
import com.hbird.base.mvp.model.http.UserApiService;
import com.hbird.base.mvp.model.imodel.login.IForgetPasswordModel;
import com.ljy.devring.DevRing;
import io.reactivex.Observable;
import okhttp3.MediaType;
import okhttp3.RequestBody;
public class ForgetPasswordModel implements IForgetPasswordModel {
@Override
public Observable resetpwd(String mobile, String password, String verifycode) {
//String jsonInfo = "{\"mobile\":\"15501233770\",\"password\":\"123456\"}";
String jsonInfo = "{\"mobile\":\"" + mobile + "\", \"password\":\"" + password + "\", \"verifycode\":\"" + verifycode + "\" }";
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), jsonInfo);
return DevRing.httpManager().getService(UserApiService.class).resetpwd(body);
}
@Override
public Observable getVerifycodeToResetpwd(String mobile) {
String jsonInfo = "{\"mobile\":\"" + mobile + "\"}";
RequestBody body = RequestBody.create(MediaType.parse("application/json; charset=utf-8"), jsonInfo);
return DevRing.httpManager().getService(UserApiService.class).getVerifycodeToResetpwd(body);
}
}
|
[
"15202653100@163.com"
] |
15202653100@163.com
|
a07545ed0d375cde9639de41ae0191c5825ea74c
|
27239f983406a79e2d7f2e13e006946cd8c41964
|
/src/day6/PersonTest.java
|
36b1ecaa23ff1c38593fd891c5b9db86965d1721
|
[] |
no_license
|
GaoChengQuan/Java1703
|
6e027dc6f89f3b0fb578c1598d93035afae414a2
|
5fd70956f7cf44c4c8b56de0ea1809ef31f9d8ad
|
refs/heads/master
| 2021-01-18T03:36:06.226519
| 2017-04-21T10:59:50
| 2017-04-21T11:04:56
| 86,309,608
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,729
|
java
|
package day6;
import org.junit.Test;
import day4.Stu;
public class PersonTest {
public static void main(String[] args) {
Person person = new Person();
System.out.println(person.age);
Student student = new Student();
System.out.println(student.age);
System.out.println(student.getSuperAge());
System.out.println(student.getAge());
}
@Test
public void testMethod1() {
Student student = new Student();
student.name = "zhangsan";
student.age = 18;
student.className = "Java1703";
student.show();
}
@Test
public void testMethod2() {
/*Person person = new Student();
person.name = "zhangsan";
person.age = 18;
//person.className = "Java1703";
person.show();*/
Student student = new Student();
student.name = "zhangsan";
student.age = 20;
Person person = new Teacher();
person.name = "lisi";
person.age = 20;
//personTeacher.salary = 1000;
person.show();
System.out.println("--------");
person = student;
person.show();
//Person person = // new Student、new Teacher
System.out.println("---------");
Teacher teacher = new Teacher();
teacher.name = "lisi";
teacher.age = 20;
//personTeacher.salary = 1000;
teacher.show();
}
@Test
public void testMethod3() {
Student student = new Student();
student.name = "zhangsan";
student.age = 20;
printStudent(student);
//Person person = new Student();
print(student);
Teacher teacher = new Teacher();
teacher.name = "lisi";
teacher.age = 20;
//printTeacher(teacher);
// Person p = new Teacher();
print(teacher);
}
public void print(Person person) {
System.out.println(person.name);
System.out.println(person.age);
person.show();
}
public void printTeacher(Teacher teacher) {
System.out.println(teacher.name);
System.out.println(teacher.age);
}
public void printStudent(Student student) {
System.out.println(student.name);
System.out.println(student.age);
}
@Test
public void test44() {
// 我以一个人的身份来看这个学生
Person person = new Student();
person.name = "lisi";
person.age = 20;
person.show();
//java.lang.ClassCastException: day6.Student cannot be cast to day6.Teacher
//Teacher teacher = (Teacher)person;
//teacher.teach();
// instanceof
if (person instanceof Teacher) {
Teacher teacher = (Teacher)person;
teacher.teach();
} else if (person instanceof Student) {
Student student = (Student)person;
student.study();
}
}
}
|
[
"529390053@qq.com"
] |
529390053@qq.com
|
84e15a398d4b3dd3858bee08db0bd44c7f2f46bf
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/smallest/769cd811312cbbb82c87033a78ac9584ad282550bcb9cc3ae8c4e3da44c288c1a5b3954e01998c3c0654ee6774ceab66e9fe5b135750905c917d2b0bb5fab98b/003/mutations/145/smallest_769cd811_003.java
|
78b382af6a3a6e4f6d2d1f7bdb760e604013c980
|
[] |
no_license
|
ozzydong/CapGen
|
356746618848065cce4e253e5d3c381baa85044a
|
0ba0321b6b1191443276021f1997833342f02515
|
refs/heads/master
| 2023-03-18T20:12:02.923428
| 2020-08-21T03:08:28
| 2020-08-21T03:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,010
|
java
|
package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_769cd811_003 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_769cd811_003 mainClass = new smallest_769cd811_003 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
if (true) return ;
IntObj x = new IntObj (), y = new IntObj (), z = new IntObj (), t =
new IntObj (), a = new IntObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
x.value = scanner.nextInt ();
y.value = scanner.nextInt ();
z.value = scanner.nextInt ();
t.value = scanner.nextInt ();
if (x.value >= y.value) {
a.value = y.value;
} else {
a.value = x.value;
}
if (y.value >= z.value) {
a.value = z.value;
}
if (z.value >= t.value) {
a.value = t.value;
}
output += (String.format ("%d is the smallest\n", a.value));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
2114f2af19708c3f239ad41c6e5d710c3c17b7db
|
5ec06dab1409d790496ce082dacb321392b32fe9
|
/clients/spring/generated/src/main/java/org/openapitools/model/OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties.java
|
6fd2d87cfaf0d0dff0177bb7596a5a5ca85551c3
|
[
"Apache-2.0"
] |
permissive
|
shinesolutions/swagger-aem-osgi
|
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
|
c2f6e076971d2592c1cbd3f70695c679e807396b
|
refs/heads/master
| 2022-10-29T13:07:40.422092
| 2021-04-09T07:46:03
| 2021-04-09T07:46:03
| 190,217,155
| 3
| 3
|
Apache-2.0
| 2022-10-05T03:26:20
| 2019-06-04T14:23:28
| null |
UTF-8
|
Java
| false
| false
| 4,257
|
java
|
package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ConfigNodePropertyBoolean;
import org.openapitools.model.ConfigNodePropertyString;
import javax.validation.Valid;
import javax.validation.constraints.*;
/**
* OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties
*/
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2019-08-05T01:13:37.880Z[GMT]")
public class OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties {
@JsonProperty("alias")
private ConfigNodePropertyString alias = null;
@JsonProperty("dav.create-absolute-uri")
private ConfigNodePropertyBoolean davCreateAbsoluteUri = null;
@JsonProperty("dav.protectedhandlers")
private ConfigNodePropertyString davProtectedhandlers = null;
public OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties alias(ConfigNodePropertyString alias) {
this.alias = alias;
return this;
}
/**
* Get alias
* @return alias
**/
@ApiModelProperty(value = "")
@Valid
public ConfigNodePropertyString getAlias() {
return alias;
}
public void setAlias(ConfigNodePropertyString alias) {
this.alias = alias;
}
public OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties davCreateAbsoluteUri(ConfigNodePropertyBoolean davCreateAbsoluteUri) {
this.davCreateAbsoluteUri = davCreateAbsoluteUri;
return this;
}
/**
* Get davCreateAbsoluteUri
* @return davCreateAbsoluteUri
**/
@ApiModelProperty(value = "")
@Valid
public ConfigNodePropertyBoolean getDavCreateAbsoluteUri() {
return davCreateAbsoluteUri;
}
public void setDavCreateAbsoluteUri(ConfigNodePropertyBoolean davCreateAbsoluteUri) {
this.davCreateAbsoluteUri = davCreateAbsoluteUri;
}
public OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties davProtectedhandlers(ConfigNodePropertyString davProtectedhandlers) {
this.davProtectedhandlers = davProtectedhandlers;
return this;
}
/**
* Get davProtectedhandlers
* @return davProtectedhandlers
**/
@ApiModelProperty(value = "")
@Valid
public ConfigNodePropertyString getDavProtectedhandlers() {
return davProtectedhandlers;
}
public void setDavProtectedhandlers(ConfigNodePropertyString davProtectedhandlers) {
this.davProtectedhandlers = davProtectedhandlers;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties orgApacheSlingJcrDavexImplServletsSlingDavExServletProperties = (OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties) o;
return Objects.equals(this.alias, orgApacheSlingJcrDavexImplServletsSlingDavExServletProperties.alias) &&
Objects.equals(this.davCreateAbsoluteUri, orgApacheSlingJcrDavexImplServletsSlingDavExServletProperties.davCreateAbsoluteUri) &&
Objects.equals(this.davProtectedhandlers, orgApacheSlingJcrDavexImplServletsSlingDavExServletProperties.davProtectedhandlers);
}
@Override
public int hashCode() {
return Objects.hash(alias, davCreateAbsoluteUri, davProtectedhandlers);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class OrgApacheSlingJcrDavexImplServletsSlingDavExServletProperties {\n");
sb.append(" alias: ").append(toIndentedString(alias)).append("\n");
sb.append(" davCreateAbsoluteUri: ").append(toIndentedString(davCreateAbsoluteUri)).append("\n");
sb.append(" davProtectedhandlers: ").append(toIndentedString(davProtectedhandlers)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
|
[
"cliffano@gmail.com"
] |
cliffano@gmail.com
|
f56bc45aed1cc91b8f93c8ceafc6e749e2b671c2
|
f85d1c4872e419b9604f851ce448d2bef6b3fcc1
|
/app/src/main/java/com/midian/bishilai/datasource/FramentReadyCommentDataResource.java
|
64a1f1e35c38447ad52c7b00cc23006e42d37eec
|
[] |
no_license
|
StormFeng/BiShiBai
|
f16f0f08981c104904eb0fac56e08d92437bdccc
|
9c89fdac5321c23109f4976cb3305f94e8c4084d
|
refs/heads/master
| 2021-01-11T04:45:40.200252
| 2017-02-06T06:18:27
| 2017-02-06T06:18:27
| 71,126,780
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 714
|
java
|
package com.midian.bishilai.datasource;
import android.content.Context;
import com.midian.base.base.BaseListDataSource;
import com.midian.base.bean.NetResult;
import java.util.ArrayList;
/**
* 待评论
*/
public class FramentReadyCommentDataResource extends BaseListDataSource {
public FramentReadyCommentDataResource(Context context) {
super(context);
}
@Override
protected ArrayList load(int page) throws Exception {
this.page=page;
ArrayList<NetResult> models = new ArrayList<>();
for(int i=0;i<10;i++){
NetResult netResult = new NetResult();
models.add(netResult);
}
hasMore=false;
return models;
}
}
|
[
"1170017470@qq.com"
] |
1170017470@qq.com
|
1b307208a0dcde6761e3deac41234e1a1f6acb0a
|
c81dd37adb032fb057d194b5383af7aa99f79c6a
|
/java/com/google/firebase/messaging/FirebaseMessaging$$Lambda$0.java
|
75cc738ef790abe19e6be7102dea3a0b91f36390
|
[] |
no_license
|
hongnam207/pi-network-source
|
1415a955e37fe58ca42098967f0b3307ab0dc785
|
17dc583f08f461d4dfbbc74beb98331bf7f9e5e3
|
refs/heads/main
| 2023-03-30T07:49:35.920796
| 2021-03-28T06:56:24
| 2021-03-28T06:56:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 625
|
java
|
package com.google.firebase.messaging;
import com.google.firebase.iid.FirebaseInstanceId;
/* compiled from: com.google.firebase:firebase-messaging@@21.0.0 */
final /* synthetic */ class FirebaseMessaging$$Lambda$0 implements Runnable {
private final FirebaseMessaging arg$1;
private final FirebaseInstanceId arg$2;
FirebaseMessaging$$Lambda$0(FirebaseMessaging firebaseMessaging, FirebaseInstanceId firebaseInstanceId) {
this.arg$1 = firebaseMessaging;
this.arg$2 = firebaseInstanceId;
}
public final void run() {
this.arg$1.lambda$new$0$FirebaseMessaging(this.arg$2);
}
}
|
[
"nganht2@vng.com.vn"
] |
nganht2@vng.com.vn
|
bcdb8a76adb449815996371afe4eaee78a534811
|
a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb
|
/actiontrail-20200706/src/main/java/com/aliyun/actiontrail20200706/models/GetAccessKeyLastUsedEventsResponse.java
|
f3f7f7e0b1f1f04bce851e0e57d5592090b77ab0
|
[
"Apache-2.0"
] |
permissive
|
aliyun/alibabacloud-java-sdk
|
83a6036a33c7278bca6f1bafccb0180940d58b0b
|
008923f156adf2e4f4785a0419f60640273854ec
|
refs/heads/master
| 2023-09-01T04:10:33.640756
| 2023-09-01T02:40:45
| 2023-09-01T02:40:45
| 288,968,318
| 40
| 45
| null | 2023-06-13T02:47:13
| 2020-08-20T09:51:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,485
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.actiontrail20200706.models;
import com.aliyun.tea.*;
public class GetAccessKeyLastUsedEventsResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("statusCode")
@Validation(required = true)
public Integer statusCode;
@NameInMap("body")
@Validation(required = true)
public GetAccessKeyLastUsedEventsResponseBody body;
public static GetAccessKeyLastUsedEventsResponse build(java.util.Map<String, ?> map) throws Exception {
GetAccessKeyLastUsedEventsResponse self = new GetAccessKeyLastUsedEventsResponse();
return TeaModel.build(map, self);
}
public GetAccessKeyLastUsedEventsResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public GetAccessKeyLastUsedEventsResponse setStatusCode(Integer statusCode) {
this.statusCode = statusCode;
return this;
}
public Integer getStatusCode() {
return this.statusCode;
}
public GetAccessKeyLastUsedEventsResponse setBody(GetAccessKeyLastUsedEventsResponseBody body) {
this.body = body;
return this;
}
public GetAccessKeyLastUsedEventsResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
30e090c457988feab8d3ec47d808ce8e84622a55
|
9b9b9b855eba93c8dd9e3c2997d53c6f4728bc5a
|
/src/kr/ac/kopo/과제/20200424/2060340008_정승원_과제/project08/PersonMain.java
|
4dee268e0db3537f126623d3a3f2422c9dd4ca69
|
[] |
no_license
|
jhw-polytech/kopo_java
|
3508569a3021ffe584f107152ad659bd1c1dd9fd
|
191372687bdf78259789f472f8e948b6a91d1b6d
|
refs/heads/master
| 2022-12-06T13:47:35.461835
| 2020-08-17T13:38:32
| 2020-08-17T13:38:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 774
|
java
|
package kr.ac.kopo.day10.project.project08;
public class PersonMain {
public static void main(String[] args) {
Person.getPopulation();
Person person01 = new Person(3);
Person person02 = new Person("승원");
Person person03 = new Person(24, "미애");
Person person04 = new Person(3, "철수");
person01.selfIntroduce();
person02.selfIntroduce();
person03.selfIntroduce();
person04.selfIntroduce();
Person.getPopulation();
/**
총 인구수는 0명 입니다.
내 이름은 Anonymous이며, 나이는 3살입니다.
내 이름은 승원이며, 나이는 12살입니다.
내 이름은 미애이며, 나이는 24살입니다.
내 이름은 철수이며, 나이는 3살입니다.
총 인구수는 4명 입니다.
*/
}
}
|
[
"2060340007@office.kopo.ac.kr"
] |
2060340007@office.kopo.ac.kr
|
663b08ccabaf02521780f5356c4291fe4c4bb5de
|
4f0968da7ac2711910fae06a99a04f557d704abe
|
/forge/src/forge/game/trigger/TriggerPayEcho.java
|
744b56c83bac5dd8daf3efb4af93f95b450ffc61
|
[] |
no_license
|
lzybluee/Reeforge
|
00c6e0900f55fb2927f2e85b130cebb1da4b350b
|
63d0dadcb9cf86c9c64630025410951e3e044117
|
refs/heads/master
| 2021-06-04T16:52:31.413465
| 2020-11-08T14:04:33
| 2020-11-08T14:04:33
| 101,260,125
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,567
|
java
|
/*
* Forge: Play Magic: the Gathering.
* Copyright (C) 2011 Forge Team
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package forge.game.trigger;
import forge.game.card.Card;
import forge.game.spellability.SpellAbility;
/**
* <p>
* TriggerPayEcho class.
* </p>
*
* @author Forge
* @version $Id: TriggerPayEcho.java 17802 2012-10-31 08:05:14Z Max mtg $
*/
public class TriggerPayEcho extends Trigger {
/**
* <p>
* Constructor for Trigger_LifeGained.
* </p>
*
* @param params
* a {@link java.util.HashMap} object.
* @param host
* a {@link forge.game.card.Card} object.
* @param intrinsic
* the intrinsic
*/
public TriggerPayEcho(final java.util.Map<String, String> params, final Card host, final boolean intrinsic) {
super(params, host, intrinsic);
}
/** {@inheritDoc} */
@Override
public final boolean performTest(final java.util.Map<String, Object> runParams2) {
if (this.mapParams.containsKey("Paid")) {
Boolean paid = (Boolean) runParams2.get("EchoPaid");
if (this.mapParams.get("Paid").equals("True") ^ paid) {
return false;
}
}
final Card card = (Card) runParams2.get("Card");
if (this.mapParams.containsKey("ValidCard")) {
if (!card.isValid(this.mapParams.get("ValidCard").split(","), this.getHostCard().getController(),
this.getHostCard(), null)) {
return false;
}
}
return true;
}
/** {@inheritDoc} */
@Override
public final void setTriggeringObjects(final SpellAbility sa) {
sa.setTriggeringObject("Card", this.getRunParams().get("Card"));
}
@Override
public String getImportantStackObjects(SpellAbility sa) {
return "";
}
}
|
[
"lzybluee@gmail.com"
] |
lzybluee@gmail.com
|
a33fa32289f91a4bfa86b0478253fcf4d14ab776
|
a8279226ec455cd4c7c4ae1779333e1c38da7d33
|
/src/com/nhom8/design/patterns/BehaviorialPatterns/Iterator/Profile.java
|
be77b18e6357e4b41d69a494d543bbc462bc2a71
|
[] |
no_license
|
phatnt99/design-parttern-example
|
4d09f50ae1c85eda99021808b52b8386ec71b1ef
|
b65d784557b573eef8a8e8dc6bcded0113165455
|
refs/heads/main
| 2023-02-11T19:20:32.590666
| 2021-01-07T14:18:57
| 2021-01-07T14:18:57
| 327,632,371
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,432
|
java
|
package com.nhom8.design.patterns.BehaviorialPatterns.Iterator;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class Profile {
private String name;
private String email;
private Map<String, List<String>> contacts = new HashMap<>();
public Profile(String email, String name, String... contacts) {
this.email = email;
this.name = name;
// Parse contact list from a set of "friend:email@gmail.com" pairs.
for (String contact : contacts) {
String[] parts = contact.split(":");
String contactType = "friend", contactEmail;
if (parts.length == 1) {
contactEmail = parts[0];
}
else {
contactType = parts[0];
contactEmail = parts[1];
}
if (!this.contacts.containsKey(contactType)) {
this.contacts.put(contactType, new ArrayList<>());
}
this.contacts.get(contactType).add(contactEmail);
}
}
public String getEmail() {
return email;
}
public String getName() {
return name;
}
public List<String> getContacts(String contactType) {
if (!this.contacts.containsKey(contactType)) {
this.contacts.put(contactType, new ArrayList<>());
}
return contacts.get(contactType);
}
}
|
[
"phatnguyen2499@gmail.com"
] |
phatnguyen2499@gmail.com
|
23c07722e95590f5290d229cb973a458d73c5dd2
|
5d76b555a3614ab0f156bcad357e45c94d121e2d
|
/src-v2/com/google/android/gms/analytics/d.java
|
dafbff4ee91b5ee310c70c480bc5c5da2b4baf83
|
[] |
no_license
|
BinSlashBash/xcrumby
|
8e09282387e2e82d12957d22fa1bb0322f6e6227
|
5b8b1cc8537ae1cfb59448d37b6efca01dded347
|
refs/heads/master
| 2016-09-01T05:58:46.144411
| 2016-02-15T13:23:25
| 2016-02-15T13:23:25
| 51,755,603
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 399
|
java
|
/*
* Decompiled with CFR 0_110.
*/
package com.google.android.gms.analytics;
import com.google.android.gms.analytics.n;
import com.google.android.gms.internal.ef;
import java.util.Collection;
import java.util.Map;
interface d {
public void a(Map<String, String> var1, long var2, String var4, Collection<ef> var5);
public void bW();
public n bX();
public void j(long var1);
}
|
[
"binslashbash@otaking.top"
] |
binslashbash@otaking.top
|
958e1cacc19b2725ba13ca049ad6a610101cb964
|
19490fcc6f396eeb35a9234da31e7b615abf6d04
|
/JDownloader/src/jd/plugins/hoster/PrzeklejOrg.java
|
6d0cb805a9345cc184896b4ef025f66b9b29bbab
|
[] |
no_license
|
amicom/my-project
|
ef72026bb91694e74bc2dafd209a1efea9deb285
|
951c67622713fd89448ffe6e0983fe3f934a7faa
|
refs/heads/master
| 2021-01-02T09:15:45.828528
| 2015-09-06T15:57:01
| 2015-09-06T15:57:01
| 41,953,961
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,595
|
java
|
//jDownloader - Downloadmanager
//Copyright (C) 2010 JD-Team support@jdownloader.org
//
//This program is free software: you can redistribute it and/or modify
//it under the terms of the GNU General Public License as published by
//the Free Software Foundation, either version 3 of the License, or
//(at your option) any later version.
//
//This program is distributed in the hope that it will be useful,
//but WITHOUT ANY WARRANTY; without even the implied warranty of
//MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
//GNU General Public License for more details.
//
//You should have received a copy of the GNU General Public License
//along with this program. If not, see <http://www.gnu.org/licenses/>.
package jd.plugins.hoster;
import java.io.IOException;
import jd.PluginWrapper;
import jd.config.Property;
import jd.http.Browser;
import jd.http.URLConnectionAdapter;
import jd.nutils.encoding.Encoding;
import jd.parser.Regex;
import jd.plugins.DownloadLink;
import jd.plugins.DownloadLink.AvailableStatus;
import jd.plugins.HostPlugin;
import jd.plugins.LinkStatus;
import jd.plugins.PluginException;
import jd.plugins.PluginForHost;
import org.appwork.utils.formatter.SizeFormatter;
@HostPlugin(revision = "$Revision: 27016 $", interfaceVersion = 2, names = { "przeklej.org" }, urls = { "http://(www\\.)?przeklej\\.org/file/[A-Za-z0-9]+" }, flags = { 0 })
public class PrzeklejOrg extends PluginForHost {
public PrzeklejOrg(PluginWrapper wrapper) {
super(wrapper);
}
@Override
public String getAGBLink() {
return "http://przeklej.org/regulamin";
}
@Override
public AvailableStatus requestFileInformation(final DownloadLink link) throws IOException, PluginException {
this.setBrowserExclusive();
br.setFollowRedirects(true);
br.setCustomCharset("utf-8");
br.getPage(link.getDownloadURL());
if (br.containsHTML("Wygląda na to, że wybrany plik został skasowany")) {
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}
final String jsredirect = br.getRegex("<script>location\\.href=\"(https?://(www\\.)?przeklej\\.org/file/[^<>\"]*?)\"</script>").getMatch(0);
if (jsredirect != null) {
br.getPage(jsredirect);
}
final String filename = br.getRegex("<title>([^<>\"]*?) \\- Przeklej\\.org</title>").getMatch(0);
final String filesize = br.getRegex(">Rozmiar:</div><div class=\"right\">([^<>\"]*?)</div>").getMatch(0);
if (filename == null || filesize == null) {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
link.setName(encodeUnicode(Encoding.htmlDecode(filename.trim())));
link.setDownloadSize(SizeFormatter.getSize(filesize));
return AvailableStatus.TRUE;
}
@Override
public void handleFree(final DownloadLink downloadLink) throws Exception, PluginException {
requestFileInformation(downloadLink);
String dllink = checkDirectLink(downloadLink, "directlink");
if (dllink == null) {
final String fid = new Regex(downloadLink.getDownloadURL(), "([A-Za-z0-9]+)$").getMatch(0);
final String downloadkey = br.getRegex("name=\"downloadKey\" value=\"([^<>\"]*?)\"").getMatch(0);
boolean failed = true;
if (downloadkey == null) {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
br.getHeaders().put("X-Requested-With", "XMLHttpRequest");
for (int i = 1; i <= 3; i++) {
final String code = this.getCaptchaCode("http://przeklej.org/application/library/token.php?url=" + fid + "_code", downloadLink);
br.postPage("http://przeklej.org/file/captachaValidate", "captacha=" + Encoding.urlEncode(code) + "&downloadKey=" + downloadkey + "&shortUrl=" + fid + "_code");
if (br.toString().equals("err")) {
continue;
}
failed = false;
break;
}
if (failed) {
throw new PluginException(LinkStatus.ERROR_CAPTCHA);
}
if (br.containsHTML("Przykro nam, ale wygląda na to, że plik nie jest")) {
throw new PluginException(LinkStatus.ERROR_FILE_NOT_FOUND);
}
dllink = br.getRegex("<script>location\\.href=\"(http[^<>\"]*?)\"</script>").getMatch(0);
if (dllink == null) {
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
}
dl = jd.plugins.BrowserAdapter.openDownload(br, downloadLink, dllink, false, 1);
if (dl.getConnection().getContentType().contains("html")) {
br.followConnection();
throw new PluginException(LinkStatus.ERROR_PLUGIN_DEFECT);
}
downloadLink.setProperty("directlink", dllink);
dl.startDownload();
}
private String checkDirectLink(final DownloadLink downloadLink, final String property) {
String dllink = downloadLink.getStringProperty(property);
if (dllink != null) {
try {
final Browser br2 = br.cloneBrowser();
URLConnectionAdapter con = br2.openGetConnection(dllink);
if (con.getContentType().contains("html") || con.getLongContentLength() == -1) {
downloadLink.setProperty(property, Property.NULL);
dllink = null;
}
con.disconnect();
} catch (final Exception e) {
downloadLink.setProperty(property, Property.NULL);
dllink = null;
}
}
return dllink;
}
/* Avoid chars which are not allowed in filenames under certain OS' */
private static String encodeUnicode(final String input) {
String output = input;
output = output.replace(":", ";");
output = output.replace("|", "¦");
output = output.replace("<", "[");
output = output.replace(">", "]");
output = output.replace("/", "⁄");
output = output.replace("\\", "∖");
output = output.replace("*", "#");
output = output.replace("?", "¿");
output = output.replace("!", "¡");
output = output.replace("\"", "'");
return output;
}
@Override
public void reset() {
}
@Override
public int getMaxSimultanFreeDownloadNum() {
return -1;
}
@Override
public void resetDownloadlink(final DownloadLink link) {
}
}
|
[
"amicom.pro@gmail.com"
] |
amicom.pro@gmail.com
|
0911b3bf8bdfc90e510587266e387b183a9056a5
|
82c593f4a668ae176738bb6b928d33ae2bae87ec
|
/core/RecursiveFor.java
|
60bd02eca01709730e909cdb22951ff92f860c41
|
[] |
no_license
|
ajay-sreeram/My-Coding-Practice
|
02db43b8d31e7ffb590c1b0aa8f012a3623ffd83
|
0a6308f26cba44137f032e91703cac8934b2f9a8
|
refs/heads/master
| 2021-06-05T02:39:36.776488
| 2018-04-07T19:57:56
| 2018-04-07T19:57:56
| 32,878,814
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 694
|
java
|
class RecursiveFor
{
public static void main(String[] args)
{
int out = 15;
for (int i = 4; i < 6; i++)
{
for (int j = 7; j >= 5; j--)
{
if (i == j) continue;
//break;
if (i > j)
{
out += main(i, j);
}
else
{
out += main(j, i);
}
}
}
System.out.println("out = " + out);
}
private static int main(int a, int b)
{
if (a - b == 0)
{
return 2;
}
return a + main(a - 1, b);
}
}
|
[
"sreeram.ajay18@gmail.com"
] |
sreeram.ajay18@gmail.com
|
e35d662d60d21e838e6245dbd9b767a34f55e667
|
c0f8b2b0d746db67a6d4e1e74c4bc81c975cfc95
|
/util/src/main/java/com/liferay/faces/util/render/HttpHeaders.java
|
a894c1f0bd16f38a3fc34478f8b5f0e0d62616d1
|
[] |
no_license
|
hkmehandiratta/liferay-faces
|
a323ac8e6a9b71a812e9a5fc1bf11dea4f29879b
|
ecc1c059744b05e7dae35aceeabf639c94fd4a5d
|
refs/heads/master
| 2021-01-21T00:32:28.968160
| 2015-02-28T15:53:54
| 2015-02-28T15:53:54
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,187
|
java
|
/**
* Copyright (c) 2000-2014 Liferay, Inc. All rights reserved.
*
* 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 (at your option)
* 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. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.faces.util.render;
/**
* @author Brian Wing Shun Chan
*/
public interface HttpHeaders {
public static final String ACCEPT = "ACCEPT";
public static final String ACCEPT_ENCODING = "Accept-Encoding";
public static final String CACHE_CONTROL = "Cache-Control";
public static final String CACHE_CONTROL_NO_CACHE_VALUE = "private, no-cache, no-store, must-revalidate";
public static final String CONTENT_DISPOSITION = "Content-Disposition";
public static final String IF_MODIFIED_SINCE = "If-Modified-Since";
public static final String USER_AGENT = "User-Agent";
}
|
[
"neil.griffin.scm@gmail.com"
] |
neil.griffin.scm@gmail.com
|
a0319d40d79fc32195a3efa9cff2c3a6274bb59c
|
857c202fc186292878f11437f9bbe5f57821e585
|
/app/src/main/java/com/uhungry/model/FaqAwns.java
|
f06c7977f31d422a7311c292078793eb9a90eea2
|
[] |
no_license
|
nehadubey2394/Uhungry
|
d1f145f82a5d9b794a926d7897dcc4863f9230d3
|
2a42b312c29dff0df08ca18d4de6ef2b3e1da146
|
refs/heads/master
| 2020-03-28T23:01:37.514268
| 2018-09-18T10:43:01
| 2018-09-18T10:43:01
| 149,271,803
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,412
|
java
|
package com.uhungry.model;
import android.os.Parcel;
import android.os.Parcelable;
public class FaqAwns implements Parcelable {
private String name;
private boolean isFavorite;
public FaqAwns(String name, boolean isFavorite) {
this.name = name;
this.isFavorite = isFavorite;
}
protected FaqAwns(Parcel in) {
name = in.readString();
}
public String getName() {
return name;
}
public boolean isFavorite() {
return isFavorite;
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof FaqAwns)) return false;
FaqAwns artist = (FaqAwns) o;
if (isFavorite() != artist.isFavorite()) return false;
return getName() != null ? getName().equals(artist.getName()) : artist.getName() == null;
}
@Override
public int hashCode() {
int result = getName() != null ? getName().hashCode() : 0;
result = 31 * result + (isFavorite() ? 1 : 0);
return result;
}
@Override
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(name);
}
@Override
public int describeContents() {
return 0;
}
public static final Creator<FaqAwns> CREATOR = new Creator<FaqAwns>() {
@Override
public FaqAwns createFromParcel(Parcel in) {
return new FaqAwns(in);
}
@Override
public FaqAwns[] newArray(int size) {
return new FaqAwns[size];
}
};
}
|
[
"neha.mindiii@gmail.com"
] |
neha.mindiii@gmail.com
|
2f8f6ea5b8f6d50fd696222d92146311e734f8f4
|
c6401ed00e8bc3832cacc5ec3203de5538dc95c8
|
/wikibrain-matrix/src/main/java/org/wikibrain/matrix/BaseMatrixRow.java
|
94e7800ffdf15cd6325e59e7126a14a00b9963bd
|
[
"Apache-2.0"
] |
permissive
|
shilad/wikibrain
|
6fa94cc71fb1c1fd34c47d4d914affe43f86c280
|
bb804edd073f6a1762efd7828bcef6d8bf4ad89b
|
refs/heads/master
| 2023-03-17T02:51:21.889006
| 2018-01-16T05:18:37
| 2018-01-16T05:18:37
| 10,455,939
| 56
| 37
| null | 2018-03-20T04:21:14
| 2013-06-03T14:10:08
|
Java
|
UTF-8
|
Java
| false
| false
| 1,755
|
java
|
package org.wikibrain.matrix;
import gnu.trove.map.hash.TIntFloatHashMap;
import java.util.LinkedHashMap;
/**
* A base class for matrix rows.
* TODO: rename index to id. Indices are dense, ids are sparse.
*/
public abstract class BaseMatrixRow implements MatrixRow {
@Override
public abstract int getColIndex(int i);
@Override
public abstract float getColValue(int i);
@Override
public abstract int getRowIndex();
@Override
public abstract int getNumCols();
@Override
public LinkedHashMap<Integer, Float> asMap() {
LinkedHashMap<Integer, Float> result = new LinkedHashMap<Integer, Float>();
for (int i = 0; i < getNumCols(); i++) {
result.put(getColIndex(i), getColValue(i));
}
return result;
}
@Override
public TIntFloatHashMap asTroveMap() {
TIntFloatHashMap result = new TIntFloatHashMap(getNumCols()*2);
for (int i = 0; i < getNumCols(); i++) {
result.put(getColIndex(i), getColValue(i));
}
return result;
}
@Override
public double getNorm() {
double length = 0.0;
for (int i = 0; i < getNumCols(); i++) {
length += getColValue(i) * getColValue(i);
}
return Math.sqrt(length);
}
@Override
public int getIndexForId(int id) {
for (int i = 0; i < getNumCols(); i++) {
if (getColIndex(i) == id) {
return i;
}
}
return -1;
}
@Override
public float getValueForId(int id) {
for (int i = 0; i < getNumCols(); i++) {
if (getColIndex(i) == id) {
return getColValue(i);
}
}
return Float.NaN;
}
}
|
[
"shilad@gmail.com"
] |
shilad@gmail.com
|
a69c70e43bf07e495e608f45b32f4ada1ad5738d
|
82f029c168cb298c331f4c9f724b5590cda4b633
|
/src/main/java/leetcode/Q00042/Solution.java
|
cc4a9e3ad9f4534e47fca4c74d83ab3f4048c557
|
[] |
no_license
|
nokchax/algorithm
|
a180c37bfd59b23689ec53716ca1247eeb3c2eb1
|
bbf827d7b497886760d767a395937fdc853ec9bd
|
refs/heads/master
| 2023-07-14T17:06:27.084119
| 2021-08-24T13:37:03
| 2021-08-24T13:37:03
| 187,340,401
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 967
|
java
|
package leetcode.Q00042;
import java.util.Stack;
public class Solution {
public int trap(int[] height) {
if(height.length == 0)
return 0;
Stack<Integer> stack = new Stack<>();
int frontHeight = height[0];
int rainSum = 0;
stack.push(height[0]);
for(int i = 1 ; i < height.length ; ++i) {
if(frontHeight <= height[i]) {
while(!stack.isEmpty()) {
rainSum += frontHeight - stack.pop();
}
frontHeight = height[i];
}
stack.push(height[i]);
}
if(stack.isEmpty())
return rainSum;
frontHeight = stack.pop();
while(!stack.isEmpty()) {
if(stack.peek() <= frontHeight) {
rainSum += frontHeight - stack.pop();
} else {
frontHeight = stack.peek();
}
}
return rainSum;
}
}
|
[
"nokchax@gmail.com"
] |
nokchax@gmail.com
|
879693ad1919508802acf2ba5f42bb9c1bc64e89
|
96838da3527b4d8bf3b4c6f3916f8a8995a91b53
|
/src/main/java/com/selectica/Base/definitions/CNDABO/conditions/ConditionExecuteTaskESignatureCancelScript.java
|
f23fc4417a4a7cf91681ea6079c73ee57caf3ace
|
[] |
no_license
|
LeoSigal/Phil
|
b5d2c50a07774a93f58a60ccdba6845f4577edc9
|
2e71214fcde15202c52efdcc7ebdfcc418d1730d
|
refs/heads/master
| 2021-01-10T18:38:52.007604
| 2019-04-19T03:59:31
| 2019-04-19T03:59:31
| 36,754,970
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 345
|
java
|
package com.selectica.Base.definitions.CNDABO.conditions;
import com.selectica.Base.eclm.definitions.shared.conditions.ESignatureCancelAvailableCondition;
import com.selectica.rcfscripts.AbstractBOReadScript;
/**ESignatureCancelAvailable*/
public class ConditionExecuteTaskESignatureCancelScript extends ESignatureCancelAvailableCondition {
}
|
[
"user@rcfproj.aws.selectica.net"
] |
user@rcfproj.aws.selectica.net
|
83a29208fed34eace25e487d379e0155f6b45682
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project88/src/test/java/org/gradle/test/performance88_3/Test88_260.java
|
02bdd155f5660052797bc0adc06420075b2231d1
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 292
|
java
|
package org.gradle.test.performance88_3;
import static org.junit.Assert.*;
public class Test88_260 {
private final Production88_260 production = new Production88_260("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
c0d8e948ca5ff00d761ccfec9b12547eb6912c49
|
1eb9b656ec1f79c8691b746644bccc6b80bb735b
|
/modules/junit4/jersey2-system-test/src/test/java/org/testifyproject/junit4/fixture/web/GreetingApplication.java
|
b17d5c4c8d37b644b8cd9984f753ca1bc90f7c47
|
[
"Apache-2.0"
] |
permissive
|
testify-project/testify
|
caf1dc3648c9f2e4b368f0e8e48614ec5c521e9b
|
31588b3574d0b3194edf653825113885e83cb8e7
|
refs/heads/develop
| 2023-07-07T04:05:37.880031
| 2018-08-21T22:24:05
| 2018-08-21T22:24:05
| 78,854,439
| 10
| 1
|
Apache-2.0
| 2023-06-27T14:19:09
| 2017-01-13T14:05:35
|
Java
|
UTF-8
|
Java
| false
| false
| 1,148
|
java
|
/*
* Copyright 2016-2017 Testify 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 org.testifyproject.junit4.fixture.web;
import javax.ws.rs.ApplicationPath;
import org.glassfish.jersey.server.ResourceConfig;
import org.testifyproject.junit4.fixture.web.feature.ServiceLocatorConfigFeature;
/**
*
* @author saden
*/
@ApplicationPath("/")
public class GreetingApplication extends ResourceConfig {
public GreetingApplication() {
packages(true, "org.testifyproject.junit4.fixture.web");
setApplicationName("Greeting Application");
register(ServiceLocatorConfigFeature.class);
}
}
|
[
"sharmarke.aden@gmail.com"
] |
sharmarke.aden@gmail.com
|
d5c14c200a807c0384d16ea98f8666085569177a
|
a1e49f5edd122b211bace752b5fb1bd5c970696b
|
/projects/org.springframework.test/src/test/java/org/springframework/test/context/junit4/ParameterizedDependencyInjectionTests.java
|
18bf66092b2e12c3b6f8fd9720662127df8e89e6
|
[
"Apache-2.0"
] |
permissive
|
savster97/springframework-3.0.5
|
4f86467e2456e5e0652de9f846f0eaefc3214cfa
|
34cffc70e25233ed97e2ddd24265ea20f5f88957
|
refs/heads/master
| 2020-04-26T08:48:34.978350
| 2019-01-22T14:45:38
| 2019-01-22T14:45:38
| 173,434,995
| 0
| 0
|
Apache-2.0
| 2019-03-02T10:37:13
| 2019-03-02T10:37:12
| null |
UTF-8
|
Java
| false
| false
| 3,790
|
java
|
/*
* Copyright 2002-2007 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.test.context.junit4;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.springframework.beans.Employee;
import org.springframework.beans.Pet;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.TestContextManager;
import org.springframework.test.context.TestExecutionListeners;
import org.springframework.test.context.support.DependencyInjectionTestExecutionListener;
/**
* Simple JUnit 4 based unit test which demonstrates how to use JUnit's
* {@link Parameterized} Runner in conjunction with
* {@link ContextConfiguration @ContextConfiguration}, the
* {@link DependencyInjectionTestExecutionListener}, and a
* {@link TestContextManager} to provide dependency injection to a
* <em>parameterized test instance</em>.
*
* @author Sam Brannen
* @since 2.5
*/
@RunWith(Parameterized.class)
@ContextConfiguration
@TestExecutionListeners( { DependencyInjectionTestExecutionListener.class })
public class ParameterizedDependencyInjectionTests {
private static final List<Employee> employees = new ArrayList<Employee>();
@Autowired
private ApplicationContext applicationContext;
@Autowired
private Pet pet;
private final String employeeBeanName;
private final String employeeName;
private final TestContextManager testContextManager;
public ParameterizedDependencyInjectionTests(final String employeeBeanName, final String employeeName)
throws Exception {
this.testContextManager = new TestContextManager(getClass());
this.employeeBeanName = employeeBeanName;
this.employeeName = employeeName;
}
@Parameters
public static Collection<String[]> employeeData() {
return Arrays.asList(new String[][] { { "employee1", "John Smith" }, { "employee2", "Jane Smith" } });
}
@BeforeClass
public static void clearEmployees() {
employees.clear();
}
@Before
public void injectDependencies() throws Throwable {
this.testContextManager.prepareTestInstance(this);
}
@Test
public final void verifyPetAndEmployee() {
// Verifying dependency injection:
assertNotNull("The pet field should have been autowired.", this.pet);
// Verifying 'parameterized' support:
final Employee employee = (Employee) this.applicationContext.getBean(this.employeeBeanName);
employees.add(employee);
assertEquals("Verifying the name of the employee configured as bean [" + this.employeeBeanName + "].",
this.employeeName, employee.getName());
}
@AfterClass
public static void verifyNumParameterizedRuns() {
assertEquals("Verifying the number of times the parameterized test method was executed.",
employeeData().size(), employees.size());
}
}
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
e917c862e21ad092db606046fe25d9aadc28a1fc
|
6d9dd7de3c2fbc18ab0cad7bae0fbd13c2fd0178
|
/ezyhttp-core/src/main/java/com/tvd12/ezyhttp/core/exception/HttpUnauthorizedException.java
|
eeb5cf9ca300d1bfab77d47b7a1f09940a7a20ae
|
[
"Apache-2.0"
] |
permissive
|
youngmonkeys/ezyhttp
|
e0db664fb3523b2202ccbb308682cae9f99fb81e
|
78f6752ad8127f0f0a81ce34b23eb1b13c60155b
|
refs/heads/master
| 2023-08-29T08:01:56.708829
| 2023-08-13T14:28:49
| 2023-08-13T14:28:49
| 226,145,856
| 10
| 6
|
Apache-2.0
| 2023-08-06T02:45:42
| 2019-12-05T16:38:40
|
Java
|
UTF-8
|
Java
| false
| false
| 346
|
java
|
package com.tvd12.ezyhttp.core.exception;
import com.tvd12.ezyhttp.core.constant.StatusCodes;
public class HttpUnauthorizedException extends HttpRequestException {
private static final long serialVersionUID = -3918109494364067705L;
public HttpUnauthorizedException(Object data) {
super(StatusCodes.UNAUTHORIZED, data);
}
}
|
[
"itprono3@gmail.com"
] |
itprono3@gmail.com
|
7cc71d5eb4bd9819c33ff5e584c84fd2bdda813a
|
8bb66a930319e743a245d4ff871493fd0dcb9988
|
/src/main/java/com/dvnb/services/Act2090801ServiceImpl.java
|
329d27a6eb0d0e6f60e44d4f7a99564c1c21ed29
|
[] |
no_license
|
vht1092/DVNB
|
615e351c752cc9029569f037d853fc3020e5fb77
|
cd51d033a3e8c5d39fc6e91934eabb17f2847bfa
|
refs/heads/master
| 2023-04-24T17:15:07.363472
| 2021-05-11T09:08:49
| 2021-05-11T09:08:49
| 365,904,908
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,340
|
java
|
package com.dvnb.services;
import java.math.BigDecimal;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import com.dvnb.entities.Act2090801;
import com.dvnb.repositories.Act2090801Repo;
@Service("act2090801Service")
@Transactional
public class Act2090801ServiceImpl implements Act2090801Service {
@Value("${spring.jpa.properties.hibernate.default_schema}")
private String sSchema;
@Autowired
private Act2090801Repo act2090801Repo;
@Override
public Page<Act2090801> findAll(Pageable page) {
return act2090801Repo.findAll(page);
}
@Override
public Act2090801 findOneByKyBaoCao(String kyBaoCao) {
return act2090801Repo.findOneByKy(kyBaoCao);
}
@Override
public void create(Act2090801 act2090801) {
act2090801Repo.save(act2090801);
}
@Override
public void deleteByKyBaoCao(String ky) {
// TODO Auto-generated method stub
act2090801Repo.deleteByKy(ky);
}
@Override
public void deleteByKyBaoCaoAndUserId(String ky, String userId) {
// TODO Auto-generated method stub
act2090801Repo.deleteByKyAndUsrId(ky, userId);
}
}
|
[
"vht1092@gmail.com"
] |
vht1092@gmail.com
|
ea711146d3c98ecb6fa78d36e9b69c85513f3473
|
64a57283d422fd17b9cdac0c4528059008002d5c
|
/Project-new-spring/boost-server-master/boost-server-api/src/main/java/com/qooco/boost/data/oracle/entities/UserLanguage.java
|
eba5dd13ca1a1850dd2b05bf88370f81aa675363
|
[
"BSL-1.0"
] |
permissive
|
dolynhan15/Java-spring-boot
|
b2ff6785b45577a5e16b016d8eeab00cf0dec56b
|
3541b6ba1b0e6a2c254f29bf29cf90d7efd1479a
|
refs/heads/main
| 2023-08-13T11:53:57.369574
| 2021-10-19T07:36:42
| 2021-10-19T07:36:42
| 397,813,627
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,564
|
java
|
package com.qooco.boost.data.oracle.entities;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.*;
import java.io.Serializable;
import java.util.Objects;
@Entity
@Table(name = "USER_LANGUAGE")
@Setter @Getter
public class UserLanguage extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "USER_LANGUAGE_SEQUENCE")
@SequenceGenerator(sequenceName = "USER_LANGUAGE_SEQ", allocationSize = 1, name = "USER_LANGUAGE_SEQUENCE")
@Basic(optional = false)
@Column(name = "USER_LANGUAGE_ID", nullable = false)
private Long id;
@Basic(optional = false)
@Column(name = "IS_NATIVE", nullable = false)
private boolean isNative;
@JoinColumn(name = "LANGUAGE_ID", referencedColumnName = "LANGUAGE_ID")
@ManyToOne(optional = false)
private Language language;
@JoinColumn(name = "USER_PROFILE_ID", referencedColumnName = "USER_PROFILE_ID")
@ManyToOne(optional = false)
private UserProfile userProfile;
public UserLanguage() {
super();
}
public UserLanguage(Long id) {
this.id = id;
}
public UserLanguage(Boolean isNative, Language language, UserProfile userProfile) {
super(userProfile.getUserProfileId());
this.isNative = isNative;
this.language = language;
this.userProfile = userProfile;
}
public UserLanguage(Boolean isNative, Language language, UserProfile userProfile, Long ownerId) {
super(ownerId);
this.isNative = isNative;
this.language = language;
this.userProfile = userProfile;
}
public UserLanguage(UserLanguage userLanguage) {
super(userLanguage.getCreatedBy());
this.isNative = userLanguage.isNative();
this.language = userLanguage.getLanguage();
this.userProfile = userLanguage.getUserProfile();
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
UserLanguage that = (UserLanguage) o;
return isNative == that.isNative &&
Objects.equals(language, that.language) &&
Objects.equals(userProfile, that.userProfile);
}
@Override
public int hashCode() {
return Objects.hash(isNative, language, userProfile);
}
@Override
public String toString() {
return userProfile.toString() + ": " + language.toString();
}
}
|
[
"dolynhan15@gmail.com"
] |
dolynhan15@gmail.com
|
903a5e06ada46bf66d9ddba7033fe389c79e023e
|
087f4ce8069304c7f0f363b6a201dc53598205b2
|
/app/src/main/java/com/ktc/tvhelper/networkspeed/model/HttpDownloadModel.java
|
092a537d7c69187bccd35d7e225765cb0f59496e
|
[] |
no_license
|
fengjw1/NetworkSpeed
|
495160d933caff9f4896e075241fc0b33b50b4a3
|
28bea854b1493deec1a3bbada477317abbb2463b
|
refs/heads/master
| 2020-03-26T20:08:19.891114
| 2018-09-19T11:39:48
| 2018-09-19T11:39:48
| 145,307,046
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,206
|
java
|
package com.ktc.tvhelper.networkspeed.model;
import android.util.Log;
import java.io.InputStream;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
public class HttpDownloadModel extends Thread {
public String fileURL = "";
private long startTime = 0;
private long endTime = 0;
private double downloadElapsedTime = 0;
private int downloadedByte = 0;
private double finalDownloadRate =0.0;
private double instantDownloadRate = 0.0;
private boolean finished = false;
private double timeout = 8;
private HttpURLConnection httpConn = null;
public HttpDownloadModel(String fileURL){
Log.d("fengjw", "HttpDownloadModel");
this.fileURL = fileURL;
}
public double getInstantDownloadRate() {
Log.d("fengjw", "getInstantDownloadRate");
return instantDownloadRate;
}
public void setInstantDownloadRate(int downloadedByte, double elapsedTime){
Log.d("fengjw", "setInstantDownloadRate");
if (downloadedByte >= 0){
this.instantDownloadRate = round((Double) (((downloadedByte * 8) / (1000 * 1000)) / elapsedTime), 2);
}else {
this.instantDownloadRate = 0.0;
}
}
public double getFinalDownloadRate() {
return round(finalDownloadRate, 2);
}
public boolean isFinished() {
return finished;
}
private double round(double value, int places){
// Log.d("fengjw", "value : " + value);
if (places < 0) throw new IllegalArgumentException();
BigDecimal bd; //bignums
try {
bd = new BigDecimal(value);
}catch (Exception e){
e.printStackTrace();
return 0.0;
}
bd = bd.setScale(places, RoundingMode.HALF_UP);
return bd.doubleValue();
}
@Override
public void run() {
Log.d("fengjw", "run");
URL url = null;
downloadedByte = 0;
int responseCode = 0;
List<String> fileUrls = new ArrayList<>();
fileUrls.add(fileURL + "random4000x4000.jpg");
fileUrls.add(fileURL + "random3000x3000.jpg");
startTime = System.currentTimeMillis();
outer:
for (String link : fileUrls){
try {
url = new URL(link);
httpConn = (HttpURLConnection) url.openConnection();
responseCode = httpConn.getResponseCode();
Log.d("fengjw", "responseCode : " + responseCode);
}catch (Exception e){
Log.d("fengjw", "Exception : " + e.getMessage());
e.printStackTrace();
}
try {
if (responseCode == HttpURLConnection.HTTP_OK){
byte[] buffer = new byte[10240];
InputStream inputStream = httpConn.getInputStream();
int len = 0;
while ((len = inputStream.read(buffer)) != -1){
downloadedByte += len;
endTime = System.currentTimeMillis();
downloadElapsedTime = (endTime - startTime) / 1000.0;
setInstantDownloadRate(downloadedByte, downloadElapsedTime);
Log.d("fengjw", "downloadedByte : " + downloadedByte);
if (downloadElapsedTime >= timeout){
Log.d("fengjw", "timeout");
break outer;
}
}
inputStream.close();
httpConn.disconnect();
}else {
Log.d("fengjw", "Link not found.");
}
}catch (Exception e){
e.printStackTrace();
}
}
endTime = System.currentTimeMillis();
downloadElapsedTime = (endTime - startTime) / 1000.0;
finalDownloadRate = ((downloadedByte * 8) / (1000 * 1000.0)) / downloadElapsedTime;
finished = true;
Log.d("fengjw", "HttpDownloadModel finished = true");
}
}
|
[
"fengjwxx@163.com"
] |
fengjwxx@163.com
|
e1ede2b3be608bba8f049438c477ae63b0914b99
|
95379ba98e777550a5e7bf4289bcd4be3c2b08a3
|
/java/net/sf/l2j/gameserver/scripting/quests/Q267_WrathOfVerdure.java
|
d38df53fe9c8a90616d4cc86dc8b5094f8dce07d
|
[] |
no_license
|
l2brutal/aCis_gameserver
|
1311617bd8ce0964135e23d5ac2a24f83023f5fb
|
5fa7fe086940343fb4ea726a6d0138c130ddbec7
|
refs/heads/master
| 2021-01-03T04:10:26.192831
| 2019-03-19T19:44:09
| 2019-03-19T19:44:09
| 239,916,465
| 0
| 1
| null | 2020-02-12T03:12:34
| 2020-02-12T03:12:33
| null |
UTF-8
|
Java
| false
| false
| 2,389
|
java
|
package net.sf.l2j.gameserver.scripting.quests;
import net.sf.l2j.gameserver.model.actor.Creature;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.model.base.ClassRace;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
public class Q267_WrathOfVerdure extends Quest
{
private static final String qn = "Q267_WrathOfVerdure";
// Items
private static final int GOBLIN_CLUB = 1335;
// Reward
private static final int SILVERY_LEAF = 1340;
public Q267_WrathOfVerdure()
{
super(267, "Wrath of Verdure");
setItemsIds(GOBLIN_CLUB);
addStartNpc(31853); // Bremec
addTalkId(31853);
addKillId(20325); // Goblin
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
if (event.equalsIgnoreCase("31853-03.htm"))
{
st.setState(STATE_STARTED);
st.set("cond", "1");
st.playSound(QuestState.SOUND_ACCEPT);
}
else if (event.equalsIgnoreCase("31853-06.htm"))
{
st.playSound(QuestState.SOUND_FINISH);
st.exitQuest(true);
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
String htmltext = getNoQuestMsg();
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
switch (st.getState())
{
case STATE_CREATED:
if (player.getRace() != ClassRace.ELF)
htmltext = "31853-00.htm";
else if (player.getLevel() < 4)
htmltext = "31853-01.htm";
else
htmltext = "31853-02.htm";
break;
case STATE_STARTED:
final int count = st.getQuestItemsCount(GOBLIN_CLUB);
if (count > 0)
{
htmltext = "31853-05.htm";
st.takeItems(GOBLIN_CLUB, -1);
st.rewardItems(SILVERY_LEAF, count);
}
else
htmltext = "31853-04.htm";
break;
}
return htmltext;
}
@Override
public String onKill(Npc npc, Creature killer)
{
final Player player = killer.getActingPlayer();
final QuestState st = checkPlayerState(player, npc, STATE_STARTED);
if (st == null)
return null;
st.dropItems(GOBLIN_CLUB, 1, 0, 500000);
return null;
}
}
|
[
"vicawnolasco@gmail.com"
] |
vicawnolasco@gmail.com
|
88f745aa88d929503b1a777e5aa621b755faf3d2
|
fd3ac62f7fcd24b753e4761f35c990fe4c029898
|
/src/ping_pong_project/Multi3.java
|
25a93e5f9f5f2e8b697059f851e0e6e7785d3fea
|
[] |
no_license
|
NawafMesari/Ping_pong_project
|
870cbd069219f7d6c95ae667f6c0ab7a6c13df76
|
66c5e6a7baab5e526ea52b6710e1d230fca50fd1
|
refs/heads/master
| 2020-04-20T02:15:57.112231
| 2019-01-31T17:49:50
| 2019-01-31T17:49:50
| 168,560,440
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,660
|
java
|
package ping_pong_project;
import java.io.IOException;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.SocketException;
import java.util.logging.Level;
import java.util.logging.Logger;
public class Multi3 implements Runnable {
public static DatagramSocket Socket2;
public static int Port;
public static int CountPacket = 1;
public static boolean FlagServer = false;
public Multi3(int p) {
this.Port = p;
}
@Override
public void run() {
try {
ReceivePacket(Port);
} catch (IOException ex) {
Logger.getLogger(Multi3.class.getName()).log(Level.SEVERE, null, ex);
}
}
public static void ReceivePacket(int Prot) throws IOException {
try {
Socket2 = new DatagramSocket(Prot);
} catch (SocketException ex) {
Logger.getLogger(Server_UDP.class.getName()).log(Level.SEVERE, null, ex);
}
byte[] b1 = new byte[1024];
DatagramPacket dp = new DatagramPacket(b1, b1.length);
while (true) {
try {
Socket2.receive(dp);
String str = new String(b1);
Server_UDP.model2.addRow(new Object[]{CountPacket++, "" + dp.getAddress(), "" + dp.getPort(), "" + dp.getLength()});
byte[] b2 = str.getBytes();
DatagramPacket dp1 = new DatagramPacket(b2, b2.length, dp.getAddress(), dp.getPort());
Socket2.send(dp1);
} catch (Exception e) {
break;
}
}
}
public static void main(String args[]) {
}
}
|
[
"you@example.com"
] |
you@example.com
|
feb0683134240f603744bd97abc34efa7dfdf10f
|
208ba847cec642cdf7b77cff26bdc4f30a97e795
|
/aj/ag/src/main/java/org.wp.ag/util/helpers/WPHtmlTagHandler.java
|
de2469f690c67da7f2bd106b2cbe5844aec1fde8
|
[] |
no_license
|
kageiit/perf-android-large
|
ec7c291de9cde2f813ed6573f706a8593be7ac88
|
2cbd6e74837a14ae87c1c4d1d62ac3c35df9e6f8
|
refs/heads/master
| 2021-01-12T14:00:19.468063
| 2016-09-27T13:10:42
| 2016-09-27T13:10:42
| 69,685,305
| 0
| 0
| null | 2016-09-30T16:59:49
| 2016-09-30T16:59:48
| null |
UTF-8
|
Java
| false
| false
| 2,153
|
java
|
package org.wp.ag.util.helpers;
import android.text.Editable;
import android.text.Html;
import android.text.style.BulletSpan;
import android.text.style.LeadingMarginSpan;
import org.xml.sax.XMLReader;
import java.util.Vector;
/**
* Handle tags that the Html class doesn't understand
* Tweaked from source at http://stackoverflow.com/questions/4044509/android-how-to-use-the-html-taghandler
*/
public class WPHtmlTagHandler implements Html.TagHandler {
private int mListItemCount = 0;
private Vector<String> mListParents = new Vector<String>();
@Override
public void handleTag(final boolean opening, final String tag, Editable output,
final XMLReader xmlReader) {
if (tag.equals("ul") || tag.equals("ol") || tag.equals("dd")) {
if (opening) {
mListParents.add(tag);
} else {
mListParents.remove(tag);
}
mListItemCount = 0;
} else if (tag.equals("li") && !opening) {
handleListTag(output);
}
}
private void handleListTag(Editable output) {
if (mListParents.lastElement().equals("ul")) {
output.append("\n");
String[] split = output.toString().split("\n");
int start = 0;
if (split.length != 1) {
int lastIndex = split.length - 1;
start = output.length() - split[lastIndex].length() - 1;
}
output.setSpan(new BulletSpan(15 * mListParents.size()), start, output.length(), 0);
} else if (mListParents.lastElement().equals("ol")) {
mListItemCount++;
output.append("\n");
String[] split = output.toString().split("\n");
int start = 0;
if (split.length != 1) {
int lastIndex = split.length - 1;
start = output.length() - split[lastIndex].length() - 1;
}
output.insert(start, mListItemCount + ". ");
output.setSpan(new LeadingMarginSpan.Standard(15 * mListParents.size()), start,
output.length(), 0);
}
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
807833966ed7ae3c8f589179f51f831a151465c4
|
8d6f6f70d9b3e0c9ae44ebb5c5932487ff95b362
|
/apis/api-core/api-core-common/src/main/java/org/hoteia/qalingo/core/web/mvc/viewbean/TaxViewBean.java
|
b34e416ff03183cab5dd919a5c899b6c194b00fa
|
[
"Apache-2.0"
] |
permissive
|
liufengzz/qalingo-engine
|
61f6346460f7d0f7ee37f61cb56d669e582b3f75
|
ab24e04bb82a1e36f5a52126d4ad5baac0b51800
|
refs/heads/master
| 2020-04-06T06:49:27.240597
| 2014-04-13T17:38:20
| 2014-04-13T17:38:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,917
|
java
|
/**
* Most of the code in the Qalingo project is copyrighted Hoteia and licensed
* under the Apache License Version 2.0 (release version 0.7.0)
* http://www.apache.org/licenses/LICENSE-2.0
*
* Copyright (c) Hoteia, 2012-2013
* http://www.hoteia.com - http://twitter.com/hoteia - contact@hoteia.com
*
*/
package org.hoteia.qalingo.core.web.mvc.viewbean;
import java.io.Serializable;
import org.apache.commons.lang.StringUtils;
import org.hoteia.qalingo.core.Constants;
public class TaxViewBean extends AbstractViewBean implements Serializable {
/**
* Generated UID
*/
private static final long serialVersionUID = -5387549593050575454L;
// ENTITY
protected Long id;
protected int version;
protected String code;
protected String name;
protected String description;
protected String percent;
protected String detailsUrl;
protected String editUrl;
// MENU
protected String img;
protected String changeContextUrl;
protected String homeUrl;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSortDescription() {
return description;
}
public String getShortDescription() {
String shortDescription = getDescription();
if(StringUtils.isNotEmpty(shortDescription)){
shortDescription = removeHtml(shortDescription);
if(shortDescription.length() > Constants.SHORT_DESCRIPTION_MAX_LENGTH){
shortDescription = shortDescription.substring(0, Constants.SHORT_DESCRIPTION_MAX_LENGTH) + "...";
}
}
return shortDescription;
}
public String getPercent() {
return percent;
}
public void setPercent(String percent) {
this.percent = percent;
}
public String getDetailsUrl() {
return detailsUrl;
}
public void setDetailsUrl(String detailsUrl) {
this.detailsUrl = detailsUrl;
}
public String getEditUrl() {
return editUrl;
}
public void setEditUrl(String editUrl) {
this.editUrl = editUrl;
}
public String getMetaShareTitle() {
String metaShareTitle = getName();
metaShareTitle = encodeQuote(metaShareTitle);
return metaShareTitle;
}
public String getMetaShareDescription() {
String metaShareDescription = getDescription();
metaShareDescription = encodeQuote(metaShareDescription);
if(StringUtils.isNotEmpty(metaShareDescription)){
metaShareDescription = removeHtml(metaShareDescription);
metaShareDescription = encodeQuote(metaShareDescription);
if(metaShareDescription.length() > Constants.SHARE_META_DESCRIPTION_MAX_LENGTH){
metaShareDescription = metaShareDescription.substring(0, Constants.SHARE_META_DESCRIPTION_MAX_LENGTH) + "...";
}
}
return metaShareDescription;
}
public String getMetaShareImage() {
return getImg();
}
public String getImg() {
return img;
}
public void setImg(String img) {
this.img = img;
}
public String getChangeContextUrl() {
return changeContextUrl;
}
public void setChangeContextUrl(String changeContextUrl) {
this.changeContextUrl = changeContextUrl;
}
public String getHomeUrl() {
return homeUrl;
}
public void setHomeUrl(String homeUrl) {
this.homeUrl = homeUrl;
}
}
|
[
"denis@Hoteia-Laptop.home"
] |
denis@Hoteia-Laptop.home
|
3bad224d95b5dfb8b6b5c92dff8aea3a161d68b1
|
c0542546866385891c196b665d65a8bfa810f1a3
|
/decompiled/android/app/WallpaperInfo.java
|
d66d4b6dbeb3694e1ea560fd8432b8846a8f5154
|
[] |
no_license
|
auxor/android-wear-decompile
|
6892f3564d316b1f436757b72690864936dd1a82
|
eb8ad0d8003c5a3b5623918c79334290f143a2a8
|
refs/heads/master
| 2016-09-08T02:32:48.433800
| 2015-10-12T02:17:27
| 2015-10-12T02:19:32
| 42,517,868
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,985
|
java
|
package android.app;
import android.content.ComponentName;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.pm.PackageManager.NameNotFoundException;
import android.content.pm.ResolveInfo;
import android.content.pm.ServiceInfo;
import android.content.res.Resources;
import android.content.res.Resources.NotFoundException;
import android.content.res.TypedArray;
import android.content.res.XmlResourceParser;
import android.graphics.drawable.Drawable;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import android.service.wallpaper.WallpaperService;
import android.util.AttributeSet;
import android.util.Printer;
import android.util.Xml;
import com.android.internal.R;
import java.io.IOException;
import org.xmlpull.v1.XmlPullParserException;
public final class WallpaperInfo implements Parcelable {
public static final Creator<WallpaperInfo> CREATOR;
static final String TAG = "WallpaperInfo";
final int mAuthorResource;
final int mDescriptionResource;
final ResolveInfo mService;
final String mSettingsActivityName;
final int mThumbnailResource;
public WallpaperInfo(Context context, ResolveInfo service) throws XmlPullParserException, IOException {
this.mService = service;
ServiceInfo si = service.serviceInfo;
PackageManager pm = context.getPackageManager();
XmlResourceParser parser = null;
try {
parser = si.loadXmlMetaData(pm, WallpaperService.SERVICE_META_DATA);
if (parser == null) {
throw new XmlPullParserException("No android.service.wallpaper meta-data");
}
Resources res = pm.getResourcesForApplication(si.applicationInfo);
AttributeSet attrs = Xml.asAttributeSet(parser);
int type;
do {
type = parser.next();
if (type == 1) {
break;
}
} while (type != 2);
if (Context.WALLPAPER_SERVICE.equals(parser.getName())) {
TypedArray sa = res.obtainAttributes(attrs, R.styleable.Wallpaper);
String settingsActivityComponent = sa.getString(1);
int thumbnailRes = sa.getResourceId(2, -1);
int authorRes = sa.getResourceId(3, -1);
int descriptionRes = sa.getResourceId(0, -1);
sa.recycle();
if (parser != null) {
parser.close();
}
this.mSettingsActivityName = settingsActivityComponent;
this.mThumbnailResource = thumbnailRes;
this.mAuthorResource = authorRes;
this.mDescriptionResource = descriptionRes;
return;
}
throw new XmlPullParserException("Meta-data does not start with wallpaper tag");
} catch (NameNotFoundException e) {
throw new XmlPullParserException("Unable to create context for: " + si.packageName);
} catch (Throwable th) {
if (parser != null) {
parser.close();
}
}
}
WallpaperInfo(Parcel source) {
this.mSettingsActivityName = source.readString();
this.mThumbnailResource = source.readInt();
this.mAuthorResource = source.readInt();
this.mDescriptionResource = source.readInt();
this.mService = (ResolveInfo) ResolveInfo.CREATOR.createFromParcel(source);
}
public String getPackageName() {
return this.mService.serviceInfo.packageName;
}
public String getServiceName() {
return this.mService.serviceInfo.name;
}
public ServiceInfo getServiceInfo() {
return this.mService.serviceInfo;
}
public ComponentName getComponent() {
return new ComponentName(this.mService.serviceInfo.packageName, this.mService.serviceInfo.name);
}
public CharSequence loadLabel(PackageManager pm) {
return this.mService.loadLabel(pm);
}
public Drawable loadIcon(PackageManager pm) {
return this.mService.loadIcon(pm);
}
public Drawable loadThumbnail(PackageManager pm) {
if (this.mThumbnailResource < 0) {
return null;
}
return pm.getDrawable(this.mService.serviceInfo.packageName, this.mThumbnailResource, this.mService.serviceInfo.applicationInfo);
}
public CharSequence loadAuthor(PackageManager pm) throws NotFoundException {
if (this.mAuthorResource <= 0) {
throw new NotFoundException();
}
String packageName = this.mService.resolvePackageName;
ApplicationInfo applicationInfo = null;
if (packageName == null) {
packageName = this.mService.serviceInfo.packageName;
applicationInfo = this.mService.serviceInfo.applicationInfo;
}
return pm.getText(packageName, this.mAuthorResource, applicationInfo);
}
public CharSequence loadDescription(PackageManager pm) throws NotFoundException {
String packageName = this.mService.resolvePackageName;
ApplicationInfo applicationInfo = null;
if (packageName == null) {
packageName = this.mService.serviceInfo.packageName;
applicationInfo = this.mService.serviceInfo.applicationInfo;
}
if (this.mService.serviceInfo.descriptionRes != 0) {
return pm.getText(packageName, this.mService.serviceInfo.descriptionRes, applicationInfo);
}
if (this.mDescriptionResource > 0) {
return pm.getText(packageName, this.mDescriptionResource, this.mService.serviceInfo.applicationInfo);
}
throw new NotFoundException();
}
public String getSettingsActivity() {
return this.mSettingsActivityName;
}
public void dump(Printer pw, String prefix) {
pw.println(prefix + "Service:");
this.mService.dump(pw, prefix + " ");
pw.println(prefix + "mSettingsActivityName=" + this.mSettingsActivityName);
}
public String toString() {
return "WallpaperInfo{" + this.mService.serviceInfo.name + ", settings: " + this.mSettingsActivityName + "}";
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeString(this.mSettingsActivityName);
dest.writeInt(this.mThumbnailResource);
dest.writeInt(this.mAuthorResource);
dest.writeInt(this.mDescriptionResource);
this.mService.writeToParcel(dest, flags);
}
static {
CREATOR = new Creator<WallpaperInfo>() {
public WallpaperInfo createFromParcel(Parcel source) {
return new WallpaperInfo(source);
}
public WallpaperInfo[] newArray(int size) {
return new WallpaperInfo[size];
}
};
}
public int describeContents() {
return 0;
}
}
|
[
"itop.my@gmail.com"
] |
itop.my@gmail.com
|
0f8c1a0c130a587c89aa38db36738d6b2167d840
|
4ac57945469ef0f889dc1665effbe465f572d1f3
|
/src/main/java/net/liuxuan/springconf/web/WebMvcConfig.java
|
5a3a4b52b4bc705ecd8f4f8ab6e97fdfd0967434
|
[] |
no_license
|
mosliu/workflow
|
5235cc7aca2aebfff9c6313529b537114c075ff7
|
1d96c48db61e90267523a736e3a8df2ba54e5823
|
refs/heads/master
| 2023-06-27T12:15:15.446418
| 2021-07-22T07:21:18
| 2021-07-22T07:21:18
| 381,945,585
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,377
|
java
|
package net.liuxuan.springconf.web;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
/**
* @author Liuxuan
* @version v1.0.0
* @description WebMVC配置,你可以集中在这里配置拦截器、过滤器、静态资源缓存等
* @date 2021-05-28
**/
@Configuration
@Slf4j
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void addInterceptors(InterceptorRegistry registry) {
// registry.addInterceptor(new RequestInterceptor()).addPathPatterns("/**");
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/uploads/**").addResourceLocations("classpath:/imagesCache/");
}
/**
* 允许跨域配置
*/
// @Override
// public void addCorsMappings(CorsRegistry registry) {
// log.info("跨域已设置");
// registry.addMapping("/**")
// .allowedOrigins("*")
// .allowedMethods("*")
// .allowedHeaders("*")
// .allowCredentials(true)
// .maxAge(3600);
// }
}
|
[
"lx0319@gmail.com"
] |
lx0319@gmail.com
|
c223593b80c528cd68dce340880d9ac3deb2e297
|
d16dd3fdfbef35ea94bafd8f7116711f070eae33
|
/app/src/main/java/com/uv/smellslikebakin/DualPaneFragment.java
|
47ddef45b594c8d2e360034126b4cb09e5c5e227
|
[] |
no_license
|
Rikharthu/smells_like_baking
|
5f651925481682b5f2914682040a967cf0208d4e
|
d321850ceb7079141552d5080317bf7ee498d0b1
|
refs/heads/master
| 2020-12-25T14:58:35.512229
| 2016-08-12T12:18:31
| 2016-08-12T12:18:31
| 65,551,054
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,670
|
java
|
package com.uv.smellslikebakin;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import com.uv.smellslikebakin.DirectionsFragment;
import com.uv.smellslikebakin.IngredientsFragment;
import com.uv.smellslikebakin.R;
import com.uv.smellslikebakin.Recipes;
import com.uv.smellslikebakin.ViewPagerFragment;
public class DualPaneFragment extends Fragment {
private static final String INGREDIENTS_FRAGMENT = "ingredients_fragment";
private static final String DIRECTIONS_FRAGMENT = "directions_fragment";
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
int index = getArguments().getInt(ViewPagerFragment.KEY_RECIPE_INDEX);
getActivity().setTitle(Recipes.names[index]);
View view = inflater.inflate(R.layout.fragment_dualpane, container, false);
FragmentManager fragmentManager = getChildFragmentManager();
// Check if there are no saved fragments (in ViewPagerFragment ViewPager does this for us)
IngredientsFragment savedIngredientsFragment = (IngredientsFragment) fragmentManager
.findFragmentByTag(INGREDIENTS_FRAGMENT);
if (savedIngredientsFragment == null) {
IngredientsFragment ingredientsFragment = new IngredientsFragment();
Bundle bundle = new Bundle();
bundle.putInt(ViewPagerFragment.KEY_RECIPE_INDEX, index);
ingredientsFragment.setArguments(bundle);
fragmentManager.beginTransaction()
.add(R.id.leftPlaceholder, ingredientsFragment, INGREDIENTS_FRAGMENT)
.commit();
}
DirectionsFragment savedDirectionsFragment = (DirectionsFragment) fragmentManager
.findFragmentByTag(DIRECTIONS_FRAGMENT);
if (savedDirectionsFragment == null) {
DirectionsFragment directionsFragment = new DirectionsFragment();
Bundle bundle = new Bundle();
bundle.putInt(ViewPagerFragment.KEY_RECIPE_INDEX, index);
directionsFragment.setArguments(bundle);
fragmentManager.beginTransaction()
.add(R.id.rightPlaceholder, directionsFragment, DIRECTIONS_FRAGMENT)
.commit();
}
return view;
}
@Override
public void onStop() {
super.onStop();
getActivity().setTitle(getResources().getString(R.string.app_name));
}
}
|
[
"uberviolence@gmail.com"
] |
uberviolence@gmail.com
|
6413c27845c1c0686039490b00d3f36b02e554f3
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/com/google/android/libraries/places/internal/zzhv.java
|
c0e5251f126380f431370635c007e611a08ceda1
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package com.google.android.libraries.places.internal;
import com.google.android.libraries.places.internal.zzhr.zza.C13839zza;
final class zzhv implements zzrf<C13839zza> {
zzhv() {
}
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
24b8803629d7127ff64f1f7fbc5280c4cf759cbd
|
7f0ec5ff21fbbe67f40769582ec1ac39e3a97950
|
/transfer-objects/src/main/java/org/sola/services/boundary/transferobjects/casemanagement/package-info.java
|
507db589c3ff8ecab567e4072002f0657b222eee
|
[] |
no_license
|
SOLA-LESOTHO/boundary
|
cfecb63410617488fd21b1baf8fe5ec64ea3bf4e
|
a0f70d62c0395929782e69235c9ca6bdd4981694
|
refs/heads/master
| 2021-01-17T11:02:42.578168
| 2016-11-15T13:25:28
| 2016-11-15T13:25:28
| 7,107,718
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,198
|
java
|
/**
* ******************************************************************************************
* Copyright (c) 2013 Food and Agriculture Organization of the United Nations (FAO)
* and the Lesotho Land Administration Authority (LAA). All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,this list
* of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the names of FAO, the LAA 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 HOLDER 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.
* *********************************************************************************************
*/
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
@XmlSchema(namespace=ServiceConstants.CASE_MAN_TO_NAMESPACE)
package org.sola.services.boundary.transferobjects.casemanagement;
import javax.xml.bind.annotation.XmlSchema;
import org.sola.services.common.ServiceConstants;
|
[
"armcdowell@hotmail.com"
] |
armcdowell@hotmail.com
|
35945938e35567a2e58845267170fdf439bc5dc7
|
6db0b9398aee839154557ac209d2d665cca64ce1
|
/src/com/wang/so/love/android/app/utils/photo/ImageItem.java
|
f012da647561ceda9be1c327610a5143c20b6802
|
[] |
no_license
|
hejiawang/SoLoveAndroidApp
|
ab4449741abb0d4b021dd41571c046981db6d95a
|
b797e834a7dfbd7a205a35c88d2cbb6e34e3da78
|
refs/heads/master
| 2020-06-16T16:37:15.447442
| 2016-12-09T13:50:04
| 2016-12-09T13:50:04
| 75,082,960
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,249
|
java
|
package com.wang.so.love.android.app.utils.photo;
import java.io.IOException;
import java.io.Serializable;
import android.graphics.Bitmap;
public class ImageItem implements Serializable {
public String imageId;
public String thumbnailPath;
public String imagePath;
private Bitmap bitmap;
public boolean isSelected = false;
public String getImageId() {
return imageId;
}
public void setImageId(String imageId) {
this.imageId = imageId;
}
public String getThumbnailPath() {
return thumbnailPath;
}
public void setThumbnailPath(String thumbnailPath) {
this.thumbnailPath = thumbnailPath;
}
public String getImagePath() {
return imagePath;
}
public void setImagePath(String imagePath) {
this.imagePath = imagePath;
}
public boolean isSelected() {
return isSelected;
}
public void setSelected(boolean isSelected) {
this.isSelected = isSelected;
}
public Bitmap getBitmap() {
if(bitmap == null){
try {
bitmap = Bimp.revitionImageSize(imagePath);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
return bitmap;
}
public void setBitmap(Bitmap bitmap) {
this.bitmap = bitmap;
}
}
|
[
"952327407@qq.com"
] |
952327407@qq.com
|
a152bf55fe2a60d3f26dbd2e9ad0539bef57aced
|
f416a9ebc33605236077999db964197eb6f7ad20
|
/Rearrange String k Distance Apart.java
|
61e042d3200691b716b7193e3270b87d65676ef3
|
[] |
no_license
|
supermarkion/LeetCode
|
d44fb9f64d7d754f2958b05c97b2337bb2fc8136
|
bbb13975e0728a24e0bd8916c09a4dd020b2f0fa
|
refs/heads/master
| 2020-04-04T04:01:06.979900
| 2017-02-20T08:43:51
| 2017-02-20T08:43:51
| 47,477,689
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,936
|
java
|
/*
Given a non-empty string str and an integer k, rearrange the string such that the same characters
are at least distance k from each other. All input strings are given in lowercase letters. If it
is not possible to rearrange the string, return an empty string "".
Link: https://leetcode.com/problemset/algorithms/
Example:
Example 1:
str = "aabbcc", k = 3
Result: "abcabc"
The same letters are at least distance 3 from each other.
Example 2:
str = "aaabc", k = 3
Answer: ""
It is not possible to rearrange the string.
Example 3:
str = "aaadbbcc", k = 2
Answer: "abacabcd"
Another possible answer is: "abcabcda"
The same letters are at least distance 2 from each other.
Solution: None
Source: https://leetcode.com/discuss/108530/java-15ms-solution-with-two-auxiliary-array-o-n-time
*/
public class Solution {
public String rearrangeString(String str, int k) {
int length = str.length();
int[] count = new int[26];
int[] valid = new int[26];
for (int i = 0; i < length; i++) {
count[str.charAt(i) - 'a']++;
}
StringBuilder sb = new StringBuilder();
for (int index = 0;index < length;index++) {
int candidatePos = findValidMax(count, valid, index);
if (candidatePos == -1) {
return "";
}
count[candidatePos]--;
valid[candidatePos] = index + k;
sb.append((char)('a' + candidatePos));
}
return sb.toString();
}
private int findValidMax(int[] count, int[] valid, int index){
int max = Integer.MIN_VALUE;
int candidatePos = -1;
for (int i = 0; i < count.length; i++) {
if (count[i] > 0 && count[i] > max && index >= valid[i]) {
max = count[i];
candidatePos = i;
}
}
return candidatePos;
}
}
|
[
"supermarkioner@gmail.com"
] |
supermarkioner@gmail.com
|
2df151109f5bfe61a51fe86da86cfbc486d189c7
|
e16c9b04576833806fa17adf10a020ed8be41154
|
/MAVGCL/src/com/comino/flight/ui/widgets/panel/InfoWidget.java
|
54459241c0fd71a1e34202637fa9e52cad0e1eb3
|
[
"BSD-3-Clause",
"BSD-2-Clause"
] |
permissive
|
mr-d-self-driving/MAVGCL
|
c439366f36a11ed6223ced1a0d2087733d4a0e2c
|
9e19ba699f8026929fe476174bdf1897d7e41cbc
|
refs/heads/master
| 2021-11-28T09:32:43.915794
| 2018-01-19T06:47:19
| 2018-01-19T06:47:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,825
|
java
|
/****************************************************************************
*
* Copyright (c) 2017,2018 Eike Mansfeld ecm@gmx.de. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. 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.
* 3. Neither the name of the copyright holder 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 com.comino.flight.ui.widgets.panel;
import org.mavlink.messages.MAV_SEVERITY;
import com.comino.flight.FXMLLoadHelper;
import com.comino.jfx.extensions.WidgetPane;
import com.comino.mav.control.IMAVController;
import com.comino.msp.execution.control.listener.IMAVMessageListener;
import com.comino.msp.model.segment.LogMessage;
import javafx.application.Platform;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.ListCell;
import javafx.scene.control.ListView;
import javafx.scene.control.MenuItem;
public class InfoWidget extends WidgetPane {
private static final int MAX_ITEMS = 200;
@FXML
private ListView<LogMessage> listview;
public InfoWidget() {
super(300, true);
FXMLLoadHelper.load(this, "InfoWidget.fxml");
}
@FXML
private void initialize() {
listview.prefHeightProperty().bind(this.heightProperty().subtract(13));
listview.setCellFactory(list -> new ListCell<LogMessage>() {
@Override
protected void updateItem(LogMessage m, boolean empty) {
super.updateItem(m,empty);
if(!empty) {
setPrefWidth(130);
setWrapText(true);
switch(m.severity) {
case MAV_SEVERITY.MAV_SEVERITY_NOTICE:
setStyle("-fx-text-fill:lightblue;");
break;
case MAV_SEVERITY.MAV_SEVERITY_DEBUG:
setStyle("-fx-text-fill:lightgreen;");
break;
case MAV_SEVERITY.MAV_SEVERITY_WARNING:
setStyle("-fx-text-fill:wheat;");
break;
case MAV_SEVERITY.MAV_SEVERITY_CRITICAL:
setStyle("-fx-text-fill:salmon;");
break;
case MAV_SEVERITY.MAV_SEVERITY_EMERGENCY:
setStyle("-fx-text-fill:tomato;");
break;
case MAV_SEVERITY.MAV_SEVERITY_ERROR:
setStyle("-fx-text-fill:yellow;");
break;
case MAV_SEVERITY.MAV_SEVERITY_ALERT:
setStyle("-fx-text-fill:steelblue;");
break;
default:
setStyle("-fx-text-fill:white;");
}
setText(m.msg);
} else
setText(null);
}
});
ContextMenu ctxm = new ContextMenu();
MenuItem cmItem1 = new MenuItem("Clear list");
cmItem1.setOnAction(new EventHandler<ActionEvent>() {
public void handle(ActionEvent e) {
listview.getItems().clear();
}
});
ctxm.getItems().add(cmItem1);
listview.setContextMenu(ctxm);
}
public void setup(IMAVController control) {
control.addMAVMessageListener( new IMAVMessageListener() {
@Override
public void messageReceived(LogMessage message) {
if(message.severity< MAV_SEVERITY.MAV_SEVERITY_DEBUG ) {
final LogMessage m = message;
Platform.runLater(new Runnable() {
@Override
public void run() {
listview.getItems().add(m);
if(listview.getItems().size()>MAX_ITEMS)
listview.getItems().remove(0);
listview.scrollTo(listview.getItems().size()-1);
listview.getSelectionModel().select(-1);
}
});
}
}
});
}
public void clear() {
Platform.runLater(() -> {
listview.getItems().clear();
});
}
}
|
[
"ecm@gmx.de"
] |
ecm@gmx.de
|
6d6a8cf56fbb401a7568a3926f7a4462e7eacf86
|
227d3f7b2565e953a066ec7cdf848810d275eb8d
|
/cardinal-components-chunk/src/main/java/nerdhub/cardinal/components/mixins/common/chunk/MixinChunkHolder.java
|
da5255367f38327991073390094f9fa28df4def7
|
[
"MIT"
] |
permissive
|
Pyrofab/Cardinal-Components-API
|
1b3f42cee977a128f6a3f3477df80ebb39a00ced
|
975d5c51d9e23f36b5ec88a219c8e1f1fa58594f
|
refs/heads/master
| 2020-06-04T02:48:53.074311
| 2019-08-29T14:33:29
| 2019-08-29T14:33:29
| 191,841,397
| 0
| 1
|
MIT
| 2019-07-03T21:55:52
| 2019-06-13T22:29:17
|
Java
|
UTF-8
|
Java
| false
| false
| 2,456
|
java
|
/*
* Cardinal-Components-API
* Copyright (C) 2019 GlassPane
*
* 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 nerdhub.cardinal.components.mixins.common.chunk;
import nerdhub.cardinal.components.api.event.ChunkSyncCallback;
import net.fabricmc.fabric.api.server.PlayerStream;
import net.minecraft.server.network.ServerPlayerEntity;
import net.minecraft.server.world.ChunkHolder;
import net.minecraft.world.chunk.WorldChunk;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ChunkHolder.class)
public abstract class MixinChunkHolder {
/**
* Synchronizes components whenever a {@link net.minecraft.client.network.packet.ChunkDataS2CPacket} is sent
*/
@Inject(
method = "flushUpdates",
at = @At(
value = "INVOKE",
target = "Lnet/minecraft/server/world/ChunkHolder;sendPacketToPlayersWatching(Lnet/minecraft/network/Packet;Z)V",
ordinal = 3,
shift = At.Shift.AFTER
)
)
private void onPlayerLogIn(WorldChunk chunk, CallbackInfo ci) {
PlayerStream.watching(chunk.getWorld(), chunk.getPos()).forEach(p ->
ChunkSyncCallback.EVENT.invoker().onChunkSync((ServerPlayerEntity) p, chunk));
}
}
|
[
"redstoneinfire@gmail.com"
] |
redstoneinfire@gmail.com
|
b5a92874a89beb8b9cd4f017b801f7fe9098d6cf
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/24/24_2b996d734ab4c4618c0487ba0b1b774fcdee97e2/AbstractColumnSortingTest/24_2b996d734ab4c4618c0487ba0b1b774fcdee97e2_AbstractColumnSortingTest_t.java
|
9e67f27d7e22591ba9846d5c04d28b1f46201ca8
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,056
|
java
|
/*******************************************************************************
* JBoss, Home of Professional Open Source
* Copyright 2010-2013, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*******************************************************************************/
package org.richfaces.tests.metamer.ftest.richColumn;
import static org.richfaces.tests.metamer.ftest.attributes.AttributeList.columnAttributes;
import static org.testng.Assert.assertEquals;
import java.util.Collections;
import org.jboss.arquillian.ajocado.request.RequestType;
import org.richfaces.tests.metamer.bean.rich.RichColumnBean;
import org.richfaces.tests.metamer.ftest.annotations.Inject;
import org.richfaces.tests.metamer.ftest.annotations.Use;
import org.richfaces.tests.metamer.model.Capital;
import org.richfaces.model.SortOrder;
/**
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision: 22971 $
*/
public abstract class AbstractColumnSortingTest extends AbstractColumnModelTest {
@Inject
@Use(enumeration = true)
SortOrder sortOrder;
public void testSortingWithSortOrder() {
columnAttributes.setRequestType(RequestType.XHR);
columnAttributes.set(ColumnAttributes.sortOrder, sortOrder);
switch (sortOrder) {
case ascending:
Collections.sort(capitals, RichColumnBean.STATE_NAME_LENGTH_COMPARATOR);
break;
case descending:
Collections.sort(capitals, Collections.reverseOrder(RichColumnBean.STATE_NAME_LENGTH_COMPARATOR));
break;
default:
// default case required by checkstyle
break;
}
for (int i = 0; i < capitals.size(); i++) {
Capital actualCapital = model.getCapital(i);
Capital expectedCapital = capitals.get(i);
assertEquals(actualCapital.getName(), expectedCapital.getName());
assertEquals(actualCapital.getState(), expectedCapital.getState());
}
columnAttributes.setRequestType(RequestType.HTTP);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
643496dfcde1cf9d991e1f9e8680dc19ae9bf2f6
|
d314f4b6ad9715b12ca05b0966e6095c7053c5a0
|
/examples/unimplemented_examples/org/encog/examples/neural/xorpartial/XORPartial.java
|
7b125e4368cade779f175542aadca95fd2547704
|
[] |
no_license
|
MichielVdAnker/gwtcog
|
d2b46be0f27413e50b829b6d9cbcd16b5a2d2e54
|
795047ced68048e142561f7f4ad99a3dde9b63ee
|
refs/heads/master
| 2021-01-23T12:34:45.840098
| 2013-05-11T14:27:40
| 2013-05-11T14:27:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,747
|
java
|
/*
* Encog(tm) Java Examples v3.2
* http://www.heatonresearch.com/encog/
* https://github.com/encog/encog-java-examples
*
* Copyright 2008-2013 Heaton Research, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information on Heaton Research copyrights, licenses
* and trademarks visit:
* http://www.heatonresearch.com/copyright
*/
package gwtcog.examples.client.org.encog.examples.neural.xorpartial;
import gwtcog.core.neural.data.NeuralDataSet;
import gwtcog.core.neural.data.basic.BasicNeuralDataSet;
import gwtcog.core.neural.networks.BasicNetwork;
import gwtcog.core.util.simple.EncogUtility;
/**
* Partial neural networks. Encog allows you to remove any neuron connection in
* a fully connected neural network. This example creates a 2x10x10x1 neural
* network to learn the XOR. Several connections are removed prior to training.
*/
public class XORPartial {
public static double XOR_INPUT[][] = { { 0.0, 0.0 }, { 1.0, 0.0 },
{ 0.0, 1.0 }, { 1.0, 1.0 } };
public static double XOR_IDEAL[][] = { { 0.0 }, { 1.0 }, { 1.0 }, { 0.0 } };
public static void main(final String args[]) {
BasicNetwork network = EncogUtility.simpleFeedForward(2, 10, 10, 1,
false);
network.reset();
// Remove a few connections (does not really matter which, the network
// will train around them).
network.enableConnection(0, 0, 0, false);
network.enableConnection(0, 1, 3, false);
network.enableConnection(1, 1, 1, false);
network.enableConnection(1, 4, 4, false);
NeuralDataSet trainingSet = new BasicNeuralDataSet(XOR_INPUT, XOR_IDEAL);
EncogUtility.trainToError(network, trainingSet, 0.01);
System.out.println("Final output:");
EncogUtility.evaluate(network, trainingSet);
System.out
.println("Training should leave hidden neuron weights at zero.");
System.out.println("First removed neuron weight:" + network.getWeight(0, 0, 0) );
System.out.println("Second removed neuron weight:" + network.getWeight(0, 1, 3) );
System.out.println("Third removed neuron weight:" + network.getWeight(1, 1, 1) );
System.out.println("Fourth removed neuron weight:" + network.getWeight(1, 4, 4) );
}
}
|
[
"michiel.van.den.anker@gmail.com"
] |
michiel.van.den.anker@gmail.com
|
75270d28f1e570dc4a4c55ddcc589a881116e848
|
313827279fa76d28d1ff7b22cfa34ace61d0988b
|
/src/main/java/ivorius/psychedelicraft/mixin/client/MixinInGameHud.java
|
a6f993c8891041ee05465381e665d00ef9bfcfce
|
[
"MIT"
] |
permissive
|
Sollace/Psychedelicraft
|
1a393db0d5799e81338b93dae86275f33c8d9e28
|
a7f80e15e21988bb65287986cd3aaec0fd5c3ac6
|
refs/heads/1.20
| 2023-09-01T15:02:44.928673
| 2023-08-22T22:53:06
| 2023-08-22T23:04:09
| 201,674,629
| 6
| 3
|
MIT
| 2023-07-06T00:36:39
| 2019-08-10T19:33:53
|
Java
|
UTF-8
|
Java
| false
| false
| 719
|
java
|
package ivorius.psychedelicraft.mixin.client;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Inject;
import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
import ivorius.psychedelicraft.client.render.DrugRenderer;
import net.minecraft.client.gui.DrawContext;
import net.minecraft.client.gui.hud.InGameHud;
@Mixin(InGameHud.class)
abstract class MixinInGameHud {
@Inject(method = "render(Lnet/minecraft/client/gui/DrawContext;F)V", at = @At("HEAD"))
private void onRender(DrawContext context, float tickDelta, CallbackInfo info) {
DrugRenderer.INSTANCE.onRenderOverlay(context, tickDelta);
}
}
|
[
"sollacea@gmail.com"
] |
sollacea@gmail.com
|
704860b184d9db50ea7d0d53580ae17ffc7516b0
|
5fe70f7634032cb77cc57cba778d18d47a764b6c
|
/openbp-cockpit/src/main/java/org/openbp/cockpit/modeler/ModelerColors.java
|
40be5711f6f4c01a7d13834d8d37476301da90ba
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
cleancode1116/OpenBP
|
cab222b3e336f1c81d6bc832e3c0d53244c13746
|
460a09c2f396ed1f77add70637644d254326d350
|
refs/heads/master
| 2020-07-11T06:07:24.821569
| 2016-11-18T07:43:22
| 2016-11-18T07:43:22
| 74,003,934
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,766
|
java
|
/*
* Copyright 2007 skynamics AG
*
* 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.openbp.cockpit.modeler;
import java.awt.Color;
import org.openbp.awt.Color2StringConverter;
import org.openbp.swing.plaf.sky.SkyTheme;
/**
* Color constants used by the modeler.
*
* @author Stephan Moritz
*/
public class ModelerColors
{
//////////////////////////////////////////////////
// @@ Items
//////////////////////////////////////////////////
/** Shadow fill color */
public static final Color SHADOW_FILL = new Color(0.8f, 0.8f, 0.8f);
/** Shadow border color */
public static final Color SHADOW_BORDER = new Color(0.9f, 0.9f, 0.9f);
//////////////////////////////////////////////////
// @@ Selection
//////////////////////////////////////////////////
/** Border color for selected object */
public static final Color SELECTED_BORDER = Color.RED;
/** Border color when hovering object */
public static final Color HOVERED_BORDER = Color.BLUE;
/** Border color for current position in debugger */
public static final Color DEBUGGER_BORDER = Color.RED;
//////////////////////////////////////////////////
// @@ Handles
//////////////////////////////////////////////////
/** Line of control point handle */
public static final Color HANDLE_LINE = Color.GRAY;
/** Connection waypoint handle */
public static final Color HANDLE_WAYPOINT_FILL = Color.RED;
/** Connection waypoint handle */
public static final Color HANDLE_WAYPOINT_BORDER = Color.BLACK;
/** Connection angle handle */
public static final Color HANDLE_ANGLE_FILL = Color.WHITE;
/** Connection angle handle */
public static final Color HANDLE_ANGLE_BORDER = Color.BLACK;
/** Line of control point handle */
public static final Color LABEL_HANDLE_LINE = Color.GRAY;
/** Connection waypoint handle */
public static final Color HANDLE_TEXTSIZE_FILL = Color.RED;
//////////////////////////////////////////////////
// @@ Miscelleanous
//////////////////////////////////////////////////
/** Modeler workspace */
public static final Color WORKSPACE = SkyTheme.COLOR_BACKGROUND_LIGHT;
/** Grid */
public static final Color GRID = Color.lightGray;
/** Drop region */
public static final Color DROP_REGION = Color.GREEN;
/** Rubberband tracker */
public static final Color RUBBERBAND = Color.BLACK;
/** Background color for image generator */
public static final Color IMAGE_GENERATOR_BACKGROUND = Color.WHITE;
/** Allowed connection/drop points */
public static final Color CONNECTION_ACCEPT = new Color(0f, 1f, 0f, 0.2f);
/** Overlay color for figures that have an expression associated with them */
public static final Color EXPRESSION_OVERLAY = new Color(0f, 0f, 1f, 0.15f);
/** Breakpoint fill color */
public static final Color BREAKPOINT_OVERLAY = new Color(255, 130, 0, 128);
/** Miniview tracker (solid) */
public static final Color MINIVIEW = SkyTheme.COLOR_BACKGROUND_LIGHT;
/** Miniview tracker (solid) */
public static final Color MINIVIEW_TRACKER = new Color(0f, 0f, 1f, 0.1f);
static
{
Color2StringConverter.addPredefinedColor("workspace", WORKSPACE);
}
}
|
[
"stephan@blackbuild.com"
] |
stephan@blackbuild.com
|
5441184c415a0b4e88ec1f83cc2939c9db2f06c0
|
5b5e33cce6f2d7e3b59c57f36ad189bb32501fe8
|
/deobfuscator/src/main/java/net/runelite/asm/attributes/code/instructions/PutStatic.java
|
486f883f36e622b44cb211c29c9b49737fd6447f
|
[
"BSD-2-Clause"
] |
permissive
|
WhatAreBirds23/runelite
|
3aa41feab1281883d33afc7f35228e154e7254a8
|
8762c1f42d3edad93818f27b1555013850994874
|
refs/heads/master
| 2021-01-01T17:41:36.548933
| 2017-07-23T17:01:37
| 2017-07-23T17:01:37
| 98,137,113
| 1
| 0
| null | 2017-07-24T01:30:15
| 2017-07-24T01:30:15
| null |
UTF-8
|
Java
| false
| false
| 5,902
|
java
|
/*
* Copyright (c) 2016-2017, Adam <Adam@sigterm.info>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
* 2. 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.
*
* 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 net.runelite.asm.attributes.code.instructions;
import net.runelite.asm.ClassFile;
import net.runelite.asm.ClassGroup;
import net.runelite.asm.Method;
import net.runelite.asm.attributes.code.Instruction;
import net.runelite.asm.attributes.code.InstructionType;
import net.runelite.asm.attributes.code.Instructions;
import net.runelite.asm.attributes.code.instruction.types.GetFieldInstruction;
import net.runelite.asm.attributes.code.instruction.types.SetFieldInstruction;
import net.runelite.asm.execution.Frame;
import net.runelite.asm.execution.InstructionContext;
import net.runelite.asm.execution.Stack;
import net.runelite.asm.execution.StackContext;
import net.runelite.asm.pool.Class;
import net.runelite.asm.pool.Field;
import net.runelite.deob.deobfuscators.mapping.MappingExecutorUtil;
import net.runelite.deob.deobfuscators.mapping.ParallelExecutorMapping;
import org.objectweb.asm.MethodVisitor;
public class PutStatic extends Instruction implements SetFieldInstruction
{
private Field field;
private net.runelite.asm.Field myField;
public PutStatic(Instructions instructions, InstructionType type)
{
super(instructions, type);
}
public PutStatic(Instructions instructions, net.runelite.asm.Field field)
{
super(instructions, InstructionType.PUTSTATIC);
this.field = field.getPoolField();
this.myField = field;
}
@Override
public String toString()
{
Method m = this.getInstructions().getCode().getMethod();
return "putstatic " + myField + " in " + m;
}
@Override
public void accept(MethodVisitor visitor)
{
visitor.visitFieldInsn(this.getType().getCode(),
field.getClazz().getName(),
field.getName(),
field.getType().getFullType());
}
@Override
public InstructionContext execute(Frame frame)
{
InstructionContext ins = new InstructionContext(this, frame);
Stack stack = frame.getStack();
StackContext object = stack.pop();
ins.pop(object);
if (myField != null)
{
frame.getExecution().order(frame, myField);
}
return ins;
}
@Override
public Field getField()
{
return field;
}
@Override
public net.runelite.asm.Field getMyField()
{
Class clazz = field.getClazz();
ClassGroup group = this.getInstructions().getCode().getMethod().getMethods().getClassFile().getGroup();
ClassFile cf = group.findClass(clazz.getName());
if (cf == null)
{
return null;
}
net.runelite.asm.Field f2 = cf.findFieldDeep(field.getName(), field.getType());
return f2;
}
@Override
public void lookup()
{
myField = getMyField();
}
@Override
public void regeneratePool()
{
if (myField != null)
{
if (getMyField() != myField)
{
field = myField.getPoolField();
}
}
}
@Override
public void map(ParallelExecutorMapping mapping, InstructionContext ctx, InstructionContext other)
{
net.runelite.asm.Field myField = this.getMyField();
net.runelite.asm.Field otherField = ((PutStatic) other.getInstruction()).getMyField();
assert MappingExecutorUtil.isMaybeEqual(myField.getType(), otherField.getType());
mapping.map(this, myField, otherField);
StackContext object1 = ctx.getPops().get(0),
object2 = other.getPops().get(0);
InstructionContext base1 = MappingExecutorUtil.resolve(object1.getPushed(), object1);
InstructionContext base2 = MappingExecutorUtil.resolve(object2.getPushed(), object2);
if (base1.getInstruction() instanceof GetFieldInstruction && base2.getInstruction() instanceof GetFieldInstruction)
{
GetFieldInstruction gf1 = (GetFieldInstruction) base1.getInstruction(),
gf2 = (GetFieldInstruction) base2.getInstruction();
net.runelite.asm.Field f1 = gf1.getMyField();
net.runelite.asm.Field f2 = gf2.getMyField();
if (f1 != null && f2 != null)
{
mapping.map(this, f1, f2);
}
}
}
@Override
public boolean isSame(InstructionContext thisIc, InstructionContext otherIc)
{
if (thisIc.getInstruction().getClass() != otherIc.getInstruction().getClass())
{
return false;
}
PutStatic thisPf = (PutStatic) thisIc.getInstruction(),
otherPf = (PutStatic) otherIc.getInstruction();
net.runelite.asm.Field f1 = thisPf.getMyField();
net.runelite.asm.Field f2 = otherPf.getMyField();
if ((f1 != null) != (f2 != null))
{
return false;
}
/* The class names are random */
return MappingExecutorUtil.isMaybeEqual(f1.getType(), f2.getType());
}
@Override
public boolean canMap(InstructionContext thisIc)
{
return true;
}
@Override
public void setField(Field field)
{
this.field = field;
}
}
|
[
"Adam@anope.org"
] |
Adam@anope.org
|
2f20fa81d923e4259b213ea675f75900e4f7ce19
|
c965bf50a919514585804032f09c519c55971973
|
/src/main/java/com/longfor/fsscreportdb/ods/service/IOdsZdNcglsubjectbalanceService.java
|
ca728bc4fe49542c15e24bb33862e8ba28fc757d
|
[] |
no_license
|
fantisticjob/fssc-rptdata
|
8320d374e2f877f44410b2c90d25cda8418a40c6
|
22f499041416d0a48c2a3ae17146944b70cfc3ca
|
refs/heads/main
| 2023-07-12T06:27:14.774910
| 2021-08-17T08:34:36
| 2021-08-17T08:34:36
| 397,172,507
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 478
|
java
|
package com.longfor.fsscreportdb.ods.service;
import com.longfor.fsscreportdb.ods.entity.OdsZdNcglsubjectbalance;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* <p>
* NC科目数据 服务类
* </p>
*
* @author chenziyao
* @since 2020-08-11
*/
public interface IOdsZdNcglsubjectbalanceService extends IService<OdsZdNcglsubjectbalance> {
JSONObject saveList(String year, String month);
}
|
[
"1048508578@qq.com"
] |
1048508578@qq.com
|
998506e36ebbbc8c898baece252b9f6f3b318113
|
c263893f858710bb5999a16b68fce3c60a4aa9d8
|
/sandbox-providers/ibmdev/src/main/java/org/jclouds/ibmdev/predicates/AddressFree.java
|
9aa086342d85f866074c2135adf95c09ba816b71
|
[
"Apache-2.0"
] |
permissive
|
seijoed/jclouds
|
03cbdd28f9a151af88240deff25fd80d24615fbc
|
20e3389a2d0fe147adafbeefef2d5799752f69a8
|
refs/heads/master
| 2021-01-17T12:08:19.187348
| 2011-05-13T00:42:52
| 2011-05-13T00:42:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,160
|
java
|
/**
*
* Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.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 org.jclouds.ibmdev.predicates;
import java.util.NoSuchElementException;
import javax.annotation.Resource;
import javax.inject.Singleton;
import org.jclouds.ibmdev.IBMDeveloperCloudClient;
import org.jclouds.ibmdev.domain.Address;
import org.jclouds.logging.Logger;
import com.google.common.base.Predicate;
import com.google.common.collect.Iterables;
import com.google.inject.Inject;
/**
*
* @author Adrian Cole
*/
@Singleton
public class AddressFree implements Predicate<Address> {
private final IBMDeveloperCloudClient client;
@Resource
protected Logger logger = Logger.NULL;
@Inject
public AddressFree(IBMDeveloperCloudClient client) {
this.client = client;
}
public boolean apply(Address address) {
logger.trace("looking for state on address %s", address);
final String id = address.getId();
try {
address = Iterables.find(client.listAddresses(), new Predicate<Address>() {
@Override
public boolean apply(Address input) {
return input.getId().equals(id);
}
});
} catch (NoSuchElementException e) {
return false;
}
logger.trace("%s: looking for address state %s: currently: %s", address.getId(),
Address.State.FREE, address.getState());
return address.getState() == Address.State.FREE;
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
336c10eff4164c791e5d71722586c015605f64ce
|
1abc25e5f4fc1ed08175684b9ac956c5274c8b3d
|
/smsn-server/src/main/java/net/fortytwo/smsn/server/action/WriteGraph.java
|
2619e0ee67198396b1f8a4f9e2956e1ee5978848
|
[
"MIT"
] |
permissive
|
JeffreyBenjaminBrown/smsn
|
d2420b73a91a554e12e6d039de8402ce816be226
|
e4ecb2affbb8f4f2b6f8bfc012dd33d100c0fbbd
|
refs/heads/master
| 2021-01-14T13:08:35.341690
| 2016-08-13T19:16:49
| 2016-08-13T19:16:49
| 63,748,191
| 0
| 0
| null | 2016-07-20T03:45:28
| 2016-07-20T03:45:26
| null |
UTF-8
|
Java
| false
| false
| 2,865
|
java
|
package net.fortytwo.smsn.server.action;
import net.fortytwo.smsn.brain.Params;
import net.fortytwo.smsn.server.Action;
import net.fortytwo.smsn.server.error.BadRequestException;
import net.fortytwo.smsn.server.error.RequestProcessingException;
import net.fortytwo.smsn.brain.io.BrainWriter;
import net.fortytwo.smsn.brain.io.Format;
import net.fortytwo.smsn.server.requests.FilteredResultsRequest;
import org.json.JSONException;
import org.json.JSONObject;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.OutputStream;
import java.security.Principal;
/**
* A service for exporting an Extend-o-Brain graph to the file system
*/
public class WriteGraph extends Action {
@Override
public String getName() {
return "export";
}
@Override
public void parseRequest(final JSONObject request, final RequestParams p) throws JSONException {
ExportRequest r = new ExportRequest(request, p.user);
p.filter = r.getFilter();
p.file = r.file;
p.format = r.format;
p.rootId = r.rootId;
p.height = r.height;
}
protected void performTransaction(final RequestParams p) throws RequestProcessingException, BadRequestException {
if (null == p.format) {
throw new BadRequestException("format is required");
}
BrainWriter.Context context = new BrainWriter.Context();
context.setAtomGraph(p.brain.getAtomGraph());
context.setKnowledgeBase(p.brain.getKnowledgeBase());
context.setRootId(p.rootId);
context.setFilter(p.filter);
context.setFormat(Format.getFormat(p.format));
BrainWriter writer = Format.getWriter(context.getFormat());
try {
try (OutputStream destStream = new FileOutputStream(p.file)) {
context.setDestStream(destStream);
writer.doExport(context);
}
} catch (IOException e) {
throw new RequestProcessingException(e);
}
}
protected boolean doesRead() {
// doesn't read, in that no data is returned by the service (data is only written to the file system)
return false;
}
protected boolean doesWrite() {
return false;
}
private class ExportRequest extends FilteredResultsRequest {
private final String format;
private final String file;
private final String rootId;
private final int height;
public ExportRequest(final JSONObject json,
final Principal user) throws JSONException {
super(json, user);
format = this.json.getString(Params.FORMAT);
file = this.json.getString(Params.FILE);
rootId = this.json.optString(Params.ROOT);
height = this.json.optInt(Params.HEIGHT, 0);
}
}
}
|
[
"josh@fortytwo.net"
] |
josh@fortytwo.net
|
60c8d1bc792f0531ff39a237bb69ca842a626357
|
683c5dabe891d5ab6757134cbb1fc812f0c5da08
|
/src/Chapter1_3LinkedListExercises/LinkedListExercise2.java
|
afbf0d10441e384a29e224b23a15299281672001
|
[
"Apache-2.0"
] |
permissive
|
SeanTong11/Algorithms-Fourth-Edition-Exercises
|
a1ca6f24ebee38761a204f57abd42dbb4f7e15f1
|
50931e99c8784d530d38679a84aa5425981142a0
|
refs/heads/master
| 2020-04-19T09:48:42.698714
| 2018-10-12T02:51:38
| 2018-10-12T02:51:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,478
|
java
|
package Chapter1_3LinkedListExercises;
public class LinkedListExercise2<Item> {
private static class Node<Item>{
Node next;
Item item;
}
/*
* @param k 第k个元素
* @param first 链表的首节点
* @return 新的链表
* @throws Exception
* */
public Node<Item> delete(int k,Node<Item> first) throws Exception{ //删除链表的第k个元素
if(k<0 || first == null) return null;
if(k==0){
first=first.next;
return first;
}
Node<Item> current=first;
while(current!=null && --k!=0){
current=current.next;
}
if(k!=0 || current.next==null || current==null){
throw new Exception();
}else{
current.next=current.next.next; //将当前第k-1个链表元素的下一个指向链接(即next)直接跳过下一个(即k),指向下下个(即k+1)
}
return first;
}
public static void main(String[] args){
/*
* 创建链表
* */
Node<String> first=new Node<String>();
Node<String> second=new Node<String>();
Node<String> third=new Node<String>();
Node<String> forth=new Node<String>();
Node<String> fifth=new Node<String>();
first.item="我的";
first.next=second;
second.item="名字";
second.next=third;
third.item="叫做";
third.next=forth;
forth.item="yyc";
forth.next=fifth;
fifth.item="hacker";
fifth.next=null;
//遍历原链表
System.out.println("原链表:\n------");
Node current1=first;
while(current1.next!=null){
System.out.println(current1.item);
current1=current1.next;
}
System.out.println(current1.item); //前一个遍历只输出到倒数第二个节点,输出最后一个
System.out.println("------");
LinkedListExercise2<String> linkedListExercise2=new LinkedListExercise2<>();
//删除第4个元素
int k=4;
System.out.println("正在删除第"+k+"个节点...");
Node<String> resultNode=null;
try{
resultNode=linkedListExercise2.delete(k,first);
}catch(Exception e){
e.printStackTrace();
}
System.out.println("删除成功");
System.out.println("新链表:\n------");
Node current2=resultNode;
}
}
|
[
"375446972@qq.com"
] |
375446972@qq.com
|
9a27b995fff51b23f57623d4c922cb940cb5daf1
|
58dc95ed1ee4b6bb7c4c79d836b51bde59e069ca
|
/src/main/java/io/dummymaker/model/GenRules.java
|
5426593fc37ff21cf8e092a735e4ee4290172d21
|
[
"MIT"
] |
permissive
|
morristech/dummymaker
|
f5f03c9e08a71a5fba2c784dc531555cf903b2b1
|
fdff8ebf116e90026994b38c8b3c08a8420a3550
|
refs/heads/master
| 2023-03-12T13:45:55.840611
| 2020-12-18T20:37:29
| 2020-12-18T20:37:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,572
|
java
|
package io.dummymaker.model;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.*;
import java.util.stream.Collectors;
/**
* Rules for field type and field name generators overrides Allows to override
* gen auto generator setup without annotations Just by passing this config to
* factory
*
* @author GoodforGod
* @see io.dummymaker.factory.IGenFactory
* @see io.dummymaker.factory.IGenSupplier
* @since 01.08.2019
*/
public class GenRules {
private final List<GenRule> rules;
private GenRules() {
this.rules = new ArrayList<>();
}
/**
* Initialize gen rules with rules in sequence
*
* @param rules to add
* @return gen rules
*/
public static @NotNull GenRules of(@NotNull GenRule... rules) {
return of(Arrays.asList(rules));
}
public static @NotNull GenRules of(@NotNull Collection<GenRule> rules) {
final GenRules genRules = new GenRules();
final Map<? extends Class<?>, List<GenRule>> collected = rules.stream()
.collect(Collectors.groupingBy(GenRule::getTarget));
// Merge rules if they have same target class
collected.values().stream()
.map(genRuleList -> genRuleList.stream().reduce(GenRule::merge))
.forEach(r -> r.ifPresent(genRules.rules::add));
return genRules;
}
/**
* Retrieves targeted rule for such class
*
* @param target to check
* @return rule
*/
public @NotNull Optional<GenRule> targeted(@Nullable Class<?> target) {
if (target == null)
return Optional.empty();
final Optional<GenRule> targetRule = rules.stream()
.filter(r -> r.getTarget().equals(target))
.findFirst();
return targetRule.isPresent()
? targetRule
: rules.stream()
.filter(GenRule::isGlobal)
.findFirst();
}
/**
* Add rule to list
*
* @param rule to add
* @return same gen rules
*/
public @NotNull GenRules add(@NotNull GenRule rule) {
final Optional<GenRule> foundRule = rules.stream()
.filter(r -> r.getTarget().equals(rule.getTarget()))
.findAny();
if (foundRule.isPresent())
foundRule.get().merge(rule);
else
rules.add(rule);
return this;
}
public @NotNull List<GenRule> getRules() {
return new ArrayList<>(rules);
}
}
|
[
"goodforgod.dev@gmail.com"
] |
goodforgod.dev@gmail.com
|
b7bbef26133e93106de061944f0d3cd756e0e3c6
|
26183990a4c6b9f6104e6404ee212239da2d9f62
|
/components/job_processor/src/java/tests/com/topcoder/util/scheduler/processor/UnitTests.java
|
f8e21b106e7509424f37ed4737fc2b318d0582b5
|
[] |
no_license
|
topcoder-platform/tc-java-components
|
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
|
51b204566eb0df3902624c15f4fb69b5f99dc61b
|
refs/heads/dev
| 2023-08-08T22:09:32.765506
| 2022-02-25T06:23:56
| 2022-02-25T06:23:56
| 138,811,944
| 0
| 8
| null | 2022-02-23T21:06:12
| 2018-06-27T01:10:36
|
Rich Text Format
|
UTF-8
|
Java
| false
| false
| 826
|
java
|
/**
*
* Copyright (c) 2006, TopCoder, Inc. All rights reserved
*/
package com.topcoder.util.scheduler.processor;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
/**
* <p>This test case aggregates all Unit test cases.</p>
*
* @author TopCoder
* @version 1.0
*/
public class UnitTests extends TestCase {
public static Test suite() {
final TestSuite suite = new TestSuite();
suite.addTestSuite(JobProcessorTest.class);
suite.addTestSuite(TriggerEventHandlerTest.class);
suite.addTestSuite(JobProcessorExceptionTest.class);
suite.addTestSuite(LogHelperTest.class);
suite.addTestSuite(DemoTest.class);
suite.addTestSuite(NextRunCalculatorTest.class);
return suite;
}
}
|
[
"pvmagacho@gmail.com"
] |
pvmagacho@gmail.com
|
a5bbde16ba3e76ed834d0a37736a82e39b5410ee
|
b7870b53936737c68c2b884031fa348c96ead1fc
|
/terracotta/bootstrap/src/main/java/org/terracotta/modules/ehcache/transaction/ClusteredSoftLockIDKey.java
|
5e3862cf2b3fce9ee235381d1473ce817d056c59
|
[] |
no_license
|
plotor/ehcache
|
2d723f7677e168f288231b8114643ee8c1cafcd3
|
b85964a31dfbc6cc07aea1e4de629a1489ea3fb9
|
refs/heads/master
| 2022-11-17T18:05:11.332699
| 2020-07-10T08:09:41
| 2020-07-10T08:09:41
| 263,926,502
| 1
| 0
| null | 2020-07-01T19:16:04
| 2020-05-14T13:43:07
|
Java
|
UTF-8
|
Java
| false
| false
| 1,463
|
java
|
/*
* All content copyright Terracotta, Inc., unless otherwise indicated. All rights reserved.
*/
package org.terracotta.modules.ehcache.transaction;
import net.sf.ehcache.transaction.id.TransactionID;
import net.sf.ehcache.transaction.lock.SoftLockID;
import java.io.Serializable;
/**
* @author Ludovic Orban
*/
// Dont think We need this class .
public class ClusteredSoftLockIDKey implements Serializable {
private static final int PRIME = 31;
private final TransactionID transactionID;
private final Object key;
public ClusteredSoftLockIDKey(SoftLockID softLockId) {
this.transactionID = softLockId.getTransactionID();
this.key = softLockId.getKey();
}
/**
* {@inheritDoc}
*/
@Override
public int hashCode() {
int hashCode = PRIME;
hashCode *= transactionID.hashCode();
hashCode *= key.hashCode();
return hashCode;
}
/**
* {@inheritDoc}
*/
@Override
public boolean equals(Object object) {
if (object instanceof ClusteredSoftLockIDKey) {
ClusteredSoftLockIDKey other = (ClusteredSoftLockIDKey) object;
if (!transactionID.equals(other.transactionID)) {
return false;
}
if (!key.equals(other.key)) {
return false;
}
return true;
}
return false;
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return "Clustered Soft Lock ID [transactionID: " + transactionID + ", key: " + key + "]";
}
}
|
[
"zhenchao.wang@hotmail.com"
] |
zhenchao.wang@hotmail.com
|
d4ecbace3d0f4df7bb4969f75d097ee50baac5a0
|
eb1343219a925101de1b4ca4aadae71b51dfffd2
|
/docs/sourcecodes/OpenBridge-passos-ui/ob-paasos-web/src/main/java/com/harmazing/openbridge/paasos/nginx/event/DeployChangeListenerHandler.java
|
39c911399faaf45c7037c025a17d928f45c69498
|
[
"Apache-2.0"
] |
permissive
|
gavin2lee/incubator
|
b961c23c63fc88c059e74e427b665125115717db
|
c95623af811195c3e89513ec30e52862d6562add
|
refs/heads/master
| 2020-12-13T20:52:26.951484
| 2017-01-25T00:31:59
| 2017-01-25T00:31:59
| 58,938,038
| 4
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,675
|
java
|
package com.harmazing.openbridge.paasos.nginx.event;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.TimeUnit;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.harmazing.framework.quartz.ListenerHandler;
import com.harmazing.framework.util.SpringUtil;
import com.harmazing.openbridge.paas.async.AsyncThreadFactory;
import com.harmazing.openbridge.paas.deploy.model.PaasProjectDeploy;
import com.harmazing.openbridge.paas.deploy.model.PaasProjectDeployPort;
import com.harmazing.openbridge.paas.nginx.model.PaasNginxConf;
import com.harmazing.openbridge.paas.nginx.vo.NginxConfVo;
import com.harmazing.openbridge.paasos.nginx.service.IPaasOSNginxService;
import com.harmazing.openbridge.paasos.project.service.IPaasProjectDeployService;
import com.harmazing.openbridge.paasos.project.service.IPaasProjectEnvService;
@Service
public class DeployChangeListenerHandler implements ListenerHandler<Void>{
private final ScheduledExecutorService logScheduled = Executors.newScheduledThreadPool(30, new AsyncThreadFactory("DeployChangeListenerHandler", true));
private Log logger = LogFactory.getLog(DeployChangeListenerHandler.class);
@Override
public Void handler(Object o) {
Map<String,Object> param = (Map<String,Object>)o;
String deployId = param.containsKey("id") ? (String)param.get("id") : null;
String sessionId = (String)param.get("sessionId");
String envId = param.containsKey("envId") ? (String)param.get("envId") : null;
String type = (String)param.get("type");
logger.debug(deployId+"|"+envId+"|"+type+" 同步nginx");
if(type.equals("create")){
synNginxAfterCreate(deployId,sessionId);
}
else if(type.equals("delete")){
synNginxAfterDelete(envId,sessionId);
}
return null;
}
private void synNginxAfterCreate(String deployId,String sessionId){
logScheduled.schedule(new DeployChangeTask(deployId,null,sessionId), 2000, TimeUnit.MILLISECONDS);
}
private void synNginxAfterDelete(String envId,String sessionId){
logScheduled.schedule(new DeployChangeTask(null,envId,sessionId), 1000, TimeUnit.MILLISECONDS);
}
private class DeployChangeTask implements Runnable{
private String deployId;
private String envId;
private String sessionId;
public DeployChangeTask(String deployId,String envId,String sessionId){
this.deployId = deployId;
this.envId = envId;
this.sessionId = sessionId;
}
@Override
public void run() {
// TODO Auto-generated method stub
IPaasProjectDeployService iPaasProjectDeployService = SpringUtil.getBean(IPaasProjectDeployService.class);
// IPaasProjectEnvService iPaasProjectEnvService = SpringUtil.getBean(IPaasProjectEnvService.class);
IPaasOSNginxService iPaasOSNginxService= SpringUtil.getBean(IPaasOSNginxService.class);
String nenvId = null;
if(StringUtils.hasText(envId)){
nenvId = envId;
}
else{
PaasProjectDeploy pd = iPaasProjectDeployService.findById(deployId);
if(pd==null){
return ;
}
nenvId = pd.getEnvId();
}
try{
List<NginxConfVo> nginxs = iPaasOSNginxService.getNginxListByEnvId(nenvId);
if(nginxs ==null || nginxs.size()==0){
return ;
}
//不检查了 简单处理 只要同步 在重新获取一次IP 重新设置到nginx里面去
List<PaasProjectDeployPort> rs = iPaasProjectDeployService.findDeployPortByEnvIdForNginx(nenvId);
// int m=1;
JSONArray service = new JSONArray();
if(rs!=null){
for (PaasProjectDeployPort r : rs) {
JSONObject ss = new JSONObject();
ss.put("ip", r.getHostIp());
ss.put("port", r.getNodePort());
ss.put("weight", 1);
service.add(ss);
}
}
for(NginxConfVo nginx : nginxs){
String synDeployIP = nginx.getSynDeployIP();
if(StringUtils.isEmpty(synDeployIP) || "false".equals(synDeployIP)){
continue ;
}
StringBuilder sb = new StringBuilder();
PaasNginxConf f = iPaasOSNginxService.findConfByConfId(nginx.getConfId());
JSONObject j = null;
if(StringUtils.hasText(f.getConfContent())){
j = JSONObject.parseObject(f.getConfContent());
}
else{
j = new JSONObject();
}
j.put("server", service);
f.setConfContent(j.toJSONString());
iPaasOSNginxService.updateNginxConf(f, sb);
}
}
catch(Exception e){
logger.error(e.getMessage(),e);
}
}
}
}
|
[
"gavin2lee@163.com"
] |
gavin2lee@163.com
|
8f34d7c69891d3341596e987a982937fe817dd73
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module608/src/main/java/module608packageJava0/Foo304.java
|
06ce9ddd55b5848529024aa99c3c2cce2d9907b4
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 351
|
java
|
package module608packageJava0;
import java.lang.Integer;
public class Foo304 {
Integer int0;
Integer int1;
public void foo0() {
new module608packageJava0.Foo303().foo4();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
190dfacd82394ea0e0a9d3dd770301247c005dc5
|
7727d7e5eaf5d89c3d8dbdca27e32731fd32a839
|
/main/java/net/divinerpg/client/render/block/ModelDramixStatue.java
|
1b11c3b1e428ea4aac933cc1674fa6a79d8104c8
|
[] |
no_license
|
oleg599/DivineRPG
|
5828c6e0b03aa87f20b424a859bb494f46165a4f
|
33bf7462df336ece31f9639e3fd3711fec292bfb
|
refs/heads/master
| 2020-12-24T19:28:46.013618
| 2014-05-24T19:30:03
| 2014-05-24T19:30:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,470
|
java
|
package net.divinerpg.client.render.block;
import net.minecraft.client.model.ModelBase;
import net.minecraft.client.model.ModelRenderer;
public class ModelDramixStatue extends ModelBase implements ModelDivineBlock
{
//fields
ModelRenderer Leg_Right;
ModelRenderer Leg_Left;
ModelRenderer Arm_Right;
ModelRenderer Arm_Left;
ModelRenderer Head;
ModelRenderer Chest;
public ModelDramixStatue()
{
textureWidth = 64;
textureHeight = 64;
Leg_Right = new ModelRenderer(this, 0, 22);
Leg_Right.addBox(-2F, -2F, -3F, 5, 15, 6);
Leg_Right.setRotationPoint(-4F, 11F, 1F);
Leg_Right.setTextureSize(64, 64);
Leg_Right.mirror = true;
setRotation(Leg_Right, 0F, 0F, 0F);
Leg_Left = new ModelRenderer(this, 0, 22);
Leg_Left.addBox(-3F, -2F, -3F, 5, 15, 6);
Leg_Left.setRotationPoint(4F, 11F, 1F);
Leg_Left.setTextureSize(64, 64);
Leg_Left.mirror = true;
setRotation(Leg_Left, -0.8922867F, 0F, 0F);
Arm_Right = new ModelRenderer(this, 22, 22);
Arm_Right.addBox(-2F, -2F, -3F, 4, 16, 6);
Arm_Right.setRotationPoint(-8F, -5F, 1F);
Arm_Right.setTextureSize(64, 64);
Arm_Right.mirror = true;
setRotation(Arm_Right, -2.342252F, 0F, 0F);
Arm_Right.mirror = false;
Arm_Left = new ModelRenderer(this, 22, 22);
Arm_Left.addBox(-2F, -2F, -3F, 4, 16, 6);
Arm_Left.setRotationPoint(8F, -5F, 1F);
Arm_Left.setTextureSize(64, 64);
Arm_Left.mirror = true;
setRotation(Arm_Left, -2.342252F, 0F, 0F);
Head = new ModelRenderer(this, 36, 0);
Head.addBox(-3F, -5F, -3F, 6, 10, 6);
Head.setRotationPoint(0F, -12F, 1F);
Head.setTextureSize(64, 64);
Head.mirror = true;
setRotation(Head, 0F, 0F, 0F);
Chest = new ModelRenderer(this, 0, 0);
Chest.addBox(-6F, -7F, -2F, 12, 16, 6);
Chest.setRotationPoint(0F, 0F, 0F);
Chest.setTextureSize(64, 64);
Chest.mirror = true;
setRotation(Chest, 0F, 0F, 0F);
}
public void render(float f5)
{
Leg_Right.render(f5);
Leg_Left.render(f5);
Arm_Right.render(f5);
Arm_Left.render(f5);
Head.render(f5);
Chest.render(f5);
}
private void setRotation(ModelRenderer model, float x, float y, float z)
{
model.rotateAngleX = x;
model.rotateAngleY = y;
model.rotateAngleZ = z;
}
}
|
[
"brock.kerley@hotmail.com"
] |
brock.kerley@hotmail.com
|
3673453cf3390fa6e9ba3fb5dafe7c33b1bb02ed
|
8db11989acaa8df5eaf7ede00b2d69efb64510d5
|
/SaeEntrepise-ejb/src/main/java/com/sae/persistence/dao/TipoCreditoFacadeLocal.java
|
dd04e18fd1ca789c4346666fa572bb086cc84c09
|
[] |
no_license
|
saesas/SaeEntrepise
|
8ebfa9879c927de388ba7a6a1118a604742671df
|
95fc40beaab051e7f08a3aa57712b9094b218456
|
refs/heads/master
| 2020-03-30T07:31:56.920369
| 2015-08-30T21:56:27
| 2015-08-30T21:56:27
| 41,565,178
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 699
|
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.sae.persistence.dao;
import com.sae.persistence.domain.TipoCredito;
import java.util.List;
import javax.ejb.Local;
/**
*
* @author Hector Ivan
*/
@Local
public interface TipoCreditoFacadeLocal {
void create(TipoCredito tipoCredito);
void edit(TipoCredito tipoCredito);
void remove(TipoCredito tipoCredito);
TipoCredito find(Object id);
List<TipoCredito> findAll();
List<TipoCredito> findRange(int[] range);
int count();
}
|
[
"saesas01@gmail.com"
] |
saesas01@gmail.com
|
ba36fdbae26483b7fa9904a76a69fad26e8ebcf6
|
065c1f648e8dd061a20147ff9c0dbb6b5bc8b9be
|
/ant_cluster/1959/tar_0.java
|
30d6ebf6d2f036ab3e64c24246ecc3fed137d6a6
|
[] |
no_license
|
martinezmatias/GenPat-data-C3
|
63cfe27efee2946831139747e6c20cf952f1d6f6
|
b360265a6aa3bb21bd1d64f1fc43c3b37d0da2a4
|
refs/heads/master
| 2022-04-25T17:59:03.905613
| 2020-04-15T14:41:34
| 2020-04-15T14:41:34
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 743
|
java
|
/*
* Copyright (C) The Apache Software Foundation. All rights reserved.
*
* This software is published under the terms of the Apache Software License
* version 1.1, a copy of which has been included with this distribution in
* the LICENSE.txt file.
*/
package org.apache.antlib.runtime;
import org.apache.myrmidon.framework.AbstractTypeDef;
import org.apache.myrmidon.interfaces.deployer.GeneralTypeDefinition;
import org.apache.myrmidon.interfaces.deployer.TypeDefinition;
/**
* Task to define a type.
*
* @author <a href="mailto:peter@apache.org">Peter Donald</a>
*/
public class TypeDef
extends AbstractTypeDef
{
protected TypeDefinition createTypeDefinition()
{
return new GeneralTypeDefinition();
}
}
|
[
"375833274@qq.com"
] |
375833274@qq.com
|
002a22d38d5c59d19588f56d01f6bd29f4bb3a84
|
fb82d1179ce245b4e265b3ea49bcc2f4bab5f11c
|
/AdDemo-imo/imooc-ad-service/ad-common/src/main/java/com/imooc/ad/vo/CommonResponse.java
|
7706b7496aa868cd113a14682a1e3eff436f86b0
|
[] |
no_license
|
tjzhaomengyi/AdDemo-imooc
|
f9664445789377014b9567244ade63efdb8f2c1e
|
91da9ff3237ababe0105ea11d38475a36d5cacfc
|
refs/heads/master
| 2022-04-11T19:24:39.472849
| 2019-12-24T07:28:12
| 2019-12-24T07:28:12
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
package com.imooc.ad.vo;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Auther: zhaomengyi
* @Date: 2019/11/29 10:57
* @Description:统一响应请求
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class CommonResponse<T> implements Serializable {
private Integer code;
private String message;
private T data;
public CommonResponse(Integer code,String message){
this.code = code;
this.message = message;
}
}
|
[
"tjzhaomengyi@163.com"
] |
tjzhaomengyi@163.com
|
1cdd337455854e9d5f5448771feb8fcc6adbf65c
|
4a9618d3506c869a27fff61174e7bcd13c7ce47e
|
/org.eclipse.e4.xwt/bundles/org.eclipse.e4.xwt.vex/src/org/eclipse/e4/xwt/vex/problems/IProblemChecker.java
|
6ee804f28109e4e5bd85ee08b73818d57fab9bd5
|
[] |
no_license
|
renaudpawlak/tura
|
ce4d2ca9c21fa096081ca4d4fb9f5acb27bee1f7
|
bbcfbaeb9a0286912712004b67966cb639b9cb5f
|
refs/heads/master
| 2021-05-08T08:20:14.259297
| 2013-08-07T21:57:43
| 2013-08-07T21:57:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 977
|
java
|
/*******************************************************************************
* Copyright (c) 2006, 2010 Soyatec (http://www.soyatec.com) 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:
* Soyatec - initial API and implementation
*******************************************************************************/
package org.eclipse.e4.xwt.vex.problems;
import java.util.Collections;
import java.util.List;
import org.eclipse.wst.sse.ui.StructuredTextEditor;
/**
* @author jliu
*
*/
public interface IProblemChecker {
List<Problem> EMPTY = Collections.emptyList();
List<Problem> checkProblems(StructuredTextEditor textEditor, String javaClassName);
boolean canChecked(StructuredTextEditor textEditor, String javaClassName);
}
|
[
"isakovarseniy@gmail.com"
] |
isakovarseniy@gmail.com
|
bdcb97599d8a30939f4b2c910a214ad1a046724f
|
e0532d36d933f76c1a3ccf90dcb78489ee01501e
|
/middlegroudInterfaceTest/src/main/java/com/duoweidu/cases/msf/openapi/ArticleInterestlist.java
|
ebdbe3419b7fda46f559017ee9c2c627669ba89e
|
[] |
no_license
|
wuhaiyanwhy/jiekouzidonghua_dwd
|
ff7bdbbcc21683d2d592ea48624b476dd9ff027f
|
1627453a5ad678b5438ad424ca1f23e0de2b3aa0
|
refs/heads/master
| 2022-07-15T16:40:14.545287
| 2019-10-25T08:32:34
| 2019-10-25T08:32:34
| 217,483,394
| 1
| 0
| null | 2022-06-29T17:44:05
| 2019-10-25T08:03:53
|
HTML
|
UTF-8
|
Java
| false
| false
| 603
|
java
|
package com.duoweidu.cases.msf.openapi;
import com.duoweidu.cases.interfaces.MsfInterfaceTest;
import com.duoweidu.config.sql.SqlDetail;
import org.testng.annotations.Test;
/**
* 暂时无数据,暂时无需详细断言
*/
public class ArticleInterestlist extends MsfInterfaceTest {
@Test(dependsOnGroups = "loginTrue",description = "详情页推荐文章列表接口(你可能感兴趣)")
public void articleInterestlist() {
setUrl("article.interestlist.uri");
param = "id=" + SqlDetail.getInstance().getParamValue("article_id");
process(true,false);
}
}
|
[
"1174837652@qq.com"
] |
1174837652@qq.com
|
fe68163ece1ca0833d93cb79a120396e430fc78a
|
8fe5849dd4f9df01ff338b3f51311c05f51f672c
|
/src/main/java/io/github/jhipster/sample/domain/User.java
|
84bf8eab9319f24caabe89de5a483c82b2793810
|
[] |
no_license
|
guoyu07/jhipster-sample-app-cassandra
|
6677c6901084e1c22a396906708ac48dd1a9aefc
|
0621718adcf78bbfc1ce5c4a038b9d61b0f8550b
|
refs/heads/master
| 2020-06-01T05:20:32.178571
| 2017-06-09T15:33:07
| 2017-06-09T15:33:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,258
|
java
|
package io.github.jhipster.sample.domain;
import io.github.jhipster.sample.config.Constants;
import com.datastax.driver.mapping.annotations.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.validator.constraints.Email;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Locale;
import java.util.Set;
import java.time.Instant;
/**
* A user.
*/
@Table(name = "user")
public class User implements Serializable {
private static final long serialVersionUID = 1L;
@PartitionKey
private String id;
@NotNull
@Pattern(regexp = Constants.LOGIN_REGEX)
@Size(min = 1, max = 50)
private String login;
@JsonIgnore
@NotNull
@Size(min = 60, max = 60)
private String password;
@Size(max = 50)
private String firstName;
@Size(max = 50)
private String lastName;
@Email
@Size(min = 5, max = 100)
private String email;
private boolean activated = false;
@Size(min = 2, max = 5)
@Column(name = "lang_key")
private String langKey;
@Size(max = 20)
@Column(name = "activation_key")
@JsonIgnore
private String activationKey;
@Size(max = 20)
@Column(name = "reset_key")
@JsonIgnore
private String resetKey;
@Column(name = "reset_date")
private Instant resetDate = null;
@JsonIgnore
private Set<String> authorities = new HashSet<>();
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getLogin() {
return login;
}
//Lowercase the login before saving it in database
public void setLogin(String login) {
this.login = login.toLowerCase(Locale.ENGLISH);
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public boolean getActivated() {
return activated;
}
public void setActivated(boolean activated) {
this.activated = activated;
}
public String getActivationKey() {
return activationKey;
}
public void setActivationKey(String activationKey) {
this.activationKey = activationKey;
}
public String getResetKey() {
return resetKey;
}
public void setResetKey(String resetKey) {
this.resetKey = resetKey;
}
public Instant getResetDate() {
return resetDate;
}
public void setResetDate(Instant resetDate) {
this.resetDate = resetDate;
}
public String getLangKey() {
return langKey;
}
public void setLangKey(String langKey) {
this.langKey = langKey;
}
public Set<String> getAuthorities() {
return authorities;
}
public void setAuthorities(Set<String> authorities) {
this.authorities = authorities;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
User user = (User) o;
return login.equals(user.login);
}
@Override
public int hashCode() {
return login.hashCode();
}
@Override
public String toString() {
return "User{" +
"login='" + login + '\'' +
", firstName='" + firstName + '\'' +
", lastName='" + lastName + '\'' +
", email='" + email + '\'' +
", activated='" + activated + '\'' +
", langKey='" + langKey + '\'' +
", activationKey='" + activationKey + '\'' +
"}";
}
}
|
[
"julien.dubois@gmail.com"
] |
julien.dubois@gmail.com
|
7ef2a905d3925dfce70624d9c7167c6a4c20be4b
|
da43836d728650803c8ae5ce776fbcc8c1513f07
|
/ace-modules/ace-community/src/main/java/com/bitcola/exchange/security/community/constant/PushConstant.java
|
6b5d8bf3fc9a1e0dea28dd1908da7082a8b41c6f
|
[
"Apache-2.0"
] |
permissive
|
wxpkerpk/exchange-base-examlple
|
36253f96a1e478365feabad183636675ee1e4f4c
|
acb61eb9d8316c5cf290481362560203eaf682a7
|
refs/heads/master
| 2022-06-28T12:19:17.730542
| 2019-07-11T16:38:51
| 2019-07-11T16:38:51
| 196,430,856
| 1
| 4
|
Apache-2.0
| 2022-06-21T01:26:27
| 2019-07-11T16:34:47
|
Java
|
UTF-8
|
Java
| false
| false
| 567
|
java
|
package com.bitcola.exchange.security.community.constant;
/**
* @author zkq
* @create 2018-11-15 10:45
**/
public class PushConstant {
public static Integer COMMENT_SHORTARTICLE = 1;
public static Integer COMMENT_ARTICLE = 2;
public static Integer COMMENT_COMMENT = 3;
public static Integer LIKE_SHORTARTICLE = 11;
public static Integer LIKE_ARTICLE = 12;
public static Integer LIKE_COMMENT = 13;
public static Integer DONATE_SHORTARTICLE = 21;
public static Integer DONATE_ARTICLE = 22;
public static Integer FOLLOWED = 31;
}
|
[
"120443910@qq.com"
] |
120443910@qq.com
|
af02fd8c60de192e128d2d12bb9ec45404766944
|
f2e01bda12de959faf44193a38723444570e78b0
|
/game-common/src/main/java/com/game/common/util/Assert.java
|
be23457fb3c4c563bcf4d9315eb4899532845adf
|
[] |
no_license
|
Ox0400/NettyGameServer
|
b051d026907e59e213ee1644c36faaac7570a46b
|
5e39ec258584032d2ac3a922bcfe94c6a611703b
|
refs/heads/master
| 2023-03-16T06:07:57.056684
| 2018-06-27T11:04:13
| 2018-06-27T11:04:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 967
|
java
|
package com.game.common.util;
/**
* 断言工具类,用于对方法的传入参数进行校验,如果未通过则
* 抛出<code>IllegalArgumentException</code>异常
* @author JiangBangMing
*
* 2018年6月20日 下午12:35:40
*/
public abstract class Assert {
/**
* 断言对象不为空
*
* @param obj
*/
public static void notNull(Object obj) {
if (obj == null) {
notNull(obj, null);
}
}
/**
* 断言对象不为空
*
* @param obj
*/
public static void notNull(Object obj, String msg) {
if (obj == null) {
throw new IllegalArgumentException(msg);
}
}
/**
* 断言表达式为真
*
* @param expression
*/
public static void isTrue(boolean expression) {
if (!expression) {
isTrue(expression, null);
}
}
/**
* 断言表达式为真
*
* @param expression
*/
public static void isTrue(boolean expression, String msg) {
if (!expression) {
throw new IllegalArgumentException(msg);
}
}
}
|
[
"jiangbang617@sina.cn"
] |
jiangbang617@sina.cn
|
8bef33bb3d5209289947fc38c52590b5e51b7f82
|
c978196586238f15d1f54e967df86f32c29ad6fd
|
/src/main/java/com/kafka/streams/windowStreamsApps/HoppingWindowExtractApp.java
|
73bb4f84eb4803aeb8ee002ce925e54967eaca72
|
[] |
no_license
|
krishna07210/com-kafka-streams-repo
|
fb78f680dd335cb60769bc5e65bb709e92d7b769
|
e1bf73a5ddd0bbef0e939c7307fd1a66afd48e89
|
refs/heads/master
| 2023-02-05T18:17:30.157942
| 2020-12-29T06:15:25
| 2020-12-29T06:15:25
| 324,532,917
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,558
|
java
|
package com.kafka.streams.windowStreamsApps;
import com.kafka.model.SimpleInvoice;
import com.kafka.serde.AppSerdes;
import com.kafka.streams.TimestampExtractors.InvoiceTimeExtractor;
import com.kafka.streams.common.CommonServices;
import org.apache.kafka.streams.KafkaStreams;
import org.apache.kafka.streams.StreamsBuilder;
import org.apache.kafka.streams.StreamsConfig;
import org.apache.kafka.streams.kstream.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.time.Duration;
import java.time.Instant;
import java.time.ZoneOffset;
import java.util.Properties;
public class HoppingWindowExtractApp {
public static void main(String[] args) {
final Logger logger = LoggerFactory.getLogger(HoppingWindowExtractApp.class);
final String topicName = "Store-invoices";
final String stateStoreName ="HoppingWindow-State-Store";
final Properties streamConfig = CommonServices.getStreamConfigurationNoSerdes("HoppingWindowExtractApp");
streamConfig.put(StreamsConfig.STATE_DIR_CONFIG, stateStoreName);
streamConfig.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, 0);
StreamsBuilder streamsBuilder = new StreamsBuilder();
KStream<String, SimpleInvoice> KS0 = streamsBuilder.stream(topicName,
Consumed.with(AppSerdes.String(), AppSerdes.SimpleInvoiceRecord())
.withTimestampExtractor(new InvoiceTimeExtractor()));
//First Level Group at StoreId level, Second at Window Level
KTable<Windowed<String>, Long> KT0 =
KS0.groupByKey(Grouped.with(AppSerdes.String(), AppSerdes.SimpleInvoiceRecord()))
.windowedBy(TimeWindows.of(Duration.ofMillis(5)).advanceBy(Duration.ofMinutes(1)))
.count();
KT0.toStream().foreach(
(wKey, value) -> logger.info(
"Store ID: {} ; Window ID: {} ; Window Start: {} ; Window End: {} = Count: {} ",
wKey.key(),
wKey.window().hashCode(),
Instant.ofEpochMilli(wKey.window().start()).atOffset(ZoneOffset.UTC),
Instant.ofEpochMilli(wKey.window().end()).atOffset(ZoneOffset.UTC),
value)
);
KafkaStreams streams = new KafkaStreams(streamsBuilder.build(), streamConfig);
streams.start();
Runtime.getRuntime().addShutdownHook(new Thread(() -> {
logger.info("Stopping Streams");
streams.close();
}));
}
}
|
[
"="
] |
=
|
2e9f38d377ceb060cb0c61ef31b7574459aff73c
|
7dd73504d783c7ebb0c2e51fa98dea2b25c37a11
|
/eaglercraft-main/eaglercraft-main/src/main/java/net/minecraft/src/TileEntityDaylightDetector.java
|
5a744fd3f882c1fa2dcdb84c861d62122cf22ec4
|
[
"CC-BY-NC-4.0"
] |
permissive
|
bagel-man/bagel-man.github.io
|
32813dd7ef0b95045f53718a74ae1319dae8c31e
|
eaccb6c00aa89c449c56a842052b4e24f15a8869
|
refs/heads/master
| 2023-04-05T10:27:26.743162
| 2023-03-16T04:24:32
| 2023-03-16T04:24:32
| 220,102,442
| 3
| 21
|
MIT
| 2022-12-14T18:44:43
| 2019-11-06T22:29:24
|
C++
|
UTF-8
|
Java
| false
| false
| 313
|
java
|
package net.minecraft.src;
public class TileEntityDaylightDetector extends TileEntity {
/**
* Allows the entity to update its state. Overridden in most subclasses, e.g.
* the mob spawner uses this to count ticks and creates a new spawn inside its
* implementation.
*/
public void updateEntity() {
}
}
|
[
"tom@blowmage.com"
] |
tom@blowmage.com
|
1acad5902efa08ef09a494161d4dde0a3bab18e2
|
9049eabb2562cd3e854781dea6bd0a5e395812d3
|
/sources/com/google/android/gms/auth/api/credentials/p019be/CredentialsUiIntentService.java
|
02619ceaafd99d68e26d91dbe783f9de1b58ae0f
|
[] |
no_license
|
Romern/gms_decompiled
|
4c75449feab97321da23ecbaac054c2303150076
|
a9c245404f65b8af456b7b3440f48d49313600ba
|
refs/heads/master
| 2022-07-17T23:22:00.441901
| 2020-05-17T18:26:16
| 2020-05-17T18:26:16
| 264,227,100
| 2
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 294
|
java
|
package com.google.android.gms.auth.api.credentials.p019be;
/* renamed from: com.google.android.gms.auth.api.credentials.be.CredentialsUiIntentService */
/* compiled from: :com.google.android.gms@201515033@20.15.15 (120300-306758586) */
public class CredentialsUiIntentService extends qlb {
}
|
[
"roman.karwacik@rwth-aachen.de"
] |
roman.karwacik@rwth-aachen.de
|
a19f14d12b9c9cbc678c6dfee17aa0fe2f494171
|
dfbcdf092acd206eddfb88d858990ded4101a120
|
/src/main/java/org/kitteh/irc/client/library/event/user/MonitoredNickOfflineEvent.java
|
00e934cc16926ce96a34a4f710276d31a22fc6d9
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
Ribesg/KittehIRCClientLib
|
a67b4764c8553162599633694bca39110f3cda90
|
9b94676182e72d6f8df54dbadb89a22954d4d1dd
|
refs/heads/master
| 2021-01-12T03:27:48.601068
| 2017-01-06T02:45:19
| 2017-01-06T02:45:19
| 78,212,804
| 0
| 0
| null | 2017-01-06T14:39:09
| 2017-01-06T14:39:09
| null |
UTF-8
|
Java
| false
| false
| 1,922
|
java
|
/*
* * Copyright (C) 2013-2016 Matt Baxter http://kitteh.org
*
* 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 org.kitteh.irc.client.library.event.user;
import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.element.ServerMessage;
import org.kitteh.irc.client.library.event.abstractbase.MonitoredNickEventBase;
import javax.annotation.Nonnull;
import java.util.List;
/**
* A nick tracked by MONITOR is now offline!
*/
public class MonitoredNickOfflineEvent extends MonitoredNickEventBase {
/**
* Constructs the event.
*
* @param client the client
* @param originalMessages original messages
* @param nick the tracked nick
*/
public MonitoredNickOfflineEvent(@Nonnull Client client, @Nonnull List<ServerMessage> originalMessages, @Nonnull String nick) {
super(client, originalMessages, nick);
}
}
|
[
"matt@phozop.net"
] |
matt@phozop.net
|
edd14a13046cf92b7339d03ac067d0a7c86d2042
|
5b18c2aa61fd21f819520f1b614425fd6bc73c71
|
/src/main/java/com/sinosoft/claim/bl/action/domain/BLPrpDlimitActionBase.java
|
274ba0b962ec9eaa5664cf9b168d1cdb95316e4c
|
[] |
no_license
|
Akira-09/claim
|
471cc215fa77212099ca385e7628f3d69f83d6d8
|
6dd8a4d4eedb47098c09c2bf3f82502aa62220ad
|
refs/heads/master
| 2022-01-07T13:08:27.760474
| 2019-03-24T23:50:09
| 2019-03-24T23:50:09
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 4,498
|
java
|
package com.sinosoft.claim.bl.action.domain;
import java.util.ArrayList;
import java.util.Collection;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import com.sinosoft.claim.dto.domain.PrpDlimitDto;
import com.sinosoft.claim.resource.dtofactory.domain.DBPrpDlimit;
import com.sinosoft.sysframework.reference.DBManager;
/**
* 这是prpdlimit限额免赔代码表的业务逻辑对象类<br>
* 创建于 2004-4-5 15:33:45<br>
* JToolpad(1.2.3) Vendor:zhouxianli@sinosoft.com.cn
*/
public class BLPrpDlimitActionBase{
private static Log log = LogFactory.getLog(BLPrpDlimitActionBase.class.getName());
private int rowCount; //findByConditions查询到的记录数
/**
* 构造函数
*/
public BLPrpDlimitActionBase(){
}
/**
* 插入一条数据
* @param dbManager DB管理器
* @param prpDlimitDto prpDlimitDto
* @throws Exception
*/
public void insert(DBManager dbManager,PrpDlimitDto prpDlimitDto) throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
//插入记录
dbPrpDlimit.insert(prpDlimitDto);
}
/**
* 按主键删除一条数据
* @param dbManager DB管理器
* @param riskCode 险种代码
* @param limitCode 限额/免赔类别代码
* @throws Exception
*/
public void delete(DBManager dbManager,String riskCode,String limitCode) throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
//删除记录
dbPrpDlimit.delete(riskCode, limitCode);
}
/**
* 按条件删除数据
* @param dbManager DB管理器
* @param condtions 删除条件
* @throws Exception
*/
public void deleteByConditions(DBManager dbManager,String conditions) throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
//按条件删除记录
dbPrpDlimit.deleteByConditions(conditions);
}
/**
* 按主键更新一条数据(主键本身无法变更)
* @param dbManager DB管理器
* @param prpDlimitDto prpDlimitDto
* @throws Exception
*/
public void update(DBManager dbManager,PrpDlimitDto prpDlimitDto) throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
//更新记录
dbPrpDlimit.update(prpDlimitDto);
}
/**
* 按主键查找一条数据
* @param dbManager DB管理器
* @param riskCode 险种代码
* @param limitCode 限额/免赔类别代码
* @return prpDlimitDto prpDlimitDto
* @throws Exception
*/
public PrpDlimitDto findByPrimaryKey(DBManager dbManager,String riskCode,String limitCode) throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
//声明DTO
PrpDlimitDto prpDlimitDto = null;
//查询数据,赋值给DTO
prpDlimitDto = dbPrpDlimit.findByPrimaryKey(riskCode, limitCode);
return prpDlimitDto;
}
/**
* 按条件查询多条数据
* @param dbManager DB管理器
* @param conditions 查询条件
* @param pageNo 页号
* @param rowsPerPage 每页的行数
* @return Collection 包含prpDlimitDto的集合
* @throws Exception
*/
public Collection findByConditions(DBManager dbManager,String conditions,int pageNo,int rowsPerPage) throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
Collection collection = new ArrayList();
if(conditions.trim().length()==0){
conditions = "1=1";
}
rowCount = dbPrpDlimit.getCount(conditions);
collection = dbPrpDlimit.findByConditions(conditions,pageNo,rowsPerPage);
return collection;
}
/**
* 必须在findByConditions后调用,返回findByConditions查询到的记录数
* @return 记录数
*/
public int getRowCount(){
return rowCount;
}
/**
* 查询满足模糊查询条件的记录数
* @param dbManager DB管理器
* @param conditions conditions
* @return 满足模糊查询条件的记录数
* @throws Exception
*/
public int getRowCount(DBManager dbManager,String conditions)
throws Exception{
DBPrpDlimit dbPrpDlimit = new DBPrpDlimit(dbManager);
if(conditions.trim().length()==0){
conditions = "1=1";
}
int count = dbPrpDlimit.getCount(conditions);
return count;
}
}
|
[
"26166405+vincentdk77@users.noreply.github.com"
] |
26166405+vincentdk77@users.noreply.github.com
|
cfeec8056e3da3900dec72a37875755059eee99c
|
e07f62f8fd2020df8f24a3318d13066e3adbed4d
|
/src/main/java/pro/buildmysoftware/Product.java
|
aac08c1f929c93bf80da8d1d8cf19b70152e09f3
|
[] |
no_license
|
mikewojtyna/mongodb-training
|
11f0aef39bc279b3d3e43cf26c26c947e1693550
|
10acb424b2ebf928c955301fd2600967c43b8211
|
refs/heads/master
| 2020-06-11T12:59:43.094717
| 2019-06-28T05:50:47
| 2019-06-28T05:50:47
| 193,972,725
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 319
|
java
|
package pro.buildmysoftware;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import java.math.BigDecimal;
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode
public class Product {
private String name;
private BigDecimal price;
}
|
[
"mike@buildmysoftware.pro"
] |
mike@buildmysoftware.pro
|
e32bf6c621375eef52354264f6600851850c1ff6
|
3bfb8414c4d13134af4a95120e23a74f29704e43
|
/app9/src/Z1.java
|
12b34b87a7cf2d36358c5dd0f2fafa7e96e72503
|
[] |
no_license
|
lakshmipriya5858/java-practice-programs
|
31aa803b19b6a0efa7ddd89d211e6a51b9fdb981
|
6c4789f4a283f303099348831d571eb010079248
|
refs/heads/master
| 2020-04-03T06:52:10.447204
| 2019-02-08T11:13:57
| 2019-02-08T11:13:57
| 155,086,315
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 444
|
java
|
class Z1
{
public static void main(String[] args)
{
System.out.println("main begin");
char c1='t';
switch(c1)
{
case 'a':
System.out.println("from case 1");
break;
case 116:
System.out.println("from case 116");
break;
case 'p':
System.out.println("from case 7");
break;
case 'f':
System.out.println("from case 10");
break;
}
System.out.println("main end");
}
}
|
[
"lakshmipriya5858@gmail.com"
] |
lakshmipriya5858@gmail.com
|
c8ae8eca4c387c1bee1a0e8f14bf0eb0c9ebd21a
|
c3aa9cd5cbff157ecd07e9c9e9a196186b420d04
|
/src/main/java/com/slyak/spring/jpa/AbstractTemplateBasedJpaQuery.java
|
731a4c2ca2adbb7e39ec4b758214a5c694f16685
|
[
"Apache-2.0"
] |
permissive
|
peizihui/spring-data-jpa-extra
|
a795599e3a7ce7327b94d2c284c57072ea276bfc
|
aed30264b93426c0547005a789e13cbe6ccd4109
|
refs/heads/master
| 2020-03-23T03:00:58.470365
| 2018-05-11T01:49:26
| 2018-05-11T01:49:26
| 141,004,672
| 1
| 1
| null | 2018-07-15T06:41:13
| 2018-07-15T06:41:13
| null |
UTF-8
|
Java
| false
| false
| 2,979
|
java
|
package com.slyak.spring.jpa;
import org.springframework.data.jpa.repository.query.*;
import org.springframework.data.repository.query.ParameterAccessor;
import org.springframework.data.repository.query.ParametersParameterAccessor;
import org.springframework.util.ReflectionUtils;
import javax.persistence.EntityManager;
import javax.persistence.Query;
import java.lang.reflect.Method;
/**
* .
*
* @author stormning on 16/6/5.
*/
public class AbstractTemplateBasedJpaQuery extends AbstractJpaQuery {
private JpaQueryMethod method;
private QueryTemplate query;
private QueryTemplate countQuery;
/**
* Creates a new {@link AbstractJpaQuery} from the given {@link JpaQueryMethod}.
*
* @param method jpa query method
* @param em entity manager
* @param context query template context
*/
public AbstractTemplateBasedJpaQuery(JpaQueryMethod method, EntityManager em, QueryTemplateContext context) {
super(method, em);
this.method = method;
this.query = context.lookup(getQueryMethod().getNamedQueryName());
String cq = executeMethod("getCountQuery");
this.countQuery = cq == null ? null : context.lookup(cq);
}
@Override
protected Query doCreateQuery(Object[] values) {
ParameterAccessor accessor = new ParametersParameterAccessor(getQueryMethod().getParameters(), values);
String sortedQueryString = QueryUtils.applySorting(query.getQueryString(), accessor.getSort(),
QueryUtils.detectAlias(query.getQueryString()));
Query query = createJpaQuery(sortedQueryString);
return createBinder(values).bindAndPrepare(query);
}
@Override
protected Query doCreateCountQuery(Object[] values) {
String queryString = countQuery.getQueryString();
EntityManager em = getEntityManager();
boolean isNativeQuery = executeMethod("nativeQuery");
return createBinder(values)
.bind(isNativeQuery ? em.createNativeQuery(queryString) : em.createQuery(queryString, Long.class));
}
public Query createJpaQuery(String queryString) {
return getEntityManager().createQuery(queryString);
}
@Override
protected ParameterBinder createBinder(Object[] values) {
return new TemplateQueryParameterBinder(getQueryMethod().getParameters(), values);
}
@SuppressWarnings("unchecked")
private <T> T executeMethod(String methodName) {
Method countQueryMethod = ReflectionUtils.findMethod(JpaQueryMethod.class, methodName);
ReflectionUtils.makeAccessible(countQueryMethod);
return (T) ReflectionUtils.invokeMethod(countQueryMethod, method);
}
private static class TemplateQueryParameterBinder extends ParameterBinder {
private Object[] values;
private JpaParameters parameters;
/**
* Creates a new {@link ParameterBinder}.
*
* @param parameters must not be {@literal null}.
* @param values must not be {@literal null}.
*/
public TemplateQueryParameterBinder(JpaParameters parameters, Object[] values) {
super(parameters, values);
this.values = values;
this.parameters = parameters;
}
}
}
|
[
"stormning@163.com"
] |
stormning@163.com
|
c7d29f2f5c3db71afc729d9887b432698a7ea9c9
|
689cdf772da9f871beee7099ab21cd244005bfb2
|
/classes/com/android/dazhihui/ui/widget/kd.java
|
fdaf2a1e5b64c992c5e9a001991bef3d5c2a130d
|
[] |
no_license
|
waterwitness/dazhihui
|
9353fd5e22821cb5026921ce22d02ca53af381dc
|
ad1f5a966ddd92bc2ac8c886eb2060d20cf610b3
|
refs/heads/master
| 2020-05-29T08:54:50.751842
| 2016-10-08T08:09:46
| 2016-10-08T08:09:46
| 70,314,359
| 2
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,243
|
java
|
package com.android.dazhihui.ui.widget;
import android.view.View;
import android.widget.TextView;
class kd
implements Runnable
{
kd(PullDownView paramPullDownView) {}
public void run()
{
View localView1 = this.a.getChildAt(0);
View localView2 = this.a.getChildAt(1);
View localView3 = this.a.getChildAt(2);
localView1.findViewById(2131560228).setVisibility(0);
localView1.findViewById(2131560229).setVisibility(8);
localView1.setVisibility(8);
localView3.findViewById(2131560228).setVisibility(0);
localView3.findViewById(2131560229).setVisibility(8);
localView3.setVisibility(8);
localView1.offsetTopAndBottom(-localView1.getTop() - PullDownView.a(this.a));
localView2.offsetTopAndBottom(-localView2.getTop());
localView3.offsetTopAndBottom(PullDownView.b(this.a) - localView3.getBottom() + PullDownView.a(this.a));
PullDownView.c(this.a).setText(2131166373);
PullDownView.d(this.a).setText(2131165296);
PullDownView.a(this.a, 0);
PullDownView.b(this.a, 0);
this.a.invalidate();
}
}
/* Location: E:\apk\dazhihui2\classes-dex2jar.jar!\com\android\dazhihui\ui\widget\kd.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"1776098770@qq.com"
] |
1776098770@qq.com
|
19633d7a0b62489718340d25cd2fdc52c6f73672
|
47d62992450e59b057ff79b722319214327486f6
|
/Ebook-ProgJava9e/src/chap08_Heritage/TstPcol4.java
|
6f976097c230a92a73eaafe2463be0e6c5a8a58a
|
[] |
no_license
|
egzontina/JavaSE-Demo
|
1cc7fe5d930f7a5e0bcf93f0518ef506d734e57e
|
f983e0e61e3afbb876bf63a88034ac65dcd4c7c6
|
refs/heads/master
| 2020-04-01T07:55:44.314925
| 2016-10-15T12:55:52
| 2016-10-15T12:55:52
| 153,010,125
| 1
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 800
|
java
|
package chap08_Heritage;
class Point04 {
public Point04(int x, int y) {
this.x = x;
this.y = y;
}
public void deplace(int dx, int dy) {
x += dx;
y += dy;
}
public void affiche() {
System.out.println("Je suis en " + x + " " + y);
}
protected int x, y;
}
class Pointcol04 extends Point04 {
public Pointcol04(int x, int y, byte couleur) {
super(x, y); // obligatoirement comme première instruction
this.couleur = couleur;
}
public void affiche() {
super.affiche();
System.out.println(" et ma couleur est : " + couleur);
}
private byte couleur;
}
public class TstPcol4 {
public static void main(String args[]) {
Pointcol04 pc = new Pointcol04(3, 5, (byte) 3);
pc.affiche(); // ici, il s'agit de affiche de Pointcol04
pc.deplace(1, -3);
pc.affiche();
}
}
|
[
"diop-malick@hotmail.fr"
] |
diop-malick@hotmail.fr
|
ba160f6a6d0c0f6cc8ab433b2c6616cd94874818
|
2054895337b913b51fa8be9d2906f6c97923eda4
|
/src/main/java/org/openapplications/oagis/_9/codelists/DayOfWeekCodeEnumerationType.java
|
8c7bf8b66214d0dc4b340c71844bdd97e5df4adc
|
[] |
no_license
|
jkomorek/hrxml
|
92e9fee42336a2b4b9e91fa7383584de452b8e79
|
4151d85f1a4e05132f4f1bda3d06b3e0705069f9
|
refs/heads/master
| 2021-01-23T03:04:51.415157
| 2014-02-28T05:51:52
| 2014-02-28T05:51:52
| 16,828,973
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,174
|
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: 2014.01.06 at 10:26:45 PM EST
//
package org.openapplications.oagis._9.codelists;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for DayOfWeekCodeEnumerationType.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="DayOfWeekCodeEnumerationType">
* <restriction base="{http://www.w3.org/2001/XMLSchema}normalizedString">
* <enumeration value="Sunday"/>
* <enumeration value="Monday"/>
* <enumeration value="Tuesday"/>
* <enumeration value="Wednesday"/>
* <enumeration value="Thursday"/>
* <enumeration value="Friday"/>
* <enumeration value="Saturday"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "DayOfWeekCodeEnumerationType", namespace = "http://www.openapplications.org/oagis/9/codelists")
@XmlEnum
public enum DayOfWeekCodeEnumerationType {
@XmlEnumValue("Sunday")
SUNDAY("Sunday"),
@XmlEnumValue("Monday")
MONDAY("Monday"),
@XmlEnumValue("Tuesday")
TUESDAY("Tuesday"),
@XmlEnumValue("Wednesday")
WEDNESDAY("Wednesday"),
@XmlEnumValue("Thursday")
THURSDAY("Thursday"),
@XmlEnumValue("Friday")
FRIDAY("Friday"),
@XmlEnumValue("Saturday")
SATURDAY("Saturday");
private final String value;
DayOfWeekCodeEnumerationType(String v) {
value = v;
}
public String value() {
return value;
}
public static DayOfWeekCodeEnumerationType fromValue(String v) {
for (DayOfWeekCodeEnumerationType c: DayOfWeekCodeEnumerationType.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"jonathan.komorek@gmail.com"
] |
jonathan.komorek@gmail.com
|
2e8a77ca4c28f601873f597214b6b65e079a1447
|
18ce5f96e391774c6d9e19d1bd4824f4e22690f1
|
/aeroncluster/src/testFixtures/java/dev/squaremile/transport/aeroncluster/fixtures/ClusterDefinition.java
|
3a1c331bd156162d10d76938366b50770245692b
|
[
"Apache-2.0"
] |
permissive
|
squaremiledev/asynctransport
|
bc5579c4ddf2bb7b4015b88056226e8a9e247c51
|
442148d2d69a972c405595e296e3459711e585d3
|
refs/heads/master
| 2023-06-22T03:59:42.755687
| 2023-06-13T21:08:40
| 2023-06-13T21:08:40
| 291,040,306
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,075
|
java
|
package dev.squaremile.transport.aeroncluster.fixtures;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import dev.squaremile.transport.aeroncluster.api.IngressDefinition;
public class ClusterDefinition
{
private final List<NodeDefinition> nodes;
public ClusterDefinition(NodeDefinition... nodes)
{
if (nodes.length == 0)
{
throw new IllegalArgumentException("At least one node required");
}
this.nodes = Arrays.asList(nodes);
}
public static NodeDefinition node(final int nodeId, final IngressDefinition.Endpoint ingress, final List<String> endpoints)
{
if (endpoints.size() != 6)
{
throw new IllegalArgumentException();
}
return new NodeDefinition(
nodeId,
ingress,
endpoints.get(0),
endpoints.get(1),
endpoints.get(2),
endpoints.get(3),
endpoints.get(4),
endpoints.get(5)
);
}
public static List<String> endpoints(final String host, final List<Integer> nodeFreePorts)
{
return nodeFreePorts.stream().map(port -> host + ":" + port).collect(Collectors.toList());
}
public IngressDefinition ingress()
{
return new IngressDefinition(nodes.stream().map(node -> node.ingressEndpoint).collect(Collectors.toList()));
}
public NodeDefinition node(final int nodeId)
{
return nodes.get(nodeId);
}
public String memberURIs()
{
return nodes.stream().map(Object::toString).collect(Collectors.joining("|")) + "|";
}
@Override
public String toString()
{
return "ClusterEndpoints{" +
"nodes=" + nodes +
'}';
}
public static class NodeDefinition
{
private final String ingress;
private final String consensus;
private final String log;
private final String catchup;
private final IngressDefinition.Endpoint ingressEndpoint;
private final String archiveControl;
private final int nodeId;
private final String logControl;
private final String recordingEvents;
public NodeDefinition(
final int nodeId,
final IngressDefinition.Endpoint ingress,
final String consensus,
final String log,
final String catchup,
final String archiveControl,
final String logControl,
final String recordingEvents
)
{
if (ingress.nodeId() != nodeId)
{
throw new IllegalArgumentException();
}
this.ingressEndpoint = ingress;
this.archiveControl = archiveControl;
this.nodeId = nodeId;
this.ingress = ingress.endpoint();
this.consensus = consensus;
this.log = log;
this.catchup = catchup;
this.logControl = logControl;
this.recordingEvents = recordingEvents;
}
public String logControl()
{
return logControl;
}
public String ingress()
{
return ingress;
}
public String consensus()
{
return consensus;
}
public String log()
{
return log;
}
public String catchup()
{
return catchup;
}
public int nodeId()
{
return nodeId;
}
public String archiveControl()
{
return archiveControl;
}
@Override
public String toString()
{
return String.format(
"%d,%s,%s,%s,%s,%s",
nodeId, ingress, consensus, log, catchup, archiveControl
);
}
public String recordingEvents()
{
return recordingEvents;
}
}
}
|
[
"contact@michaelszymczak.com"
] |
contact@michaelszymczak.com
|
1feb1b92b169dea25c045fa266478320d1291f25
|
0e06e096a9f95ab094b8078ea2cd310759af008b
|
/classes89-dex2jar/com/google/android/gms/common/api/internal/zaf.java
|
b9c95bdec9feded2d31ec85f3b4f309eb815e618
|
[] |
no_license
|
Manifold0/adcom_decompile
|
4bc2907a057c73703cf141dc0749ed4c014ebe55
|
fce3d59b59480abe91f90ba05b0df4eaadd849f7
|
refs/heads/master
| 2020-05-21T02:01:59.787840
| 2019-05-10T00:36:27
| 2019-05-10T00:36:27
| 185,856,424
| 1
| 2
| null | 2019-05-10T00:36:28
| 2019-05-09T19:04:28
|
Java
|
UTF-8
|
Java
| false
| false
| 1,435
|
java
|
//
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.common.api.internal;
import android.os.RemoteException;
import android.support.annotation.Nullable;
import com.google.android.gms.common.Feature;
import android.support.annotation.NonNull;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.common.api.Api;
public final class zaf extends zad<Void>
{
private final RegisterListenerMethod<Api.AnyClient, ?> zacp;
private final UnregisterListenerMethod<Api.AnyClient, ?> zacq;
public zaf(final zabw zabw, final TaskCompletionSource<Void> taskCompletionSource) {
super(3, taskCompletionSource);
this.zacp = zabw.zajx;
this.zacq = zabw.zajy;
}
@Nullable
@Override
public final Feature[] zab(final GoogleApiManager.zaa<?> zaa) {
return this.zacp.getRequiredFeatures();
}
@Override
public final boolean zac(final GoogleApiManager.zaa<?> zaa) {
return this.zacp.shouldAutoResolveMissingFeatures();
}
public final void zad(final GoogleApiManager.zaa<?> zaa) throws RemoteException {
this.zacp.registerListener(zaa.zaab(), (TaskCompletionSource<Void>)this.zacn);
if (this.zacp.getListenerKey() != null) {
zaa.zabk().put(this.zacp.getListenerKey(), new zabw(this.zacp, this.zacq));
}
}
}
|
[
"querky1231@gmail.com"
] |
querky1231@gmail.com
|
7554ca8257e0339e9607803d17d5b282f0c1fa41
|
e3162d976b3a665717b9a75c503281e501ec1b1a
|
/src/main/java/com/alipay/api/domain/AlipayCommerceIotWifiSetModel.java
|
dce46a78bbeb471554a0c9a5ef17944e6cdf06e2
|
[
"Apache-2.0"
] |
permissive
|
sunandy3/alipay-sdk-java-all
|
16b14f3729864d74846585796a28d858c40decf8
|
30e6af80cffc0d2392133457925dc5e9ee44cbac
|
refs/heads/master
| 2020-07-30T14:07:34.040692
| 2019-09-20T09:35:20
| 2019-09-20T09:35:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 944
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 设备wifi配置
*
* @author auto create
* @since 1.0, 2019-06-20 21:52:40
*/
public class AlipayCommerceIotWifiSetModel extends AlipayObject {
private static final long serialVersionUID = 4622459363378229138L;
/**
* 设备唯一id
*/
@ApiField("biz_tid")
private String bizTid;
/**
* 设置wifi
*/
@ApiField("pwd")
private String pwd;
/**
* wifi名称
*/
@ApiField("ssid")
private String ssid;
public String getBizTid() {
return this.bizTid;
}
public void setBizTid(String bizTid) {
this.bizTid = bizTid;
}
public String getPwd() {
return this.pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public String getSsid() {
return this.ssid;
}
public void setSsid(String ssid) {
this.ssid = ssid;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
f7f8678e3367bd2ddfd0c332fea7e09e66d7cab6
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/5/5_71d4fe803c7c332e29ff6d06ae84ee12a1cf119f/Suggestion/5_71d4fe803c7c332e29ff6d06ae84ee12a1cf119f_Suggestion_t.java
|
525495c5d206c0ff18605927df8b317e72e63679
|
[] |
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,053
|
java
|
package com.uservoice.uservoicesdk.model;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.json.JSONException;
import org.json.JSONObject;
import com.uservoice.uservoicesdk.Session;
import com.uservoice.uservoicesdk.rest.Callback;
import com.uservoice.uservoicesdk.rest.RestTaskCallback;
public class Suggestion extends BaseModel {
private String title;
private String text;
private String status;
private String statusColor;
private String creatorName;
private String adminResponseText;
private String adminResponseUserName;
private String adminResponseAvatarUrl;
private Date adminResponseCreatedAt;
private Date createdAt;
private Category category;
private int numberOfComments;
private int numberOfSubscribers;
private int numberOfVotesByCurrentUser;
private int forumId;
private boolean subscribed;
private String forumName;
public static void loadSuggestions(Forum forum, int page, final Callback<List<Suggestion>> callback) {
Map<String, String> params = new HashMap<String, String>();
params.put("page", String.valueOf(page));
params.put("per_page", "20");
params.put("filter", "public");
params.put("sort", getClientConfig().getSuggestionSort());
doGet(apiPath("/forums/%d/suggestions.json", forum.getId()), params, new RestTaskCallback(callback) {
@Override
public void onComplete(JSONObject object) throws JSONException {
callback.onModel(deserializeList(object, "suggestions", Suggestion.class));
}
});
}
public static void searchSuggestions(Forum forum, String query, final Callback<List<Suggestion>> callback) {
Map<String, String> params = new HashMap<String, String>();
params.put("query", query);
doGet(apiPath("/forums/%d/suggestions/search.json", forum.getId()), params, new RestTaskCallback(callback) {
@Override
public void onComplete(JSONObject object) throws JSONException {
callback.onModel(deserializeList(object, "suggestions", Suggestion.class));
}
});
}
public static void createSuggestion(Forum forum, Category category, String title, String text, int numberOfVotes, final Callback<Suggestion> callback) {
Map<String, String> params = new HashMap<String, String>();
params.put("suggestion[votes]", String.valueOf(numberOfVotes));
params.put("suggestion[title]", title);
params.put("suggestion[text]", text);
if (category != null)
params.put("suggestion[category_id]", String.valueOf(category.getId()));
doPost(apiPath("/forums/%d/suggestions.json", forum.getId()), params, new RestTaskCallback(callback) {
@Override
public void onComplete(JSONObject object) throws JSONException {
callback.onModel(deserializeObject(object, "suggestion", Suggestion.class));
}
});
}
public void subscribe(String email, final Callback<Suggestion> callback) {
Map<String, String> params = new HashMap<String, String>();
params.put("email", email);
params.put("subscribe", "true");
doPost(apiPath("/forums/%d/suggestions/%d/watch.json", forumId, id), params, new RestTaskCallback(callback) {
@Override
public void onComplete(JSONObject result) throws JSONException {
subscribed = true;
callback.onModel(deserializeObject(result, "suggestion", Suggestion.class));
}
});
}
public void unsubscribe(String email, final Callback<Suggestion> callback) {
Map<String, String> params = new HashMap<String, String>();
params.put("email", email);
params.put("subscribe", "false");
doPost(apiPath("/forums/%d/suggestions/%d/watch.json", forumId, id), params, new RestTaskCallback(callback) {
@Override
public void onComplete(JSONObject result) throws JSONException {
subscribed = false;
callback.onModel(deserializeObject(result, "suggestion", Suggestion.class));
}
});
}
@Override
public void load(JSONObject object) throws JSONException {
super.load(object);
title = getString(object, "title");
text = getString(object, "formatted_text");
createdAt = getDate(object, "created_at");
forumId = object.getJSONObject("topic").getJSONObject("forum").getInt("id");
forumName = object.getJSONObject("topic").getJSONObject("forum").getString("name");
subscribed = object.has("subscribed") && object.getBoolean("subscribed");
if (!object.isNull("category"))
category = deserializeObject(object, "category", Category.class);
numberOfComments = object.getInt("comments_count");
numberOfSubscribers = object.getInt("subscriber_count");
if (!object.isNull("creator"))
creatorName = getString(object.getJSONObject("creator"), "name");
if (!object.isNull("votes_for"))
numberOfVotesByCurrentUser = object.getInt("votes_for");
// So every time you load a suggestion, either by viewing the list, or by voting on or creating one, it updates the user's votes remaining.
// In a way, this is terrible code. But in another way, it is a very simple solution to the problem at hand. Anyway, this is how the API works.
if (!object.isNull("votes_remaining") && Session.getInstance().getUser() != null)
Session.getInstance().getUser().setNumberOfVotesRemaining(object.getInt("votes_remaining"));
if (!object.isNull("status")) {
JSONObject statusObject = object.getJSONObject("status");
status = getString(statusObject, "name");
statusColor = getString(statusObject, "hex_color");
}
if (!object.isNull("response")) {
JSONObject response = object.getJSONObject("response");
adminResponseText = getString(response, "formatted_text");
adminResponseCreatedAt = getDate(response, "created_at");
JSONObject responseUser = response.getJSONObject("creator");
adminResponseUserName = getString(responseUser, "name");
adminResponseAvatarUrl = getString(responseUser, "avatar_url");
}
}
public String getForumName() {
return forumName;
}
public boolean isSubscribed() {
return subscribed;
}
public int getForumId() {
return forumId;
}
public String getTitle() {
return title;
}
public String getText() {
return text;
}
public String getStatus() {
return status;
}
public String getStatusColor() {
return statusColor;
}
public String getCreatorName() {
return creatorName;
}
public String getAdminResponseText() {
return adminResponseText;
}
public String getAdminResponseUserName() {
return adminResponseUserName;
}
public String getAdminResponseAvatarUrl() {
return adminResponseAvatarUrl;
}
public Date getAdminResponseCreatedAt() {
return adminResponseCreatedAt;
}
public Date getCreatedAt() {
return createdAt;
}
public Category getCategory() {
return category;
}
public int getNumberOfComments() {
return numberOfComments;
}
public int getNumberOfSubscribers() {
return numberOfSubscribers;
}
public int getNumberOfVotesByCurrentUser() {
return numberOfVotesByCurrentUser;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
915aad02ed0801a2351c21fe5ebbc8777179b2cc
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_1003313.java
|
1119e2b2a497969d21757b05ee655fca859f3627
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 504
|
java
|
/**
* Gets one of the original multi-dimensional values from a scalar value.
* @param dimensions the number of dimensions
* @param scalar the scalar value
* @param dim the dimension of the returned value (starting from 0)
* @return the value
*/
public int deinterleave(int dimensions,long scalar,int dim){
int bitsPerValue=getBitsPerValue(dimensions);
int value=0;
for (int i=0; i < bitsPerValue; i++) {
value|=(scalar >> (dim + (dimensions - 1) * i)) & (1L << i);
}
return value;
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
f52f36b1fa1dbb54d4a77206235523240351fa00
|
64455b7ce0658de6992bb219d8b150dddb30881c
|
/jsf/icefaces/showcase/src/main/java/org/icefaces/samples/showcase/example/ace/submitMonitor/SubmitMonitorStyle.java
|
ac5c565768352afd6de7a37ab37e79a4c36b0f64
|
[] |
no_license
|
bproenca/java
|
f1fba9f21026a67ec3131fed39692999ef6faed0
|
0b9a9c9620e60b22a57cc61fa3bd467269e270db
|
refs/heads/master
| 2023-01-09T15:34:48.597389
| 2019-12-21T21:46:42
| 2019-12-21T21:46:42
| 202,936,509
| 0
| 0
| null | 2023-01-02T21:58:51
| 2019-08-17T22:25:25
|
HTML
|
UTF-8
|
Java
| false
| false
| 983
|
java
|
package org.icefaces.samples.showcase.example.ace.submitMonitor;
import java.io.Serializable;
import javax.faces.bean.CustomScoped;
import javax.faces.bean.ManagedBean;
import javax.faces.model.SelectItem;
@ManagedBean(name= SubmitMonitorStyle.BEAN_NAME)
@CustomScoped(value = "#{window}")
public class SubmitMonitorStyle implements Serializable {
public static final String BEAN_NAME = "submitMonitorStyle";
public String getBeanName() { return BEAN_NAME; }
private static final String DEFAULT_ICON = "bar";
private static final SelectItem[] AVAILABLE_ICONS = {
new SelectItem(DEFAULT_ICON, "Animated Bar"),
new SelectItem("bounce", "Bouncing Ball"),
new SelectItem("spin", "Twirling Spinner")
};
private String activeIcon = "bar";
public SelectItem[] getAvailableIcons() {
return AVAILABLE_ICONS;
}
public String getActiveIcon() {
return activeIcon;
}
public void setActiveIcon(String activeIcon) {
this.activeIcon = activeIcon;
}
}
|
[
"bruno.proenca@synchro.com.br"
] |
bruno.proenca@synchro.com.br
|
c111a7f4045c1734a80c73f7c089cc971f3c67a4
|
3b91ed788572b6d5ac4db1bee814a74560603578
|
/com/tencent/tencentmap/mapsdk/a/ca.java
|
06048e055dd049547d4f692cd2fe72f34e007e88
|
[] |
no_license
|
linsir6/WeChat_java
|
a1deee3035b555fb35a423f367eb5e3e58a17cb0
|
32e52b88c012051100315af6751111bfb6697a29
|
refs/heads/master
| 2020-05-31T05:40:17.161282
| 2018-08-28T02:07:02
| 2018-08-28T02:07:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 823
|
java
|
package com.tencent.tencentmap.mapsdk.a;
final class ca<K, V> {
bz<K, V> a;
bz<K, V> b;
ca() {
}
public final void a(bz<K, V> bzVar) {
if (bzVar.c != null) {
bzVar.c.d = bzVar.d;
} else {
this.b = bzVar.d;
if (this.b != null) {
this.b.c = null;
}
}
if (bzVar.d != null) {
bzVar.d.c = bzVar.c;
return;
}
this.a = bzVar.c;
if (this.a != null) {
this.a.d = null;
}
}
public final void b(bz<K, V> bzVar) {
if (this.a == null) {
this.a = bzVar;
this.b = bzVar;
return;
}
bzVar.c = this.a;
this.a.d = bzVar;
this.a = bzVar;
this.a.d = null;
}
}
|
[
"707194831@qq.com"
] |
707194831@qq.com
|
299e188164c82bbc8226237336bf57556baa2606
|
6af0631fcdbc6403eee2dbefaa905a827c0117f6
|
/src/main/java/com/jstarcraft/rns/recommend/neuralnetwork/AutoRecRecommender.java
|
7240855590040083c16ac057bbcdcb74e1bf5c00
|
[
"Apache-2.0"
] |
permissive
|
dewey00/jstarcraft-rns
|
cdff9afb9d96cc7425050905b4f94526307d3c31
|
825f60c4bd46a2ed5c342f05ac874aaff57a7a63
|
refs/heads/master
| 2020-06-26T23:06:56.249110
| 2019-07-30T13:21:39
| 2019-07-30T13:21:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,081
|
java
|
package com.jstarcraft.rns.recommend.neuralnetwork;
import java.util.HashMap;
import java.util.Map;
import org.deeplearning4j.nn.api.OptimizationAlgorithm;
import org.deeplearning4j.nn.conf.MultiLayerConfiguration;
import org.deeplearning4j.nn.conf.NeuralNetConfiguration;
import org.deeplearning4j.nn.conf.layers.DenseLayer;
import org.deeplearning4j.nn.conf.layers.OutputLayer;
import org.deeplearning4j.nn.weights.WeightInit;
import org.nd4j.linalg.activations.Activation;
import org.nd4j.linalg.factory.Nd4j;
import org.nd4j.linalg.learning.config.Nesterovs;
import com.jstarcraft.ai.data.DataInstance;
import com.jstarcraft.ai.data.DataModule;
import com.jstarcraft.ai.data.DataSpace;
import com.jstarcraft.ai.math.structure.MathCache;
import com.jstarcraft.ai.math.structure.Nd4jCache;
import com.jstarcraft.ai.math.structure.matrix.MathMatrix;
import com.jstarcraft.ai.math.structure.matrix.MatrixScalar;
import com.jstarcraft.ai.math.structure.matrix.Nd4jMatrix;
import com.jstarcraft.ai.model.neuralnetwork.Graph;
import com.jstarcraft.ai.model.neuralnetwork.GraphConfigurator;
import com.jstarcraft.ai.model.neuralnetwork.activation.IdentityActivationFunction;
import com.jstarcraft.ai.model.neuralnetwork.activation.SigmoidActivationFunction;
import com.jstarcraft.ai.model.neuralnetwork.layer.Layer;
import com.jstarcraft.ai.model.neuralnetwork.layer.ParameterConfigurator;
import com.jstarcraft.ai.model.neuralnetwork.layer.WeightLayer;
import com.jstarcraft.ai.model.neuralnetwork.learn.NesterovLearner;
import com.jstarcraft.ai.model.neuralnetwork.normalization.IgnoreNormalizer;
import com.jstarcraft.ai.model.neuralnetwork.optimization.StochasticGradientOptimizer;
import com.jstarcraft.ai.model.neuralnetwork.parameter.XavierUniformParameterFactory;
import com.jstarcraft.ai.model.neuralnetwork.schedule.ConstantSchedule;
import com.jstarcraft.ai.model.neuralnetwork.vertex.LayerVertex;
import com.jstarcraft.rns.configure.Configurator;
import com.jstarcraft.rns.recommend.ModelRecommender;
/**
*
* AutoRec学习器
*
* <pre>
* AutoRec: Autoencoders Meet Collaborative Filtering
* 参考LibRec团队
* </pre>
*
* @author Birdy
*
*/
public class AutoRecRecommender extends ModelRecommender {
/**
* the dimension of input units
*/
protected int inputDimension;
/**
* the dimension of hidden units
*/
protected int hiddenDimension;
/**
* the activation function of the hidden layer in the neural network
*/
protected String hiddenActivation;
/**
* the activation function of the output layer in the neural network
*/
protected String outputActivation;
/**
* the learning rate of the optimization algorithm
*/
protected float learnRate;
/**
* the momentum of the optimization algorithm
*/
protected float momentum;
/**
* the regularization coefficient of the weights in the neural network
*/
protected float weightRegularization;
/**
* the data structure that stores the training data
*/
protected Nd4jMatrix inputData;
/**
* the data structure that stores the predicted data
*/
protected Nd4jMatrix outputData;
protected Graph network;
/**
* the data structure that indicates which element in the user-item is non-zero
*/
private Nd4jMatrix maskData;
protected int getInputDimension() {
return userSize;
}
@Override
public void prepare(Configurator configuration, DataModule model, DataSpace space) {
super.prepare(configuration, model, space);
inputDimension = getInputDimension();
hiddenDimension = configuration.getInteger("recommender.hidden.dimension");
hiddenActivation = configuration.getString("recommender.hidden.activation");
outputActivation = configuration.getString("recommender.output.activation");
learnRate = configuration.getFloat("recommender.iterator.learnrate");
momentum = configuration.getFloat("recommender.iterator.momentum");
weightRegularization = configuration.getFloat("recommender.weight.regularization");
// transform the sparse matrix to INDArray
int[] matrixShape = new int[] { itemSize, userSize };
inputData = new Nd4jMatrix(Nd4j.zeros(matrixShape));
maskData = new Nd4jMatrix(Nd4j.zeros(matrixShape));
outputData = new Nd4jMatrix(Nd4j.zeros(matrixShape));
for (MatrixScalar term : scoreMatrix) {
if (term.getValue() > 0D) {
inputData.setValue(term.getColumn(), term.getRow(), term.getValue());
maskData.setValue(term.getColumn(), term.getRow(), 1F);
}
}
}
protected Graph getComputationGraph() {
GraphConfigurator configurator = new GraphConfigurator();
Map<String, ParameterConfigurator> configurators = new HashMap<>();
Nd4j.getRandom().setSeed(6L);
ParameterConfigurator parameterConfigurator = new ParameterConfigurator(0F, weightRegularization, new XavierUniformParameterFactory());
configurators.put(WeightLayer.WEIGHT_KEY, parameterConfigurator);
configurators.put(WeightLayer.BIAS_KEY, new ParameterConfigurator(0F, 0F));
MathCache factory = new Nd4jCache();
Layer cdaeLayer = new WeightLayer(inputDimension, hiddenDimension, factory, configurators, new SigmoidActivationFunction());
Layer outputLayer = new WeightLayer(hiddenDimension, inputDimension, factory, configurators, new IdentityActivationFunction());
configurator.connect(new LayerVertex("input", factory, cdaeLayer, new NesterovLearner(new ConstantSchedule(learnRate), new ConstantSchedule(momentum)), new IgnoreNormalizer()));
configurator.connect(new LayerVertex("output", factory, outputLayer, new NesterovLearner(new ConstantSchedule(learnRate), new ConstantSchedule(momentum)), new IgnoreNormalizer()), "input");
Graph graph = new Graph(configurator, new StochasticGradientOptimizer(), new AutoRecLossFunction(maskData));
return graph;
}
@Override
protected void doPractice() {
Graph graph = getComputationGraph();
for (int iterationStep = 1; iterationStep <= numberOfEpoches; iterationStep++) {
totalLoss = graph.practice(1, new MathMatrix[] { inputData }, new MathMatrix[] { inputData });
if (isConverged(iterationStep) && isConverged) {
break;
}
currentLoss = totalLoss;
}
graph.predict(new MathMatrix[] { inputData }, new MathMatrix[] { outputData });
}
@Override
public void predict(DataInstance instance) {
int userIndex = instance.getQualityFeature(userDimension);
int itemIndex = instance.getQualityFeature(itemDimension);
instance.setQuantityMark(outputData.getValue(itemIndex, userIndex));
}
}
|
[
"Birdy@LAPTOP-QRG8T75T"
] |
Birdy@LAPTOP-QRG8T75T
|
e1fd3e364431bf39f557e95795f3dd190711243e
|
4cfdf239af078f5dd8f8f3c224b74f842043626e
|
/Java/ch20/src/E6_LambdaParam.java
|
8ed707a787df68b0761d410f9850d5bdec6a169a
|
[] |
no_license
|
WalkingWhale/Practices
|
f8a37d46a015fc959c9809da10b9fe09d4fa901e
|
eb4031950b109ec1189d4ad37dbe9768054cc2fb
|
refs/heads/master
| 2020-09-11T02:56:00.361074
| 2019-11-15T14:51:43
| 2019-11-15T14:51:43
| 221,917,953
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 291
|
java
|
interface PrintableE {
void print(String s);
}
public class E6_LambdaParam {
public static void ShowString(PrintableE p, String s){
p.print(s);
}
public static void main(String[] args) {
ShowString((s)->{System.out.println(s);}, "What is Lambda?");
}
}
|
[
"taejun4001@gmail.com"
] |
taejun4001@gmail.com
|
5f3649d896303166d4eae8e9d1adcc3632795add
|
82a1fce35d5157f10654d511ef53cf54a5cd9356
|
/java/org/apache/geronimo/openejb/xbeans/ejbjar/impl/OpenejbEjbJarDocumentImpl.java
|
052d3029870b42363de90e2df1dfd23d06dc0712
|
[] |
no_license
|
fideoman/GeronimoBarebone
|
8f4bc86177777f8b630609e034f6aafe17c1977c
|
9ca432ba109aaeaf129723dcee88b2e7a7cd8199
|
refs/heads/master
| 2021-05-18T20:35:48.063179
| 2020-03-30T19:28:33
| 2020-03-30T19:28:33
| 251,407,644
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,785
|
java
|
/*
* An XML document type.
* Localname: ejb-jar
* Namespace: http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0
* Java type: org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbEjbJarDocument
*
* Automatically generated - do not modify.
*/
package org.apache.geronimo.openejb.xbeans.ejbjar.impl;
/**
* A document containing one ejb-jar(@http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0) element.
*
* This is a complex type.
*/
public class OpenejbEjbJarDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbEjbJarDocument
{
private static final long serialVersionUID = 1L;
public OpenejbEjbJarDocumentImpl(org.apache.xmlbeans.SchemaType sType)
{
super(sType);
}
private static final javax.xml.namespace.QName EJBJAR$0 =
new javax.xml.namespace.QName("http://geronimo.apache.org/xml/ns/j2ee/ejb/openejb-2.0", "ejb-jar");
/**
* Gets the "ejb-jar" element
*/
public org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType getEjbJar()
{
synchronized (monitor())
{
check_orphaned();
org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType target = null;
target = (org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType)get_store().find_element_user(EJBJAR$0, 0);
if (target == null)
{
return null;
}
return target;
}
}
/**
* Sets the "ejb-jar" element
*/
public void setEjbJar(org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType ejbJar)
{
synchronized (monitor())
{
check_orphaned();
org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType target = null;
target = (org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType)get_store().find_element_user(EJBJAR$0, 0);
if (target == null)
{
target = (org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType)get_store().add_element_user(EJBJAR$0);
}
target.set(ejbJar);
}
}
/**
* Appends and returns a new empty "ejb-jar" element
*/
public org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType addNewEjbJar()
{
synchronized (monitor())
{
check_orphaned();
org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType target = null;
target = (org.apache.geronimo.openejb.xbeans.ejbjar.OpenejbGeronimoEjbJarType)get_store().add_element_user(EJBJAR$0);
return target;
}
}
}
|
[
"isaac.silva@usach.cl"
] |
isaac.silva@usach.cl
|
441cdff3349248e803e553caa2c96248b88e71ec
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/Alluxio--alluxio/3c519488b59fee930fd5f6ae9732f5201cd9b404/before/WebInterfaceWorkersServlet.java
|
d7da7d943e99b14f5d2261626868017d7d5744e3
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,159
|
java
|
/*
* Licensed to the University of California, Berkeley 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 tachyon.web;
import java.io.IOException;
import java.util.Collections;
import java.util.List;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.google.common.collect.Ordering;
import tachyon.Constants;
import tachyon.master.MasterInfo;
import tachyon.thrift.ClientWorkerInfo;
import tachyon.util.CommonUtils;
/**
* Servlet that provides data for displaying detail info of all workers.
*/
public class WebInterfaceWorkersServlet extends HttpServlet {
/**
* Class to make referencing worker nodes more intuitive. Mainly to avoid implicit association by
* array indexes.
*/
public static class NodeInfo {
private final String mName;
private final String mLastContactSec;
private final String mWorkerState;
private final long mCapacityBytes;
private final long mUsedBytes;
private final int mFreePercent;
private final int mUsedPercent;
private final String mUptimeClockTime;
private NodeInfo(ClientWorkerInfo workerInfo) {
mName = workerInfo.getAddress().getMHost();
mLastContactSec = Integer.toString(workerInfo.getLastContactSec());
mWorkerState = workerInfo.getState();
mCapacityBytes = workerInfo.getCapacityBytes();
mUsedBytes = workerInfo.getUsedBytes();
mUsedPercent = (int) (100L * mUsedBytes / mCapacityBytes);
mFreePercent = 100 - mUsedPercent;
mUptimeClockTime =
CommonUtils.convertMsToShortClockTime(System.currentTimeMillis()
- workerInfo.getStarttimeMs());
}
public String getCapacity() {
return CommonUtils.getSizeFromBytes(mCapacityBytes);
}
public int getFreeSpacePercent() {
return mFreePercent;
}
public String getLastHeartbeat() {
return mLastContactSec;
}
public String getName() {
return mName;
}
public String getState() {
return mWorkerState;
}
public String getUptimeClockTime() {
return mUptimeClockTime;
}
public String getUsedMemory() {
return CommonUtils.getSizeFromBytes(mUsedBytes);
}
public int getUsedSpacePercent() {
return mUsedPercent;
}
}
private static final long serialVersionUID = -7454493761603179826L;
private final transient MasterInfo mMasterInfo;
public WebInterfaceWorkersServlet(MasterInfo masterInfo) {
mMasterInfo = masterInfo;
}
/**
* Populates attributes before redirecting to a jsp.
*
* @param request The HttpServletRequest object
* @param response The HttpServletReponse object
*/
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
populateValues(request);
getServletContext().getRequestDispatcher("/workers.jsp").forward(request, response);
}
/**
* Order the nodes by hostName and generate NodeInfo list for UI display
*
* @param workerInfos The list of ClientWorkerInfo objects
* @return The list of NodeInfo objects
*/
private NodeInfo[] generateOrderedNodeInfos(List<ClientWorkerInfo> workerInfos) {
NodeInfo[] ret = new NodeInfo[workerInfos.size()];
Collections.sort(workerInfos, new Ordering<ClientWorkerInfo>() {
@Override
public int compare(ClientWorkerInfo info0, ClientWorkerInfo info1) {
return info0.getAddress().getMHost().compareTo(info1.getAddress().getMHost());
}
});
int index = 0;
for (ClientWorkerInfo workerInfo : workerInfos) {
ret[index ++] = new NodeInfo(workerInfo);
}
return ret;
}
/**
* Populates key, value pairs for UI display
*
* @param request The HttpServletRequest object
* @throws IOException
*/
private void populateValues(HttpServletRequest request) throws IOException {
request.setAttribute("debug", Constants.DEBUG);
List<ClientWorkerInfo> workerInfos = mMasterInfo.getWorkersInfo();
NodeInfo[] normalNodeInfos = generateOrderedNodeInfos(workerInfos);
request.setAttribute("normalNodeInfos", normalNodeInfos);
List<ClientWorkerInfo> lostWorkerInfos = mMasterInfo.getLostWorkersInfo();
NodeInfo[] failedNodeInfos = generateOrderedNodeInfos(lostWorkerInfos);
request.setAttribute("failedNodeInfos", failedNodeInfos);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
9ede20a87f1097a252117291e6e92679d8686595
|
c5b133bad21d4e64033c47c6126f3c36854ba6a8
|
/src/com/lichao/singleton/demo1/EnumManager.java
|
e8049ddfa29e6e4e4713320dfdc55061e735d900
|
[] |
no_license
|
lichao3140/DesignPattern
|
67195a923db0c4b011decc7d9fb82692f7da7f30
|
65f79f5836010a29a5483f23aabb955969c77434
|
refs/heads/master
| 2021-05-14T16:33:46.353837
| 2018-01-30T08:22:29
| 2018-01-30T08:22:29
| 116,022,972
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 429
|
java
|
package com.lichao.singleton.demo1;
public enum EnumManager {
SDCardManager(10) {
@Override
public EnumManager getSingle() {
return SDCardManager;
}
}, HttpManager(1) {
@Override
public EnumManager getSingle() {
return null;
}
};
public SdCardImpl getSingleton() {
return new SdCardImpl();
}
public abstract EnumManager getSingle();
private EnumManager(int type) {
}
}
|
[
"396229938@qq.com"
] |
396229938@qq.com
|
2fca015bb70505a8b0a67880e44c956eafb6cc88
|
432d0009ad260b2d2cdadb2da10374c803163b92
|
/BudgetMasterCore/src/main/java/de/deadlocker8/budgetmaster/logic/database/OldDatabase.java
|
51b0448a043cd8767d5625239d059dde97ca07d6
|
[
"MIT"
] |
permissive
|
jw2018/BudgetMaster
|
6721872eb70f9869b2fa54900413929563997aaa
|
11983b9cc1256b495053b5d14ad69aadaa4c96ef
|
refs/heads/master
| 2021-09-02T10:22:13.282668
| 2017-12-17T13:00:06
| 2017-12-17T13:00:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,107
|
java
|
package de.deadlocker8.budgetmaster.logic.database;
import java.util.ArrayList;
import de.deadlocker8.budgetmaster.logic.category.Category;
import de.deadlocker8.budgetmaster.logic.payment.NormalPayment;
import de.deadlocker8.budgetmaster.logic.payment.RepeatingPayment;
/**
* this class is only used for backwards compatibility while importing database jsons files
*/
@Deprecated
public class OldDatabase
{
private ArrayList<Category> categories;
private ArrayList<NormalPayment> normalPayments;
private ArrayList<RepeatingPayment> repeatingPayments;
public OldDatabase()
{
}
public OldDatabase(ArrayList<Category> categories, ArrayList<NormalPayment> normalPayments, ArrayList<RepeatingPayment> repeatingPayments)
{
this.categories = categories;
this.normalPayments = normalPayments;
this.repeatingPayments = repeatingPayments;
}
public ArrayList<Category> getCategories()
{
return categories;
}
public ArrayList<NormalPayment> getNormalPayments()
{
return normalPayments;
}
public ArrayList<RepeatingPayment> getRepeatingPayments()
{
return repeatingPayments;
}
}
|
[
"deadlocker@gmx.de"
] |
deadlocker@gmx.de
|
411bdc646eb75f895206211185a255e3b40c8493
|
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
|
/methods/Method_45373.java
|
be5e753151445834eb53611577f84a82c107edbe
|
[] |
no_license
|
P79N6A/icse_20_user_study
|
5b9c42c6384502fdc9588430899f257761f1f506
|
8a3676bc96059ea2c4f6d209016f5088a5628f3c
|
refs/heads/master
| 2020-06-24T08:25:22.606717
| 2019-07-25T15:31:16
| 2019-07-25T15:31:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 528
|
java
|
private RequestMatcher createRequestMatcherWithResource(final String operation,final Resource resource){
try {
Method operationMethod=Moco.class.getMethod(operation,Resource.class);
Object result=operationMethod.invoke(null,resource);
Optional<RequestMatcher> matcher=createRequestMatcher(result);
if (matcher.isPresent()) {
return matcher.get();
}
throw new IllegalArgumentException("unknown operation [" + operation + "]");
}
catch ( Exception e) {
throw new RuntimeException(e);
}
}
|
[
"sonnguyen@utdallas.edu"
] |
sonnguyen@utdallas.edu
|
02d50cd711b86e331903c5e22ecf2493b11e9571
|
a61848363d06fd0540066af5b82f956c1144bd1c
|
/supplier-system/src/main/java/co/yixiang/shop/domain/StoreOrderGoodsRemark.java
|
e086f6a8897f8278422756f8bf278a682f2d9fcd
|
[
"MIT"
] |
permissive
|
WingsII/supplierShop
|
7bba4ef576ba7bdeb74d17d7e084cf201790c602
|
d95d3b792a8ee4e4d4efa4234acd20da94bd3c2c
|
refs/heads/master
| 2023-07-31T07:14:03.550065
| 2021-06-18T09:27:13
| 2021-06-18T09:27:13
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,501
|
java
|
package co.yixiang.shop.domain;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import co.yixiang.common.annotation.Excel;
import co.yixiang.common.core.domain.BaseEntity;
/**
* 订单商品备注对象 store_order_goods_remark
*
* @author hupeng
* @date 2019-08-29
*/
public class StoreOrderGoodsRemark extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** $column.columnComment */
private Integer id;
/** 订单id */
@Excel(name = "订单id")
private Integer orderId;
/** 商品id */
@Excel(name = "商品id")
private Integer goodsId;
public void setId(Integer id)
{
this.id = id;
}
public Integer getId()
{
return id;
}
public void setOrderId(Integer orderId)
{
this.orderId = orderId;
}
public Integer getOrderId()
{
return orderId;
}
public void setGoodsId(Integer goodsId)
{
this.goodsId = goodsId;
}
public Integer getGoodsId()
{
return goodsId;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("id", getId())
.append("orderId", getOrderId())
.append("goodsId", getGoodsId())
.append("remark", getRemark())
.toString();
}
}
|
[
"guchengwuyue@163.com"
] |
guchengwuyue@163.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.