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
58648b071e2fac3cca58774e38196b67c0f150eb
2d9bd0fc6fd3e788b0cff0d17bc6d74c55d51671
/Sprint17_repush/gfc/gfc-business/src/main/java/dz/gov/mesrs/sii/gfc/business/model/dto/ExerciceBudgetaireDto.java
bdf23849f579aef9ae91b530a4ff22a41b47b307
[]
no_license
kkezzar/code2
952de18642d118d9dae9b10acc3b15ef7cfd709e
ee7bd0908ac7826074d26e214ef07c594e8a9706
refs/heads/master
2016-09-06T04:17:06.896511
2015-03-10T13:41:04
2015-03-10T13:41:04
31,958,723
1
1
null
null
null
null
ISO-8859-2
Java
false
false
4,208
java
package dz.gov.mesrs.sii.gfc.business.model.dto; import java.util.ArrayList; import java.util.Date; import java.util.List; import dz.gov.mesrs.sii.commons.business.model.dto.bpm.SituationEntiteDto; public class ExerciceBudgetaireDto implements java.io.Serializable { /** * @author Mounir.MESSAOUDI on : 24 nov. 2014 17:33:00 */ private static final long serialVersionUID = 1L; private Integer id; private SituationEntiteDto situation; private Integer annee; private String intituleFr; private String intituleAr; private Date dateOuverture; private Date dateCloture; private String observation; private List<ProjetBudgetDto> projetBudgets = new ArrayList<ProjetBudgetDto>(0); /** * @author Mounir.MESSAOUDI on : 18 déc. 2014 10:32:49 */ public ExerciceBudgetaireDto() { } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public Integer getAnnee() { return annee; } public void setAnnee(Integer annee) { this.annee = annee; } public String getIntituleFr() { return intituleFr; } public void setIntituleFr(String intituleFr) { this.intituleFr = intituleFr; } public String getIntituleAr() { return intituleAr; } public void setIntituleAr(String intituleAr) { this.intituleAr = intituleAr; } public Date getDateOuverture() { return dateOuverture; } public void setDateOuverture(Date dateOuverture) { this.dateOuverture = dateOuverture; } public Date getDateCloture() { return dateCloture; } public void setDateCloture(Date dateCloture) { this.dateCloture = dateCloture; } public String getObservation() { return observation; } public void setObservation(String observation) { this.observation = observation; } public SituationEntiteDto getSituation() { return situation; } public void setSituation(SituationEntiteDto situation) { this.situation = situation; } public List<ProjetBudgetDto> getProjetBudgets() { return projetBudgets; } public void setProjetBudgets(List<ProjetBudgetDto> projetBudgets) { this.projetBudgets = projetBudgets; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((annee == null) ? 0 : annee.hashCode()); result = prime * result + ((dateCloture == null) ? 0 : dateCloture.hashCode()); result = prime * result + ((dateOuverture == null) ? 0 : dateOuverture.hashCode()); result = prime * result + ((id == null) ? 0 : id.hashCode()); result = prime * result + ((intituleAr == null) ? 0 : intituleAr.hashCode()); result = prime * result + ((intituleFr == null) ? 0 : intituleFr.hashCode()); result = prime * result + ((observation == null) ? 0 : observation.hashCode()); result = prime * result + ((situation == null) ? 0 : situation.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; ExerciceBudgetaireDto other = (ExerciceBudgetaireDto) obj; if (annee == null) { if (other.annee != null) return false; } else if (!annee.equals(other.annee)) return false; if (dateCloture == null) { if (other.dateCloture != null) return false; } else if (!dateCloture.equals(other.dateCloture)) return false; if (dateOuverture == null) { if (other.dateOuverture != null) return false; } else if (!dateOuverture.equals(other.dateOuverture)) return false; if (id == null) { if (other.id != null) return false; } else if (!id.equals(other.id)) return false; if (intituleAr == null) { if (other.intituleAr != null) return false; } else if (!intituleAr.equals(other.intituleAr)) return false; if (intituleFr == null) { if (other.intituleFr != null) return false; } else if (!intituleFr.equals(other.intituleFr)) return false; if (observation == null) { if (other.observation != null) return false; } else if (!observation.equals(other.observation)) return false; if (situation == null) { if (other.situation != null) return false; } else if (!situation.equals(other.situation)) return false; return true; } }
[ "root@lhalid-pc" ]
root@lhalid-pc
34472ac8ff3cacd3aaedf2a327aa745af506535a
85bf29263b976277b487a9687f68a56a76cc6b94
/Java/Buoi9/src/com/t3h/ontap/bai2/CanBo.java
678e44d8944903dee7ba2438f66d99734079586a
[]
no_license
bacnv1/K31DL
2577e5118439d5708fe4345b049af85da55f8c01
4120d90fc0318bd700bba17abf51d8968916e263
refs/heads/master
2020-05-15T04:22:47.945739
2019-09-25T13:04:45
2019-09-25T13:04:45
182,084,238
1
3
null
null
null
null
UTF-8
Java
false
false
699
java
package com.t3h.ontap.bai2; public abstract class CanBo { protected String ten; protected String namSinh; protected String diaChi; protected boolean gioiTinh; public CanBo(String ten, String namSinh, String diaChi, boolean gioiTinh) { this.ten = ten; this.namSinh = namSinh; this.diaChi = diaChi; this.gioiTinh = gioiTinh; } public void inThongiTin() { System.out.println("Ho ten: " + ten); System.out.println("Nam sinh: " + namSinh); System.out.println("Dia chi: " + diaChi); System.out.println("Gioi tinh: " + (gioiTinh ? "Nam" : "Nu")); } public String getTen() { return ten; } }
[ "=" ]
=
be830dae6766a75bc33b6f265da5b976a7603beb
731006f9550d24a6e2198cca76bdefc0974ca7ed
/persistence/javadsl/src/main/java/com/lightbend/lagom/javadsl/persistence/ReadSideProcessor.java
102870afa8c6d271aa169bc3e1d3f4f3b5e1ad0f
[ "Apache-2.0" ]
permissive
githubBangladesh/lagom
3d542568fd8c0f08b10764d1633971d1d0468215
d109205b6acc4bbd2009eea47e8cf3fc2f5738e4
refs/heads/master
2021-01-12T07:00:27.718613
2016-12-19T03:45:22
2016-12-19T03:45:22
76,891,526
1
1
null
null
null
null
UTF-8
Java
false
false
5,183
java
/* * Copyright (C) 2016 Lightbend Inc. <http://www.lightbend.com> */ package com.lightbend.lagom.javadsl.persistence; import akka.Done; import akka.event.Logging; import akka.japi.Pair; import akka.stream.javadsl.Flow; import org.pcollections.PSequence; import java.util.concurrent.CompletableFuture; import java.util.concurrent.CompletionStage; /** * A read side processor. * * Read side processors consume events produced by {@link com.lightbend.lagom.javadsl.persistence.PersistentEntity} * instances, and update some read side data store that is optimized for queries. * * The events they consume must be tagged, and a read side is able to consume events of one or more tags. Events are * usually tagged according to some supertype of event, for example, events may be tagged as <code>Order</code> events. * They may also be tagged according to a hash of the ID of the entity associated with the event - this allows read * side event handling to be sharded across many nodes. Tagging is done using * {@link com.lightbend.lagom.javadsl.persistence.AggregateEventTag}. * * Read side processors are responsible for tracking what events they have already seen. This is done using offsets, * which are sequential values associated with each event. Note that end users typically will not need to handle * offsets themselves, this will be provided by Lagom support specific to the read side datastore, and end users can * just focus on handling the events themselves. */ public abstract class ReadSideProcessor<Event extends AggregateEvent<Event>> { /** * Return a {@link ReadSideHandler} for the given offset type. * * @return The offset processor. */ public abstract ReadSideHandler<Event> buildHandler(); /** * An read side offset processor. * * This is responsible for the actual read side handling, including handling offsets and the events themselves. */ public static abstract class ReadSideHandler<Event extends AggregateEvent<Event>> { /** * Prepare the database for all processors. * * This will be invoked at system startup. It is guaranteed to only be invoked once at a time across the entire * cluster, and so is safe to be used to perform actions like creating tables, that could cause problems if * done from multiple nodes. * * It will be invoked again if it fails, and it may be invoked multiple times as nodes of the cluster go up or * down. Unless the entire system is restarted, there is no way to guarantee that it will be invoked at a * particular time - in particular, it should not be used for doing upgrades unless the entire system is * restarted and a new cluster built from scratch. * * @return A completion stage that is redeemed when preparation is finished. */ public CompletionStage<Done> globalPrepare() { return CompletableFuture.completedFuture(Done.getInstance()); } /** * Prepare this processor. * * The primary purpose of this method is to load the last offset that was processed, so that read side * processing can continue from that offset. * * This also provides an opportunity for processors to do any initialisation activities, such as creating or * updating database tables, or migrating data. * * This will be invoked at least once for each tag, and may be invoked multiple times, such as in the event of * failure. * * @param tag The tag to get the offset for. * @return A completion stage that is redeemed when preparation is finished. */ public CompletionStage<Offset> prepare(AggregateEventTag<Event> tag) { return CompletableFuture.completedFuture(Offset.NONE); } /** * Flow to handle the events. * * If the handler does any blocking, this flow should be configured to use a dispatcher that is configured to * allow for that blocking. */ public abstract Flow<Pair<Event, Offset>, Done, ?> handle(); } /** * The tags to aggregate. * * This must return at least one tag to aggregate. Read side processors will be sharded over the cluster by these * tags, so if events are tagged by a shard key, the read side processing load can be distributed across the * cluster. * * @return The tags to aggregate. */ public abstract PSequence<AggregateEventTag<Event>> aggregateTags(); /** * The name of this read side. * * This name should be unique among the read sides and entity types of the service. By default it is using the * short class name of the concrete `ReadSideProcessor` class. Subclasses may override to define other type names. * It is wise to override and retain the original name when the class name is changed because this name is used to * identify read sides throughout the cluster. */ public String readSideName() { return Logging.simpleName(getClass()); } }
[ "james@jazzy.id.au" ]
james@jazzy.id.au
3f844640ad1f9b75d1b6c07712ce815224f530ac
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
/examples/commons-math3/mutations/mutants-UniformIntegerDistribution/57/org/apache/commons/math3/distribution/UniformIntegerDistribution.java
3260592229c3103be56cd430c0535b334a056474
[ "BSD-3-Clause", "Minpack", "Apache-2.0" ]
permissive
SmartTests/smartTest
b1de326998857e715dcd5075ee322482e4b34fb6
b30e8ec7d571e83e9f38cd003476a6842c06ef39
refs/heads/main
2023-01-03T01:27:05.262904
2020-10-27T20:24:48
2020-10-27T20:24:48
305,502,060
0
0
null
null
null
null
UTF-8
Java
false
false
5,503
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.commons.math3.distribution; import org.apache.commons.math3.exception.NumberIsTooLargeException; import org.apache.commons.math3.exception.util.LocalizedFormats; import org.apache.commons.math3.random.RandomGenerator; import org.apache.commons.math3.random.Well19937c; /** * Implementation of the uniform integer distribution. * * @see <a href="http://en.wikipedia.org/wiki/Uniform_distribution_(discrete)" * >Uniform distribution (discrete), at Wikipedia</a> * * @version $Id$ * @since 3.0 */ public class UniformIntegerDistribution extends AbstractIntegerDistribution { /** Serializable version identifier. */ private static final long serialVersionUID = 20120109L; /** Lower bound (inclusive) of this distribution. */ private final int lower; /** Upper bound (inclusive) of this distribution. */ private final int upper; /** * Creates a new uniform integer distribution using the given lower and * upper bounds (both inclusive). * * @param lower Lower bound (inclusive) of this distribution. * @param upper Upper bound (inclusive) of this distribution. * @throws NumberIsTooLargeException if {@code lower >= upper}. */ public UniformIntegerDistribution(int lower, int upper) throws NumberIsTooLargeException { this(new Well19937c(), lower, upper); } /** * Creates a new uniform integer distribution using the given lower and * upper bounds (both inclusive). * * @param rng Random number generator. * @param lower Lower bound (inclusive) of this distribution. * @param upper Upper bound (inclusive) of this distribution. * @throws NumberIsTooLargeException if {@code lower >= upper}. * @since 3.1 */ public UniformIntegerDistribution(RandomGenerator rng, int lower, int upper) throws NumberIsTooLargeException { super(rng); if (lower >= upper) { throw new NumberIsTooLargeException( LocalizedFormats.LOWER_BOUND_NOT_BELOW_UPPER_BOUND, lower, upper, false); } this.lower = lower; this.upper = upper; } /** {@inheritDoc} */ public double probability(int x) { if (x < lower || x > upper) { return 0; } return 1.0 / (upper - lower + 1); } /** {@inheritDoc} */ public double cumulativeProbability(int x) { if (x < lower) { return 0; } if (x > upper) { return 1; } return ((x - lower) / 1.0) / (upper - lower + 1.0); } /** * {@inheritDoc} * * For lower bound {@code lower} and upper bound {@code upper}, the mean is * {@code 0.5 * (lower + upper)}. */ public double getNumericalMean() { return 0.5 * (lower + upper); } /** * {@inheritDoc} * * For lower bound {@code lower} and upper bound {@code upper}, and * {@code n = upper - lower + 1}, the variance is {@code (n^2 - 1) / 12}. */ public double getNumericalVariance() { double n = upper - lower + 1; return (n * n - 1) / 12.0; } /** * {@inheritDoc} * * The lower bound of the support is equal to the lower bound parameter * of the distribution. * * @return lower bound of the support */ public int getSupportLowerBound() { return lower; } /** * {@inheritDoc} * * The upper bound of the support is equal to the upper bound parameter * of the distribution. * * @return upper bound of the support */ public int getSupportUpperBound() { return upper; } /** * {@inheritDoc} * * The support of this distribution is connected. * * @return {@code true} */ public boolean isSupportConnected() { return true; } /** {@inheritDoc} */ @Override public int sample() { final int max = (upper - lower) + 1; if (max <= 0) { // The range is too wide to fit in a positive int (larger // than 2^31); as it covers more than half the integer range, // we use a simple rejection method. while (true) { final int r = random.nextInt(); if (r >= lower && r <= upper) { return r; } } } else { // We can shift the range and directly generate a positive int. return lower + random.nextInt(max); } } }
[ "kesina@Kesinas-MBP.lan" ]
kesina@Kesinas-MBP.lan
be642874b0f13be0e583c0739e54dcdcdba4671d
3fcd99f033ac157da4d9be74d89ec8ec685e7491
/.svn/pristine/be/be642874b0f13be0e583c0739e54dcdcdba4671d.svn-base
7cdac022f68e48c2e6bd0104dadcda48a1987642
[]
no_license
mcqingxian/hoauapp
2fa3741bb0107e4bbb69d20a54a52228c8b51773
6fd5cc8063229afd0e207040d8fb61ea96f2a935
refs/heads/master
2021-01-02T22:36:01.642768
2017-08-04T14:38:21
2017-08-04T14:38:21
99,350,012
0
0
null
null
null
null
UTF-8
Java
false
false
3,288
/** * */ package com.hoau.hoauapp.service.impl; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Resource; import org.apache.log4j.Logger; import org.springframework.dao.CannotAcquireLockException; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import com.hoau.hoauapp.entity.CompanyEntity; import com.hoau.hoauapp.job.CompanySyncJob; import com.hoau.hoauapp.mapper.CompanySyncMapper; import com.hoau.hoauapp.mapper.JobSyncMapper; import com.hoau.hoauapp.si.dc.company.Company; import com.hoau.hoauapp.si.dc.company.CompanyData; import com.hoau.hoauapp.si.dc.company.CompanyServices; import com.hoau.hoauapp.si.dc.company.CompanyServices_Service; /** * @author 271755 * */ @Service public class CompanySyncService { private Logger log = Logger.getLogger(getClass()); @Resource private CompanySyncMapper companySyncMapper; @Resource private JobSyncMapper jobSyncMapper; @Transactional public void companySync() { if(!this.lockJob()){ return; } URL url = null; try { url = new URL( "http://10.39.109.29:8080/services/CompanyServices?wsdl"); } catch (MalformedURLException e) { e.printStackTrace(); } CompanyServices_Service ss = new CompanyServices_Service(url); CompanyServices port = ss.getCompanyServicesPort(); CompanyData companyData = port.getCompanyData(); if (companyData.getDetails() != null && companyData.getDetails().size() > 0) { List<CompanyEntity> companyEntitys = new ArrayList<CompanyEntity>(); List<Company> companys = companyData.getDetails(); for (Company company : companys) { CompanyEntity c = new CompanyEntity(); c.setActive(company.getSFYX()); c.setAddressDetail(company.getZS()); c.setAreaCode(company.getAREACODE()); c.setCity(company.getCSMC()); c.setCompanyCode(company.getCSBH()); c.setCompanyName(company.getGSJC()); c.setCompanyNameDetail(company.getQYMC()); c.setDeliveryDepend(company.getYTGSSHSM()); c.setIsSpecifiedTime(company.getSFTGDRDFW()); c.setPhone(company.getDH()); c.setProvince(company.getSFMC()); c.setRegion(company.getREGION()); c.setTakeSelfDepend(company.getYTGSKHZT()); companyEntitys.add(c); } companySyncMapper.clearCompany(); companySyncMapper.saveCompany(companyEntitys); Map<String, String> map = new HashMap<String, String>(); map.put("jobName", "CompanySyncJob"); map.put("status", "success"); map.put("message", ""); saveJobLog(map); } } @Transactional public void saveJobLog(Map<String, String> map) { jobSyncMapper.saveJobLog(map); } private boolean lockJob(){ try { jobSyncMapper.setSessionLockWaitTimeout(); int jobNum = jobSyncMapper.forUpdateJobLock(CompanySyncJob.JOB_NAME); if(jobNum == 0){ jobSyncMapper.saveJob(CompanySyncJob.JOB_NAME); jobSyncMapper.forUpdateJobLock(CompanySyncJob.JOB_NAME); } return true; } catch (CannotAcquireLockException e) { log.warn("job has start execute"); return false; } } }
[ "xiao_c1025@163.com" ]
xiao_c1025@163.com
b86f94d45dae08ab019cefb9f2d3217455e2e482
0118956ece52559399cd1805dd68ac21e83ae3d9
/fitnesse/lib/src/fitlibrarySrc/fitlibrary/flow/DoFlow.java
a66862e709e34951daa0fb45c4bf1c328741e2f3
[]
no_license
JavaQualitasCorpus/fitlibraryforfitnesse-20110301
6588290ca08deb254e76f67aa6936d2a6f24370f
ceb5abcce236ae380cc0745a7920f82cfba69a19
refs/heads/master
2023-08-12T08:37:17.890919
2019-03-12T23:27:44
2019-03-12T23:27:44
167,004,721
0
1
null
null
null
null
UTF-8
Java
false
false
7,261
java
/* * Copyright (c) 2010 Rick Mugridge, www.RimuResearch.com * Released under the terms of the GNU General Public License version 2 or later. */ package fitlibrary.flow; import java.util.List; import org.apache.log4j.Logger; import fitlibrary.DomainFixture; import fitlibrary.flow.DoFlowOnTable.DoFlower; import fitlibrary.global.TemporaryPlugBoardForRuntime; import fitlibrary.log.FitLibraryLogger; import fitlibrary.object.DomainCheckTraverse; import fitlibrary.object.DomainInjectionTraverse; import fitlibrary.object.DomainTraverser; import fitlibrary.runResults.ITableListener; import fitlibrary.runResults.TestResults; import fitlibrary.runResults.TestResultsFactory; import fitlibrary.runtime.RuntimeContextInternal; import fitlibrary.suite.SuiteEvaluator; import fitlibrary.table.Row; import fitlibrary.table.Table; import fitlibrary.table.Tables; import fitlibrary.traverse.DomainAdapter; import fitlibrary.traverse.RuntimeContextual; import fitlibrary.traverse.TableEvaluator; import fitlibrary.traverse.workflow.FlowEvaluator; import fitlibrary.traverse.workflow.PlainTextAnalyser; import fitlibrary.typed.TypedObject; import fitlibrary.utility.option.None; import fitlibrary.utility.option.Option; import fitlibrary.utility.option.Some; /** * This integrates various pieces of functionality: * o Ordinary Do flow * o DomainFixture flow, with switching for 3 phases: inject, do, check. * o SuiteFixture */ public class DoFlow implements DomainTraverser, TableEvaluator, DoFlower { private static Logger logger = FitLibraryLogger.getLogger(DoFlow.class); private final IScopeStack scopeStack; private RuntimeContextInternal runtime; private final SetUpTearDown setUpTearDown; private Option<SuiteEvaluator> suiteFixtureOption = None.none(); private DomainInjectionTraverse domainInject = null; private DomainCheckTraverse domainCheck = null; private TableEvaluator current = this; private DoFlowerOnTable doFlowOnTable = null; public DoFlow(FlowEvaluator flowEvaluator, IScopeStack scopeStack, RuntimeContextInternal runtime, SetUpTearDown setUpTearDown) { this.scopeStack = scopeStack; this.runtime = runtime; this.setUpTearDown = setUpTearDown; this.doFlowOnTable = new DoFlowOnTable(flowEvaluator, scopeStack, setUpTearDown, this); } public DoFlow(IScopeStack scopeStack, RuntimeContextInternal runtime, SetUpTearDown setUpTearDown, DoFlowerOnTable doFlowOnTable) { this.scopeStack = scopeStack; this.runtime = runtime; this.setUpTearDown = setUpTearDown; this.doFlowOnTable = doFlowOnTable; } public void runStorytest(Tables tables, ITableListener tableListener) { logger.trace("Running storytest"); TestResults testResults = tableListener.getTestResults(); resetToStartStorytest(); for (int t = 0; t < tables.size(); t++) { Table table = tables.at(t); boolean plainTextFailed = false; if (current == this && table.isPlainTextTable()) { PlainTextAnalyser plainTextAnalyser = new PlainTextAnalyser(runtime,TemporaryPlugBoardForRuntime.definedActionsRepository()); TestResults testResults2 = TestResultsFactory.testResults(); plainTextAnalyser.analyseAndReplaceRowsIn(table, testResults2); plainTextFailed = testResults2.problems(); testResults.add(testResults2); } if (domainCheck != null) handleDomainPhases(table); if (!plainTextFailed) current.runTable(table,tableListener); if (t < tables.size() - 1) { tearDown(scopeStack.poppedAtEndOfTable(), table.at(0), testResults); logger.trace("Finished table"); } else { tearDown(scopeStack.poppedAtEndOfStorytest(), table.at(0), testResults); logger.trace("Finished table and storytest"); } runtime.addAccumulatedFoldingText(table); tableListener.tableFinished(table); } tableListener.storytestFinished(); } @Override public void runTable(Table table, ITableListener tableListener) { doFlowOnTable.runTable(table, tableListener, runtime); } private void resetToStartStorytest() { scopeStack.setAbandon(false); scopeStack.setStopOnError(false); scopeStack.clearAllButSuite(); current = this; domainInject = null; domainCheck = null; if (suiteFixtureOption.isSome()) { logger.trace("Use suite fixture runtime"); runtime = suiteFixtureOption.get().getCopyOfRuntimeContext(); scopeStack.switchRuntime(runtime); } else runtime.reset(); } private void handleDomainPhases(Table table) { int phaseBreaks = table.phaseBoundaryCount(); if (phaseBreaks > 0) { for (int i = 0; i < phaseBreaks; i++) { if (current == domainInject) setCurrentAction(); else if (current == this) setCurrentCheck(); } } } @Override public void runInnerTables(Tables innerTables, ITableListener tableListener) { IScopeState state = scopeStack.currentState(); for (Table iTable: innerTables) { runTable(iTable,tableListener); tearDown(state.restore(), iTable.at(0), tableListener.getTestResults()); } } private void tearDown(List<TypedObject> typedObjects, Row row, TestResults testResults) { for (TypedObject typedObject : typedObjects) setUpTearDown.callTearDownOnSutChain(typedObject.getSubject(), row, testResults); } @Override public void setCurrentAction() { current = this; } @Override public void setCurrentCheck() { current = domainCheck; } public void exit() { if (suiteFixtureOption.isSome()) setUpTearDown.callSuiteTearDown(suiteFixtureOption.get(),TestResultsFactory.testResults()); } public RuntimeContextInternal getRuntimeContext() { return runtime; } @Override public void addNamedObject(String name, TypedObject typedObject, Row row, TestResults testResults) { typedObject.injectRuntime(runtime); setUpTearDown.callSetUpOnSutChain(typedObject.getSubject(), row, testResults); scopeStack.addNamedObject(name, typedObject); } @Override public void select(String name) { scopeStack.select(name); } @Override public boolean hasDomainCheck() { return domainCheck != null; } @Override public void setDomainToCheck() { setCurrentCheck(); } @Override public void setDomainFixture(TypedObject typedResult) { Object subject = typedResult.getSubject(); TypedObject sut = typedResult; if (subject instanceof DomainFixture) sut = ((DomainFixture)subject).getTypedSystemUnderTest(); domainInject = new DomainInjectionTraverse(this); domainInject.setTypedSystemUnderTest(sut); setRuntimeContextOf(domainInject); domainCheck = new DomainCheckTraverse(this); domainCheck.setTypedSystemUnderTest(sut); setRuntimeContextOf(domainCheck); current = domainInject; } @Override public void setSuite(SuiteEvaluator suiteEvaluator) { if (suiteFixtureOption.isNone()) suiteFixtureOption = new Some<SuiteEvaluator>(suiteEvaluator); } private void setRuntimeContextOf(Object object) { if (object instanceof RuntimeContextual) ((RuntimeContextual)object).setRuntimeContext(runtime); if (object instanceof DomainAdapter) setRuntimeContextOf(((DomainAdapter)object).getSystemUnderTest()); } }
[ "taibi@sonar-scheduler.rd.tut.fi" ]
taibi@sonar-scheduler.rd.tut.fi
a02cbe60ed7818e257e956ae14b7e3e38416c9a0
18606c6b3f164a935e571932b3356260b493e543
/benchmarks/Jigsaw/src/classes/org/w3c/jigsaw/servlet/ServletNamesEnumeration.java
13461fe080d971be0ed86f277902b8458425999d
[ "Apache-2.0", "Apache-1.1", "BSD-2-Clause", "SAX-PD", "MIT" ]
permissive
jackyhaoli/abc
d9a3bd2d4140dd92b9f9d0814eeafa16ea7163c4
42071b0dcb91db28d7b7fdcffd062f567a5a1e6c
refs/heads/master
2020-04-03T09:34:47.612136
2019-01-11T07:16:04
2019-01-11T07:16:04
155,169,244
0
0
null
null
null
null
UTF-8
Java
false
false
1,534
java
// ServletNamesEnumeration.java // $Id: ServletNamesEnumeration.java,v 1.3 2001/11/12 14:04:36 ylafon Exp $ // (c) COPYRIGHT MIT and INRIA, 1996. // Please first read the full copyright statement in file COPYRIGHT.html package org.w3c.jigsaw.servlet; import java.util.Enumeration; import java.util.NoSuchElementException; import javax.servlet.Servlet; /** * @author Alexandre Rafalovitch <alex@access.com.au> * @author Anselm Baird-Smith <abaird@w3.org> */ public class ServletNamesEnumeration implements Enumeration { Enumeration children = null; String next = null; ServletDirectoryFrame dir = null; ServletNamesEnumeration(ServletDirectoryFrame dir, Enumeration children) { this.dir = dir; this.children = children; //was null ??? } private final synchronized String computeNext() { if ( next != null ) return next; while ( children.hasMoreElements() ) { next = (String) children.nextElement(); // if (dir.getServlet(next) != null) if (dir.isServletLoaded(next)) { return next; } else { next = null; } } return null; } public synchronized boolean hasMoreElements() { return (next != null) || ((next = computeNext()) != null); } public synchronized Object nextElement() { if ( next == null ) { next = computeNext(); } if ( next != null ) { Object ret = next; next = null; return ret; } else { throw new NoSuchElementException("NextElement"); } } }
[ "xiemaisi@40514614-586c-40e6-bf05-bf7e477dc3e6" ]
xiemaisi@40514614-586c-40e6-bf05-bf7e477dc3e6
00d43ed741a043ff2797566087bb38cca0ff6e84
ff2683777d02413e973ee6af2d71ac1a1cac92d3
/src/main/java/com/alipay/api/domain/ModelColumn.java
48cbd92d1731e9eb8ab2fe061ae5cc99cdc0444d
[ "Apache-2.0" ]
permissive
weizai118/alipay-sdk-java-all
c30407fec93e0b2e780b4870b3a71e9d7c55ed86
ec977bf06276e8b16c4b41e4c970caeaf21e100b
refs/heads/master
2020-05-31T21:01:16.495008
2019-05-28T13:14:39
2019-05-28T13:14:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
722
java
package com.alipay.api.domain; import com.alipay.api.AlipayObject; import com.alipay.api.internal.mapping.ApiField; /** * 模型数据 * * @author auto create * @since 1.0, 2017-04-27 14:36:26 */ public class ModelColumn extends AlipayObject { private static final long serialVersionUID = 8859364577953743393L; /** * 列别名 */ @ApiField("alias") private String alias; /** * 列值 */ @ApiField("data") private String data; public String getAlias() { return this.alias; } public void setAlias(String alias) { this.alias = alias; } public String getData() { return this.data; } public void setData(String data) { this.data = data; } }
[ "ben.zy@antfin.com" ]
ben.zy@antfin.com
f21ef9f4f5232ab0585c989fb1874b9685761783
9a9fcafa9bbc28c9f1930e01c46af8f023955aea
/JavaEE就业班面向对象IO阶段/day12/code/day12/src/cn/itcast01/fileinputstream/FileInputStream02.java
351782fea5d009249e116548355e02b461804c05
[]
no_license
zhengbingyanbj/JavaSE
84cd450ef5525050809c78a8b6660b9495c072db
671ac02dcafe81d425c3c191c313b6040e8ae557
refs/heads/master
2021-09-01T18:20:49.082475
2017-12-28T07:13:30
2017-12-28T07:13:30
115,139,599
0
0
null
null
null
null
GB18030
Java
false
false
745
java
package cn.itcast01.fileinputstream; import java.io.FileInputStream; import java.io.IOException; public class FileInputStream02 { public static void main(String[] args) throws IOException { //创建字节输入流对象 FileInputStream fis = new FileInputStream("a.txt"); //使用数组方式读取 byte[] buffer = new byte[1024]; int len = fis.read(buffer); //buffer 0 len //public String(byte[] bytes, int startIndex, int length) 把字节数组一部分元素 转换成字符串 String s = new String(buffer,0,len);//字符串构造中完成 解码操作 将字节 按照 默认的编码集转换成 字符 System.out.println(s); //释放 fis.close(); } }
[ "zhengbingyanbj@163.com" ]
zhengbingyanbj@163.com
71465179c5d2404d29e0bdc78259f96059ff693d
92702d4a6f3302fdb4c933d0f33444cd1f5d9fd0
/src/main/java/details/user/UserDetailsC.java
04c3471ba29e73217ea6c6ec659b0f9b4ddfa563
[]
no_license
wemstar/BazyDanych
9490fed536ece6bf4858cd2aabaa8df68e12b843
6a29439fd3a66fe77a6080e0eca970f669785a5d
refs/heads/master
2021-01-16T01:01:55.060982
2014-01-22T16:22:59
2014-01-22T16:22:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,620
java
package details.user; import commons.Commons; import commons.HibernateFunctions; import entity.UserEntity; import javax.swing.*; import java.util.Arrays; /** * Created by wemstar on 27.12.13. */ public class UserDetailsC { private UserDetailsV view; public UserDetailsV getView() { return view; } public void setView(UserDetailsV view) { this.view = view; } public void updateView() { UserEntity model=view.getModel().entity; view.setNick(model.getNick()); view.setPassword(model.getPassword().toCharArray()); view.setRole(model.getRole()); } public void updateModel() { UserEntity model=view.getModel().entity; model.setNick(view.getNick()); model.setPassword(new String(view.getPassword())); model.setRole(view.getRole()); updateView(); } public void saveUser() throws Exception { updateModel(); if(!Arrays.equals(view.getPassword(),view.getPasswordConfirm())) { JOptionPane.showMessageDialog(null, "Hasła muszą się zgadzać", "Wrong ", JOptionPane.ERROR_MESSAGE); return; } if(view.getModel().entity.getNick().isEmpty()) { JOptionPane.showMessageDialog(null, "Pole nick nie może byc puste", "Wrong ", JOptionPane.ERROR_MESSAGE); return; } HibernateFunctions.saveUser(view.getModel().entity); } public void deleteUser() { if(Commons.currentUser.getRole().equals("admin"))HibernateFunctions.deleteUser(view.getModel().entity); } }
[ "sylwestermacura@gmail.com" ]
sylwestermacura@gmail.com
1544d0e6e3a281c6611eb02d184a2f6a75c0e961
af97dc2f22b960264ab6cf14dbc4303156eed9db
/SpringBootDemo/src/main/java/testspringboot/controller/loginController.java
28238e3aaaeb8b5c0353a85e1ef947fbaf8553a6
[]
no_license
zhuxin3230213/springboot
e212badd4de725cb36dd5994add509c0cc5499d9
365154bad86899bf38ce553759d315fcef695efb
refs/heads/master
2020-04-11T10:32:07.141578
2019-01-21T03:44:55
2019-01-21T03:44:55
161,716,379
0
0
null
null
null
null
UTF-8
Java
false
false
469
java
package testspringboot.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import java.util.HashMap; @Controller @RequestMapping("/login") public class loginController { @RequestMapping("/test") public String login(Model model) { model.addAttribute("hello", "欢迎进入HTML页面"); return "login"; } }
[ "zhuxin_123" ]
zhuxin_123
831335f0f4285bfc9e4db566f4e445aabbbcde55
9c69a76851c74602aa89e92bc27e55677a623ec7
/banking/core-banking/src/com/example/banking/core/domain/CurrencyEnum.java
a68f674881cd1459f77f9af39ce776949716f699
[ "MIT" ]
permissive
deepcloudlabs/dcl215-2020-apr-20
7f463571f295af3096fd02936b54318a4df8ddc3
6e6c2d88d0f49602e91f64ef0888372b683d8051
refs/heads/master
2022-12-27T08:37:12.770056
2020-04-26T09:00:37
2020-04-26T09:00:37
257,236,420
0
0
MIT
2020-10-13T21:21:32
2020-04-20T09:45:00
Java
UTF-8
Java
false
false
143
java
package com.example.banking.core.domain; /** * @author Binnur Kurt <binnur.kurt@gmail.com> */ public enum CurrencyEnum { EUR, USD, TL }
[ "deepcloudlabs@gmail.com" ]
deepcloudlabs@gmail.com
dc5b782cbf2f811dadb2874120cc3d18aa081d10
39ed14596fcf0bb03306927c5945b85c93bf4311
/src/ua/edu/ukma/ykrukovska/Unit1/StudentsGradesTester.java
30a16a45533da2c561165a57df965cc92ef06499
[]
no_license
Mariesnlk/CS106A_Java_Term2
33ec44ce4461f785a9d5272e60c8acd8bff0fb5a
bc40876e3120e87c4090cbfb31cb4db0601dc26c
refs/heads/master
2020-05-16T03:14:49.802602
2019-04-21T22:19:44
2019-04-21T22:19:44
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,292
java
package ua.edu.ukma.ykrukovska.Unit1; public class StudentsGradesTester { private static final int MAX_SIZE = 5; public static void main(String[] args) { StudentsGrades gradesService = new StudentsGrades(); int[] currentGrades = new int[MAX_SIZE]; int inputCounter = 0; System.out.println("Insert grades: "); do { int input = DataInput.getInt(); if (input > 100 || input < 0) { do { System.out.println("Grades can be from 0 to 100. Try again"); input = DataInput.getInt(); } while (input > 100 || input < 0); } currentGrades[inputCounter++] = input; } while (inputCounter < MAX_SIZE); gradesService.setGrades(currentGrades); System.out.println("Max grade: " + gradesService.getMaxGrade()); System.out.println("Min grade: " + gradesService.getMinGrade()); System.out.println("Average grade: " + gradesService.getAverageGrade()); System.out.println("Students higher than average grade: " + gradesService.getStudentsHigherAverage()); System.out.println("Students lower than average grade: " + gradesService.getStudentsLowerAverage()); System.out.println("Students with excellent grade (91-100): " + gradesService.getStudentsExcellent()); System.out.println("Students with good grade (71-90): " + gradesService.getStudentsGood()); System.out.println("Students with satisfying grade (60-70): " + gradesService.getStudentsSatisfying()); System.out.println("Students with bad grade (0-59): " + gradesService.getStudentsBad()); System.out.println("All grades: " + gradesService.toString()); System.out.println("Do you want to sort numbers in ascending or descending order? 1-ascending, 2-descending"); int sortingOrder = DataInput.getInt(); if (sortingOrder != 1 && sortingOrder != 2) { do { System.out.println("You can only choose 1 or 2. Try again"); sortingOrder = DataInput.getInt(); } while (sortingOrder != 1 && sortingOrder != 2); } System.out.println("Marks sorted: " + gradesService.sortGrades(sortingOrder)); } }
[ "jana.krua@gmail.com" ]
jana.krua@gmail.com
28d41d9586bf6c037ad8643a3bba4341802deca1
05a3c3e24fa143f40855bcbd883313a6dba26332
/Pizza2019Ver3/app/src/main/java/com/example/pizza2019ver3/TopFragment.java
f923bed9a06fd18a72789f4879128022cfa018e8
[]
no_license
8kosmo/androidProject
ef42218abb23457b06d05dd1b2f1c069dd63716a
aea52e2e8a253b5f661b4dc4f7b8722f3a035fea
refs/heads/master
2020-08-02T18:18:57.207700
2019-09-28T07:31:56
2019-09-28T07:31:56
211,462,033
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
package com.example.pizza2019ver3; import android.os.Bundle; import androidx.fragment.app.Fragment; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; /** * A simple {@link Fragment} subclass. */ public class TopFragment extends Fragment { public TopFragment() { // Required empty public constructor } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { // Inflate the layout for this fragment return inflater.inflate(R.layout.fragment_top, container, false); } }
[ "titicaca-lake@naver.com" ]
titicaca-lake@naver.com
df1683a63e95f260a3dbb9c1fe1a8cae3239ebec
970791c62e43177f15504d4a36a12f93cf336c72
/reflect.src/guice/hello/HelloTest.java
f39d2973a50cde35da7b97bde163a6a1f3d74a5b
[]
no_license
ywendy/JavaLearn
ab36ed915d90e55c06d2dc63d8465ba5787794f8
208645e37b7b583131a61204f911e77c3282115a
refs/heads/master
2021-05-26T19:48:34.295026
2013-03-06T17:22:17
2013-03-06T17:22:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,042
java
/** * */ package guice.hello; import com.google.inject.Guice; import com.google.inject.Injector; /** * @author yangwm in Jan 3, 2010 11:07:32 PM */ public class HelloTest { /** * create by yangwm in Jan 3, 2010 11:07:32 PM * @param args */ public static void main(String[] args) { Injector inject = Guice.createInjector(); for (int i = 0; i < 3; i++) { Hello hello = inject.getInstance(Hello.class); System.out.println("hello(" + i + "):" + hello); hello.sayHello("yangwm"); } } } /* 1. 实现类未使用注释@Singleton作用域 hello(0):guice.hello.HelloImpl@1f934ad Hello: yangwm hello(1):guice.hello.HelloImpl@1f14ceb Hello: yangwm hello(2):guice.hello.HelloImpl@f0eed6 Hello: yangwm 2. 实现类使用注释@Singleton作用域 hello(0):guice.hello.HelloImpl@18020cc Hello: yangwm hello(1):guice.hello.HelloImpl@18020cc Hello: yangwm hello(2):guice.hello.HelloImpl@18020cc Hello: yangwm */
[ "jxfzywm@163.com" ]
jxfzywm@163.com
276e6b404c55a893c45a6ae2e6d12c6eca737bfb
95f2fdb228c3021634c573769ec9e46e26549391
/premiun-springJPA/stduy/src/main/java/jpastudy/stduy/controller/MemberController.java
7692d953ab54f613dd53a2147fcda9be2dd959d8
[]
no_license
Yumin-Kim/Java-SpringStudy
aafeb50042f3ea9af7de30e58d356ae22b332281
72a4cd76a55febd1bd842687ac80a3db24214454
refs/heads/master
2023-08-25T17:47:45.667803
2021-10-20T14:41:30
2021-10-20T14:41:30
380,800,790
0
0
null
null
null
null
UTF-8
Java
false
false
1,681
java
package jpastudy.stduy.controller; import jpastudy.stduy.domain.Member; import jpastudy.stduy.repository.MemberRepository; import jpastudy.stduy.repository.custom.MemberRepositoryCustom; import lombok.RequiredArgsConstructor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.data.web.PageableDefault; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.PostConstruct; import java.util.Optional; @RestController @RequestMapping("/api") @RequiredArgsConstructor public class MemberController { private final MemberRepository memberRepository; @GetMapping("/members/{id}") public Member getMember(@PathVariable("id") Long id) { return memberRepository.findById(id).get(); } @GetMapping("/members2/{id}") public String getMemberDomin(@PathVariable("id") Member member) { return member.getUsername(); } @GetMapping("/members") public Page<Member> list(Pageable pageable) { Page<Member> all = memberRepository.findAll(pageable); return all; } @GetMapping("/members/list") public Page<Member> memberlist(@PageableDefault(size=2) Pageable pageable) { Page<Member> all = memberRepository.findAll(pageable); return all; } @PostConstruct public void init() { memberRepository.save(new Member("MemberA")); } }
[ "dbals0@naver.com" ]
dbals0@naver.com
574b663d3ba9a0b4e24678c9adc5198693650e69
baab092a50a4a9982328a6a4c529a9217f5de31e
/src/main/java/in/ankushs/linode4j/jackson/NotificationTypeDeserializer.java
d28d24299ecb8b0a1b489076a0fa6ad1265929e2
[ "MIT" ]
permissive
Adsizzlerlabs/linode4j
530ecf2fa4bb8779b649db072199500c47f82089
f3ac56d74fc9b85901382d37eaffc74b432619ca
refs/heads/master
2021-09-01T18:36:09.563673
2017-12-28T08:27:37
2017-12-28T08:27:37
113,029,323
1
0
null
2017-12-04T10:33:58
2017-12-04T10:33:58
null
UTF-8
Java
false
false
631
java
package in.ankushs.linode4j.jackson; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import in.ankushs.linode4j.model.enums.NotificationType; import java.io.IOException; /** * Created by ankushsharma on 30/11/17. */ public class NotificationTypeDeserializer extends JsonDeserializer<NotificationType>{ @Override public NotificationType deserialize(final JsonParser jsonParser, final DeserializationContext ctxt) throws IOException { return NotificationType.from(jsonParser.getText()); } }
[ "ankush.s@adsizzlergroup.com" ]
ankush.s@adsizzlergroup.com
f978e6db48c6f2718bb012313761c9006932590e
98bd09233229554d0824b89feff9448d58b6f3c4
/hs-bill/src/main/java/com/huashi/bill/pay/service/MD5Util.java
6517859cd8c3f2e174a0d29f3e3a528dccc40555
[]
no_license
arraycto/hspaas
6cb308c76a4e77bd06106c686f98d20fba685505
29c2ecf904f3fcc7b2965edb5b74a11908a25c49
refs/heads/master
2020-12-10T14:18:40.245824
2019-07-05T08:45:47
2019-07-05T08:45:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,622
java
package com.huashi.bill.pay.service; import java.security.MessageDigest; public class MD5Util { private static String byteArrayToHexString(byte b[]) { StringBuffer resultSb = new StringBuffer(); for (int i = 0; i < b.length; i++) { { resultSb.append(byteToHexString(b[i])); } } return resultSb.toString(); } private static String byteToHexString(byte b) { int n = b; if (n < 0) { { n += 256; } } int d1 = n / 16; int d2 = n % 16; return hexDigits[d1] + hexDigits[d2]; } public static String MD5Encode(String origin, String charsetname) { String resultString = null; try { resultString = new String(origin); MessageDigest md = MessageDigest.getInstance("MD5"); if (charsetname == null || "".equals(charsetname)) { { resultString = byteArrayToHexString(md.digest(resultString.getBytes())); } } else { { resultString = byteArrayToHexString(md.digest(resultString.getBytes(charsetname))); } } } catch (Exception exception) { } return resultString; } private static final String hexDigits[] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f" }; }
[ "ying1_zheng@bestsign.cn" ]
ying1_zheng@bestsign.cn
4be8e34cf185484a1ea727cdaa98fe6771bd01a0
2efc9296543b7e6d3ad875ce8e036b028550ca01
/kingroup_v2_java/kingroup_v2/ucm/pop/UCKonHegFreqAlgShowOpt.java
4d62c43a947fc9d94b9863d569300ff6aa36b387
[]
no_license
dmitryako/kingroup
4127ecc56744120cd4a1f3d3801665b318b9267c
93614aef0fba4af34a281cae076fb51eb44b73a2
refs/heads/master
2021-05-28T15:13:27.783984
2010-12-01T23:45:50
2010-12-01T23:45:50
34,374,747
1
0
null
null
null
null
UTF-8
Java
false
false
1,633
java
package kingroup_v2.ucm.pop; import kingroup_v2.KinGroupV2MainUI; import kingroup_v2.KinGroupV2Project; import kingroup_v2.Kingroup; import kingroup_v2.kinship.Kinship; import kingroup_v2.pop.allele.freq.KonHegFreqAlgOptView; import kingroup_v2.pop.allele.freq.KonHegFreqView; import kingroup_v2.pop.sample.usr.UsrPopSLOW; import pattern.ucm.UCController; import javax.swing.*; /** * Created by IntelliJ IDEA. * User: ESHFreeUser * Date: 7/06/2006 * Time: 12:57:16 * To change this template use File | Settings | File Templates. */ public class UCKonHegFreqAlgShowOpt implements UCController { public boolean run() { Kingroup project = KinGroupV2Project.getInstance(); KinGroupV2MainUI ui = KinGroupV2MainUI.getInstance(); UsrPopSLOW pop = ui.getUsrPop(); if (pop == null || pop.size() == 0) { ui.showMessageLoadPopFirst(); return false; } Kinship kinship = project.getKinship(); kinship.setHasGroupId(pop.getHasGroupId()); KonHegFreqAlgOptView optView = new KonHegFreqAlgOptView(project); // THIS IS TRICKY: // UCKinshipCalcLikeMtrx is run on APPLY // when it finishes, it must update table view UCKonHegFreqAlgCalcFreq calc = new UCKonHegFreqAlgCalcFreq(optView); // UCPopFreqCalcFreq_dev calc = new UCPopFreqCalcFreq_dev(optView); KonHegFreqView view = new KonHegFreqView(optView, calc); ui.setKonHegFreqView(view); calc.setViewForUpdate(view); view.setTableView(new JTable()); view.assembleWithOpt(JSplitPane.HORIZONTAL_SPLIT); view.setFocusOnApply(); return true; } }
[ "dmitry.a.konovalov@186c7d38-ed03-11dd-97d9-e7a3ff7b18fb" ]
dmitry.a.konovalov@186c7d38-ed03-11dd-97d9-e7a3ff7b18fb
66aa391cb536abaaa56f894c9fff20edbeb7192a
3d4349c88a96505992277c56311e73243130c290
/Preparation/processed-dataset/god-class_3_1096/29.java
015199d1187da597d805b55c1c2673f1a0186335
[]
no_license
D-a-r-e-k/Code-Smells-Detection
5270233badf3fb8c2d6034ac4d780e9ce7a8276e
079a02e5037d909114613aedceba1d5dea81c65d
refs/heads/master
2020-05-20T00:03:08.191102
2019-05-15T11:51:51
2019-05-15T11:51:51
185,272,690
7
4
null
null
null
null
UTF-8
Java
false
false
1,052
java
/* * (non-Javadoc) * * @see org.columba.mail.folder.IMailbox#addMessage(java.io.InputStream) */ public Object addMessage(InputStream in, Attributes attributes, Flags flags) throws Exception { PassiveHeaderParserInputStream withHeaderInputStream = new PassiveHeaderParserInputStream(in); IMAPFlags imapFlags = new IMAPFlags(flags.getFlags()); Integer uid = getServer().append(withHeaderInputStream, imapFlags, this); // Since JUNK is a non-system Flag we have to set it with // an addtitional STORE command if (((Boolean) attributes.get("columba.spam")).booleanValue()) { imapFlags.set(IMAPFlags.JUNK, true); getServer().setFlags(new Object[] { uid }, imapFlags, this); } // Parser the header Header header = withHeaderInputStream.getHeader(); // update the HeaderList IColumbaHeader cHeader = new ColumbaHeader(header, (Attributes) attributes.clone(), imapFlags); header.set("columba.uid", uid); headerList.add(cHeader, uid); fireMessageAdded(uid); return uid; }
[ "dariusb@unifysquare.com" ]
dariusb@unifysquare.com
17786bdee3edec5e49a197c4cf9b6dad156b9605
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
/data_defect4j/preprossed_method_corpus/Math/75/org/apache/commons/math/util/DefaultTransformer_transform_44.java
0a23bf9c634d87431ed922571dbd9c8aced2f4a6
[]
no_license
hvdthong/NetML
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
9bb103da21327912e5a29cbf9be9ff4d058731a5
refs/heads/master
2021-06-30T15:03:52.618255
2020-10-07T01:58:48
2020-10-07T01:58:48
150,383,588
1
1
null
2018-09-26T07:08:45
2018-09-26T07:08:44
null
UTF-8
Java
false
false
799
java
org apach common math util default number transform numbertransform java lang number numer string simpl convers capabl turn java lang number primit turn string represent number version revis date default transform defaulttransform number transform numbertransform serializ param object transform primit represent object org apach common math math except mathexcept successfulli transform href http common apach org collect api releas org apach common collect transform html transform object math except mathexcept math except mathexcept convers except transform object number number doublevalu doubl valueof string tostr doublevalu number format except numberformatexcept math except mathexcept convers except transform messag getmessag
[ "hvdthong@gmail.com" ]
hvdthong@gmail.com
8ffd03091a5185797f2cc2c7dbf77473cac6e7db
615e1f86e865da8879fa1fb7a4c7e243d2d95e19
/src/main/kotlin/com/desgreen/gov/database/domain/model_enum/Role.java
a9847560f6a6c72f49c8b3f59bbd8fef0cbb8e16
[]
no_license
bagus-stimata/ejakon-spring
bac23fb5c2a13d7f9e3c3a641958daae82193612
8c4b1f5f463e07da30459204d82966c98263737b
refs/heads/main
2023-03-20T22:39:23.488302
2021-03-18T09:15:26
2021-03-18T09:15:26
347,795,628
0
0
null
null
null
null
UTF-8
Java
false
false
1,972
java
package com.desgreen.gov.database.domain.model_enum; import org.apache.commons.lang3.ArrayUtils; import java.util.ArrayList; import java.util.List; public class Role { /** * boleh tidak ditambahkan ROLE_ * misal ADMIN menjadi ROLE_ADMIN * penambahan pada: * authList.add(new SimpleGrantedAuthority("ROLE_ADMIN")); * oleh karena untuk menyamakan dengan konsep @Secure("ROLE_ADMIN") * vaadin maka sebaiknya ditambahkan */ public static final String USER = "ROLE_USER"; //semuanya harus user public static final String ADMIN = "ROLE_ADMIN"; public static final String ADMIN_1 = "ROLE_ADMIN_1"; public static final String ADMIN_2 = "ROLE_ADMIN_2"; public static final String GUEST = "ROLE_GUEST"; public static final String USER1 = "ROLE_USER_1"; //Masyarakat public static final String PEJABAT1 = "ROLE_PEJABAT_1"; public static final String PEJABAT2 = "ROLE_PEJABAT_2"; public static final String PEJABAT3 = "ROLE_PEJABAT_3"; public static final String PEJABAT4 = "ROLE_PEJABAT_4"; //Menu digunakan suatu penanda MNU // public static final String MNU_ADMIN_1 = "ROLE_MNU_BAPPEDA"; // public static final String MNU_PROFILE_1 = "ROLE_MNU_SOSIAL"; public static final String MNU_PERSON_1 = "ROLE_MNU_PERSON_1"; private Role() { // Static methods and fields only } public static String[] getAllRoles() { // return new String[] { USER, ADMIN, MNU_ADMIN_1 }; String allRoles[] = ArrayUtils.addAll(getAuthRoles(), getMenuRoles()); return allRoles; } public static List getAllRolesList() { List<String> list = new ArrayList<>(); // Iterate through the array for (String t : getAllRoles()) { list.add(t); } return list; } public static String[] getAuthRoles() { return new String[] { USER, ADMIN, GUEST, ADMIN_1, ADMIN_2, USER1, PEJABAT1, PEJABAT2, PEJABAT3, PEJABAT4 }; } public static String[] getMenuRoles() { return new String[] { MNU_PERSON_1}; } }
[ "bagus.stimata@gmail.com" ]
bagus.stimata@gmail.com
4f43133505b819829b5fdd3d9e13ab932577bc38
f01fd89f2fff33b117cf33bc945a50a2cb77792e
/src/main/java/com/scd/model/po/User.java
29cf96f399776daaaf7fa55b7c55274ec43537ab
[ "Apache-2.0" ]
permissive
shootercheng/dynamic-datasource
30f350f7493990442a72c537cde6be7e84b65396
f9f1d070148dfbb22200623f9e15a3627a7936b6
refs/heads/master
2022-07-20T14:37:24.579882
2022-01-29T13:58:19
2022-01-29T13:58:19
202,569,525
0
1
Apache-2.0
2022-06-21T01:40:31
2019-08-15T15:48:44
Java
UTF-8
Java
false
false
266
java
package com.scd.model.po; import lombok.Data; import java.io.Serializable; @Data public class User implements Serializable { private Long id; private String userName; private String passWord; private String userSex; private String nickName; }
[ "3281328128@qq.com" ]
3281328128@qq.com
f6145fbe8ccc15d792b5114e8aa898b4d763a649
54c1dcb9a6fb9e257c6ebe7745d5008d29b0d6b6
/app/src/main/java/com/google/android/gms/vision/label/internal/client/zzd.java
ca36f371a796ce1aea9b1d15d8dcc43f3c7cfd3b
[]
no_license
rcoolboy/guilvN
3817397da465c34fcee82c0ca8c39f7292bcc7e1
c779a8e2e5fd458d62503dc1344aa2185101f0f0
refs/heads/master
2023-05-31T10:04:41.992499
2021-07-07T09:58:05
2021-07-07T09:58:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,718
java
package com.google.android.gms.vision.label.internal.client; import android.os.IBinder; import android.os.IInterface; import android.os.Parcel; import android.os.RemoteException; import com.google.android.gms.dynamic.IObjectWrapper; import com.google.android.gms.internal.vision.zza; import com.google.android.gms.internal.vision.zzc; public final class zzd extends zza implements zzb { public zzd(IBinder iBinder) { super(iBinder, "com.google.android.gms.vision.label.internal.client.INativeImageLabelerCreator"); } @Override // com.google.android.gms.vision.label.internal.client.zzb public final INativeImageLabeler newImageLabeler(IObjectWrapper iObjectWrapper, ImageLabelerOptions imageLabelerOptions) throws RemoteException { INativeImageLabeler iNativeImageLabeler; Parcel obtainAndWriteInterfaceToken = obtainAndWriteInterfaceToken(); zzc.zza(obtainAndWriteInterfaceToken, iObjectWrapper); zzc.zza(obtainAndWriteInterfaceToken, imageLabelerOptions); Parcel zza = zza(1, obtainAndWriteInterfaceToken); IBinder readStrongBinder = zza.readStrongBinder(); if (readStrongBinder == null) { iNativeImageLabeler = null; } else { IInterface queryLocalInterface = readStrongBinder.queryLocalInterface("com.google.android.gms.vision.label.internal.client.INativeImageLabeler"); if (queryLocalInterface instanceof INativeImageLabeler) { iNativeImageLabeler = (INativeImageLabeler) queryLocalInterface; } else { iNativeImageLabeler = new zza(readStrongBinder); } } zza.recycle(); return iNativeImageLabeler; } }
[ "593746220@qq.com" ]
593746220@qq.com
754eba8e48ebfcf3c5649b92b0cac6fbf868936c
7016cec54fb7140fd93ed805514b74201f721ccd
/ui/web/main/src/java/com/echothree/ui/web/main/action/purchasing/vendortype/EditActionForm.java
37598f9e6f5fe26027b53d05358033ad681b7a77
[ "MIT", "Apache-1.1", "Apache-2.0" ]
permissive
echothreellc/echothree
62fa6e88ef6449406d3035de7642ed92ffb2831b
bfe6152b1a40075ec65af0880dda135350a50eaf
refs/heads/master
2023-09-01T08:58:01.429249
2023-08-21T11:44:08
2023-08-21T11:44:08
154,900,256
5
1
null
null
null
null
UTF-8
Java
false
false
1,303
java
// -------------------------------------------------------------------------------- // Copyright 2002-2023 Echo Three, LLC // // 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.echothree.ui.web.main.action.purchasing.vendortype; import com.echothree.view.client.web.struts.sprout.annotation.SproutForm; @SproutForm(name="VendorTypeEdit") public class EditActionForm extends AddActionForm { private String originalVendorTypeName; public String getOriginalVendorTypeName() { return originalVendorTypeName; } public void setOriginalVendorTypeName(String originalVendorTypeName) { this.originalVendorTypeName = originalVendorTypeName; } }
[ "rich@echothree.com" ]
rich@echothree.com
11165c59752edc17594f057114b7d0b2c466f1d3
10be4cfa08f80d785cb20d780e5ad7379ef8ef4f
/Curso Sequencial em desenvolvimento de soluções Java para Web - UNISUL/5 - Java para Web/Exercicios/BancoSequencial/src/br/unisul/banco/view/controller/AutenticarServlet.java
2d807505d77d13e25c77a5457117f9fd3125a1b1
[]
no_license
fdelameli/materiais-cursos
a62009f6bb56683e6031cec38bf02637fcdcba82
d2193beb570930f20f0bf7d65691b37909f12996
refs/heads/master
2022-06-29T11:18:48.861802
2018-06-28T14:43:59
2018-06-28T14:43:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,409
java
package br.unisul.banco.view.controller; import java.io.IOException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import br.unisul.banco.bean.UsuarioBean; import br.unisul.banco.bo.UsuarioBo; public class AutenticarServlet extends HttpServlet { private static final long serialVersionUID = 1L; public void doPost (HttpServletRequest request, HttpServletResponse response) throws IOException { UsuarioBean usuario = new UsuarioBean(); usuario.setLogin(request.getParameter("login")); usuario.setSenha(request.getParameter("senha")); UsuarioBean usuarioLogado = null; UsuarioBo bo = new UsuarioBo(); usuarioLogado = bo.verificarAuth(usuario); if (usuarioLogado != null && usuarioLogado.getTipo().equals(2)) { request.getSession().setAttribute("logado", usuarioLogado); response.sendRedirect("cliente/cliente.jsp"); } else if (usuarioLogado != null && usuarioLogado.getTipo().equals(1)) { request.getSession().setAttribute("logado", usuarioLogado); response.sendRedirect("administrador/administrador.jsp"); } else { response.sendRedirect("erro.jsp"); } // if (usuarioLogado != null) { // request.getSession().setAttribute("logado", usuarioLogado); // response.sendRedirect("sucesso.jsp"); // } else { // response.sendRedirect("erro.jsp"); // } } }
[ "fabio.bruna@digitro.com.br" ]
fabio.bruna@digitro.com.br
567a566afb1640e204a80c790fb543ca1a4ce521
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/30/30_71324e4bed7d81d459eeecbc173ae9d04d9fe821/ApplicationModelEditor/30_71324e4bed7d81d459eeecbc173ae9d04d9fe821_ApplicationModelEditor_s.java
bf36fe45141cb61196c10225432010157bf0ae4e
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
1,243
java
/******************************************************************************* * Copyright (c) 2010 BestSolution.at 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: * Tom Schindl <tom.schindl@bestsolution.at> - initial API and implementation ******************************************************************************/ package org.eclipse.e4.tools.emf.ui.internal.wbm; import javax.inject.Inject; import org.eclipse.core.resources.IProject; import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.e4.core.di.annotations.Optional; import org.eclipse.e4.tools.emf.ui.common.IModelResource; import org.eclipse.e4.tools.emf.ui.internal.common.ModelEditor; import org.eclipse.swt.widgets.Composite; public class ApplicationModelEditor extends ModelEditor { @Inject public ApplicationModelEditor(Composite composite, IEclipseContext context, IModelResource modelProvider, @Optional IProject project) { super(composite, context, modelProvider, project); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
f646032aa655c0c44d3c29c7023b359199e0c738
038ee6b20cae51169a2ed4ed64a7b8e99b5cbaad
/schemaOrgGson/src/org/kyojo/schemaorg/m3n4/gson/pending/clazz/LegislationObjectDeserializer.java
905d706c9f6602c2a91da4d0fc6cf3172a20f2c3
[ "Apache-2.0" ]
permissive
nagaikenshin/schemaOrg
3dec1626781913930da5585884e3484e0b525aea
4c9d6d098a2741c2dc2a814f1c708ee55c36e9a8
refs/heads/master
2021-06-25T04:52:49.995840
2019-05-12T06:22:37
2019-05-12T06:22:37
134,319,974
1
0
null
null
null
null
UTF-8
Java
false
false
1,101
java
package org.kyojo.schemaorg.m3n4.gson.pending.clazz; import java.lang.reflect.Field; import java.lang.reflect.Type; import java.util.HashMap; import java.util.Map; import org.kyojo.gson.JsonDeserializationContext; import org.kyojo.gson.JsonDeserializer; import org.kyojo.gson.JsonElement; import org.kyojo.gson.JsonParseException; import org.kyojo.schemaorg.m3n4.pending.impl.LEGISLATION_OBJECT; import org.kyojo.schemaorg.m3n4.pending.Clazz.LegislationObject; import org.kyojo.schemaorg.m3n4.gson.DeserializerTemplate; public class LegislationObjectDeserializer implements JsonDeserializer<LegislationObject> { public static Map<String, Field> fldMap = new HashMap<>(); @Override public LegislationObject deserialize(JsonElement jsonElement, Type type, JsonDeserializationContext context) throws JsonParseException { if(jsonElement.isJsonPrimitive()) { return new LEGISLATION_OBJECT(jsonElement.getAsString()); } return DeserializerTemplate.deserializeSub(jsonElement, type, context, new LEGISLATION_OBJECT(), LegislationObject.class, LEGISLATION_OBJECT.class, fldMap); } }
[ "nagai@nagaikenshin.com" ]
nagai@nagaikenshin.com
f8e41d0298b1f1f7f058544faa8e256e1580bf33
5ec06dab1409d790496ce082dacb321392b32fe9
/clients/jaxrs-spec/generated/src/gen/java/org/openapitools/model/ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo.java
78fe4e3d56512003e774b1e716965c37571cb1dc
[ "Apache-2.0" ]
permissive
shinesolutions/swagger-aem-osgi
e9d2385f44bee70e5bbdc0d577e99a9f2525266f
c2f6e076971d2592c1cbd3f70695c679e807396b
refs/heads/master
2022-10-29T13:07:40.422092
2021-04-09T07:46:03
2021-04-09T07:46:03
190,217,155
3
3
Apache-2.0
2022-10-05T03:26:20
2019-06-04T14:23:28
null
UTF-8
Java
false
false
4,063
java
package org.openapitools.model; import org.openapitools.model.ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociProperties; import javax.validation.constraints.*; import javax.validation.Valid; import io.swagger.annotations.*; import java.util.Objects; import com.fasterxml.jackson.annotation.JsonProperty; public class ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo { private @Valid String pid = null; private @Valid String title = null; private @Valid String description = null; private @Valid ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociProperties properties = null; /** **/ public ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo pid(String pid) { this.pid = pid; return this; } @ApiModelProperty(value = "") @JsonProperty("pid") public String getPid() { return pid; } public void setPid(String pid) { this.pid = pid; } /** **/ public ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo title(String title) { this.title = title; return this; } @ApiModelProperty(value = "") @JsonProperty("title") public String getTitle() { return title; } public void setTitle(String title) { this.title = title; } /** **/ public ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo description(String description) { this.description = description; return this; } @ApiModelProperty(value = "") @JsonProperty("description") public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } /** **/ public ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo properties(ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociProperties properties) { this.properties = properties; return this; } @ApiModelProperty(value = "") @JsonProperty("properties") public ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociProperties getProperties() { return properties; } public void setProperties(ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociProperties properties) { this.properties = properties; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo comAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo = (ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo) o; return Objects.equals(pid, comAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo.pid) && Objects.equals(title, comAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo.title) && Objects.equals(description, comAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo.description) && Objects.equals(properties, comAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo.properties); } @Override public int hashCode() { return Objects.hash(pid, title, description, properties); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class ComAdobeCqSocialModerationDashboardInternalImplFilterGroupSociInfo {\n"); sb.append(" pid: ").append(toIndentedString(pid)).append("\n"); sb.append(" title: ").append(toIndentedString(title)).append("\n"); sb.append(" description: ").append(toIndentedString(description)).append("\n"); sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); sb.append("}"); return sb.toString(); } /** * Convert the given object to string with each line indented by 4 spaces * (except the first line). */ private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); } }
[ "cliffano@gmail.com" ]
cliffano@gmail.com
ed6fd87e74d97d3d755f62bd37dba7413e6f8e04
b85d0ce8280cff639a80de8bf35e2ad110ac7e16
/com/fossil/duv.java
d54d73ee67ce69c176e3994484dcc599b3446772
[]
no_license
MathiasMonstrey/fosil_decompiled
3d90433663db67efdc93775145afc0f4a3dd150c
667c5eea80c829164220222e8fa64bf7185c9aae
refs/heads/master
2020-03-19T12:18:30.615455
2018-06-07T17:26:09
2018-06-07T17:26:09
136,509,743
1
0
null
null
null
null
UTF-8
Java
false
false
4,312
java
package com.fossil; import com.fossil.dvg.C3213a; import com.fossil.dvj.C3227a; import com.squareup.okhttp.internal.http.RequestException; import com.squareup.okhttp.internal.http.RouteException; import java.io.IOException; import java.net.ProtocolException; public class duv { private final dvi client; private boolean duG; volatile boolean duH; dvj duI; dwu duJ; class C3214a implements C3213a { private final dvj duK; private final boolean duL; final /* synthetic */ duv duM; private final int index; C3214a(duv com_fossil_duv, int i, dvj com_fossil_dvj, boolean z) { this.duM = com_fossil_duv; this.index = i; this.duK = com_fossil_dvj; this.duL = z; } public dvl mo2693a(dvj com_fossil_dvj) throws IOException { if (this.index >= this.duM.client.azm().size()) { return this.duM.m9800a(com_fossil_dvj, this.duL); } return ((dvg) this.duM.client.azm().get(this.index)).m9866a(new C3214a(this.duM, this.index + 1, com_fossil_dvj, this.duL)); } } protected duv(dvi com_fossil_dvi, dvj com_fossil_dvj) { this.client = com_fossil_dvi.azo(); this.duI = com_fossil_dvj; } public dvl ayt() throws IOException { synchronized (this) { if (this.duG) { throw new IllegalStateException("Already Executed"); } this.duG = true; } try { this.client.azl().m9837b(this); dvl dw = dw(false); if (dw != null) { return dw; } throw new IOException("Canceled"); } finally { this.client.azl().m9838c(this); } } private dvl dw(boolean z) throws IOException { return new C3214a(this, 0, this.duI, z).mo2693a(this.duI); } dvl m9800a(dvj com_fossil_dvj, boolean z) throws IOException { dvj azx; dwu a; dvk azu = com_fossil_dvj.azu(); if (azu != null) { C3227a azv = com_fossil_dvj.azv(); dvh contentType = azu.contentType(); if (contentType != null) { azv.aY("Content-Type", contentType.toString()); } long contentLength = azu.contentLength(); if (contentLength != -1) { azv.aY("Content-Length", Long.toString(contentLength)); azv.kM("Transfer-Encoding"); } else { azv.aY("Transfer-Encoding", "chunked"); azv.kM("Content-Length"); } azx = azv.azx(); } else { azx = com_fossil_dvj; } this.duJ = new dwu(this.client, azx, false, false, z, null, null, null, null); int i = 0; while (!this.duH) { try { this.duJ.aAV(); this.duJ.aBe(); dvl aBa = this.duJ.aBa(); azx = this.duJ.aBg(); if (azx == null) { if (!z) { this.duJ.releaseConnection(); } return aBa; } int i2 = i + 1; if (i2 > 20) { throw new ProtocolException("Too many follow-up requests: " + i2); } if (!this.duJ.m10230f(azx.azq())) { this.duJ.releaseConnection(); } this.duJ = new dwu(this.client, azx, false, false, z, this.duJ.aBd(), null, null, aBa); i = i2; } catch (RequestException e) { throw e.getCause(); } catch (RouteException e2) { a = this.duJ.m10227a(e2); if (a != null) { this.duJ = a; } else { throw e2.getLastConnectException(); } } catch (IOException e3) { a = this.duJ.m10228a(e3, null); if (a != null) { this.duJ = a; } else { throw e3; } } } this.duJ.releaseConnection(); throw new IOException("Canceled"); } }
[ "me@mathiasmonstrey.be" ]
me@mathiasmonstrey.be
c2cc307d8217b1b5345747fe5f1c7b24998b34fe
d1a6d1e511df6db8d8dd0912526e3875c7e1797d
/genny_JavaWithoutLambdas/applicationModule/src/main/java/applicationModulepackageJava9/Foo66.java
35811484fa2f132ea039ce7feca4fc2d2013a0e1
[]
no_license
NikitaKozlov/generated-project-for-desugaring
0bc1443ab3ddc84cd289331c726761585766aea7
81506b3711004185070ca4bb9a93482b70011d36
refs/heads/master
2020-03-20T00:35:06.996525
2018-06-12T09:30:37
2018-06-12T09:30:37
137,049,317
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package applicationModulepackageJava9; public class Foo66 { public void foo0() { new applicationModulepackageJava9.Foo65().foo5(); } public void foo1() { foo0(); } public void foo2() { foo1(); } public void foo3() { foo2(); } public void foo4() { foo3(); } public void foo5() { foo4(); } }
[ "nikita.e.kozlov@gmail.com" ]
nikita.e.kozlov@gmail.com
bc503a43fdd42b50db972e3297aa6573d740f8e4
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/11/11_b0415352a93994e7886781810f8d74fc81fa86d9/RandomizedContext/11_b0415352a93994e7886781810f8d74fc81fa86d9_RandomizedContext_s.java
ddc6577c269f02723af2561e274612b84b4e1411
[]
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
5,701
java
package com.carrotsearch.randomizedtesting; import java.util.*; import com.carrotsearch.randomizedtesting.annotations.Nightly; /** * Context variables for an execution of a test suite (hooks and tests) running * under a {@link RandomizedRunner}. */ public final class RandomizedContext { /** * Per thread assigned resources. */ private final static class PerThreadResources { /** * Generators of pseudo-randomness. This is a queue because we stack * them during lifecycle phases (suite/ method level). */ final ArrayDeque<Randomness> randomnesses = new ArrayDeque<Randomness>(); } /** * All thread groups we're currently tracking contexts for. */ final static IdentityHashMap<ThreadGroup, RandomizedContext> contexts = new IdentityHashMap<ThreadGroup, RandomizedContext>(); /** * Per thread resources for each context. */ final IdentityHashMap<Thread, PerThreadResources> perThreadResources = new IdentityHashMap<Thread, PerThreadResources>(); /** A thread group that shares this context. */ private final ThreadGroup threadGroup; /** @see #getTargetClass() */ private final Class<?> suiteClass; /** @see Nightly */ private final boolean nightlyMode; /** Master seed/ randomness. */ private final Randomness runnerRandomness; /** The context and all of its resources are no longer usable. */ private volatile boolean disposed; /** */ private RandomizedContext(ThreadGroup tg, Class<?> suiteClass, Randomness runnerRandomness, boolean nightlyMode) { this.threadGroup = tg; this.suiteClass = suiteClass; this.nightlyMode = nightlyMode; this.runnerRandomness = runnerRandomness; } /** The class (suite) being tested. */ public Class<?> getTargetClass() { checkDisposed(); return suiteClass; } /** Master seed/ randomness. */ Randomness getRunnerRandomness() { return runnerRandomness; } /** * Returns the runner's seed, formatted. */ public String getRunnerSeed() { checkDisposed(); return Randomness.formatSeed(getRunnerRandomness().seed); } /** Source of randomness for the context's thread. */ public Randomness getRandomness() { return getPerThread().randomnesses.peek(); } Randomness [] getRandomnesses() { ArrayDeque<Randomness> randomnesses = getPerThread().randomnesses; return randomnesses.toArray( new Randomness [randomnesses.size()]); } /** * A shorthand for calling {@link #getRandomness()} and then {@link Randomness#getRandom()}. */ public Random getRandom() { return getRandomness().getRandom(); } /** * Return <code>true</code> if tests are running in nightly mode. */ public boolean isNightly() { checkDisposed(); return nightlyMode; } /** * @return Returns the context for the calling thread or throws an * {@link IllegalStateException} if the thread is out of scope. */ public static RandomizedContext current() { return context(Thread.currentThread()); } static RandomizedContext context(Thread thread) { final ThreadGroup currentGroup = thread.getThreadGroup(); synchronized (contexts) { RandomizedContext context = contexts.get(currentGroup); if (context == null) { throw new IllegalStateException("No context information for thread: " + thread.getName() + " (" + thread.getThreadGroup() + "). " + "Is this thread running under a " + RandomizedRunner.class + " runner? Add @RunWith(" + RandomizedRunner.class + ".class)" + " to your test class. "); } synchronized (context.perThreadResources) { if (!context.perThreadResources.containsKey(thread)) { PerThreadResources perThreadResources = new PerThreadResources(); perThreadResources.randomnesses.push( new Randomness(context.getRunnerRandomness().seed)); context.perThreadResources.put(thread, perThreadResources); } } return context; } } /** * Create a new context bound to a thread group. */ static RandomizedContext create(ThreadGroup tg, Class<?> suiteClass, Randomness runnerRandomness, boolean nightlyMode) { assert Thread.currentThread().getThreadGroup() == tg; synchronized (contexts) { RandomizedContext ctx = new RandomizedContext(tg, suiteClass, runnerRandomness, nightlyMode); contexts.put(tg, ctx); ctx.perThreadResources.put(Thread.currentThread(), new PerThreadResources()); return ctx; } } /** * Dispose of the context. */ void dispose() { checkDisposed(); synchronized (contexts) { disposed = true; contexts.remove(threadGroup); } } /** Push a new randomness on top of the stack. */ void push(Randomness rnd) { getPerThread().randomnesses.push(rnd); } /** Push a new randomness on top of the stack. */ Randomness pop() { return getPerThread().randomnesses.pop(); } /** Return per-thread resources associated with the current thread. */ private PerThreadResources getPerThread() { checkDisposed(); synchronized (perThreadResources) { return perThreadResources.get(Thread.currentThread()); } } /** * Throw an exception if disposed. */ private void checkDisposed() { if (disposed) throw new IllegalStateException("Context disposed: " + toString() + " for thread: " + Thread.currentThread()); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
35774ac95c471440af1f63d145e40dd110b64c20
a114d21bb9ef0a534f7c2fd4e5137d05ffbfae48
/src/main/java/com/craftbeerstore/application/service/util/RandomUtil.java
111ce4ef0e04427d726746f55470bb6c2d7df7ab
[]
no_license
jlopezjuy/craft-beer-store
0c3bad07491fe7478ee91de0a488333027068335
81f219a713014486cf4366a5a5f4da4a472819e1
refs/heads/master
2020-05-05T12:28:55.089140
2019-05-27T00:26:09
2019-05-27T00:26:09
180,030,497
0
0
null
2019-04-08T00:26:59
2019-04-07T22:18:09
Java
UTF-8
Java
false
false
904
java
package com.craftbeerstore.application.service.util; import org.apache.commons.lang3.RandomStringUtils; /** * Utility class for generating random Strings. */ public final class RandomUtil { private static final int DEF_COUNT = 20; private RandomUtil() { } /** * Generate a password. * * @return the generated password */ public static String generatePassword() { return RandomStringUtils.randomAlphanumeric(DEF_COUNT); } /** * Generate an activation key. * * @return the generated activation key */ public static String generateActivationKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); } /** * Generate a reset key. * * @return the generated reset key */ public static String generateResetKey() { return RandomStringUtils.randomNumeric(DEF_COUNT); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
e6a2236d30b1b40df6e853657a1ec613bac5b7fc
53385e92d3bf1672e1cc32f9107aa4aa2976ac76
/impl/src/test/java/si/uom/UnitFormatTest.java
3c0eae90d7f72ee33de7005ec42385288a9ddc5e
[ "BSD-3-Clause" ]
permissive
wick3dshadow/si-units
b96575d85b052cb8895f748bd6ed539e43522f46
2a05d56f5d1618db151691c28fcff6115c46fbf4
refs/heads/master
2021-01-16T19:03:22.286570
2015-08-05T22:53:10
2015-08-05T22:53:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,761
java
/* * Unit-API - Units of Measurement API for Java * Copyright (c) 2005-2015, 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 name of JSR-363 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 si.uom; import static org.junit.Assert.*; import static tec.units.ri.unit.MetricPrefix.KILO; import static tec.units.ri.unit.MetricPrefix.MEGA; import static tec.units.ri.unit.Units.HERTZ; import static tec.units.ri.unit.Units.KILOGRAM; import static tec.units.ri.unit.Units.METRE; import static tec.units.ri.unit.Units.MINUTE; import static tec.units.ri.unit.Units.SECOND; import java.io.IOException; import javax.measure.Quantity; import javax.measure.Unit; import javax.measure.format.ParserException; import javax.measure.format.UnitFormat; import javax.measure.quantity.Area; import javax.measure.quantity.Dimensionless; import javax.measure.quantity.Length; import javax.measure.quantity.Mass; import javax.measure.quantity.Radioactivity; import javax.measure.quantity.Speed; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import si.uom.SI; import si.uom.quantity.MagnetomotiveForce; import tec.units.ri.format.EBNFUnitFormat; import tec.units.ri.format.SimpleUnitFormat; import tec.units.ri.quantity.DefaultQuantityFactory; import tec.units.ri.unit.Units; /** * @author <a href="mailto:units@catmedia.us">Werner Keil</a> * */ public class UnitFormatTest { @SuppressWarnings("unused") private Quantity<Length> sut; private EBNFUnitFormat format; private SimpleUnitFormat format2; @Before public void init() { sut = DefaultQuantityFactory.getInstance(Length.class).create(10, METRE); format = EBNFUnitFormat.getInstance(); format2 = SimpleUnitFormat.getInstance(); format2.label(SI.BEL, "B"); format2.label(SI.CARAT, "ct"); format2.label(SI.HECTARE, "Ha"); format2.label(SI.TONNE, "t"); } @Test public void testFormat2() { Unit<Speed> kph = SI.KILOMETRES_PER_HOUR; assertEquals("kph", kph.toString()); } @Test public void testFormat4() { Unit<Speed> kph = Units.KILOMETRES_PER_HOUR; assertEquals("kph", kph.toString()); } @Test public void testFormat5() { Unit<Dimensionless> b = SI.BEL; assertEquals("B", b.toString()); //assertEquals("B", format.format(b)); } @Test public void testFormat6() { Unit<Area> b = SI.HECTARE; assertEquals("Ha", b.toString()); } @Test public void testFormat7() { Unit<Mass> c = SI.CARAT; // assertEquals("ct", format.format(c)); assertEquals("ct", c.toString()); } @Test public void testFormat3() { Unit<MagnetomotiveForce> at = SI.AMPERE_TURN; //assertEquals("At", at.toString()); } @Test public void testParseSimple() { final UnitFormat format = EBNFUnitFormat.getInstance(); try { Unit<?> u = format.parse("s"); assertEquals("s", u.getSymbol()); assertEquals(SECOND, u); } catch (ParserException e) { fail(e.getMessage()); } } @Test public void testFormatFromQuantity() { final UnitFormat format = EBNFUnitFormat.getInstance(); final Appendable a = new StringBuilder(); try { format.format(METRE, a); } catch (IOException e) { fail(e.getMessage()); } assertEquals(METRE, sut.getUnit()); assertEquals("m", a.toString()); final Appendable a2 = new StringBuilder(); @SuppressWarnings("unchecked") Unit<Speed> v = (Unit<Speed>) sut.getUnit().divide(SECOND); try { format.format(v, a2); } catch (IOException e) { fail(e.getMessage()); } assertEquals("m/s", a2.toString()); } @Test public void testParseSimple1() { final UnitFormat format = EBNFUnitFormat.getInstance(); try { Unit<?> u = format.parse("min"); // assertEquals("min", u.getSymbol()); assertEquals(MINUTE, u); } catch (ParserException e) { fail(e.getMessage()); } } @Test public void testParseSimple2() { final UnitFormat format = EBNFUnitFormat.getInstance(); try { Unit<?> u = format.parse("m"); assertEquals("m", u.getSymbol()); assertEquals(METRE, u); } catch (ParserException e) { fail(e.getMessage()); } } @Test public void testParseSimple3() { final UnitFormat format = EBNFUnitFormat.getInstance(); try { Unit<?> u = format.parse("kg"); assertEquals("kg", u.getSymbol()); assertEquals(KILOGRAM, u); } catch (ParserException e) { fail(e.getMessage()); } } }
[ "werner.keil@gmx.net" ]
werner.keil@gmx.net
89f0dc2cc1412ff8951ba9f1637417a234681f0e
250ae93cd5aa312876b04031060b4f7d51a5dc6a
/oh-my-scheduler-server/src/main/java/com/github/kfcfans/oms/server/service/JobService.java
623d331897009bd397d81d037d7b64a5a94e57b5
[ "Apache-2.0" ]
permissive
cuittzq/OhMyScheduler
0017fef8090ae0a5260dc2f919d7b69d52890ff2
5c03143eca350044af31c5697cb7ee39f8df0395
refs/heads/master
2022-09-25T23:41:18.777071
2020-06-01T04:24:34
2020-06-01T04:24:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
7,717
java
package com.github.kfcfans.oms.server.service; import com.github.kfcfans.oms.common.InstanceStatus; import com.github.kfcfans.oms.common.TimeExpressionType; import com.github.kfcfans.oms.common.request.http.SaveJobInfoRequest; import com.github.kfcfans.oms.common.response.JobInfoDTO; import com.github.kfcfans.oms.server.common.constans.JobStatus; import com.github.kfcfans.oms.server.common.utils.CronExpression; import com.github.kfcfans.oms.server.persistence.core.model.InstanceInfoDO; import com.github.kfcfans.oms.server.persistence.core.model.JobInfoDO; import com.github.kfcfans.oms.server.persistence.core.repository.InstanceInfoRepository; import com.github.kfcfans.oms.server.persistence.core.repository.JobInfoRepository; import com.github.kfcfans.oms.server.service.id.IdGenerateService; import com.github.kfcfans.oms.server.service.instance.InstanceService; import com.google.common.base.Joiner; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.BeanUtils; import org.springframework.stereotype.Service; import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.Date; import java.util.List; import java.util.Optional; /** * 任务服务 * * @author tjq * @since 2020/4/15 */ @Slf4j @Service public class JobService { @Resource private InstanceService instanceService; @Resource private DispatchService dispatchService; @Resource private IdGenerateService idGenerateService; @Resource private JobInfoRepository jobInfoRepository; @Resource private InstanceInfoRepository instanceInfoRepository; private static final Joiner commaJoiner = Joiner.on(",").skipNulls(); /** * 保存/修改任务 * @param request 任务请求 * @return 创建的任务ID(jobId) * @throws Exception 异常 */ public Long saveJob(SaveJobInfoRequest request) throws Exception { JobInfoDO jobInfoDO; if (request.getId() != null) { jobInfoDO = jobInfoRepository.findById(request.getId()).orElseThrow(() -> new IllegalArgumentException("can't find job by jobId: " + request.getId())); }else { jobInfoDO = new JobInfoDO(); } // 值拷贝 BeanUtils.copyProperties(request, jobInfoDO); // 拷贝枚举值 jobInfoDO.setExecuteType(request.getExecuteType().getV()); jobInfoDO.setProcessorType(request.getProcessorType().getV()); jobInfoDO.setTimeExpressionType(request.getTimeExpressionType().getV()); jobInfoDO.setStatus(request.isEnable() ? JobStatus.ENABLE.getV() : JobStatus.DISABLE.getV()); if (jobInfoDO.getMaxWorkerCount() == null) { jobInfoDO.setMaxInstanceNum(0); } // 转化报警用户列表 if (!CollectionUtils.isEmpty(request.getNotifyUserIds())) { jobInfoDO.setNotifyUserIds(commaJoiner.join(request.getNotifyUserIds())); } refreshJob(jobInfoDO); if (request.getId() == null) { jobInfoDO.setGmtCreate(new Date()); } JobInfoDO res = jobInfoRepository.saveAndFlush(jobInfoDO); return res.getId(); } public JobInfoDTO fetchJob(Long jobId) { JobInfoDO jobInfoDO = jobInfoRepository.findById(jobId).orElseThrow(() -> new IllegalArgumentException("can't find job by jobId: " + jobId)); JobInfoDTO jobInfoDTO = new JobInfoDTO(); BeanUtils.copyProperties(jobInfoDO, jobInfoDTO); return jobInfoDTO; } /** * 手动立即运行某个任务 * @param jobId 任务ID * @param instanceParams 任务实例参数 * @return 任务实例ID */ public long runJob(Long jobId, String instanceParams) { Optional<JobInfoDO> jobInfoOPT = jobInfoRepository.findById(jobId); if (!jobInfoOPT.isPresent()) { throw new IllegalArgumentException("can't find job by jobId:" + jobId); } JobInfoDO jobInfo = jobInfoOPT.get(); long instanceId = idGenerateService.allocate(); InstanceInfoDO executeLog = new InstanceInfoDO(); executeLog.setJobId(jobInfo.getId()); executeLog.setAppId(jobInfo.getAppId()); executeLog.setInstanceId(instanceId); executeLog.setStatus(InstanceStatus.WAITING_DISPATCH.getV()); executeLog.setExpectedTriggerTime(System.currentTimeMillis()); executeLog.setGmtCreate(new Date()); executeLog.setGmtModified(executeLog.getGmtCreate()); instanceInfoRepository.saveAndFlush(executeLog); dispatchService.dispatch(jobInfo, executeLog.getInstanceId(), 0, instanceParams); return instanceId; } /** * 删除某个任务 * @param jobId 任务ID */ public void deleteJob(Long jobId) { shutdownOrStopJob(jobId, JobStatus.DELETED); } /** * 禁用某个任务 */ public void disableJob(Long jobId) { shutdownOrStopJob(jobId, JobStatus.DISABLE); } /** * 启用某个任务 * @param jobId 任务ID * @throws Exception 异常(CRON表达式错误) */ public void enableJob(Long jobId) throws Exception { JobInfoDO jobInfoDO = jobInfoRepository.findById(jobId).orElseThrow(() -> new IllegalArgumentException("can't find job by jobId:" + jobId)); jobInfoDO.setStatus(JobStatus.ENABLE.getV()); refreshJob(jobInfoDO); jobInfoRepository.saveAndFlush(jobInfoDO); } /** * 停止或删除某个JOB * 秒级任务还要额外停止正在运行的任务实例 */ private void shutdownOrStopJob(Long jobId, JobStatus status) throws IllegalArgumentException { // 1. 先更新 job_info 表 Optional<JobInfoDO> jobInfoOPT = jobInfoRepository.findById(jobId); if (!jobInfoOPT.isPresent()) { throw new IllegalArgumentException("can't find job by jobId:" + jobId); } JobInfoDO jobInfoDO = jobInfoOPT.get(); jobInfoDO.setStatus(status.getV()); jobInfoDO.setGmtModified(new Date()); jobInfoRepository.saveAndFlush(jobInfoDO); // 2. 关闭秒级任务 TimeExpressionType timeExpressionType = TimeExpressionType.of(jobInfoDO.getTimeExpressionType()); if (timeExpressionType == TimeExpressionType.CRON || timeExpressionType == TimeExpressionType.API) { return; } List<InstanceInfoDO> executeLogs = instanceInfoRepository.findByJobIdAndStatusIn(jobId, InstanceStatus.generalizedRunningStatus); if (CollectionUtils.isEmpty(executeLogs)) { return; } if (executeLogs.size() > 1) { log.warn("[JobService] frequent job should just have one running instance, there must have some bug."); } executeLogs.forEach(instance -> { try { // 重复查询了数据库,不过问题不大,这个调用量很小 instanceService.stopInstance(instance.getInstanceId()); }catch (Exception ignore) { } }); } private void refreshJob(JobInfoDO jobInfoDO) throws Exception { // 计算下次调度时间 Date now = new Date(); TimeExpressionType timeExpressionType = TimeExpressionType.of(jobInfoDO.getTimeExpressionType()); if (timeExpressionType == TimeExpressionType.CRON) { CronExpression cronExpression = new CronExpression(jobInfoDO.getTimeExpression()); Date nextValidTime = cronExpression.getNextValidTimeAfter(now); jobInfoDO.setNextTriggerTime(nextValidTime.getTime()); } // 重写最后修改时间 jobInfoDO.setGmtModified(now); } }
[ "tengjiqi@gmail.com" ]
tengjiqi@gmail.com
f61b3773ec95ec158e4899ac642e8acfb156869e
ad03831bf431ed73f01b35abd088f36d0dc821e5
/app/src/main/java/com/example/roomwordsamplejavaapi28/WordRepository.java
867c010630638495d55f6c27458ea3579ede686b
[]
no_license
qq343852323/RoomWordSampleJavaAPI28
36620546c582fca298a5ceb5140c262025b46b88
77179190136afcf9b31cf23cbf519930e503fdf6
refs/heads/master
2023-06-17T12:17:09.798190
2021-06-24T21:06:23
2021-06-24T21:06:23
380,050,286
0
0
null
null
null
null
UTF-8
Java
false
false
1,306
java
package com.example.roomwordsamplejavaapi28; import android.app.Application; import androidx.lifecycle.LiveData; import java.util.List; class WordRepository { private WordDao mWordDao; private LiveData<List<Word>> mAllWords; // Note that in order to unit test the WordRepository, you have to remove the Application // dependency. This adds complexity and much more code, and this sample is not about testing. // See the BasicSample in the android-architecture-components repository at // https://github.com/googlesamples WordRepository(Application application) { WordRoomDatabase db = WordRoomDatabase.getDatabase(application); mWordDao = db.wordDao(); mAllWords = mWordDao.getAlphabetizedWords(); } // Room executes all queries on a separate thread. // Observed LiveData will notify the observer when the data has changed. LiveData<List<Word>> getAllWords() { return mAllWords; } // You must call this on a non-UI thread or your app will throw an exception. Room ensures // that you're not doing any long running operations on the main thread, blocking the UI. void insert(Word word) { WordRoomDatabase.databaseWriteExecutor.execute(() -> { mWordDao.insert(word); }); } }
[ "-" ]
-
4a69bf087166ee45d4f7c95213b0aebf205c4bfe
3df715c046ce3d96680b3df88ca26a048fb3c71d
/src/문제집/backjoon/파일합치기BJ11066/Main.java
896ecbb0617ca29ad9f8a2bac60030bfe0617efd
[]
no_license
camel-man-ims/algorithm-collection
79163d0f0681b4e682ed14b3ac3cc499e832204d
225473c41f206337de9c97a33ea92414f2793c37
refs/heads/main
2022-12-27T04:52:59.505738
2022-11-16T15:23:14
2022-11-16T15:23:14
303,552,853
1
1
null
null
null
null
UTF-8
Java
false
false
2,338
java
package 문제집.backjoon.파일합치기BJ11066; import java.io.BufferedReader; import java.io.FileInputStream; import java.io.IOException; import java.io.InputStreamReader; import java.util.PriorityQueue; import java.util.StringTokenizer; /** * date: 22.07.25 * memo: 처음엔 greedy로 생각했으나, 역시 틀렸고 해답을 찾아봤다. 해답을 찾아봐도 한참 이해가 안됐었다. * * 주 참조 : https://cocoon1787.tistory.com/317 * 보조 참조 : https://data-make.tistory.com/402 * 자바 코드 참조 : https://guy-who-writes-sourcecode.tistory.com/43 */ public class Main { static int T; static int N; static int[] arr; static int[][] dp; static int[] prefixSum; public static void main(String[] args) throws IOException { System.setIn(new FileInputStream("./src/문제집/backjoon/파일합치기BJ11066/input.txt")); BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); T = Integer.parseInt(br.readLine()); for(int t=0;t<T;t++){ N = Integer.parseInt(br.readLine()); StringTokenizer st = new StringTokenizer(br.readLine()); arr = new int[N+1]; prefixSum = new int[N+1]; for(int i=1;i<=N;i++){ arr[i] = Integer.parseInt(st.nextToken()); } for(int i=1;i<=N;i++){ prefixSum[i] = prefixSum[i-1] + arr[i]; } dp = new int[N+1][N+1]; // 0부터 시작하면 안되는 이유는 0부터 시작하면 dp[1][1], dp[2][2] 와 같이 dp[j][j]가 다 INF로 채워지기 때문 for(int i=1;i<=N;i++){ printdp(); System.out.println("-------"); for(int j=1;j<=N-i;j++){ dp[j][j+i] = Integer.MAX_VALUE; for(int k=j;k<j+i;k++){ dp[j][j+i] = Math.min(dp[j][j+i], dp[j][k] + dp[k+1][j+i] + prefixSum[j+i] - prefixSum[j-1]); } } } System.out.println(dp[1][N]); } } private static void printdp() { for(int i=1;i<N+1;i++){ for(int j=1;j<N+1;j++){ System.out.print(dp[i][j] + " "); } System.out.println(); } } }
[ "gudwnsrh@gmail.com" ]
gudwnsrh@gmail.com
0d505fbde8133d2a599a062bd732161a0302ac0a
6a03c6bc154fcb73407faa6a9469b30acac76784
/src/main/java/com/tang/intellij/lua/stubs/impl/LuaGlobalFuncStubImpl.java
1209ed8217ec52714142eee30e2f19c0b8034a02
[ "Apache-2.0" ]
permissive
coderflyfish/IntelliJ-EmmyLua
7bca4e262d5c5f8589d68957ee44a583e57adb91
f3b6130c0499addf25678a1bae8339576ec0c2a5
refs/heads/master
2021-01-11T14:05:43.320328
2017-06-20T04:32:12
2017-06-20T04:33:01
94,959,215
1
0
null
2017-06-21T03:31:30
2017-06-21T03:31:30
null
UTF-8
Java
false
false
1,843
java
/* * Copyright (c) 2017. tangzx(love.tangzx@qq.com) * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.tang.intellij.lua.stubs.impl; import com.intellij.psi.stubs.IStubElementType; import com.intellij.psi.stubs.StubBase; import com.intellij.psi.stubs.StubElement; import com.tang.intellij.lua.lang.type.LuaTypeSet; import com.tang.intellij.lua.psi.LuaGlobalFuncDef; import com.tang.intellij.lua.psi.LuaParamInfo; import com.tang.intellij.lua.psi.LuaTypes; import com.tang.intellij.lua.stubs.LuaGlobalFuncStub; /** * * Created by tangzx on 2016/11/26. */ public class LuaGlobalFuncStubImpl extends StubBase<LuaGlobalFuncDef> implements LuaGlobalFuncStub { private String funcName; private LuaParamInfo[] params; private LuaTypeSet returnTypeSet; public LuaGlobalFuncStubImpl(String funcName, LuaParamInfo[] params, LuaTypeSet returnTypeSet, StubElement parent) { super(parent, (IStubElementType) LuaTypes.GLOBAL_FUNC_DEF); this.funcName = funcName; this.params = params; this.returnTypeSet = returnTypeSet; } @Override public String getName() { return funcName; } @Override public LuaTypeSet getReturnTypeSet() { return returnTypeSet; } @Override public LuaParamInfo[] getParams() { return params; } }
[ "272669294@qq.com" ]
272669294@qq.com
035893d26626d4a6fb267403d297d0e54a3cab9b
ce778e35ea72ad33d03129c43b3ddfafc3581076
/src/test/java/com/redhat/qe/test/rest/volume/RemoveBrickTest.java
d9c84fb9ca407a864259e37771f259bfd7ba96da
[]
no_license
rhscqe/rhsc-shell-rest-api-automation
011150559815afa155229422fa8cec1bb4c3c6d4
7d720a8a566fb7f7178a95d593b97e6f09ec3e91
refs/heads/master
2021-01-02T08:34:15.525146
2014-08-08T07:38:41
2014-08-08T07:38:41
null
0
0
null
null
null
null
UTF-8
Java
false
false
463
java
package com.redhat.qe.test.rest.volume; import java.util.ArrayList; import org.junit.Test; import com.redhat.qe.model.Brick; import com.redhat.qe.repository.rest.BrickRepository; public class RemoveBrickTest extends SingleVolumeTestBase{ @Test public void test(){ BrickRepository brickrepo = new BrickRepository(getSession(), getVolume().getCluster(), getVolume()); ArrayList<Brick> bricks = brickrepo.list(); brickrepo.delete(bricks.get(0)); } }
[ "dtsang@redhat.com" ]
dtsang@redhat.com
67c7294b9b924cfe42bfcd378436798c99db5a52
243eaf02e124f89a21c5d5afa707db40feda5144
/src/unk/com/tencent/mm/ui/chatting/fc.java
384386f32ba42ab7c265fb772e872b830e53785d
[]
no_license
laohanmsa/WeChatRE
e6671221ac6237c6565bd1aae02f847718e4ac9d
4b249bce4062e1f338f3e4bbee273b2a88814bf3
refs/heads/master
2020-05-03T08:43:38.647468
2013-05-18T14:04:23
2013-05-18T14:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
474
java
package unk.com.tencent.mm.ui.chatting; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; final class fc implements DialogInterface.OnClickListener { fc(ez paramez) { } public final void onClick(DialogInterface paramDialogInterface, int paramInt) { } } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.mm.ui.chatting.fc * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
5ce0e5607d28a3bf9b81c5988921b84b75949917
67a5646a59ed8dbbbaa7d43cc3707b726fc2ab7f
/game-space-invaders/src/main/java/com/vcs/fx/game/spaceship/EnemySpaceShip.java
8a520f96c92e7a9a74a32358c71fa47ae8fb8dd1
[]
no_license
paulius-zubavicius/VCS-examples
54421fdc92277c1eac7e60d0e3c595b612f13d22
ffdd104e66a212839634cbca9e24de058b0cbe2a
refs/heads/master
2022-07-03T05:52:08.205790
2019-10-24T12:15:47
2019-10-24T12:15:47
167,843,037
0
0
null
2022-05-20T20:54:28
2019-01-27T18:27:32
Java
UTF-8
Java
false
false
1,138
java
package com.vcs.fx.game.spaceship; import com.vcs.fx.game.model.Point; import com.vcs.fx.game.model.Ship; import com.vcs.fx.game.model.Team; import com.vcs.fx.game.model.Rectangle; import javafx.scene.image.Image; public class EnemySpaceShip extends SpaceShip { private static final int UPDATE = 10000000; private static final double SWAG_SPEED = 1000000000.0; private Ship shipType; private int moveMultiplier; private long was; private double originalX; public EnemySpaceShip(Point pos, Image img, Ship shipType, int moveMultiplier) { super(Team.ENEMY, img, pos.getX(), pos.getY()); this.shipType = shipType; this.moveMultiplier = moveMultiplier; originalX = pos.getX(); //was = Instant.now().toEpochMilli(); health = shipType.getHealth(); gun = shipType.getGun(); } @Override public void doPhisics(long now) { if (now - was > UPDATE) { pos.getPos1().setX(originalX + (moveMultiplier * Math.sin(now / SWAG_SPEED))); pos.getPos2().setX(pos.getPos1().getX() + pos.getWidth()); was = now; pos.increaseY(shipType.getSpeed()); } } public Ship getShipType() { return shipType; } }
[ "paulius@zubavicius.lt" ]
paulius@zubavicius.lt
4af60213ac81e2c455ae69d278cb8f2d1fa9ffec
e3712168b5154d456edf3512a1424b9aea290f24
/frontend/Tagline/sources/com/google/android/gms/common/internal/Objects.java
35e9a545c86cce486cb375467df4f770c6b2e140
[]
no_license
uandisson/Projeto-TagLine-HACK_GOV_PE
bf3c5c106191292b3692068d41bc5e6f38f07d52
5e130ff990faf5c8c5dab060398c34e53e0fd896
refs/heads/master
2023-03-12T17:36:36.792458
2021-02-11T18:17:51
2021-02-11T18:17:51
338,082,674
0
1
null
null
null
null
UTF-8
Java
false
false
2,615
java
package com.google.android.gms.common.internal; import android.support.annotation.Nullable; import com.google.android.gms.common.annotation.KeepForSdk; import java.util.ArrayList; import java.util.Arrays; import java.util.List; @KeepForSdk public final class Objects { @KeepForSdk public static boolean equal(@Nullable Object obj, @Nullable Object obj2) { Object obj3 = obj; Object obj4 = obj2; return obj3 == obj4 || (obj3 != null && obj3.equals(obj4)); } @KeepForSdk public static int hashCode(Object... objArr) { return Arrays.hashCode(objArr); } @KeepForSdk public static ToStringHelper toStringHelper(Object obj) { ToStringHelper toStringHelper; new ToStringHelper(obj, (zzq) null); return toStringHelper; } @KeepForSdk public static final class ToStringHelper { private final List<String> zzer; private final Object zzes; private ToStringHelper(Object obj) { List<String> list; this.zzes = Preconditions.checkNotNull(obj); new ArrayList(); this.zzer = list; } @KeepForSdk public final ToStringHelper add(String str, @Nullable Object obj) { StringBuilder sb; List<String> list = this.zzer; String str2 = (String) Preconditions.checkNotNull(str); String valueOf = String.valueOf(obj); new StringBuilder(1 + String.valueOf(str2).length() + String.valueOf(valueOf).length()); boolean add = list.add(sb.append(str2).append("=").append(valueOf).toString()); return this; } @KeepForSdk public final String toString() { StringBuilder sb; new StringBuilder(100); StringBuilder append = sb.append(this.zzes.getClass().getSimpleName()).append('{'); int size = this.zzer.size(); for (int i = 0; i < size; i++) { StringBuilder append2 = append.append(this.zzer.get(i)); if (i < size - 1) { StringBuilder append3 = append.append(", "); } } return append.append('}').toString(); } /* JADX INFO: this call moved to the top of the method (can break code semantics) */ /* synthetic */ ToStringHelper(Object obj, zzq zzq) { this(obj); zzq zzq2 = zzq; } } private Objects() { Throwable th; Throwable th2 = th; new AssertionError("Uninstantiable"); throw th2; } }
[ "uandisson@gmail.com" ]
uandisson@gmail.com
7ea1b57072012d17e71a5603dd53e97ceca6878f
11ed2e3e853eaea0b3dc4c95e7cd06c8787e3a48
/src/main/java/gov/step/app/domain/HrDepartmentSetup.java
7eac7d7b958e7cbf5d3f87bd39e47ac7b29e400c
[]
no_license
JCN-DEV/master
3337a51dac56c61b75e4a31fea440ef36f6698c1
f9c456fde8c1f682cff851b3bcd0c9051f53da0d
refs/heads/master
2021-01-11T15:35:51.197579
2017-02-11T06:53:19
2017-02-11T06:53:19
81,628,866
0
0
null
null
null
null
UTF-8
Java
false
false
4,667
java
package gov.step.app.domain; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; import org.springframework.data.elasticsearch.annotations.Document; import javax.persistence.*; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.time.LocalDate; import java.util.Objects; /** * A HrDepartmentSetup. */ @Entity @Table(name = "hr_department_setup") @Cache(usage = CacheConcurrencyStrategy.NONSTRICT_READ_WRITE) @Document(indexName = "hrdepartmentsetup") public class HrDepartmentSetup implements Serializable { @Id @GeneratedValue(strategy = GenerationType.AUTO) private Long id; @NotNull @Column(name = "active_status", nullable = false) private Boolean activeStatus; @Column(name = "create_date") private LocalDate createDate; @Column(name = "create_by") private Long createBy; @Column(name = "update_date") private LocalDate updateDate; @Column(name = "update_by") private Long updateBy; @Column(name = "organization_type") private String organizationType; @ManyToOne @JoinColumn(name = "org_category_id") private MiscTypeSetup organizationCategory; @ManyToOne @JoinColumn(name = "org_info_id") private HrEmpWorkAreaDtlInfo organizationInfo; @ManyToOne @JoinColumn(name = "inst_category_id") private InstCategory instCategory; @ManyToOne @JoinColumn(name = "institute_id") private Institute institute; @ManyToOne @JoinColumn(name = "department_info_id") private HrDepartmentHeadSetup departmentInfo; @ManyToOne @JoinColumn(name = "wing_info_id") private HrWingSetup wingInfo; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public Boolean getActiveStatus() { return activeStatus; } public void setActiveStatus(Boolean activeStatus) { this.activeStatus = activeStatus; } public LocalDate getCreateDate() { return createDate; } public void setCreateDate(LocalDate createDate) { this.createDate = createDate; } public Long getCreateBy() { return createBy; } public void setCreateBy(Long createBy) { this.createBy = createBy; } public LocalDate getUpdateDate() { return updateDate; } public void setUpdateDate(LocalDate updateDate) { this.updateDate = updateDate; } public Long getUpdateBy() { return updateBy; } public void setUpdateBy(Long updateBy) { this.updateBy = updateBy; } public MiscTypeSetup getOrganizationCategory() {return organizationCategory;} public void setOrganizationCategory(MiscTypeSetup organizationCategory) {this.organizationCategory = organizationCategory;} public HrEmpWorkAreaDtlInfo getOrganizationInfo() {return organizationInfo;} public void setOrganizationInfo(HrEmpWorkAreaDtlInfo organizationInfo) {this.organizationInfo = organizationInfo;} public HrDepartmentHeadSetup getDepartmentInfo() {return departmentInfo;} public void setDepartmentInfo(HrDepartmentHeadSetup departmentInfo) {this.departmentInfo = departmentInfo;} public String getOrganizationType() {return organizationType;} public void setOrganizationType(String organizationType) {this.organizationType = organizationType;} public InstCategory getInstCategory() {return instCategory;} public void setInstCategory(InstCategory instCategory) {this.instCategory = instCategory;} public Institute getInstitute() {return institute;} public void setInstitute(Institute institute) {this.institute = institute;} public HrWingSetup getWingInfo() {return wingInfo;} public void setWingInfo(HrWingSetup wingInfo) {this.wingInfo = wingInfo;} @Override public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } HrDepartmentSetup hrDepartmentSetup = (HrDepartmentSetup) o; return Objects.equals(id, hrDepartmentSetup.id); } @Override public int hashCode() { return Objects.hashCode(id); } @Override public String toString() { return "HrDepartmentSetup{" + "id=" + id + ", activeStatus='" + activeStatus + "'" + ", createDate='" + createDate + "'" + ", createBy='" + createBy + "'" + ", updateDate='" + updateDate + "'" + ", updateBy='" + updateBy + "'" + '}'; } }
[ "rana@devlead" ]
rana@devlead
5c59d532d5e50c6b3d3027bd3dadd39b77843a8e
8af1164bac943cef64e41bae312223c3c0e38114
/results-java/JetBrains--kotlin/593a634f848c612eee0498891039658fd323b03e/before/IntrinsicIncrementTranslator.java
4fc774153a69d52c747a848eb5e98146a2097d39
[]
no_license
fracz/refactor-extractor
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
dd5e82bfcc376e74a99e18c2bf54c95676914272
refs/heads/master
2021-01-19T06:50:08.211003
2018-11-30T13:00:57
2018-11-30T13:00:57
87,353,478
0
0
null
null
null
null
UTF-8
Java
false
false
2,737
java
package org.jetbrains.k2js.translate.operation; import com.google.dart.compiler.backend.js.ast.*; import org.jetbrains.annotations.NotNull; import org.jetbrains.jet.lang.psi.JetUnaryExpression; import org.jetbrains.jet.lexer.JetToken; import org.jetbrains.jet.lexer.JetTokens; import org.jetbrains.k2js.translate.context.TranslationContext; import org.jetbrains.k2js.translate.reference.ReferenceAccessTranslator; import static org.jetbrains.k2js.translate.utils.PsiUtils.getOperationToken; import static org.jetbrains.k2js.translate.utils.PsiUtils.isPrefix; /** * @author Pavel Talanov */ public final class IntrinsicIncrementTranslator extends IncrementTranslator { @NotNull public static JsExpression translate(@NotNull JetUnaryExpression expression, @NotNull TranslationContext context) { return (new IntrinsicIncrementTranslator(expression, context)) .translate(); } protected IntrinsicIncrementTranslator(@NotNull JetUnaryExpression expression, @NotNull TranslationContext context) { super(expression, context); } @Override @NotNull protected JsExpression translate() { if (isPrimitiveExpressionIncrement()) { return jsUnaryExpression(); } return translateAsMethodCall(); } private boolean isPrimitiveExpressionIncrement() { return accessTranslator instanceof ReferenceAccessTranslator; } @NotNull private JsExpression jsUnaryExpression() { JsUnaryOperator operator = OperatorTable.getUnaryOperator(getOperationToken(expression)); JsExpression getExpression = accessTranslator.translateAsGet(); if (isPrefix(expression)) { return new JsPrefixOperation(operator, getExpression); } else { return new JsPostfixOperation(operator, getExpression); } } @Override @NotNull protected JsExpression operationExpression(@NotNull JsExpression receiver) { return unaryAsBinary(receiver); } public JsBinaryOperation unaryAsBinary(@NotNull JsExpression leftExpression) { JsNumberLiteral oneLiteral = context().program().getNumberLiteral(1); JetToken token = getOperationToken(expression); if (token.equals(JetTokens.PLUSPLUS)) { return new JsBinaryOperation(JsBinaryOperator.ADD, leftExpression, oneLiteral); } if (token.equals(JetTokens.MINUSMINUS)) { return new JsBinaryOperation(JsBinaryOperator.SUB, leftExpression, oneLiteral); } throw new AssertionError("This method should be called only for increment and decrement operators"); } }
[ "fraczwojciech@gmail.com" ]
fraczwojciech@gmail.com
306e21021f9d1dcc95373cfb77e3b0e9d65a9d64
68920f4fdb442244cc471d96e2139bb2124931fd
/android_studio_study/Recyclerview3/app/src/main/java/org/techtown/recyclerview3/MainActivity.java
b2f2adb7335129cef923d17bf8c91bde992fd383
[]
no_license
alsrb2026/study
5fc96d83c2011d0725d9e28280a9877deda3f492
9dad94fabbbbfa284e68573244f952b28ddb96c7
refs/heads/master
2021-07-14T15:25:16.744835
2020-11-12T13:43:06
2020-11-12T13:43:06
222,710,296
0
0
null
null
null
null
UTF-8
Java
false
false
2,470
java
package org.techtown.recyclerview3; import android.os.Bundle; import android.view.View; import android.widget.Toast; import androidx.appcompat.app.AppCompatActivity; import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.LinearLayoutManager; import androidx.recyclerview.widget.RecyclerView; public class MainActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); RecyclerView recyclerView = findViewById(R.id.recyclerView); GridLayoutManager layoutManager = new GridLayoutManager(this, 2); recyclerView.setLayoutManager(layoutManager); final PersonAdapter adapter = new PersonAdapter(); adapter.addItem(new Person("김민수", "010-1000-1000")); adapter.addItem(new Person("김하늘", "010-2000-2000")); adapter.addItem(new Person("홍길동", "010-3000-3000")); adapter.addItem(new Person("김민수", "010-1000-1000")); adapter.addItem(new Person("김하늘", "010-2000-2000")); adapter.addItem(new Person("홍길동", "010-3000-3000")); adapter.addItem(new Person("김민수", "010-1000-1000")); adapter.addItem(new Person("김하늘", "010-2000-2000")); adapter.addItem(new Person("홍길동", "010-3000-3000")); adapter.addItem(new Person("김민수", "010-1000-1000")); adapter.addItem(new Person("김하늘", "010-2000-2000")); adapter.addItem(new Person("홍길동", "010-3000-3000")); adapter.addItem(new Person("김민수", "010-1000-1000")); adapter.addItem(new Person("김하늘", "010-2000-2000")); adapter.addItem(new Person("홍길동", "010-3000-3000")); adapter.addItem(new Person("김민수", "010-1000-1000")); adapter.addItem(new Person("김하늘", "010-2000-2000")); adapter.addItem(new Person("홍길동", "010-3000-3000")); recyclerView.setAdapter(adapter); adapter.setOnItemClickListener(new OnPersonItemClickListener() { @Override public void onItemClick(PersonAdapter.ViewHolder holder, View view, int position) { Person item = adapter.getItem(position); Toast.makeText(getApplicationContext(), "아이템 선택됨 : " + item.getName(), Toast.LENGTH_LONG).show(); } }); } }
[ "qkralsrb2026@naver.com" ]
qkralsrb2026@naver.com
21bfceb4adf9d4213596237e5ccf4d8d466f42f2
0be6826ea59357f42ffe0aa07628abc2c9c556c2
/hiz/JavaSource/co/com/tactusoft/crm/view/beans/AppointmentMedicationBean.java
ed314a0bbbd39d66f37cb30bf18c982aee1fd2f5
[]
no_license
tactusoft/anexa
900fdf1072ac4ff624877680dc4981ac3d5d380b
8db0e544c18f958d8acd020dc70355e8a5fa76e9
refs/heads/master
2021-01-12T03:29:27.472185
2017-06-22T03:45:44
2017-06-22T03:45:44
78,216,940
0
0
null
null
null
null
UTF-8
Java
false
false
1,452
java
package co.com.tactusoft.crm.view.beans; import java.io.Serializable; import java.math.BigDecimal; import java.util.List; import co.com.tactusoft.crm.model.entities.VwMedicationSold; public class AppointmentMedicationBean implements Serializable { private static final long serialVersionUID = 1L; private BigDecimal idAppointment; private String appointmentDesc; private List<VwMedicationSold> listMedication; private List<VwMedicationSold> listTherapy; private List<VwMedicationSold> listLabExam; public AppointmentMedicationBean() { } public BigDecimal getIdAppointment() { return idAppointment; } public void setIdAppointment(BigDecimal idAppointment) { this.idAppointment = idAppointment; } public String getAppointmentDesc() { return appointmentDesc; } public void setAppointmentDesc(String appointmentDesc) { this.appointmentDesc = appointmentDesc; } public List<VwMedicationSold> getListMedication() { return listMedication; } public void setListMedication(List<VwMedicationSold> listMedication) { this.listMedication = listMedication; } public List<VwMedicationSold> getListTherapy() { return listTherapy; } public void setListTherapy(List<VwMedicationSold> listTherapy) { this.listTherapy = listTherapy; } public List<VwMedicationSold> getListLabExam() { return listLabExam; } public void setListLabExam(List<VwMedicationSold> listLabExam) { this.listLabExam = listLabExam; } }
[ "carlossarmientor@gmail.com" ]
carlossarmientor@gmail.com
cf7390ce30a8d2ab0efb3f1595342a6cf65c0c2e
46167791cbfeebc8d3ddc97112764d7947fffa22
/spring-boot/src/main/java/com/justexample/entity/Entity0046.java
78a58039d59651fedf220d5a0a9d406512453af9
[]
no_license
kahlai/unrealistictest
4f668b4822a25b4c1f06c6b543a26506bb1f8870
fe30034b05f5aacd0ef69523479ae721e234995c
refs/heads/master
2023-08-25T09:32:16.059555
2021-11-09T08:17:22
2021-11-09T08:17:22
425,726,016
0
0
null
null
null
null
UTF-8
Java
false
false
1,134
java
package com.justexample.entity; import java.sql.Timestamp; import javax.persistence.Entity; import javax.persistence.Id; @Entity public class Entity0046 { @Id private Long id; private String code; private String name; private String status; private int seq; private Timestamp createdDate; public Long getId() { return id; } public void setId(Long id) { this.id = id; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public int getSeq() { return seq; } public void setSeq(int seq) { this.seq = seq; } public Timestamp getCreatedDate() { return createdDate; } public void setCreatedDate(Timestamp createdDate) { this.createdDate = createdDate; } }
[ "laikahhoe@gmail.com" ]
laikahhoe@gmail.com
54811bfe1f10851b2101df1960061b2b999c222d
c4def2817a43af0177bf3f4e57ce5864cd81978d
/gizwits-lease-master/gizwits-lease-model/src/main/java/com/gizwits/lease/device/vo/DeviceMapDto.java
6654e39fdb677b7e74b1e870a76b40ded8a95a5c
[]
no_license
chengjingming060241/bllc
6b43b46da97da6200a81c249e27c805dacd97b34
4b29e67f6066aa5b2519d08bdb66c09cc929d99f
refs/heads/master
2022-07-14T16:17:38.966611
2019-12-24T09:53:17
2019-12-24T09:53:17
225,526,000
0
2
null
2022-06-29T17:49:13
2019-12-03T03:51:26
Java
UTF-8
Java
false
false
1,353
java
package com.gizwits.lease.device.vo; import com.gizwits.lease.device.entity.DeviceLaunchArea; import org.springframework.beans.BeanUtils; /** * @author lilh * @date 2017/7/27 15:44 */ public class DeviceMapDto { /** 投放点id */ private Integer id; /** 投放点名称 */ private String name; /** 投放点经度 */ private String longitude; /** 投放点纬度 */ private String latitude; /** 设备数量 */ private Long deviceCount = 0L; public DeviceMapDto(DeviceLaunchArea deviceLaunchArea) { BeanUtils.copyProperties(deviceLaunchArea, this); } public Integer getId() { return id; } public void setId(Integer id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getLongitude() { return longitude; } public void setLongitude(String longitude) { this.longitude = longitude; } public String getLatitude() { return latitude; } public void setLatitude(String latitude) { this.latitude = latitude; } public Long getDeviceCount() { return deviceCount; } public void setDeviceCount(Long deviceCount) { this.deviceCount = deviceCount; } }
[ "cjm060241" ]
cjm060241
095c274b8aec5bc390dbdcc69477d39da87b5af7
f260d797952405cdc09258e5910460a937aa3554
/Java Fundamentals - Problems/Arrays/src/TopIntegers.java
ba375880945fb667ad9775c159c4cc5957463092
[]
no_license
SimeonKazandzhiev/Software-University
aaf583d81697fb69ee806a71a1cd05f0a3578f6c
021c47cccc0028d5b872d791e060d220dd5ec76a
refs/heads/main
2023-03-31T21:59:39.678586
2021-04-10T12:10:03
2021-04-10T12:10:03
344,113,115
0
0
null
null
null
null
UTF-8
Java
false
false
886
java
import java.util.Scanner; public class TopIntegers { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String[] input = scanner.nextLine().split(" "); int [] numbers = new int[input.length]; for (int i = 0; i <input.length ; i++) { numbers[i] = Integer.parseInt(input[i]); } for (int i = 0; i < numbers.length - 1; i++) { boolean isBigger = true; int currentNumber = numbers[i]; for (int j = i+ 1; j < numbers.length; j++) { int number = numbers[j]; if(currentNumber<=number){ isBigger = false; } } if(isBigger){ System.out.print(currentNumber + " "); } } System.out.println(numbers[numbers.length - 1]); } }
[ "simeon.tu@gmail.com" ]
simeon.tu@gmail.com
2f0873ef2cf7e0a59e9f937bc8f631053f3e1b8e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/18/18_7649a539e7cef77a580c70e2d03c5a92b371c942/User/18_7649a539e7cef77a580c70e2d03c5a92b371c942_User_t.java
2c0ab9fb373baf09aa35db4afc1810e0bee652eb
[]
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
4,630
java
/** * Phresco Commons * * Copyright (C) 1999-2013 Photon Infotech Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.photon.phresco.commons.model; import java.util.List; import javax.xml.bind.annotation.XmlRootElement; import org.apache.commons.lang.builder.ToStringBuilder; import org.apache.commons.lang.builder.ToStringStyle; import org.codehaus.jackson.annotate.JsonIgnoreProperties; @XmlRootElement @JsonIgnoreProperties(ignoreUnknown = true) public class User extends Element { private static final long serialVersionUID = 1L; public enum AuthType { LOCAL, AUTHSERVICE, OAUTH } private String loginId; private String email; private String firstName; private String lastName; private List<String> roleIds; private boolean phrescoEnabled; private List<Customer> customers; private String token; private boolean validLogin; private AuthType authType; private String password; public User() { super(); } public User(String id) { super(id); } /** * @param id * @param name * @param description */ public User(String id, String name, String description) { super(id); } /** * @return */ public String getLoginId() { return loginId; } /** * @param loginId */ public void setLoginId(String loginId) { this.loginId = loginId; } /** * @return */ public String getEmail() { return email; } /** * @param mailId */ public void setEmail(String mailId) { this.email = mailId; } /** * @return */ public String getFirstName() { return firstName; } /** * @param firstName */ public void setFirstName(String firstName) { this.firstName = firstName; } /** * @return */ public String getLastName() { return lastName; } /** * @param lastName */ public void setLastName(String lastName) { this.lastName = lastName; } /** * @return */ public List<String> getRoleIds() { return roleIds; } /** * @param roles */ public void setRoleIds(List<String> roleIds) { this.roleIds = roleIds; } /** * @return */ public boolean isPhrescoEnabled() { return phrescoEnabled; } /** * @param phrescoEnabled */ public void setPhrescoEnabled(boolean phrescoEnabled) { this.phrescoEnabled = phrescoEnabled; } /** * @return */ public String getToken() { return token; } /** * @param token */ public void setToken(String token) { this.token = token; } public boolean isValidLogin() { return validLogin; } public void setValidLogin(boolean validLogin) { this.validLogin = validLogin; } public AuthType getAuthType() { return authType; } public void setAuthType(AuthType authType) { this.authType = authType; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public List<Customer> getCustomers() { return customers; } public void setCustomers(List<Customer> customers) { this.customers = customers; } public String toString() { return new ToStringBuilder(this, ToStringStyle.DEFAULT_STYLE) .append(super.toString()) .append("loginId", loginId) .append("email", email) .append("firstName", firstName) .append("lastName", lastName) .append("roleIds", roleIds) .append("phrescoEnabled", phrescoEnabled) .append("customers", customers) .append("token", token) .append("authType", authType) .append("password", password) .toString(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
7f55133d74c89bc3f910f3546803d2109725a980
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-new-fitness/results/LANG-9b-7-7-Single_Objective_GGA-IntegrationSingleObjective-BasicBlockCoverage-opt/org/apache/commons/lang3/time/FastDateFormat$1_ESTest_scaffolding.java
7b332a73d36d6aa1d933e4ac0361379ec9cf1860
[ "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
450
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Thu Oct 28 09:31:15 UTC 2021 */ package org.apache.commons.lang3.time; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class FastDateFormat$1_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@serg2.ewi.tudelft.nl" ]
pderakhshanfar@serg2.ewi.tudelft.nl
1358b7263903362cdc635467c92882305fdf6cb3
ed5159d056e98d6715357d0d14a9b3f20b764f89
/src/irvine/oeis/a025/A025128.java
0ed0f17514a80fb24e738288cbe00fa3f6f60d69
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
420
java
package irvine.oeis.a025; import irvine.oeis.HalfConvolutionSequence; import irvine.oeis.a014.A014306; /** * A025128 <code>a(n) = s(1)s(n) + s(2)s(n-1) + ... + s(k)s(n-k+1)</code>, where k <code>= [ n/2 ], s = A014306</code>. * @author Sean A. Irvine */ public class A025128 extends HalfConvolutionSequence { /** Construct the sequence. */ public A025128() { super(new A014306(), false); next(); } }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
b7f68f76e291fb6837cab98baf558ba40146b344
11c82833b1066d5e48c06ff11de766298f127674
/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/AssetLicense.java
75c4ac2ebe6a5b6c7731bb9aaf4c7aad1729b3bf
[ "CC-BY-4.0", "Apache-2.0" ]
permissive
PieterJanVanAeken/egeria
37ac28ee35ac8b395cbe7fb5849741a3d1ffb9ae
8c71faed767297464ba2bd8396b7b7aa3f1277c5
refs/heads/master
2020-03-30T16:09:04.913927
2019-03-05T11:35:44
2019-03-05T11:35:44
148,496,778
0
0
Apache-2.0
2018-09-12T14:52:25
2018-09-12T14:52:24
null
UTF-8
Java
false
false
6,022
java
/* SPDX-License-Identifier: Apache-2.0 */ /* Copyright Contributors to the ODPi Egeria project. */ package org.odpi.openmetadata.frameworks.connectors.properties; import org.odpi.openmetadata.frameworks.connectors.properties.beans.ExternalReference; import org.odpi.openmetadata.frameworks.connectors.properties.beans.License; import java.util.Date; import java.util.Objects; /** * <p> * The data economy brings licensing to data and metadata. Even open data typically has a license. * License stores the license permission associated with the asset. * </p> * <p> * The license will define the permitted uses and other requirements for using the asset. * </p> * */ public class AssetLicense extends AssetReferenceable { protected License licenseBean; /** * Bean constructor * * @param licenseBean bean with all of the properties in it */ public AssetLicense(License licenseBean) { super(licenseBean); if (licenseBean == null) { this.licenseBean = new License(); } else { this.licenseBean = licenseBean; } } /** * Bean constructor with parent asset * * @param parentAsset descriptor for parent asset * @param licenseBean bean with all of the properties in it */ public AssetLicense(AssetDescriptor parentAsset, License licenseBean) { super(parentAsset, licenseBean); if (licenseBean == null) { this.licenseBean = new License(); } else { this.licenseBean = licenseBean; } } /** * Copy/clone constructor. * * @param parentAsset descriptor for parent asset * @param templateLicense element to copy */ public AssetLicense(AssetDescriptor parentAsset, AssetLicense templateLicense) { super(parentAsset, templateLicense); if (templateLicense == null) { this.licenseBean = new License(); } else { this.licenseBean = templateLicense.getLicenseBean(); } } /** * Return the bean with all of the properties. * * @return license bean */ protected License getLicenseBean() { return licenseBean; } /** * Return the unique id for the type of license. * * @return String license type GUID */ public String getLicenseTypeGUID() { return licenseBean.getLicenseTypeGUID(); } /** * Return the type of the license. * * @return String license type */ public String getLicenseTypeName() { return licenseBean.getLicenseTypeName(); } /** * Get the name of the organization or person that issued the license. * * @return String name */ public String getLicensee() { return licenseBean.getLicensee(); } /** * Return a brief summary of the license. * * @return String summary */ public String getSummary() { return licenseBean.getSummary(); } /** * Return the link to the full text of the license. * * @return ExternalReference for full text */ public AssetExternalReference getLink() { ExternalReference link = licenseBean.getLink(); if (link == null) { return null; } else { return new AssetExternalReference(super.getParentAsset(), link); } } /** * Return the start date for the license. * * @return Date */ public Date getStartDate() { Date startDate = licenseBean.getStartDate(); if (startDate == null) { return null; } else { return new Date(startDate.getTime()); } } /** * Return the end date for the license. * * @return Date */ public Date getEndDate() { Date endDate = licenseBean.getEndDate(); if (endDate == null) { return null; } else { return new Date(endDate.getTime()); } } /** * Return any special conditions that apply to the license - such as endorsements. * * @return String license conditions */ public String getLicenseConditions() { return licenseBean.getLicenseConditions(); } /** * Return the name of the person or organization that set up the license agreement for this asset. * * @return String name */ public String getCreatedBy() { return licenseBean.getCreatedBy(); } /** * Return the name of the person or organization that is responsible for the correct management of the asset * according to the license. * * @return String name */ public String getCustodian() { return licenseBean.getCustodian(); } /** * Return the notes for the custodian. * * @return String notes */ public String getNotes() { return licenseBean.getNotes(); } /** * Standard toString method. * * @return print out of variables in a JSON-style */ @Override public String toString() { return licenseBean.toString(); } /** * Compare the values of the supplied object with those stored in the current object. * * @param objectToCompare supplied object * @return boolean result of comparison */ @Override public boolean equals(Object objectToCompare) { if (this == objectToCompare) { return true; } if (!(objectToCompare instanceof AssetLicense)) { return false; } if (!super.equals(objectToCompare)) { return false; } AssetLicense that = (AssetLicense) objectToCompare; return Objects.equals(getLicenseBean(), that.getLicenseBean()); } }
[ "mandy_chessell@uk.ibm.com" ]
mandy_chessell@uk.ibm.com
1f82de57dec658cc9db718824caf87fb088e9a86
ded66847c447fe9b10e5e86ff11babf60ddddc14
/LSocket/src/main/java/com/lsocket/core/ClientServer.java
31f3f2da78c4ba4e2069c9fa8e8cade995b7c7a9
[]
no_license
leroyBoys/LCommPack
a33d2ae7724667c5eaf4643401583ea9e17d5280
22a8566820576f7bb58483ff019dc57d8b373ad4
refs/heads/master
2022-10-21T20:40:20.505598
2020-01-06T03:49:55
2020-01-06T03:49:55
85,775,682
0
0
null
null
null
null
UTF-8
Java
false
false
2,659
java
package com.lsocket.core; import com.lsocket.codec.RequestDecoderClient; import com.lsocket.codec.ResponseEncoderClient; import com.lsocket.listen.HandlerListen; import com.lsocket.handler.ClientHandler; import com.lsocket.module.CommonCodecFactory; import org.apache.mina.core.future.ConnectFuture; import org.apache.mina.core.session.IoSession; import org.apache.mina.filter.codec.ProtocolCodecFilter; import org.apache.mina.filter.codec.ProtocolDecoder; import org.apache.mina.filter.codec.ProtocolEncoder; import org.apache.mina.filter.executor.ExecutorFilter; import org.apache.mina.filter.logging.LoggingFilter; import org.apache.mina.transport.socket.SocketConnector; import org.apache.mina.transport.socket.nio.NioSocketConnector; import java.net.InetSocketAddress; import java.util.concurrent.Executors; /** * Created by leroy:656515489@qq.com * 2017/4/6. */ public class ClientServer { private int port; private String host; public final String key; private SocketConnector connector; private IoSession session; private long CONNECT_TIMEOUT = 30 * 1000L; public ClientServer(String host, int port, long timeout , String key, ResponseEncoderClient encoder, RequestDecoderClient decoder, HandlerListen handlerListen) { this.host = host; this.port = port; this.key = key; this.CONNECT_TIMEOUT = timeout; connector = new NioSocketConnector(); connector.setConnectTimeoutMillis(CONNECT_TIMEOUT); connector.getFilterChain().addLast("logger", new LoggingFilter()); connector.getSessionConfig().setReadBufferSize(20480); connector.getSessionConfig().setSendBufferSize(20480); encoder.setClientServer(this); decoder.setClientServer(this); connector.getFilterChain().addLast("codec", new ProtocolCodecFilter(new CommonCodecFactory(encoder, decoder))); connector.getFilterChain().addLast("threadPool", new ExecutorFilter(Executors.newCachedThreadPool())); connector.setHandler(new ClientHandler(handlerListen)); connector.setDefaultRemoteAddress(new InetSocketAddress(host, port)); } public String getKey() { return key; } public IoSession getSession() { return session; } public void start() { ConnectFuture connectFuture = connector.connect(); connectFuture.awaitUninterruptibly(CONNECT_TIMEOUT); try { session = connectFuture.getSession(); } catch (Exception e) { // e.printStackTrace(); System.err.println("connect fail:"+e.getMessage()); } } }
[ "wlvxiaohui@163.com" ]
wlvxiaohui@163.com
3839486cffd2c8898814551379d39eae266f45fe
4a5b8d37d70aff90d9c3e4d6d53239c12726f88e
/lib-rxjava/src/main/java/cn/ollyice/library/rxjava/internal/observers/BasicQueueDisposable.java
fc96927791ed96b95ff17e3301c2448e661b5f00
[]
no_license
paqxyz/AndGameDemo
29dfad61e371cf6db833107d903acffb8502e647
53271818ffff94564ec4e3337ebf4af13956d5de
refs/heads/master
2020-03-21T04:29:11.037764
2018-06-20T06:06:50
2018-06-20T06:06:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,258
java
/** * Copyright (c) 2016-present, RxJava Contributors. * * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software distributed under the License is * distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See * the License for the specific language governing permissions and limitations under the License. */ package cn.ollyice.library.rxjava.internal.observers; import cn.ollyice.library.rxjava.internal.fuseable.QueueDisposable; /** * An abstract QueueDisposable implementation that defaults all * unnecessary Queue methods to throw UnsupportedOperationException. * @param <T> the output value type */ public abstract class BasicQueueDisposable<T> implements QueueDisposable<T> { @Override public final boolean offer(T e) { throw new UnsupportedOperationException("Should not be called"); } @Override public final boolean offer(T v1, T v2) { throw new UnsupportedOperationException("Should not be called"); } }
[ "289776839@qq.com" ]
289776839@qq.com
b17648aad0629d13c3db9c8a3616ced3b2ddabba
89e623815feb73650630b4b252f50a6b24d187f4
/src/main/java/com/yundao/tenant/model/base/BaseShareInfo.java
bfb110b4c92f230aaa4990881c31bd711e55d9b1
[]
no_license
wucaiqiang/yundao-tenant
19b673eabdd79df9680bd6738eea283b9d696c31
660eea5ce4e324d3b4db538ee26ecbf83241043a
refs/heads/master
2021-08-30T20:53:00.708567
2017-12-19T11:35:36
2017-12-19T11:35:36
114,628,331
1
0
null
null
null
null
UTF-8
Java
false
false
1,280
java
package com.yundao.tenant.model.base; import com.yundao.core.base.model.BaseModel; import java.io.Serializable; public class BaseShareInfo extends BaseModel implements Serializable { /** * 类型:product:产品 product_notice:产品公告 product_attach:产品附件 */ private String type; /** * 对象ID */ private Long objectId; /** * 描述 */ private String desc; /** * 用户id */ private Long userId; /** * 分享地址 */ private String shareUrl; private static final long serialVersionUID = 1L; public String getType() { return type; } public void setType(String type) { this.type = type; } public Long getObjectId() { return objectId; } public void setObjectId(Long objectId) { this.objectId = objectId; } public String getDesc() { return desc; } public void setDesc(String desc) { this.desc = desc; } public Long getUserId() { return userId; } public void setUserId(Long userId) { this.userId = userId; } public String getShareUrl() { return shareUrl; } public void setShareUrl(String shareUrl) { this.shareUrl = shareUrl; } }
[ "wucaiqiang@zcmall.com" ]
wucaiqiang@zcmall.com
2abb2e491439935d5e5be2fb96731343f41252db
df6b4d2a5dac69c2a164e66fc9e9f357bcab2a1d
/app/src/main/java/com/haotang/pet/adapter/SelectCardAdapter.java
86728f803c538c4d4ed36b068f54d98ad2563aff
[]
no_license
freetest/pet_android_new
ef075627aa53e5456ccd3c77fe28254a3fe8c2c2
6d07ee31436bd519f6369c5783fd7198c86dbd2b
refs/heads/master
2023-03-16T04:26:02.457589
2020-06-04T10:43:17
2020-06-04T10:43:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,197
java
package com.haotang.pet.adapter; import android.text.SpannableString; import android.text.Spanned; import android.text.style.StyleSpan; import android.text.style.TextAppearanceSpan; import android.view.View; import android.widget.ImageView; import android.widget.TextView; import com.chad.library.adapter.base.BaseQuickAdapter; import com.chad.library.adapter.base.BaseViewHolder; import com.haotang.pet.R; import com.haotang.pet.entity.MyCard; import com.haotang.pet.util.GlideUtil; import com.haotang.pet.util.Utils; import java.util.List; /** * <p>Title:${type_name}</p> * <p>Description:</p> * <p>Company:北京昊唐科技有限公司</p> * * @author 徐俊 * @date zhoujunxia on 2019/3/23 11:47 */ public class SelectCardAdapter extends BaseQuickAdapter<MyCard, BaseViewHolder> { public SelectCardAdapter(int layoutResId, List<MyCard> data) { super(layoutResId, data); } @Override protected void convert(final BaseViewHolder helper, MyCard item) { ImageView iv_item_selectcard_select = helper.getView(R.id.iv_item_selectcard_select); ImageView iv_item_selectcard_cardimg = helper.getView(R.id.iv_item_selectcard_cardimg); TextView tv_item_selectcard_cardname = helper.getView(R.id.tv_item_selectcard_cardname); TextView tv_item_selectcard_amount = helper.getView(R.id.tv_item_selectcard_amount); TextView tv_item_selectcard_zk = helper.getView(R.id.tv_item_selectcard_zk); if (item != null) { if (item.isSelect()) { iv_item_selectcard_select.setImageResource(R.drawable.icon_petadd_select); } else { iv_item_selectcard_select.setImageResource(R.drawable.icon_petadd_unselect); } GlideUtil.loadImg(mContext, item.getSmallPic(), iv_item_selectcard_cardimg, R.drawable.icon_production_default); Utils.setText(tv_item_selectcard_cardname, item.getCardTypeName(), "", View.VISIBLE, View.VISIBLE); Utils.setText(tv_item_selectcard_amount, "余额 ¥ " + item.getAmount(), "", View.VISIBLE, View.VISIBLE); if (Utils.isStrNull(item.getDiscountText())) { if (item.getDiscountText().contains("@@")) { String[] split = item.getDiscountText().split("@@"); if (split != null && split.length > 0 && split.length % 2 != 0) { SpannableString ss = new SpannableString(item.getDiscountText().replace("@@", "")); if (split.length == 3) { int startIndex = split[0].length(); int endIndex = split[0].length() + split[1].length(); ss.setSpan(new TextAppearanceSpan(mContext, R.style.style4), startIndex, endIndex, Spanned.SPAN_INCLUSIVE_INCLUSIVE); ss.setSpan(new StyleSpan(android.graphics.Typeface.BOLD), startIndex, endIndex, Spanned.SPAN_INCLUSIVE_INCLUSIVE); tv_item_selectcard_zk.setText(ss); } } } } } } }
[ "xvjun@haotang365.com.cn" ]
xvjun@haotang365.com.cn
44c2218e2aee4352421df9e493f16ee14f0c6649
5ec2884d933d9a4cb10b7406627c3f56cdbb7eeb
/BinhDuong/YTDTApp_O/src/java/com/iesvn/yte/session/DmLoaiBenhTruyenNhiemFacade.java
40e30f0af59f046be2fd112fb041afbf54e5997b
[]
no_license
i-boy/YTDT_BD
5ab75a296a677eb30c565ec9d5a59be986dc180d
9e64400d31d00249691fed5e0f6804c79ccbd3d7
refs/heads/master
2021-01-11T05:17:22.803007
2016-09-21T16:04:09
2016-09-21T16:04:09
68,835,164
0
0
null
null
null
null
UTF-8
Java
false
false
1,199
java
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package com.iesvn.yte.session; import com.iesvn.yte.entity.DmLoaiBenhTruyenNhiem; import java.util.List; import javax.ejb.Stateless; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import javax.persistence.Query; /** * * @author root */ @Stateless public class DmLoaiBenhTruyenNhiemFacade implements DmLoaiBenhTruyenNhiemFacadeLocal { @PersistenceContext private EntityManager em; public void create(DmLoaiBenhTruyenNhiem dmLoaiBenhTruyenNhiem) { em.persist(dmLoaiBenhTruyenNhiem); } public void edit(DmLoaiBenhTruyenNhiem dmLoaiBenhTruyenNhiem) { em.merge(dmLoaiBenhTruyenNhiem); } public void remove(DmLoaiBenhTruyenNhiem dmLoaiBenhTruyenNhiem) { em.remove(em.merge(dmLoaiBenhTruyenNhiem)); } public DmLoaiBenhTruyenNhiem find(Object id) { return em.find(com.iesvn.yte.entity.DmLoaiBenhTruyenNhiem.class, id); } public List<DmLoaiBenhTruyenNhiem> findAll() { return em.createQuery("select object(o) from DmLoaiBenhTruyenNhiem as o").getResultList(); } }
[ "iboy.vn@gmail.com" ]
iboy.vn@gmail.com
9d7365cfc93d4c0348c1757922314d572dffafab
3311684625fab424f66c7616fde02e907937fc61
/src/main/java/com/cooperate/wxh5/wx/entity/user/WeiXinUserList.java
c7d6fe2bff9691e269561bdcbfe7c9168a16201c
[]
no_license
FadeHub/weixin-mp
0bd036360527fe912f06b59ed76df31b00078f00
90ae6409bd02dfe6eb0267d73a6f3add74d95389
refs/heads/master
2020-12-14T08:52:27.560991
2017-06-30T09:21:46
2017-06-30T09:21:46
95,514,347
0
0
null
null
null
null
UTF-8
Java
false
false
411
java
package com.cooperate.wxh5.wx.entity.user; /** * * @ClassName: WeiXinUserList * @Description: TODO * @author zhrt * @date 2017年6月27日 上午9:52:45 * @Version 1.0 */ public class WeiXinUserList { private String next_openid; public String getNext_openid() { return next_openid; } public void setNext_openid(String next_openid) { this.next_openid = next_openid; } }
[ "809894780@qq.com" ]
809894780@qq.com
b510e7a77e70538ebbc11bc788ecbd30418fa3ee
d3edc0eabe676683b7d795a5c8aec638d6ff6245
/branches/Strategy 2/anacom/src/main/java/pt/ist/anacom/applicationserver/handlers/ServerHandler.java
dadd03adca013a6e54f4c5040bccbf28e3866312
[]
no_license
jfloff/ANA.COM
4cef8e3b2871e90aa8c89bf44cec5ecfa34d11fb
30506dcafa92bcd0189281fefb0bf4d7427d27d4
refs/heads/master
2021-01-22T03:14:10.824984
2013-03-28T12:44:09
2013-03-28T12:44:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,561
java
package pt.ist.anacom.applicationserver.handlers; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.security.InvalidKeyException; import java.security.NoSuchAlgorithmException; import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.util.Iterator; import java.util.Properties; import java.util.Set; import javax.crypto.BadPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.NoSuchPaddingException; import javax.xml.soap.Name; import javax.xml.soap.SOAPBody; import javax.xml.soap.SOAPElement; import javax.xml.soap.SOAPEnvelope; import javax.xml.soap.SOAPException; import javax.xml.soap.SOAPHeader; import javax.xml.soap.SOAPMessage; import javax.xml.soap.SOAPPart; import javax.xml.ws.handler.MessageContext; import javax.xml.ws.handler.soap.SOAPHandler; import javax.xml.ws.handler.soap.SOAPMessageContext; import pt.ist.anacom.applicationserver.ApplicationServerWebService; import pt.ist.anacom.shared.data.Data; public class ServerHandler implements SOAPHandler<SOAPMessageContext> { @Override public void close(MessageContext messageContext) { return; } @Override public Set getHeaders() { return null; } @Override public boolean handleMessage(SOAPMessageContext context) { Boolean outboundProperty = (Boolean) context.get(MessageContext.MESSAGE_OUTBOUND_PROPERTY); if (!outboundProperty.booleanValue()) { System.out.println("Inbound SOAP message:"); try { SOAPMessage message = context.getMessage(); SOAPPart soapPart = message.getSOAPPart(); SOAPEnvelope soapEnvelope; soapEnvelope = soapPart.getEnvelope(); SOAPHeader soapHeader = soapEnvelope.getHeader(); SOAPBody soapBody = soapEnvelope.getBody(); if (soapHeader != null) { Iterator<SOAPElement> element = soapHeader.getChildElements(); SOAPElement signature = null; while (element.hasNext()) { signature = (SOAPElement) element.next(); Name name = signature.getElementName(); if (name.getLocalName().equals("client")) { break; } } if (signature != null) { String sig = signature.getValue(); soapHeader.removeChild(signature); byte[] result = Data.decode64(sig); ByteArrayOutputStream byteOut = new ByteArrayOutputStream(); message.writeTo(byteOut); Properties prop = Data.readPropertiesFile(ApplicationServerWebService.path); PublicKey publicKey = Data.readPublicKeys(prop.getProperty("publicKeyPath") + "clientpublic.txt"); if (Data.verifyDigitalSignature(result, byteOut.toByteArray(), publicKey)) System.out.println("VALID SIGNATURE"); } } } catch (SOAPException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (IllegalBlockSizeException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (BadPaddingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvalidKeyException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (InvalidKeySpecException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (NoSuchPaddingException e) { // TODO Auto-generated catch block e.printStackTrace(); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } return true; } @Override public boolean handleFault(SOAPMessageContext context) { return false; } }
[ "jfloff@gmail.com" ]
jfloff@gmail.com
8d4e5f326280d624e66f96b106215a4661a764b6
edf96b26a465a8ea463c2f2c588ffe7711323741
/app/src/main/java/entity/wdzs/ProvideInteractOrderPrescribeInfo.java
725788bd1f79d1deff9fa965bd4942bbdee884f8
[]
no_license
GAndroidLibrary/JYKJ
a385586ea2dbeb6c3928a3e58385353780869608
8858e3965e41851e2be5804483b51a6dec815ef3
refs/heads/master
2022-11-27T18:28:18.484007
2020-08-07T02:35:14
2020-08-07T02:35:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,450
java
package entity.wdzs; import java.io.Serializable; /** * 【医患互动】 * 患者就诊-处方记录[处方头文件(分组)后-每组的内容] * * @author JiaQ */ public class ProvideInteractOrderPrescribeInfo implements Serializable { private String drugCode;//药品编码.外键:drug_info(drugId) private String drugName;//药品名称 private String productBatchNumber;//药品批次号 private String specUnit;//单位 private String specName;//格规 private Float drugAmount;//数量 private Float drugPrice;//单价 private Float drugMoneys;//金额 private Integer useNum;//每次服用数量(片、粒) private Integer useFrequency;//用于频率(多少次/每天) private Integer useCycle;//服用周期(服药天数) private String useDesc;//用药描述 public String getDrugCode() { return drugCode; } public void setDrugCode(String drugCode) { this.drugCode = drugCode; } public String getDrugName() { return drugName; } public void setDrugName(String drugName) { this.drugName = drugName; } public String getProductBatchNumber() { return productBatchNumber; } public void setProductBatchNumber(String productBatchNumber) { this.productBatchNumber = productBatchNumber; } public String getSpecUnit() { return specUnit; } public void setSpecUnit(String specUnit) { this.specUnit = specUnit; } public String getSpecName() { return specName; } public void setSpecName(String specName) { this.specName = specName; } public Float getDrugAmount() { return drugAmount; } public void setDrugAmount(Float drugAmount) { this.drugAmount = drugAmount; } public Float getDrugPrice() { return drugPrice; } public void setDrugPrice(Float drugPrice) { this.drugPrice = drugPrice; } public Float getDrugMoneys() { return drugMoneys; } public void setDrugMoneys(Float drugMoneys) { this.drugMoneys = drugMoneys; } public Integer getUseNum() { return useNum; } public void setUseNum(Integer useNum) { this.useNum = useNum; } public Integer getUseFrequency() { return useFrequency; } public void setUseFrequency(Integer useFrequency) { this.useFrequency = useFrequency; } public Integer getUseCycle() { return useCycle; } public void setUseCycle(Integer useCycle) { this.useCycle = useCycle; } public String getUseDesc() { return useDesc; } public void setUseDesc(String useDesc) { this.useDesc = useDesc; } }
[ "m17600922812_1@163.com" ]
m17600922812_1@163.com
47e598cfdd362e45d57916a0ff252d6fa31d58b4
53d3823fc1255640efd1ece541daab1b023f9fdc
/src/main/java/com/bytatech/patientservice/client/dmscore/api/NetworksApiClient.java
ef0c7f9278468d41ad4e27ef82c5bd5db2f82a7a
[]
no_license
AyoosByta/patientTest
e6b1f5198778fc775f4dae017fc1e251a255fb7d
42229dfb0aa2be484775b94fa28bcfe7f9dd21c1
refs/heads/master
2022-12-18T10:19:04.220123
2020-01-07T09:12:13
2020-01-07T09:12:13
232,266,728
0
0
null
2022-12-16T04:43:19
2020-01-07T07:21:27
Java
UTF-8
Java
false
false
420
java
package com.bytatech.patientservice.client.dmscore.api; import org.springframework.cloud.openfeign.FeignClient; import com.bytatech.patientservice.client.dmscore.ClientConfiguration; @FeignClient(name="${dmscore.name:dmscore}", url="${dmscore.url:http://localhost/alfresco/api/-default-/public/alfresco/versions/1}", configuration = ClientConfiguration.class) public interface NetworksApiClient extends NetworksApi { }
[ "abdul.rafeek@lxisoft.com" ]
abdul.rafeek@lxisoft.com
b5ddf02a8e2581c54a5f48c14d285141c73942c5
d61cacfca3a0077aa889fc6dfdabf822ad2fc30f
/uberfire-preferences/uberfire-preferences-client/src/main/java/org/uberfire/preferences/client/store/PreferenceBeanStoreClientImpl.java
5db57a3bbaa0b8ce53dada809e3e4338382275fd
[ "Apache-2.0" ]
permissive
akumar074/appformer
59468c3c29eb04a9a5d441e3a2a4f2eb495d55d8
eec892e30e1d1570e22ead844385a31ea78b4b61
refs/heads/master
2023-04-16T01:50:36.234071
2019-10-07T14:20:17
2019-10-07T14:20:17
213,605,464
1
0
Apache-2.0
2019-10-08T09:47:43
2019-10-08T09:47:43
null
UTF-8
Java
false
false
6,222
java
/* * Copyright 2019 Red Hat, Inc. and/or its affiliates. * * 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.uberfire.preferences.client.store; import java.util.Collection; import javax.enterprise.context.ApplicationScoped; import javax.enterprise.inject.Alternative; import org.uberfire.mvp.Command; import org.uberfire.mvp.ParameterizedCommand; import org.uberfire.preferences.shared.PreferenceScope; import org.uberfire.preferences.shared.bean.BasePreference; import org.uberfire.preferences.shared.bean.BasePreferencePortable; import org.uberfire.preferences.shared.bean.PreferenceBeanStore; import org.uberfire.preferences.shared.impl.PreferenceScopeResolutionStrategyInfo; /** * Client-only implementation for {@link PreferenceBeanStore}. */ @Alternative @ApplicationScoped public class PreferenceBeanStoreClientImpl implements PreferenceBeanStore { @Override public <U extends BasePreference<U>, T extends BasePreferencePortable<U>> void load(final T emptyPortablePreference, final ParameterizedCommand<T> successCallback, final ParameterizedCommand<Throwable> errorCallback) { // loads the default value, without a backend it won't consult the preference storage successCallback.execute((T) emptyPortablePreference.defaultValue((U) emptyPortablePreference)); } @Override public <U extends BasePreference<U>, T extends BasePreferencePortable<U>> void load(final T emptyPortablePreference, final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, final ParameterizedCommand<T> successCallback, final ParameterizedCommand<Throwable> errorCallback) { // loads the default value, without a backend it won't consult the preference storage successCallback.execute((T) emptyPortablePreference.defaultValue((U) emptyPortablePreference)); } @Override public <U extends BasePreference<U>, T extends BasePreferencePortable<U>> void save(final T portablePreference, final Command successCallback, final ParameterizedCommand<Throwable> errorCallback) { // just call success callback because there's nothing to do, no backend means no save in our case callSuccessCallback(successCallback); } @Override public <U extends BasePreference<U>, T extends BasePreferencePortable<U>> void save(final T portablePreference, final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, final Command successCallback, final ParameterizedCommand<Throwable> errorCallback) { // just call success callback because there's nothing to do, no backend means no save in our case callSuccessCallback(successCallback); } @Override public <U extends BasePreference<U>, T extends BasePreferencePortable<U>> void save(T portablePreference, PreferenceScope scope, Command successCallback, ParameterizedCommand<Throwable> errorCallback) { // just call success callback because there's nothing to do, no backend means no save in our case callSuccessCallback(successCallback); } @Override public void save(final Collection<BasePreferencePortable<? extends BasePreference<?>>> portablePreferences, final Command successCallback, final ParameterizedCommand<Throwable> errorCallback) { // just call success callback because there's nothing to do, no backend means no save in our case callSuccessCallback(successCallback); } @Override public void save(final Collection<BasePreferencePortable<? extends BasePreference<?>>> portablePreferences, final PreferenceScopeResolutionStrategyInfo scopeResolutionStrategyInfo, final Command successCallback, final ParameterizedCommand<Throwable> errorCallback) { // just call success callback because there's nothing to do, no backend means no save in our case callSuccessCallback(successCallback); } @Override public void save(Collection<BasePreferencePortable<? extends BasePreference<?>>> portablePreferences, PreferenceScope scope, Command successCallback, ParameterizedCommand<Throwable> errorCallback) { // just call success callback because there's nothing to do, no backend means no save in our case callSuccessCallback(successCallback); } private void callSuccessCallback(final Command successCallback) { if (successCallback != null) { successCallback.execute(); } } }
[ "ignatowicz@gmail.com" ]
ignatowicz@gmail.com
2993023727d364309e539a26891a3ca19a9b8cf0
b3029a9bda29729cef5148a039a989bc1e0a6c60
/src/main/java/com/gmail/trentech/simplechat/Main.java
1ce0d66815bafc40dbc11b8275453e6f1674d37d
[ "MIT" ]
permissive
trentech/SimpleChat
48a337827d0c17120f34b237ed7aa7197187d6de
37ef41e1b33264780ba4e2393ce17c790d6b6f22
refs/heads/master
2020-04-15T14:35:29.980947
2017-06-13T00:00:28
2017-06-13T00:00:28
50,710,806
0
0
null
null
null
null
UTF-8
Java
false
false
5,949
java
package com.gmail.trentech.simplechat; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.nio.file.Files; import java.nio.file.Path; import org.slf4j.Logger; import org.spongepowered.api.Sponge; import org.spongepowered.api.config.ConfigDir; import org.spongepowered.api.event.Listener; import org.spongepowered.api.event.game.state.GameInitializationEvent; import org.spongepowered.api.event.game.state.GamePostInitializationEvent; import org.spongepowered.api.event.game.state.GamePreInitializationEvent; import org.spongepowered.api.plugin.Dependency; import org.spongepowered.api.plugin.Plugin; import org.spongepowered.api.plugin.PluginContainer; import org.spongepowered.api.text.Text; import org.spongepowered.api.text.action.TextActions; import org.spongepowered.api.text.format.TextColors; import org.spongepowered.api.text.serializer.TextSerializers; import com.gmail.trentech.simplechat.commands.channel.CMDTagChannel; import com.gmail.trentech.simplechat.data.ChannelTag; import com.gmail.trentech.simplechat.init.Commands; import com.gmail.trentech.simplechat.init.Common; import com.gmail.trentech.simplechat.listeners.EventListener; import com.gmail.trentech.simplechat.listeners.TagListener; import com.gmail.trentech.simplechat.utils.Resource; import com.google.inject.Inject; import me.flibio.updatifier.Updatifier; @Updatifier(repoName = Resource.NAME, repoOwner = Resource.AUTHOR, version = Resource.VERSION) @Plugin(id = Resource.ID, name = Resource.NAME, version = Resource.VERSION, description = Resource.DESCRIPTION, authors = Resource.AUTHOR, url = Resource.URL, dependencies = { @Dependency(id = "Updatifier", optional = true), @Dependency(id = "simpletags", optional = true), @Dependency(id = "pjc", optional = false) }) public class Main { @Inject @ConfigDir(sharedRoot = false) private Path path; @Inject private Logger log; private static PluginContainer plugin; private static Main instance; @Listener public void onPreInitializationEvent(GamePreInitializationEvent event) { plugin = Sponge.getPluginManager().getPlugin(Resource.ID).get(); instance = this; try { Files.createDirectories(path); } catch (IOException e) { e.printStackTrace(); } } @Listener public void onInitializationEvent(GameInitializationEvent event) { if (Sponge.getPluginManager().isLoaded("simpletags")) { Sponge.getEventManager().registerListeners(this, new TagListener()); com.gmail.trentech.simpletags.Main.registerTag(ChannelTag.class); com.gmail.trentech.simpletags.Main.registerCommand(CMDTagChannel.cmd, "channel", "ch"); } Common.initConfig(getPlugin().getId()); Sponge.getEventManager().registerListeners(this, new EventListener()); Commands commands = new Commands(); Sponge.getCommandManager().register(this, commands.cmdChannel, "channel", "ch"); Sponge.getCommandManager().register(this, commands.cmdChat, "chat", "cm"); Sponge.getCommandManager().register(this, commands.cmdMail, "mail", "ml"); Sponge.getCommandManager().register(this, commands.cmdMessage, "message", "msg"); Sponge.getCommandManager().register(this, commands.cmdMute, "mute", "m"); Sponge.getCommandManager().register(this, commands.cmdReply, "reply", "r"); Sponge.getCommandManager().register(this, commands.cmdSay, "say", "s"); Common.initData(); Common.initHelp(); } @Listener public void onPostInitializationEvent(GamePostInitializationEvent event) { if (Sponge.getPluginManager().isLoaded("simpletags")) { ChannelTag.init(); } } public Logger getLog() { return log; } public Path getPath() { return path; } public Text processText(String msg, boolean color) { if(color) { return TextSerializers.FORMATTING_CODE.deserialize(msg); } else { return Text.of(msg); } } public Text getText(String msg, boolean color, boolean url) { if(url) { Text message = Text.EMPTY; while (msg.contains("&u")) { message = Text.join(message, processText(msg.substring(0, msg.indexOf("&u{")).replace("&u{", ""), color)); String work = msg.substring(msg.indexOf("&u{"), msg.indexOf("}")).replaceFirst("&u\\{", "").replaceFirst("}", ""); message = Text.join(message, getLink(work, color)); msg = msg.substring(msg.indexOf("}"), msg.length()).replaceFirst("}", ""); } return Text.of(message, processText(msg, color)); } else { return processText(msg, color); } } private Text getLink(String link, boolean color) { Text.Builder builder = Text.builder(); String[] work = link.split(";"); if (work.length != 3) { return Text.of(TextColors.RED, "Invalid TextAction detected"); } if (work[0].equalsIgnoreCase("url")) { if (!work[1].toLowerCase().contains("http://") && !work[1].toLowerCase().contains("https://")) { work[1] = "http://" + work[1]; } URL url = null; try { url = new URL(work[1]); builder.onClick(TextActions.openUrl(url)).append(processText(work[2], color)); } catch (MalformedURLException e) { return Text.of(TextColors.RED, "Invalid URL detected"); } } else if (work[0].equalsIgnoreCase("cmd")) { builder.onClick(TextActions.runCommand(work[1])).append(processText(work[2], color)); } else if (work[0].equalsIgnoreCase("suggest")) { builder.onClick(TextActions.suggestCommand(work[1])).append(processText(work[2], color)); } else if (work[0].equalsIgnoreCase("hover")) { builder.onHover(TextActions.showText(processText(work[1], color))).append(processText(work[2], color)); } else { return Text.of(TextColors.RED, "Invalid TextAction detected"); } return builder.build(); } public static PluginContainer getPlugin() { return plugin; } public static Main instance() { return instance; } }
[ "TrenTech@gmail.com" ]
TrenTech@gmail.com
d400adaf6520468da639cce9ab8f95b44deaf031
96f8d42c474f8dd42ecc6811b6e555363f168d3e
/zuiyou/sources/cn/xiaochuankeji/tieba/ui/discovery/a/a.java
2d53b32f21a9ac817a690cdc0085906ca8eeae25
[]
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
2,486
java
package cn.xiaochuankeji.tieba.ui.discovery.a; import android.content.Context; import android.support.v7.widget.RecyclerView.Adapter; import android.support.v7.widget.RecyclerView.ViewHolder; import android.view.LayoutInflater; import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.TextView; import cn.xiaochuankeji.tieba.R; import cn.xiaochuankeji.tieba.background.topic.Category; import java.util.ArrayList; public class a extends Adapter<b> implements OnClickListener { private Context a; private LayoutInflater b; private ArrayList<Category> c; private long d; private a e = null; public interface a { void a(View view, long j); } public /* synthetic */ void onBindViewHolder(ViewHolder viewHolder, int i) { a((b) viewHolder, i); } public /* synthetic */ ViewHolder onCreateViewHolder(ViewGroup viewGroup, int i) { return a(viewGroup, i); } public a(Context context, ArrayList<Category> arrayList, long j) { this.a = context; this.b = LayoutInflater.from(this.a); this.c = arrayList; this.d = j; } public b a(ViewGroup viewGroup, int i) { View inflate = this.b.inflate(R.layout.view_item_topic_category, viewGroup, false); b bVar = new b(inflate); bVar.a = (TextView) inflate.findViewById(R.id.tvPgcCategoryName); bVar.b = inflate.findViewById(R.id.vTopicBottomLine); return bVar; } public void a(b bVar, int i) { Category category = (Category) this.c.get(i); bVar.a.setText(category.categoryName); bVar.itemView.setTag(Long.valueOf(category.categoryId)); if (this.d == category.categoryId) { bVar.a.setTextColor(c.a.d.a.a.a().a((int) R.color.CM)); bVar.b.setVisibility(0); } else { bVar.a.setTextColor(c.a.d.a.a.a().a((int) R.color.CT_2)); bVar.b.setVisibility(4); } bVar.itemView.setOnClickListener(this); } public int getItemCount() { return this.c.size(); } public void onClick(View view) { if (this.e != null) { this.d = ((Long) view.getTag()).longValue(); notifyDataSetChanged(); this.e.a(view, this.d); } } public void a(long j) { this.d = j; notifyDataSetChanged(); } public void a(a aVar) { this.e = aVar; } }
[ "aheadlcxzhang@gmail.com" ]
aheadlcxzhang@gmail.com
c2ef9f03a42e297f8dfb5fa7a2f67d3fa1b3825f
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13377-5-28-Single_Objective_GGA-WeightedSum/com/xpn/xwiki/plugin/ldap/XWikiLDAPUtils_ESTest.java
9950a0204bd151273942a19c58e50a0d30eee077
[ "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
560
java
/* * This file was automatically generated by EvoSuite * Mon Mar 30 20:40:38 UTC 2020 */ package com.xpn.xwiki.plugin.ldap; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XWikiLDAPUtils_ESTest extends XWikiLDAPUtils_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
2881d18220ce0094c85b353b3fa38e3f96f47e39
70d121be9507b8a397bb27ce03b0c6ac00f3ed9d
/app/src/main/java/com/inu/h4/seoultriphelper/Bucket/BucketExistFragment.java
10bb0f59933fcb4b602bf559e6703cb62bfa3e52
[ "MIT" ]
permissive
MobileSeoul/2016seoul-41
81d9f3e99e94181390042027e4fc71e90e222404
d1c739ecf859d1aee0ce6548913cf01ac539b311
refs/heads/master
2021-07-04T23:48:48.342218
2017-09-27T23:26:33
2017-09-27T23:26:33
105,078,620
1
1
null
null
null
null
UTF-8
Java
false
false
6,306
java
package com.inu.h4.seoultriphelper.Bucket; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.os.AsyncTask; import android.os.Bundle; import android.support.v4.app.Fragment; import android.util.Log; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.GridView; import android.widget.RelativeLayout; import com.inu.h4.seoultriphelper.DataBase.SIGHT1000ARRAY; import com.inu.h4.seoultriphelper.DataBase.SIGHT1000_LIST; import com.inu.h4.seoultriphelper.InnerDBHelper; import com.inu.h4.seoultriphelper.R; import net.daum.mf.map.api.MapPOIItem; import net.daum.mf.map.api.MapPoint; import net.daum.mf.map.api.MapView; import java.io.IOException; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; public class BucketExistFragment extends Fragment { private GridView GridView; private ArrayList<BucketGridViewItem> data; private static BucketGridViewAdapter adapter; private static int synk; private static final String SERVER_IP = "http://52.42.208.72/"; private RelativeLayout BucketMapViewContainer; @Override public void onStart() { super.onStart(); } @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { synk = 1; //디비호출 디비는 같은 폰에 하나가 아니라 앱에 하나임 final InnerDBHelper InnerDBHelper = new InnerDBHelper(getActivity(), "BUCKETDB1.db", null, 1); getActivity().setTitle("버킷리스트"); View layout = inflater.inflate(R.layout.bucket_list, container, false); adapter = new BucketGridViewAdapter(this); GridView = (GridView) layout.findViewById(R.id.bucket_list_grid_view); GridView.setAdapter(adapter); GridView.setChoiceMode(GridView.CHOICE_MODE_SINGLE); loadData(); ///////////////////////////////////////////////////////////////////////////// MapView mapView = new MapView(getActivity()); mapView.setDaumMapApiKey("753615f093d763e50b6a87a0a0f25f05"); BucketMapViewContainer = (RelativeLayout) layout.findViewById(R.id.bucket_list_mapView); BucketMapViewContainer.addView(mapView); mapView.setZoomLevel(7, true); mapView.setMapCenterPoint(MapPoint.mapPointWithGeoCoord(37.553161, 126.972664), true); MapPOIItem[] markers = new MapPOIItem[InnerDBHelper.RtnCount()]; for (int a = 0; a < InnerDBHelper.RtnCount(); a++) { markers[a] = new MapPOIItem(); } for (int a = 0; a < InnerDBHelper.RtnCount(); a++) { markers[a].setItemName(data.get(a).getSightName()); markers[a].setMapPoint(MapPoint.mapPointWithGeoCoord(data.get(a).getCoordinate_x(), data.get(a).getCoordinate_y())); markers[a].setMarkerType(MapPOIItem.MarkerType.BluePin); Log.d("LOG/Bucket", Double.toString(data.get(a).getCoordinate_x())); Log.d("LOG/Bucket", Double.toString(data.get(a).getCoordinate_y())); markers[a].setShowDisclosureButtonOnCalloutBalloon(false); } ////////////////////////////////////////////////////////////////////////////////// mapView.addPOIItems(markers); addListViewItem(); return layout; } public void loadData() { //디비호출 디비는 같은 폰에 하나가 아니라 앱에 하나임 final InnerDBHelper InnerDBHelper = new InnerDBHelper(getActivity(), "BUCKETDB1.db", null, 1); data = new ArrayList<>(); String[] placeName; placeName = InnerDBHelper.RtnPlaceName(); SIGHT1000_LIST array; for (int a = 0; a < InnerDBHelper.RtnCount(); a++) { BucketGridViewItem item = new BucketGridViewItem(); array = SIGHT1000ARRAY.getItemById(placeName[a]); item.setId(Integer.valueOf(array.getData(0))); item.setSightName(array.getData(1)); item.setRecommend(Integer.parseInt(array.getData(3))); LoadBitmapfromUrl(array.getData(8), item); item.setCoordinate_x(Double.parseDouble(array.getData(4))); item.setCoordinate_y(Double.parseDouble(array.getData(5))); data.add(item); } } public void addListViewItem() { for (int i = 0; i < data.size(); i++) { adapter.addItem(data.get(i)); } } // Uri -> 비트맵으로의 전환 메서드. public static void LoadBitmapfromUrl(final String uri, final BucketGridViewItem item) { class LoadClass extends AsyncTask<Object, Void, Bitmap> { @Override protected Bitmap doInBackground(Object... params) { String uri = (String) params[0]; return loadBitmap(uri); } @Override protected void onPostExecute(Bitmap result) { if (result != null) { item.setBitmap(result); refresh(); } } public Bitmap loadBitmap(String uri) { if (synk == 1) { Bitmap bitmap = null; URL newurl = null; bitmap = null; try { newurl = new URL(SERVER_IP.concat(uri)); bitmap = BitmapFactory.decodeStream(newurl.openConnection().getInputStream()); } catch (MalformedURLException e) { e.printStackTrace(); } catch (IOException e) { e.printStackTrace(); } Log.d("LOG/Bucket", "Get Bucket Bitmap! " + uri); return bitmap; } else return null; } } LoadClass inner = new LoadClass(); inner.execute(uri); } public static void refresh() { adapter.notifyDataSetChanged(); } @Override public void onStop() { super.onStop(); synk = 0; } @Override public void onPause() { super.onPause(); BucketMapViewContainer.removeAllViews(); } }
[ "mobile@seoul.go.kr" ]
mobile@seoul.go.kr
6124df5fc131bd1de912cb8affc93af495cfe8bf
78cdb53da6aca1a9be9ff3713c736d655b342251
/src/main/java/io/alphasquad/starter/api/web/rest/errors/InternalServerErrorException.java
8b3c186a4451d1727a386e71165a8ca4f836c9f7
[]
no_license
AlphaSquadIO/starter-api
8c7d4068d88c0f19cf407e46c7d090d9e64f16b6
a05237d456f4b43301718abb51338400421f9c76
refs/heads/master
2020-04-07T11:20:45.000179
2018-11-20T02:55:46
2018-11-20T02:55:46
158,322,263
0
0
null
null
null
null
UTF-8
Java
false
false
510
java
package io.alphasquad.starter.api.web.rest.errors; import org.zalando.problem.AbstractThrowableProblem; import org.zalando.problem.Status; /** * Simple exception with a message, that returns an Internal Server Error code. */ public class InternalServerErrorException extends AbstractThrowableProblem { private static final long serialVersionUID = 1L; public InternalServerErrorException(String message) { super(ErrorConstants.DEFAULT_TYPE, message, Status.INTERNAL_SERVER_ERROR); } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
907df47c63c18874eeeb289a5bcbaec9efa1e248
ff1d39fbcef867034a7b28c73647e31a1576c761
/hasor-core/src/main/java/net/hasor/core/context/ShutdownHook.java
9270a50198cd92157517f01a96620a9932adb300
[ "Apache-2.0" ]
permissive
dalianpa/hasor
154a9a346731a53309379247ccb68e4ae3203e15
c6b36d711e206927ef67c46a801009c6421b0351
refs/heads/master
2020-11-28T08:05:33.034136
2019-06-02T08:24:43
2019-06-02T08:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,757
java
/* * Copyright 2008-2009 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 net.hasor.core.context; import net.hasor.core.AppContext; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.util.Objects; /** * 用于处理当虚拟机关闭时{@link TemplateAppContext}的shutdown过程。 * @version : 2015年11月4日 * @author 赵永春 (zyc@hasor.net) */ class ShutdownHook extends Thread implements Runnable { protected static Logger logger = LoggerFactory.getLogger(ShutdownHook.class); private AppContext appContext; public ShutdownHook(AppContext appContext) { this.appContext = Objects.requireNonNull(appContext); } public void run() { ClassLoader oldLoader = Thread.currentThread().getContextClassLoader(); ClassLoader newLoader = this.appContext.getClassLoader(); try { Thread.currentThread().setContextClassLoader(newLoader); this.setName("Hasor-ShutdownHook"); this.appContext.shutdown(); } catch (Throwable e) { logger.error(e.getMessage(), e); } finally { Thread.currentThread().setContextClassLoader(oldLoader); } } }
[ "zyc@hasor.net" ]
zyc@hasor.net
15d552a117de613a96a5c9b4fde296a4d18b125f
f086a3dec26e3cf1397bb781534d7056b698bebe
/src/main/java/abr/mod/photoptics/entity/EntityTelescopeSimulator.java
67b92f6087a733afd2d0fe79db51a77176bdaee7
[]
no_license
An-Sar/Photoptics
0befe751b2dd0ce7406b5cf862ceb8b777656d4d
d4241381edbc1dfdfb29655948de66c98a87e498
refs/heads/master
2020-03-26T19:11:23.591456
2016-07-11T10:36:48
2016-07-11T10:36:48
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,318
java
package abr.mod.photoptics.entity; import abr.mod.photoptics.tileentity.TileEntityTelescopeBase; import net.minecraft.entity.Entity; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import stellarapi.api.StellarAPIReference; public class EntityTelescopeSimulator extends Entity { private EntityPlayer usingPlayer; private TileEntityTelescopeBase telescope; public EntityTelescopeSimulator(World world, TileEntityTelescopeBase telescope) { super(world); this.telescope = telescope; } @Override protected void entityInit() { // TODO Entity Init } @Override protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { // TODO read entity } @Override protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { // TODO write entity } public boolean setPlayer(EntityPlayer player) { if(this.usingPlayer != null) return false; this.usingPlayer = player; usingPlayer.startRiding(player, true); StellarAPIReference.updateScope(player); return true; } public boolean removePlayer(EntityPlayer player) { if(this.usingPlayer != player) return false; usingPlayer.dismountEntity(this); this.usingPlayer = null; StellarAPIReference.updateScope(player); return true; } }
[ "abab9579@gmail.com" ]
abab9579@gmail.com
62dfb4b0d29e4b4aa4b00c4ad5b2b01f28e441d9
211ec31a7f09435b4c5d491139a2831c98e0f69c
/BestarProject/ShoppingMall/src/com/manyi/mall/cachebean/user/ResetPasswordResponse.java
444c25d4758b4431996caecbf08e7b20c5649814
[ "Apache-2.0" ]
permissive
bestarandyan/ShoppingMall
6e8ac0ee3a5ae7a91541d04b1fba8d2d1496875c
ee93b393b982bdfe77d26182a2317f2c439c12fc
refs/heads/master
2021-01-01T05:49:52.010094
2015-01-23T10:29:59
2015-01-23T10:29:59
29,727,539
2
1
null
null
null
null
UTF-8
Java
false
false
152
java
package com.manyi.mall.cachebean.user; import com.huoqiu.framework.rest.Response; public class ResetPasswordResponse extends Response { }
[ "2238985517@qq.com" ]
2238985517@qq.com
6bdd484f5a3890d6e7b3973aacaff0d5c0716fa4
fe1860c2cf170c17563aae7825d1abdea0b417d4
/DesignPattern_Jan2017/NTDP92/StrategyDP/src/com/nt/comps/DTDC.java
ddba91047af478cb27d71a63de157c296fc836d3
[]
no_license
aakulasaikiran/Desisgn_patterns
ec811e05230db3a4c8622948757a4da615c92474
9b703a8e321e9cc69df98e235b55bdabc4aebcb8
refs/heads/master
2020-04-21T23:55:57.098770
2019-02-10T09:35:14
2019-02-10T09:35:14
169,962,049
0
0
null
null
null
null
UTF-8
Java
false
false
197
java
package com.nt.comps; public class DTDC implements Courier { @Override public final void deliver(int orderId) { System.out.println("DTDC: delivering orderId:"+orderId+" order items"); } }
[ "aakulasaikiran@gmail.com" ]
aakulasaikiran@gmail.com
d555ca90cd2ca754800e73cf29f9354de050a7e1
596be59442ec69b7c0366903b548e95e02a46790
/backend/src/main/java/in/co/sdrc/scpstn/domain/AreaLevel.java
99e3dafa6e7bed6eba06d9306d16311b21510541
[]
no_license
SDRC-India/SCPS-TN
ccb004b95b53af02693d0bdfda9e61924513188b
fdd03df70fd4c5c8649e68c1350d79f69023e608
refs/heads/master
2023-03-09T02:12:26.902743
2021-02-25T10:20:23
2021-02-25T10:20:23
342,202,741
0
0
null
null
null
null
UTF-8
Java
false
false
696
java
package in.co.sdrc.scpstn.domain; import java.io.Serializable; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.Table; import lombok.Data; @Data @Entity @Table(name = "area_level") public class AreaLevel implements Serializable { private static final long serialVersionUID = 1519381375815795764L; @Id @Column(name = "area_level_id_pk") @GeneratedValue(strategy=GenerationType.IDENTITY) private Integer areaLevelId; @Column(name = "area_level_name", nullable = false) private String areaLevelName; }
[ "ratikanta131@gmail.com" ]
ratikanta131@gmail.com
d60aaba43978c5425d03762efc2fa9db4e4e7577
a36dce4b6042356475ae2e0f05475bd6aed4391b
/2005/julypersistenceEJB/ejbModule/com/hps/july/persistence/ProtoActionAccessBeanTable.java
dbe430e2c75cf90882038747af2fedbb54c25815
[]
no_license
ildar66/WSAD_NRI
b21dbee82de5d119b0a507654d269832f19378bb
2a352f164c513967acf04d5e74f36167e836054f
refs/heads/master
2020-12-02T23:59:09.795209
2017-07-01T09:25:27
2017-07-01T09:25:27
95,954,234
0
1
null
null
null
null
UTF-8
Java
false
false
1,752
java
/** * This class was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ package com.hps.july.persistence; import javax.ejb.*; public class ProtoActionAccessBeanTable extends com.ibm.ivj.ejb.runtime.AbstractAccessBeanTable { static final long serialVersionUID = 3206093459760846163L; /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public ProtoActionAccessBeanTable () { super(); } /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public java.util.Enumeration getProtoActionAccessBean() { return super.getTable(); } /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public ProtoActionAccessBean getProtoActionAccessBean( int i ) { return (ProtoActionAccessBean) super.getRow(i); } ; /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public void setProtoActionAccessBean( java.util.Enumeration e ) { super.setTable(e); } /** * This method was generated by the VisualAge for Java Access Bean SmartGuide. * Warning: Modifications will be lost when this part is regenerated. */ public void setProtoActionAccessBean ( int i, ProtoActionAccessBean e ) { super.setRow(i, e); } ; }
[ "ildar66@inbox.ru" ]
ildar66@inbox.ru
25d9ad3d2e416c419dbe3ab95a07a07c602d7da0
fba662c58957990a20b9bfbff7d84e5d50db5100
/workspace/ibatisTest/src/kr/or/ddit/basic/JdbcTest06ToIbatis.java
c4d43b94ab9b81567741f185109f417cbaef47e4
[]
no_license
maskan19/JAVA02
008d1bf189b1d2b7c13ca10a2d9c5ee942ab3025
e483236ac3c7ffdc6db078c3512eac0cb29487d8
refs/heads/master
2023-03-25T00:32:50.742136
2021-03-12T10:16:34
2021-03-12T10:16:34
327,138,973
0
0
null
null
null
null
UTF-8
Java
false
false
1,990
java
package kr.or.ddit.basic; //jdbcTest 프로젝트에 있는 'JdbcTest06.java'의 처리방법을 ibatis로 변경 import java.io.IOException; import java.io.Reader; import java.nio.charset.Charset; import java.sql.SQLException; import java.util.Scanner; import com.ibatis.common.resources.Resources; import com.ibatis.sqlmap.client.SqlMapClient; import com.ibatis.sqlmap.client.SqlMapClientBuilder; import kr.or.ddit.util.SqlMapUtil; //쿼리문이 저장될 xml문서 이름은 'jdbc06.xml'로 한다. public class JdbcTest06ToIbatis { public static void main(String[] args) { Scanner sc = new Scanner(System.in); SqlMapClient smc = null; try { // Charset charset = Charset.forName("UTF-8"); // Resources.setCharset(charset); // // Reader rd = Resources.getResourceAsReader("sqlMapConfig.xml"); // // SqlMapClient smc = SqlMapClientBuilder.buildSqlMapClient(rd); // // rd.close(); //finally로 잡는 편 smc = SqlMapUtil.getSqlMapClient(); String lprodGu = ""; while (true) { System.out.println("추가할 분류번호(P)"); lprodGu = sc.next(); int cnt = (int) smc.queryForObject("jdbclprod.getLprod", lprodGu); if (cnt == 0) break; else System.out.println("이미 존재하는 분류번호 입니다."); } int max = (int) smc.queryForObject("jdbclprod.getmaxId"); System.out.println("lprod_nm 입력 : "); String lprodNm = sc.next(); LprodVO lvo = new LprodVO(); lvo.setLprod_gu(lprodGu); lvo.setLprod_id(max); lvo.setLprod_nm(lprodNm); Object obj = smc.insert("jdbclprod.insertLprod", lvo); if (obj == null) { System.out.println("insert 작업 성공"); } else { System.out.println("insert 작업 실패"); } System.out.println("insert 작업 끝"); } catch (SQLException e) { e.printStackTrace(); // } catch (IOException e) { // } finally { // if(rd!=null) try { // rd.close(); // } catch (Exception e2) { // // TODO: handle exception // } } } }
[ "maskan_19@naver.com" ]
maskan_19@naver.com
42ae8bd5c2d31479e504feec896e21c1d53925f2
4c19b724f95682ed21a82ab09b05556b5beea63c
/XMSYGame/java2/server/zxyy-webhome/src/main/java/com/xmsy/server/zxyy/webhome/modules/manager/shoproomcardproportion/entity/ShopRoomCardProportionEntity.java
f129bab723a453c66ade6359687dcb531c90c537
[]
no_license
angel-like/angel
a66f8fda992fba01b81c128dd52b97c67f1ef027
3f7d79a61dc44a9c4547a60ab8648bc390c0f01e
refs/heads/master
2023-03-11T03:14:49.059036
2022-11-17T11:35:37
2022-11-17T11:35:37
222,582,930
3
5
null
2023-02-22T05:29:45
2019-11-19T01:41:25
JavaScript
UTF-8
Java
false
false
970
java
package com.xmsy.server.zxyy.webhome.modules.manager.shoproomcardproportion.entity; import com.baomidou.mybatisplus.annotations.TableName; import com.xmsy.server.zxyy.webhome.base.BaseEntity; import java.math.BigDecimal; import java.util.Date; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * 金币兑换房卡比例表 * * @author axiong * @email xxxxx * @date 2019-07-05 17:00:34 */ @Data @EqualsAndHashCode(callSuper=false) @Accessors(chain=true) @TableName("shop_room_card_proportion") public class ShopRoomCardProportionEntity extends BaseEntity<ShopRoomCardProportionEntity> { private static final long serialVersionUID = 1L; /** * 持有道具 */ private Integer holdProp; /** * 目标道具 */ private Integer targetProp; /** * 状态 */ private Boolean status; /** * 比例 */ private BigDecimal proportion; /** * 生效时间 */ private Date effectDate; }
[ "163@qq.com" ]
163@qq.com
29398c4e642a93d7c4a0f412a62d37bf50690157
ca9c3d3c69626d184cd64af8d4533a22590dad2c
/test/com/rtg/launcher/NoStatisticsTest.java
744c6b7dd0a77118383b13e21e46b3df8f11eb36
[ "LicenseRef-scancode-unknown-license-reference", "BSD-2-Clause" ]
permissive
thoughtsynapse/rtg-tools
0c0e1360cd02c88bdd63ef5f669eb01b134cba4b
32d4c2d2d340cb0288f68ddd008d29564bcfef13
refs/heads/master
2023-04-28T18:58:41.630189
2021-05-18T01:54:10
2021-05-20T01:20:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,635
java
/* * Copyright (c) 2014. Real Time Genomics Limited. * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are * met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the * distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * 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 com.rtg.launcher; import junit.framework.TestCase; /** */ public class NoStatisticsTest extends TestCase { public void test() { final NoStatistics ds = new NoStatistics(); assertNull(ds.getStatistics()); } }
[ "len@realtimegenomics.com" ]
len@realtimegenomics.com
5ba1b90392f3fbf6e1a744cdd48ed64a197d196e
d6469637594f32524b64b0a02f1984f6343f9829
/app/src/main/java/com/ysxsoft/lock/models/response/CheckAddressResponse.java
4c031c08dc7870c18af77b98fcde5c4cbb80081d
[]
no_license
Sincerly/lock
d764fc76776177c9c5b2d98228c366c7e0dfb9b3
a87ca1718ef4ce18633bd4f6b69f895e06d514ba
refs/heads/master
2020-11-24T18:11:45.881171
2020-03-11T07:11:35
2020-03-11T07:11:35
228,284,794
0
0
null
null
null
null
UTF-8
Java
false
false
2,039
java
package com.ysxsoft.lock.models.response; /** * Create By 胡 * on 2019/12/31 0031 */ public class CheckAddressResponse { /** * msg : 操作成功 * code : 200 * data : {"id":"5b3c3fceee724c20aaf6d02e743eeb8c","quarters_name":"测试小区","address":"长宁区通协路558弄","lat":"31.23203","lng":"121.36244"} */ private String msg; private String code; private DataBean data; public String getMsg() { return msg; } public void setMsg(String msg) { this.msg = msg; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public static class DataBean { /** * id : 5b3c3fceee724c20aaf6d02e743eeb8c * quarters_name : 测试小区 * address : 长宁区通协路558弄 * lat : 31.23203 * lng : 121.36244 */ private String id; private String quarters_name; private String address; private String lat; private String lng; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getQuarters_name() { return quarters_name; } public void setQuarters_name(String quarters_name) { this.quarters_name = quarters_name; } public String getAddress() { return address; } public void setAddress(String address) { this.address = address; } public String getLat() { return lat; } public void setLat(String lat) { this.lat = lat; } public String getLng() { return lng; } public void setLng(String lng) { this.lng = lng; } } }
[ "2694675654@qq.com" ]
2694675654@qq.com
eed1ee0e44a881333df83f53a7257a64f783e85d
fcf495e737052b6b486be0980f04abab8fc5ae96
/W_eclipse1_1/CallbackHandler/src/org/crazyit/event/MyButton.java
76acf98ea915327873858e236b0237d724854ea7
[ "Apache-2.0" ]
permissive
00wendi00/MyProject
2141787e2f93c5007a90be7f5f927a8241de139c
204a659c2d535d8ff588f6d926bf0edc7f417661
refs/heads/master
2021-01-15T10:46:57.630700
2015-04-19T01:35:56
2015-04-19T01:35:56
33,536,129
1
0
null
null
null
null
GB18030
Java
false
false
830
java
/** * */ package org.crazyit.event; import android.content.Context; import android.util.AttributeSet; import android.util.Log; import android.view.KeyEvent; import android.widget.Button; /** * Description: * <br/>网站: <a href="http://www.crazyit.org">疯狂Java联盟</a> * <br/>Copyright (C), 2001-2014, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class MyButton extends Button { public MyButton(Context context, AttributeSet set) { super(context, set); } @Override public boolean onKeyDown(int keyCode, KeyEvent event) { super.onKeyDown(keyCode, event); Log.v("-crazyit.org-", "the onKeyDown in MyButton"); // 返回true,表明该事件不会向外扩散 return true; } }
[ "842876912@qq.com" ]
842876912@qq.com
eaf75becf203390a06194ade987239f90d422a93
93daab91617df92cd8f7b0121a281b2eceec8db3
/src/test/java/com/codekutter/qengine/model/DataTypeTest.java
e3d9e3b97819f1a3733c658f195faac06ab5739a
[ "Apache-2.0" ]
permissive
subhagho/qengine
b67f730a44a87940a09a24642af3168208f94a21
ff9a66020c200d5e5153a22720ed9edc3236fe8a
refs/heads/main
2023-03-22T04:23:01.154645
2021-03-13T20:33:50
2021-03-13T20:33:50
342,483,902
0
0
null
null
null
null
UTF-8
Java
false
false
3,673
java
/* * Licensed to the Apache Software Foundation (ASF) under one * * or more contributor license agreements. See the NOTICE file * * distributed with this work for additional information * * regarding copyright ownership. The ASF licenses this file * * to you under the Apache License, Version 2.0 (the * * "License"); you may not use this file except in compliance * * with the License. You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, * * software distributed under the License is distributed on an * * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * * KIND, either express or implied. See the License for the * * specific language governing permissions and limitations * * under the License. * * * * Copyright (c) 2021 * * Date: 13/03/21, 2:45 PM * * Subho Ghosh (subho dot ghosh at outlook.com) */ package com.codekutter.qengine.model; import com.codekutter.qengine.utils.LogUtils; import lombok.Getter; import lombok.Setter; import org.junit.jupiter.api.Test; import java.lang.reflect.Field; import java.sql.Timestamp; import java.util.Date; import static org.junit.jupiter.api.Assertions.*; class DataTypeTest { @Test void parse() { try { String cparam = "List <integer>"; String mparam = "Map <double, string>"; DataType cdt = DataType.parse(cparam); assertNotNull(cdt); assertTrue(cdt instanceof DataType.DtCollection); DataType mdt = DataType.parse(mparam); assertNotNull(mdt); assertTrue(mdt instanceof DataType.DtMap); } catch (Throwable t) { LogUtils.error(getClass(), t); fail(t); } } @Test void convert() { try { Field[] fields = TestClass.class.getFields(); for (Field f : fields) { DataType dt = DataType.convert(f); assertNotNull(dt); LogUtils.debug(getClass(), String.format("[field=%s][type=%s]", f.getType().getCanonicalName(), dt.name())); } } catch (Throwable t) { LogUtils.error(getClass(), t); fail(t); } } @Test void testConvert() { try { DataType dt = DataType.convert(Timestamp.class); assertNotNull(dt); assertEquals(dt.name(), BasicDataTypes.Timestamp.dataType().name()); dt = DataType.convert(Date.class); assertNotNull(dt); assertEquals(dt.name(), BasicDataTypes.DateTime.dataType().name()); dt = DataType.convert(java.sql.Date.class); assertNotNull(dt); assertEquals(dt.name(), BasicDataTypes.Date.dataType().name()); } catch (Throwable t) { LogUtils.error(getClass(), t); fail(t); } } @Test void compareValue() { try { DataType.DtEnum<TestEnum> dt = new DataType.DtEnum<>(TestEnum.class); int ret = dt.compareValue(TestEnum.ONE, TestEnum.THREE); assertTrue(ret < 0); ret = dt.compareValue(TestEnum.TWO, TestEnum.TWO); assertEquals(0, ret); } catch (Throwable t) { LogUtils.error(getClass(), t); fail(t); } } public enum TestEnum { ONE, TWO, THREE } @Getter @Setter public static class TestClass { private int id; private double value; private String name; private TestEnum evalue; private Date date; } }
[ "subho.ghosh@outlook.com" ]
subho.ghosh@outlook.com
033f8678db1075cc88309bb978102cc5fae56bdb
c9522abc8c4ffe8a91d042be4b8cf7aebc6e9c5f
/library/src/main/java/com/h6ah4i/android/widget/advrecyclerview/draggable/LeftRightEdgeEffectDecorator.java
eb485421cb1b253fa6297ad4b568d470eae22d72
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
yaoxiangshangzou/android-advancedrecyclerview
71e634e51b94933fa72ca0cf009e9872e867a2aa
eff551b7bef11577d8dcd2756ed198f2967956b1
refs/heads/master
2020-03-20T04:12:50.216446
2018-06-13T07:18:49
2018-06-13T07:18:49
137,175,025
0
0
Apache-2.0
2018-06-13T06:54:50
2018-06-13T06:54:50
null
UTF-8
Java
false
false
1,201
java
/* * Copyright (C) 2015 Haruki Hasegawa * * 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.h6ah4i.android.widget.advrecyclerview.draggable; import android.support.v7.widget.RecyclerView; class LeftRightEdgeEffectDecorator extends BaseEdgeEffectDecorator { public LeftRightEdgeEffectDecorator(RecyclerView recyclerView) { super(recyclerView); } @Override protected int getEdgeDirection(int no) { switch (no) { case 0: return EDGE_LEFT; case 1: return EDGE_RIGHT; default: throw new IllegalArgumentException(); } } }
[ "h6a.h4i.0@gmail.com" ]
h6a.h4i.0@gmail.com
330b2cb3eee57a37a91f0cae32a78b739754f0e9
72aa9ae048ea035ea6b65b56d953e91d7c479940
/src/main/java/com/epcs/utils/parser2/PacketLocationReport.java
1b86a6f161fcf50c61f0685f0bed33a136f35671
[]
no_license
kulucode/KuluCloudServer
91d54d3b50749729a91774ed1fb4689aa5e93795
56ff501c21e292d94027323c4dc542f4357e9a2f
refs/heads/master
2020-03-18T13:33:53.061508
2018-08-24T10:10:29
2018-08-24T10:10:29
134,792,396
0
0
null
null
null
null
UTF-8
Java
false
false
5,885
java
package com.epcs.utils.parser2; import java.sql.Timestamp; import java.util.Collection; import java.util.HashMap; import java.util.Iterator; public class PacketLocationReport { public final static int MSG_ID = 0x0200; /** * 位置基本信息 */ final static int ALERT_FLAG_INDEX = 0;// 报警标志 final static int ALERT_FLAG_LEN = 4; final static int STATUS_INDEX = ALERT_FLAG_INDEX + ALERT_FLAG_LEN;// 状态 final static int STATUS_LEN = 4; final static int LATITUDE_INDEX = STATUS_INDEX + STATUS_LEN;// 纬度 final static int LATITUDE_LEN = 4; final static int LONGITUDE_INDEX = LATITUDE_INDEX + LATITUDE_LEN;// 经度 final static int LONGITUDE_LEN = 4; final static int ALTITUDE_INDEX = LONGITUDE_INDEX + LONGITUDE_LEN;// 高程 final static int ALTITUDE_LEN = 2; final static int SPEED_INDEX = ALTITUDE_INDEX + ALTITUDE_LEN;// 速度 final static int SPEED_LEN = 2; final static int DIRECTION_INDEX = SPEED_INDEX + SPEED_LEN;// 方向 final static int DIRECTION_LEN = 2; final static int TIME_INDEX = DIRECTION_INDEX + DIRECTION_LEN;// 时间 final static int TIME_LEN = 6; /** * 位置附加信息项列表 */ final static int EXTRA_MSG_INDEX = TIME_INDEX + TIME_LEN;// 附加信息ID final static int EXTRA_MSG_ID_LEN = 1; final static int EXTRA_MSG_LEN_LEN = 1; public final static int LOCATION_RATIO = 1000000; public int alertFlag; public int status; public double latitude; public double longitude; public int altitude;// m public int speed;// 0.1km/h public int direction;// 0-359顺时针 public String time;// BCD[6] YY-MM-DD-hh-mm-ss public Timestamp timeStamp;// YYYY-MM-DD hh:mm:ss public HashMap<Integer, ExtraMsg> extraMsgList = new HashMap<>();// 位置附加信息项列表 public final static int OIL_LEVEL_ID = 0x02; public final static int OIL_LEVEL_LEN = 2; public float oilLevel;// 单位mm public int isAccOn;// AccOn表示车在工作 final static int ACC_MASK = 1 << 0; public class ExtraMsg { public int id; public int length; public byte[] msg; @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append("id=" + id); stringBuilder.append(" length=" + length); stringBuilder.append(" msg=" + UtilsConvert.byteToHex0x(msg) + "\n"); return stringBuilder.toString(); } } @Override public String toString() { StringBuilder stringBuilder = new StringBuilder(); stringBuilder.append(" [LocationPacket]:"); stringBuilder.append(" alertFlag=" + alertFlag); stringBuilder.append(" status=" + status); stringBuilder.append(" latitude=" + latitude); stringBuilder.append(" longitude=" + longitude); stringBuilder.append(" altitude=" + altitude); stringBuilder.append(" speed=" + speed); stringBuilder.append(" direction=" + direction); stringBuilder.append(" oil=" + oilLevel); stringBuilder.append(" isAccOn=" + isAccOn); stringBuilder.append(" time=" + time + "\n"); Collection<ExtraMsg> values = extraMsgList.values(); for (Iterator<ExtraMsg> valIt = values.iterator(); valIt.hasNext();) { ExtraMsg msg = valIt.next(); stringBuilder.append(msg); } if (extraMsgList.size() > 0) { stringBuilder.append("\n"); } return stringBuilder.toString(); } public PacketLocationReport() { } public PacketLocationReport(byte[] msgBody) { if (msgBody == null || msgBody.length < EXTRA_MSG_INDEX - 1) return; alertFlag = UtilsConvert.formInt(msgBody, ALERT_FLAG_INDEX, ALERT_FLAG_LEN); status = UtilsConvert.formInt(msgBody, STATUS_INDEX, STATUS_LEN); latitude = (double) UtilsConvert.formInt(msgBody, LATITUDE_INDEX, LATITUDE_LEN) / LOCATION_RATIO; longitude = (double) UtilsConvert.formInt(msgBody, LONGITUDE_INDEX, LONGITUDE_LEN) / LOCATION_RATIO; altitude = UtilsConvert.formInt(msgBody, ALTITUDE_INDEX, ALTITUDE_LEN); speed = UtilsConvert.formInt(msgBody, SPEED_INDEX, SPEED_LEN); direction = UtilsConvert.formInt(msgBody, DIRECTION_INDEX, DIRECTION_LEN); time = UtilsConvert.bcd2Str(UtilsConvert.subBytes(msgBody, TIME_INDEX, TIME_LEN)); timeStamp = UtilsTime.bcdTime2TimeStamp(time); isAccOn = status & ACC_MASK; int baseIndex = EXTRA_MSG_INDEX; while (baseIndex < msgBody.length) { /** 读取位置附加信息项列表 */ ExtraMsg extraMsg = new ExtraMsg(); extraMsg.id = UtilsConvert.formInt(msgBody, baseIndex, EXTRA_MSG_ID_LEN); baseIndex += EXTRA_MSG_ID_LEN; extraMsg.length = UtilsConvert.formInt(msgBody, baseIndex, EXTRA_MSG_LEN_LEN); baseIndex += EXTRA_MSG_LEN_LEN; extraMsg.msg = UtilsConvert.subBytes(msgBody, baseIndex, extraMsg.length); baseIndex += extraMsg.length; extraMsgList.put(extraMsg.id, extraMsg); } /** 处理特殊的附加信息 */ if (extraMsgList.containsKey(OIL_LEVEL_ID)) { ExtraMsg msg = extraMsgList.get(OIL_LEVEL_ID); int ad = UtilsConvert.formInt(msg.msg, 0, OIL_LEVEL_LEN); // oilLevel = (float) (ad * 999.9 / 0xffff); oilLevel = (float) ad; } } public boolean isValidPacket() { return true; } public byte[] simulate(double lat, double lon) { byte[] balertFlag = UtilsConvert.int2BytesBigEndian(alertFlag, ALERT_FLAG_LEN); byte[] bstatus = UtilsConvert.int2BytesBigEndian(status, STATUS_LEN); byte[] blatitude = UtilsConvert.int2BytesBigEndian((int) (LOCATION_RATIO * lat), LATITUDE_LEN); byte[] blongitude = UtilsConvert.int2BytesBigEndian((int) (LOCATION_RATIO * lon), LONGITUDE_LEN); byte[] baltitude = UtilsConvert.int2BytesBigEndian(altitude, ALTITUDE_LEN); byte[] bspeed = UtilsConvert.int2BytesBigEndian(speed, SPEED_LEN); byte[] bdirection = UtilsConvert.int2BytesBigEndian(direction, DIRECTION_LEN); String t = UtilsTime.getBcdString(System.currentTimeMillis()); byte[] btime = UtilsConvert.str2Bcd(t); return UtilsConvert.combineBytes(balertFlag, bstatus, blatitude, blongitude, baltitude, bspeed, bdirection, btime); } }
[ "zhangka@tpson.cn" ]
zhangka@tpson.cn
95212867086225dcc8a51ee82424ccad514516b5
c39ff57e2c91bf8a30a4d94bd81222c583fc6764
/examples/exceptions/src/main/java/org/jboss/seam/rest/example/jaxrs/exceptions/JaxrsExceptionsApplication.java
fb3eef8e621294c2f106649b8262f17586429001
[]
no_license
jharting/seam-rest
8d058f877f897e55aeabbfd372ec1c8ac1fbe8c6
93bc88ccd638bc80f85b54ded936e1b80fe4a696
refs/heads/master
2020-12-25T10:34:06.614806
2011-04-04T13:45:15
2011-04-04T13:45:15
997,368
0
0
null
null
null
null
UTF-8
Java
false
false
218
java
package org.jboss.seam.rest.example.jaxrs.exceptions; import javax.ws.rs.ApplicationPath; import javax.ws.rs.core.Application; @ApplicationPath("/api") public class JaxrsExceptionsApplication extends Application { }
[ "jharting@redhat.com" ]
jharting@redhat.com
c9ffeca572d822b8398a4323c0b668a09fd29595
329307375d5308bed2311c178b5c245233ac6ff1
/src/com/tencent/mm/sdk/modelmsg/WXImageObject.java
7358360c754b937331519ad882ed1811eccc9db4
[]
no_license
ZoneMo/com.tencent.mm
6529ac4c31b14efa84c2877824fa3a1f72185c20
dc4f28aadc4afc27be8b099e08a7a06cee1960fe
refs/heads/master
2021-01-18T12:12:12.843406
2015-07-05T03:21:46
2015-07-05T03:21:46
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,367
java
package com.tencent.mm.sdk.modelmsg; import android.graphics.Bitmap; import android.graphics.Bitmap.CompressFormat; import android.os.Bundle; import com.tencent.mm.sdk.platformtools.t; import java.io.ByteArrayOutputStream; import java.io.File; public class WXImageObject implements WXMediaMessage.b { private static final int CONTENT_LENGTH_LIMIT = 10485760; private static final int PATH_LENGTH_LIMIT = 10240; private static final String TAG = "!44@/B4Tb64lLpIyQij4HtGFZMINqfKLk3xCSNB+M4PcHh0="; private static final int URL_LENGTH_LIMIT = 10240; public byte[] imageData; public String imagePath; public String imageUrl; public WXImageObject() {} public WXImageObject(Bitmap paramBitmap) { try { ByteArrayOutputStream localByteArrayOutputStream = new ByteArrayOutputStream(); paramBitmap.compress(Bitmap.CompressFormat.JPEG, 85, localByteArrayOutputStream); imageData = localByteArrayOutputStream.toByteArray(); localByteArrayOutputStream.close(); return; } catch (Exception paramBitmap) {} } public WXImageObject(byte[] paramArrayOfByte) { imageData = paramArrayOfByte; } private int getFileSize(String paramString) { if ((paramString == null) || (paramString.length() == 0)) {} do { return 0; paramString = new File(paramString); } while (!paramString.exists()); return (int)paramString.length(); } public boolean checkArgs() { if (((imageData == null) || (imageData.length == 0)) && ((imagePath == null) || (imagePath.length() == 0)) && ((imageUrl == null) || (imageUrl.length() == 0))) { t.e("!44@/B4Tb64lLpIyQij4HtGFZMINqfKLk3xCSNB+M4PcHh0=", "checkArgs fail, all arguments are null"); return false; } if ((imageData != null) && (imageData.length > 10485760)) { t.e("!44@/B4Tb64lLpIyQij4HtGFZMINqfKLk3xCSNB+M4PcHh0=", "checkArgs fail, content is too large"); return false; } if ((imagePath != null) && (imagePath.length() > 10240)) { t.e("!44@/B4Tb64lLpIyQij4HtGFZMINqfKLk3xCSNB+M4PcHh0=", "checkArgs fail, path is invalid"); return false; } if ((imagePath != null) && (getFileSize(imagePath) > 10485760)) { t.e("!44@/B4Tb64lLpIyQij4HtGFZMINqfKLk3xCSNB+M4PcHh0=", "checkArgs fail, image content is too large"); return false; } if ((imageUrl != null) && (imageUrl.length() > 10240)) { t.e("!44@/B4Tb64lLpIyQij4HtGFZMINqfKLk3xCSNB+M4PcHh0=", "checkArgs fail, url is invalid"); return false; } return true; } public void serialize(Bundle paramBundle) { paramBundle.putByteArray("_wximageobject_imageData", imageData); paramBundle.putString("_wximageobject_imagePath", imagePath); paramBundle.putString("_wximageobject_imageUrl", imageUrl); } public void setImagePath(String paramString) { imagePath = paramString; } public int type() { return 2; } public void unserialize(Bundle paramBundle) { imageData = paramBundle.getByteArray("_wximageobject_imageData"); imagePath = paramBundle.getString("_wximageobject_imagePath"); imageUrl = paramBundle.getString("_wximageobject_imageUrl"); } } /* Location: * Qualified Name: com.tencent.mm.sdk.modelmsg.WXImageObject * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "reverseengineeringer@hackeradmin.com" ]
reverseengineeringer@hackeradmin.com
3dfb6b37097ec4a3731f525b49e349de3e46d810
0e7f18f5c03553dac7edfb02945e4083a90cd854
/src/main/resources/jooqgen/.../src/main/java/com/br/sp/posgresdocker/model/jooq/pg_catalog/routines/Float84ne.java
5c90ebd14b5f061b73243f7957302ca80ad200ac
[]
no_license
brunomathidios/PostgresqlWithDocker
13604ecb5506b947a994cbb376407ab67ba7985f
6b421c5f487f381eb79007fa8ec53da32977bed1
refs/heads/master
2020-03-22T00:54:07.750044
2018-07-02T22:20:17
2018-07-02T22:20:17
139,271,591
0
0
null
null
null
null
UTF-8
Java
false
true
2,270
java
/* * This file is generated by jOOQ. */ package com.br.sp.posgresdocker.model.jooq.pg_catalog.routines; import com.br.sp.posgresdocker.model.jooq.pg_catalog.PgCatalog; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Parameter; import org.jooq.impl.AbstractRoutine; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Float84ne extends AbstractRoutine<Boolean> { private static final long serialVersionUID = 762870749; /** * The parameter <code>pg_catalog.float84ne.RETURN_VALUE</code>. */ public static final Parameter<Boolean> RETURN_VALUE = createParameter("RETURN_VALUE", org.jooq.impl.SQLDataType.BOOLEAN, false, false); /** * The parameter <code>pg_catalog.float84ne._1</code>. */ public static final Parameter<Double> _1 = createParameter("_1", org.jooq.impl.SQLDataType.DOUBLE, false, true); /** * The parameter <code>pg_catalog.float84ne._2</code>. */ public static final Parameter<Float> _2 = createParameter("_2", org.jooq.impl.SQLDataType.REAL, false, true); /** * Create a new routine call instance */ public Float84ne() { super("float84ne", PgCatalog.PG_CATALOG, org.jooq.impl.SQLDataType.BOOLEAN); setReturnParameter(RETURN_VALUE); addInParameter(_1); addInParameter(_2); } /** * Set the <code>_1</code> parameter IN value to the routine */ public void set__1(Double value) { setValue(_1, value); } /** * Set the <code>_1</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__1(Field<Double> field) { setField(_1, field); } /** * Set the <code>_2</code> parameter IN value to the routine */ public void set__2(Float value) { setValue(_2, value); } /** * Set the <code>_2</code> parameter to the function to be used with a {@link org.jooq.Select} statement */ public void set__2(Field<Float> field) { setField(_2, field); } }
[ "brunomathidios@yahoo.com.br" ]
brunomathidios@yahoo.com.br
1bad15af3dc7a751a6a0a8eee9f4946477ec21b9
0b33c395b22e41fa2b991191ab62864808bcdf75
/app/src/main/java/com/ccee/videotool/arouter/SchemeFilterActivity.java
d406f2c654e5a56fe26f782e6c82bf8eb2f2c2de
[]
no_license
sunshaobei/VideoTool
de6cc9d45023c1ac76da677e59bfe156156345c0
65d908ee4a1a246f834a2570765517a29dd633b0
refs/heads/master
2020-04-02T09:12:04.491053
2018-11-06T08:50:57
2018-11-06T08:50:57
153,747,357
0
0
null
null
null
null
UTF-8
Java
false
false
335
java
package com.ccee.videotool.arouter; import android.app.Activity; import android.net.Uri; import android.os.Bundle; public class SchemeFilterActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Uri uri = getIntent().getData(); } }
[ "sunshaobei@foxmail.com" ]
sunshaobei@foxmail.com
c082bbe73bcd949d268b9524ac46ccd96b9be2c6
b7ccb50cc81a19d49d28dd8686251b72785e7ffb
/course/src/main/java/com/project/course/service/CourseImagesService.java
6e37dd92751804161707ecf67cb7a539d9ae8386
[]
no_license
forteach/lineEdu
022625256b483d25b4be13e6f13f1270054f36e5
88215d12f770f0969bcf907bd9fb7e3c8c67d288
refs/heads/dev
2023-03-03T20:57:26.764816
2022-06-28T08:52:33
2022-06-28T08:52:33
192,490,045
0
2
null
2023-02-22T07:30:50
2019-06-18T07:36:34
Java
UTF-8
Java
false
false
641
java
package com.project.course.service; import com.project.course.domain.CourseImages; import com.project.databank.web.vo.DataDatumVo; import java.util.List; /** * @author: zhangyy * @email: zhang10092009@hotmail.com * @date: 19-7-31 19:54 * @version: 1.0 * @description: */ public interface CourseImagesService { public void saveCourseImages(String courseId, List<DataDatumVo> dataList, String createUser, String centerAreaId); public List<CourseImages> findImagesByCourseId(String courseId, String verifyStatus); public int deleteImagesByCourseId(String courseId); void saveAll(List<CourseImages> courseImages); }
[ "zhang10092009@hotmail.com" ]
zhang10092009@hotmail.com
21d36e7a30709150a98d114b322ea874cca72bdd
a4da6a12d08e5b13a8f55cc38f8bda182cbc834a
/Test/src/comm/Node.java
b4fc51ab9e2b384b1ae977537d9a6fdaadc32f67
[]
no_license
supergirl1234/DataStructure
0e11c745ba802cf9d4092fd807dfb49dde69d351
48456b94276ba6f378f07fa4c1d408d5b14b4057
refs/heads/master
2020-06-24T04:01:29.172021
2019-10-06T14:21:19
2019-10-06T14:21:19
198,842,427
0
0
null
null
null
null
UTF-8
Java
false
false
157
java
package comm; public class Node { public char value; Node left; Node right; public Node(char value) { this.value = value; } }
[ "2547462712@qq.com" ]
2547462712@qq.com
c12c3f9f0968ce5e6c8dca20fd2681203ab0d494
a1fb01c20f2b8fe68b604622f2b193bce623b1fe
/smack-extensions/src/main/java/org/jivesoftware/smackx/xdata/XDataManager.java
ebd948d995ece871283b90de96a446ad14ca84cf
[ "Apache-2.0" ]
permissive
zhuyongbo/Smack
9593a1a345d9570dc72a78bb6502fa802bf57499
64d134052dbd39a2933e3e7b4fe6a65bfa3cc1f1
refs/heads/master
2020-12-30T19:44:36.307386
2015-03-29T10:15:32
2015-03-29T10:29:32
33,078,452
1
0
null
2015-03-29T15:37:22
2015-03-29T15:37:22
null
UTF-8
Java
false
false
3,223
java
/** * * Copyright 2014-2015 Florian Schmaus * * 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.jivesoftware.smackx.xdata; import java.util.Map; import java.util.WeakHashMap; import org.jivesoftware.smack.ConnectionCreationListener; import org.jivesoftware.smack.Manager; import org.jivesoftware.smack.SmackException.NoResponseException; import org.jivesoftware.smack.SmackException.NotConnectedException; import org.jivesoftware.smack.XMPPConnection; import org.jivesoftware.smack.XMPPConnectionRegistry; import org.jivesoftware.smack.XMPPException.XMPPErrorException; import org.jivesoftware.smackx.disco.ServiceDiscoveryManager; import org.jivesoftware.smackx.xdata.packet.DataForm; import org.jxmpp.jid.Jid; public class XDataManager extends Manager { /** * The value of {@link DataForm#NAMESPACE}. */ public static final String NAMESPACE = DataForm.NAMESPACE; static { XMPPConnectionRegistry.addConnectionCreationListener(new ConnectionCreationListener() { @Override public void connectionCreated(XMPPConnection connection) { getInstanceFor(connection); } }); } private static final Map<XMPPConnection, XDataManager> INSTANCES = new WeakHashMap<>(); /** * Get the XDataManager for the given XMPP connection. * * @param connection * @return the XDataManager */ public static synchronized XDataManager getInstanceFor(XMPPConnection connection) { XDataManager xDataManager = INSTANCES.get(connection); if (xDataManager == null) { xDataManager = new XDataManager(connection); INSTANCES.put(connection, xDataManager); } return xDataManager; } private XDataManager(XMPPConnection connection) { super(connection); ServiceDiscoveryManager serviceDiscoveryManager = ServiceDiscoveryManager.getInstanceFor(connection); serviceDiscoveryManager.addFeature(NAMESPACE); } /** * Check if the given entity supports data forms. * * @param jid the JID of the entity to check. * @return true if the entity supports data forms. * @throws NoResponseException * @throws XMPPErrorException * @throws NotConnectedException * @throws InterruptedException * @see <a href="http://xmpp.org/extensions/xep-0004.html#disco">XEP-0004: Data Forms § 6. Service Discovery</a> * @since 4.1 */ public boolean isSupported(Jid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException { return ServiceDiscoveryManager.getInstanceFor(connection()).supportsFeature(jid, NAMESPACE); } }
[ "flo@geekplace.eu" ]
flo@geekplace.eu
539931c809cfc06e5f5b1dcb42ad44fbfa1e76d1
6500848c3661afda83a024f9792bc6e2e8e8a14e
/output/com.google.android.finsky.billing.gifting.SendGiftLayout.java
9161eceb9bf05fc2e27f39dc923bbf4abfae5463
[]
no_license
enaawy/gproject
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
91cb88559c60ac741d4418658d0416f26722e789
refs/heads/master
2021-09-03T03:49:37.813805
2018-01-05T09:35:06
2018-01-05T09:35:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,006
java
package com.google.android.finsky.billing.gifting; import android.app.Activity; import android.content.Context; import android.content.res.Resources; import android.util.AttributeSet; import android.view.View; import android.widget.EditText; import android.widget.LinearLayout; import android.widget.TextView; import com.google.android.finsky.bg.h; import com.google.android.finsky.bg.s; import com.google.android.finsky.cv.a.jp; import com.google.android.finsky.frameworkviews.InputWithCharacterCounter; protected class SendGiftLayout extends LinearLayout implements com.google.android.finsky.frameworkviews.aa { public Activity a; public View b; public TextView c; public TextView d; public InputWithCharacterCounter e; SendGiftLayout(Context p0) { LinearLayout(p0); } SendGiftLayout(Context p0, AttributeSet p1) { LinearLayout(p0, p1); } public final void X_() { com.google.android.finsky.bg.s.a(this.a, this.e); } public final void a(Activity p0, com.google.android.finsky.cv.a.jp p1, int p2, int p3) { this.a = p0; if (p3 == 48) v0 = 1; else v0 = 0; if (v0 != 0) v0 = 2131558666; else v0 = com.google.android.finsky.bg.h.b(p2); this.b.setBackgroundColor(this.getResources().getColor(v0)); this.c.setText(p1.b); this.d.setText(p1.c); this.e.a(p1.d, this.getResources().getString(2131952493), p1.e, this); com.google.android.finsky.bg.s.a(this.a, (EditText)this.e.findViewById(2131755109)); } public String getMessage() { return this.e.getTextValue(); } protected void onFinishInflate() { super.onFinishInflate(); this.b = this.findViewById(2131756171); this.c = (TextView)this.findViewById(2131755114); this.d = (TextView)this.findViewById(2131756147); this.e = (InputWithCharacterCounter)this.findViewById(2131756177); } }
[ "genius.ron@gmail.com" ]
genius.ron@gmail.com
0e64a3ea2233cd439822359f94ef269b6119c063
e7818f3c8f1a86472c3060993d28f52cbde749b2
/src/ru/barsopen/plsqlconverter/ast/typed/alter_package.java
c37275799190cb07b4dda1abbc4bcab2496b59c7
[]
no_license
liuyuanyuan/plsql-pgsql-converter
a9fbc59493b26b9ec06820358617a28cf35bc31a
428c86c09f3be7ef448fe704d7fff4abc90d97e6
refs/heads/master
2020-04-07T12:16:07.250078
2018-11-27T05:56:43
2018-11-27T05:56:43
158,360,845
1
0
null
null
null
null
UTF-8
Java
false
false
3,892
java
package ru.barsopen.plsqlconverter.ast.typed; public class alter_package implements unit_statement, _baseNode { public int _line = -1; public int _col = -1; public int _tokenStartIndex = -1; public int _tokenStopIndex = -1; public _baseNode _parent = null; public _baseNode _getParent() { return _parent; } public void _setParent(_baseNode value) { _parent = value; } public void _setBaseNode(_baseNode value) { this._parent = value; } public int _getLine() { return _line; } public int _getCol() { return _col; } public int _getTokenStartIndex() { return _tokenStartIndex; } public int _getTokenStopIndex() { return _tokenStopIndex; } ru.barsopen.plsqlconverter.util.AttachedComments _comments; public void setComments(ru.barsopen.plsqlconverter.util.AttachedComments comments) { this._comments = comments; } public ru.barsopen.plsqlconverter.util.AttachedComments getAttachedComments() { return this._comments; } public void _setCol(int col) { this._col = col; } public void _setLine(int line) { this._line = line; } public java.util.List<org.antlr.runtime.tree.Tree> contents = new java.util.ArrayList<org.antlr.runtime.tree.Tree>(); public java.util.List<org.antlr.runtime.tree.Tree> get_contents() { return this.contents; } public void add_contents(org.antlr.runtime.tree.Tree value) { insert_contents(contents.size(), value); } public void insert_contents(int pos, org.antlr.runtime.tree.Tree value) { this.contents.add(pos, value); } public void remove_contents(int pos) { this.contents.remove(pos); } public void remove_contents(org.antlr.runtime.tree.Tree value) { this.remove_contents(this.contents.indexOf(value)); } public void _walk(_visitor visitor) { if (!visitor.enter(this)) { return; } for (org.antlr.runtime.tree.Tree _value: this.contents) { visitor.visit(_value); } visitor.leave(this); } public java.util.List<_baseNode> _getChildren() { java.util.List<_baseNode> result = new java.util.ArrayList<_baseNode>(); return result; } public void _replace(_baseNode child, _baseNode replacement) { throw new RuntimeException("Failed to replace node: no such node"); } public org.antlr.runtime.tree.Tree unparse() { org.antlr.runtime.CommonToken _token = new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.ALTER_PACKAGE); _token.setLine(_line); _token.setCharPositionInLine(_col); _token.setText("ALTER_PACKAGE"); org.antlr.runtime.tree.CommonTree _result = new org.antlr.runtime.tree.CommonTree(_token); if (_comments != null) { org.antlr.runtime.tree.CommonTree commentsNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT)); org.antlr.runtime.tree.CommonTree commentsBeforeNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getBefore())); org.antlr.runtime.tree.CommonTree commentsAfterNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getAfter())); org.antlr.runtime.tree.CommonTree commentsInsideNode = new org.antlr.runtime.tree.CommonTree( new org.antlr.runtime.CommonToken(ru.barsopen.plsqlconverter.PLSQLPrinter.COMMENT, _comments.getInside())); commentsNode.addChild(commentsBeforeNode); commentsNode.addChild(commentsInsideNode); commentsNode.addChild(commentsAfterNode); _result.addChild(commentsNode); } _result.setTokenStartIndex(_tokenStartIndex); _result.setTokenStopIndex(_tokenStopIndex); for (int i = 0; i < contents.size(); ++i) { _result.addChild(contents.get(i)); } return _result; } }
[ "liuyuanyuan@highgo.com" ]
liuyuanyuan@highgo.com
7e59ed0ec7517970aa3c47b01276c169ae112b4a
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
/Corpus/eclipse.jdt.core/4527.java
0c68b8e8bedce56157cadbb9a878259911becff4
[ "MIT" ]
permissive
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
d3fd21745dfddb2979e8ac262588cfdfe471899f
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
refs/heads/master
2020-03-31T15:52:01.005505
2018-10-01T23:38:50
2018-10-01T23:38:50
152,354,327
1
0
MIT
2018-10-10T02:57:02
2018-10-10T02:57:02
null
UTF-8
Java
false
false
267
java
package test0605; public class X { void foo() { int[] a = { 1 }; int lenA = a.length; int lenB = this.a.length; C c = new C(); int lenC = c.d.length; } int[] a = {}; class C { int[] d = {}; } }
[ "masudcseku@gmail.com" ]
masudcseku@gmail.com
247277b9f61e87743a310e5e04c13ced7bf434b4
7c129906b8210f21fa94c8087cda2b15fea353a8
/src/main/java/org/jetbrains/plugins/clojure/psi/stubs/elements/ClListElementType.java
c0139cffc95db5ee1b9c8b95ca19ee4a0123092a
[]
no_license
consulo/consulo-clojure
80410d476b2e2557c8ed62b889debf7d95fd74e9
c7a76e3577ddb92d0f5d1910556306e44526a42c
refs/heads/master
2021-12-31T00:51:26.412765
2021-12-23T15:16:33
2021-12-23T15:16:33
10,642,367
1
0
null
null
null
null
UTF-8
Java
false
false
1,091
java
package org.jetbrains.plugins.clojure.psi.stubs.elements; import com.intellij.lang.ASTNode; import com.intellij.psi.PsiElement; import com.intellij.psi.stubs.*; import org.jetbrains.plugins.clojure.psi.ClStubElementType; import org.jetbrains.plugins.clojure.psi.impl.list.ClListImpl; import org.jetbrains.plugins.clojure.psi.stubs.api.ClDefStub; import java.io.IOException; /** * @author peter */ public class ClListElementType extends ClStubElementType<EmptyStub, ClListImpl> { public ClListElementType() { super("list"); } public void serialize(EmptyStub stub, StubOutputStream dataStream) throws IOException { } public EmptyStub deserialize(StubInputStream dataStream, StubElement parentStub) throws IOException { return new EmptyStub(parentStub, this); } public PsiElement createElement(ASTNode node) { return new ClListImpl(node); } public ClListImpl createPsi(EmptyStub stub) { return new ClListImpl(stub, this); } public EmptyStub createStub(ClListImpl psi, StubElement parentStub) { return new EmptyStub(parentStub, this); } }
[ "peter@jetbrains.com" ]
peter@jetbrains.com
22290bcaa3e86bb5f886014e32d6c81afdeb372f
d3875548967ee170a5e54bb20bdc6da2884d76a4
/src/main/java/com/db117/adminstaging/modules/sys/entity/SysUserRole.java
69a59b59c64e7d89b6024b43cef31f4ed4b7043a
[]
no_license
db117/admin-staging
abcdbdc62194c86caedb8d990a4d7b9a1c35b109
8b27bd078aae338ef6d6ce68eb520912c72552dd
refs/heads/master
2020-03-28T11:03:00.440701
2018-05-03T14:23:57
2018-05-03T14:23:57
148,172,361
0
0
null
null
null
null
UTF-8
Java
false
false
578
java
package com.db117.adminstaging.modules.sys.entity; import com.db117.adminstaging.common.base.BaseEntity; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; /** * <p> * 用户-角色 * </p> * * @author db117 * @since 2018-04-16 */ @Data @EqualsAndHashCode(callSuper = true) @Accessors(chain = true) public class SysUserRole extends BaseEntity { private static final long serialVersionUID = 1L; /** * 用户编号 */ private String userId; /** * 角色编号 */ private String roleId; }
[ "z351622948@163.com" ]
z351622948@163.com
f1561daa8ea9fb555464d43ac5e95cb2d9ed4b26
c8073dbee31a9f30ab94f05ee9831e63b740d9cf
/src/org/kapott/hbci/tools/UpdateBLZProperties.java
ddb7f8212a4afa63602f847d62aa66601339dcb4
[]
no_license
maxemmert/Studiarbeit_HBCIPatched
9d12699263ee7404bea93ac0435404958f954b0b
ad2d37404d8b5fee4d444dc079d6f31a6a364f93
refs/heads/master
2021-01-19T13:46:06.398801
2015-03-18T10:25:37
2015-03-18T10:25:37
32,451,338
0
0
null
null
null
null
UTF-8
Java
false
false
5,140
java
/********************************************************************** * $Source: /cvsroot/hibiscus/hbci4java/src/org/kapott/hbci/tools/UpdateBLZProperties.java,v $ * $Revision: 1.1 $ * $Date: 2012/04/16 22:24:40 $ * $Author: willuhn $ * * Copyright (c) by willuhn - software & services * All rights reserved * **********************************************************************/ package org.kapott.hbci.tools; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.InputStreamReader; import java.io.OutputStreamWriter; import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Util-Klasse, welche die FinTS-Bankenliste im CSV-Format (kann von * http://www.hbci-zka.de/institute/institut_hersteller.htm bezogen werden) * parst, un die aktualisierten Daten in die blz.properties von HBCI4Java * uebernimmt. */ public class UpdateBLZProperties { private final static String ENCODING = "iso-8859-1"; /** * @param args * 1. Pfad/Dateiname zu "fints_institute.csv". * 2. Pfad/Dateiname zu "blz.properties". * 3. Pfad/Dateiname zur neuen "blz.properties". * @throws Exception */ public static void main(String[] args) throws Exception { if (args == null || args.length != 3) { System.err.println("benoetigte Parameter: 1) fints_institute.csv, 2) blz.properties, 3) zu schreibende blz.properties"); System.exit(1); } BufferedReader f1 = null; BufferedReader f2 = null; BufferedWriter f3 = null; String line = null; try { Map<String,String> lookup = new HashMap<String,String>(); ////////////////////////////////////////////////////////////////////////// // fints_institute.csv lesen f1 = new BufferedReader(new InputStreamReader(new FileInputStream(args[0]),ENCODING)); int count = 0; while ((line = f1.readLine()) != null) { if (++count <= 1) continue; // erste Zeile ueberspringen if (line.trim().length() == 0) continue; // leere Zeile List<String> values = Arrays.asList(line.split(";")); if (values.size() <= 20) continue; // Bank hat keine PIN/TAN-URL String blz = values.get(1).trim(); if (blz.length() == 0) continue; // Die Zeile enthaelt keine BLZ if (lookup.get(blz) != null) continue; // die Zeile haben wir schon String url = values.get(20).trim(); if (url.length() == 0) continue; // keine URL gefunden lookup.put(blz,url); } // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // blz.properties lesen und abgleichen f2 = new BufferedReader(new InputStreamReader(new FileInputStream(args[1]),ENCODING)); f3 = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(args[2]),ENCODING)); while ((line = f2.readLine()) != null) { String[] values = line.split("="); Line current = new Line(values[0],values[1]); String url = lookup.get(current.blz); // URL uebernehmen current.updateUrl(url); // Neue Zeile schreiben f3.write(current.toString()); f3.newLine(); } // ////////////////////////////////////////////////////////////////////////// } finally { if (f1 != null) f1.close(); if (f2 != null) f2.close(); if (f3 != null) f3.close(); } } /** * Implementiert eine einzelne Zeile der blz.properties */ private static class Line { private String blz = null; private String[] values = new String[9]; /** * ct. * @param blz die BLZ. * @param line die Zeile aus der blz.properties */ private Line(String blz,String line) { this.blz = blz; String[] s = line.split("\\|"); System.arraycopy(s,0,this.values,0,s.length); } /** * Speichert die neue URL, wenn vorher keine da war oder eine andere. * @param url die neue URL. */ private void updateUrl(String url) { // Keine neue URL if (url == null || url.length() == 0) return; String current = this.values[5]; current = current != null ? current.trim() : ""; if (!current.equals(url)) { System.out.println(blz + ": URL \"" + current + "\" -> \"" + url + "\""); this.values[5] = url; } } /** * Wandelt die Zeile wieder zurueck in einen String. * @see java.lang.Object#toString() */ @Override public String toString() { StringBuffer sb = new StringBuffer(); sb.append(this.blz); sb.append("="); for (int i=0;i<this.values.length;++i) { if (i > 0) sb.append("|"); String s = this.values[i]; if (s != null) sb.append(s); } return sb.toString(); } } }
[ "max_emmert@web.de" ]
max_emmert@web.de
d9b791089e7292d344c3285c47e865cc0bf01380
a1c97755d0a71f78ee43440d35112fce3fce72ad
/src/main/java/com/gargoylesoftware/htmlunit/html/HtmlMeta.java
517ed7ba996f2a9700a2286d9af8c04f9255f728
[ "Apache-2.0" ]
permissive
aslakhellesoy/htmlunit
3611663a7e8ffb703a5a6ba58e3846081aa34199
b8d350e91d3482cf12df9167a31fc8a310ca149f
refs/heads/master
2021-01-19T15:29:04.886414
2011-02-08T21:03:15
2011-02-08T21:03:15
1,324,920
7
2
null
null
null
null
UTF-8
Java
false
false
5,280
java
/* * Copyright (c) 2002-2011 Gargoyle Software Inc. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.html; import java.net.URL; import java.util.Date; import java.util.Map; import java.util.regex.Pattern; import org.apache.commons.lang.StringUtils; import com.gargoylesoftware.htmlunit.SgmlPage; import com.gargoylesoftware.htmlunit.util.Cookie; /** * Wrapper for the HTML element "meta". * * @version $Revision: 6204 $ * @author <a href="mailto:mbowler@GargoyleSoftware.com">Mike Bowler</a> * @author <a href="mailto:cse@dynabean.de">Christian Sell</a> * @author Ahmed Ashour */ public class HtmlMeta extends HtmlElement { private static final Pattern COOKIES_SPLIT_PATTERN = Pattern.compile("\\s*;\\s*"); /** The HTML tag represented by this element. */ public static final String TAG_NAME = "meta"; /** * Creates an instance of HtmlMeta * * @param namespaceURI the URI that identifies an XML namespace * @param qualifiedName the qualified name of the element type to instantiate * @param page the HtmlPage that contains this element * @param attributes the initial attributes */ HtmlMeta(final String namespaceURI, final String qualifiedName, final SgmlPage page, final Map<String, DomAttr> attributes) { super(namespaceURI, qualifiedName, page, attributes); if ("set-cookie".equalsIgnoreCase(getHttpEquivAttribute())) { performSetCookie(); } } /** * Handles the cookies specified in meta tags, * like <tt>&lt;meta http-equiv='set-cookie' content='webm=none; path=/;'&gt;</tt>. */ protected void performSetCookie() { final String[] parts = COOKIES_SPLIT_PATTERN.split(getContentAttribute(), 0); final String name = StringUtils.substringBefore(parts[0], "="); final String value = StringUtils.substringAfter(parts[0], "="); final URL url = getPage().getWebResponse().getWebRequest().getUrl(); final String host = url.getHost(); final boolean secure = "https".equals(url.getProtocol()); String path = null; Date expires = null; for (int i = 1; i < parts.length; i++) { final String partName = StringUtils.substringBefore(parts[i], "=").trim().toLowerCase(); final String partValue = StringUtils.substringAfter(parts[i], "=").trim(); if ("path".equals(partName)) { path = partValue; } else if ("expires".equals(partName)) { expires = com.gargoylesoftware.htmlunit.util.StringUtils.parseHttpDate(partValue); } else { notifyIncorrectness("set-cookie http-equiv meta tag: unknown attribute '" + partName + "'."); } } final Cookie cookie = new Cookie(host, name, value, path, expires, secure); getPage().getWebClient().getCookieManager().addCookie(cookie); } /** * {@inheritDoc} */ @Override public boolean mayBeDisplayed() { return false; } /** * Returns the value of the attribute "http-equiv". Refer to the * <a href='http://www.w3.org/TR/html401/'>HTML 4.01</a> * documentation for details on the use of this attribute. * * @return the value of the attribute "http-equiv" * or an empty string if that attribute isn't defined. */ public final String getHttpEquivAttribute() { return getAttribute("http-equiv"); } /** * Returns the value of the attribute "name". Refer to the * <a href='http://www.w3.org/TR/html401/'>HTML 4.01</a> * documentation for details on the use of this attribute. * * @return the value of the attribute "name" * or an empty string if that attribute isn't defined. */ public final String getNameAttribute() { return getAttribute("name"); } /** * Returns the value of the attribute "content". Refer to the * <a href='http://www.w3.org/TR/html401/'>HTML 4.01</a> * documentation for details on the use of this attribute. * * @return the value of the attribute "content" * or an empty string if that attribute isn't defined. */ public final String getContentAttribute() { return getAttribute("content"); } /** * Returns the value of the attribute "scheme". Refer to the * <a href='http://www.w3.org/TR/html401/'>HTML 4.01</a> * documentation for details on the use of this attribute. * * @return the value of the attribute "scheme" * or an empty string if that attribute isn't defined. */ public final String getSchemeAttribute() { return getAttribute("scheme"); } }
[ "aslak.hellesoy@gmail.com" ]
aslak.hellesoy@gmail.com
0e2f18be1ec29df8a2ab5b9a1e6378da183ef0d0
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
/subject_systems/Struts2/src/struts-2.3.32/src/plugins/dojo/src/test/java/org/apache/struts2/dojo/views/jsp/ui/TabbedPanelTagTest.java
9138ba20242531288919ab443a276c2cf307820e
[]
no_license
MarceloLaser/arcade_console_test_resources
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
31447aabd735514650e6b2d1a3fbaf86e78242fc
refs/heads/master
2020-09-22T08:00:42.216653
2019-12-01T21:51:05
2019-12-01T21:51:05
225,093,382
1
2
null
null
null
null
UTF-8
Java
false
false
129
java
version https://git-lfs.github.com/spec/v1 oid sha256:9e5e94cc9f85cb57bc2f25dff8676f4d0dfea7d6942dc47f49e2236e55a21363 size 2091
[ "marcelo.laser@gmail.com" ]
marcelo.laser@gmail.com
103c4c76672dbef1d3f37f4b0d6edd863f0b7853
c37d2a36312534a55c319b19b61060649c7c862c
/app/src/main/java/com/spongycastle/cms/CMSTypedStream.java
3a8e7396abae155c430e0e757bead57547546a54
[ "MIT", "LicenseRef-scancode-unknown-license-reference" ]
permissive
trwinowiecki/AndroidTexting
f5626ad91a07ea7b3cd3ee75893abf8b1fe7154f
27e84a420b80054e676c390b898705856364b340
refs/heads/master
2020-12-30T23:10:17.542572
2017-02-01T01:46:13
2017-02-01T01:46:13
80,580,124
0
0
null
null
null
null
UTF-8
Java
false
false
2,046
java
package com.spongycastle.cms; import java.io.BufferedInputStream; import java.io.FilterInputStream; import java.io.IOException; import java.io.InputStream; import com.spongycastle.asn1.ASN1ObjectIdentifier; import com.spongycastle.asn1.pkcs.PKCSObjectIdentifiers; import com.spongycastle.util.io.Streams; public class CMSTypedStream { private static final int BUF_SIZ = 32 * 1024; private final ASN1ObjectIdentifier _oid; protected InputStream _in; public CMSTypedStream( InputStream in) { this(PKCSObjectIdentifiers.data.getId(), in, BUF_SIZ); } public CMSTypedStream( String oid, InputStream in) { this(new ASN1ObjectIdentifier(oid), in, BUF_SIZ); } public CMSTypedStream( String oid, InputStream in, int bufSize) { this(new ASN1ObjectIdentifier(oid), in, bufSize); } public CMSTypedStream( ASN1ObjectIdentifier oid, InputStream in) { this(oid, in, BUF_SIZ); } public CMSTypedStream( ASN1ObjectIdentifier oid, InputStream in, int bufSize) { _oid = oid; _in = new FullReaderStream(new BufferedInputStream(in, bufSize)); } protected CMSTypedStream( ASN1ObjectIdentifier oid) { _oid = oid; } public ASN1ObjectIdentifier getContentType() { return _oid; } public InputStream getContentStream() { return _in; } public void drain() throws IOException { Streams.drain(_in); _in.close(); } private static class FullReaderStream extends FilterInputStream { FullReaderStream(InputStream in) { super(in); } public int read(byte[] buf, int off, int len) throws IOException { int totalRead = Streams.readFully(super.in, buf, off, len); return totalRead > 0 ? totalRead : -1; } } }
[ "trw0511@gmail.com" ]
trw0511@gmail.com
2252f47a1c5d52f4a0cdb77be2615cc7b4570c3c
2c73bc2c7a4427758ff98d7362f0aabcf808731e
/libs/ImageLib/src/com/kit/imagelib/photoselector/OnImageSelectedCountListener.java
4705a51f4123edd37d629371170a941690effce0
[ "Apache-2.0" ]
permissive
MRTangwin8/BigApp_Discuz_Android
3349052a23e7775b26cc88398c9a989b5f3b5f10
6a9a66b66ca9387a70d11128b54f02745b1f4283
refs/heads/master
2020-04-04T09:28:15.558602
2018-11-02T05:45:36
2018-11-02T05:45:36
155,819,452
0
0
Apache-2.0
2018-11-02T05:43:41
2018-11-02T05:43:41
null
UTF-8
Java
false
false
131
java
package com.kit.imagelib.photoselector; public interface OnImageSelectedCountListener { int getImageSelectedCount(); }
[ "bigapp@yeah.net" ]
bigapp@yeah.net
3b73648c59ffcaa690d7ca0284e3537ea09bc904
bebab5e1a8c2115316c1d9dce098a8900f1bf294
/ch11/src/verify/Ex9.java
9e6d56cbe091e141577dad30d49c1706751d8ed1
[]
no_license
unisung/kangnam4
aa1464a671c259c52102cc4e1df1f1a8686476a9
7fefaa87660f3864fb711ceedc3beb7ce2f9ac0a
refs/heads/main
2023-08-25T03:35:22.199409
2021-11-03T00:27:17
2021-11-03T00:27:17
407,352,343
2
7
null
null
null
null
UHC
Java
false
false
770
java
package verify; public class Ex9 { public static void main(String[] args) { System.out.println("다음 코드는 1부터 100까지의 숫지를 통 문자열로 만들기 위해서 += 연산자를 이용해서 100번\r\n" + "반복하고 있습니다. 이것은 곧 100개 이상의 String 객체를 생성하는 결과를 만들기 때문에 좋은 코\r\n" + "드라고 볼 수 없습니다. StringBuilder를 사용해서 좀 더 효율적인 코드로 개선시켜보세요."); String str=""; for(int i=1;i<=100;i++) str+=i; System.out.println(str); //개선 코드 StringBuilder sb = new StringBuilder(); for(int i=1;i<=100;i++) sb.append(i); str=sb.toString(); System.out.println(str); } }
[ "user@DESKTOP-S6ON2JF" ]
user@DESKTOP-S6ON2JF