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
5f6630d77345c069590876817711a2355cabb99d
d5bdcc8ee20b84128ccfb9302209eb44032bd5c0
/quarkus/runtime/src/main/java/org/keycloak/cli/command/Tools.java
717b37bc1384820325fd14bb024f2d02f472becb
[ "Apache-2.0" ]
permissive
namphn/keycloak
aa2144d4bf0cfa1333bcd96ddc7b50423782714b
ecb1bfa69a9d14dedb7a77cac546081d3e1f3ec1
refs/heads/master
2023-08-18T21:01:18.605302
2021-10-18T13:46:22
2021-10-18T13:46:35
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,068
java
/* * Copyright 2021 Red Hat, Inc. and/or its affiliates * and other contributors as indicated by the @author tags. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.keycloak.cli.command; import picocli.CommandLine; @CommandLine.Command(name = "tools", description = "Provides utilities for using and interacting with the server.", mixinStandardHelpOptions = true, optionListHeading = "%nOptions%n", parameterListHeading = "Available Commands%n", subcommands = {Completion.class}) public class Tools { }
[ "pigor.craveiro@gmail.com" ]
pigor.craveiro@gmail.com
4398be4b7dbc44b21412005239e54f1294913b8e
f45f13360e35f7c72d83811d73448dc833208f0d
/Spring/si.retornoInt/src/pe/gob/mtpe/retorno/bean/ParamAdmRetorno.java
930c917cdc109ccd0d7f83d74da83c73d24dd2b0
[]
no_license
cequattro/obras
f42c78de62e55b562c6d98fe12b83245c0738ac0
f0090b73fce499cc349fcc7d6659c6b1082164df
refs/heads/master
2021-01-13T09:50:28.833568
2020-02-11T22:28:09
2020-02-11T22:28:09
72,766,955
0
0
null
null
null
null
UTF-8
Java
false
false
1,904
java
package pe.gob.mtpe.retorno.bean; import java.io.Serializable; import java.util.Date; public class ParamAdmRetorno implements Serializable{ /** * String vNumdoc * NÚMERO DE DOCUMENTO DE IDENTIDAD (PARA VALIDADOS POR RENIEC). * PARA EL CASO DE IDENTIFICACIÓN ALTERNATIVA ES UN CÓDIGO AUTOGENERADO ALEATORIAMENTE */ private String vNumdoc; /** * String vCodtdocide * CODIGO DE TIPO DOCUMENTO DE IDENTIDAD */ private String vCodtdocide; /** * String vApepater * APELLIDO PATERNO */ private String vApepater; /** * String vApemater * APELLIDO MATERNO */ private String vApemater; /** * String vNombres * NOMBRES */ private String vNombres; /** * Date dFecreg * FECHA EN LA QUE SE CREÓ EL REGISTRO */ private Date dFecreg; /** * Date dFecreg * CÓDIGO DE PAIS RESIDENTE */ private String vCodpaisres; public ParamAdmRetorno(){ } public String getvNumdoc() { return vNumdoc; } public void setvNumdoc(String vNumdoc) { this.vNumdoc = vNumdoc; } public String getvCodtdocide() { return vCodtdocide; } public void setvCodtdocide(String vCodtdocide) { this.vCodtdocide = vCodtdocide; } public String getvApepater() { return vApepater; } public void setvApepater(String vApepater) { this.vApepater = vApepater; } public String getvApemater() { return vApemater; } public void setvApemater(String vApemater) { this.vApemater = vApemater; } public String getvNombres() { return vNombres; } public void setvNombres(String vNombres) { this.vNombres = vNombres; } public Date getdFecreg() { return dFecreg; } public void setdFecreg(Date dFecreg) { this.dFecreg = dFecreg; } public String getvCodpaisres() { return vCodpaisres; } public void setvCodpaisres(String vCodpaisres) { this.vCodpaisres = vCodpaisres; } }
[ "cequattro@gmail.com" ]
cequattro@gmail.com
4a5f29966b8d37a12f47c5c6be4afa8b296c8515
ab2ff3f3e0015293e4fb55bb9ab325fbc0b0731b
/trunk/NeEDApp/src/main/java/com/apeironsol/need/analysis/revenue/service/RevenueAnalysisService.java
a66300640a0e46ce6bd11b83029afb35452186ed
[]
no_license
karreypradeep/NeedTrunk
1e10717521e4fcf950b8f30ac6ff852f52129b62
b01cb32bd75e8ad18474ce369509b24d908ccd03
refs/heads/master
2020-04-06T03:33:03.560106
2014-03-09T10:04:10
2014-03-09T10:04:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
621
java
/** * This document is a part of the source code and related artifacts for * SMSystem. * www.apeironsol.com * Copyright © 2012 apeironsol * */ package com.apeironsol.need.analysis.revenue.service; import com.apeironsol.need.analysis.revenue.dataobject.RevenueAcademicYearDO; import com.apeironsol.need.util.searchcriteria.RevenueAnalysisSearchCriteria; /** * Service interface for HostelRoom. * * @author Sunny * */ public interface RevenueAnalysisService { RevenueAcademicYearDO getRevenueGeneratedForAcademicYearBySearchCriteria(final RevenueAnalysisSearchCriteria revenueAnalysisSearchCriteria); }
[ "kpgoud533@gmail.com" ]
kpgoud533@gmail.com
10a78009c8d16b0630c235fe0912ed5f053a5faa
65d97757cb55ada67058cab92b5115e3af0b63cd
/src/no/systema/sporringoppdrag/model/jsonjackson/topic/invoice/JsonSporringOppdragSpecificTopicSingleChildInvoiceContainer.java
25bd39b6ba05dd506c141bcfdb8e4de4ff066743
[]
no_license
SystemaAS/espedsgtranspdisp
318dd970e23f19567f971353ce443e7191b6b80c
d88371f8a49cf6ea9c1675bbda416f4244afdc00
refs/heads/master
2022-08-01T16:38:00.000649
2022-07-01T08:47:16
2022-07-01T08:47:16
188,211,015
0
0
null
null
null
null
UTF-8
Java
false
false
5,037
java
/** * */ package no.systema.sporringoppdrag.model.jsonjackson.topic.invoice; import java.util.Collection; /** * @author oscardelatorre * @date Feb 25, 2015 * */ public class JsonSporringOppdragSpecificTopicSingleChildInvoiceContainer { private String user = null; public void setUser(String value) { this.user = value; } public String getUser() { return this.user;} private String avd = null; public void setAvd(String value) { this.avd = value; } public String getAvd() { return this.avd;} private String opd = null; public void setOpd(String value) { this.opd = value; } public String getOpd() { return this.opd;} private String faknr = null; public void setFaknr(String value) { this.faknr = value; } public String getFaknr() { return this.faknr;} private String kunr2 = null; public void setKunr2(String value) { this.kunr2 = value; } public String getKunr2() { return this.kunr2;} private String seintern = null; public void setSeintern(String value) { this.seintern = value; } public String getSeintern() { return this.seintern;} private String besk = null; public void setBesk(String value) { this.besk = value; } public String getBesk() { return this.besk;} private String kunde = null; public void setKunde(String value) { this.kunde = value; } public String getKunde() { return this.kunde;} private String knavn = null; public void setKnavn(String value) { this.knavn = value; } public String getKnavn() { return this.knavn;} private String wsna = null; public void setWsna(String value) { this.wsna = value; } public String getWsna() { return this.wsna;} private String fakdt = null; public void setFakdt(String value) { this.fakdt = value; } public String getFakdt() { return this.fakdt;} private String fakdtff = null; public void setFakdtff(String value) { this.fakdtff = value; } public String getFakdtff() { return this.fakdtff;} private String dref = null; public void setDref(String value) { this.dref = value; } public String getDref() { return this.dref;} private String vref = null; public void setVref(String value) { this.vref = value; } public String getVref() { return this.vref;} private String tur = null; public void setTur(String value) { this.tur = value; } public String getTur() { return this.tur;} private String dato = null; public void setDato(String value) { this.dato = value; } public String getDato() { return this.dato;} private String henas = null; public void setHenas(String value) { this.henas = value; } public String getHenas() { return this.henas;} private String heads1 = null; public void setHeads1(String value) { this.heads1 = value; } public String getHeads1() { return this.heads1;} private String heads2 = null; public void setHeads2(String value) { this.heads2 = value; } public String getHeads2() { return this.heads2;} private String heads3 = null; public void setHeads3(String value) { this.heads3 = value; } public String getHeads3() { return this.heads3;} private String henak = null; public void setHenak(String value) { this.henak = value; } public String getHenak() { return this.henak;} private String headk1 = null; public void setHeadk1(String value) { this.headk1 = value; } public String getHeadk1() { return this.headk1;} private String headk2 = null; public void setHeadk2(String value) { this.headk2 = value; } public String getHeadk2() { return this.headk2;} private String headk3 = null; public void setHeadk3(String value) { this.headk3 = value; } public String getHeadk3() { return this.headk3;} private String kll = null; public void setKll(String value) { this.kll = value; } public String getKll() { return this.kll;} private String vbesk = null; public void setVbesk(String value) { this.vbesk = value; } public String getVbesk() { return this.vbesk;} private String vkt = null; public void setVkt(String value) { this.vkt = value; } public String getVkt() { return this.vkt;} private String m3 = null; public void setM3(String value) { this.m3 = value; } public String getM3() { return this.m3;} private String lm = null; public void setLm(String value) { this.lm = value; } public String getLm() { return this.lm;} private String fvkt = null; public void setFvkt(String value) { this.fvkt = value; } public String getFvkt() { return this.fvkt;} private String part = null; public void setPart(String value) { this.part = value; } public String getPart() { return this.part;} private String errMsg = null; public void setErrMsg(String value) { this.errMsg = value; } public String getErrMsg() { return this.errMsg;} private Collection<JsonSporringOppdragSpecificTopicSingleChildInvoiceRecord> invlindet; public void setInvlindet(Collection<JsonSporringOppdragSpecificTopicSingleChildInvoiceRecord> value){ this.invlindet = value; } public Collection<JsonSporringOppdragSpecificTopicSingleChildInvoiceRecord> getInvlindet(){ return invlindet; } }
[ "oscar@systema.no" ]
oscar@systema.no
b51854d31fbe9904b4b1fb21c0d7ef82af8d7a1f
13496701ebeafb7eb840f409d8d196f2a1dd20bf
/isuite-core-ui/src/main/java/gov/nwcg/isuite/core/persistence/hibernate/CountryCodeSubdivisionDaoHibernate.java
cef69e073fb927b19a0793a09826de4165e3e565
[]
no_license
paulduong222/development
9a79c65e79bdf3fb35e505355e7bd66652f3817c
ace0e056d7e6f2f056daa3dd34b7cdbea983612b
refs/heads/master
2023-01-09T23:01:17.546717
2019-09-19T21:49:27
2019-09-19T21:49:27
209,649,814
0
0
null
2023-01-07T09:56:09
2019-09-19T21:15:13
Java
UTF-8
Java
false
false
6,316
java
package gov.nwcg.isuite.core.persistence.hibernate; import gov.nwcg.isuite.core.domain.CountrySubdivision; import gov.nwcg.isuite.core.domain.impl.CountrySubdivisionImpl; import gov.nwcg.isuite.core.filter.CountrySubdivisionFilter; import gov.nwcg.isuite.core.persistence.CountryCodeSubdivisionDao; import gov.nwcg.isuite.core.persistence.hibernate.query.ReferenceDataQuery; import gov.nwcg.isuite.core.vo.CountryCodeSubdivisionVo; import gov.nwcg.isuite.framework.core.filter.Filter; import gov.nwcg.isuite.framework.core.persistence.CrudDao; import gov.nwcg.isuite.framework.core.persistence.hibernate.TransactionSupportImpl; import gov.nwcg.isuite.framework.exceptions.PersistenceException; import java.util.Collection; import org.hibernate.Criteria; import org.hibernate.FetchMode; import org.hibernate.Query; import org.hibernate.criterion.Expression; import org.hibernate.criterion.MatchMode; import org.hibernate.criterion.Order; import org.hibernate.criterion.Projections; import org.hibernate.transform.Transformers; /** * Dao for CountryCodeSubdivision (aka states). * @author doug */ public class CountryCodeSubdivisionDaoHibernate extends TransactionSupportImpl implements CountryCodeSubdivisionDao { // private static final Log LOG = LogFactory.getLog(CountryCodeSubdivisionDaoHibernate.class); private final CrudDao<CountrySubdivision> crudDao; /** * Constructor. * @param crudDao can't be null * @param transferableDao can't be null */ public CountryCodeSubdivisionDaoHibernate(final CrudDao<CountrySubdivision> crudDao) { if ( crudDao == null ) { throw new IllegalArgumentException("crudDao can not be null"); } this.crudDao = crudDao; } /* * (non-Javadoc) * * @see gov.nwcg.isuite.persistence.CrudDao#delete(gov.nwcg.isuite.domain.Persistable) */ public void delete(CountrySubdivision persistable) throws PersistenceException { crudDao.delete(persistable); } /* (non-Javadoc) * @see gov.nwcg.isuite.persistence.CrudDao#getAll(gov.nwcg.isuite.domain.Filter) */ @SuppressWarnings("unchecked") @Deprecated public Collection<CountrySubdivision> getAll(Filter filter) throws PersistenceException { // Criteria crit = getHibernateSession().createCriteria(CountrySubdivisionImpl.class); // setWhere((CountrySubdivisionFilter)filter, crit); // return crit.list(); throw new UnsupportedOperationException("The getPicklist(CountrySubdivisionFilter) should be called."); } @SuppressWarnings("unchecked") public Collection<CountryCodeSubdivisionVo> getPicklist(CountrySubdivisionFilter filter) throws PersistenceException { Criteria crit = getHibernateSession().createCriteria(CountrySubdivisionImpl.class); crit.setProjection(Projections.projectionList() .add(Projections.property("id"), "id") .add(Projections.property("name"), "countrySubName") .add(Projections.property("abbreviation"), "countrySubAbbreviation") .add(Projections.property("countryCodeId"), "countryCdId") ); setWhere(filter, crit); crit.setResultTransformer(Transformers.aliasToBean(CountryCodeSubdivisionVo.class)); return crit.list(); } @SuppressWarnings("unchecked") public Collection<CountryCodeSubdivisionVo> getGrid(CountrySubdivisionFilter filter) throws PersistenceException { Criteria crit = getHibernateSession().createCriteria(CountrySubdivisionImpl.class); crit.setFetchMode("countryCode",FetchMode.JOIN); setWhere(filter, crit); Collection<CountrySubdivisionImpl> temp = crit.list(); try { return CountryCodeSubdivisionVo.getInstances(temp, true); } catch (Exception e) { throw new PersistenceException(e); } } private void setWhere(CountrySubdivisionFilter f, Criteria crit) { if (f != null) { if (f.getCountryCodeId() != null) { crit.add(Expression.eq("countryCodeId", f.getCountryCodeId())); } if (f.getCountrySubdivisionCode() != null && !"".equals(f.getCountrySubdivisionCode())) { crit.add(Expression.ilike("abbreviation", f.getCountrySubdivisionCode(), MatchMode.ANYWHERE)); } if (f.getCountrySubdivisionName() != null && !"".equals(f.getCountrySubdivisionName())) { crit.add(Expression.ilike("name", f.getCountrySubdivisionName(), MatchMode.ANYWHERE)); } if (f.getCountryAbbreviation() != null && !"".equals(f.getCountryAbbreviation())) { crit.add(Expression.ilike("countryCode.abbreviation", f.getCountryAbbreviation(), MatchMode.ANYWHERE)); } } crit.addOrder(Order.asc("abbreviation")); } /* * (non-Javadoc) * * @see gov.nwcg.isuite.persistence.CrudDao#getById(java.lang.Long, * java.lang.Class) */ public CountrySubdivision getById(Long id, Class clazz) throws PersistenceException { return crudDao.getById(id, CountrySubdivisionImpl.class); } /* * (non-Javadoc) * * @see gov.nwcg.isuite.persistence.CrudDao#save(gov.nwcg.isuite.domain.Persistable) */ public void save(CountrySubdivision persistable) throws PersistenceException { crudDao.save(persistable); } /* (non-Javadoc) * @see gov.nwcg.isuite.persistence.CrudDao#saveAll(java.util.Collection) */ public void saveAll(Collection<CountrySubdivision> persistables) throws PersistenceException { crudDao.saveAll(persistables); } /* * (non-Javadoc) * @see gov.nwcg.isuite.core.persistence.CountrySubdivisionDao#isCodeUnique(java.lang.String) */ @Override public Boolean isCodeUnique(String abbrevation) throws PersistenceException { if (abbrevation == null || abbrevation.length() < 1) { throw new PersistenceException("abbrevation cannot be null!"); } Query countrySubdivisionQuery = getHibernateSession().createQuery(ReferenceDataQuery.IS_COUNTRY_SUBDIVISION_ABRV_UNIQUE_QUERY); countrySubdivisionQuery.setParameter("abbreviation", abbrevation); return ((Long) countrySubdivisionQuery.uniqueResult()).equals(0L); //return true; } }
[ "paulduong@yahoo.com" ]
paulduong@yahoo.com
e8e211af2920f3079cb3db2551417cc3d547756a
23f42b163c0a58ad61c38498befa1219f53a2c10
/src/main/java/weldstartup/b/AppScopedBean1820.java
c32135244bcfa12c7eb0755335688419b6094938
[]
no_license
99sono/wls-jsf-2-2-12-jersey-weldstartup-bottleneck
9637d2f14a1053159c6fc3c5898a91057a65db9d
b81697634cceca79f1b9a999002a1a02c70b8648
refs/heads/master
2021-05-15T17:54:39.040635
2017-10-24T07:27:23
2017-10-24T07:27:23
107,673,776
0
0
null
null
null
null
UTF-8
Java
false
false
1,630
java
package weldstartup.b; import javax.annotation.PostConstruct; import javax.annotation.PreDestroy; import javax.annotation.Resource; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.spi.BeanManager; import javax.inject.Inject; import javax.transaction.TransactionSynchronizationRegistry; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import weldstartup.nondynamicclasses.AppScopedNonDynamicBean; import weldstartup.nondynamicclasses.DependentScopedNonDynamicBean; import weldstartup.nondynamicclasses.RequestScopedNonDynamicBean; /** * A dynamically created CDI bean meant to demonstrate meant to demonstrate that the WeldStartup performance on weblogic * is really under-performing. * */ @ApplicationScoped // appScopedName will be turned into a name like AppScopedBean0001 public class AppScopedBean1820 { private static final Logger LOGGER = LoggerFactory.getLogger(AppScopedBean1820.class); @Inject AppScopedNonDynamicBean appScopedNonDynamicBean; @Inject DependentScopedNonDynamicBean rependentScopedNonDynamicBean; @Inject RequestScopedNonDynamicBean requestScopedNonDynamicBean; @Inject BeanManager beanManager; @Resource TransactionSynchronizationRegistry tsr; @PostConstruct public void postConstruct() { LOGGER.info("Post construct method invoked. AppScopedBean1820"); } @PreDestroy public void preDestroy() { LOGGER.info("Pre-destroy method invoked. AppScopedBean1820"); } public void dummyLogic() { LOGGER.info("Dummy logic invoked. AppScopedBean1820"); } }
[ "99sono@users.noreply.github.com" ]
99sono@users.noreply.github.com
8b0f2e57f76e346f2489796d82f4d59b40a80b74
eb2c22492d4740a3eb455f2a898f6b3bc8235809
/jnnsBank/common/src/main/java/com/ideatech/common/constant/IdeaConstant.java
0ae2a9a631359454c39eda063f26672f50e3dfc5
[]
no_license
deepexpert-gaohz/sa-d
72a2d0cbfe95252d2a62f6247e7732c883049459
2d14275071b3d562447d24bd44d3a53f5a96fb71
refs/heads/master
2023-03-10T08:39:15.544657
2021-02-24T02:17:58
2021-02-24T02:17:58
341,395,351
1
0
null
null
null
null
UTF-8
Java
false
false
595
java
package com.ideatech.common.constant; /** * @author liangding * @create 2018-06-05 下午4:50 **/ public abstract class IdeaConstant { public static final String ORG_ROOT_CODE = "root"; public static final String ARRARY_REGEXP = "^([a-zA-Z0-9_]+)(\\[[0-9]+\\])$"; public static final String MANUAL_VALIDATE = "manualValidate"; public static final String X_FORM_ID = "x-form-id"; public static final String DOC_CUSTOMER = "customer_doc"; public static final String ANNUAL_LOOP_CONFIG="annualLoopFlag"; public static final String SYSTEM_IP_CONFIG = "systemIP"; }
[ "807661486@qq.com" ]
807661486@qq.com
fa85074b37d370c9179b39757911e530023997c8
f009dc33f9624aac592cb66c71a461270f932ffa
/src/main/java/com/alipay/api/response/AlipayMarketingVoucherSendResponse.java
7c1493f1e4e211cfb1218a73678334e2d750c7f2
[ "Apache-2.0" ]
permissive
1093445609/alipay-sdk-java-all
d685f635af9ac587bb8288def54d94e399412542
6bb77665389ba27f47d71cb7fa747109fe713f04
refs/heads/master
2021-04-02T16:49:18.593902
2020-03-06T03:04:53
2020-03-06T03:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
854
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: alipay.marketing.voucher.send response. * * @author auto create * @since 1.0, 2019-12-03 12:27:46 */ public class AlipayMarketingVoucherSendResponse extends AlipayResponse { private static final long serialVersionUID = 1188317345415775278L; /** * 支付宝用户ID */ @ApiField("user_id") private String userId; /** * 券ID */ @ApiField("voucher_id") private String voucherId; public void setUserId(String userId) { this.userId = userId; } public String getUserId( ) { return this.userId; } public void setVoucherId(String voucherId) { this.voucherId = voucherId; } public String getVoucherId( ) { return this.voucherId; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
ed23c494e36bcb9b71ce2e6d0a9484a8d3073059
67e7812751ecf3e7d8923ed3d9811904380bd510
/book_portal_web/src/main/java/cn/itdan/booksystem/utils/CookieUtils.java
2ec27be1c7a1c42f5c9090381c2b1a6fc8f343a4
[]
no_license
18376108492/book_system
2e47d44c843809dd5e6ed4cb79ec1f09e20b6ebc
ca3a7c60da0df5e36f85e468bc46f59019258a83
refs/heads/master
2022-12-08T00:08:28.884974
2019-12-14T15:24:21
2019-12-14T15:24:21
224,220,673
0
0
null
null
null
null
UTF-8
Java
false
false
7,845
java
package cn.itdan.booksystem.utils; import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * * Cookie 工具类 * */ public final class CookieUtils { /** * 得到Cookie的值, 不编码 * * @param request * @param cookieName * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName) { return getCookieValue(request, cookieName, false); } /** * 得到Cookie的值, * * @param request * @param cookieName * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName, boolean isDecoder) { Cookie[] cookieList = request.getCookies(); if (cookieList == null || cookieName == null) { return null; } String retValue = null; try { for (int i = 0; i < cookieList.length; i++) { if (cookieList[i].getName().equals(cookieName)) { if (isDecoder) { retValue = URLDecoder.decode(cookieList[i].getValue(), "UTF-8"); } else { retValue = cookieList[i].getValue(); } break; } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return retValue; } /** * 得到Cookie的值, * * @param request * @param cookieName * @return */ public static String getCookieValue(HttpServletRequest request, String cookieName, String encodeString) { Cookie[] cookieList = request.getCookies(); if (cookieList == null || cookieName == null) { return null; } String retValue = null; try { for (int i = 0; i < cookieList.length; i++) { if (cookieList[i].getName().equals(cookieName)) { retValue = URLDecoder.decode(cookieList[i].getValue(), encodeString); break; } } } catch (UnsupportedEncodingException e) { e.printStackTrace(); } return retValue; } /** * 设置Cookie的值 不设置生效时间默认浏览器关闭即失效,也不编码 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue) { setCookie(request, response, cookieName, cookieValue, -1); } /** * 设置Cookie的值 在指定时间内生效,但不编码 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage) { setCookie(request, response, cookieName, cookieValue, cookieMaxage, false); } /** * 设置Cookie的值 不设置生效时间,但编码 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, boolean isEncode) { setCookie(request, response, cookieName, cookieValue, -1, isEncode); } /** * 设置Cookie的值 在指定时间内生效, 编码参数 */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, boolean isEncode) { doSetCookie(request, response, cookieName, cookieValue, cookieMaxage, isEncode); } /** * 设置Cookie的值 在指定时间内生效, 编码参数(指定编码) */ public static void setCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, String encodeString) { doSetCookie(request, response, cookieName, cookieValue, cookieMaxage, encodeString); } /** * 删除Cookie带cookie域名 */ public static void deleteCookie(HttpServletRequest request, HttpServletResponse response, String cookieName) { doSetCookie(request, response, cookieName, "", -1, false); } /** * 设置Cookie的值,并使其在指定时间内生效 * * @param cookieMaxage cookie生效的最大秒数 */ private static final void doSetCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, boolean isEncode) { try { if (cookieValue == null) { cookieValue = ""; } else if (isEncode) { cookieValue = URLEncoder.encode(cookieValue, "utf-8"); } Cookie cookie = new Cookie(cookieName, cookieValue); if (cookieMaxage > 0) cookie.setMaxAge(cookieMaxage); if (null != request) {// 设置域名的cookie String domainName = getDomainName(request); System.out.println(domainName); if (!"localhost".equals(domainName)) { cookie.setDomain(domainName); } } cookie.setPath("/"); response.addCookie(cookie); } catch (Exception e) { e.printStackTrace(); } } /** * 设置Cookie的值,并使其在指定时间内生效 * * @param cookieMaxage cookie生效的最大秒数 */ private static final void doSetCookie(HttpServletRequest request, HttpServletResponse response, String cookieName, String cookieValue, int cookieMaxage, String encodeString) { try { if (cookieValue == null) { cookieValue = ""; } else { cookieValue = URLEncoder.encode(cookieValue, encodeString); } Cookie cookie = new Cookie(cookieName, cookieValue); if (cookieMaxage > 0) cookie.setMaxAge(cookieMaxage); if (null != request) {// 设置域名的cookie String domainName = getDomainName(request); System.out.println(domainName); if (!"localhost".equals(domainName)) { cookie.setDomain(domainName); } } cookie.setPath("/"); response.addCookie(cookie); } catch (Exception e) { e.printStackTrace(); } } /** * 得到cookie的域名 */ private static final String getDomainName(HttpServletRequest request) { String domainName = null; String serverName = request.getRequestURL().toString(); if (serverName == null || serverName.equals("")) { domainName = ""; } else { serverName = serverName.toLowerCase(); serverName = serverName.substring(7); final int end = serverName.indexOf("/"); serverName = serverName.substring(0, end); final String[] domains = serverName.split("\\."); int len = domains.length; if (len > 3) { // www.xxx.com.cn domainName = "." + domains[len - 3] + "." + domains[len - 2] + "." + domains[len - 1]; } else if (len <= 3 && len > 1) { // xxx.com or xxx.cn domainName = "." + domains[len - 2] + "." + domains[len - 1]; } else { domainName = serverName; } } if (domainName != null && domainName.indexOf(":") > 0) { String[] ary = domainName.split("\\:"); domainName = ary[0]; } return domainName; } }
[ "2207161187@qq.com" ]
2207161187@qq.com
03e2f407f1015183f0f2aec707cb8ac45a42544c
7c130d68a4deaaab53af90c978869bf934db8956
/AIM-4.0-Data-Model/src/edu/emory/cci/aim/model/LISTPQTime.java
636e2d7deb13561dbedf3c13e5e6ea58f4aef20c
[]
no_license
nadirsaghar/AIM-4.0-Data-Model-Java-bindings
a70eeb0d6388d227649efe3af5d2260d3180085f
79428f32748c319f638498a5f5baebf4c2d36bef
refs/heads/master
2016-08-06T14:52:31.093028
2013-05-25T02:50:43
2013-05-25T02:50:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,133
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2013.05.24 at 10:41:57 PM EDT // package edu.emory.cci.aim.model; import java.util.ArrayList; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlSeeAlso; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for LIST_PQ.Time complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="LIST_PQ.Time"> * &lt;complexContent> * &lt;extension base="{uri:iso.org:21090}ANY"> * &lt;sequence> * &lt;element name="item" type="{uri:iso.org:21090}PQ.Time" maxOccurs="unbounded" minOccurs="0"/> * &lt;/sequence> * &lt;/extension> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "LIST_PQ.Time", propOrder = { "item" }) @XmlSeeAlso({ HISTPQTime.class }) public class LISTPQTime extends ANY { protected List<PQTime> item; /** * Gets the value of the item property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the item property. * * <p> * For example, to add a new item, do as follows: * <pre> * getItem().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link PQTime } * * */ public List<PQTime> getItem() { if (item == null) { item = new ArrayList<PQTime>(); } return this.item; } }
[ "nadirsaghar@yahoo.com" ]
nadirsaghar@yahoo.com
4e794914e1795902e358370503a6afd4d4f0df12
b2938dfcfd93da3893b740477971690a1ce8aeaa
/initializr-generator/src/test/java/io/spring/initializr/generator/buildsystem/gradle/GradleBuildWriterTests.java
bf8bc74d6ce5e133fcea4ff30962caf0efe8a278
[ "Apache-2.0" ]
permissive
spring-io/initializr
1056034f9bc68351917dff912a270c5c37aa919c
55888d5c6a2a935bca53267a510f1567d9f0230c
refs/heads/main
2023-09-02T15:13:14.433356
2023-08-25T08:52:48
2023-08-25T08:52:48
10,553,586
3,409
1,964
Apache-2.0
2023-09-14T19:36:24
2013-06-07T16:02:22
Java
UTF-8
Java
false
false
2,313
java
/* * Copyright 2012-2022 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 * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package io.spring.initializr.generator.buildsystem.gradle; import java.util.Set; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; /** * Common tests for {@link GradleBuildWriter} implementations. * * @author Stephane Nicoll */ public abstract class GradleBuildWriterTests { @Test void gradleBuildWithSnippet() { GradleBuild build = new GradleBuild(); build.snippets().add((writer) -> { writer.println("custom {"); writer.indented(() -> { writer.println("first = 1"); writer.println("second = 2"); }); writer.println("}"); }); assertThat(write(build)).contains(""" custom { first = 1 second = 2 } """); } @Test void gradleBuildWithSnippetsAreSeparated() { GradleBuild build = new GradleBuild(); build.snippets().add((writer) -> { writer.println("custom {"); writer.indented(() -> { writer.println("first = 1"); writer.println("second = 2"); }); writer.println("}"); }); build.snippets().add((writer) -> { writer.println("another {"); writer.indented(() -> { writer.println("third = 3"); writer.println("fourth = 4"); }); writer.println("}"); }); assertThat(write(build)).contains(""" custom { first = 1 second = 2 } another { third = 3 fourth = 4 } """); } @Test void gradleBuildWithSnippetAndImports() { GradleBuild build = new GradleBuild(); build.snippets().add(Set.of("com.example.CustomTask"), (writer) -> writer.println("custom { }")); assertThat(write(build)).containsOnlyOnce("import com.example.CustomTask"); } protected abstract String write(GradleBuild build); }
[ "snicoll@vmware.com" ]
snicoll@vmware.com
adad1b5fa84a35f6d7cccf339afd581359d7461b
96400beb8e496082a91390f03dff5417c286b080
/service-common/src/main/java/com/daichao/common/support/shiro/listener/UserSessionListener.java
360fe069781db4e00ad979e2e8d792ba0f503007
[]
no_license
saberccmiku/daichao_houtai
0bbf47de58b8dc5cdf0cb1e5e8d581cdc032a96c
7e32559e825e93b8d59457e1f69afd5756b4b231
refs/heads/master
2022-12-23T22:24:33.402700
2019-07-12T08:58:49
2019-07-12T08:59:29
196,543,239
0
1
null
2022-12-16T00:47:28
2019-07-12T08:46:12
Java
UTF-8
Java
false
false
782
java
package com.daichao.common.support.shiro.listener; import org.apache.shiro.session.Session; import org.apache.shiro.session.SessionListener; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * session监听器 * @author zcl<yczclcn@163.com> */ public class UserSessionListener implements SessionListener { private static final Logger LOG = LoggerFactory.getLogger(UserSessionListener.class); @Override public void onStart(Session session) { LOG.debug("会话创建:{}", session.getId()); } @Override public void onStop(Session session) { LOG.debug("会话停止:{}", session.getId()); } @Override public void onExpiration(Session session) { LOG.debug("会话过期:{}", session.getId()); } }
[ "639878266@qq.com" ]
639878266@qq.com
f0a40c761764bbb18857e4fe84ac02aa1d6204ee
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/31/31_69886542dde85e1d67980ed0fe4779373b5a35a2/ChapterFragment/31_69886542dde85e1d67980ed0fe4779373b5a35a2_ChapterFragment_s.java
a3aed7c8fc398dc05efa1448da212fc8496dccda
[]
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
998
java
/** * */ package github.graded_reader; import android.app.Fragment; import android.os.Bundle; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView; /** * @author smokey * */ public class ChapterFragment extends Fragment { @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Log.e("Test", "hello"); } @Override public void onActivityCreated(Bundle savedInstanceState) { super.onActivityCreated(savedInstanceState); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.chapter, container, false); return view; } public void setText(String item) { TextView view = (TextView) getView().findViewById(R.id.chapterText); view.setText(item); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
1f4846512fd1829fb8d5f0aa0922ca1bd57838c1
90ef4eb79261228534e8c74eebf0aedae2f96f23
/builder-demo/src/main/java/com/builder/demo1/ConcreteBuilder1.java
02a319363a3ffce1d36651589918306ac23d99e8
[]
no_license
zhouzhu85/java-design-demo
73611c6a7a9ab67c449411e910413419328d4584
7d49a4d002d5475bf0930693d7c7b1c7edc3c0bc
refs/heads/master
2020-04-08T07:13:54.670386
2019-04-30T06:10:15
2019-04-30T06:10:15
159,131,991
0
0
null
null
null
null
UTF-8
Java
false
false
361
java
package com.builder.demo1; public class ConcreteBuilder1 extends Builder{ @Override public void buildpartA() { product.setPartA("建造1 partA"); } @Override public void buildpartB() { product.setPartB("建造1 partB"); } @Override public void buildpartC() { product.setPartC("建造1 partC"); } }
[ "734837014@qq.com" ]
734837014@qq.com
5beacc81d0ee847e2509f01933c2c4f55ce21143
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/10/10_3d1ffe4e575423f3922691dae88e85b7742eda0c/PmlTst/10_3d1ffe4e575423f3922691dae88e85b7742eda0c_PmlTst_s.java
3a0ac21e3facf390c8fcff20eb641a683e286d73
[]
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
575
java
import org.javascool.Pml; public class PmlTst { public static void main(String argv[]) { tst("{test coco=titi toto}", "pml"); tst("{test coco=titi toto=} ", "pml"); tst("{hello you=\"Philou & Guillaume\" me=vthierry 1 2 3 hi= } ", "pml"); tst("<root><toto>ABCD</toto></root>", "pml"); tst("<root><toto>ABCD</toto><toto>ADER</toto></root>", "xml"); } public static void tst(String string, String format) { System.out.println("in>"+string); Pml pml = new Pml().reset(string, format); System.out.println("out>"+pml); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
fdb9d4b732ad7a583677732d7538a298f25026e4
fa930bee168bd79923768d783dc7758948c367cc
/src/main/java/monnef/jaffas/food/client/ModelColumn.java
16ad9a747e9ef8f72e136778d5fb58ec3f7c315b
[ "LicenseRef-scancode-public-domain" ]
permissive
mnn/jaffas
d3ad9aefca71257f084977b0eebfcb81fa89d19b
73f12e934a4b0c5425d6ca7a3b8fc93093844ffb
refs/heads/master
2016-09-01T22:27:17.726980
2014-12-06T13:33:19
2014-12-06T13:33:19
6,065,869
3
3
null
2015-02-20T00:43:27
2012-10-03T19:57:31
Java
UTF-8
Java
false
false
2,404
java
/* * Jaffas and more! * author: monnef */ package monnef.jaffas.food.client; // Date: 20.1.2013 19:52:26 // Template version 1.1 // Java generated by Techne // Keep in mind that you still need to fill in some blanks // - ZeuX import net.minecraft.client.model.ModelBase; import net.minecraft.client.model.ModelRenderer; import net.minecraft.entity.Entity; public class ModelColumn extends ModelBase { //fields ModelRenderer Shape1; ModelRenderer Shape2; ModelRenderer Shape3; ModelRenderer Shape4; public ModelColumn() { textureWidth = 256; textureHeight = 128; Shape1 = new ModelRenderer(this, 0, 25); Shape1.addBox(0F, 0F, 0F, 16, 4, 16); Shape1.setRotationPoint(-8F, 20F, -8F); Shape1.setTextureSize(256, 128); Shape1.mirror = true; setRotation(Shape1, 0F, 0F, 0F); Shape2 = new ModelRenderer(this, 0, 51); Shape2.addBox(0F, 0F, 0F, 14, 1, 14); Shape2.setRotationPoint(-7F, 19F, -7F); Shape2.setTextureSize(256, 128); Shape2.mirror = true; setRotation(Shape2, 0F, 0F, 0F); Shape3 = new ModelRenderer(this, 46, 0); Shape3.addBox(0F, 0F, 0F, 6, 10, 6); Shape3.setRotationPoint(-3F, 9F, -3F); Shape3.setTextureSize(256, 128); Shape3.mirror = true; setRotation(Shape3, 0F, 0F, 0F); Shape4 = new ModelRenderer(this, 0, 0); Shape4.addBox(0F, 0F, 0F, 10, 1, 10); Shape4.setRotationPoint(-5F, 8F, -5F); Shape4.setTextureSize(256, 128); Shape4.mirror = true; setRotation(Shape4, 0F, 0F, 0F); } @Override public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) { super.render(entity, f, f1, f2, f3, f4, f5); setRotationAngles(f, f1, f2, f3, f4, f5, entity); render(f5); } public void render(float f5) { Shape1.render(f5); Shape2.render(f5); Shape3.render(f5); Shape4.render(f5); } private void setRotation(ModelRenderer model, float x, float y, float z) { model.rotateAngleX = x; model.rotateAngleY = y; model.rotateAngleZ = z; } @Override public void setRotationAngles(float f, float f1, float f2, float f3, float f4, float f5, Entity e) { super.setRotationAngles(f, f1, f2, f3, f4, f5, e); } }
[ "moen@366.hopto.org" ]
moen@366.hopto.org
d4cfd784a028b92fc3048bb41349f6e1ed68c6c2
51b9968c679562a1775dabf69993b2954925e7ec
/hazelcast/src/main/java/com/surendra/hazelcast/jet/WordCounter.java
554647bc5cd40779568679b684f3f6459deea1fb
[]
no_license
SurendraShukla/Java
1a80b3cb85fa50ba7605d6e75a4d66b506ac5c2f
b2573da68736dec9e1772e4dd62605044630e49e
refs/heads/master
2023-06-09T06:00:30.104814
2023-05-30T05:33:18
2023-05-30T05:33:18
71,692,069
0
0
null
2022-12-27T14:41:29
2016-10-23T09:00:18
Java
UTF-8
Java
false
false
1,566
java
package com.surendra.hazelcast.jet; import com.hazelcast.jet.Jet; import com.hazelcast.jet.JetInstance; import com.hazelcast.jet.pipeline.Pipeline; import com.hazelcast.jet.pipeline.Sinks; import com.hazelcast.jet.pipeline.Sources; import java.util.List; import java.util.Map; import static com.hazelcast.function.Functions.wholeItem; import static com.hazelcast.jet.Traversers.traverseArray; import static com.hazelcast.jet.aggregate.AggregateOperations.counting; public class WordCounter { private static final String LIST_NAME = "textList"; private static final String MAP_NAME = "countMap"; private Pipeline createPipeLine() { final Pipeline p = Pipeline.create(); p.readFrom(Sources.<String>list(LIST_NAME)) .flatMap(word -> traverseArray(word.toLowerCase().split("\\W+"))) .filter(word -> !word.isEmpty()) .groupingKey(wholeItem()) .aggregate(counting()) .writeTo(Sinks.map(MAP_NAME)); return p; } public Long countWord(final List<String> sentences, final String word) { long count = 0; final JetInstance jet = Jet.newJetInstance(); try { final List<String> textList = jet.getList(LIST_NAME); textList.addAll(sentences); final Pipeline p = createPipeLine(); jet.newJob(p).join(); final Map<String, Long> counts = jet.getMap(MAP_NAME); count = counts.get(word); } finally { Jet.shutdownAll(); } return count; } }
[ "surenshukla8@gmail.com" ]
surenshukla8@gmail.com
33d7b899f9c419169345ed6f1637be42adfa2950
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/5_templateit-org.templateit.Region-1.0-6/org/templateit/Region_ESTest_scaffolding.java
c3d571efd9685c6c167d0e323bf7e018244dc7b5
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
527
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 19:15:26 GMT 2019 */ package org.templateit; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class Region_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
028eed66f8dc1c64d3bbdcdd09bbaf0855a3f21a
36838dfcd53c4d2c73b9a6b0b7a8a28e4a331517
/com/c/a/b/a/N.java
5edfed938bcb68adce3ef6ec9425cb385f70a9bc
[]
no_license
ShahmanTeh/MiFit-Java
fbb2fd578727131b9ac7150b86c4045791368fe8
93bdf88d39423893b294dec2f5bf54708617b5d0
refs/heads/master
2021-01-20T13:05:10.408158
2016-02-03T21:02:55
2016-02-03T21:02:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
342
java
package com.c.a.b.a; import com.c.a.C0993k; import com.c.a.P; import com.c.a.c.a; import java.sql.Timestamp; import java.util.Date; final class N implements P { N() { } public <T> com.c.a.N<T> a(C0993k c0993k, a<T> aVar) { return aVar.getRawType() != Timestamp.class ? null : new O(this, c0993k.a(Date.class)); } }
[ "kasha_malaga@hotmail.com" ]
kasha_malaga@hotmail.com
9a4267bc7851e1d096f2963921b528f82bf975d1
f98123690c1f832da66fc9699052e0a934e74736
/src/main/java/com/networknt/oas/validator/NumericUtils.java
9f883f0a6382a8de312a92352b103aef56ed4a7c
[ "Apache-2.0" ]
permissive
jenkins-poc/openapi-parser
38b105ee73dbde969a9263954db8199b151b7f3c
27fe7c3c5aa9a7d927f032a3a74cfd2f09be469c
refs/heads/master
2020-03-10T06:57:08.905420
2018-04-08T17:11:38
2018-04-08T17:11:38
129,250,918
0
0
Apache-2.0
2018-04-12T12:52:45
2018-04-12T12:52:45
null
UTF-8
Java
false
false
4,445
java
/******************************************************************************* * Copyright (c) 2017 ModelSolv, Inc. 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: * ModelSolv, Inc. - initial API and implementation and/or initial documentation *******************************************************************************/ package com.networknt.oas.validator; import java.math.BigDecimal; import java.math.BigInteger; import java.util.HashMap; import java.util.Map; public class NumericUtils { public static boolean isNumeric(Object obj) { return NumericType.of(obj) != null; } public static boolean isIntegral(Object obj) { switch (NumericType.of(obj)) { case BIG_INTEGER: case BYTE: case INTEGER: case LONG: case SHORT: return true; default: return false; } } public static <T extends Number> T zero(T value) { Number result; switch (NumericType.of(value)) { case BIG_DECIMAL: result = BigDecimal.ZERO; break; case BIG_INTEGER: result = BigInteger.ZERO; break; case BYTE: result = Byte.valueOf((byte) 0); break; case DOUBLE: result = Double.valueOf(0.0); break; case FLOAT: result = Float.valueOf(0.0f); break; case INTEGER: result = Integer.valueOf(0); break; case LONG: result = Long.valueOf(0L); break; case SHORT: result = Short.valueOf((short) 0); break; default: return null; // shouldn't ever happen } @SuppressWarnings("unchecked") T tResult = (T) result; return tResult; } public static <T extends Number> boolean gt(T x, T y) { return compare(x, y) > 0; } public static <T extends Number> boolean ge(T x, T y) { return compare(x, y) >= 0; } public static <T extends Number> boolean lt(T x, T y) { return compare(x, y) < 0; } public static <T extends Number> boolean le(T x, T y) { return compare(x, y) <= 0; } public static <T extends Number> boolean eq(T x, T y) { return compare(x, y) == 0; } public static <T extends Number> boolean ne(T x, T y) { return compare(x, y) != 0; } public static <T extends Number> int compare(T x, T y) { NumericType type = NumericType.of(x); if (type != NumericType.of(y)) { throw new IllegalArgumentException(); } switch (type) { case BIG_DECIMAL: return ((BigDecimal) x).compareTo((BigDecimal) y); case BIG_INTEGER: return ((BigInteger) x).compareTo((BigInteger) y); case BYTE: return ((Byte) x).compareTo((Byte) y); case DOUBLE: return ((Double) x).compareTo((Double) y); case FLOAT: return ((Float) x).compareTo((Float) y); case INTEGER: return ((Integer) x).compareTo((Integer) y); case LONG: return ((Long) x).compareTo((Long) y); case SHORT: return ((Short) x).compareTo((Short) y); default: throw new IllegalArgumentException(); } } enum NumericType { BIG_DECIMAL(BigDecimal.class), // BIG_INTEGER(BigInteger.class), // BYTE(Byte.class), // DOUBLE(Double.class), // FLOAT(Float.class), // INTEGER(Integer.class), // LONG(Long.class), // SHORT(Short.class); private static Map<Class<? extends Number>, NumericType> types; private NumericType(Class<? extends Number> cls) { register(cls, this); } private void register(Class<? extends Number> cls, NumericType type) { if (NumericType.types == null) NumericType.types = new HashMap<>(); types.put(cls, type); } public static NumericType of(Object value) { return value != null ? types.get(value.getClass()) : null; } } }
[ "stevehu@gmail.com" ]
stevehu@gmail.com
940d64fbc794a0f03819859080f3ae474b08706d
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13708-1-11-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/internal/template/TemplateListener_ESTest_scaffolding.java
38facfe3484d5c90f1b8f5af05a764687a186f88
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
452
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Mar 31 00:46:34 UTC 2020 */ package com.xpn.xwiki.internal.template; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class TemplateListener_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
e2731286614c10e9bcee2cf1c01344164da2f8a7
d1bd1246f161b77efb418a9c24ee544d59fd1d20
/java/Hornet/src/org/javenstudio/panda/analysis/PatternReplaceFilterFactory.java
d9a89a67927de8270f2d501fd70e1a2011e0cc80
[]
no_license
navychen2003/javen
f9a94b2e69443291d4b5c3db5a0fc0d1206d2d4a
a3c2312bc24356b1c58b1664543364bfc80e816d
refs/heads/master
2021-01-20T12:12:46.040953
2015-03-03T06:14:46
2015-03-03T06:14:46
30,912,222
0
1
null
2023-03-20T11:55:50
2015-02-17T10:24:28
Java
UTF-8
Java
false
false
1,423
java
package org.javenstudio.panda.analysis; import java.util.Map; import java.util.regex.Pattern; import org.javenstudio.common.indexdb.ITokenStream; /** * Factory for {@link PatternReplaceFilter}. * <pre class="prettyprint" > * &lt;fieldType name="text_ptnreplace" class="solr.TextField" positionIncrementGap="100"&gt; * &lt;analyzer&gt; * &lt;tokenizer class="solr.KeywordTokenizerFactory"/&gt; * &lt;filter class="solr.PatternReplaceFilterFactory" pattern="([^a-z])" replacement="" * replace="all"/&gt; * &lt;/analyzer&gt; * &lt;/fieldType&gt;</pre> * * @see PatternReplaceFilter */ public class PatternReplaceFilterFactory extends TokenFilterFactory { private Pattern mPattern; private String mReplacement; private boolean mAll = true; @Override public void init(Map<String, String> args) { super.init(args); mPattern = getPattern("pattern"); mReplacement = args.get("replacement"); String r = args.get("replace"); if (r != null) { if (r.equals("all")) { mAll = true; } else { if (r.equals("first")) { mAll = false; } else { throw new IllegalArgumentException("Configuration Error: 'replace' must be 'first' or 'all' in " + getClass().getName()); } } } } @Override public PatternReplaceFilter create(ITokenStream input) { return new PatternReplaceFilter(input, mPattern, mReplacement, mAll); } }
[ "navychen2003@hotmail.com" ]
navychen2003@hotmail.com
224f27ec4c6ea294e6017232678a6b5f8cb1cc70
03d8920eb08d47d286242f771705a1f424aa650f
/src/main/java/com/example/hateoas/vo/CreateObject.java
81120114508d0611638b4f52dfa21a84d32d8483
[]
no_license
Lokie89/blog
2993e67fbd59cc8010723192d8fa7d3f289b5d7d
753a2f480fe8d0c052c3c318f313f363d75797ae
refs/heads/master
2020-06-27T17:58:05.249158
2019-08-05T23:46:32
2019-08-05T23:46:32
200,013,690
0
0
null
null
null
null
UTF-8
Java
false
false
243
java
package com.example.hateoas.vo; import lombok.Data; @Data public class CreateObject { private String href; private String type; private String description; private String[] mandatoryData; private String[] optionalData; }
[ "traeuman@gmail.com" ]
traeuman@gmail.com
b7fea4e1bb15a0d23aab28ae6a2d5c3e89d6517e
42f58448236cc8af7eaee8bb677d67d8dff8bef7
/src/main/java/com/niche/jhipster/domain/Blog.java
6432cbfc1bbb20942065eeb5f7380fbcddb6a3c3
[]
no_license
RRanjitha/JhipsterEntity
9b808760c05883800c74e7fe46197083d94eda73
90f4551418f1b4d172e5d65d67f920f682eaeec9
refs/heads/master
2020-03-24T22:53:51.925556
2018-08-01T05:28:01
2018-08-01T05:28:01
143,107,328
0
0
null
null
null
null
UTF-8
Java
false
false
2,514
java
package com.niche.jhipster.domain; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import javax.persistence.*; import javax.validation.constraints.*; import java.io.Serializable; import java.util.Objects; /** * A Blog. */ @Entity @Table(name = "blog") public class Blog implements Serializable { private static final long serialVersionUID = 1L; @Id @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequenceGenerator") @SequenceGenerator(name = "sequenceGenerator") private Long id; @NotNull @Column(name = "name", nullable = false) private String name; @Column(name = "content") private String content; @ManyToOne @JsonIgnoreProperties("categoryBlogs") private Category category; // jhipster-needle-entity-add-field - JHipster will add fields here, do not remove public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getName() { return name; } public Blog name(String name) { this.name = name; return this; } public void setName(String name) { this.name = name; } public String getContent() { return content; } public Blog content(String content) { this.content = content; return this; } public void setContent(String content) { this.content = content; } public Category getCategory() { return category; } public Blog category(Category category) { this.category = category; return this; } public void setCategory(Category category) { this.category = category; } // jhipster-needle-entity-add-getters-setters - JHipster will add getters and setters here, do not remove @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } Blog blog = (Blog) o; if (blog.getId() == null || getId() == null) { return false; } return Objects.equals(getId(), blog.getId()); } @Override public int hashCode() { return Objects.hashCode(getId()); } @Override public String toString() { return "Blog{" + "id=" + getId() + ", name='" + getName() + "'" + ", content='" + getContent() + "'" + "}"; } }
[ "ranji.cs016@gmail.com" ]
ranji.cs016@gmail.com
9cd816654bfefc79bab3cfb14667614fb71f80e0
f4aebeb457717bf58f343d235138ffe5fafa9e5e
/common/src/main/java/io/datakernel/util/TupleConstructor4.java
2ed6177ceb3542856541a840080e33e0f05522ea
[ "Apache-2.0" ]
permissive
Fly-Style/datakernel
ed29dbaa8d0ae5b8af4e51fc57ee360d17f6bec0
1fc9b6b8e73c91470e630213d75cada832ed8cde
refs/heads/master
2020-06-19T04:08:36.370360
2019-08-14T13:48:08
2019-08-14T13:48:08
196,556,667
0
0
null
2019-07-12T10:06:25
2019-07-12T10:06:24
null
UTF-8
Java
false
false
163
java
package io.datakernel.util; @FunctionalInterface public interface TupleConstructor4<T1, T2, T3, T4, R> { R create(T1 value1, T2 value2, T3 value3, T4 value4); }
[ "dmitry@datakernel.io" ]
dmitry@datakernel.io
61f730bf1b2c468d91ab974615aa7aa1e01be673
9e59323d4d79cfa2f07091fb4578ed416a4296c2
/design_model/ddd/src/org/basic/ddd/bloodloss/dao/hibernateimpl/AccountDAOHibernate.java
5ce819c9fd8ddf67db587479bdd705778de159f4
[]
no_license
devlanguage/JavaEE
57d5a29c6335cf3b2e4687ba159335d4dc757583
251fb4be5292a8171a29493256614b63ccae7581
refs/heads/master
2020-03-28T07:30:02.260551
2015-12-23T12:59:53
2015-12-23T12:59:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,350
java
package org.basic.ddd.bloodloss.dao.hibernateimpl; import java.math.BigDecimal; import java.util.List; import org.basic.ddd.bloodloss.dao.AccountDAO; import org.basic.ddd.bloodloss.model.Account; import org.hibernate.SessionFactory; import org.springframework.orm.hibernate3.HibernateTemplate; public class AccountDAOHibernate implements AccountDAO { private HibernateTemplate hibernateTemplate; public AccountDAOHibernate(SessionFactory sessionFactory) { this.hibernateTemplate = new HibernateTemplate(sessionFactory); } public Account createAccount(String accountId, BigDecimal balance) { System.out.println("hibernate create account"); Account account = new Account(accountId, balance); hibernateTemplate.save(account); return account; } @SuppressWarnings("unchecked") public Account findAccount(String accountId) { List accounts = hibernateTemplate.findByNamedQuery("Account.findByAccountId", accountId); return accounts.isEmpty() ? null : (Account) accounts.get(0); } public void updateAccount(Account account) { System.out.println("hibernate update account"); hibernateTemplate.update(account); } @Override public void clearAccount() { // hibernateTemplate.bulkUpdate("delete from Account"); } }
[ "emerson_gong@hotmail.com" ]
emerson_gong@hotmail.com
3435840450ad60c42f22b29375fd4f4eef339e37
8f468bf55fbac732717fb92d6f7b15270ca1b81a
/src/main/java/com/bitacademy/myportal/exception/GlobalExceptionHandler.java
1c9ebf3e9b0288da0a29f07d68086738cbe7d0c8
[]
no_license
Brilliant-Kwon/SpringMVC_myportal_eclipse
5d0285c30ca9aee19409ac277526aabbf77b1f89
dd2bb29989dbc0de769344685c7cb9ab82951fd6
refs/heads/master
2020-04-27T11:10:44.716581
2019-03-14T00:41:13
2019-03-14T00:41:13
174,286,038
0
0
null
null
null
null
UTF-8
Java
false
false
779
java
package com.bitacademy.myportal.exception; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.servlet.ModelAndView; import javax.servlet.http.HttpServletRequest; @ControllerAdvice public class GlobalExceptionHandler { @ExceptionHandler(Exception.class) public ModelAndView handleException(HttpServletRequest request, Exception e) { //1.로깅 System.out.println("================="); System.out.println("ControllerAdvice에 의한 예외 처리"); ModelAndView mav = new ModelAndView(); mav.addObject("name",e.getClass().getSimpleName()); mav.setViewName("exception/exception"); return mav; } }
[ "k1212keun@skuniv.ac.kr" ]
k1212keun@skuniv.ac.kr
5e4d2671a447ee75d035df0dd34f224dbe28a483
2cfa57121537092799e9c527905afd644aa6fe47
/src/main/java/com/github/sejoung/codetest/tags/hierarchy/Figure.java
305bbb87073d569918c3035e42673f80e7d49af4
[ "MIT" ]
permissive
sejoung/codeTestJDK8
5adf20adbbc0ed5abb7ddfc001df98c641bae247
d039353eee0ca150bc29cf80434dc9fb0609529f
refs/heads/master
2021-06-11T02:39:18.607941
2020-04-17T07:38:22
2020-04-17T07:38:22
128,148,831
0
0
null
null
null
null
UTF-8
Java
false
false
191
java
package com.github.sejoung.codetest.tags.hierarchy; // 코드 23-2 태그 달린 클래스를 클래스 계층구조로 변환 (144쪽) abstract class Figure { abstract double area(); }
[ "sejoung@gmail.com" ]
sejoung@gmail.com
37de0c7829be433a6382e842c58ce97f56fcd2c2
ceea7d8761d093612483df9756bf4220b45c3295
/console/systems/common/src/main/java/tech/uom/demo/systems/common/Beerfest.java
cb70427395262fcb7b9055cf87b5a0505f51b459
[ "BSD-3-Clause", "BSD-2-Clause" ]
permissive
dstibbe/uom-demos
00aa7a3738df9e7125234f6e1e303474b71d8e93
d88fe011613ab00d0142372cc919cf975d9966a9
refs/heads/master
2020-05-30T12:05:23.249906
2019-06-12T19:23:10
2019-06-12T19:23:10
189,723,616
0
0
NOASSERTION
2019-06-12T19:23:11
2019-06-01T11:13:13
Java
UTF-8
Java
false
false
2,465
java
/* * Unit-API - Units of Measurement API for Java * Copyright (c) 2005-2016, Jean-Marie Dautelle, Werner Keil, V2COM. * * 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 JSR-363, Units of Measurement 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. */ package tech.uom.demo.systems.common; import static tech.uom.demo.types.BeerUnits.*; import javax.measure.Quantity; import javax.measure.quantity.Volume; import systems.uom.common.Imperial; import systems.uom.common.USCustomary; import tech.units.indriya.quantity.Quantities; public class Beerfest { public static void main(String[] args) { System.out.println("Ozapft is!"); System.out.println(); Quantity<Volume> v = Quantities.getQuantity(.5d, USCustomary.LITER); System.out.println(v); System.out.println(v.to(Imperial.PINT)); System.out.println(v.to(USCustomary.FLUID_OUNCE)); System.out.println(); v = Quantities.getQuantity(1, MASS_HISTORIC); System.out.println(v); System.out.println(v.to(SCHOPPEN_BAYERN)); System.out.println(v.to(USCustomary.LITER)); } }
[ "werner.keil@gmx.net" ]
werner.keil@gmx.net
79d49ea879e33a092b9b8f69091eeadb750e6d32
f551ac18a556af60d50d32a175c8037aa95ec3ac
/shop/com/enation/app/shop/core/netty/omen/netty/server/cache/ChannelHashTable.java
d80f427abae16720c2fdfd531e01f30f60d5dad6
[]
no_license
yexingf/cxcar
06dfc7b7970f09dae964827fcf65f19fa39d35d1
0ddcf144f9682fa2847b9a350be91cedec602c60
refs/heads/master
2021-05-15T05:40:04.396174
2018-01-09T09:46:18
2018-01-09T09:46:18
116,647,698
0
5
null
null
null
null
UTF-8
Java
false
false
2,682
java
package com.enation.app.shop.core.netty.omen.netty.server.cache; import io.netty.channel.Channel; import io.netty.channel.ChannelId; import java.util.Hashtable; public class ChannelHashTable { private static Hashtable<String,Channel> busiTable = new Hashtable<String, Channel>(); private static Hashtable<ChannelId,String> channelTable= new Hashtable<ChannelId, String>(); public static Channel getChannel(String busiId){ return busiTable.get(busiId); } public static String getBusiId(ChannelId channelId){ return channelTable.get(channelId); } /** * * @Title: put * @Description: 这里先检查有没有旧的channel和busiId绑定,如果已有绑定且channelId不一致则关闭旧的channel * @param @param busiId * @param @param channel * @return void * @throws * @author omen www.liyidong.com * @date 2015年12月4日 上午10:32:58 */ public static void put(String busiId,Channel channel){ Channel oldChannel = busiTable.get(busiId); if(exists(busiId) &&(!oldChannel.id().asLongText().equals(channel.id().asLongText()))) remove(busiId); busiTable.put(busiId, channel); channelTable.put(channel.id(), busiId); } public static boolean exists(String busiId){ if(busiTable.containsKey(busiId)) return true; else return false; } /** * * @Title: remove * @Description: remove之后并关闭channel * @param @param channelId * @return void * @throws * @author omen www.liyidong.com * @date 2015年12月4日 上午10:46:57 */ public static void remove(ChannelId channelId){ if(channelTable.containsKey(channelId)){ String busiId = channelTable.get(channelId); Channel oldChannel = busiTable.get(busiId); oldChannel.close(); busiTable.remove(busiId); channelTable.remove(channelId); } } /** * * @Title: remove * @Description: 删除之后并关闭channel * @param @param busiId * @return void * @throws * @author omen www.liyidong.com * @date 2015年12月4日 上午10:48:44 */ public static void remove(String busiId){ if(busiTable.containsKey(busiId)){ Channel oldChannel = busiTable.get(busiId); oldChannel.close(); busiTable.remove(busiId); channelTable.remove(oldChannel.id()); } } public static boolean existsWritableChannel(String busiId){ if(busiTable.containsKey(busiId)&&busiTable.get(busiId).isWritable()) return true; else return false; } public static void main(String[] args) { String a ="1"; Integer b = 2; Hashtable<String, Integer> table = new Hashtable<String, Integer>(); table.put(a, b); b =3; System.out.println(table.containsValue(2)); } }
[ "274674758_ye@sina.com" ]
274674758_ye@sina.com
d0c629d6a85ae35a3f5366de1f933cb50e9e0074
c4a14d70951d7ec5aac7fe7ebb2db891cfe6c0b1
/modulos/apps/LOCALGIS-Model/src/main/java/com/vividsolutions/jump/workbench/ui/ILineStringSelection.java
f4271d96bcb6d5177245b4ce7c5aa708cfe0ddd8
[]
no_license
pepeysusmapas/allocalgis
925756321b695066775acd012f9487cb0725fcde
c14346d877753ca17339f583d469dbac444ffa98
refs/heads/master
2020-09-14T20:15:26.459883
2016-09-27T10:08:32
2016-09-27T10:08:32
null
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
1,002
java
/** * ILineStringSelection.java * © MINETUR, Government of Spain * This program is part of LocalGIS * This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version. * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ package com.vividsolutions.jump.workbench.ui; import java.util.List; import com.vividsolutions.jts.geom.Geometry; public interface ILineStringSelection { public abstract List items(Geometry geometry); public abstract String getRendererContentID(); }
[ "jorge.martin@cenatic.es" ]
jorge.martin@cenatic.es
06e487d965427025a9f76228956bd0bca8e13836
e70abc02efbb8a7637eb3655f287b0a409cfa23b
/hyjf-admin/src/main/java/com/hyjf/admin/manager/user/bankcard/BankcardServiceImpl.java
8799b6fb351609c0c73972e62a3860abafe4ff76
[]
no_license
WangYouzheng1994/hyjf
ecb221560460e30439f6915574251266c1a49042
6cbc76c109675bb1f120737f29a786fea69852fc
refs/heads/master
2023-05-12T03:29:02.563411
2020-05-19T13:49:56
2020-05-19T13:49:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,288
java
package com.hyjf.admin.manager.user.bankcard; import java.util.List; import java.util.Map; import org.springframework.stereotype.Service; import com.hyjf.admin.BaseServiceImpl; import com.hyjf.mybatis.model.auto.BankConfig; import com.hyjf.mybatis.model.auto.BankConfigExample; import com.hyjf.mybatis.model.customize.admin.AdminBankcardListCustomize; @Service public class BankcardServiceImpl extends BaseServiceImpl implements BankcardService { /** * 获取权限列表 * * @return */ public List<AdminBankcardListCustomize> getRecordList(Map<String, Object> bankCardUser, int limitStart, int limitEnd) { if (limitStart == 0 || limitStart > 0) { bankCardUser.put("limitStart", limitStart); } if (limitEnd > 0) { bankCardUser.put("limitEnd", limitEnd); } // 查询用户列表 List<AdminBankcardListCustomize> users = adminBankcardCustomizeMapper.selectBankCardList(bankCardUser); return users; } /** * 执行前每个方法前需要添加BusinessDesc描述 * * @param form * @return * @author Administrator */ @Override public int countRecordTotal(Map<String, Object> bankCardUser) { // 查询用户列表 int countTotal = adminBankcardCustomizeMapper.countRecordTotal(bankCardUser); return countTotal; } /** * 获取银行列表 * * @param string * @return * @author Administrator */ @Override public List<BankConfig> getBankcardList() { List<BankConfig> banks = bankConfigMapper.selectByExample(new BankConfigExample()); return banks; } @Override public int countRecordTotalNew(Map<String, Object> bankCardUser) { // 查询用户列表 int countTotal = adminBankcardCustomizeMapper.countRecordTotalNew(bankCardUser); return countTotal; } @Override public List<AdminBankcardListCustomize> getRecordListNew(Map<String, Object> bankCardUser, int limitStart, int limitEnd) { if (limitStart == 0 || limitStart > 0) { bankCardUser.put("limitStart", limitStart); } if (limitEnd > 0) { bankCardUser.put("limitEnd", limitEnd); } // 查询用户列表 List<AdminBankcardListCustomize> users = adminBankcardCustomizeMapper.selectNewBankCardList(bankCardUser); return users; } }
[ "heshuying@hyjf.com" ]
heshuying@hyjf.com
c467a9c0eddbcd09ead30dd4e387c060e34f430c
4ed13753f5bc20ec143dc25039280f80c3edddd8
/gosu-core-api/src/main/java/gw/lang/javadoc/IDocRef.java
58e9625a5470518d06aadfed9cada3a60e3f2a62
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer", "BSD-3-Clause" ]
permissive
hmsck/gosu-lang
180a96aab69ff0184700e70876bb0cf10c8a938f
78c5f6c839597a81ac5ec75a46259cbb6ad40545
refs/heads/master
2021-02-13T06:53:30.208378
2019-10-31T23:15:13
2019-10-31T23:15:13
244,672,021
0
0
Apache-2.0
2020-03-03T15:27:47
2020-03-03T15:27:46
null
UTF-8
Java
false
false
173
java
/* * Copyright 2014 Guidewire Software, Inc. */ package gw.lang.javadoc; import gw.lang.UnstableAPI; @UnstableAPI public interface IDocRef<T> { public T get(); }
[ "lboasso@guidewire.com" ]
lboasso@guidewire.com
6c37420542c9ce4297e22a1ee97fb2d326d58c42
b0df000c06527c2d0c6f7389cee9a9840aa9fa35
/src/main/java/systemdesign/expedia/version1/GameTest.java
745f78c3c7f12b39d48b6d86376e268880eef529
[]
no_license
wx8900/Leetcode
f07b196f00a6c0d5672f8ed749a5d06af501a3d9
af4175f56124c244a884d04e844e67ee352216b1
refs/heads/master
2020-11-24T12:10:39.286394
2019-12-15T06:22:42
2019-12-15T06:22:42
228,137,519
1
0
null
null
null
null
UTF-8
Java
false
false
3,322
java
package systemdesign.expedia.version1; import java.util.Scanner; /** * @author Jeff Cai * * @date 03/18/2019 * @version 1.0 * @apiNote Use OOD to design class and to write code * * @date 03/19/2019 * @version 2.0 * @apiNote * (1) Create a computer player object to move the chess randomly * (2) Fix a bug. When the last step of a walking though game is the same step(last step) to win the game, * code determines in drew(bug). However, the fact result of the game should be I/computer win. * * @date 03/19/2019 07:38 AM * @version 3.0 * @apiNote Extract code for three new smaller methods (startNewGame, getInputInfo, doWhileLoop) * * @date 03/19/2019 10:50 AM * @version 4.0 * @apiNote (1) Create a new class: Position * (2) Delete no use input parameters and use Position as input * (3) Find a performance issue, when computer player need to move, it always go the visited position,===> need add cache */ public class GameTest { public static void main (String[] args) { int min = 0; int sizeOfBoard = 3; TicTacToeBoard ticTacToeBoard = new TicTacToeBoard(sizeOfBoard); Player personPlayer = new Player(Constant.PLAYER_ID_ONE, Constant.PLAYER_PERSON); ComputerPlayer computerPlayer = new ComputerPlayer(Constant.PLAYER_ID_ONE_NEG, Constant.PLAYER_COMPUTER, min, sizeOfBoard); startNewGame(sizeOfBoard, ticTacToeBoard, personPlayer, computerPlayer); } /** * * @param sizeOfBoard * @param ticTacToeBoard * @param personPlayer * @param computerPlayer */ private static void startNewGame(int sizeOfBoard, TicTacToeBoard ticTacToeBoard, Player personPlayer, ComputerPlayer computerPlayer) { int round = 0; InputInfo info = getInputInfo(sizeOfBoard, personPlayer, computerPlayer); doWhileLoop(ticTacToeBoard, round, info); } /** * * @param ticTacToeBoard * @param round * @param info */ private static void doWhileLoop(TicTacToeBoard ticTacToeBoard, int round, InputInfo info) { Position p = new Position(); Player currentPlayer; do { CurrentPlayerAndPosition inputValues = new CurrentPlayerAndPosition().invoke(ticTacToeBoard, round, info); p.setX(inputValues.getP().getX()); p.setY(inputValues.getP().getY()); currentPlayer = inputValues.getCurrentPlayer(); if (ticTacToeBoard.checkBorder(p)) { round++; } } while (ticTacToeBoard.determineWinner(p, round, currentPlayer) == Constant.NUMBER_NO_END); } /** * * @param sizeOfBoard * @param personPlayer * @param computerPlayer * @return */ private static InputInfo getInputInfo(int sizeOfBoard, Player personPlayer, ComputerPlayer computerPlayer) { System.out.print(Constant.WELCOME_FIRST); Scanner in = new Scanner(System.in); String firsthand = in.nextLine(); InputInfo info = new InputInfo(); info.setIn(in); info.setFirsthand(firsthand); info.setSizeOfBoard(sizeOfBoard); info.setPersonPlayer(personPlayer); info.setComputerPlayer(computerPlayer); return info; } }
[ "cwx8900@gmail.com" ]
cwx8900@gmail.com
b98105cd405d6e32c55997176a51a0431d195339
edb159b83a4cbad1c4ec66eca1d6de6294a99f7e
/smartmon-vhe/src/main/java/smartmon/vhe/deployment/service/SmartstorDeployService.java
18a3896838dd5ee8a7577314da685ef03122c854
[]
no_license
java404/recode
4c36dbacd3f87ed1cf55e64cf7d185a2639ef494
b11a0b2ff12697d90922af7749ee282821623d45
refs/heads/master
2022-10-18T23:58:20.269631
2020-06-04T10:17:01
2020-06-04T10:17:01
258,482,172
0
0
null
null
null
null
UTF-8
Java
false
false
6,311
java
package smartmon.vhe.deployment.service; import com.github.rholder.retry.RetryException; import java.util.List; import java.util.Objects; import java.util.concurrent.Callable; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicInteger; import java.util.function.Predicate; import java.util.stream.Collectors; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import smartmon.core.hosts.RemoteHostCommand; import smartmon.taskmanager.TaskManagerService; import smartmon.taskmanager.record.TaskAct; import smartmon.taskmanager.record.TaskRes; import smartmon.taskmanager.types.TaskContext; import smartmon.taskmanager.types.TaskDescription; import smartmon.taskmanager.types.TaskDescriptionBuilder; import smartmon.taskmanager.types.TaskGroup; import smartmon.utilities.misc.LocalNetworkInterface; import smartmon.utilities.misc.RetryUtils; import smartmon.utilities.misc.TargetHost; import smartmon.utilities.ssh.ShellExecute; import smartmon.utilities.ssh.ShellExecuteEvent; import smartmon.vhe.deployment.command.SmartstorDeployCommand; import smartmon.vhe.service.HostService; import smartmon.vhe.service.dto.HostInitDto; @Service public class SmartstorDeployService extends SmartstorService { @Autowired private TaskManagerService taskManagerService; @Autowired private HostService hostService; public TaskGroup deploy(List<SmartstorDeployCommand> commands) { List<TaskDescription> tasks = commands.stream().map(this::taskDescription).collect(Collectors.toList()); TaskGroup taskGroup = taskManagerService.createTaskGroup("DeploySmartstor", tasks); taskManagerService.invokeTaskGroupParallel(taskGroup); return taskGroup; } private TaskDescription taskDescription(SmartstorDeployCommand command) { TaskDescriptionBuilder taskDescriptionBuilder = new TaskDescriptionBuilder() .withAction(TaskAct.ACT_INSTALL).withResource(TaskRes.RES_SMARTSTOR).withParameters(command); if (StringUtils.isNotEmpty(command.getNetworkParameters())) { Runnable configNetwork = () -> configNetwork(command.getAddress(), command.getNetworkParameters()); taskDescriptionBuilder.withStep("CONFIG", "config network", configNetwork); } Runnable uploadInstaller = () -> uploadInstaller(command, command.getSmartstorInstaller()); Runnable install = () -> doSmartstorCommand(command.getAddress(), command.getSmartstorInstaller(), command.getSmartstorTemplate()); taskDescriptionBuilder.withStep("UPLOAD", "upload installer", uploadInstaller) .withStep("INSTALL", "install smartstor", install); if (StringUtils.isNotEmpty(command.getOpensmParameters())) { Runnable configOpensm = () -> configOpensm(command.getAddress(), command.getOpensmParameters()); taskDescriptionBuilder.withStep("CONFIG", "config opensm", configOpensm); } taskDescriptionBuilder.withStep("REGIST", "regist host", () -> registHost(command)) .withStep("INSTALL", "install agent", hostService::installAgent); boolean isLocalHost = (new LocalNetworkInterface()).isLocalIp(command.getAddress()); if (!isLocalHost) { taskDescriptionBuilder.withStep("REBOOT", "restart host", () -> restartHost(command)); taskDescriptionBuilder.withStep("CHECK", "check host", () -> checkHost(command)); } return taskDescriptionBuilder.build(); } private void configNetwork(String serviceIp, String networkParameters) { uploadScripts(serviceIp, "scripts/if_config.py"); doCommandAndWaitForComplete(serviceIp, "cd ./scripts && python ./if_config.py"); } private void configOpensm(String serviceIp, String opensmParameters) { uploadScripts(serviceIp, "scripts/opensm_config.py", "scripts/opensm_config.sh"); doCommandAndWaitForComplete(serviceIp, "cd ./scripts && python ./opensm_config.py"); } private void registHost(SmartstorDeployCommand command) { HostInitDto hostInitDto = new HostInitDto(); hostInitDto.setListenIp(command.getAddress()); hostInitDto.setSshPort(command.getPort()); hostInitDto.setSysUsername(command.getUsername()); hostInitDto.setSysPassword(command.getPassword()); hostInitDto.setIpmiAddress(command.getIpmiAddress()); hostInitDto.setIpmiUsername(command.getIpmiUsername()); hostInitDto.setIpmiPassword(command.getIpmiPassword()); hostInitDto.setSize(command.getSize()); hostService.registHost(hostInitDto); } private void restartHost(RemoteHostCommand remoteHostCommand) { String command = "echo 'reboot host' && reboot"; ShellExecuteEvent shellExecuteEvent = (message) -> { TaskContext.currentTaskContext().getCurrentStep().appendLog(message); }; doRemoteCommand(remoteHostCommand.toTargetHost(), command, shellExecuteEvent); } private void checkHost(RemoteHostCommand remoteHostCommand) { String command = "echo 'reboot host success'"; int retryTimes = 10; int sleepSeconds = 30; AtomicInteger retriedTimes = new AtomicInteger(0); Callable<Boolean> callable = () -> { int value = retriedTimes.incrementAndGet(); String progress = String.format("%s/%s", value, retryTimes); TaskContext.currentTaskContext().getCurrentStep().appendLog("check host status... " + progress); doRemoteCommand(remoteHostCommand.toTargetHost(), command, null); return true; }; Predicate<Boolean> predicate = v -> !Objects.equals(Boolean.TRUE, v); try { TimeUnit.SECONDS.sleep(sleepSeconds); RetryUtils.retryForExceptionAndResult(callable, predicate, retryTimes, sleepSeconds); } catch (InterruptedException | ExecutionException | RetryException err) { throw new RuntimeException("check host status failed", err); } TaskContext.currentTaskContext().getCurrentStep().appendLog("check host status success"); } private void doRemoteCommand(TargetHost targetHost, String command, ShellExecuteEvent shellExecuteEvent) { try { ShellExecute shellExecutor = new ShellExecute(targetHost); shellExecutor.setExecuteEvent(shellExecuteEvent); shellExecutor.run(command); } catch (Exception err) { throw new RuntimeException(err); } } }
[ "qingwen_wang@pbdata.com.cn" ]
qingwen_wang@pbdata.com.cn
70537fd91bbcde099d84ce9125239900e1beb3bc
1401c8a5092d43c85ab42891951810a22662b0eb
/src/main/java/org/bian/dto/CRCardPOSNetworkOperatingSessionControlInputModel.java
a5598891571ad5c0e7ac6eca9ea39f8f6967e81d
[ "Apache-2.0" ]
permissive
bianapis/sd-card-terminal-operation-v2.0
f30102a9582b3051a892edf9e6625f2532861f9d
ce7e06821fbfd9aba1e7e9cfeb06a0cb6c5e34cc
refs/heads/master
2020-07-11T05:08:16.317234
2019-09-02T10:04:36
2019-09-02T10:04:36
204,451,928
0
0
null
null
null
null
UTF-8
Java
false
false
3,568
java
package org.bian.dto; import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonCreator; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import org.bian.dto.CRCardPOSNetworkOperatingSessionControlInputModelCardPOSNetworkOperatingSessionControlActionRequest; import javax.validation.Valid; /** * CRCardPOSNetworkOperatingSessionControlInputModel */ public class CRCardPOSNetworkOperatingSessionControlInputModel { private String cardTerminalOperationServicingSessionReference = null; private String cardPOSNetworkOperatingSessionInstanceReference = null; private Object cardPOSNetworkOperatingSessionControlActionTaskRecord = null; private CRCardPOSNetworkOperatingSessionControlInputModelCardPOSNetworkOperatingSessionControlActionRequest cardPOSNetworkOperatingSessionControlActionRequest = null; /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the active servicing session * @return cardTerminalOperationServicingSessionReference **/ public String getCardTerminalOperationServicingSessionReference() { return cardTerminalOperationServicingSessionReference; } public void setCardTerminalOperationServicingSessionReference(String cardTerminalOperationServicingSessionReference) { this.cardTerminalOperationServicingSessionReference = cardTerminalOperationServicingSessionReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::ISO20022andUNCEFACT::Identifier general-info: Reference to the Card POS Network Operating Session instance * @return cardPOSNetworkOperatingSessionInstanceReference **/ public String getCardPOSNetworkOperatingSessionInstanceReference() { return cardPOSNetworkOperatingSessionInstanceReference; } public void setCardPOSNetworkOperatingSessionInstanceReference(String cardPOSNetworkOperatingSessionInstanceReference) { this.cardPOSNetworkOperatingSessionInstanceReference = cardPOSNetworkOperatingSessionInstanceReference; } /** * `status: Not Mapped` core-data-type-reference: BIAN::DataTypesLibrary::CoreDataTypes::UNCEFACT::Binary general-info: The processing control service call consolidated processing record * @return cardPOSNetworkOperatingSessionControlActionTaskRecord **/ public Object getCardPOSNetworkOperatingSessionControlActionTaskRecord() { return cardPOSNetworkOperatingSessionControlActionTaskRecord; } public void setCardPOSNetworkOperatingSessionControlActionTaskRecord(Object cardPOSNetworkOperatingSessionControlActionTaskRecord) { this.cardPOSNetworkOperatingSessionControlActionTaskRecord = cardPOSNetworkOperatingSessionControlActionTaskRecord; } /** * Get cardPOSNetworkOperatingSessionControlActionRequest * @return cardPOSNetworkOperatingSessionControlActionRequest **/ public CRCardPOSNetworkOperatingSessionControlInputModelCardPOSNetworkOperatingSessionControlActionRequest getCardPOSNetworkOperatingSessionControlActionRequest() { return cardPOSNetworkOperatingSessionControlActionRequest; } public void setCardPOSNetworkOperatingSessionControlActionRequest(CRCardPOSNetworkOperatingSessionControlInputModelCardPOSNetworkOperatingSessionControlActionRequest cardPOSNetworkOperatingSessionControlActionRequest) { this.cardPOSNetworkOperatingSessionControlActionRequest = cardPOSNetworkOperatingSessionControlActionRequest; } }
[ "team1@bian.org" ]
team1@bian.org
4f6c55ffd83dcc60ac5ee956538426b3ba92a96d
dd90264bbfb79700d1d32effc207b555c29f3bcf
/springcloudeserver/spring-cloud-config/spring-cloud-config-client/src/test/java/org/springframework/cloud/config/client/DiscoveryClientConfigServiceBootstrapConfigurationTests.java
60ba9e34571c3b79cf3011cb711be6292ad7637e
[ "Apache-2.0", "LicenseRef-scancode-generic-cla" ]
permissive
tomzhang/other_workplace
8cead3feda7e9f067412da8252d83da56a000b51
9b5beaf4ed3586e6037bd84968c6a407a8635e16
refs/heads/master
2020-04-22T22:18:23.913665
2019-01-26T03:36:19
2019-01-26T03:36:19
170,703,419
1
0
null
2019-02-14T14:23:21
2019-02-14T14:23:20
null
UTF-8
Java
false
false
5,693
java
/* * Copyright 2013-2014 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.cloud.config.client; import org.junit.Test; import org.springframework.cloud.client.DefaultServiceInstance; import org.springframework.cloud.client.discovery.DiscoveryClient; import org.springframework.cloud.client.discovery.event.HeartbeatEvent; import org.springframework.context.annotation.AnnotationConfigApplicationContext; import static org.junit.Assert.assertEquals; /** * @author Dave Syer */ public class DiscoveryClientConfigServiceBootstrapConfigurationTests extends BaseDiscoveryClientConfigServiceBootstrapConfigurationTests { @Test public void offByDefault() throws Exception { this.context = new AnnotationConfigApplicationContext( DiscoveryClientConfigServiceBootstrapConfiguration.class); assertEquals(0, this.context.getBeanNamesForType(DiscoveryClient.class).length); assertEquals(0, this.context.getBeanNamesForType( DiscoveryClientConfigServiceBootstrapConfiguration.class).length); } @Test public void onWhenRequested() throws Exception { givenDiscoveryClientReturnsInfo(); setup("spring.cloud.config.discovery.enabled=true"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); verifyDiscoveryClientCalledOnce(); expectConfigClientPropertiesHasConfigurationFromEureka(); } @Test public void onWhenHeartbeat() throws Exception { setup("spring.cloud.config.discovery.enabled=true"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); givenDiscoveryClientReturnsInfo(); verifyDiscoveryClientCalledOnce(); context.publishEvent(new HeartbeatEvent(context, "new")); expectConfigClientPropertiesHasConfigurationFromEureka(); } @Test public void secureWhenRequested() throws Exception { this.info = new DefaultServiceInstance("app", "foo", 443, true); givenDiscoveryClientReturnsInfo(); setup("spring.cloud.config.discovery.enabled=true"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); verifyDiscoveryClientCalledOnce(); expectConfigClientPropertiesHasConfiguration("https://foo:443/"); } @Test public void setsPasssword() throws Exception { this.info.getMetadata().put("password", "bar"); givenDiscoveryClientReturnsInfo(); setup("spring.cloud.config.discovery.enabled=true"); ConfigClientProperties locator = this.context .getBean(ConfigClientProperties.class); assertEquals("http://foo:8877/", locator.getRawUri()); assertEquals("bar", locator.getPassword()); assertEquals("user", locator.getUsername()); } @Test public void setsPath() throws Exception { this.info.getMetadata().put("configPath", "/bar"); givenDiscoveryClientReturnsInfo(); setup("spring.cloud.config.discovery.enabled=true"); expectConfigClientPropertiesHasConfiguration("http://foo:8877/bar"); } @Test public void shouldFailGetConfigServerInstanceFromDiscoveryClient() throws Exception { givenDiscoveryClientReturnsNoInfo(); setup("spring.cloud.config.discovery.enabled=true"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); verifyDiscoveryClientCalledOnce(); expectConfigClientPropertiesHasDefaultConfiguration(); } @Test public void shouldRetryAndSucceedGetConfigServerInstanceFromDiscoveryClient() throws Exception { givenDiscoveryClientReturnsInfoOnThirdTry(); setup("spring.cloud.config.discovery.enabled=true", "spring.cloud.config.retry.maxAttempts=3", "spring.cloud.config.retry.initialInterval=10", "spring.cloud.config.fail-fast=true"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); verifyDiscoveryClientCalledThreeTimes(); context.publishEvent(new HeartbeatEvent(context, "new")); expectConfigClientPropertiesHasConfigurationFromEureka(); } @Test public void shouldNotRetryIfNotFailFastPropertySet() throws Exception { givenDiscoveryClientReturnsInfoOnThirdTry(); setup("spring.cloud.config.discovery.enabled=true", "spring.cloud.config.retry.maxAttempts=3", "spring.cloud.config.retry.initialInterval=10"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); verifyDiscoveryClientCalledOnce(); expectConfigClientPropertiesHasDefaultConfiguration(); } @Test public void shouldRetryAndFailWithExceptionGetConfigServerInstanceFromDiscoveryClient() throws Exception { givenDiscoveryClientReturnsNoInfo(); expectNoInstancesOfConfigServerException(); setup("spring.cloud.config.discovery.enabled=true", "spring.cloud.config.retry.maxAttempts=3", "spring.cloud.config.retry.initialInterval=10", "spring.cloud.config.fail-fast=true"); } @Test public void shouldRetryAndFailWithMessageGetConfigServerInstanceFromDiscoveryClient() throws Exception { givenDiscoveryClientReturnsNoInfo(); setup("spring.cloud.config.discovery.enabled=true", "spring.cloud.config.retry.maxAttempts=3", "spring.cloud.config.retry.initialInterval=10", "spring.cloud.config.fail-fast=false"); expectDiscoveryClientConfigServiceBootstrapConfigurationIsSetup(); expectConfigClientPropertiesHasDefaultConfiguration(); } }
[ "Pj879227577" ]
Pj879227577
e00d66f1aa91ce88ae9d628a80d01ca4b18c5e51
ca030864a3a1c24be6b9d1802c2353da4ca0d441
/classes2.dex_source_from_JADX/com/facebook/video/abtest/SourceType.java
6ab2ff8d4bda564c2075dd16d2cfddd95c53c2d6
[]
no_license
pxson001/facebook-app
87aa51e29195eeaae69adeb30219547f83a5b7b1
640630f078980f9818049625ebc42569c67c69f7
refs/heads/master
2020-04-07T20:36:45.758523
2018-03-07T09:04:57
2018-03-07T09:04:57
124,208,458
4
0
null
null
null
null
UTF-8
Java
false
false
390
java
package com.facebook.video.abtest; /* compiled from: response_number_on_body */ public enum SourceType { HTTP, HTTP_1RT_INTERCEPTING; public static SourceType of(String str) { for (SourceType sourceType : values()) { if (sourceType.toString().equalsIgnoreCase(str)) { return sourceType; } } return HTTP; } }
[ "son.pham@jmango360.com" ]
son.pham@jmango360.com
0752abc8f21c25cd5aaa751ae10c80402628713f
ba774ed31ba5e0fc0fdc074ba5310f09becb370f
/src/main/java/io/github/jhipster/application/ApplicationWebXml.java
12a23031386ccdc4ac5f905f37830118fc3d713a
[]
no_license
abdesslem/library
b7c9d4301608cceeb6f47f62f4dc8a6fd6d9e96c
9df431a9da6c1ec9179b16811a2e19d346eab795
refs/heads/master
2020-03-17T01:35:10.699098
2018-05-12T15:38:47
2018-05-12T15:38:47
133,159,229
0
0
null
2018-05-12T15:38:48
2018-05-12T15:36:12
Java
UTF-8
Java
false
false
843
java
package io.github.jhipster.application; import io.github.jhipster.application.config.DefaultProfileUtil; import org.springframework.boot.builder.SpringApplicationBuilder; import org.springframework.boot.web.support.SpringBootServletInitializer; /** * This is a helper Java class that provides an alternative to creating a web.xml. * This will be invoked only when the application is deployed to a servlet container like Tomcat, JBoss etc. */ public class ApplicationWebXml extends SpringBootServletInitializer { @Override protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { /** * set a default to use when no profile is configured. */ DefaultProfileUtil.addDefaultProfile(application.application()); return application.sources(LibraryApp.class); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
d8297072896552008d328e7e046151543b6f460e
97401e885b3ce4fa4d240c4fca1810d38d947df9
/common/src/main/java/site/binghai/pi/common/utils/TimeFormat.java
5fb84e440e92a685c3718747b3b7f37e93622d28
[]
no_license
IceSeaOnly/raspberry
9db7d4e6de1088b2b29c59671ef93eb5716f2f15
9ba21982c073e89030c3d60e9c3464cd23d7f288
refs/heads/master
2021-09-03T13:47:02.025112
2018-01-09T14:16:53
2018-01-09T14:16:53
113,580,764
0
1
null
null
null
null
UTF-8
Java
false
false
4,342
java
package site.binghai.pi.common.utils; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.SimpleTimeZone; /** * Created by Administrator on 2016/10/5. */ public class TimeFormat { public static String format(Date date){ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return df.format(date); } public static String format(Long date){ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); return df.format(date); } public static String onlyTime(Long date){ SimpleDateFormat df = new SimpleDateFormat("HH:mm:ss"); return df.format(date); } public static String format2yyyy_MM_dd(Long date){ SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); return df.format(date); } public static Long data2Timestamp(String yyyy_MM_dd){ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); Date date = null; try { date = format.parse(yyyy_MM_dd); } catch (ParseException e) { e.printStackTrace(); } return date.getTime(); } public static Long data2Timestamp(int year,int month,int day){ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); String time = year+"-"+month+"-"+day; Date date = null; try { date = format.parse(time); } catch (ParseException e) { e.printStackTrace(); } return date.getTime(); } public static int getThisYear(Long null_ts) { SimpleDateFormat df = new SimpleDateFormat("yyyy"); return Integer.parseInt(df.format(null_ts==null?System.currentTimeMillis():null_ts)); } public static int getThisMonth(Long null_ts) { SimpleDateFormat df = new SimpleDateFormat("MM"); return Integer.parseInt(df.format(null_ts==null?System.currentTimeMillis():null_ts)); } public static int getThisDay(Long null_ts) { SimpleDateFormat df = new SimpleDateFormat("dd"); return Integer.parseInt(df.format(null_ts==null?System.currentTimeMillis():null_ts)); } //获得当天0点时间 public static Long getTimesmorning(){ Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY, 0); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTimeInMillis(); } //获得当天24点时间 public static Long getTimesnight(){ Calendar cal = Calendar.getInstance(); cal.set(Calendar.HOUR_OF_DAY, 24); cal.set(Calendar.SECOND, 0); cal.set(Calendar.MINUTE, 0); cal.set(Calendar.MILLISECOND, 0); return cal.getTimeInMillis(); } //获得本周一0点时间 public static Long getTimesWeekmorning(){ Calendar cal = Calendar.getInstance(); cal.set(cal.get(Calendar.YEAR),cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0,0); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); return cal.getTimeInMillis(); } //获得本周日24点时间 public static Long getTimesWeeknight(){ Calendar cal = Calendar.getInstance(); cal.set(cal.get(Calendar.YEAR),cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0,0); cal.set(Calendar.DAY_OF_WEEK, Calendar.MONDAY); return cal.getTime().getTime()+ (7 * 24 * 60 * 60 * 1000); } //获得本月第一天0点时间 public static Long getTimesMonthmorning(){ Calendar cal = Calendar.getInstance(); cal.set(cal.get(Calendar.YEAR),cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0,0); cal.set(Calendar.DAY_OF_MONTH,cal.getActualMinimum(Calendar.DAY_OF_MONTH)); return cal.getTimeInMillis(); } //获得本月最后一天24点时间 public static Long getTimesMonthnight(){ Calendar cal = Calendar.getInstance(); cal.set(cal.get(Calendar.YEAR),cal.get(Calendar.MONDAY), cal.get(Calendar.DAY_OF_MONTH), 0, 0,0); cal.set(Calendar.DAY_OF_MONTH,cal.getActualMaximum(Calendar.DAY_OF_MONTH)); cal.set(Calendar.HOUR_OF_DAY, 24); return cal.getTimeInMillis(); } }
[ "1041414957@qq.com" ]
1041414957@qq.com
90f2d412a3d9d5796643046a0d2381d58eaebcd4
16a7a5d045e8f4bdea837fe3fb3607d7e6b68f13
/module1/src/modifiers/PrivateEx1.java
9a55d9fc1454b95f6345d7e645ecfc99694b5909
[]
no_license
Pratik-Singh786/new_core_java
2d19cf74c629b70a3400a26000a30e6396b03f4a
6fa7186cd5f60d7030e95b4030e15800ee19b045
refs/heads/main
2023-09-03T07:44:12.908410
2021-11-20T13:22:08
2021-11-20T13:22:08
430,109,672
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
package modifiers; class Sem { private int data=50; private void msg() { System.out.println("hi developers"); } } public class PrivateEx1 { public static void main(String[] args) { Sem s=new Sem(); // s.data; // s,.msg(); } }
[ "pratik.rxl@gmail.com" ]
pratik.rxl@gmail.com
c96d9907e4c9eb8772a2791bc70c2d73b12a8d8b
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE606_Unchecked_Loop_Condition/CWE606_Unchecked_Loop_Condition__URLConnection_53d.java
4aa06e7d08b0c3958f109b24aa168e8ed1341588
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
2,793
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE606_Unchecked_Loop_Condition__URLConnection_53d.java Label Definition File: CWE606_Unchecked_Loop_Condition.label.xml Template File: sources-sinks-53d.tmpl.java */ /* * @description * CWE: 606 Unchecked Input for Loop Condition * BadSource: URLConnection Read data from a web server with URLConnection * GoodSource: hardcoded int in string form * Sinks: * GoodSink: validate loop variable * BadSink : loop variable not validated * Flow Variant: 53 Data flow: data passed as an argument from one method through two others to a fourth; all four functions are in different classes in the same package * * */ package testcases.CWE606_Unchecked_Loop_Condition; import testcasesupport.*; import javax.servlet.http.*; public class CWE606_Unchecked_Loop_Condition__URLConnection_53d { public void badSink(String data ) throws Throwable { int numberOfLoops; try { numberOfLoops = Integer.parseInt(data); } catch (NumberFormatException exceptNumberFormat) { IO.writeLine("Invalid response. Numeric input expected. Assuming 1."); numberOfLoops = 1; } for (int i=0; i < numberOfLoops; i++) { /* POTENTIAL FLAW: user supplied input used for loop counter test */ IO.writeLine("hello world"); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(String data ) throws Throwable { int numberOfLoops; try { numberOfLoops = Integer.parseInt(data); } catch (NumberFormatException exceptNumberFormat) { IO.writeLine("Invalid response. Numeric input expected. Assuming 1."); numberOfLoops = 1; } for (int i=0; i < numberOfLoops; i++) { /* POTENTIAL FLAW: user supplied input used for loop counter test */ IO.writeLine("hello world"); } } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(String data ) throws Throwable { int numberOfLoops; try { numberOfLoops = Integer.parseInt(data); } catch (NumberFormatException exceptNumberFormat) { IO.writeLine("Invalid response. Numeric input expected. Assuming 1."); numberOfLoops = 1; } /* FIX: loop number thresholds validated */ if (numberOfLoops >= 0 && numberOfLoops <= 5) { for (int i=0; i < numberOfLoops; i++) { IO.writeLine("hello world"); } } } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
9944f3fc86f403d351ac9b082a5b045b077919db
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/baike/sources/android/support/v4/content/pm/ShortcutInfoCompat.java
636ac5b3272cfd092511cd5779984eb711005ae5
[]
no_license
aheadlcx/analyzeApk
050b261595cecc85790558a02d79739a789ae3a3
25cecc394dde4ed7d4971baf0e9504dcb7fabaca
refs/heads/master
2020-03-10T10:24:49.773318
2018-04-13T09:44:45
2018-04-13T09:44:45
129,332,351
6
2
null
null
null
null
UTF-8
Java
false
false
4,058
java
package android.support.v4.content.pm; import android.content.ComponentName; import android.content.Context; import android.content.Intent; import android.content.pm.ShortcutInfo; import android.support.annotation.NonNull; import android.support.annotation.Nullable; import android.support.annotation.RequiresApi; import android.support.v4.graphics.drawable.IconCompat; import android.text.TextUtils; import java.util.Arrays; public class ShortcutInfoCompat { private Context a; private String b; private Intent[] c; private ComponentName d; private CharSequence e; private CharSequence f; private CharSequence g; private IconCompat h; public static class Builder { private final ShortcutInfoCompat a = new ShortcutInfoCompat(); public Builder(@NonNull Context context, @NonNull String str) { this.a.a = context; this.a.b = str; } @NonNull public Builder setShortLabel(@NonNull CharSequence charSequence) { this.a.e = charSequence; return this; } @NonNull public Builder setLongLabel(@NonNull CharSequence charSequence) { this.a.f = charSequence; return this; } @NonNull public Builder setDisabledMessage(@NonNull CharSequence charSequence) { this.a.g = charSequence; return this; } @NonNull public Builder setIntent(@NonNull Intent intent) { return setIntents(new Intent[]{intent}); } @NonNull public Builder setIntents(@NonNull Intent[] intentArr) { this.a.c = intentArr; return this; } @NonNull public Builder setIcon(IconCompat iconCompat) { this.a.h = iconCompat; return this; } @NonNull public Builder setActivity(@NonNull ComponentName componentName) { this.a.d = componentName; return this; } @NonNull public ShortcutInfoCompat build() { if (TextUtils.isEmpty(this.a.e)) { throw new IllegalArgumentException("Shortcut much have a non-empty label"); } else if (this.a.c != null && this.a.c.length != 0) { return this.a; } else { throw new IllegalArgumentException("Shortcut much have an intent"); } } } private ShortcutInfoCompat() { } @RequiresApi(25) public ShortcutInfo toShortcutInfo() { android.content.pm.ShortcutInfo.Builder intents = new android.content.pm.ShortcutInfo.Builder(this.a, this.b).setShortLabel(this.e).setIntents(this.c); if (this.h != null) { intents.setIcon(this.h.toIcon()); } if (!TextUtils.isEmpty(this.f)) { intents.setLongLabel(this.f); } if (!TextUtils.isEmpty(this.g)) { intents.setDisabledMessage(this.g); } if (this.d != null) { intents.setActivity(this.d); } return intents.build(); } Intent a(Intent intent) { intent.putExtra("android.intent.extra.shortcut.INTENT", this.c[this.c.length - 1]).putExtra("android.intent.extra.shortcut.NAME", this.e.toString()); if (this.h != null) { this.h.addToShortcutIntent(intent); } return intent; } @NonNull public String getId() { return this.b; } @Nullable public ComponentName getActivity() { return this.d; } @NonNull public CharSequence getShortLabel() { return this.e; } @Nullable public CharSequence getLongLabel() { return this.f; } @Nullable public CharSequence getDisabledMessage() { return this.g; } @NonNull public Intent getIntent() { return this.c[this.c.length - 1]; } @NonNull public Intent[] getIntents() { return (Intent[]) Arrays.copyOf(this.c, this.c.length); } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
ab7bf6a1915d4b9c1f3674857fce2dc38f4ec575
cf68734be7eb2e420b73d780715c5885d479fcec
/cachelibrary/src/main/java/com/lh/cachelibrary/cache/DiskCache.java
c7edf49aef21607e4ee142b8b0bb29f4ffdddc5d
[]
no_license
lh123/RxCache
c3355db3c289eab38456aef24a1b628fdbf6e425
598140786e60b65e5978be0b9c7b33134daf993e
refs/heads/master
2021-01-13T12:27:21.283651
2017-01-24T12:35:31
2017-01-24T12:35:31
78,550,314
0
1
null
null
null
null
UTF-8
Java
false
false
3,083
java
package com.lh.cachelibrary.cache; import com.jakewharton.disklrucache.DiskLruCache; import com.lh.cachelibrary.convert.DiskConverter; import com.lh.cachelibrary.utils.Utils; import java.io.File; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.lang.reflect.Type; /** * Created by home on 2017/1/10. * 磁盘缓存类 */ class DiskCache implements ICache { private DiskLruCache mCache; private DiskConverter mConvert; DiskCache(DiskConverter diskConverter, File directory, int appVersion, int valueCount, long maxSize) { mConvert = diskConverter; try { mCache = DiskLruCache.open(directory, appVersion, valueCount, maxSize); } catch (IOException e) { e.printStackTrace(); } } @Override public Object load(String key, Type type) { if (mCache == null) { return null; } Object result = null; InputStream inputStream = null; try { DiskLruCache.Snapshot snapshot = mCache.get(key); if (snapshot == null) { return null; } inputStream = snapshot.getInputStream(0); result = mConvert.load(inputStream, type); } catch (IOException e) { e.printStackTrace(); } finally { Utils.closeStream(inputStream); } return result; } @Override public boolean save(String key, Object data) { if (mCache == null) { return false; } boolean success = false; OutputStream outputStream = null; DiskLruCache.Editor editor = null; try { editor = mCache.edit(key); if (editor != null) { outputStream = editor.newOutputStream(0); success = mConvert.save(outputStream, data); } } catch (IOException e) { e.printStackTrace(); } finally { if (editor != null) { try { editor.commit(); } catch (IOException e) { e.printStackTrace(); } } Utils.closeStream(outputStream); } return success; } @Override public boolean containKey(String key) { if (mCache == null) { return false; } try { return mCache.get(key) != null; } catch (IOException e) { e.printStackTrace(); } return false; } @Override public boolean remove(String key) { if (mCache == null) { return false; } try { return mCache.remove(key); } catch (IOException e) { e.printStackTrace(); } return false; } @Override public void clear() { if (mCache == null) { return; } try { mCache.delete(); } catch (IOException e) { e.printStackTrace(); } } }
[ "1585086582@qq.com" ]
1585086582@qq.com
be7f7cfe86d14918a137456db9262dc00b5897bd
8390af244cb9aaba8cfb4057193b1c6dd6958523
/sp2p_sjzyj.core/app/daos/core/BidItemSupervisorDao.java
a439e3a24948683d681efa3d2dd11e09ab2dcebb
[ "MIT" ]
permissive
P79N6A/oyph
05944951675b7d4a8753b9d8ae86f800871cccd4
2dbdf779d5151e7bab4b3c8e8ba4256aad93d1fa
refs/heads/master
2020-04-24T01:50:47.339443
2019-02-20T06:21:25
2019-02-20T06:21:25
171,614,668
0
1
null
null
null
null
UTF-8
Java
false
false
1,931
java
package daos.core; import java.util.HashMap; import java.util.List; import java.util.Map; import models.core.entity.t_bid_item_supervisor; import daos.base.BaseDao; /** * 管理员上传审核科目资料DAO * * @description * * @author yaoyi * @createDate 2016年3月7日 */ public class BidItemSupervisorDao extends BaseDao<t_bid_item_supervisor> { protected BidItemSupervisorDao(){} /** * 管理员删除审核科目资料 * * @param bidItemSupervisorId 管理员上传审核科目表id * @return * * @author yaoyi * @createDate 2016年1月19日 */ public int delBidItemSupervisor(long bidItemSupervisorId) { return super.delete(bidItemSupervisorId); } /** * 查询这个标的这个科目下传的审核资料 * * @param bid_id 标的id * @param bid_audit_subject_id 审核科目资料id * @return * * @author yaoyi * @createDate 2016年1月19日 */ public List<t_bid_item_supervisor> queryBidItemSupervisor(long bid_id, long bid_audit_subject_id){ String sql = "SELECT * FROM t_bid_item_supervisor WHERE bid_id=:bid_id AND bid_audit_subject_id=:bid_audit_subject_id"; Map<String, Object>params = new HashMap<String, Object>(); params.put("bid_id", bid_id); params.put("bid_audit_subject_id", bid_audit_subject_id); return super.findListBySQL(sql, params); } /*** * 查询借款标审核详情图片(OPT=335) * * @param bidId * @param auditId * @return * @description * * @author liuyang * @createDate 2017-12-1 */ public List<Map<String, Object>> listOfAuditItems(long bidId, long auditId){ String sql = " SELECT url AS url FROM t_bid_item_supervisor WHERE bid_id =:bidId AND bid_audit_subject_id =:auditId "; Map<String, Object>conditionArgs = new HashMap<String, Object>(); conditionArgs.put("bidId", bidId); conditionArgs.put("auditId", auditId); return findListMapBySQL(sql, conditionArgs); } }
[ "liujiayiii@qq.com" ]
liujiayiii@qq.com
cfc9a33a307c8d547c2f62540e19a155a821b4c1
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_8bd0745e024578f833491351f5a934cf0f89d865/AtomicFileWriter/29_8bd0745e024578f833491351f5a934cf0f89d865_AtomicFileWriter_t.java
eed9c61f9662c42ee4419ab05e0a97cd5c21f01f
[]
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,702
java
/* * The MIT License * * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi * * 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 hudson.util; import java.io.BufferedWriter; import java.io.File; import java.io.FileOutputStream; import java.io.FileWriter; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.nio.charset.Charset; /** * Buffered {@link FileWriter} that uses UTF-8. * * <p> * The write operation is atomic when used for overwriting; * it either leaves the original file intact, or it completely rewrites it with new contents. * * @author Kohsuke Kawaguchi */ public class AtomicFileWriter extends Writer { private final Writer core; private final File tmpFile; private final File destFile; /** * Writes with UTF-8 encoding. */ public AtomicFileWriter(File f) throws IOException { this(f,"UTF-8"); } /** * @param encoding * File encoding to write. If null, platform default encoding is chosen. */ public AtomicFileWriter(File f, String encoding) throws IOException { tmpFile = File.createTempFile("atomic",null,f.getParentFile()); destFile = f; if (encoding==null) encoding = Charset.defaultCharset().name(); core = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(tmpFile),encoding)); } public void write(int c) throws IOException { core.write(c); } public void write(String str, int off, int len) throws IOException { core.write(str,off,len); } public void write(char cbuf[], int off, int len) throws IOException { core.write(cbuf,off,len); } public void flush() throws IOException { core.flush(); } public void close() throws IOException { core.close(); } /** * When the write operation failed and you'd like to leave the original file intact, * you can optionally call this method to clean up a temporary file that was created by this writer. */ public void abort() throws IOException { core.close(); tmpFile.delete(); } public void commit() throws IOException { close(); if(destFile.exists() && !destFile.delete()) throw new IOException("Unable to delete "+destFile); tmpFile.renameTo(destFile); } /** * Until the data is committed, this file captures * the written content. */ public File getTemporaryFile() { return tmpFile; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
4ae69964bb2744e66aa3b931d99cba9df8377cac
ec402c906ef17bab974d2839e32f4d58fd16d01b
/src/main/java/xyz/phanta/tconevo/coremod/TransformThaumVisDiscount.java
10c5e4db67823b1f48d1110391a1bd34db2fbe8f
[ "JSON" ]
permissive
ChromaPIE/tinkers-evolution
0dbabb1485360d14f3af77eb79fdc0d3e4f2b8c8
105726f99c1fc1064e6796ec52ed71a848ebd9e7
refs/heads/1.12.2
2023-04-04T05:57:59.815359
2021-04-18T02:25:31
2021-04-18T02:25:31
276,710,864
0
0
NOASSERTION
2021-04-18T02:07:47
2020-07-02T17:45:53
Java
UTF-8
Java
false
false
2,558
java
package xyz.phanta.tconevo.coremod; import org.objectweb.asm.ClassVisitor; import org.objectweb.asm.Label; import org.objectweb.asm.MethodVisitor; import org.objectweb.asm.Opcodes; import javax.annotation.Nullable; import java.util.function.Consumer; public class TransformThaumVisDiscount implements TconEvoClassTransformer.Transform { @Override public String getName() { return "Thaumcraft Vis Discount"; } @Override public void getClasses(Consumer<String> collector) { collector.accept("thaumcraft.common.items.casters.CasterManager"); } @Override public ClassVisitor createTransformer(String className, int apiVersion, ClassVisitor downstream) { return new ClassTransformerCasterManager(apiVersion, downstream); } private static class ClassTransformerCasterManager extends ClassVisitor { public ClassTransformerCasterManager(int api, ClassVisitor cv) { super(api, cv); } @Override public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) { if (name.equals("getTotalVisDiscount") && desc.equals("(Lnet/minecraft/entity/player/EntityPlayer;)F")) { return new MethodTransformerGetTotalVisDiscount(api, super.visitMethod(access, name, desc, signature, exceptions)); } return super.visitMethod(access, name, desc, signature, exceptions); } } private static class MethodTransformerGetTotalVisDiscount extends MethodVisitor { @Nullable private Label elseLabel = null; public MethodTransformerGetTotalVisDiscount(int api, MethodVisitor mv) { super(api, mv); } @Override public void visitJumpInsn(int opcode, Label label) { super.visitJumpInsn(opcode, label); if (elseLabel == null && opcode == Opcodes.IFNONNULL) { elseLabel = label; } } @Override public void visitLabel(Label label) { super.visitLabel(label); if (label.equals(elseLabel)) { super.visitVarInsn(Opcodes.ALOAD, 0); super.visitMethodInsn(Opcodes.INVOKESTATIC, "xyz/phanta/tconevo/integration/thaumcraft/VisDiscountCoreHooks", "getVisDiscount", "(Lnet/minecraft/entity/player/EntityPlayer;)I", false); super.visitVarInsn(Opcodes.ISTORE, 1); } } } }
[ "evandalong@gmail.com" ]
evandalong@gmail.com
779c480c2d651d4654222bf5fa137cd3f6ffc89a
5dd3daa15726c0c0782a630104a4a9a883ee2f72
/2.JavaCore/src/com/javarush/task/task18/task1805/Solution.java
6110157795dc6b6e690baccdb7d9ecfe2df0e032
[]
no_license
TigranMonte/JavaRushTasks
3476c9b2396cf333f7807ffa6bfbb27a07bffb15
7a945d80745c153badbcbe1a4ab0acc407789179
refs/heads/master
2023-06-16T00:01:40.513230
2021-07-10T20:08:11
2021-07-10T20:08:11
298,334,349
0
0
null
null
null
null
UTF-8
Java
false
false
760
java
package com.javarush.task.task18.task1805; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.InputStreamReader; import java.util.Set; import java.util.TreeSet; /* Сортировка байт */ public class Solution { public static void main(String[] args) throws Exception { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); FileInputStream inputStream = new FileInputStream(reader.readLine()); TreeSet <Integer> setSortBytes = new TreeSet<>(); while (inputStream.available()>0){ setSortBytes.add(inputStream.read()); } inputStream.close(); for (int value : setSortBytes) System.out.print(value + " "); } }
[ "tigranma@gmail.com" ]
tigranma@gmail.com
620ece71fe195af48e2c751fde080c1b01cec861
eacfc7cf6b777649e8e017bf2805f6099cb9385d
/APK Source/src/com/jirbo/airadc/SetCustomIDFunction.java
d7fdc5de8102cdd6eb8e52680b6d568b5f765fbc
[]
no_license
maartenpeels/WordonHD
8b171cfd085e1f23150162ea26ed6967945005e2
4d316eb33bc1286c4b8813c4afd478820040bf05
refs/heads/master
2021-03-27T16:51:40.569392
2017-06-12T13:32:51
2017-06-12T13:32:51
44,254,944
0
0
null
null
null
null
UTF-8
Java
false
false
1,265
java
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov. // Jad home page: http://www.geocities.com/kpdus/jad.html // Decompiler options: braces fieldsfirst space lnc package com.jirbo.airadc; import android.util.Log; import com.adobe.fre.FREContext; import com.adobe.fre.FREFunction; import com.adobe.fre.FREObject; import com.jirbo.adcolony.AdColony; // Referenced classes of package com.jirbo.airadc: // AirADCContext class SetCustomIDFunction implements FREFunction { public static final String KEY = "set_custom_id_function"; SetCustomIDFunction() { } public FREObject call(FREContext frecontext, FREObject afreobject[]) { frecontext = (AirADCContext)frecontext; frecontext.getClass(); Log.i("AdColonyANE", "SetCustomID"); try { AdColony.setCustomID(afreobject[0].getAsString()); afreobject = FREObject.newObject(true); } // Misplaced declaration of an exception variable catch (FREObject afreobject[]) { frecontext.getClass(); Log.i("AdColonyANE", afreobject.getMessage()); afreobject.printStackTrace(); return null; } return afreobject; } }
[ "maartenpeels1012@hotmail.com" ]
maartenpeels1012@hotmail.com
444a2f48615e002b90482e512ae4da5d90ca1545
4d976be36e1c14e6e32cb510631d20fc0efdd06e
/src/main/java/iowritebytes/ImageAssembler.java
8fdc4ad9f895c529271c971389b56f9daccde896
[]
no_license
Sztzoli/training-solutions
6c5c09667d6ba0cfe8fcfb4f047e595fcd160495
14bb30ff24c680af55c232509639a06a41bd925a
refs/heads/master
2023-03-26T15:37:11.223180
2021-03-16T14:38:19
2021-03-16T14:38:19
308,379,230
0
0
null
null
null
null
UTF-8
Java
false
false
648
java
package iowritebytes; import java.io.BufferedOutputStream; import java.io.IOException; import java.io.OutputStream; import java.nio.file.Files; import java.nio.file.Path; public class ImageAssembler { public void makeImageFile(byte[][] source, Path folder) { Path file = folder.resolve("image.png"); try (OutputStream outputStream = new BufferedOutputStream(Files.newOutputStream(file))){ for (int i = 0; i < source.length; i++) { outputStream.write(source[i]); } } catch (IOException ioe) { throw new IllegalStateException("can not write file"); } } }
[ "bezraat@gmail.com" ]
bezraat@gmail.com
9bcf6ca774cf302d555e85c02735e5850a6368ac
40d844c1c780cf3618979626282cf59be833907f
/src/testcases/CWE78_OS_Command_Injection/CWE78_OS_Command_Injection__Property_14.java
8bdeeff07b9e5524000d4596395e72fc7736ae66
[]
no_license
rubengomez97/juliet
f9566de7be198921113658f904b521b6bca4d262
13debb7a1cc801977b9371b8cc1a313cd1de3a0e
refs/heads/master
2023-06-02T00:37:24.532638
2021-06-23T17:22:22
2021-06-23T17:22:22
379,676,259
1
0
null
null
null
null
UTF-8
Java
false
false
4,303
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE78_OS_Command_Injection__Property_14.java Label Definition File: CWE78_OS_Command_Injection.label.xml Template File: sources-sink-14.tmpl.java */ /* * @description * CWE: 78 OS Command Injection * BadSource: Property Read data from a system property * GoodSource: A hardcoded string * BadSink: exec dynamic command execution with Runtime.getRuntime().exec() * Flow Variant: 14 Control flow: if(IO.staticFive==5) and if(IO.staticFive!=5) * * */ package testcases.CWE78_OS_Command_Injection; import testcasesupport.*; import javax.servlet.http.*; public class CWE78_OS_Command_Injection__Property_14 extends AbstractTestCase { /* uses badsource and badsink */ public void bad() throws Throwable { String data; if (IO.staticFive == 5) { /* get system property user.home */ /* POTENTIAL FLAW: Read data from a system property */ data = System.getProperty("user.home"); } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } String osCommand; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir "; } else { /* running on non-Windows */ osCommand = "/bin/ls "; } /* POTENTIAL FLAW: command injection */ Process process = Runtime.getRuntime().exec(osCommand + data); process.waitFor(); } /* goodG2B1() - use goodsource and badsink by changing IO.staticFive==5 to IO.staticFive!=5 */ private void goodG2B1() throws Throwable { String data; if (IO.staticFive != 5) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } else { /* FIX: Use a hardcoded string */ data = "foo"; } String osCommand; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir "; } else { /* running on non-Windows */ osCommand = "/bin/ls "; } /* POTENTIAL FLAW: command injection */ Process process = Runtime.getRuntime().exec(osCommand + data); process.waitFor(); } /* goodG2B2() - use goodsource and badsink by reversing statements in if */ private void goodG2B2() throws Throwable { String data; if (IO.staticFive == 5) { /* FIX: Use a hardcoded string */ data = "foo"; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = null; } String osCommand; if(System.getProperty("os.name").toLowerCase().indexOf("win") >= 0) { /* running on Windows */ osCommand = "c:\\WINDOWS\\SYSTEM32\\cmd.exe /c dir "; } else { /* running on non-Windows */ osCommand = "/bin/ls "; } /* POTENTIAL FLAW: command injection */ Process process = Runtime.getRuntime().exec(osCommand + data); process.waitFor(); } public void good() throws Throwable { goodG2B1(); goodG2B2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "you@example.com" ]
you@example.com
d59d94f2ab499757caaf465397d300f9a288fc37
be129fc37be31166da78660614fd6e3eba3edd56
/ms_web/Publish-app/publish-core/src.bak/PublishPageServiceImpl.java
ceb388b1d1a957915f3510172cd2a5628988dce2
[]
no_license
cckwzmc/myLearning
f82248cebdb23870b09ac6573ce2048b152eb1b2
977b6d6562fef0eb3967c338192eb0687520cf4c
refs/heads/master
2021-01-18T07:58:25.583071
2014-01-26T15:04:34
2014-01-26T15:04:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,267
java
package com.toney.publish.tpl.service; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.util.HashMap; import java.util.List; import java.util.Map; import org.slf4j.ext.XLogger; import org.slf4j.ext.XLoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.MessageSource; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer; import com.toney.commons.constants.CommonsConstants; import com.toney.dal.model.TemplateMappingModel; import com.toney.dal.service.DalMybatisManagerFactory; import com.toney.publish.exception.PublishException; import com.toney.publish.tpl.PublishContext; import freemarker.template.Configuration; import freemarker.template.Template; import freemarker.template.TemplateException; /** * @author toney.li 页面出版实现类。 */ @Service("publishPageService") @Transactional public class PublishPageServiceImpl implements PublishPageService { private static final XLogger logger = XLoggerFactory.getXLogger(PublishPageServiceImpl.class); @Autowired DalMybatisManagerFactory dalMybatisManagerFactory; @Override public void publishHomeIndex(PublishContext site) throws PublishException { List<TemplateMappingModel > mappingList = dalMybatisManagerFactory.getTemplateManagerFactory().getTemplateMappingDao().getAll(); // PublishUtils.getHomeIndexTemplatePath(tplRootPath,site,tplIndexPath,TPL_SITE_INDEX,TPL_SUFFIX); Map<String, Object> data = new HashMap<String, Object>(); try { String outFile = this.publishRootPath + "/index.html"; publish(outFile,"", data); } catch (IOException e) { logger.error("IO EXCEPTION", e); throw new PublishException("IO EXCEPTION", e); } catch (TemplateException e) { logger.error("TEMPLATE EXCEPTION", e); throw new PublishException("TEMPLATE EXCEPTION", e); } } @Transactional(readOnly = true) public void publish(String outFile, String tpl, Map<String, Object> data) throws IOException, TemplateException { File f = new File(outFile); File parent = f.getParentFile(); if (!parent.exists()) { parent.mkdirs(); } Writer out = null; try { // FileWriter不能指定编码确实是个问题,只能用这个代替了。 out = new OutputStreamWriter(new FileOutputStream(f), CommonsConstants.DEFAULT_CHAR_ENCODE); Template template = this.freeMarkerConfigurer.getTemplate(tpl); template.process(data, out); } finally { if (out != null) { out.flush(); out.close(); } } } private Configuration freeMarkerConfigurer; private MessageSource tplMessageSource; private String tplRootPath; private String tplIndexPath; private String publishRootPath; // @Autowired // private ServletContextResolver servletContextResolver; public void setPublishRootPath(String publishRootPath) { this.publishRootPath = publishRootPath; } public void setFreeMarkerConfigurer(FreeMarkerConfigurer freeMarkerConfigurer) { this.freeMarkerConfigurer = freeMarkerConfigurer.getConfiguration(); } public void setTplMessageSource(MessageSource tplMessageSource) { this.tplMessageSource = tplMessageSource; } public void setTplRootPath(String tplRootPath) { this.tplRootPath = tplRootPath; } public void setTplIndexPath(String tplIndexPath) { this.tplIndexPath = tplIndexPath; } @Override public void publishPublic(PublishContext site) throws PublishException { String tpl = "";// PublishUtils.getTemplatePath(tplRootPath,site,TPL_SUFFIX); Map<String, Object> data = new HashMap<String, Object>(); try { String outFile = "";// PublishUtils.getPublishPath(this.publishRootPath,site,TPL_SUFFIX); publish(outFile, tpl, data); } catch (IOException e) { logger.error("IO EXCEPTION", e); throw new PublishException("IO EXCEPTION", e); } catch (TemplateException e) { logger.error("TEMPLATE EXCEPTION", e); throw new PublishException("TEMPLATE EXCEPTION", e); } } }
[ "lyxmq.ljh@9c0ba882-c8bc-11dd-9042-6d746b85d38b" ]
lyxmq.ljh@9c0ba882-c8bc-11dd-9042-6d746b85d38b
f0f5671ca012335cfe44b3c73d5ec7bd0c4f9577
4b3835271fed4e5871c8465f58fcc3503c47427d
/wicket-jquery-ui-samples/src/main/java/com/googlecode/wicket/jquery/ui/samples/pages/draggable/ComponentDraggablePage.java
456386b79d438780cab9e3492e9abab110fc954e
[ "Apache-2.0" ]
permissive
mitring/wicket-jquery-ui
4c38c5ae1261e404cf4c234e2a1d1c1f01ae4387
ab483a69cb7d30f1a948e7c1b65a2144438dc456
refs/heads/master
2021-01-14T14:16:52.323950
2016-03-31T11:28:23
2016-03-31T11:28:23
54,409,723
0
0
null
2016-03-21T17:38:56
2016-03-21T17:38:56
null
UTF-8
Java
false
false
1,511
java
package com.googlecode.wicket.jquery.ui.samples.pages.draggable; import org.apache.wicket.ajax.AjaxRequestTarget; import org.apache.wicket.markup.html.panel.FeedbackPanel; import com.googlecode.wicket.jquery.core.utils.RequestCycleUtils; import com.googlecode.wicket.jquery.ui.interaction.draggable.Draggable; import com.googlecode.wicket.jquery.ui.panel.JQueryFeedbackPanel; public class ComponentDraggablePage extends AbstractDraggablePage { private static final long serialVersionUID = 1L; public ComponentDraggablePage() { // FeedbackPanel // final FeedbackPanel feedback = new JQueryFeedbackPanel("feedback"); this.add(feedback.setOutputMarkupId(true)); // Draggable // this.add(new Draggable<Void>("draggable") { private static final long serialVersionUID = 1L; @Override public boolean isStopEventEnabled() { return true; } @Override public void onDragStart(AjaxRequestTarget target, int top, int left) { this.info(String.format("Drag started - position: {%s, %s}", top, left)); target.add(feedback); } @Override public void onDragStop(AjaxRequestTarget target, int top, int left) { double offsetTop = RequestCycleUtils.getQueryParameterValue("offsetTop").toDouble(-1); double offsetLeft = RequestCycleUtils.getQueryParameterValue("offsetLeft").toDouble(-1); this.info(String.format("Drag stoped - position: {%d, %d}, offset: {%.1f, %.1f}", top, left, offsetTop, offsetLeft)); target.add(feedback); } }); } }
[ "sebfz1@gmail.com" ]
sebfz1@gmail.com
a9008b60a91646413b466e6707545be6f2ad8e57
3b3c922225e688b2ab9340f337e1a4a94c98a5c4
/src/main/java/eon/hg/fileserver/util/down/Utility.java
4889ab348ce7cd466f0bdd0244a53587e2343265
[]
no_license
aeonj/eon-fileserver
0e5d6d71424d0686f386e242d9896aaadede85f4
ed9b279c4d7761603bbcea3815f8edefd9455f80
refs/heads/master
2022-12-11T01:43:08.334451
2020-05-09T02:12:55
2020-05-09T02:12:55
232,266,315
0
0
null
2022-12-06T00:41:11
2020-01-07T07:18:59
JavaScript
UTF-8
Java
false
false
458
java
package eon.hg.fileserver.util.down; public class Utility { public Utility() { } public static void sleep(int nSecond) { try{ Thread.sleep(nSecond); } catch(Exception e) { e.printStackTrace (); } } public static void log(String sMsg) { System.err.println(sMsg); } public static void log(int sMsg) { System.err.println(sMsg); } }
[ "aeonj@163.com" ]
aeonj@163.com
f10075cbcfed001ca6b874947fd89c7f47915351
cc2ff3f2e20dd673ed7593dd68ceb625c44fdb57
/jaxrs/resteasy-jaxrs/src/main/java/org/jboss/resteasy/client/exception/mapper/ApacheHttpClient4ExceptionMapper.java
f994406a900ca8bc3a893a7cbcb504ede96342f8
[ "Apache-2.0" ]
permissive
raphaelning/resteasy-client-android
c0051e6fa921bb62754b3c49e8ea23d3b0813362
428bef2352710afaad2f3a3b7f6798eaf2c4fe2b
refs/heads/master
2016-09-06T10:37:56.680152
2013-11-19T06:50:41
2013-11-19T06:50:41
14,515,445
2
4
null
null
null
null
UTF-8
Java
false
false
7,152
java
package org.jboss.resteasy.client.exception.mapper; import ch.boye.httpclientandroidlib.ConnectionClosedException; import ch.boye.httpclientandroidlib.HttpException; import ch.boye.httpclientandroidlib.MalformedChunkCodingException; import ch.boye.httpclientandroidlib.MethodNotSupportedException; import ch.boye.httpclientandroidlib.NoHttpResponseException; import ch.boye.httpclientandroidlib.ProtocolException; import ch.boye.httpclientandroidlib.UnsupportedHttpVersionException; import ch.boye.httpclientandroidlib.auth.AuthenticationException; import ch.boye.httpclientandroidlib.auth.InvalidCredentialsException; import ch.boye.httpclientandroidlib.auth.MalformedChallengeException; import ch.boye.httpclientandroidlib.client.CircularRedirectException; import ch.boye.httpclientandroidlib.client.ClientProtocolException; import ch.boye.httpclientandroidlib.client.NonRepeatableRequestException; import ch.boye.httpclientandroidlib.client.RedirectException; import ch.boye.httpclientandroidlib.conn.ConnectTimeoutException; import ch.boye.httpclientandroidlib.conn.ConnectionPoolTimeoutException; import ch.boye.httpclientandroidlib.conn.HttpHostConnectException; import ch.boye.httpclientandroidlib.cookie.CookieRestrictionViolationException; import ch.boye.httpclientandroidlib.cookie.MalformedCookieException; import ch.boye.httpclientandroidlib.impl.auth.NTLMEngineException; import ch.boye.httpclientandroidlib.impl.client.TunnelRefusedException; import org.jboss.resteasy.client.exception.ResteasyAuthenticationException; import org.jboss.resteasy.client.exception.ResteasyCircularRedirectException; import org.jboss.resteasy.client.exception.ResteasyClientException; import org.jboss.resteasy.client.exception.ResteasyClientProtocolException; import org.jboss.resteasy.client.exception.ResteasyConnectTimeoutException; import org.jboss.resteasy.client.exception.ResteasyConnectionClosedException; import org.jboss.resteasy.client.exception.ResteasyConnectionPoolTimeoutException; import org.jboss.resteasy.client.exception.ResteasyCookieRestrictionViolationException; import org.jboss.resteasy.client.exception.ResteasyHttpException; import org.jboss.resteasy.client.exception.ResteasyHttpHostConnectException; import org.jboss.resteasy.client.exception.ResteasyIOException; import org.jboss.resteasy.client.exception.ResteasyInvalidCredentialsException; import org.jboss.resteasy.client.exception.ResteasyMalformedChallengeException; import org.jboss.resteasy.client.exception.ResteasyMalformedChunkCodingException; import org.jboss.resteasy.client.exception.ResteasyMalformedCookieException; import org.jboss.resteasy.client.exception.ResteasyMethodNotSupportedException; import org.jboss.resteasy.client.exception.ResteasyNTLMEngineException; import org.jboss.resteasy.client.exception.ResteasyNoHttpResponseException; import org.jboss.resteasy.client.exception.ResteasyNonRepeatableRequestException; import org.jboss.resteasy.client.exception.ResteasyProtocolException; import org.jboss.resteasy.client.exception.ResteasyRedirectException; import org.jboss.resteasy.client.exception.ResteasyTunnelRefusedException; import org.jboss.resteasy.client.exception.ResteasyUnsupportedHttpVersionException; import javax.ws.rs.ext.Provider; import java.io.IOException; /** * * Modified for Android by Raphael Ning. * * @author <a href="ron.sigal@jboss.com">Ron Sigal</a> * @version $Revision: 1.1 $ * * Copyright Jul 28, 2012 */ @Provider public class ApacheHttpClient4ExceptionMapper implements ClientExceptionMapper<Exception> { @Override public ResteasyClientException toException(Exception exception) { if (exception instanceof IOException) { return mapIOException(IOException.class.cast(exception)); } if (exception instanceof HttpException) { return mapHttpException(HttpException.class.cast(exception)); } return new ResteasyClientException("Unexpected exception type", exception); } private ResteasyClientException mapIOException(IOException e) { if (ClientProtocolException.class.equals(e.getClass())) { return new ResteasyClientProtocolException(e); } if (ConnectionClosedException.class.equals(e.getClass())) { return new ResteasyConnectionClosedException(e); } if (ConnectionPoolTimeoutException.class.equals(e.getClass())) { return new ResteasyConnectionPoolTimeoutException(e); } if (ConnectTimeoutException.class.equals(e.getClass())) { return new ResteasyConnectTimeoutException(e); } if (HttpHostConnectException.class.equals(e.getClass())) { return new ResteasyHttpHostConnectException(e); } if (MalformedChunkCodingException.class.equals(e.getClass())) { return new ResteasyMalformedChunkCodingException(e); } if (NoHttpResponseException.class.equals(e.getClass())) { return new ResteasyNoHttpResponseException(e); } if (NoHttpResponseException.class.equals(e.getClass())) { return new ResteasyNoHttpResponseException(e); } return new ResteasyIOException("IOException", e); } private ResteasyClientException mapHttpException(HttpException e) { if (AuthenticationException.class.equals(e.getClass())) { return new ResteasyAuthenticationException(e); } if (CircularRedirectException.class.equals(e.getClass())) { return new ResteasyCircularRedirectException(e); } if (CookieRestrictionViolationException.class.equals(e.getClass())) { return new ResteasyCookieRestrictionViolationException(e); } if (InvalidCredentialsException.class.equals(e.getClass())) { return new ResteasyInvalidCredentialsException(e); } if (MalformedChallengeException.class.equals(e.getClass())) { return new ResteasyMalformedChallengeException(e); } if (MalformedCookieException.class.equals(e.getClass())) { return new ResteasyMalformedCookieException(e); } if (MethodNotSupportedException.class.equals(e.getClass())) { return new ResteasyMethodNotSupportedException(e); } if (NonRepeatableRequestException.class.equals(e.getClass())) { return new ResteasyNonRepeatableRequestException(e); } if (NTLMEngineException.class.equals(e.getClass())) { return new ResteasyNTLMEngineException(e); } if (ProtocolException.class.equals(e.getClass())) { return new ResteasyProtocolException(e); } if (RedirectException.class.equals(e.getClass())) { return new ResteasyRedirectException(e); } if (TunnelRefusedException.class.equals(e.getClass())) { return new ResteasyTunnelRefusedException(e); } if (UnsupportedHttpVersionException.class.equals(e.getClass())) { return new ResteasyUnsupportedHttpVersionException(e); } return new ResteasyHttpException("HttpException", e); } }
[ "raphael.ning@gmail.com" ]
raphael.ning@gmail.com
b213db1b081ec61d805bbb99ccbc89e9b528dc35
32bdd1b2fddc92a6cb8df128f2e049834148139c
/core/src/main/java/org/operamasks/faces/webapp/graph/TitleTag.java
02721ac20c2c8ce7fecb5bdc47368ac6208e864b
[]
no_license
luobenyu/OperaMasks
e678ed4ad9dbb237a047ca0124da1bfb3249e28c
b772b2fd51d7d3da0471d7f46d69a521dc47e7d9
refs/heads/master
2021-05-28T09:47:20.328604
2012-11-17T22:19:51
2012-11-17T22:20:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,126
java
/* * $Id: TitleTag.java,v 1.3 2007/07/02 07:37:56 jacky Exp $ * * Copyright (C) 2006 Operamasks Community. * Copyright (C) 2000-2006 Apusic Systems, Inc. * * 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 * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see http://www.gnu.org/licenses. */ package org.operamasks.faces.webapp.graph; import javax.el.ValueExpression; import org.operamasks.faces.webapp.html.HtmlBasicELTag; import org.operamasks.faces.component.graph.UITitle; /** * @jsp.tag name="title" body-content="JSP" */ public class TitleTag extends HtmlBasicELTag { public String getComponentType() { return UITitle.COMPONENT_TYPE; } public String getRendererType() { return null; } /** * @jsp.attribute type="java.lang.Object" */ public void setValue(ValueExpression value) { setValueExpression("value", value); } /** * @jsp.attribute type="java.lang.Object" */ public void setFont(ValueExpression font) { setValueExpression("font", font); } /** * @jsp.attribute type="java.lang.Object" */ public void setColor(ValueExpression color) { setValueExpression("color", color); } /** * @jsp.attribute type="java.lang.Object" */ public void setBackgroundColor(ValueExpression backgroundColor) { setValueExpression("backgroundColor", backgroundColor); } /** * @jsp.attribute type="org.operamasks.faces.component.graph.PositionType" */ public void setPosition(ValueExpression position) { setValueExpression("position", position); } }
[ "daniel.yuan@me.com" ]
daniel.yuan@me.com
ae487c4d96825a7a17e7dbba0f26e53e1677f8c2
8ef5dba87266ec527514fe14a79e23f10bd02a6e
/didn't work/Tawseel APK/Client/app/app/app/src/main/java/com/fasterxml/jackson/databind/ser/impl/UnwrappingBeanSerializer.java
03ce7c422c90e16a51d08fbe2395b7887fe837f6
[]
no_license
ahmedmgh67/What-s-Fatora
4cfff6ae6c5b41f4b8fc23068d219f63251854ff
53c90a17542ecca1fe267816219d9f0c78471c92
refs/heads/master
2020-04-28T06:14:33.730056
2019-02-15T21:41:28
2019-02-15T21:41:28
175,049,535
0
0
null
null
null
null
UTF-8
Java
false
false
4,629
java
package com.fasterxml.jackson.databind.ser.impl; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializationFeature; import com.fasterxml.jackson.databind.SerializerProvider; import com.fasterxml.jackson.databind.jsontype.TypeSerializer; import com.fasterxml.jackson.databind.ser.std.BeanSerializerBase; import com.fasterxml.jackson.databind.util.NameTransformer; import java.io.IOException; import java.io.Serializable; public class UnwrappingBeanSerializer extends BeanSerializerBase implements Serializable { private static final long serialVersionUID = 1L; protected final NameTransformer _nameTransformer; public UnwrappingBeanSerializer(UnwrappingBeanSerializer paramUnwrappingBeanSerializer, ObjectIdWriter paramObjectIdWriter) { super(paramUnwrappingBeanSerializer, paramObjectIdWriter); this._nameTransformer = paramUnwrappingBeanSerializer._nameTransformer; } public UnwrappingBeanSerializer(UnwrappingBeanSerializer paramUnwrappingBeanSerializer, ObjectIdWriter paramObjectIdWriter, Object paramObject) { super(paramUnwrappingBeanSerializer, paramObjectIdWriter, paramObject); this._nameTransformer = paramUnwrappingBeanSerializer._nameTransformer; } protected UnwrappingBeanSerializer(UnwrappingBeanSerializer paramUnwrappingBeanSerializer, String[] paramArrayOfString) { super(paramUnwrappingBeanSerializer, paramArrayOfString); this._nameTransformer = paramUnwrappingBeanSerializer._nameTransformer; } public UnwrappingBeanSerializer(BeanSerializerBase paramBeanSerializerBase, NameTransformer paramNameTransformer) { super(paramBeanSerializerBase, paramNameTransformer); this._nameTransformer = paramNameTransformer; } protected BeanSerializerBase asArraySerializer() { return this; } public boolean isUnwrappingSerializer() { return true; } public final void serialize(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider) throws IOException { paramJsonGenerator.setCurrentValue(paramObject); if (this._objectIdWriter != null) { _serializeWithObjectId(paramObject, paramJsonGenerator, paramSerializerProvider, false); return; } if (this._propertyFilterId != null) { serializeFieldsFiltered(paramObject, paramJsonGenerator, paramSerializerProvider); return; } serializeFields(paramObject, paramJsonGenerator, paramSerializerProvider); } public void serializeWithType(Object paramObject, JsonGenerator paramJsonGenerator, SerializerProvider paramSerializerProvider, TypeSerializer paramTypeSerializer) throws IOException { if (paramSerializerProvider.isEnabled(SerializationFeature.FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS)) { throw JsonMappingException.from(paramJsonGenerator, "Unwrapped property requires use of type information: can not serialize without disabling `SerializationFeature.FAIL_ON_UNWRAPPED_TYPE_IDENTIFIERS`"); } paramJsonGenerator.setCurrentValue(paramObject); if (this._objectIdWriter != null) { _serializeWithObjectId(paramObject, paramJsonGenerator, paramSerializerProvider, paramTypeSerializer); return; } if (this._propertyFilterId != null) { serializeFieldsFiltered(paramObject, paramJsonGenerator, paramSerializerProvider); return; } serializeFields(paramObject, paramJsonGenerator, paramSerializerProvider); } public String toString() { return "UnwrappingBeanSerializer for " + handledType().getName(); } public JsonSerializer<Object> unwrappingSerializer(NameTransformer paramNameTransformer) { return new UnwrappingBeanSerializer(this, paramNameTransformer); } public BeanSerializerBase withFilterId(Object paramObject) { return new UnwrappingBeanSerializer(this, this._objectIdWriter, paramObject); } protected BeanSerializerBase withIgnorals(String[] paramArrayOfString) { return new UnwrappingBeanSerializer(this, paramArrayOfString); } public BeanSerializerBase withObjectIdWriter(ObjectIdWriter paramObjectIdWriter) { return new UnwrappingBeanSerializer(this, paramObjectIdWriter); } } /* Location: H:\As A Bussines Man\confedince\App Dev Department\What's Fatora\Tawseel APK\Client\dex2jar-2.0\t-dex2jar.jar!\com\fasterxml\jackson\databind\ser\impl\UnwrappingBeanSerializer.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "ahmedmgh67@gmail.com" ]
ahmedmgh67@gmail.com
8ea7c27c97222eaf745f0c90b918dec79f260a87
eb9f655206c43c12b497c667ba56a0d358b6bc3a
/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/quickFix/joinDeclaration/beforeSideEffect.java
9d5e7a1e6122031ef92f710cc7ef4bf8835e8391
[ "Apache-2.0" ]
permissive
JetBrains/intellij-community
2ed226e200ecc17c037dcddd4a006de56cd43941
05dbd4575d01a213f3f4d69aa4968473f2536142
refs/heads/master
2023-09-03T17:06:37.560889
2023-09-03T11:51:00
2023-09-03T12:12:27
2,489,216
16,288
6,635
Apache-2.0
2023-09-12T07:41:58
2011-09-30T13:33:05
null
UTF-8
Java
false
false
225
java
// "Join declaration and assignment" "GENERIC_ERROR_OR_WARNING" class T { { int a =<caret> foo(1); a = foo(2); } static int foo(int n) { System.out.println(n); return n + 1; } }
[ "pavel.dolgov@jetbrains.com" ]
pavel.dolgov@jetbrains.com
30550795d32b45641cc7d0cf3588ffc8fa757b5a
5e2cab8845e635b75f699631e64480225c1cf34d
/modules/core/org.jowidgets.api/src/main/java/org/jowidgets/api/widgets/descriptor/setup/ILoginDialogSetup.java
8358d40b48fa08ca217caf00f21d88171b47b243
[ "BSD-3-Clause" ]
permissive
alec-liu/jo-widgets
2277374f059500dfbdb376333743d5507d3c57f4
a1dde3daf1d534cb28828795d1b722f83654933a
refs/heads/master
2022-04-18T02:36:54.239029
2018-06-08T13:08:26
2018-06-08T13:08:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,464
java
/* * Copyright (c) 2010, Michael Grossmann * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. * * Neither the name of the jo-widgets.org 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 org.jowidgets.api.widgets.descriptor.setup; import org.jowidgets.api.login.ILoginInterceptor; import org.jowidgets.api.types.InputDialogDefaultButtonPolicy; import org.jowidgets.api.widgets.descriptor.IButtonDescriptor; import org.jowidgets.common.image.IImageConstant; import org.jowidgets.common.types.Dimension; import org.jowidgets.common.widgets.descriptor.setup.mandatory.Mandatory; public interface ILoginDialogSetup extends ITitledWindowSetup { @Mandatory IButtonDescriptor getLoginButton(); @Mandatory IButtonDescriptor getCancelButton(); @Mandatory InputDialogDefaultButtonPolicy getDefaultButtonPolicy(); @Mandatory boolean isCloseable(); @Mandatory ILoginInterceptor getInterceptor(); IImageConstant getLogo(); String getLoginLabel(); Dimension getMinSize(); }
[ "herrgrossmann@users.noreply.github.com" ]
herrgrossmann@users.noreply.github.com
edff7779fcc29f540e49cdc20907a4fd29b6c42b
c9f808b3316a96a4d0a1555a36d6ec47ccb8fd9b
/src/action/adm/ADMUnlockAction.java
1c4428fa466459e510b0562e032d19810a771e30
[]
no_license
levonyang/proper-his
f4c19b4ce46b213bf637be8e18bffa3758c64ecd
2fdcb956b0c61e8be35e056d52a97d4890cbea3f
refs/heads/master
2022-01-05T09:17:14.716629
2018-04-08T01:04:21
2018-04-08T01:04:21
null
0
0
null
null
null
null
GB18030
Java
false
false
4,993
java
package action.adm; import com.dongyang.action.TAction; import com.dongyang.data.TParm; import com.dongyang.db.TConnection; import com.dongyang.jdo.TJDODBTool; /** * <p> * Title:临时解锁Action * </p> * * <p> * Description:临时解锁Action * </p> * * <p> * Copyright: Copyright (c) 2008 * </p> * * <p> * Company: Javahis * </p> * * @author yanmm * @version 1.0 */ public class ADMUnlockAction extends TAction { public TParm insertUnlock(TParm parm) { TParm result = new TParm(); TConnection conn = this.getConnection(); String sqlSave = " INSERT INTO ADM_UNLOCK_CAUSE " + "(CASE_NO,MR_NO,SEQ_NO,UNLOCK_CASE,UNLOCK_CASE_TEXT,UNLOCK_DATE,ARREARAGE_AMT,OPT_TERM,OPT_USER,OPT_DATE) " + "VALUES ('" + parm.getValue("CASE_NO") + "','" + parm.getValue("MR_NO") + "','" + parm.getValue("SEQ_NO") + "','" + parm.getValue("UNLOCK_CASE") + "'," + "'" + parm.getValue("UNLOCK_CASE_TEXT") + "'," + "TO_DATE('" + parm.getValue("UNLOCK_DATE") + "','YYYY/MM/DD HH24:MI:SS'),'" + parm.getValue("ARREARAGE_AMT") + "','" + parm.getValue("OPT_TERM") + "','" + parm.getValue("OPT_USER") + "'," + "TO_DATE('" + parm.getValue("OPT_DATE") + "','YYYY/MM/DD HH24:MI:SS')) "; TParm p = new TParm(TJDODBTool.getInstance().update(sqlSave, conn)); if (p.getErrCode() < 0) { conn.close(); return result; } conn.commit(); conn.close(); return p; } public TParm upUnlock(TParm parm) { TParm result = new TParm(); TConnection conn = this.getConnection(); String sqlSave1 = "UPDATE ADM_INP SET STOP_BILL_FLG ='N',UNLOCKED_FLG ='1' WHERE CASE_NO ='" + parm.getValue("CASE_NO") + "' "; TParm p1 = new TParm(TJDODBTool.getInstance().update(sqlSave1, conn)); if (p1.getErrCode() < 0) { conn.close(); return result; } conn.commit(); conn.close(); return p1; } /* * public TParm insertCordon(TParm parm){ TParm result = new TParm(); * TConnection conn = this.getConnection(); String sql = * " INSERT INTO IBS_DICTIONARY_CORDON " + * "(RED_SIGN,YELLOW_SIGN,OPT_TERM,OPT_USER,OPT_DATE,ID) " + "VALUES ('" + * parm.getValue("RED_SIGN") + "','" + parm.getValue("YELLOW_SIGN") +"','" + * parm.getValue("OPT_TERM") + "','" + parm.getValue("OPT_USER") + "'," + * "TO_DATE('" + parm.getValue("OPT_DATE") + * "','YYYY/MM/DD HH24:MI:SS'),'1') "; System.out.println("插入"+sql); TParm p * = new TParm(TJDODBTool.getInstance().update(sql,conn)); * if(p.getErrCode()<0){ conn.close(); return result; } conn.commit(); * conn.close(); return p; } */ public TParm updateCordon(TParm parm) { TParm result = new TParm(); TConnection conn = this.getConnection(); String sql = "UPDATE ODI_SYSPARM SET RED_SIGN='" + parm.getValue("RED_SIGN") + "',YELLOW_SIGN='" + parm.getValue("YELLOW_SIGN") + "',OPT_USER='" + parm.getValue("OPT_USER") + "'," + "OPT_TERM='" + parm.getValue("OPT_TERM") + "',OPT_DATE=TO_DATE('" + parm.getValue("OPT_DATE") + "','YYYY/MM/DD HH24:MI:SS') "; // System.out.println("更新" + sql); TParm p1 = new TParm(TJDODBTool.getInstance().update(sql, conn)); if (p1.getErrCode() < 0) { conn.close(); return result; } conn.commit(); conn.close(); return p1; } public TParm insertCtz(TParm parm) { TParm result = new TParm(); TConnection conn = this.getConnection(); String sql = " INSERT INTO SYS_CTZ_REBATE " + "(CTZ_CODE,DISCOUNT_RATE,LOCK_CTZ_FLG,OPT_TERM,OPT_USER,OPT_DATE) " + "VALUES ('" + parm.getValue("CTZ_CODE") + "','" + parm.getValue("DISCOUNT_RATE") + "','" + parm.getValue("LOCK_CTZ_FLG") + "','" + parm.getValue("OPT_TERM") + "','" + parm.getValue("OPT_USER") + "'," + "TO_DATE('" + parm.getValue("OPT_DATE") + "','YYYY/MM/DD HH24:MI:SS')) "; // System.out.println("插入" + sql); TParm p = new TParm(TJDODBTool.getInstance().update(sql, conn)); if (p.getErrCode() < 0) { conn.close(); return result; } conn.commit(); conn.close(); return p; } public TParm updateCtz(TParm parm) { TParm result = new TParm(); TConnection conn = this.getConnection(); String sql = "UPDATE SYS_CTZ_REBATE SET " + "DISCOUNT_RATE = '" + parm.getValue("DISCOUNT_RATE") + "'" + ",LOCK_CTZ_FLG = '" + parm.getValue("LOCK_CTZ_FLG") + "'" + ",OPT_USER = '" + parm.getValue("OPT_USER") + "'" + ",OPT_TERM = '" + parm.getValue("OPT_TERM") + "'" + ",OPT_DATE = TO_DATE ('" + parm.getValue("OPT_DATE") + "'" + ", 'YYYY/MM/DD HH24:MI:SS') " + "WHERE CTZ_CODE = '" + parm.getValue("CTZ_CODE") + "' "; // System.out.println("更新" + sql); TParm p1 = new TParm(TJDODBTool.getInstance().update(sql, conn)); if (p1.getErrCode() < 0) { conn.close(); return result; } conn.commit(); conn.close(); return p1; } }
[ "licx@ACA803A0.ipt.aol.com" ]
licx@ACA803A0.ipt.aol.com
4eec9af03ae39cec7d4952324921716dd9719fa0
25c5d243ffac4b4f4f9efcd6a28cb41d51b23c90
/src/test/java/org/apache/sysds/test/functions/nary/NaryListTest.java
beca94371db333da4bd38e70126d8503c30f5e93
[ "Apache-2.0" ]
permissive
apache/systemds
5351e8dd9aa842b693e8c148cf3be151697f07a7
73555e932a516063c860f5d05c84e6523cc7619b
refs/heads/main
2023-08-31T03:46:03.010474
2023-08-30T18:25:59
2023-08-30T18:34:41
45,896,813
194
167
Apache-2.0
2023-09-13T08:43:37
2015-11-10T08:00:06
Java
UTF-8
Java
false
false
1,909
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ package org.apache.sysds.test.functions.nary; import static org.junit.Assert.assertTrue; import org.apache.sysds.test.AutomatedTestBase; import org.apache.sysds.test.TestConfiguration; import org.apache.sysds.test.TestUtils; import org.junit.Test; public class NaryListTest extends AutomatedTestBase { private final static String TEST_NAME = "NaryList"; private final static String TEST_DIR = "functions/nary/"; private final static String TEST_CLASS_DIR = TEST_DIR + NaryListTest.class.getSimpleName() + "/"; @Override public void setUp() { TestUtils.clearAssertionInformation(); addTestConfiguration(TEST_NAME, new TestConfiguration(TEST_CLASS_DIR, TEST_NAME, new String[] {"R"})); } @Test public void test(){ TestConfiguration config = getAndLoadTestConfiguration(TEST_NAME); loadTestConfiguration(config); String RI_HOME = SCRIPT_DIR + TEST_DIR; fullDMLScriptName = RI_HOME + TEST_NAME + ".dml"; programArgs = new String[]{"-stats" }; String out = runTest(true, false, null, -1).toString(); assertTrue( "Output: " + out, out.contains("[hi, Im, a, list]")); } }
[ "mboehm7@gmail.com" ]
mboehm7@gmail.com
fa235663d5080e822e824711576419bfdc9f2961
00732208063676d399de54bd3a9c4188fa61fc41
/slideshowfx-dropbox-hosting-connector/src/main/java/module-info.java
b27ddd96eb0f2f0b8a20d576dcb073e85db2999d
[ "Apache-2.0" ]
permissive
twasyl/SlideshowFX
ef3731ee5023b35ddbce6f930f07f0e801c08314
c24ea95aed8a050a79cddfd1809a5013c16c25cd
refs/heads/master
2021-07-06T00:12:08.096559
2021-06-03T11:31:20
2021-06-03T11:31:20
30,044,052
48
8
NOASSERTION
2020-06-11T06:34:00
2015-01-29T22:16:34
Java
UTF-8
Java
false
false
661
java
module slideshowfx.dropbox.hosting.connector { exports com.twasyl.slideshowfx.hosting.connector.dropbox; provides com.twasyl.slideshowfx.hosting.connector.IHostingConnector with com.twasyl.slideshowfx.hosting.connector.dropbox.DropboxHostingConnector; provides com.twasyl.slideshowfx.plugin.IPlugin with com.twasyl.slideshowfx.hosting.connector.dropbox.DropboxHostingConnector; requires dropbox.core.sdk; requires java.logging; requires javafx.controls; requires javafx.graphics; requires javafx.web; requires slideshowfx.engines; requires slideshowfx.global.configuration; requires slideshowfx.hosting.connector; }
[ "thierry.wasylczenko@gmail.com" ]
thierry.wasylczenko@gmail.com
61e7861cfc86ef150a0895ad60f853b59079c8e2
3538406360a3ebe52f00e7b53cc06acb58b004a0
/atlas-common/trunk/src/main/java/org/incf/atlas/common/util/ProcessesXmlBuilder.java
e376d614c654fb3216dc8ca0c0d52afdd59f4185
[]
no_license
izaslavsky/incf-dai
d563e63aa7cf7147ceb5a60c2b7ade3754f502c8
4ba6954720974139388ac0f77040fabe28fb4752
refs/heads/master
2016-09-06T11:13:51.903896
2013-02-07T02:30:15
2013-02-07T02:30:15
32,130,589
0
1
null
null
null
null
UTF-8
Java
false
false
2,603
java
package org.incf.atlas.common.util; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.InputStream; import javax.xml.parsers.ParserConfigurationException; import javax.xml.transform.Result; import javax.xml.transform.Source; import javax.xml.transform.TransformerException; import javax.xml.transform.TransformerFactory; import javax.xml.transform.stream.StreamResult; import javax.xml.transform.stream.StreamSource; import org.xml.sax.SAXException; public class ProcessesXmlBuilder { // resources private static final String SRS_NAMES = "/SrsNames.xml"; private static final String PROCESS_INPUTS_SS = "/ProcessInputs.xslt"; private static final String PRETTY_PRINT_SS = "/PrettyPrint.xslt"; // outputs private static final String CACHE_DIR = "src/main/webapp/WEB-INF/cache"; private static final String TEMP_FILE = "temp.xml"; private static final String PROCESS_DESCRIPTIONS = "PDs.xml"; private TransformerFactory transFac; public ProcessesXmlBuilder() throws ParserConfigurationException { transFac = TransformerFactory.newInstance(); } public void transform(InputStream source, InputStream stylesheet, File output) throws TransformerException { // set up inputs and outputs Source xmlSource = new StreamSource(source); Source xslt = new StreamSource(stylesheet); Result result = new StreamResult(output); // do transform transFac.newTransformer(xslt).transform(xmlSource, result); } public void execute() throws TransformerException, FileNotFoundException { File cacheDir = new File(CACHE_DIR); cacheDir.mkdir(); File tempFile = new File(cacheDir, TEMP_FILE); File processDescriptions = new File(cacheDir, PROCESS_DESCRIPTIONS); // generate process descriptions transform(this.getClass().getResourceAsStream(SRS_NAMES), this.getClass().getResourceAsStream(PROCESS_INPUTS_SS), tempFile); // pretty print process descriptions transform(new FileInputStream(tempFile), this.getClass().getResourceAsStream(PRETTY_PRINT_SS), processDescriptions); tempFile.delete(); } public static void main(String[] args) throws TransformerException, IOException, ParserConfigurationException, SAXException { new ProcessesXmlBuilder().execute(); } }
[ "davlit0917@7cbae6f4-d32f-11de-a711-9fae7a67fc1c" ]
davlit0917@7cbae6f4-d32f-11de-a711-9fae7a67fc1c
c49dc8dbe2ba4367780f516345ebf8a51641ab93
fc6c869ee0228497e41bf357e2803713cdaed63e
/weixin6519android1140/src/sourcecode/com/tencent/mm/plugin/freewifi/f/a.java
2a67348792da2c2a891f34f8a3458430d865bbf7
[]
no_license
hyb1234hi/reverse-wechat
cbd26658a667b0c498d2a26a403f93dbeb270b72
75d3fd35a2c8a0469dbb057cd16bca3b26c7e736
refs/heads/master
2020-09-26T10:12:47.484174
2017-11-16T06:54:20
2017-11-16T06:54:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
820
java
package com.tencent.mm.plugin.freewifi.f; import com.tencent.gmtrace.GMTrace; public final class a { public String eCF; public int lrG; public int lrH; public String lrI; public String lrJ; public long lrK; public String lrL; public String lrM; public int lrN; public String lrO; public String lrP; public int lrQ; public long lrR; public long lrS; public int lrT; public int lrU; public int lrV; public String lrW; public String lrX; public String lrY; public int lrZ; public a() { GMTrace.i(7259568472064L, 54088); GMTrace.o(7259568472064L, 54088); } } /* Location: D:\tools\apktool\weixin6519android1140\jar\classes3-dex2jar.jar!\com\tencent\mm\plugin\freewifi\f\a.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "robert0825@gmail.com" ]
robert0825@gmail.com
39d164013ad8ded764471c5d5a799eaad7279901
0af8b92686a58eb0b64e319b22411432aca7a8f3
/large-multiproject/project41/src/main/java/org/gradle/test/performance41_3/Production41_266.java
5679e9f87fa101d6ab7787aea5905f44d9333a0e
[]
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
305
java
package org.gradle.test.performance41_3; public class Production41_266 extends org.gradle.test.performance14_3.Production14_266 { private final String property; public Production41_266() { this.property = "foo"; } public String getProperty() { return property; } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
d3e687cefeb3890dfa3578a4f4e97d01854c42ed
0529524c95045b3232f6553d18a7fef5a059545e
/app/src/androidTest/java/TestCase_5E5BCB925210F7C4E3C1899691D6F2886B33600C82DC16387F2350AA59B77C8E__1482288006.java
727df1bf2d2df38d4880ccce6e8bfa32b925e989
[]
no_license
sunxiaobiu/BasicUnitAndroidTest
432aa3e10f6a1ef5d674f269db50e2f1faad2096
fed24f163d21408ef88588b8eaf7ce60d1809931
refs/heads/main
2023-02-11T21:02:03.784493
2021-01-03T10:07:07
2021-01-03T10:07:07
322,577,379
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
import android.location.Address; import androidx.test.runner.AndroidJUnit4; import org.easymock.EasyMock; import org.junit.Test; import org.junit.runner.RunWith; @RunWith(AndroidJUnit4.class) public class TestCase_5E5BCB925210F7C4E3C1899691D6F2886B33600C82DC16387F2350AA59B77C8E__1482288006 { @Test public void testCase() throws Exception { Object var1 = EasyMock.createMock(Address.class); boolean var2 = ((Address)var1).hasLatitude(); } }
[ "sunxiaobiu@gmail.com" ]
sunxiaobiu@gmail.com
eab447b288cf6c175c0bdc01b8b432bf807e0c76
8cdf1478981964e70c1d1e7cf829b4ed2844f492
/dis_rest_server/src/main/java/ph/txtdis/service/StockTakingToStockTakeService.java
0f2247b33c78d21edc74ecbbeb81a17e64b1c1f1
[]
no_license
txtdis/DIS-REST-Server
ffaa362c10cf8eac6711fe2f9705cec6abd7bb6f
f8956a4e3b6519348eaff898a0227aac058650b6
refs/heads/master
2020-04-05T23:17:06.873036
2016-02-10T08:42:57
2016-02-10T08:42:57
44,206,421
0
0
null
null
null
null
UTF-8
Java
false
false
1,798
java
package ph.txtdis.service; import static java.util.stream.Collectors.toList; import java.util.List; import org.springframework.stereotype.Service; import ph.txtdis.domain.Item; import ph.txtdis.domain.StockTaking; import ph.txtdis.domain.StockTakingDetail; import ph.txtdis.domain.User; import ph.txtdis.domain.Warehouse; import ph.txtdis.dto.StockTake; import ph.txtdis.dto.StockTakeDetail; @Service("stockTakingToStockTakeService") public class StockTakingToStockTakeService { public List<StockTake> toStockTake(List<StockTaking> p) { return p == null ? null : convert(p); } public StockTake toStockTake(StockTaking p) { return p == null ? null : convert(p); } private List<StockTake> convert(List<StockTaking> l) { return l.stream().map(p -> convert(p)).collect(toList()); } private StockTake convert(StockTaking i) { StockTake a = new StockTake(); a.setId(i.getId()); a.setCountDate(i.getStockTakeDate()); a.setWarehouse(toName(i.getWarehouse())); a.setChecker(toName(i.getChecker())); a.setTaker(toName(i.getTaker())); a.setDetails(toStockTakeDetails(i)); a.setCreatedBy(i.getCreatedBy()); a.setCreatedOn(i.getCreatedOn()); return a; } private String toName(User u) { return u == null ? null : u.getUsername(); } private String toName(Warehouse u) { return u == null ? null : u.getName(); } private StockTakeDetail toStockTakeDetail(StockTakingDetail id) { StockTakeDetail ad = new StockTakeDetail(); Item i = id.getItem(); ad.setId(i.getId()); ad.setName(i.getName()); ad.setQty(id.getQty()); ad.setQuality(id.getQuality()); ad.setUom(id.getUom()); return ad; } private List<StockTakeDetail> toStockTakeDetails(StockTaking i) { return i.getDetails().stream().map(id -> toStockTakeDetail(id)).collect(toList()); } }
[ "txtDIS@txtDIS.ph" ]
txtDIS@txtDIS.ph
3813ad2ff2502035dc0033e3aeecaefd11e20c56
df0d105e3bc11190c9f75b68014356d631094710
/src/main/java/com/zj/study/java2s/reflection/classpath/Which4J.java
6b158e72b240116ec790e7be7b3afbc970d7e39e
[]
no_license
zhaojian770627/javastudy
411109670f099be23142748e97346ccd62057c41
ca2613fbfc24bfc68254f3733b0d1409aecf3c94
refs/heads/master
2023-01-11T10:36:25.977810
2022-01-09T14:06:01
2022-01-09T14:06:01
162,666,475
0
0
null
2022-12-27T14:50:49
2018-12-21T04:40:01
Java
UTF-8
Java
false
false
8,050
java
package com.zj.study.java2s.reflection.classpath; import java.io.File; import java.net.URL; import java.net.URLClassLoader; import java.util.StringTokenizer; /** * Find occurrencens of a particular classname in the system classpath or the * specified ClassLoader. * * This class can be run in command-line mode to search your system classpath * for all occurrences of the specified classname. * * This class can also be used programmatically to search a particular * ClassLoader for the first occurrence of the specified classname. * <p> * Revision: $Revision: 1.2 $ * * @author <a href="mailto:Ryan.Shoemaker@Sun.COM">Ryan Shoemaker</a>, Sun * Microsystems, Inc. * @version 0.1 */ public class Which4J { private static boolean debug = false; /** * Main method used in command-line mode for searching the system classpath for * <em>all</em> occurrences of the specified classname. * * @param args * command-line arguments (run * "<code>java org.theshoemakers.tools.which4j.Which4J * -help</code>" for a detailed description). */ public static void main(String[] args) { if (args.length == 2) { if (args[0].equals("-debug")) { debug = true; findIt(args[1]); } else { System.err.println("error: unrecognized \"" + args[0] + "\" option "); System.exit(-1); } } else if (args.length == 1 && args[0].equals("-help")) { usage(); } else if (args.length == 1) { findIt(args[0]); } else { usage(); } System.exit(0); } private static void usage() { System.err.println("usage: java Which4J [-debug] <classname>" + "\n\tThe commandline version of Which4J will search the system" + "\tclasspath defined in your environment for all occurences" + "\tof the class. Alternatively, you can use this class" + "\tprogrammatically to search the current (or any) ClassLoader." + "\tSee the javadoc for more detail." + "\n\t" + "\n\tNote: if the name of the jar file listed after \"found in:\"" + "\tdoesn't match the name of the jar listed next to \"url:\", then " + "\tthere is likely a \"Class-Path\" entry in the jar manifest " + "\tthat is causing the classloader to indirectly find the class."); System.exit(-1); } /** * Iterate over the system classpath defined by "java.class.path" searching for * all occurrances of the given class name. * * @param classname * the fully qualified class name to search for */ private static void findIt(String classname) { try { // get the system classpath String classpath = System.getProperty("java.class.path", ""); if (classpath.equals("")) { System.err.println("error: classpath is not set"); } if (debug) { System.out.println("classname: " + classname); System.out.println("system classpath = " + classpath); } if (isPrimitiveOrVoid(classname)) { System.out.println("'" + classname + "' primitive"); return; } StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator); while (st.hasMoreTokens()) { String token = st.nextToken(); File classpathElement = new File(token); if (debug) System.out.println(classpathElement.isDirectory() ? "dir: " + token : "jar: " + token); URL[] url = { classpathElement.toURL() }; URLClassLoader cl = URLClassLoader.newInstance(url, null); String classnameAsResource = classname.replace('.', '/') + ".class"; URL it = cl.findResource(classnameAsResource); if (it != null) { System.out.println("found in: " + token); System.out.println(" url: " + it.toString()); System.out.println(""); } } } catch (Exception e) { e.printStackTrace(); } } /** * Search the current classloader for the given classname. * * Equivalent to calling which( String classname, Which4J.class.getClassLoader * ). * * @param classname * the fully qualified name of the class to search for * @return the source location of the resource, or null if it wasn't found */ public static String which(String classname) { return which(classname, Which4J.class.getClassLoader()); } /** * Search the specified classloader for the given classname. * * @param classname * the fully qualified name of the class to search for * @param loader * the classloader to search * @return the source location of the resource, or null if it wasn't found */ public static String which(String classname, ClassLoader loader) { if (isArrayType(classname)) { classname = getElementType(classname); } if (isPrimitiveOrVoid(classname)) { return "'" + classname + "' primitive"; } String classnameAsResource = classname.replace('.', '/') + ".class"; if (loader == null) { // some VM's return null from getClassLoader to indicate that // the class was loaded by the bootstrap class loader loader = ClassLoader.getSystemClassLoader(); } URL it = loader.getResource(classnameAsResource); if (it != null) { return it.toString(); } else { return null; } } /** * Search the current classloader for the given classname. * * Equivalent to calling which( Class clazz, Which4J.class.getClassLoader ). * * @param clazz * the class object to search for * @return the source location of the resource, or null if it wasn't found */ public static String which(Class clazz) { return which(clazz, clazz.getClassLoader()); } /** * Search the specified classloader for the given class object. * * @param clazz * the class object to search for * @param loader * the classloader to search * @return the source location of the resource, or null if it wasn't found */ public static String which(Class clazz, ClassLoader loader) { return which(clazz.getName(), loader); } /** * Determine if the class name corresponds to a primitive Java datatype or the * void datatype. * * @param classname * the name of the class * @return true iff the classname corresponds to a primitive Java datatype or * the void datatype, false otherwise. */ private static boolean isPrimitiveOrVoid(String classname) { return (classname.equals("boolean") || classname.equals("byte") || classname.equals("char") || classname.equals("double") || classname.equals("float") || classname.equals("int") || classname.equals("long") || classname.equals("short") || classname.equals("void")); } /** * Determine if the classname corresponds to an array type as defined by the * Java Language Specification. * * @param classname * the name of the class * @return true iff the classname corresponds to an array type, false otherwise. */ private static boolean isArrayType(String classname) { return classname.startsWith("["); } /** * Determine the element type of the array type. This can be the name of a * primitive type or the fully qualified class name of a non primitive type. * * @param classname * the array type * @return the name of the base element type. */ private static String getElementType(String classname) { // remove leading '[' String elementType = classname.split("^\\[+")[1]; char encoding = elementType.charAt(0); if (encoding == 'L') { // don't include the first char 'L' or last char ';' return elementType.substring(1, elementType.length() - 1); } else if (encoding == 'Z') { return "boolean"; } else if (encoding == 'B') { return "byte"; } else if (encoding == 'C') { return "char"; } else if (encoding == 'D') { return "double"; } else if (encoding == 'F') { return "float"; } else if (encoding == 'I') { return "int"; } else if (encoding == 'J') { return "long"; } else if (encoding == 'S') { return "short"; } else { throw new InternalError( "unknown array type: '" + encoding + "'.\nplease file a bug report at http://which4j.dev.java.net"); } } }
[ "zhaojian770627@163.com" ]
zhaojian770627@163.com
c480234d6a70c13d0b2e2a663912b6bf9fc38483
e3e0dd82a8d8972fe528fa9717703fb96d2c41e6
/src/main/java/whatisnewin/javax/xml/catalog/WhatIsNewInCatalogException.java
5491f5611e4580fa21e4607ac9c882d842637084
[]
no_license
weissreto/what-is-new-in-java-9-10-11
0ec10b40ad37de4b47abbb75004116e711800962
8d5afe909e2e05c9d90b6dc821502cd2ba2fd9d4
refs/heads/master
2020-09-09T01:34:00.617660
2020-03-29T12:38:36
2020-03-29T12:38:36
221,302,384
2
0
null
null
null
null
UTF-8
Java
false
false
1,073
java
package whatisnewin.javax.xml.catalog; import javax.xml.catalog.CatalogException; /** * This source file was generated by WhatIsNewInJava.<br> * * This class provides an example call to each method in class {@link CatalogException} * that were newly introduced in Java versions 9, 10, 11.<br> * * {@link CatalogException} is a completely new class. * @since 9 * @see CatalogException */ public final class WhatIsNewInCatalogException { /** * Example call to new constructor {@link CatalogException#CatalogException(String)}. * @since 9 * @see CatalogException#CatalogException(String) */ public WhatIsNewInCatalogException(String message) { CatalogException testee = new CatalogException(message); } /** * Example call to new constructor {@link CatalogException#CatalogException(String, Throwable)}. * @since 9 * @see CatalogException#CatalogException(String, Throwable) */ public WhatIsNewInCatalogException(String message, Throwable cause) { CatalogException testee = new CatalogException(message, cause); } }
[ "reto.weiss@ivyteam.ch" ]
reto.weiss@ivyteam.ch
c8e4751fa2f36372cc1a9311feb922a4ccaa2904
0d49f373d6ec46f068e763bee98a0d9f82aa8550
/src/main/java/com/cywinsky/blog/domain/PersistentAuditEvent.java
e06faec208fde5281dea4081a3e84e6b2504ff63
[]
no_license
BulkSecurityGeneratorProject/weirdolog
3418d63f5f95b704aa751d4e4df120d99db42386
00ea2e9c8d155caee049d5e548ff5e76ff97db11
refs/heads/master
2022-12-15T17:30:26.725580
2017-12-27T14:40:35
2017-12-27T14:40:35
296,648,930
0
0
null
2020-09-18T14:45:41
2020-09-18T14:45:40
null
UTF-8
Java
false
false
1,840
java
package com.cywinsky.blog.domain; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.time.Instant; import java.util.HashMap; import java.util.Map; /** * Persist AuditEvent managed by the Spring Boot actuator. * * @see org.springframework.boot.actuate.audit.AuditEvent */ @Entity @Table(name = "jhi_persistent_audit_event") public class PersistentAuditEvent implements Serializable { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "event_id") private Long id; @NotNull @Column(nullable = false) private String principal; @Column(name = "event_date") private Instant auditEventDate; @Column(name = "event_type") private String auditEventType; @ElementCollection @MapKeyColumn(name = "name") @Column(name = "value") @CollectionTable(name = "jhi_persistent_audit_evt_data", joinColumns=@JoinColumn(name="event_id")) private Map<String, String> data = new HashMap<>(); public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getPrincipal() { return principal; } public void setPrincipal(String principal) { this.principal = principal; } public Instant getAuditEventDate() { return auditEventDate; } public void setAuditEventDate(Instant auditEventDate) { this.auditEventDate = auditEventDate; } public String getAuditEventType() { return auditEventType; } public void setAuditEventType(String auditEventType) { this.auditEventType = auditEventType; } public Map<String, String> getData() { return data; } public void setData(Map<String, String> data) { this.data = data; } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
717b10389d78c7c502eed7d1816874120ca2c230
aa63e6cc382dcd1603f4d4950c5da06f8c8815a4
/java7-fs-amazon-s3/src/main/java/com/github/fge/fs/amazons3/attr/AmazonS3BasicFileAttributes.java
38c13eee714639590b8de4905710cae546fb310c
[]
no_license
fge/java7-filesystems
d205fd20a21a917bf38ab28a862fd914700a6f6c
f54355190e5e1f565b3187eb59087d51c6346fbc
refs/heads/master
2023-03-28T19:11:08.489416
2015-12-19T17:25:26
2015-12-19T17:25:26
47,763,462
7
2
null
null
null
null
UTF-8
Java
false
false
1,019
java
package com.github.fge.fs.amazons3.attr; import com.amazonaws.services.s3.model.ObjectMetadata; import com.amazonaws.services.s3.model.S3Object; import com.github.fge.fs.api.attr.attributes.AbstractBasicFileAttributes; import java.nio.file.attribute.FileTime; public final class AmazonS3BasicFileAttributes extends AbstractBasicFileAttributes { private final ObjectMetadata metadata; private final boolean directory; public AmazonS3BasicFileAttributes(final S3Object s3Object) { metadata = s3Object.getObjectMetadata(); directory = s3Object.getKey().endsWith("/"); } @Override public boolean isRegularFile() { return !directory; } @Override public boolean isDirectory() { return directory; } @Override public long size() { return metadata.getInstanceLength(); } @Override public FileTime lastModifiedTime() { return FileTime.from(metadata.getLastModified().toInstant()); } }
[ "fgaliegue@gmail.com" ]
fgaliegue@gmail.com
7bc2c4dc90db6edf1657d537789ad22ba0e81cc8
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/27/27_4c5ecc65ad00dba61f5b219f8c5f19eaf374e452/Source/27_4c5ecc65ad00dba61f5b219f8c5f19eaf374e452_Source_s.java
d6618a22ed7234aca58a548f5e2f7d506d8fb3a7
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,989
java
/* * Copyright 2011 Juan Alberto López Cavallotti * * 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.jdto.annotation; import org.jdto.SinglePropertyValueMerger; import org.jdto.mergers.IdentityPropertyValueMerger; import java.lang.annotation.Documented; import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; /** * Annotation type to bind the target attribute of a DTO with a source attrbiute. <br /> * The value for this annotation may be a nested property and the default behavior * will be delegated to the underlying {@link com.juancavallotti.jdto.BeanModifier} implementation. * * @author Juan Alberto Lopez Cavallotti */ @Documented @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) public @interface Source { /** * The name of a property (or nested property) which will act as the source value. <br /> * Please note that if there is a type mismatch over the property types then * it's up to the {@link com.juancavallotti.jdto.SinglePropertyValueMerger} implementation * to decide how it will be converted. Normally on a type mismatch a {@link ClassCastException} * is the most probable result. */ String value(); /** * The name of the source bean for bean matching. <br /> * See the {@link com.juancavallotti.jdto.annotation.SourceNames} annotation * for further reference on how multiple beans will be handled. * @return the default source bean is an empty string, the first bean specified * on the {@link com.juancavallotti.jdto.annotation.SourceNames} annotation * will be considered as default in addition to the name given by the user. */ String sourceBean() default ""; /** * The property merger used to merge this property. The default behavior * is the {@link IdentityPropertyValueMerger} which basically does not change the object. * @return the type that implements a single property value merger. */ Class<? extends SinglePropertyValueMerger> merger() default IdentityPropertyValueMerger.class; /** * Extra parameters to send to the value Merger instance. * @return an array of parameters that will be passed to a merger object. */ String[] mergerParam() default ""; }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
97619ef44a3c2551936e612c931ea962d02c1e07
fc4e0c9d846bddb5768fde39ee07284a668a1e75
/0589_N-arrTreePreorderTraversal/Solution.java
f2e98db8093b755ca78311e20db38b97d6a33727
[]
no_license
chialin-liu/Leetcode
d9f9ce94ac8cc3bdb71145d9fc59d7c2311e4ef7
bf5ee75fe266353ce574d8aa38973f325b239079
refs/heads/master
2020-06-19T09:48:08.036214
2020-03-14T09:55:00
2020-03-14T09:55:00
196,667,938
2
0
null
null
null
null
UTF-8
Java
false
false
708
java
/* // Definition for a Node. class Node { public int val; public List<Node> children; public Node() {} public Node(int _val,List<Node> _children) { val = _val; children = _children; } }; */ class Solution { public List<Integer> preorder(Node root) { List<Integer> res = new ArrayList<>(); Stack<Node> stack = new Stack<>(); if(root == null) return res; stack.push(root); while(!stack.isEmpty()){ Node cur = stack.pop(); res.add(cur.val); for(int i = cur.children.size() - 1; i >= 0; i--){ stack.push(cur.children.get(i)); } } return res; } }
[ "charles.ee96@g2.nctu.edu.tw" ]
charles.ee96@g2.nctu.edu.tw
2f24816c104e36ebb96a5191cc8645f5626119ae
4e9cc5d6eb8ec75e717404c7d65ab07e8f749c83
/sdk-hook/src/main/java/com/dingtalk/api/response/OapiSmartworkHrmEmployeeQuerypreentryResponse.java
9f4976adb53795a110e0efd5328e44c2411cf53a
[]
no_license
cvdnn/ZtoneNetwork
38878e5d21a17d6fe69a107cfc901d310418e230
2b985cc83eb56d690ec3b7964301aeb4fda7b817
refs/heads/master
2023-05-03T16:41:01.132198
2021-05-19T07:35:58
2021-05-19T07:35:58
92,125,735
0
1
null
null
null
null
UTF-8
Java
false
false
2,244
java
package com.dingtalk.api.response; import java.util.List; import com.taobao.api.internal.mapping.ApiField; import com.taobao.api.internal.mapping.ApiListField; import com.taobao.api.TaobaoObject; import com.taobao.api.TaobaoResponse; /** * TOP DingTalk-API: dingtalk.oapi.smartwork.hrm.employee.querypreentry response. * * @author top auto create * @since 1.0, null */ public class OapiSmartworkHrmEmployeeQuerypreentryResponse extends TaobaoResponse { private static final long serialVersionUID = 5586289311968433689L; /** * 错误码 */ @ApiField("errcode") private Long errcode; /** * 错误信息 */ @ApiField("errmsg") private String errmsg; /** * 分页结果 */ @ApiField("result") private PageResult result; /** * 调用结果 */ @ApiField("success") private Boolean success; public void setErrcode(Long errcode) { this.errcode = errcode; } public Long getErrcode( ) { return this.errcode; } public void setErrmsg(String errmsg) { this.errmsg = errmsg; } public String getErrmsg( ) { return this.errmsg; } public void setResult(PageResult result) { this.result = result; } public PageResult getResult( ) { return this.result; } public void setSuccess(Boolean success) { this.success = success; } public Boolean getSuccess( ) { return this.success; } public boolean isSuccess() { return getErrcode() == null || getErrcode().equals(0L); } /** * 分页结果 * * @author top auto create * @since 1.0, null */ public static class PageResult extends TaobaoObject { private static final long serialVersionUID = 6558235124886928752L; /** * 数据结果列表 */ @ApiListField("data_list") @ApiField("string") private List<String> dataList; /** * 下一次分页调用的offset值,当返回结果里没有nextCursor时,表示分页结束 */ @ApiField("next_cursor") private Long nextCursor; public List<String> getDataList() { return this.dataList; } public void setDataList(List<String> dataList) { this.dataList = dataList; } public Long getNextCursor() { return this.nextCursor; } public void setNextCursor(Long nextCursor) { this.nextCursor = nextCursor; } } }
[ "cvvdnn@gmail.com" ]
cvvdnn@gmail.com
055fcb75004318ea9635ede72c8d35f83dc52af3
cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b
/apps_final/names.of.allah/apk/com/appyet/manager/bb.java
33a1f6a49c90d69fdfabd80e463b4f5a0320a2a8
[]
no_license
linux86/AndoirdSecurity
3165de73b37f53070cd6b435e180a2cb58d6f672
1e72a3c1f7a72ea9cd12048d9874a8651e0aede7
refs/heads/master
2021-01-11T01:20:58.986651
2016-04-05T17:14:26
2016-04-05T17:14:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,860
java
package com.appyet.manager; import android.content.Intent; import android.media.MediaPlayer; import android.media.MediaPlayer.OnPreparedListener; import android.widget.ImageButton; import com.appyet.activity.MediaPlayerActivity; import com.appyet.context.ApplicationContext; import com.appyet.data.DatabaseHelper; import com.appyet.data.FeedItem; import com.appyet.service.MediaService; import com.j256.ormlite.misc.TransactionManager; final class bb implements MediaPlayer.OnPreparedListener { bb(as paramas) {} public final void onPrepared(MediaPlayer paramMediaPlayer) { for (;;) { try { as.e(a); Long localLong; int i; if (as.f(a) != null) { as.a(a, new MediaProgressNotification(as.g(a), as.f(a).getDuration())); if (as.h(a) == null) { break label492; } if ((as.h(a).getEnclosureDuration() == null) || (as.h(a).getEnclosureDuration().intValue() == 0) || (as.h(a).getEnclosureDuration().intValue() >= as.f(a).getDuration() + as.f(a).getDuration() / 200.0F) || (as.h(a).getEnclosureDuration().intValue() <= as.f(a).getDuration() - as.f(a).getDuration() / 200.0F)) { paramMediaPlayer = ga).h; localLong = as.h(a).getFeedItemId(); i = as.f(a).getDuration(); } } try { TransactionManager.callInTransaction(b.getConnectionSource(), new l(paramMediaPlayer, Integer.valueOf(i), localLong)); as.h(a).setEnclosureDuration(Integer.valueOf(as.f(a).getDuration())); if ((as.h(a).getEnclosureCurrentPosition() != null) && (as.h(a).getEnclosureCurrentPosition().intValue() < as.f(a).getDuration() - as.f(a).getDuration() / 200.0F)) { as.f(a).seekTo(as.h(a).getEnclosureCurrentPosition().intValue()); as.f(a).start(); if (as.j(a) != null) { ((ImageButton)as.j(a).findViewById(2131361995)).setImageResource(2130837738); } a.i(); as.k(a); a.l(); as.l(a); as.m(a); as.a(a, new Intent(as.g(a), MediaService.class)); as.g(a).startService(as.n(a)); as.o(a); return; } } catch (Exception paramMediaPlayer) { paramMediaPlayer = paramMediaPlayer; com.appyet.d.d.a(paramMediaPlayer); continue; } finally {} as.f(a).start(); } catch (Exception paramMediaPlayer) { com.appyet.d.d.a(paramMediaPlayer); return; } continue; label492: if (as.i(a) != null) { as.f(a).start(); } } } } /* Location: * Qualified Name: com.appyet.manager.bb * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "i@xuzhao.net" ]
i@xuzhao.net
ad1a6b23997a3d3945fcfbced88eee35647f6a09
51f57e7977e5595309987ebf6d36c8613862d4a7
/pac4j-core/src/main/java/org/pac4j/core/authorization/authorizer/AbstractRequireElementAuthorizer.java
3fb1cc1af5356f81919e298e872cd182c876abb7
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
ohioit/pac4j
f6f8ade77ab508687af7d1fa3fb0f2dbaa936304
6707db929c3fdc15fc699a727752bb4d7700b6bf
refs/heads/master
2021-01-12T16:50:01.487397
2016-03-30T05:46:46
2016-03-30T05:46:46
54,985,464
0
0
null
2016-03-29T15:03:01
2016-03-29T15:03:01
null
UTF-8
Java
false
false
1,440
java
package org.pac4j.core.authorization.authorizer; import org.pac4j.core.context.WebContext; import org.pac4j.core.exception.RequiresHttpAction; import org.pac4j.core.profile.UserProfile; import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; /** * An authorizer to require elements. * * @author Jerome Leleu * @since 1.8.1 */ public abstract class AbstractRequireElementAuthorizer<E extends Object, U extends UserProfile> extends SingleProfileAuthorizer<U> { protected Set<E> elements; /** * Check a specific element. * * @param context the web context * @param profile the profile * @param element the element to check * @return whether it is authorized for this element * @throws RequiresHttpAction whether an additional HTTP action is required */ protected abstract boolean check(final WebContext context, final U profile, final E element) throws RequiresHttpAction; public Set<E> getElements() { return elements; } public void setElements(final Set<E> elements) { this.elements = elements; } public void setElements(final List<E> elements) { if (elements != null) { this.elements = new HashSet<>(elements); } } public void setElements(final E... elements) { if (elements != null) { setElements(Arrays.asList(elements)); } } }
[ "leleuj@gmail.com" ]
leleuj@gmail.com
6b4e1db30555b47913c074184a7c9e30a8ce0108
e506171a9f6ba23692a200dac6c1782aac6fc96b
/src/main/java/leetcode/_1351__1400/_1391/Demo01.java
33bd7bc07bee2a4425fdf157c4c490148fd3d7a2
[]
no_license
minatoyukina/java-note
03bfd337c9b871103553dc4c230ae68a98552e83
9cd34686651945df748144a9fd6d7917e2be097f
refs/heads/master
2023-08-18T03:18:26.235678
2023-08-15T06:02:21
2023-08-15T06:02:21
174,096,999
0
0
null
2023-06-14T22:29:27
2019-03-06T07:45:47
Java
UTF-8
Java
false
false
1,939
java
package leetcode._1391; import org.junit.Test; import java.util.HashSet; import java.util.Set; public class Demo01 { @Test public void test() { System.out.println(hasValidPath(new int[][]{ new int[]{6, 1, 3}, new int[]{4, 1, 5}, })); System.out.println(hasValidPath(new int[][]{ new int[]{4, 1}, new int[]{6, 1}, })); } private boolean hasValidPath(int[][] grid) { int[] s1 = new int[]{1, 3}; int[] s2 = new int[]{2, 4}; int[] s3 = new int[]{1, 4}; int[] s4 = new int[]{3, 4}; int[] s5 = new int[]{1, 2}; int[] s6 = new int[]{2, 3}; int[][] ss = new int[][]{s1, s2, s3, s4, s5, s6}; int x = 0, y = 0; int start = ss[grid[x][y] - 1][0]; int end = ss[grid[x][y] - 1][1]; return test(grid, ss, start, end) || test(grid, ss, end, start); } private boolean test(int[][] grid, int[][] ss, int start, int end) { int n = grid.length * grid[0].length; int x = 0, y = 0; Set<String> set = new HashSet<>(); for (int i = 0; i < n; i++) { set.add(x + "-" + y); int[] s; try { s = ss[grid[x][y] - 1]; } catch (Exception e) { return set.contains(grid.length - 1 + "-" + (grid[0].length - 1)); } if (i > 0 && s[0] != start && s[1] != start) return false; if (i > 0) { if (start == s[0]) { end = s[1]; } else { end = s[0]; } } if (end == 1) y--; if (end == 2) x--; if (end == 3) y++; if (end == 4) x++; start = end > 2 ? end - 2 : end + 2; } return set.contains(grid.length - 1 + "-" + (grid[0].length - 1)); } }
[ "1096445518@qq.com" ]
1096445518@qq.com
b15f53d143a620b1d3c6169a4e0157d7898c8644
87840baf7ebe8930a99ae9fc66add2283ecd27ee
/spring-data-redis/src/test/java/org/springframework/data/redis/cache/RedisCacheTest.java
c53f6fdbbe41ef05f3e8226f83cfec7fcd6276ce
[]
no_license
eliaidi/self-finished
0e488c6ddab5a021f22e3cdc051eff0cbb7d2840
16800cb049d8ea332d37c7e42f93ddf474351244
refs/heads/master
2020-07-18T06:11:56.308268
2015-05-18T02:41:26
2015-05-18T02:41:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,648
java
/* * Copyright 2011-2014 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.data.redis.cache; import static org.hamcrest.core.IsEqual.*; import static org.hamcrest.core.IsInstanceOf.*; import static org.hamcrest.core.IsNot.*; import static org.hamcrest.core.IsNull.*; import static org.hamcrest.core.IsSame.*; import static org.junit.Assert.*; import static org.junit.Assume.*; import static org.springframework.data.redis.matcher.RedisTestMatchers.*; import java.util.Collection; import java.util.concurrent.CountDownLatch; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicBoolean; import org.junit.AfterClass; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.Parameterized; import org.junit.runners.Parameterized.Parameters; import org.springframework.cache.Cache; import org.springframework.cache.Cache.ValueWrapper; import org.springframework.data.redis.ConnectionFactoryTracker; import org.springframework.data.redis.ObjectFactory; import org.springframework.data.redis.core.AbstractOperationsTestParams; import org.springframework.data.redis.core.RedisTemplate; /** * @author Costin Leau * @author Jennifer Hickey * @author Christoph Strobl */ @SuppressWarnings("rawtypes") @RunWith(Parameterized.class) public class RedisCacheTest extends AbstractNativeCacheTest<RedisTemplate> { private ObjectFactory<Object> keyFactory; private ObjectFactory<Object> valueFactory; private RedisTemplate template; public RedisCacheTest(RedisTemplate template, ObjectFactory<Object> keyFactory, ObjectFactory<Object> valueFactory) { this.keyFactory = keyFactory; this.valueFactory = valueFactory; this.template = template; ConnectionFactoryTracker.add(template.getConnectionFactory()); } @Parameters public static Collection<Object[]> testParams() { return AbstractOperationsTestParams.testParams(); } @Override @SuppressWarnings("unchecked") protected RedisCache createCache(RedisTemplate nativeCache) { return new RedisCache(CACHE_NAME, CACHE_NAME.concat(":").getBytes(), nativeCache, TimeUnit.MINUTES.toSeconds(10)); } @Override protected RedisTemplate createNativeCache() throws Exception { return template; } @Override @Before public void setUp() throws Exception { ConnectionFactoryTracker.add(template.getConnectionFactory()); super.setUp(); } @AfterClass public static void cleanUp() { ConnectionFactoryTracker.cleanUp(); } @Override protected Object getValue() { return valueFactory.instance(); } @Override protected Object getKey() { return keyFactory.instance(); } @Test public void testConcurrentRead() throws Exception { final Object key1 = getKey(); final Object value1 = getValue(); final Object k1 = getKey(); final Object v1 = getValue(); final Object key2 = getKey(); final Object value2 = getValue(); final Object k2 = getKey(); final Object v2 = getValue(); final AtomicBoolean failed = new AtomicBoolean(true); cache.put(key1, value1); cache.put(key2, value2); Thread th = new Thread(new Runnable() { @Override public void run() { cache.clear(); cache.put(k1, v1); cache.put(k2, v2); failed.set(v1.equals(cache.get(k1))); } }, "concurrent-cache-access"); th.start(); th.join(); assertFalse(failed.get()); final Object key3 = getKey(); final Object key4 = getKey(); final Object value3 = getValue(); final Object value4 = getValue(); cache.put(key3, value3); cache.put(key4, value4); assertNull(cache.get(key1)); assertNull(cache.get(key2)); ValueWrapper valueWrapper = cache.get(k1); assertNotNull(valueWrapper); assertThat(valueWrapper.get(), isEqual(v1)); } @Override @Test public void testCacheName() throws Exception { RedisCacheManager redisCM = new RedisCacheManager(template); redisCM.afterPropertiesSet(); String cacheName = "s2gx11"; Cache cache = redisCM.getCache(cacheName); assertNotNull(cache); assertTrue(redisCM.getCacheNames().contains(cacheName)); } @Test public void testGetWhileClear() throws InterruptedException { final Object key1 = getKey(); final Object value1 = getValue(); int numTries = 10; final AtomicBoolean monitorStateException = new AtomicBoolean(false); final CountDownLatch latch = new CountDownLatch(numTries); Runnable clearCache = new Runnable() { @Override public void run() { cache.clear(); } }; Runnable putCache = new Runnable() { @Override public void run() { try { cache.put(key1, value1); } catch (IllegalMonitorStateException e) { monitorStateException.set(true); } finally { latch.countDown(); } } }; for (int i = 0; i < numTries; i++) { new Thread(clearCache).start(); new Thread(putCache).start(); } latch.await(); assertFalse(monitorStateException.get()); } /** * @see DATAREDIS-243 */ @Test public void testCacheGetShouldReturnCachedInstance() { assumeThat(cache, instanceOf(RedisCache.class)); Object key = getKey(); Object value = getValue(); cache.put(key, value); assertThat(value, isEqual(((RedisCache) cache).get(key, Object.class))); } /** * @see DATAREDIS-243 */ @Test public void testCacheGetShouldRetunInstanceOfCorrectType() { assumeThat(cache, instanceOf(RedisCache.class)); Object key = getKey(); Object value = getValue(); cache.put(key, value); RedisCache redisCache = (RedisCache) cache; assertThat(redisCache.get(key, value.getClass()), instanceOf(value.getClass())); } /** * @see DATAREDIS-243 */ @Test(expected = ClassCastException.class) public void testCacheGetShouldThrowExceptionOnInvalidType() { assumeThat(cache, instanceOf(RedisCache.class)); Object key = getKey(); Object value = getValue(); cache.put(key, value); RedisCache redisCache = (RedisCache) cache; @SuppressWarnings("unused") Cache retrievedObject = redisCache.get(key, Cache.class); } /** * @see DATAREDIS-243 */ @Test public void testCacheGetShouldReturnNullIfNoCachedValueFound() { assumeThat(cache, instanceOf(RedisCache.class)); Object key = getKey(); Object value = getValue(); cache.put(key, value); RedisCache redisCache = (RedisCache) cache; Object invalidKey = template.getKeySerializer() == null ? "spring-data-redis".getBytes() : "spring-data-redis"; assertThat(redisCache.get(invalidKey, value.getClass()), nullValue()); } /** * @see DATAREDIS-344 */ @SuppressWarnings("unchecked") @Test public void putIfAbsentShouldSetValueOnlyIfNotPresent() { assumeThat(cache, instanceOf(RedisCache.class)); RedisCache redisCache = (RedisCache) cache; Object key = getKey(); template.delete(key); Object value = getValue(); ValueWrapper wrapper = redisCache.putIfAbsent(key, value); assertThat(wrapper.get(), sameInstance(value)); ValueWrapper wrapper2 = redisCache.putIfAbsent(key, value); if (!(value instanceof Number)) { assertThat(wrapper2.get(), not(sameInstance(value))); } assertThat(wrapper2.get(), equalTo(value)); } }
[ "zhangjunfang0505@163.com" ]
zhangjunfang0505@163.com
4b0e9038d61eaae86fd63399b7800d48ac515d61
4d01cc94f6039708c986b8ef9dd33d5c67558389
/src/com/bruce/util/ckeditor/CKEditorUploadServlet.java
51aed30a4f037d08e673f2d2f85dfe7cde1f7d78
[]
no_license
liuhouer/Task
7f86b8bc6afb239ffc3baac135e6d45e511aa612
f822ae0a671e30b2c45bcd823294136ac2f94de8
refs/heads/master
2021-01-10T08:44:20.104816
2015-10-19T10:50:42
2015-10-19T10:50:42
44,527,777
1
0
null
null
null
null
UTF-8
Java
false
false
6,990
java
package com.bruce.util.ckeditor; import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Date; import java.util.HashMap; import java.util.Hashtable; import java.util.Iterator; import java.util.List; import java.util.Map; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.fileupload.FileItem; import org.apache.commons.fileupload.FileItemFactory; import org.apache.commons.fileupload.disk.DiskFileItemFactory; import org.apache.commons.fileupload.servlet.ServletFileUpload; public class CKEditorUploadServlet extends HttpServlet { /** * */ private static final long serialVersionUID = 1L; private static String baseDir; private static boolean debug = false; private static boolean enabled = false; private static Hashtable<String, ArrayList<String>> allowedExtensions; private static Hashtable<String, ArrayList<String>> deniedExtensions; private static SimpleDateFormat dirFormatter; private static SimpleDateFormat fileFormatter; /** * Servlet初始化方法 */ public void init() throws ServletException { debug = (new Boolean(getInitParameter("debug"))).booleanValue(); if (debug) System.out .println("\r\n---- SimpleUploaderServlet initialization started ----"); dirFormatter = new SimpleDateFormat("yyyyMM"); fileFormatter = new SimpleDateFormat("yyyyMMddHHmmssSSS"); baseDir = getInitParameter("baseDir"); enabled = (new Boolean(getInitParameter("enabled"))).booleanValue(); if (baseDir == null) baseDir = "/UserFiles/"; String realBaseDir = getServletContext().getRealPath(baseDir); File baseFile = new File(realBaseDir); if (!baseFile.exists()) { baseFile.mkdirs(); } allowedExtensions = new Hashtable<String, ArrayList<String>>(3); deniedExtensions = new Hashtable<String, ArrayList<String>>(3); allowedExtensions.put("File", stringToArrayList(getInitParameter("AllowedExtensionsFile"))); deniedExtensions.put("File", stringToArrayList(getInitParameter("DeniedExtensionsFile"))); allowedExtensions.put("Image", stringToArrayList(getInitParameter("AllowedExtensionsImage"))); deniedExtensions.put("Image", stringToArrayList(getInitParameter("DeniedExtensionsImage"))); allowedExtensions.put("Flash", stringToArrayList(getInitParameter("AllowedExtensionsFlash"))); deniedExtensions.put("Flash", stringToArrayList(getInitParameter("DeniedExtensionsFlash"))); if (debug) System.out .println("---- SimpleUploaderServlet initialization completed ----\r\n"); } public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { doPost(request, response); } public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { if (debug) System.out.println("--- BEGIN DOPOST ---"); response.setContentType("text/html; charset=UTF-8"); response.setHeader("Cache-Control", "no-cache"); PrintWriter out = response.getWriter(); String typeStr = request.getParameter("Type"); if (typeStr == null) { typeStr = "File"; } if (debug) System.out.println(typeStr); Date dNow = new Date(); String currentPath = baseDir + typeStr + "/" + dirFormatter.format(dNow); String currentDirPath = getServletContext().getRealPath(currentPath); File dirTest = new File(currentDirPath); if (!dirTest.exists()) { dirTest.mkdirs(); } currentPath = request.getContextPath() + currentPath; if (debug) System.out.println(currentDirPath); String newName = ""; String fileUrl = ""; if (enabled) { FileItemFactory factory = new DiskFileItemFactory(); ServletFileUpload upload = new ServletFileUpload(factory); try { List items = upload.parseRequest(request); Map fields = new HashMap(); Iterator iter = items.iterator(); while (iter.hasNext()) { FileItem item = (FileItem) iter.next(); if (item.isFormField()) fields.put(item.getFieldName(), item.getString()); else fields.put(item.getFieldName(), item); } FileItem uplFile = (FileItem) fields.get("upload"); String fileNameLong = uplFile.getName(); fileNameLong = fileNameLong.replace('\\', '/'); String[] pathParts = fileNameLong.split("/"); String fileName = pathParts[pathParts.length - 1]; String ext = getExtension(fileName); fileName = fileFormatter.format(dNow) + "." + ext; String nameWithoutExt = getNameWithoutExtension(fileName); File pathToSave = new File(currentDirPath, fileName); fileUrl = currentPath + "/" + fileName; if (extIsAllowed(typeStr, ext)) { int counter = 1; while (pathToSave.exists()) { newName = nameWithoutExt + "_" + counter + "." + ext; fileUrl = currentPath + "/" + newName; pathToSave = new File(currentDirPath, newName); counter++; } uplFile.write(pathToSave); } else { if (debug) System.out.println("无效的文件类型: " + ext); } } catch (Exception ex) { if (debug) ex.printStackTrace(); } } else { if (debug) System.out.println("未开启CKEditor上传功能"); } String callback = request.getParameter("CKEditorFuncNum"); out.println("<script type=\"text/javascript\">"); out.println("window.parent.CKEDITOR.tools.callFunction(" + callback + ",'" + fileUrl + "',''" + ")"); out.println("</script>"); out.flush(); out.close(); if (debug) System.out.println("--- END DOPOST ---"); } /** * 获取文件名的方法 */ private static String getNameWithoutExtension(String fileName) { return fileName.substring(0, fileName.lastIndexOf(".")); } /** * 获取扩展名的方法 */ private String getExtension(String fileName) { return fileName.substring(fileName.lastIndexOf(".") + 1); } /** * 字符串像ArrayList转化的方法 */ private ArrayList<String> stringToArrayList(String str) { if (debug) System.out.println(str); String[] strArr = str.split("\\|"); ArrayList<String> tmp = new ArrayList<String>(); if (str.length() > 0) { for (int i = 0; i < strArr.length; ++i) { if (debug) System.out.println(i + " - " + strArr[i]); tmp.add(strArr[i].toLowerCase()); } } return tmp; } /** * 判断扩展名是否允许的方法 */ private boolean extIsAllowed(String fileType, String ext) { ext = ext.toLowerCase(); ArrayList<String> allowList = (ArrayList<String>) allowedExtensions.get(fileType); ArrayList<String> denyList = (ArrayList<String>) deniedExtensions.get(fileType); if (allowList.size() == 0) { if (denyList.contains(ext)) { return false; } else { return true; } } if (denyList.size() == 0) { if (allowList.contains(ext)) { return true; } else { return false; } } return false; } }
[ "654714226@qq.com" ]
654714226@qq.com
11345d59bc65d400cea2ddd2ceb3b68f325d840a
19156214d3c456e7aa9b34183a928ef144b3c206
/src/test-suite-dependencies/geotk-referencing-3.21-sources/src/main/java/org/geotoolkit/referencing/operation/transform/GridLoader.java
38edeb620a9a3f4f7212ceacc4fb19cce4c44980
[]
no_license
opengeospatial/teamengine-offline
85549dbab9ff681c4f6b09dfabce1e4b85ce4206
6b81fc3fc4647e8f68ba433701199b0e68fc36d2
refs/heads/master
2021-01-01T19:24:08.817030
2014-12-18T17:35:06
2014-12-18T17:35:06
21,212,109
0
0
null
null
null
null
UTF-8
Java
false
false
4,907
java
/* * Geotoolkit.org - An Open Source Java GIS Toolkit * http://www.geotoolkit.org * * (C) 2009-2012, Open Source Geospatial Foundation (OSGeo) * (C) 2009-2012, Geomatys * * 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; * version 2.1 of the License. * * 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 org.geotoolkit.referencing.operation.transform; import java.util.concurrent.Callable; import java.lang.reflect.UndeclaredThrowableException; import org.opengis.util.FactoryException; import org.geotoolkit.util.Utilities; import org.geotoolkit.util.collection.Cache; import org.geotoolkit.util.converter.Classes; /** * Base class for loaders of {@link GridTransform2D} data. * * @author Martin Desruisseaux (Geomatys) * @version 3.03 * * @since 3.03 * @module */ class GridLoader { /** * The cache of grids loaded so far. Keys are instances of the exact {@code GridLoader} class, * which values are instances of subclasses. Grids are retained by soft references only. */ private static final Cache<GridLoader,GridLoader> CACHE = new Cache<GridLoader,GridLoader>(4, 0, true); /** * The type of the grid loader. This is not necessarily the same than * {@link Object#getClass()}, since this {@code GridLoader} instance * may be used as a key for an other {@code GridLoader} instance of * that class. */ private final Class<? extends GridLoader> type; /** * Longitude and latitude grid shift file names. The object type can be either * {@link File} or {@link URL}. For NADCON grids, the longitude and latitude * grids are two distinct files. For NTv2 grids, they are the same file. */ Object longitudeGridFile, latitudeGridFile; /** * Creates a new grid loader of the given type. * * @param type The type of the grid loader. */ GridLoader(final Class<? extends GridLoader> type) { this.type = type; } /** * If a loader of the given type is cached for the given files, returns that loader. * Otherwise creates a new loader and caches it for future reuse. * * @param <T> The grid loader type. * @param type The grid loader type. * @param longitudeGridFile The file with longitude data. * @param latitudeGridFile The file with latitude data. May be the same than the longitude file. * @param creator The method to call if a new grid needs to be loaded. * @return The cached or the newly created loader. * @throws FactoryException If an error occurred while creating the loader. */ protected static <T extends GridLoader> T loadIfAbsent(final Class<T> type, final Object longitudeGridFile, final Object latitudeGridFile, final Callable<T> creator) throws FactoryException { final GridLoader key = new GridLoader(type); key.longitudeGridFile = longitudeGridFile; key.latitudeGridFile = latitudeGridFile; final GridLoader grid; try { grid = CACHE.getOrCreate(key, creator); } catch (FactoryException e) { throw e; } catch (RuntimeException e) { throw e; } catch (Exception e) { throw new UndeclaredThrowableException(e); } assert key.equals(grid); return type.cast(grid); } /** * Returns {@code true} if the given object is equals to the given {@code GridLoader}. * Only the source files and the type are compared. All other fields defined in subclasses * are considered derived informations. */ @Override public final boolean equals(final Object other) { if (other instanceof GridLoader) { final GridLoader that = (GridLoader) other; return Utilities.equals(type, that.type) && Utilities.equals(longitudeGridFile, that.longitudeGridFile) && Utilities.equals(latitudeGridFile, that.latitudeGridFile); } return false; } /** * Returns a hash code value for this grid loader. */ @Override public final int hashCode() { return Utilities.hash(longitudeGridFile, Utilities.hash(latitudeGridFile, type.hashCode())); } /** * Returns a string representation of this key. */ @Override public final String toString() { return Classes.getShortName(type) + "[\"" + longitudeGridFile + "\",\"" + latitudeGridFile + "\"]"; } }
[ "rjmartell@computer.org" ]
rjmartell@computer.org
eff2e30f717bc8286bfd58804caf0523e58c0aa7
c3381ece1e660f2d626480152349262a511aefb5
/icefrog-crypto/src/main/java/com/whaleal/icefrog/crypto/digest/otp/package-info.java
a9d403dac002247ef06b1badc0033c592ec8c025
[ "Apache-2.0" ]
permissive
whaleal/icefrog
775e02be5b2fc8d04df1dd490aa765232cb0e6a4
c8dc384a3de1ed17077ff61ba733b1e2f37e32ab
refs/heads/v1-dev
2022-07-27T01:27:52.624849
2022-06-20T13:38:12
2022-06-20T13:38:12
414,203,703
9
5
Apache-2.0
2022-06-20T14:08:57
2021-10-06T12:30:31
Java
UTF-8
Java
false
false
2,197
java
/** * OTP 是 One-Time Password的简写,表示一次性密码,(一次一密)。 * 名词解释 * OTP 是 One-Time Password的简写,表示一次性密码。 * * HOTP 是HMAC-based One-Time Password的简写,表示基于HMAC算法加密的一次性密码。 * * TOTP 是Time-based One-Time Password的简写,表示基于时间戳算法的一次性密码。 * * * * 基本介绍 *   TOTP 是时间同步,基于客户端的动态口令和动态口令验证服务器的时间比对,一般每60秒产生一个新口令,要求客户端和服务器能够十分精确的保持正确的时钟,客户端和服务端基于时间计算的动态口令才能一致。 *   HOTP 是事件同步,通过某一特定的事件次序及相同的种子值作为输入,通过HASH算法运算出一致的密码。 * <p> * 计算OTP串的公式: * <pre> * OTP(K,C) = Truncate(HMAC-SHA-1(K,C)) * K:表示秘钥串 * C:是一个数字,表示随机数 * Truncate:是一个函数,就是怎么截取加密后的串,并取加密后串的哪些字段组成一个数字。 * </pre> * <pre> * 动态密码的解决方案有以下几个优点: * 解决用户在密码的记忆与保存上的困难性。 * 由于密码只能使用一次,而且因为是动态产生,所以不可预测,也只有一次的使用有效性,可以大为提升使用的安全程度。 * 基于这些优点,有越来越多的银行金融业甚至是游戏业使用OTP解决方案,来提升保护其用户的安全性。 * </pre> * <pre> * 原理 * 动态密码的产生方式,主要是以时间差作为服务器与密码产生器的同步条件。 * 在需要登录的时候,就利用密码产生器产生动态密码,OTP一般分为计次使用以及计时使用两种,计次使用的OTP产出后,可在不限时间内使用; * 计时使用的OTP则可设置密码有效时间,从30秒到两分钟不等,而OTP在进行认证之后即废弃不用,下次认证必须使用新的密码,增加了试图不经授权访问有限制资源的难度。 * </pre> * * * * @author Looly * @author wh */ package com.whaleal.icefrog.crypto.digest.otp;
[ "hbn.king@gmail.com" ]
hbn.king@gmail.com
ebd63141ff4129a38311745e2f099c729bf4a12d
fa1408365e2e3f372aa61e7d1e5ea5afcd652199
/src/testcases/CWE197_Numeric_Truncation_Error/s01/CWE197_Numeric_Truncation_Error__int_File_to_short_68b.java
fde9238ffe35b5c3372dc5f9a2632b5d38875909
[]
no_license
bqcuong/Juliet-Test-Case
31e9c89c27bf54a07b7ba547eddd029287b2e191
e770f1c3969be76fdba5d7760e036f9ba060957d
refs/heads/master
2020-07-17T14:51:49.610703
2019-09-03T16:22:58
2019-09-03T16:22:58
206,039,578
1
2
null
null
null
null
UTF-8
Java
false
false
1,436
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE197_Numeric_Truncation_Error__int_File_to_short_68b.java Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml Template File: sources-sink-68b.tmpl.java */ /* * @description * CWE: 197 Numeric Truncation Error * BadSource: File Read data from file (named c:\data.txt) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * BadSink: to_short Convert data to a short * Flow Variant: 68 Data flow: data passed as a member variable in the "a" class, which is used by a method in another class in the same package * * */ package testcases.CWE197_Numeric_Truncation_Error.s01; import testcasesupport.*; public class CWE197_Numeric_Truncation_Error__int_File_to_short_68b { public void badSink() throws Throwable { int data = CWE197_Numeric_Truncation_Error__int_File_to_short_68a.data; { /* POTENTIAL FLAW: Convert data to a short, possibly causing a truncation error */ IO.writeLine((short)data); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink() throws Throwable { int data = CWE197_Numeric_Truncation_Error__int_File_to_short_68a.data; { /* POTENTIAL FLAW: Convert data to a short, possibly causing a truncation error */ IO.writeLine((short)data); } } }
[ "bqcuong2212@gmail.com" ]
bqcuong2212@gmail.com
d109047804678bcb7ca7099d301dba52710ca8aa
416ed26975cc93982e9895da5f2f447383bc5d9f
/main/boofcv-recognition/test/boofcv/alg/tracker/tld/TestTldNonMaximalSuppression.java
b3ef974695ad169543826477c42d43d58418e0d9
[ "LicenseRef-scancode-takuya-ooura", "Apache-2.0" ]
permissive
jmankhan/BoofCV
4cb99fbe19afcd35197003fc967c998e9c4875de
afbb6b1bf360092b3ee6e3ed5d0d2f9710d0e2da
refs/heads/SNAPSHOT
2021-01-20T03:29:46.088886
2017-05-06T18:13:40
2017-05-06T18:13:40
89,549,111
1
0
null
2017-04-27T02:54:45
2017-04-27T02:54:45
null
UTF-8
Java
false
false
1,800
java
/* * Copyright (c) 2011-2017, Peter Abeles. All Rights Reserved. * * This file is part of BoofCV (http://boofcv.org). * * 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 boofcv.alg.tracker.tld; import org.ddogleg.struct.FastQueue; import org.junit.Test; import static org.junit.Assert.*; /** * @author Peter Abeles */ public class TestTldNonMaximalSuppression { /** * Just tests the connections graph generated in process() */ @Test public void process() { TldNonMaximalSuppression alg = new TldNonMaximalSuppression(0.5); FastQueue<TldRegion> regions = new FastQueue<>(TldRegion.class, true); regions.grow().rect.set(0,100,10,120); regions.grow().rect.set(2,3,8,33); regions.grow().rect.set(0,100,9,119); regions.grow().rect.set(0,100,2,102); regions.get(0).confidence = 100; regions.get(1).confidence = 200; regions.get(2).confidence = 300; regions.get(3).confidence = 400; FastQueue<TldRegion> output = new FastQueue<>(TldRegion.class, true); alg.process(regions,output); assertEquals(output.size(), 3); FastQueue<TldNonMaximalSuppression.Connections> conn = alg.getConnections(); assertFalse(conn.data[0].maximum); assertTrue(conn.data[1].maximum); assertTrue(conn.data[2].maximum); assertTrue(conn.data[3].maximum); } }
[ "peter.abeles@gmail.com" ]
peter.abeles@gmail.com
098cbd533611366aaa5119d45a253c43642d5032
9b294c3bf262770e9bac252b018f4b6e9412e3ee
/camerazadas/source/apk/com.sonyericsson.android.camera/src-cfr-nocode/com/google/android/gms/drive/metadata/SearchableOrderedMetadataField.java
a888e31dd5aaf7a903b12bbdba7aca511926945e
[]
no_license
h265/camera
2c00f767002fd7dbb64ef4dc15ff667e493cd937
77b986a60f99c3909638a746c0ef62cca38e4235
refs/heads/master
2020-12-30T22:09:17.331958
2015-08-25T01:22:25
2015-08-25T01:22:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
247
java
/* * Decompiled with CFR 0_100. */ package com.google.android.gms.drive.metadata; import com.google.android.gms.drive.metadata.SearchableMetadataField; public interface SearchableOrderedMetadataField<T> extends SearchableMetadataField<T> { }
[ "jmrm@ua.pt" ]
jmrm@ua.pt
e55acf6f9d8bd7ec9ccbb80e83d17e5004362230
84e41905d2bf955eaae2a82d80eb8f77a59c5f63
/thinkwin-yunmeeting-service-cron-parent/thinkwin-yunmeeting-api-cron/src/main/java/com/thinkwin/cron/service/TimingTaskService.java
e3520f6cac66275fc6381ae880b3f57e26851f48
[]
no_license
moyu3390/wang
ac91803f34e04e55dd5f7d883f779ba736e96aa1
207c75752590bf6b3d7d58aedd9e6b3ccc9424d4
refs/heads/master
2022-01-14T22:36:19.096206
2018-08-10T09:50:07
2018-08-10T09:50:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package com.thinkwin.cron.service; /** * Created by Administrator on 2018/2/2 0002. */ public interface TimingTaskService { /** * 删除租户所有文件信息 * @param param */ public String deleteAllTenantFile(String param); /** * 处理数据库删除时未能删除的物理库的定时删除接口功能 */ public void delDBDate(); }
[ "173030685@qq.com" ]
173030685@qq.com
f064769cffd1cc95adae7875c26e42d90fdb0365
62a79f201652a0d628aeae37db13a0962c701502
/cors/src/test/java/com/shgx/cors/service/UserServiceImplTest.java
89b7a1f229434905570820d67c337ac36430be19
[]
no_license
guangxush/SpringBoot_CORS
5d09d0eb7d2cd4caced696e58091d5a131bfd5fa
a03a5da9d8022de4c58a3cf6d920acea00acf5ff
refs/heads/master
2021-07-11T04:03:41.013101
2019-09-01T05:20:07
2019-09-01T05:20:07
162,293,460
2
0
null
2020-07-01T22:17:22
2018-12-18T13:36:10
Java
UTF-8
Java
false
false
910
java
package com.shgx.cors.service; import com.shgx.cors.CorsApplication; import com.shgx.cors.model.User; import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(SpringJUnit4ClassRunner.class) @SpringBootTest(classes = CorsApplication.class) public class UserServiceImplTest { @Autowired UserService userService; @Test public void findUserNameByIdTest(){ String name = userService.findUserNameById(1L); System.out.println(name); Assert.assertNotNull(name); } @Test public void findUserByIdTest(){ Long uid = 1L; User user = userService.findUserById(uid); Assert.assertEquals(uid, user.getId()); } }
[ "guangxush@163.com" ]
guangxush@163.com
5232c07e037fc8a86cdf50683d81e0eb69b40aaa
f0568343ecd32379a6a2d598bda93fa419847584
/modules/dfp_axis/src/main/java/com/google/api/ads/dfp/axis/v201211/CustomFieldError.java
2844080691824d745b1b94bf4547e61b86eb8ebf
[ "Apache-2.0" ]
permissive
frankzwang/googleads-java-lib
bd098b7b61622bd50352ccca815c4de15c45a545
0cf942d2558754589a12b4d9daa5902d7499e43f
refs/heads/master
2021-01-20T23:20:53.380875
2014-07-02T19:14:30
2014-07-02T19:14:30
21,526,492
1
0
null
null
null
null
UTF-8
Java
false
false
4,333
java
/** * CustomFieldError.java * * This file was auto-generated from WSDL * by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter. */ package com.google.api.ads.dfp.axis.v201211; /** * Errors specific to editing custom fields */ public class CustomFieldError extends com.google.api.ads.dfp.axis.v201211.ApiError implements java.io.Serializable { /* The error reason represented by an enum. */ private com.google.api.ads.dfp.axis.v201211.CustomFieldErrorReason reason; public CustomFieldError() { } public CustomFieldError( java.lang.String fieldPath, java.lang.String trigger, java.lang.String errorString, java.lang.String apiErrorType, com.google.api.ads.dfp.axis.v201211.CustomFieldErrorReason reason) { super( fieldPath, trigger, errorString, apiErrorType); this.reason = reason; } /** * Gets the reason value for this CustomFieldError. * * @return reason * The error reason represented by an enum. */ public com.google.api.ads.dfp.axis.v201211.CustomFieldErrorReason getReason() { return reason; } /** * Sets the reason value for this CustomFieldError. * * @param reason * The error reason represented by an enum. */ public void setReason(com.google.api.ads.dfp.axis.v201211.CustomFieldErrorReason reason) { this.reason = reason; } private java.lang.Object __equalsCalc = null; public synchronized boolean equals(java.lang.Object obj) { if (!(obj instanceof CustomFieldError)) return false; CustomFieldError other = (CustomFieldError) obj; if (obj == null) return false; if (this == obj) return true; if (__equalsCalc != null) { return (__equalsCalc == obj); } __equalsCalc = obj; boolean _equals; _equals = super.equals(obj) && ((this.reason==null && other.getReason()==null) || (this.reason!=null && this.reason.equals(other.getReason()))); __equalsCalc = null; return _equals; } private boolean __hashCodeCalc = false; public synchronized int hashCode() { if (__hashCodeCalc) { return 0; } __hashCodeCalc = true; int _hashCode = super.hashCode(); if (getReason() != null) { _hashCode += getReason().hashCode(); } __hashCodeCalc = false; return _hashCode; } // Type metadata private static org.apache.axis.description.TypeDesc typeDesc = new org.apache.axis.description.TypeDesc(CustomFieldError.class, true); static { typeDesc.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201211", "CustomFieldError")); org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc(); elemField.setFieldName("reason"); elemField.setXmlName(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201211", "reason")); elemField.setXmlType(new javax.xml.namespace.QName("https://www.google.com/apis/ads/publisher/v201211", "CustomFieldError.Reason")); elemField.setMinOccurs(0); elemField.setNillable(false); typeDesc.addFieldDesc(elemField); } /** * Return type metadata object */ public static org.apache.axis.description.TypeDesc getTypeDesc() { return typeDesc; } /** * Get Custom Serializer */ public static org.apache.axis.encoding.Serializer getSerializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanSerializer( _javaType, _xmlType, typeDesc); } /** * Get Custom Deserializer */ public static org.apache.axis.encoding.Deserializer getDeserializer( java.lang.String mechType, java.lang.Class _javaType, javax.xml.namespace.QName _xmlType) { return new org.apache.axis.encoding.ser.BeanDeserializer( _javaType, _xmlType, typeDesc); } }
[ "jradcliff@google.com" ]
jradcliff@google.com
e296cfcd6a4bb11acc50b37454786550f9cbabb9
bbc0820c4d53fb9e29704dcd9a4eeb4c3c1ad011
/smartapp/src/main/java/com/jldata/smartframe/core/jdbc/PageSqlKit.java
a8d8ebb22b589b8b2f6ae36aea311f2321764b0e
[ "Apache-2.0" ]
permissive
qq57694878/smartframe
43b08940b827d46898e838b1e2eeef93600ca7de
1fee3104336d1582c3b5cccdcf5672cad8dcfee4
refs/heads/master
2020-03-07T08:59:13.631093
2018-07-26T07:09:10
2018-07-26T07:09:10
127,394,799
1
0
null
null
null
null
UTF-8
Java
false
false
2,480
java
package com.jldata.smartframe.core.jdbc; /** * PageSqlKit */ public class PageSqlKit { private static final int start = "select ".length(); private static final char NULL = 0; private static final char SIZE = 128; private static char[] charTable = buildCharTable(); private static char[] buildCharTable() { char[] ret = new char[SIZE]; for (char i=0; i<SIZE; i++) { ret[i] = NULL; } ret['('] = '('; ret[')'] = ')'; ret['f'] = 'f'; ret['F'] = 'f'; ret['r'] = 'r'; ret['R'] = 'r'; ret['o'] = 'o'; ret['O'] = 'o'; ret['m'] = 'm'; ret['M'] = 'm'; ret[' '] = ' '; ret['\r'] = ' '; ret['\n'] = ' '; ret['\t'] = ' '; return ret; } /** * 未来考虑处理字符串常量中的字符: * 1:select * from article where title = 'select * from' * 此例可以正常处理,因为在第一个 from 之处就会正确返回 * * 2:select (select x from t where y = 'select * from ...') as a from article * 此例无法正常处理,暂时交由 paginateByFullSql(...) * * 3:如果一定要处理上例中的问题,还要了解不同数据库有关字符串常量的定界符细节 */ private static int getIndexOfFrom(String sql) { int parenDepth = 0; char c; for (int i = start, end = sql.length() - 5; i < end; i++) { c = sql.charAt(i); if (c >= SIZE) { continue ; } c = charTable[c]; if (c == NULL) { continue ; } if (c == '(') { parenDepth++; continue ; } if (c == ')') { if (parenDepth == 0) { throw new RuntimeException("Can not match left paren '(' for right paren ')': " + sql); } parenDepth--; continue ; } if (parenDepth > 0) { continue ; } if (c == 'f' && charTable[sql.charAt(i + 1)] == 'r' && charTable[sql.charAt(i + 2)] == 'o' && charTable[sql.charAt(i + 3)] == 'm') { c = sql.charAt(i + 4); // 测试用例: "select count(*)from(select * from account limit 3) as t" if (charTable[c] == ' ' || c == '(') { // 判断 from 后方字符 c = sql.charAt(i - 1); if (charTable[c] == ' ' || c == ')') { // 判断 from 前方字符 return i; } } } } return -1; } public static String[] parsePageSql(String sql) { int index = getIndexOfFrom(sql); if (index == -1) { return null; } String[] ret = new String[2]; ret[0] = sql.substring(0, index); ret[1] = sql.substring(index); return ret; } }
[ "57694878@qq.com" ]
57694878@qq.com
0bc32880fa1bc7078714fd4f11572e88c990622c
10182b1d23494c878ac13e968cdbbe2ca9081a84
/src/test/java/com/github/bingoohuang/westcache/utils/ScheduledParserTest.java
89ce403a83a32405139c3961fadeae16572c0a83
[ "Apache-2.0" ]
permissive
bingoohuang/westcache
324fbbf4612c3209bbe41bec3c8a0d6f7592e9df
761be057c1252e9434a377824d34c5b7b3862d15
refs/heads/master
2022-12-22T02:09:13.215286
2022-12-19T09:46:22
2022-12-19T09:46:22
77,027,580
14
5
null
null
null
null
UTF-8
Java
false
false
5,435
java
package com.github.bingoohuang.westcache.utils; import org.joda.time.DateTime; import org.joda.time.format.DateTimeFormat; import org.joda.time.format.DateTimeFormatter; import org.junit.Test; import org.quartz.CronTrigger; import org.quartz.SimpleTrigger; import org.quartz.Trigger; import java.util.Date; import static com.google.common.truth.Truth.assertThat; /** * @author bingoohuang [bingoohuang@gmail.com] Created on 2017/1/16. */ public class ScheduledParserTest { @Test public void cron() { Trigger trigger = new ScheduledParser("0 20 * * * ?").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(CronTrigger.class); CronTrigger cronTrigger = (CronTrigger) trigger; assertThat(cronTrigger.getCronExpression()).isEqualTo("0 20 * * * ?"); } @Test public void at() { Trigger trigger = new ScheduledParser("At 01:20").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(CronTrigger.class); CronTrigger cronTrigger = (CronTrigger) trigger; assertThat(cronTrigger.getCronExpression()).isEqualTo("0 20 1 ? * *"); } @Test public void atEvery() { Trigger trigger = new ScheduledParser("At ??:20").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(CronTrigger.class); CronTrigger cronTrigger = (CronTrigger) trigger; assertThat(cronTrigger.getCronExpression()).isEqualTo("0 20 * * * ?"); } @Test public void everyMinutes() { Trigger trigger = new ScheduledParser("Every 20 minutes").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(SimpleTrigger.class); SimpleTrigger simpleTrigger = (SimpleTrigger) trigger; assertThat(simpleTrigger.getRepeatInterval()).isEqualTo(20L * 60 * 1000); } @Test public void everyMinutesFromTo() { Trigger trigger = new ScheduledParser("Every 20 minutes from 2016-10-10 to 2217-10-12").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isEqualTo(formatter.parseDateTime("2217-10-12 23:59:59").toDate()); assertThat(trigger).isInstanceOf(SimpleTrigger.class); SimpleTrigger simpleTrigger = (SimpleTrigger) trigger; assertThat(simpleTrigger.getRepeatInterval()).isEqualTo(20L * 60 * 1000); } @Test public void everyMinutesFrom() { DateTimeFormatter dayFormatter = DateTimeFormat.forPattern("yyyy-MM-dd"); DateTime tomorrow = DateTime.now().plusDays(1).withTimeAtStartOfDay(); String tomorrowStr = tomorrow.toString(dayFormatter); Trigger trigger = new ScheduledParser("0 20 * * * ? from " + tomorrowStr).parse(); assertThat(trigger.getStartTime()).isEqualTo(tomorrow.toDate()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(CronTrigger.class); CronTrigger cronTrigger = (CronTrigger) trigger; assertThat(cronTrigger.getCronExpression()).isEqualTo("0 20 * * * ?"); } static DateTimeFormatter formatter = DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss"); @Test public void everyMinutesTo() { Trigger trigger = new ScheduledParser("At ??:20 to 2217-10-12").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isEqualTo(formatter.parseDateTime("2217-10-12 23:59:59").toDate()); assertThat(trigger).isInstanceOf(CronTrigger.class); CronTrigger cronTrigger = (CronTrigger) trigger; assertThat(cronTrigger.getCronExpression()).isEqualTo("0 20 * * * ?"); } @Test public void everySeconds() { Trigger trigger = new ScheduledParser("Every 20 seconds").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(SimpleTrigger.class); SimpleTrigger simpleTrigger = (SimpleTrigger) trigger; assertThat(simpleTrigger.getRepeatInterval()).isEqualTo(20L * 1000); } @Test public void everyHourse() { Trigger trigger = new ScheduledParser("Every 20 hours").parse(); assertThat(trigger.getStartTime()).isAtMost(new Date()); assertThat(trigger.getEndTime()).isNull(); assertThat(trigger).isInstanceOf(SimpleTrigger.class); SimpleTrigger simpleTrigger = (SimpleTrigger) trigger; assertThat(simpleTrigger.getRepeatInterval()).isEqualTo(20L * 60 * 60 * 1000); } @Test(expected = RuntimeException.class) public void empty() { new ScheduledParser(null); } @Test public void badFromTo() { new ScheduledParser("Every 20 minutes from 2018-10-10 to 2217-10-12").parse(); } @Test(expected = RuntimeException.class) public void badAt() { new ScheduledParser("At 1234").parse(); } @Test(expected = RuntimeException.class) public void badEvery() { new ScheduledParser("Every 1234").parse(); } }
[ "bingoo.huang@gmail.com" ]
bingoo.huang@gmail.com
a7a1858d0f21db9e9f892483b88ccaa5d69f11f6
42427affa61f1eef0e428dc1bc05a233886f8d6c
/base/src/com/google/idea/blaze/base/sync/libraries/ExternalLibraryManager.java
e167eef1671ba9197b1c34b0f491f47ae7245b87
[ "Apache-2.0" ]
permissive
hlopko/intellij
bd5b29a1e258b4ec23772d55fef91ebd57188025
adebffd92637ce28c0e56b9a01d435777454c60d
refs/heads/master
2020-05-29T21:01:02.861514
2019-06-20T17:08:58
2019-06-20T17:09:44
189,366,883
0
0
Apache-2.0
2019-05-30T07:27:31
2019-05-30T07:27:30
null
UTF-8
Java
false
false
7,379
java
/* * Copyright 2019 The Bazel Authors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.idea.blaze.base.sync.libraries; import static com.google.common.collect.ImmutableSet.toImmutableSet; import com.google.common.collect.ImmutableList; import com.google.common.collect.ImmutableMap; import com.google.common.collect.ImmutableSet; import com.google.idea.blaze.base.io.VfsUtils; import com.google.idea.blaze.base.model.BlazeProjectData; import com.google.idea.blaze.base.prefetch.PrefetchIndexingTask; import com.google.idea.blaze.base.prefetch.PrefetchService; import com.google.idea.blaze.base.projectview.ProjectViewSet; import com.google.idea.blaze.base.scope.BlazeContext; import com.google.idea.blaze.base.settings.BlazeImportSettings; import com.google.idea.blaze.base.sync.SyncListener; import com.google.idea.blaze.base.sync.SyncMode; import com.google.idea.blaze.base.sync.SyncResult; import com.google.idea.common.experiments.BoolExperiment; import com.intellij.ide.FrameStateListener; import com.intellij.ide.FrameStateManager; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.application.TransactionGuard; import com.intellij.openapi.application.WriteAction; import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.project.Project; import com.intellij.openapi.roots.AdditionalLibraryRootsProvider; import com.intellij.openapi.roots.SyntheticLibrary; import com.intellij.openapi.roots.ex.ProjectRootManagerEx; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.EmptyRunnable; import com.intellij.openapi.vfs.VirtualFile; import java.io.File; import java.util.Collection; import java.util.Objects; import java.util.concurrent.ExecutionException; import java.util.concurrent.Future; /** Updates {@link BlazeExternalSyntheticLibrary}s after sync and on frame activation. */ public class ExternalLibraryManager { private static final BoolExperiment reindexExternalSyntheticLibraryAfterUpdate = new BoolExperiment("reindex.external.synthetic.library.after.update", true); private final Project project; private volatile ImmutableMap<Class<? extends BlazeExternalLibraryProvider>, LibraryState> libraries; private static class LibraryState { BlazeExternalLibraryProvider provider; BlazeExternalSyntheticLibrary library; ImmutableList<File> files; LibraryState(BlazeExternalLibraryProvider provider, ImmutableList<File> files) { this.provider = provider; this.library = new BlazeExternalSyntheticLibrary(provider.getLibraryName()); this.files = files; } } public static ExternalLibraryManager getInstance(Project project) { return ServiceManager.getService(project, ExternalLibraryManager.class); } ExternalLibraryManager(Project project) { this.project = project; this.libraries = ImmutableMap.of(); FrameStateListener listener = new FrameStateListener() { @Override public void onFrameActivated() { ApplicationManager.getApplication() .executeOnPooledThread(ExternalLibraryManager.this::updateLibraries); } }; FrameStateManager.getInstance().addListener(listener); Disposer.register(project, () -> FrameStateManager.getInstance().removeListener(listener)); } public ImmutableList<SyntheticLibrary> getLibrary( Class<? extends BlazeExternalLibraryProvider> providerClass) { LibraryState state = libraries.get(providerClass); return state != null ? ImmutableList.of(state.library) : ImmutableList.of(); } private void initialize(BlazeProjectData projectData) { ImmutableMap.Builder<Class<? extends BlazeExternalLibraryProvider>, LibraryState> builder = ImmutableMap.builder(); for (AdditionalLibraryRootsProvider provider : AdditionalLibraryRootsProvider.EP_NAME.getExtensionList()) { if (!(provider instanceof BlazeExternalLibraryProvider)) { continue; } BlazeExternalLibraryProvider blazeProvider = (BlazeExternalLibraryProvider) provider; ImmutableList<File> files = blazeProvider.getLibraryFiles(project, projectData); if (!files.isEmpty()) { builder.put(blazeProvider.getClass(), new LibraryState(blazeProvider, files)); } } libraries = builder.build(); updateLibraries(); } private void updateLibraries() { ImmutableMap<Class<? extends BlazeExternalLibraryProvider>, LibraryState> libraries = this.libraries; if (libraries.isEmpty()) { return; } Future<?> future = PrefetchIndexingTask.submitPrefetchingTaskAndWait( project, PrefetchService.getInstance() .prefetchFiles( libraries.values().stream() .map(state -> state.files) .flatMap(Collection::stream) .collect(ImmutableList.toImmutableList()), false, false), "Prefetching external library files"); try { future.get(); } catch (InterruptedException | ExecutionException ignored) { // ignored } boolean updated = false; for (LibraryState state : libraries.values()) { ImmutableSet<VirtualFile> updatedFiles = state.files.stream() .map(VfsUtils::resolveVirtualFile) .filter(Objects::nonNull) .filter(VirtualFile::isValid) .collect(toImmutableSet()); BlazeExternalSyntheticLibrary library = state.library; if (!updatedFiles.equals(library.getSourceRoots())) { library.updateFiles(updatedFiles); updated = true; } } if (updated) { reindexRoots(); } } private void reindexRoots() { if (!reindexExternalSyntheticLibraryAfterUpdate.getValue()) { return; } TransactionGuard.submitTransaction( project, () -> WriteAction.run( () -> ProjectRootManagerEx.getInstanceEx(project) .makeRootsChange(EmptyRunnable.INSTANCE, false, true))); } static class Listener implements SyncListener { @Override public void onSyncComplete( Project project, BlazeContext context, BlazeImportSettings importSettings, ProjectViewSet projectViewSet, BlazeProjectData blazeProjectData, SyncMode syncMode, SyncResult syncResult) { if (syncMode == SyncMode.NO_BUILD && !ExternalLibraryManager.getInstance(project).libraries.isEmpty()) { return; } ApplicationManager.getApplication() .executeOnPooledThread( () -> ExternalLibraryManager.getInstance(project).initialize(blazeProjectData)); } } }
[ "copybara-worker@google.com" ]
copybara-worker@google.com
c084d1829b21314c257d06a6bda48c10b3a21133
74c0d9045182918895e5b4b429db4b0dff831784
/.svn/pristine/11/11173150c1f7d443a91e26e98011df500c3eba23.svn-base
1403bfc20d3bce1e21dd7946ed521abccf150feb
[]
no_license
yuyuliuyu/LAOBAO
c7d43c5e0bb62caacdb81b9417aee1382cd560d7
b7e832d53ed6fd148d235d70db7ba6e868c5ca29
refs/heads/master
2020-03-15T10:40:21.773695
2018-05-08T06:10:09
2018-05-08T06:10:09
132,104,336
0
0
null
null
null
null
UTF-8
Java
false
false
2,564
package com.lingnet.hcm.service.impl.check; import java.util.Map; import javax.annotation.Resource; import org.springframework.stereotype.Service; import com.lingnet.common.service.impl.BaseServiceImpl; import com.lingnet.hcm.dao.check.YearDayDao; import com.lingnet.hcm.entity.check.CkYearDay; import com.lingnet.hcm.service.check.YearDayService; /** * * @ClassName: YearDayServiceImpl * @Description: 全年白班班制service实现类 * @author wangqiang * @date 2017年4月14日 下午1:57:43 * */ @Service("yearDayService") public class YearDayServiceImpl extends BaseServiceImpl<CkYearDay, String> implements YearDayService{ @Resource(name = "yearDayDao") private YearDayDao yearDayDao; @Override public CkYearDay getDayInfoByCond(String thisYear, String thisMonth) { return yearDayDao.getDayInfoByCond(thisYear, thisMonth); } @Override public void updateInfo(Map<String, String> dataMap) { if (!dataMap.isEmpty() && dataMap.get("id") != null && !"".equals(dataMap.get("id"))){ CkYearDay yearDay = yearDayDao.get(dataMap.get("id")); yearDay.setDay1(dataMap.get("day1")); yearDay.setDay2(dataMap.get("day2")); yearDay.setDay3(dataMap.get("day3")); yearDay.setDay4(dataMap.get("day4")); yearDay.setDay5(dataMap.get("day5")); yearDay.setDay6(dataMap.get("day6")); yearDay.setDay7(dataMap.get("day7")); yearDay.setDay8(dataMap.get("day8")); yearDay.setDay9(dataMap.get("day9")); yearDay.setDay10(dataMap.get("day10")); yearDay.setDay11(dataMap.get("day11")); yearDay.setDay12(dataMap.get("day12")); yearDay.setDay13(dataMap.get("day13")); yearDay.setDay14(dataMap.get("day14")); yearDay.setDay15(dataMap.get("day15")); yearDay.setDay16(dataMap.get("day16")); yearDay.setDay17(dataMap.get("day17")); yearDay.setDay18(dataMap.get("day18")); yearDay.setDay19(dataMap.get("day19")); yearDay.setDay20(dataMap.get("day20")); yearDay.setDay21(dataMap.get("day21")); yearDay.setDay22(dataMap.get("day22")); yearDay.setDay23(dataMap.get("day23")); yearDay.setDay24(dataMap.get("day24")); yearDay.setDay25(dataMap.get("day25")); yearDay.setDay26(dataMap.get("day26")); yearDay.setDay27(dataMap.get("day27")); yearDay.setDay28(dataMap.get("day28")); if (dataMap.get("day29") != null){ yearDay.setDay29(dataMap.get("day29")); } if (dataMap.get("day30") != null){ yearDay.setDay30(dataMap.get("day30")); } if (dataMap.get("day31") != null){ yearDay.setDay31(dataMap.get("day31")); } yearDayDao.update(yearDay); } } }
[ "392544641@qq.com" ]
392544641@qq.com
35c9843af706277c34ec10945dcbac27fe7b2ae1
84a1777986c6d3771c0bdc685ca958cd7ebc2291
/src/main/java/co/com/codesoftware/servicio/contabilidad/ObtenerAsientoContable.java
7d6771630a1b79035cadb6f40125fc903e2896d4
[ "Apache-2.0" ]
permissive
codesoftware/NSIGEMCO
91bea6f4b87714b1582eb3f82c961f92413e1f01
f2dd7fe2081546edf605df14b74fc9940236452e
refs/heads/master
2021-03-27T13:05:36.940180
2019-03-11T21:12:31
2019-03-11T21:12:31
45,809,664
0
0
null
null
null
null
UTF-8
Java
false
false
1,250
java
package co.com.codesoftware.servicio.contabilidad; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; /** * <p>Clase Java para obtenerAsientoContable complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType name="obtenerAsientoContable"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="idTransCont" type="{http://www.w3.org/2001/XMLSchema}int"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "obtenerAsientoContable", propOrder = { "idTransCont" }) public class ObtenerAsientoContable { protected int idTransCont; /** * Obtiene el valor de la propiedad idTransCont. * */ public int getIdTransCont() { return idTransCont; } /** * Define el valor de la propiedad idTransCont. * */ public void setIdTransCont(int value) { this.idTransCont = value; } }
[ "jnsierrac@gmail.com" ]
jnsierrac@gmail.com
733364d65e8c14ae692155b3d27d514c51dc8a45
f632da5bfd1123ae6d1dadf705d84c794d63b23f
/src/main/java/com/nongxin/terminal/dao/push/WorkOrderQueryMapper.java
560481748416e44e35f6bf6bd1d551c47b8d0a30
[]
no_license
jcst-group/nongxin-admin-java
48b1c8746194c23102252a6368151a05c08ecbf2
36e8166cd547b1682b81388c6deb4203550c0f9d
refs/heads/master
2022-07-03T13:00:40.614424
2020-06-15T06:28:20
2020-06-15T06:28:20
248,426,275
0
2
null
2022-06-29T18:01:36
2020-03-19T06:21:08
Java
UTF-8
Java
false
false
265
java
package com.nongxin.terminal.dao.push; import com.nongxin.terminal.vo.push.CIDVo; import java.util.List; public interface WorkOrderQueryMapper { List<CIDVo> getUserCid(); String getFarmingName(Integer id); CIDVo getCidByWorkOrderId(Integer id); }
[ "331542397@qq.com" ]
331542397@qq.com
4c435c1e9640ce06811e94b9c575cb017a3f2bbe
ba44e8867d176d74a6ca0a681a4f454ca0b53cad
/resources/testscript/Workflow/CallActionOutSideMenu/CallAction_SelectCertificate_OutputKeyHelper.java
80c6433102505d463546566da305c8b02ae7de24
[]
no_license
eric2323223/FATPUS
1879e2fa105c7e7683afd269965d8b59a7e40894
989d2cf49127d88fdf787da5ca6650e2abd5a00e
refs/heads/master
2016-09-15T19:10:35.317021
2012-06-29T02:32:36
2012-06-29T02:32:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,409
java
// DO NOT EDIT: This file is automatically generated. // // Only the associated template file should be edited directly. // Helper class files are automatically regenerated from the template // files at various times, including record actions and test object // insertion actions. Any changes made directly to a helper class // file will be lost when automatically updated. package resources.testscript.Workflow.CallActionOutSideMenu; import com.rational.test.ft.object.interfaces.*; import com.rational.test.ft.object.interfaces.SAP.*; import com.rational.test.ft.object.interfaces.WPF.*; import com.rational.test.ft.object.interfaces.siebel.*; import com.rational.test.ft.object.interfaces.flex.*; import com.rational.test.ft.object.interfaces.dojo.*; import com.rational.test.ft.script.*; import com.rational.test.ft.vp.IFtVerificationPoint; /** * Script Name : <b>CallAction_SelectCertificate_OutputKey</b><br> * Generated : <b>2012/03/13 1:21:05 AM</b><br> * Description : Helper class for script<br> * Original Host : Windows XP x86 5.1 build 2600 Service Pack 2 <br> * * @since March 13, 2012 * @author eric */ public abstract class CallAction_SelectCertificate_OutputKeyHelper extends RationalTestScript { protected CallAction_SelectCertificate_OutputKeyHelper() { setScriptName("testscript.Workflow.CallActionOutSideMenu.CallAction_SelectCertificate_OutputKey"); } }
[ "eric2323223@gmail.com" ]
eric2323223@gmail.com
7ede7c2617d4e60b5c01c1b4ec8c54818840abcc
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
/com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/fpt.java
ef29c289627eebb74e4406e2e39acc8670489420
[]
no_license
tsuzcx/qq_apk
0d5e792c3c7351ab781957bac465c55c505caf61
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
refs/heads/main
2022-07-02T10:32:11.651957
2022-02-01T12:41:38
2022-02-01T12:41:38
453,860,108
36
9
null
2022-01-31T09:46:26
2022-01-31T02:43:22
Java
UTF-8
Java
false
false
5,460
java
package com.tencent.mm.protocal.protobuf; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.LinkedList; public final class fpt extends esc { public String Vpa; public boolean Vpm; public boolean Vpn; public aez abPD; public String wording; public boolean wtT; public String wuA; public int wuz; public final int op(int paramInt, Object... paramVarArgs) { AppMethodBeat.i(72601); if (paramInt == 0) { paramVarArgs = (i.a.a.c.a)paramVarArgs[0]; if (this.BaseResponse != null) { paramVarArgs.qD(1, this.BaseResponse.computeSize()); this.BaseResponse.writeFields(paramVarArgs); } paramVarArgs.bS(2, this.wuz); if (this.wuA != null) { paramVarArgs.g(3, this.wuA); } paramVarArgs.di(4, this.wtT); paramVarArgs.di(5, this.Vpm); if (this.Vpa != null) { paramVarArgs.g(6, this.Vpa); } if (this.wording != null) { paramVarArgs.g(7, this.wording); } paramVarArgs.di(11, this.Vpn); if (this.abPD != null) { paramVarArgs.qD(12, this.abPD.computeSize()); this.abPD.writeFields(paramVarArgs); } AppMethodBeat.o(72601); return 0; } if (paramInt == 1) { if (this.BaseResponse == null) { break label786; } } label786: for (paramInt = i.a.a.a.qC(1, this.BaseResponse.computeSize()) + 0;; paramInt = 0) { int i = paramInt + i.a.a.b.b.a.cJ(2, this.wuz); paramInt = i; if (this.wuA != null) { paramInt = i + i.a.a.b.b.a.h(3, this.wuA); } i = paramInt + (i.a.a.b.b.a.ko(4) + 1) + (i.a.a.b.b.a.ko(5) + 1); paramInt = i; if (this.Vpa != null) { paramInt = i + i.a.a.b.b.a.h(6, this.Vpa); } i = paramInt; if (this.wording != null) { i = paramInt + i.a.a.b.b.a.h(7, this.wording); } i += i.a.a.b.b.a.ko(11) + 1; paramInt = i; if (this.abPD != null) { paramInt = i + i.a.a.a.qC(12, this.abPD.computeSize()); } AppMethodBeat.o(72601); return paramInt; if (paramInt == 2) { paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler); for (paramInt = esc.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = esc.getNextFieldNumber(paramVarArgs)) { if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) { paramVarArgs.kFT(); } } AppMethodBeat.o(72601); return 0; } if (paramInt == 3) { Object localObject1 = (i.a.a.a.a)paramVarArgs[0]; fpt localfpt = (fpt)paramVarArgs[1]; paramInt = ((Integer)paramVarArgs[2]).intValue(); Object localObject2; switch (paramInt) { case 8: case 9: case 10: default: AppMethodBeat.o(72601); return -1; case 1: paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { localObject1 = (byte[])paramVarArgs.get(paramInt); localObject2 = new kd(); if ((localObject1 != null) && (localObject1.length > 0)) { ((kd)localObject2).parseFrom((byte[])localObject1); } localfpt.BaseResponse = ((kd)localObject2); paramInt += 1; } AppMethodBeat.o(72601); return 0; case 2: localfpt.wuz = ((i.a.a.a.a)localObject1).ajGk.aar(); AppMethodBeat.o(72601); return 0; case 3: localfpt.wuA = ((i.a.a.a.a)localObject1).ajGk.readString(); AppMethodBeat.o(72601); return 0; case 4: localfpt.wtT = ((i.a.a.a.a)localObject1).ajGk.aai(); AppMethodBeat.o(72601); return 0; case 5: localfpt.Vpm = ((i.a.a.a.a)localObject1).ajGk.aai(); AppMethodBeat.o(72601); return 0; case 6: localfpt.Vpa = ((i.a.a.a.a)localObject1).ajGk.readString(); AppMethodBeat.o(72601); return 0; case 7: localfpt.wording = ((i.a.a.a.a)localObject1).ajGk.readString(); AppMethodBeat.o(72601); return 0; case 11: localfpt.Vpn = ((i.a.a.a.a)localObject1).ajGk.aai(); AppMethodBeat.o(72601); return 0; } paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt); i = paramVarArgs.size(); paramInt = 0; while (paramInt < i) { localObject1 = (byte[])paramVarArgs.get(paramInt); localObject2 = new aez(); if ((localObject1 != null) && (localObject1.length > 0)) { ((aez)localObject2).parseFrom((byte[])localObject1); } localfpt.abPD = ((aez)localObject2); paramInt += 1; } AppMethodBeat.o(72601); return 0; } AppMethodBeat.o(72601); return -1; } } } /* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes5.jar * Qualified Name: com.tencent.mm.protocal.protobuf.fpt * JD-Core Version: 0.7.0.1 */
[ "98632993+tsuzcx@users.noreply.github.com" ]
98632993+tsuzcx@users.noreply.github.com
b0f2dfdd1be9f41af42534f1247262edb70cb1cb
bb1ebf98a78c932b55aa989ed29f596b7430d0c6
/modules/web/src/com/haulmont/cuba/web/gui/components/datagrid/DataGridSourceEventsDelegate.java
c89ab292d992126a943076a81b0d9a73688ba852
[ "Apache-2.0" ]
permissive
avifatal/cuba
bca5c7668e9bca5b1c29a500123b7970b5e919e7
5e1d6f495909166a9121b080f7d4f29ebee3bbfb
refs/heads/master
2020-03-31T02:26:43.602586
2018-10-05T12:08:54
2018-10-05T12:08:54
151,823,968
0
0
Apache-2.0
2018-10-06T09:18:28
2018-10-06T09:18:28
null
UTF-8
Java
false
false
653
java
package com.haulmont.cuba.web.gui.components.datagrid; import com.haulmont.cuba.gui.components.data.DataGridSource; /** * * {@link DataGridDataProvider} delegates event handling to an implementation of this interface. * * @param <I> items type */ public interface DataGridSourceEventsDelegate<I> { void dataGridSourceItemSetChanged(DataGridSource.ItemSetChangeEvent<I> event); void dataGridSourcePropertyValueChanged(DataGridSource.ValueChangeEvent<I> event); void dataGridSourceStateChanged(DataGridSource.StateChangeEvent<I> event); void dataGridSourceSelectedItemChanged(DataGridSource.SelectedItemChangeEvent<I> event); }
[ "gorelov@haulmont.com" ]
gorelov@haulmont.com
1a7f09839c266596d770fca95c5bca776d74e338
96781f27b749d353eba9d3dfd586cb832221d784
/src/mobi/hsz/idea/gitignore/lexer/GitignoreLexerAdapter.java
9cf66addbb1e5fe3e049db6bd192b1d72976bb69
[ "MIT" ]
permissive
mub/idea-gitignore
23f588e13ef78ef9b5c401eebb166d287a2bbc4b
5446b75257272fd36ec87cb49e5d0385bbbc8bde
refs/heads/master
2021-01-21T16:53:08.394001
2014-11-13T15:54:14
2014-11-13T15:54:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,668
java
/* * The MIT License (MIT) * * Copyright (c) today.year hsz Jakub Chrzanowski <jakub@hsz.mobi> * * 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 mobi.hsz.idea.gitignore.lexer; import com.intellij.lexer.FlexAdapter; import com.intellij.openapi.project.Project; import com.intellij.openapi.vfs.VirtualFile; import org.jetbrains.annotations.Nullable; public class GitignoreLexerAdapter extends FlexAdapter { public GitignoreLexerAdapter(Project project) { this(project, null); } public GitignoreLexerAdapter(Project project, @Nullable VirtualFile virtualFile) { super(new GitignoreLexer()); } }
[ "jakub@chrzanowski.info" ]
jakub@chrzanowski.info
c0c93d7cddfa2031a78a4fa42d1eb5f46b5e38fa
92c1674aacda6c550402a52a96281ff17cfe5cff
/module22/module10/module5/src/main/java/com/android/example/module22_module10_module5/ClassAAD.java
247c34690f58b3dc47bffb7fd2e715f75c34fe7a
[]
no_license
bingranl/android-benchmark-project
2815c926df6a377895bd02ad894455c8b8c6d4d5
28738e2a94406bd212c5f74a79179424dd72722a
refs/heads/main
2023-03-18T20:29:59.335650
2021-03-12T11:47:03
2021-03-12T11:47:03
336,009,838
0
0
null
null
null
null
UTF-8
Java
false
false
4,740
java
package com.android.example.module22_module10_module5; public class ClassAAD { private com.android.example.module22_module10_module2_module2.ClassAAF instance_var_1_0 = new com.android.example.module22_module10_module2_module2.ClassAAF(); private com.android.example.module22_module10_module2_module2.ClassAAB instance_var_1_1 = new com.android.example.module22_module10_module2_module2.ClassAAB(); private com.android.example.module22_module07_module16.ClassAAG instance_var_1_2 = new com.android.example.module22_module07_module16.ClassAAG(); public void method0( com.android.example.module22_module07_module16.ClassAAB param0, com.android.example.module22_module10_module1_module2.ClassAAF param1) throws Throwable { } public void method1( com.android.example.module22_module10_module4.ClassAAI param0) throws Throwable { java.util.Collections.emptyList().forEach( lambda0 -> { try { com.android.example.module06_module297_module1.ClassAAF local_var_3_0 = new com.android.example.module06_module297_module1.ClassAAF(); local_var_3_0.method1(new com.android.example.module06_module342_module3.ClassAAI()); } catch(Throwable e) { } // ignore }); com.android.example.module18_module2_module35_module5.ClassAAF local_var_2_1 = new com.android.example.module18_module2_module35_module5.ClassAAF(); local_var_2_1.method2(new com.android.example.module06_module353_module1.ClassAAJ(), new com.android.example.module06_module353_module1.ClassAAF(), new com.android.example.module06_module353_module1.ClassAAF(), new com.android.example.module06_module353_module1.ClassAAJ()); param0.method0(new com.android.example.module22_module07_module23.ClassAAC()); } public void method2( com.android.example.module22_module07_module16.ClassAAG param0, com.android.example.module07_module39_module3_module2.ClassAAJ param1, com.android.example.module22_module10_module2_module2.ClassAAB param2, com.android.example.module22_module10_module4.ClassAAC param3) throws Throwable { param0.method1("SomeString", "SomeString", "SomeString"); com.android.example.module06_module075_module4.ClassAAD local_var_2_4 = new com.android.example.module06_module075_module4.ClassAAD(); local_var_2_4.method0(new com.android.example.module15_module45_module1.ClassAAJ(), new com.android.example.module15_module45_module1.ClassAAE(), new com.android.example.module15_module45_module1.ClassAAJ(), new com.android.example.module15_module45_module1.ClassAAI()); com.android.example.module22_module01_module04_module1.ClassAAG local_var_2_5 = new com.android.example.module22_module01_module04_module1.ClassAAG(); local_var_2_5.method3(new com.android.example.module22_module01_module04_module3.ClassAAJ(), new com.android.example.module22_module01_module16_module1.ClassAAJ()); com.android.example.module18_module1_module06_module1.ClassAAC local_var_2_6 = new com.android.example.module18_module1_module06_module1.ClassAAC(); local_var_2_6.method2(new com.android.example.module06_module073_module7.ClassAAG(), new com.android.example.module15_module41_module1.ClassAAH(), new com.android.example.module06_module254.ClassAAF()); } public void method3( com.android.example.module07_module39_module3_module2.ClassAAE param0, com.android.example.module22_module10_module4.ClassAAI param1) throws Throwable { com.android.example.module18_module3_module8.ClassAAI local_var_2_2 = new com.android.example.module18_module3_module8.ClassAAI(); local_var_2_2.method1(new com.android.example.module06_module210_module1.ClassAAA()); com.android.example.module04_module10_module6.ClassAAD local_var_2_3 = new com.android.example.module04_module10_module6.ClassAAD(); local_var_2_3.method0("SomeString"); com.android.example.module06_module128_module3.ClassAAF local_var_2_4 = new com.android.example.module06_module128_module3.ClassAAF(); local_var_2_4.method0(new com.android.example.module06_module320_module1.ClassAAD(), new com.android.example.module06_module067.ClassAAA(), new com.android.example.module06_module067.ClassAAG()); } public void method4( com.android.example.module22_module10_module4.ClassAAI param0, com.android.example.module22_module10_module4.ClassAAF param1, com.android.example.module22_module10_module4.ClassAAI param2) throws Throwable { com.android.example.module07_module07_module5.ClassAAE local_var_2_3 = new com.android.example.module07_module07_module5.ClassAAE(); local_var_2_3.method2(new com.android.example.module07_module07_module3.ClassAAH(), new com.android.example.module06_module239_module1.ClassAAJ(), new com.android.example.module06_module239_module1.ClassAAA(), new com.android.example.module06_module239_module1.ClassAAE()); } }
[ "bingran@google.com" ]
bingran@google.com
1cfcac121e3e87ce0ca459e194efae3a218b61de
0b50efb351f79788c91d54216b2c6f489fbe677b
/src/main/java/cn/tf/jk/dao/impl/SysCodeDaolmpl.java
c4364008c2aa91d78dad6ad48409cf2d4acc0f97
[]
no_license
knighthub/JK
68d26788c0caad9a4a76481cac8a7cd6b263cf71
18f81791d43f75e5b572146b081bb2baebdba137
refs/heads/master
2021-01-01T06:08:03.449724
2016-12-01T08:32:33
2016-12-01T08:32:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
410
java
package cn.tf.jk.dao.impl; import java.util.Map; import org.springframework.stereotype.Repository; import cn.tf.jk.dao.FactoryCDao; import cn.tf.jk.dao.SysCodeDao; import cn.tf.jk.po.FactoryC; import cn.tf.jk.po.SysCodeB; @Repository public class SysCodeDaolmpl extends BaseDaoImpl<SysCodeB> implements SysCodeDao{ public SysCodeDaolmpl(){ super.setNs("cn.tf.jk.mapper.SysCodeBMapper"); } }
[ "690644511@qq.com" ]
690644511@qq.com
0977f3ae4b75a6439e95d2166fccfbe2c2912a84
67b0c66fc22962575af1c4107911912280d2e00d
/src/main/java/com/chenyx/web/IndexController.java
00ea4ff8d5447d6fa8e26ad6d7e6646d8add06a6
[]
no_license
nickChenyx/BookHub
ffa5971900d76d516ffe769d06cdf4431bf0e7c0
1192167c8950f1d1fdeaaf5d9b7b0fd924c837d9
refs/heads/master
2021-01-19T04:47:58.180034
2017-04-06T06:59:56
2017-04-06T06:59:56
87,397,121
0
0
null
null
null
null
UTF-8
Java
false
false
375
java
package com.chenyx.web; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; /** * Created by Administrator on 2017/4/6. */ @Controller public class IndexController { @RequestMapping({"/","/index"}) public String index(Model model){ return "index"; } }
[ "nickChenyx@gmail.com" ]
nickChenyx@gmail.com