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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9d55c2d4920ab810aa072e6fab282bd10c67dee1
|
e2d078c66ba9c4c91072849ed98f36e5e66063cb
|
/dzjs-master/app/src/main/java/com/wongxd/partymanage/partycontact/bean/ContactDetailBean.java
|
202e6f9784afe5c30b25e07fd6ac499482ed3474
|
[] |
no_license
|
NamedJack/DZ
|
9820a0b3a4c74ebd677556677e65290ba7ad66a8
|
48356dc29ad973fe98a64fb9a25b268d98618e83
|
refs/heads/master
| 2021-01-01T16:51:53.419758
| 2017-08-03T08:54:23
| 2017-08-03T08:54:23
| 97,933,543
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,643
|
java
|
package com.wongxd.partymanage.partycontact.bean;
/**
* Created by zyj on 2017/7/31.
*/
public class ContactDetailBean {
/**
* msg : 成功
* code : 100
* data : {"id":17,"userId":1,"time":"2017-07-11","target":"Hhhhhhh","helpRecord":"Hhhhh","implement":"Hhhhh","unitId":1,"unitPid":2}
*/
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 : 17
* userId : 1
* time : 2017-07-11
* target : Hhhhhhh
* helpRecord : Hhhhh
* implement : Hhhhh
* unitId : 1
* unitPid : 2
*/
private String id;
private String userId;
private String time;
private String target;
private String helpRecord;
private String implement;
private String unitId;
private String unitPid;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
public String getTime() {
return time;
}
public void setTime(String time) {
this.time = time;
}
public String getTarget() {
return target;
}
public void setTarget(String target) {
this.target = target;
}
public String getHelpRecord() {
return helpRecord;
}
public void setHelpRecord(String helpRecord) {
this.helpRecord = helpRecord;
}
public String getImplement() {
return implement;
}
public void setImplement(String implement) {
this.implement = implement;
}
public String getUnitId() {
return unitId;
}
public void setUnitId(String unitId) {
this.unitId = unitId;
}
public String getUnitPid() {
return unitPid;
}
public void setUnitPid(String unitPid) {
this.unitPid = unitPid;
}
}
}
|
[
"1033675097@qq.com"
] |
1033675097@qq.com
|
85ecab78993f4d48dd337c9e5c262e14224dc057
|
84e064c973c0cc0d23ce7d491d5b047314fa53e5
|
/latest9.4/hej/net/sf/saxon/tree/tiny/TinyBuilderCondensed.java
|
7b92a964df32e967894bec8e573039df2360bd5d
|
[] |
no_license
|
orbeon/saxon-he
|
83fedc08151405b5226839115df609375a183446
|
250c5839e31eec97c90c5c942ee2753117d5aa02
|
refs/heads/master
| 2022-12-30T03:30:31.383330
| 2020-10-16T15:21:05
| 2020-10-16T15:21:05
| 304,712,257
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,905
|
java
|
package net.sf.saxon.tree.tiny;
import net.sf.saxon.event.PipelineConfiguration;
import net.sf.saxon.expr.sort.IntHashMap;
import net.sf.saxon.om.NodeName;
import net.sf.saxon.trans.XPathException;
import net.sf.saxon.type.SimpleType;
import net.sf.saxon.type.Type;
/**
* Variant of the TinyBuilder to create a tiny tree in which multiple text nodes or attribute
* nodes sharing the same string value economize on space by only holding the value once.
*/
public class TinyBuilderCondensed extends TinyBuilder {
public TinyBuilderCondensed(PipelineConfiguration pipe) {
super(pipe);
}
// Keep a map from the hashcode of the string (calculated within this class) to the list
// of node numbers of text nodes having that hashcode
// Note from the specification of CharSequence:
// "It is therefore inappropriate to use arbitrary <tt>CharSequence</tt> instances as elements in a set or as keys in
// a map." We therefore take special care over the design of the map.
// We rely on the fact that all Saxon implementations of CharSequence have a hashCode() that is compatible with String.
// And we don't use equals() unless both CharSequences are of the same kind.
public IntHashMap<int[]> textValues = new IntHashMap<int[]>(100);
public void endElement() throws XPathException {
// When ending an element, consider whether the just-completed text node can be commoned-up with
// any other text nodes. (Don't bother if its more than 256 chars, as it's then likely to be unique)
// We do this at endElement() time because we need to make sure that adjacent text nodes are concatenated first.
TinyTree tree = getTree();
int n = tree.numberOfNodes-1;
if (tree.nodeKind[n] == Type.TEXT && tree.depth[n] == getCurrentDepth() && (tree.beta[n] - tree.alpha[n] <= 256)) {
CharSequence chars = TinyTextImpl.getStringValue(tree, n);
int hash = chars.hashCode();
int[] nodes = textValues.get(hash);
if (nodes != null) {
int used = nodes[0];
for (int i=1; i<used; i++) {
int nodeNr = nodes[i];
if (nodeNr == 0) {
break;
} else if (isEqual(chars, TinyTextImpl.getStringValue(tree, nodeNr))) {
// the latest text node is equal to some previous text node
int length = tree.alpha[n];
tree.alpha[n] = tree.alpha[nodeNr];
tree.beta[n] = tree.beta[nodeNr];
tree.getCharacterBuffer().setLength(length);
break;
}
}
} else {
nodes = new int[4];
nodes[0] = 1;
textValues.put(hash, nodes);
}
if (nodes[0] + 1 > nodes.length) {
int[] n2 = new int[nodes.length*2];
System.arraycopy(nodes, 0, n2, 0, nodes[0]);
textValues.put(hash, n2);
nodes = n2;
}
nodes[nodes[0]++] = n;
}
super.endElement();
}
/**
* For attribute nodes, the commoning-up of stored values is achieved simply by calling intern() on the
* string value of the attribute.
*/
public void attribute(/*@NotNull*/ NodeName nameCode, SimpleType typeCode, CharSequence value, int locationId, int properties) throws XPathException {
super.attribute(nameCode, typeCode, value.toString().intern(), locationId, properties);
}
/**
* Test whether two CharSequences contain the same characters
* @param a the first CharSequence
* @param b the second CharSequence
* @return true if a and b contain the same characters
*/
private static boolean isEqual(CharSequence a, /*@NotNull*/ CharSequence b) {
if (a.getClass() == b.getClass()) {
return a.equals(b);
} else {
return a.toString().equals(b.toString());
}
}
}
//
// The contents of this file are subject to the Mozilla Public License Version 1.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.mozilla.org/MPL/
//
// Software distributed under the License is distributed on an "AS IS" basis,
// WITHOUT WARRANTY OF ANY KIND, either express or implied.
// See the License for the specific language governing rights and limitations under the License.
//
// The Original Code is: all this file
//
// The Initial Developer of the Original Code is Saxonica Limited.
// Portions created by ___ are Copyright (C) ___. All rights reserved.
//
// Contributor(s):
//
|
[
"oneil@saxonica.com"
] |
oneil@saxonica.com
|
861ce9b298e6e328ed766713ddbf9446d51c60aa
|
2b675fd33d8481c88409b2dcaff55500d86efaaa
|
/infinispan/core/src/main/java/org/infinispan/factories/AbstractNamedCacheComponentFactory.java
|
19d1d3d649deeda514f577d1e8bfbf6afb0843c4
|
[
"Apache-2.0",
"LGPL-2.0-or-later"
] |
permissive
|
nmldiegues/stibt
|
d3d761464aaf97e41dcc9cc1d43f0e3234a1269b
|
1ee662b7d4ed1f80e6092c22e235a3c994d1d393
|
refs/heads/master
| 2022-12-21T23:08:11.452962
| 2015-09-30T16:01:43
| 2015-09-30T16:01:43
| 42,459,902
| 0
| 2
|
Apache-2.0
| 2022-12-13T19:15:31
| 2015-09-14T16:02:52
|
Java
|
UTF-8
|
Java
| false
| false
| 1,839
|
java
|
/*
* JBoss, Home of Professional Open Source
* Copyright 2009 Red Hat Inc. and/or its affiliates and other
* contributors as indicated by the @author tags. All rights reserved.
* See the copyright.txt in the distribution for a full listing of
* individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.infinispan.factories;
import org.infinispan.configuration.cache.Configuration;
import org.infinispan.factories.annotations.Inject;
import org.infinispan.factories.scopes.Scope;
import org.infinispan.factories.scopes.Scopes;
/**
* A component factory for creating components scoped per-cache.
*
* @author Manik Surtani
* @since 4.0
*/
@Scope(Scopes.NAMED_CACHE)
public abstract class AbstractNamedCacheComponentFactory extends AbstractComponentFactory {
protected Configuration configuration;
protected ComponentRegistry componentRegistry;
@Inject
private void injectGlobalDependencies(Configuration configuration, ComponentRegistry componentRegistry) {
this.componentRegistry = componentRegistry;
this.configuration = configuration;
}
}
|
[
"nmld@ist.utl.pt"
] |
nmld@ist.utl.pt
|
9659a05c6857c8b6d636f55f40c8a859907583b4
|
b8e4e9ce9b74559d692401a4c9fa81cbb2a49557
|
/soap-web-service/src/main/java/sketelon/service/api/ITicketService.java
|
edb07b4d0381b1d1b6d0cc8f63f65fc4bac1f45c
|
[] |
no_license
|
bulidWorld/service
|
69389512b7425c97eb4be6ae3644c030db8912e6
|
0e002b0f0ab63572587542ff8e753e3c271cd1d7
|
refs/heads/master
| 2021-01-01T04:23:14.995675
| 2017-12-04T00:50:56
| 2017-12-04T00:50:56
| 97,167,352
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 230
|
java
|
package sketelon.service.api;
import sketelon.entity.Ticket;
import java.util.List;
/**
* Created by Administrator on 2017/7/15.
*/
public interface ITicketService {
Ticket getTicket();
List<Ticket> listTickets();
}
|
[
"782213745@qq.com"
] |
782213745@qq.com
|
28e894415ba67002b977ffa429bd0581d10f3fb8
|
10e1fe4940718d045f980577b82dd427315153e0
|
/src/myjava/patterns/pattern_decorator/starbuzzWithSizes/StarbuzzCoffee.java
|
4d149e215880dca0fedfb2cdc6bce7c7d4b26c20
|
[] |
no_license
|
ValenbergHar/G-JD1-2019-10-01_ValenbergHar
|
6b693f08becdf624b235170712e552a4ff148ac3
|
bff38b21a10594cdfa7a719c216c04614cc01ac3
|
refs/heads/master
| 2022-12-22T12:10:22.999080
| 2020-10-20T21:02:01
| 2020-10-20T21:02:01
| 212,853,204
| 0
| 1
| null | 2022-12-16T15:42:29
| 2019-10-04T16:00:20
|
Java
|
UTF-8
|
Java
| false
| false
| 881
|
java
|
package patterns.pattern_decorator.starbuzzWithSizes;
import patterns.pattern_decorator.starbuzzWithSizes.Beverage.Size;
public class StarbuzzCoffee {
public static void main(String args[]) {
Beverage beverage = new Espresso();
System.out.println(beverage.getDescription()
+ " $" + String.format("%.2f", beverage.cost()));
Beverage beverage2 = new DarkRoast();
beverage2 = new Mocha(beverage2);
beverage2 = new Mocha(beverage2);
beverage2 = new Whip(beverage2);
System.out.println(beverage2.getDescription()
+ " $" + String.format("%.2f", beverage2.cost()));
Beverage beverage3 = new HouseBlend();
beverage3.setSize(Size.VENTI);
beverage3 = new Soy(beverage3);
beverage3 = new Mocha(beverage3);
beverage3 = new Whip(beverage3);
System.out.println(beverage3.getDescription()
+ " $" + String.format("%.2f", beverage3.cost()));
}
}
|
[
"maskevich.valeri@gmail.com"
] |
maskevich.valeri@gmail.com
|
d39fa54a11981c61212b36d88729a8d8cf8044fa
|
6f36fc4a0f9c680553f8dd64c5df55c403f8f2ed
|
/src/main/java/it/csi/siac/siacbilser/business/service/primanota/movimento/ImpegnoMovimentoHandler.java
|
a72ad656cc5ef4913ae3564b4eb3e022fe8516e6
|
[] |
no_license
|
unica-open/siacbilser
|
b46b19fd382f119ec19e4e842c6a46f9a97254e2
|
7de24065c365564b71378ce9da320b0546474130
|
refs/heads/master
| 2021-01-06T13:25:34.712460
| 2020-03-04T08:44:26
| 2020-03-04T08:44:26
| 241,339,144
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,348
|
java
|
/*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
package it.csi.siac.siacbilser.business.service.primanota.movimento;
import java.math.BigDecimal;
import java.util.List;
import it.csi.siac.siacbilser.business.service.base.ServiceExecutor;
import it.csi.siac.siacbilser.integration.dad.SoggettoDad;
import it.csi.siac.siacbilser.integration.dao.SiacTMovgestTRepository;
import it.csi.siac.siacbilser.integration.entity.enumeration.SiacDMovgestTsDetTipoEnum;
import it.csi.siac.siacbilser.model.Capitolo;
import it.csi.siac.siacbilser.model.CapitoloUscitaGestione;
import it.csi.siac.siaccommon.util.log.LogUtil;
import it.csi.siac.siaccommonser.business.service.base.exception.BusinessException;
import it.csi.siac.siaccorser.model.Bilancio;
import it.csi.siac.siaccorser.model.Ente;
import it.csi.siac.siaccorser.model.Entita;
import it.csi.siac.siaccorser.model.Richiedente;
import it.csi.siac.siaccorser.model.errore.ErroreCore;
import it.csi.siac.siacfinser.model.Impegno;
import it.csi.siac.siacfinser.model.soggetto.Soggetto;
import it.csi.siac.siacgenser.model.MovimentoDettaglio;
import it.csi.siac.siacgenser.model.MovimentoEP;
import it.csi.siac.siacgenser.model.OperazioneSegnoConto;
import it.csi.siac.siacgenser.model.RegistrazioneMovFin;
/**
* ImpegnoMovimentoHandler.
*
* @author Domenico
*/
public class ImpegnoMovimentoHandler extends MovimentoHandler<Impegno> {
private LogUtil log = new LogUtil(this.getClass());
private SiacTMovgestTRepository siacTMovgestTRepository;
private SoggettoDad soggettoDad;
public ImpegnoMovimentoHandler(ServiceExecutor serviceExecutor, Richiedente richiedente, Ente ente, Bilancio bilancio) {
//istanzio i dati comuni
super(serviceExecutor, richiedente, ente, bilancio);
//istanzio il repository necessario per ottenere i dati del movgest
this.siacTMovgestTRepository = serviceExecutor.getAppCtx().getBean(SiacTMovgestTRepository.class);
this.soggettoDad = serviceExecutor.getAppCtx().getBean(SoggettoDad.class);
}
@Override
public void caricaMovimento(RegistrazioneMovFin registrazioneMovFin) {
Impegno impegno = (Impegno)registrazioneMovFin.getMovimento();
//SIAC-5008: per l'evento inserimento si dovrebbe prendere l'importo dell'impegno/accertamento 'iniziale' e non l'attuale, perche' quest'ultimo risulta essere gia' decurtato delle modifiche.
BigDecimal importoIniziale = siacTMovgestTRepository.findImportoByMovgestId(impegno.getUid(), SiacDMovgestTsDetTipoEnum.Iniziale.getCodice());
impegno.setImportoIniziale(importoIniziale);
// SIAC-5605
if(impegno.getSoggetto() == null) {
// Carico il soggetto per tutelarmi
Soggetto soggetto = soggettoDad.findSoggettoByIdMovimentoGestione(impegno.getUid());
// Il soggetto potrebbe essere null. Ignoro
impegno.setSoggetto(soggetto);
}
}
@Override
public void caricaCapitolo(RegistrazioneMovFin registrazioneMovFin){
Impegno impegno = (Impegno)registrazioneMovFin.getMovimento();
if(impegno.getCapitoloUscitaGestione() != null && impegno.getCapitoloUscitaGestione().getUid() != 0){
//l'impegno non ha nessun capitolo associato
return;
}
int idCapitolo = siacTMovgestTRepository.findBilElemIdByMovgestId(impegno.getUid());
CapitoloUscitaGestione capitoloUscitaGestione = new CapitoloUscitaGestione();
capitoloUscitaGestione.setUid(idCapitolo);
impegno.setCapitoloUscitaGestione(capitoloUscitaGestione);
}
@Override
public void inizializzaDatiMovimenti(List<RegistrazioneMovFin> registrazioniMovFin) {
//TODO Verificare se servono dei dati in più per l'impegno e caricarli qui se necessario!
}
@Override
public void impostaImportiListaMovimentiDettaglio(MovimentoEP movimentoEP) {
final String methodName = "impostaImportiListaMovimentiDettaglio";
Impegno impegno = (Impegno)movimentoEP.getRegistrazioneMovFin().getMovimento();
List<MovimentoDettaglio> listaMovimentoDettaglio = movimentoEP.getListaMovimentoDettaglio();
//controllo che esistano due dettagli
if(listaMovimentoDettaglio.size()!=2){
log.info(methodName, "inserimento automatico PrimaNota Integrata abbandonato. Per gli Impegni viene gestito solo il caso in cui ho 2 conti uno in dare ed uno in avere. In questo caso non ho 2 conti!");
throw new BusinessException(ErroreCore.OPERAZIONE_ABBANDONATA.getErrore("inserimento automatico PrimaNota Integrata"));
}
//di default, l'importo di ciascun movimento dettaglio e' pari all'importo del movimento
for(MovimentoDettaglio movimentoDettaglio : listaMovimentoDettaglio){
if(OperazioneSegnoConto.DARE.equals(movimentoDettaglio.getSegno())){
movimentoDettaglio.setImporto(impegno.getImportoIniziale());
} else if (OperazioneSegnoConto.AVERE.equals(movimentoDettaglio.getSegno())){
movimentoDettaglio.setImporto(impegno.getImportoIniziale());
}
}
}
@Override
public String ottieniDescrizionePrimaNota(RegistrazioneMovFin registrazioneMovFin) {
Entita movimento = registrazioneMovFin.getMovimento();
Impegno impegno = (Impegno)movimento;
String descrizione = impegno.getDescrizione() != null ? impegno.getDescrizione() : "";
return String.format("Imp %s %s", impegno.getNumero(), descrizione);
}
@Override
public Soggetto getSoggetto(RegistrazioneMovFin registrazioneMovFin) {
Entita movimento = registrazioneMovFin.getMovimento();
Impegno impegno = (Impegno) movimento;
return impegno.getSoggetto();
}
@Override
public String ottieniDescrizioneMovimentoEP(RegistrazioneMovFin registrazioneMovFin) {
Entita movimento = registrazioneMovFin.getMovimento();
Impegno impegno = (Impegno) movimento;
return "MOVIMENTO ASSOCIATO AD IMPEGNO " + impegno.getDescrizione();
}
@Override
public Capitolo<?, ?> getCapitolo(RegistrazioneMovFin registrazioneMovFin) {
Entita movimento = registrazioneMovFin.getMovimento();
Impegno impegno = (Impegno) movimento;
return impegno.getCapitoloUscitaGestione();
}
@Override
public BigDecimal getImportoMovimento(RegistrazioneMovFin registrazioneMovFin) {
Impegno impegno = (Impegno)registrazioneMovFin.getMovimento();
//SIAC-5008: per l'evento inserimento si dovrebbe prendere l'importo dell'impegno/accertamento 'iniziale' e non l'attuale, perche' quest'ultimo risulta essere gia' decurtato delle modifiche.
return impegno.getImportoIniziale();
}
}
|
[
"barbara.malano@csi.it"
] |
barbara.malano@csi.it
|
eaf8eed43f3c6fda3ee3df900cb6d6ed0954452c
|
0529524c95045b3232f6553d18a7fef5a059545e
|
/app/src/androidTest/java/TestCase_5F446835EE904998BAF1FD9C9C4F9219DE537481D1AFAFBA463CC4DD099D6D5F_496426323.java
|
d9f2b875b9760a1640719598d89837f4b874d43d
|
[] |
no_license
|
sunxiaobiu/BasicUnitAndroidTest
|
432aa3e10f6a1ef5d674f269db50e2f1faad2096
|
fed24f163d21408ef88588b8eaf7ce60d1809931
|
refs/heads/main
| 2023-02-11T21:02:03.784493
| 2021-01-03T10:07:07
| 2021-01-03T10:07:07
| 322,577,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 327
|
java
|
import androidx.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
@RunWith(AndroidJUnit4.class)
public class TestCase_5F446835EE904998BAF1FD9C9C4F9219DE537481D1AFAFBA463CC4DD099D6D5F_496426323 {
@Test
public void testCase() throws Exception {
// $FF: Couldn't be decompiled
}
}
|
[
"sunxiaobiu@gmail.com"
] |
sunxiaobiu@gmail.com
|
54b27be868a9ff3c5424477820345be47a025704
|
a8cf7f208abdcca7efc990615ddbf159f467ace9
|
/work/SimplelinkStarter_v5.7.3_apkpure.com_source_from_JADX/sources/org/apache/http/impl/cookie/RFC2965CommentUrlAttributeHandler.java
|
ea86723307e583dc79d93a010121d80f9f446e17
|
[] |
no_license
|
adamkstock/FypPowerBand-
|
adbedf9ec82d3df61085f4aa6951ee099b8f8e7e
|
7307ac76239df529db6ec97a859461ae3a02b0ff
|
refs/heads/master
| 2022-04-23T02:45:35.073979
| 2020-04-22T23:32:56
| 2020-04-22T23:32:56
| 218,766,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 884
|
java
|
package org.apache.http.impl.cookie;
import org.apache.http.cookie.Cookie;
import org.apache.http.cookie.CookieAttributeHandler;
import org.apache.http.cookie.CookieOrigin;
import org.apache.http.cookie.MalformedCookieException;
import org.apache.http.cookie.SetCookie;
@Deprecated
public class RFC2965CommentUrlAttributeHandler implements CookieAttributeHandler {
public RFC2965CommentUrlAttributeHandler() {
throw new RuntimeException("Stub!");
}
public void parse(SetCookie setCookie, String str) throws MalformedCookieException {
throw new RuntimeException("Stub!");
}
public void validate(Cookie cookie, CookieOrigin cookieOrigin) throws MalformedCookieException {
throw new RuntimeException("Stub!");
}
public boolean match(Cookie cookie, CookieOrigin cookieOrigin) {
throw new RuntimeException("Stub!");
}
}
|
[
"adam2.stock@live.uwe.ac.uk"
] |
adam2.stock@live.uwe.ac.uk
|
15e009787665c1488a353b7cc66d88dccd1c9686
|
d0566402585bbab3e3bbac1ba1a75c6142eae26f
|
/examples/src/main/java/com/smalaca/observer/auth/AuthenticationService.java
|
a28e9e84fef225cad9320435da09f8fd3d95611f
|
[] |
no_license
|
tzajc/design-patterns
|
91f063a98284d7ff6a0a4f9b17a2fa55f3dcebc0
|
68ee93c96f15e8970c47f11b11443acef3264cb9
|
refs/heads/master
| 2023-03-30T14:07:52.996505
| 2020-05-28T13:55:25
| 2020-05-28T13:55:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 181
|
java
|
package com.smalaca.observer.auth;
import com.smalaca.observer.security.Password;
public interface AuthenticationService {
AuthResult login(String name, Password password);
}
|
[
"ab13.krakow@gmail.com"
] |
ab13.krakow@gmail.com
|
6ba51edf067662158bf727bb512b4f67a7f65e99
|
1a4770c215544028bad90c8f673ba3d9e24f03ad
|
/second/quark/src/main/java/com/alibaba/analytics/a/i.java
|
8989ff3a632c7c20e0f0cbf6d475953d0206318d
|
[] |
no_license
|
zhang1998/browser
|
e480fbd6a43e0a4886fc83ea402f8fbe5f7c7fce
|
4eee43a9d36ebb4573537eddb27061c67d84c7ba
|
refs/heads/master
| 2021-05-03T06:32:24.361277
| 2018-02-10T10:35:36
| 2018-02-10T10:35:36
| 120,590,649
| 8
| 10
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,811
|
java
|
package com.alibaba.analytics.a;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;
/* compiled from: ProGuard */
public final class i {
public static i a;
private static ScheduledExecutorService b;
private static int c = 1;
private static final AtomicInteger d = new AtomicInteger();
private static synchronized ScheduledExecutorService c() {
ScheduledExecutorService scheduledExecutorService;
synchronized (i.class) {
if (b == null) {
b = Executors.newScheduledThreadPool(3, new x(c));
}
scheduledExecutorService = b;
}
return scheduledExecutorService;
}
public static synchronized i a() {
i iVar;
synchronized (i.class) {
if (a == null) {
a = new i();
}
iVar = a;
}
return iVar;
}
public static ScheduledFuture a(ScheduledFuture scheduledFuture, Runnable runnable, long j) {
if (!(scheduledFuture == null || scheduledFuture.isDone())) {
scheduledFuture.cancel(true);
}
return c().schedule(runnable, j, TimeUnit.MILLISECONDS);
}
public static ScheduledFuture b(ScheduledFuture scheduledFuture, Runnable runnable, long j) {
if (!(scheduledFuture == null || scheduledFuture.isDone())) {
scheduledFuture.cancel(false);
}
return c().scheduleAtFixedRate(runnable, 1000, j, TimeUnit.MILLISECONDS);
}
public static void a(Runnable runnable) {
try {
c().submit(runnable);
} catch (Throwable th) {
}
}
}
|
[
"2764207312@qq.com"
] |
2764207312@qq.com
|
93db408eeb3f95391eff78513b5d2dbec0314a7e
|
d0fb6f302ff57c3e48d94a04bbd704e824eb175d
|
/src/main/java/com/sample/cloudy/api/vm/VirtualMachine.java
|
bd5dc4a3c989ab242b6b88216adb97b887405659
|
[] |
no_license
|
mathieuancelin/cloudy
|
378f750f61d5f8b13c18c1ae356bfda4325c4d34
|
c76c9fe94d64cfba78b468afd033e6874d3892ac
|
refs/heads/master
| 2021-01-01T06:11:19.516163
| 2011-04-14T14:54:51
| 2011-04-14T14:54:51
| 1,614,524
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 371
|
java
|
package com.sample.cloudy.api.vm;
import com.sample.cloudy.api.Health;
import com.sample.cloudy.api.Status;
import java.net.URL;
public interface VirtualMachine {
boolean start();
boolean stop();
boolean delete();
Health health();
Status status();
String name();
String address();
String infos();
URL goldenPath();
URL path();
}
|
[
"mathieu.ancelin@gmail.com"
] |
mathieu.ancelin@gmail.com
|
ad1f0923d83810cd8de55d9dec380097d992a372
|
842857cb89ecc4a5f0ef0323e652aa4c90e347a4
|
/tests/mocks/jmock/src/main/java/br/com/mystudies/mock/jmock/Dao.java
|
1376f3ebcb820437a73d4ebf69336488f4a62721
|
[] |
no_license
|
r3wa/my-studies
|
964fde36f7c35ef7c7974f7a535a22f557344b5c
|
65197c11e62189158021d00209dcc9c9ae1f482c
|
refs/heads/master
| 2020-12-11T07:17:29.496206
| 2013-07-30T11:51:29
| 2013-07-30T11:51:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 135
|
java
|
package br.com.mystudies.mock.jmock;
/**
* @author rduarte
*
*/
public interface Dao {
public String find(String arg);
}
|
[
"robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531"
] |
robson.o.d@e9df6f47-f091-bbda-6991-b925dddbb531
|
a43cec4183bac361bff445547d9ca15c183714b3
|
b629551bd6b022aa7a6ccb1c52a35bdf8ee86b32
|
/app/src/main/java/com/ezlinker/app/config/framework/HttpConverterConfig.java
|
d565dbb1a72159c9f7c16179b2374a86d2b8e216
|
[] |
no_license
|
athmoon/ezlinker
|
43834c5f63f3f77270afdf2d08b1522f9a3d932b
|
98db3efb1ee565cd428db0af1e4bf94ce0039228
|
refs/heads/master
| 2023-06-24T17:38:19.029774
| 2021-07-24T14:56:51
| 2021-07-24T14:56:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,411
|
java
|
package com.ezlinker.app.config.framework;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.alibaba.fastjson.support.config.FastJsonConfig;
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.converter.HttpMessageConverter;
/**
* @program: ezlinker
* @description: HttpConverterConfig
* @author: wangwenhai
* @create: 2019-11-14 10:34
**/
@Configuration
public class HttpConverterConfig {
@Bean
public HttpMessageConverters fastJsonHttpMessageConverters() {
// 1.定义一个converters转换消息的对象
FastJsonHttpMessageConverter fastConverter = new FastJsonHttpMessageConverter();
// 2.添加fastjson的配置信息,比如: 是否需要格式化返回的json数据
FastJsonConfig fastJsonConfig = new FastJsonConfig();
fastJsonConfig.setSerializerFeatures(SerializerFeature.PrettyFormat);
// 3.在converter中添加配置信息
fastConverter.setFastJsonConfig(fastJsonConfig);
// 4.将converter赋值给HttpMessageConverter
// 5.返回HttpMessageConverters对象
return new HttpMessageConverters((HttpMessageConverter<?>) fastConverter);
}
}
|
[
"751957846@qq.com"
] |
751957846@qq.com
|
eef935ca6b25ee71d297048375ef4cb6a491c5af
|
3a24f3fc44dd51bf73c9649793706a9ec95ab9f1
|
/larksuite-oapi/src/main/java/com/larksuite/oapi/core/card/handler/subhandler/HandleSubHandler.java
|
045992a620625f2d456d069567d0f5413169a951
|
[
"Apache-2.0"
] |
permissive
|
keeperlibofan/oapi-sdk-java
|
e1d6180c3ec599c9b803187a14583d5c1cb940a0
|
1b603c46d7efbb84e15d2bd245f675d2e20cd477
|
refs/heads/main
| 2023-04-29T23:28:24.836759
| 2021-05-14T10:55:35
| 2021-05-14T10:55:35
| 368,723,315
| 0
| 0
|
Apache-2.0
| 2021-05-19T02:35:37
| 2021-05-19T02:35:36
| null |
UTF-8
|
Java
| false
| false
| 1,097
|
java
|
package com.larksuite.oapi.core.card.handler.subhandler;
import com.larksuite.oapi.core.Config;
import com.larksuite.oapi.core.Constants;
import com.larksuite.oapi.core.Context;
import com.larksuite.oapi.core.card.IHandler;
import com.larksuite.oapi.core.card.exception.NotFoundHandlerException;
import com.larksuite.oapi.core.card.handler.ISubHandler;
import com.larksuite.oapi.core.card.mode.Card;
import com.larksuite.oapi.core.card.mode.HTTPCard;
import com.larksuite.oapi.core.utils.Jsons;
public class HandleSubHandler implements ISubHandler {
@Override
public void handle(Context context, HTTPCard httpCard) throws Exception {
if (Constants.URL_VERIFICATION.equals(httpCard.getType())) {
return;
}
Config config = Config.ByCtx(context);
IHandler handler = IHandler.Hub.getHandler(config);
if (handler == null) {
throw new NotFoundHandlerException();
}
Card card = Jsons.DEFAULT_GSON.fromJson(httpCard.getInput().trim(), Card.class);
httpCard.setOutput(handler.handle(context, card));
}
}
|
[
"zhaomingqiang@bytedance.com"
] |
zhaomingqiang@bytedance.com
|
c1173aa6b76cc46a93d4c2a8b9c5727979a9bbcf
|
c1a29f3534b5dffcfac6e8040120210f56f37a70
|
/spring-functionaltest-web/src/main/java/jp/co/ntt/fw/spring/functionaltest/app/prmn/PRMN01Controller.java
|
9f4e3aca84aa893fe7133b48679df3caa09c73a5
|
[] |
no_license
|
ptmxndys/spring-functionaltest
|
658bb332efcc811168c05d9d1366871ce3650222
|
ba2f34feb1da6312d868444fb41cf86ef554cd13
|
refs/heads/master
| 2023-02-11T21:18:06.677036
| 2021-01-04T09:43:01
| 2021-01-07T08:38:48
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,118
|
java
|
/*
* Copyright(c) 2014 NTT Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package jp.co.ntt.fw.spring.functionaltest.app.prmn;
import javax.inject.Inject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
@RequestMapping("prmn")
@Controller
public class PRMN01Controller {
@Inject
PrmnDefines prmnDefines;
@RequestMapping(value = "0101/001")
public String handle0101001(Model model) {
model.addAttribute("prmnDefines", prmnDefines);
return "prmn/ownProjectPropertiesDsp";
}
@RequestMapping(value = "0101/002")
public String handle0101002(Model model) {
model.addAttribute("prmnDefines", prmnDefines);
return "prmn/otherProjectPropertiesDsp";
}
@RequestMapping(value = "0102/001")
public String handle0102001(Model model) {
model.addAttribute("prmnDefines", prmnDefines);
return "prmn/orderJvmEnvValDsp";
}
@RequestMapping(value = "0102/002")
public String handle0102002(Model model) {
model.addAttribute("prmnDefines", prmnDefines);
return "prmn/orderAppEnvValDsp";
}
@RequestMapping(value = "0102/003")
public String handle0102003(Model model) {
model.addAttribute("prmnDefines", prmnDefines);
return "prmn/orderOrderEnvValDsp";
}
@RequestMapping(value = "0103/001")
public String handle0103001(Model model) {
model.addAttribute("prmnDefines", prmnDefines);
return "prmn/orderOsEnvValThanAppDsp";
}
}
|
[
"macchinetta.fw@gmail.com"
] |
macchinetta.fw@gmail.com
|
26c7b332478eb2760f8d626092ee8130f7aa25de
|
fe4aef0f70f913582dda87b9a0f235c536147086
|
/Source/src/episodes/package-info.java
|
096f1e3bfa6889f174244492d2164df1dc46101d
|
[] |
no_license
|
liflab/beepbeep-3-examples
|
6f03433ac62a61645e12de71bb0c400636b9c41f
|
7bb6e81373b8d4544ee050216155bfa096b95383
|
refs/heads/master
| 2023-07-10T06:05:06.491325
| 2023-06-21T18:56:21
| 2023-06-21T18:56:21
| 108,593,746
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,726
|
java
|
/*
BeepBeep, an event stream processor
Copyright (C) 2008-2018 Sylvain Hallé
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published
by the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/**
* Examples related to a stream of events for a pressure sensor. This stream of
* events is made of raw pressure readings made by the sensor, and is separated
* into various parts using special events that act as markers.
* <em>Episodes</em> are sub-sequences of successive pressure readings, and
* <em>days</em> are sequences of episodes.
* <p>
* Formally, a {@link PressureEvent} can be either:
* <ul>
* <li>A pressure reading</li>
* <li>A marker indicating the end of a day, represented by the symbol ✸</li>
* <li>A marker indicating the start of an <em>episode</em>, represented by the
* symbol ↑</li>
* <li>A marker indicating the end of an <em>episode</em>, represented by the
* symbol ↓</li>
* </ul>
* For example, given this stream of pressure events:
* <blockquote>
* ✸ ↑ 151 142 ↓ ↑ 148 149 144 ↓ ✸ ↑ 150 142 ↓ ✸
* </blockquote>
* one can identify two days; Day 1 is composed of two episodes (one of two
* readings and one of three readings), and Day 2 is composed of one episode of
* two readings.
* <p>
* The examples in this section illustrate the possibility of computing
* "hierarchical" summaries on parts of the input stream; two examples are
* included:
* <ul>
* <li>{@link MaxEpisode}: compute the maximum value inside each episode</li>
* <li>{@link AverageEpisodes}: compute the average of each episode, and
* group these averages into days</li>
* </ul>
* <p>
* In BeepBeep, such hierarchies can be obtained by nesting {@link Slice} or
* {@link ResetLast} processors.
* The notion of hierarchical summary has been discussed, among others, in
* the following publication:
* <blockquote>
* K. Mamouras, M. Raghothaman, R. Alur, Z.G. Ives, S. Khanna. (2017).
* StreamQRE: modular specification and efficient evaluation of quantitative
* queries over streaming data. <i>Proc. PLDI 2017</i>, ACM.
* DOI: <tt>10.1145/3062341.3062369</tt>.
* </blockquote>
*/
package episodes;
|
[
"shalle@acm.org"
] |
shalle@acm.org
|
53bd9034110414d0ec00a06e9bab6cdd84773957
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/autogen/a/rj.java
|
a303fd29799a9ca2a6ddb48c48cc5e27335fea80
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 673
|
java
|
package com.tencent.mm.autogen.a;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.sdk.event.IEvent;
public final class rj
extends IEvent
{
public a hUu;
public rj()
{
this((byte)0);
}
private rj(byte paramByte)
{
AppMethodBeat.i(149876);
this.hUu = new a();
this.order = false;
this.callback = null;
AppMethodBeat.o(149876);
}
public static final class a
{
public String hUv;
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.autogen.a.rj
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
611d99f6b845707706547e3b34067e5a58486078
|
414cc8d28b6a7fb74047aa05ef9f81f839d32e4c
|
/src/com/jagex/Class456.java
|
9283d51f8dc755818ce32faf9b0c4760f4343cf9
|
[] |
no_license
|
titandino/876-Deobfuscated
|
3d71fade77595cdbbacca9238ec15ed57ceee92b
|
bb546e9a28d77f9d93214386c72b64c9fae29d18
|
refs/heads/master
| 2021-01-12T07:42:29.043949
| 2017-01-27T03:23:54
| 2017-01-27T03:23:54
| 76,999,846
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,959
|
java
|
/* Class456 - Decompiled by JODE
* Visit http://jode.sourceforge.net/
*/
package com.jagex;
import java.io.EOFException;
public class Class456 {
static Class456 aClass456_5155;
public static Class456 aClass456_5156 = new Class456(0);
int anInt5157;
static {
aClass456_5155 = new Class456(1);
}
Class456(int i) {
anInt5157 = -1799398425 * i;
}
static final void method5482(Class668 class668, int i) {
class668.anIntArray8541[(class668.anInt8542 += -1411037171) * 1867269829 - 1] = 1873552861 * client.anInt10997 - 1037490133 * client.anInt11111;
}
public static Class66 method5483(int i) {
Class6 class6 = null;
try {
Class66 class66;
try {
class6 = Class153_Sub1.method8383("3", (client.aClass670_11043.aString8573), false, 1874694687);
byte[] is = new byte[(int) class6.method586(917143623)];
int i_0_;
for (int i_1_ = 0; i_1_ < is.length; i_1_ += i_0_) {
i_0_ = class6.method587(is, i_1_, is.length - i_1_, -2073846251);
if (-1 == i_0_)
throw new EOFException();
}
class66 = new Class66(new RSByteBuffer(is));
} catch (Exception exception) {
Class66 class66_2_ = new Class66();
try {
if (class6 != null)
class6.method585(-1411037171);
} catch (Exception exception_3_) {
/* empty */
}
return class66_2_;
}
try {
if (class6 != null)
class6.method585(-1411037171);
} catch (Exception exception) {
/* empty */
}
return class66;
} catch (Exception object) {
try {
if (class6 != null)
class6.method585(-1411037171);
} catch (Exception exception) {
/* empty */
}
throw object;
}
}
static final void method5484(Class668 class668, byte i) {
int i_4_ = (class668.anIntArray8541[(class668.anInt8542 -= -1411037171) * 1867269829]);
class668.anIntArray8541[(class668.anInt8542 += -1411037171) * 1867269829 - 1] = client.aClass231_11088.method3301(i_4_, (byte) 36).method3154((byte) -26);
}
}
|
[
"trenton.kress@gmail.com"
] |
trenton.kress@gmail.com
|
8ec1e07ea920ee6ae6874366dfd3b9093e7b3c63
|
e977c424543422f49a25695665eb85bfc0700784
|
/benchmark/icse15/1365868/buggy-version/lucene/dev/branches/branch_4x/lucene/analysis/common/src/java/org/apache/lucene/analysis/pattern/PatternTokenizerFactory.java
|
6af60d25cf363c8251d74f05af6157b8cb50fbef
|
[] |
no_license
|
amir9979/pattern-detector-experiment
|
17fcb8934cef379fb96002450d11fac62e002dd3
|
db67691e536e1550245e76d7d1c8dced181df496
|
refs/heads/master
| 2022-02-18T10:24:32.235975
| 2019-09-13T15:42:55
| 2019-09-13T15:42:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,468
|
java
|
package org.apache.lucene.analysis.pattern;
/*
* 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.
*/
import java.io.IOException;
import java.io.Reader;
import java.util.Map;
import java.util.regex.Pattern;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.pattern.PatternTokenizer;
import org.apache.lucene.analysis.util.InitializationException;
import org.apache.lucene.analysis.util.TokenizerFactory;
/**
* Factory for {@link PatternTokenizer}.
* This tokenizer uses regex pattern matching to construct distinct tokens
* for the input stream. It takes two arguments: "pattern" and "group".
* <p/>
* <ul>
* <li>"pattern" is the regular expression.</li>
* <li>"group" says which group to extract into tokens.</li>
* </ul>
* <p>
* group=-1 (the default) is equivalent to "split". In this case, the tokens will
* be equivalent to the output from (without empty tokens):
* {@link String#split(java.lang.String)}
* </p>
* <p>
* Using group >= 0 selects the matching group as the token. For example, if you have:<br/>
* <pre>
* pattern = \'([^\']+)\'
* group = 0
* input = aaa 'bbb' 'ccc'
*</pre>
* the output will be two tokens: 'bbb' and 'ccc' (including the ' marks). With the same input
* but using group=1, the output would be: bbb and ccc (no ' marks)
* </p>
* <p>NOTE: This Tokenizer does not output tokens that are of zero length.</p>
*
* <pre class="prettyprint" >
* <fieldType name="text_ptn" class="solr.TextField" positionIncrementGap="100">
* <analyzer>
* <tokenizer class="solr.PatternTokenizerFactory" pattern="\'([^\']+)\'" group="1"/>
* </analyzer>
* </fieldType></pre>
*
* @see PatternTokenizer
* @since solr1.2
*
*/
public class PatternTokenizerFactory extends TokenizerFactory
{
public static final String PATTERN = "pattern";
public static final String GROUP = "group";
protected Pattern pattern;
protected int group;
/**
* Require a configured pattern
*/
@Override
public void init(Map<String,String> args)
{
super.init(args);
pattern = getPattern( PATTERN );
group = -1; // use 'split'
String g = args.get( GROUP );
if( g != null ) {
try {
group = Integer.parseInt( g );
}
catch( Exception ex ) {
throw new InitializationException("invalid group argument: " + g);
}
}
}
/**
* Split the input using configured pattern
*/
public Tokenizer create(final Reader in) {
try {
return new PatternTokenizer(in, pattern, group);
} catch( IOException ex ) {
throw new InitializationException("IOException thrown creating PatternTokenizer instance", ex);
}
}
}
|
[
"durieuxthomas@hotmail.com"
] |
durieuxthomas@hotmail.com
|
c8976d9defdde946c01136b508f0dd97e751d2a9
|
8fa7e9f42f85ead6ea8015e3dc65fde795788c1c
|
/src/main/java/com/qiyei/utils/DBUtils.java
|
19947b4f0fd279eb32dd39a7926deb7bef59ab91
|
[] |
no_license
|
qiyei2015/WebApplication
|
fc68ae593b09ee98d943b2a43f96fffcae50510c
|
9185c2b1a3a84cc96926b3004ecc52e6583dba10
|
refs/heads/master
| 2022-12-22T05:13:05.884959
| 2020-05-31T02:40:32
| 2020-05-31T02:40:32
| 212,762,639
| 0
| 0
| null | 2022-12-16T11:18:38
| 2019-10-04T07:48:41
|
Java
|
UTF-8
|
Java
| false
| false
| 1,409
|
java
|
package com.qiyei.utils;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import java.io.IOException;
import java.io.InputStream;
/**
* @author Created by qiyei2015 on 2019/10/27.
* @version: 1.0
* @email: 1273482124@qq.com
* @description:
*/
public class DBUtils {
private static String RESOURCE = "mybatis-config.xml";
private static SqlSessionFactory sSqlSessionFactory;
private static ThreadLocal<SqlSession> threadLocal = new ThreadLocal<SqlSession>();
public static void init(){
try {
InputStream is = Resources.getResourceAsStream(RESOURCE);
sSqlSessionFactory = new SqlSessionFactoryBuilder().build(is);
} catch (IOException e) {
e.printStackTrace();
}
}
/**
* 获取工厂对象的方法
* @return
*/
public static SqlSessionFactory getSqlSessionFactory() {
return sSqlSessionFactory;
}
public static SqlSession getSession(){
return sSqlSessionFactory.openSession();
}
/**
* 关闭SqlSession的方法
*/
public static void close(){
SqlSession session = threadLocal.get();
if(session != null) {
session.close();
threadLocal.set(null);
}
}
}
|
[
"1273482124@qq.com"
] |
1273482124@qq.com
|
b35dd17d9b2d170fd02d366de57a5213dcb1a15a
|
9661b969a0b1dc82b687db1fa068f67cfa454e66
|
/code/jackson-databind-jackson-databind-2.0.0-RC1/src/main/java/com/fasterxml/jackson/databind/type/TypeBase.java
|
68c37b0ebe783c75e20499fb32ab825f13724b14
|
[] |
no_license
|
netwelfare/jsonstar
|
c68289490435e6b86ed5cde945a81b70fcbf0a08
|
56c8e653c1343fd49e93bb4c70793a322a770968
|
refs/heads/master
| 2020-06-14T00:43:30.396653
| 2016-12-18T10:27:59
| 2016-12-18T10:27:59
| 75,537,290
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,021
|
java
|
package com.fasterxml.jackson.databind.type;
import java.io.IOException;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.JavaType;
import com.fasterxml.jackson.databind.JsonSerializable;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.jsontype.TypeSerializer;
public abstract class TypeBase
extends JavaType
implements JsonSerializable
{
/**
* Lazily initialized external representation of the type
*/
volatile String _canonicalName;
/**
* Main constructor to use by extending classes.
*/
protected TypeBase(Class<?> raw, int hash,
Object valueHandler, Object typeHandler)
{
super(raw, hash, valueHandler, typeHandler);
}
@Override
public String toCanonical()
{
String str = _canonicalName;
if (str == null) {
str = buildCanonicalName();
}
return str;
}
protected abstract String buildCanonicalName();
@Override
public abstract StringBuilder getGenericSignature(StringBuilder sb);
@Override
public abstract StringBuilder getErasedSignature(StringBuilder sb);
@Override
@SuppressWarnings("unchecked")
public <T> T getValueHandler() { return (T) _valueHandler; }
@Override
@SuppressWarnings("unchecked")
public <T> T getTypeHandler() { return (T) _typeHandler; }
/*
/**********************************************************
/* JsonSerializableWithType base implementation
/**********************************************************
*/
@Override
public void serializeWithType(JsonGenerator jgen, SerializerProvider provider,
TypeSerializer typeSer)
throws IOException, JsonProcessingException
{
typeSer.writeTypePrefixForScalar(this, jgen);
this.serialize(jgen, provider);
typeSer.writeTypeSuffixForScalar(this, jgen);
}
@Override
public void serialize(JsonGenerator jgen, SerializerProvider provider)
throws IOException, JsonProcessingException
{
jgen.writeString(toCanonical());
}
/*
/**********************************************************
/* Methods for sub-classes to use
/**********************************************************
*/
/**
* @param trailingSemicolon Whether to add trailing semicolon for non-primitive
* (reference) types or not
*/
protected static StringBuilder _classSignature(Class<?> cls, StringBuilder sb,
boolean trailingSemicolon)
{
if (cls.isPrimitive()) {
if (cls == Boolean.TYPE) {
sb.append('Z');
} else if (cls == Byte.TYPE) {
sb.append('B');
}
else if (cls == Short.TYPE) {
sb.append('S');
}
else if (cls == Character.TYPE) {
sb.append('C');
}
else if (cls == Integer.TYPE) {
sb.append('I');
}
else if (cls == Long.TYPE) {
sb.append('J');
}
else if (cls == Float.TYPE) {
sb.append('F');
}
else if (cls == Double.TYPE) {
sb.append('D');
}
else if (cls == Void.TYPE) {
sb.append('V');
} else {
throw new IllegalStateException("Unrecognized primitive type: "+cls.getName());
}
} else {
sb.append('L');
String name = cls.getName();
for (int i = 0, len = name.length(); i < len; ++i) {
char c = name.charAt(i);
if (c == '.') c = '/';
sb.append(c);
}
if (trailingSemicolon) {
sb.append(';');
}
}
return sb;
}
}
|
[
"didawangxiaofei@126.com"
] |
didawangxiaofei@126.com
|
d073644d9c3f0465357c345b44b6cebaaacf75bc
|
9923e30eb99716bfc179ba2bb789dcddc28f45e6
|
/openapi-generator/jaxrs-resteasy/src/gen/java/org/openapitools/model/DoorResponse.java
|
12ec3bb2be6565f244a6c71f2744581cac3a7fe4
|
[] |
no_license
|
silverspace/samsara-sdks
|
cefcd61458ed3c3753ac5e6bf767229dd8df9485
|
c054b91e488ab4266f3b3874e9b8e1c9e2d4d5fa
|
refs/heads/master
| 2020-04-25T13:16:59.137551
| 2019-03-01T05:49:05
| 2019-03-01T05:49:05
| 172,804,041
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,329
|
java
|
package org.openapitools.model;
import java.util.Objects;
import java.util.ArrayList;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.openapitools.model.DoorResponseSensors;
import javax.validation.constraints.*;
import io.swagger.annotations.*;
@ApiModel(description="Contains the current door status of a sensor.")
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaResteasyServerCodegen", date = "2019-03-01T05:35:27.523Z[GMT]")
public class DoorResponse {
private Long groupId;
private List<DoorResponseSensors> sensors = new ArrayList<DoorResponseSensors>();
/**
**/
@ApiModelProperty(example = "101", value = "")
@JsonProperty("groupId")
public Long getGroupId() {
return groupId;
}
public void setGroupId(Long groupId) {
this.groupId = groupId;
}
/**
**/
@ApiModelProperty(value = "")
@JsonProperty("sensors")
public List<DoorResponseSensors> getSensors() {
return sensors;
}
public void setSensors(List<DoorResponseSensors> sensors) {
this.sensors = sensors;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
DoorResponse doorResponse = (DoorResponse) o;
return Objects.equals(groupId, doorResponse.groupId) &&
Objects.equals(sensors, doorResponse.sensors);
}
@Override
public int hashCode() {
return Objects.hash(groupId, sensors);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class DoorResponse {\n");
sb.append(" groupId: ").append(toIndentedString(groupId)).append("\n");
sb.append(" sensors: ").append(toIndentedString(sensors)).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 ");
}
}
|
[
"greg@samsara.com"
] |
greg@samsara.com
|
5fb9c6963140c184c1e73e3f1f80e5dfc4740065
|
6e433d19f23c62894b9df046e360aec44137c968
|
/app/src/main/java/com/clown/wyxc/x_bean/x_parambean/OrderShoppingCartId.java
|
4b9d8ef3018435de97da94af4c079207789ba0d5
|
[] |
no_license
|
EricQianTW/MVP-DemoCar
|
7501a2e00c67f2a0e325d2ac0705c62eb3d4b9ad
|
08f708d669cf9618299ecc0b166695898d3f45b7
|
refs/heads/master
| 2020-03-30T19:16:03.147272
| 2018-10-04T08:02:41
| 2018-10-04T08:02:41
| 151,515,590
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 824
|
java
|
package com.clown.wyxc.x_bean.x_parambean;
import com.clown.wyxc.x_base.Message;
import com.google.gson.annotations.Expose;
public class OrderShoppingCartId extends Message{
@Expose
private Integer shoppingCartId;
public Integer getShoppingCartId(){
return shoppingCartId;
}
public void setShoppingCartId(Integer shoppingCartId){
this. shoppingCartId = shoppingCartId;
}
@Expose
private Integer goodsNum;
public Integer getGoodsNum(){
return goodsNum;
}
public void setGoodsNum(Integer goodsNum){
this. goodsNum = goodsNum;
}
public OrderShoppingCartId(){
}
public OrderShoppingCartId(Integer shoppingCartId,Integer goodsNum){
this.shoppingCartId=shoppingCartId;
this.goodsNum=goodsNum;
}
}
|
[
"pnt_twqian@163.com"
] |
pnt_twqian@163.com
|
1c8192180230da8a622d86351c2aae0370159d2f
|
bec1af25790cf3f4374c2eb1ff8af7787d9268b0
|
/app/src/main/java/com/app/bulkgasoline/SpinnerCertiType.java
|
eb1b7d6676775508a09ef5dc39164920e5703205
|
[] |
no_license
|
Finderchangchang/gasoline
|
7a6f6e2caf85f1ce456ffde5b94cfe759436ea85
|
71708ed5ad7bb7fa20d51d0bac8fd31d77f01334
|
refs/heads/master
| 2021-01-01T05:09:33.612434
| 2016-04-14T07:07:30
| 2016-04-14T07:07:30
| 56,139,876
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,444
|
java
|
package com.app.bulkgasoline;
import java.util.ArrayList;
import com.app.bulkgasoline.utils.Utils;
import android.content.Context;
import android.util.AttributeSet;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
public class SpinnerCertiType extends BaseSpinner {
private ArrayAdapter<String> adapter;
private String[] mKeys;
private String[] mValues;
public SpinnerCertiType(Context context, AttributeSet attrs) {
super(context, attrs);
initSpinner(context);
}
public void initSpinner(Context context) {
ArrayList<String> keys = new ArrayList<String>();
ArrayList<String> codes = new ArrayList<String>();
if (Utils.loadCodes(context, "Code_IdentityType", keys, codes)) {
mKeys = keys.toArray(new String[keys.size()]);
mValues = codes.toArray(new String[codes.size()]);
adapter = new ArrayAdapter<String>(getContext(), android.R.layout.simple_spinner_item, mValues);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
setAdapter(adapter);
setOnItemSelectedListener(new SpinnerSelectedListener());
setDefaultSelect();
}
}
public String getSelectedKey() {
int position = getSelectedItemPosition();
if (position != -1)
return mKeys[position];
return "";
}
public String getSelectedText() {
int position = getSelectedItemPosition();
if (position != -1)
return mValues[position];
return "";
}
public void setDefaultSelect() {
if (mValues == null)
return;
String default_text = getContext().getResources().getString(R.string.text_default_certi_type);
for (int i = 0; i < mValues.length; i++) {
if (default_text.equalsIgnoreCase(mValues[i])) {
this.setSelection(i);
break;
}
}
}
class SpinnerSelectedListener implements OnItemSelectedListener {
@Override
public void onItemSelected(AdapterView<?> arg0, View view, int arg2,
long arg3) {
// TODO Auto-generated method stub
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
// TODO Auto-generated method stub
}
}
}
|
[
"1031066280@qq.com"
] |
1031066280@qq.com
|
f82d2319770cb573b2590e83052fe4b0b9d81451
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_6c0780229d87258cec0449fedaa92a47757fb6e1/BaseActivity/6_6c0780229d87258cec0449fedaa92a47757fb6e1_BaseActivity_t.java
|
6a71236fa6f9661601ba412cab6790850611983c
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 7,877
|
java
|
package org.sparkleshare.android.ui;
import org.sparkleshare.android.BrowsingActivity;
import org.sparkleshare.android.R;
import org.sparkleshare.android.SettingsActivity;
import android.app.Activity;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
/**
* Implements common functionality across the different app activities such as the actionbar. Ths class
* mustn't be used directly, instead activities should inherit from
*
* @author kai
*
*/
public class BaseActivity extends Activity {
private ViewGroup content;
private boolean optionsMenuEnabled;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.setContentView(R.layout.base_activity);
content = (ViewGroup) super.findViewById(R.id.layout_container);
optionsMenuEnabled = true;
}
@Override
protected void onStart() {
super.onStart();
}
@Override
protected void onStop() {
super.onStop();
}
@Override
protected void onRestart() {
super.onRestart();
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
@Override
public void setContentView(int layoutResID) {
content.removeAllViews();
getLayoutInflater().inflate(layoutResID, content);
}
@Override
public void setContentView(View view) {
content.removeAllViews();
content.addView(view);
}
@Override
public View findViewById(int id) {
return content.findViewById(id);
}
@Override
protected void onDestroy() {
super.onDestroy();
}
/**
* Sets up the actionbar with the given title and the color. If the title is
* null, then the app name will be shown instead of the title. Otherwise, a
* home button and the given title are visible. If the color is null, then
* the default color is visible.
*
* @param title title of actionbar
* @param color color of title
*/
protected void setupActionBar(CharSequence title, int color) {
final ViewGroup actionBar = getActionBar();
if (actionBar == null) {
return;
}
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.FILL_PARENT);
layoutParams.weight = 1;
View.OnClickListener homeClickListener = new View.OnClickListener() {
@Override
public void onClick(View v) {
backToMain();
}
};
if (title != null) {
// adding home button
if (title.equals("SparkleShare")) {
addActionButton(R.drawable.icon, R.string.home, homeClickListener, true);
} else {
addActionButton(R.drawable.ic_action_overview, R.string.home, homeClickListener, true);
}
// adding title text
TextView titleText = new TextView(this, null, R.attr.actionbarTextStyle);
titleText.setLayoutParams(layoutParams);
titleText.setText(title);
actionBar.addView(titleText);
} else {
// adding app name
TextView appName = new TextView(this, null, R.attr.actionbarTextStyle);
appName.setText(getString(R.string.app_name));
actionBar.addView(appName);
// adding layout for aligning items to the right
View dummy = new View(this);
dummy.setLayoutParams(layoutParams);
actionBar.addView(dummy);
}
}
protected void setupActionBarWithoutHomeButton(CharSequence title, int color) {
final ViewGroup actionBar = getActionBar();
if (actionBar == null) {
return;
}
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(0, ViewGroup.LayoutParams.FILL_PARENT);
layoutParams.weight = 1;
if (title != null) {
// adding title text
TextView titleText = new TextView(this, null, R.attr.actionbarTextStyle);
titleText.setLayoutParams(layoutParams);
titleText.setText(title);
actionBar.addView(titleText);
} else {
// adding app name
TextView appName = new TextView(this, null, R.attr.actionbarTextStyle);
appName.setText(getString(R.string.app_name));
actionBar.addView(appName);
// adding layout for aligning items to the right
View dummy = new View(this);
dummy.setLayoutParams(layoutParams);
actionBar.addView(dummy);
}
}
/**
* Returns the {@link ViewGroup} for the actionbar. May return null.
*/
protected ViewGroup getActionBar() {
return (ViewGroup) super.findViewById(R.id.actionbar);
}
/**
* Disables the actionbar.
*/
protected void disableActionBar() {
ViewGroup actionBar = (ViewGroup) super.findViewById(R.id.actionbar);
actionBar.setVisibility(View.GONE);
}
/**
* Interface for activities who need to draw action buttons on the action bar
* @param iconResId ressource identifier for icon
* @param textResId ressource identifier for text
* @param clickListener triggered listener when pressing the button
*/
protected void addNewActionButton(int iconResId, int textResId, View.OnClickListener clickListener) {
addActionButton(iconResId, textResId, clickListener, false);
}
/**
* Adds new action button onto the action bar and takes car of drawing the separator between each buttons on the right place
* @param iconResId resource identifier for icon
* @param textResId resource identifier for text
* @param clickListener triggered listener when pressing the button
* @param separatorAfter true if there is another button following, else false
* @return new action button view
*/
private View addActionButton(int iconResId, int textResId, View.OnClickListener clickListener, boolean separatorAfter) {
final ViewGroup actionBar = getActionBar();
// button separator
ImageView separator = new ImageView(getApplicationContext(), null, R.attr.actionbarSeparatorStyle);
separator.setLayoutParams(new ViewGroup.LayoutParams(2, ViewGroup.LayoutParams.FILL_PARENT));
separator.setBackgroundDrawable(getResources().getDrawable(R.drawable.actionbar_separator));
// new action button
ImageButton actionButton = new ImageButton(this, null, R.attr.actionbarButtonStyle);
actionButton.setImageResource(iconResId);
actionButton.setContentDescription(this.getResources().getString(textResId));
actionButton.setOnClickListener(clickListener);
// adding separator properly
if (!separatorAfter)
actionBar.addView(separator);
actionBar.addView(actionButton);
if (separatorAfter)
actionBar.addView(separator);
return actionButton;
}
/**
* Starting home activity, returning to
* {@link MainActivity }.
*/
private void backToMain() {
SharedPreferences prefs = SettingsActivity.getSettings(this);
String serverUrl = prefs.getString("serverUrl", "") + "/api/getFolderList";
Intent intent = new Intent(this, BrowsingActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.putExtra("url", serverUrl);
startActivity(intent);
}
protected void disableOptionsMenu() {
optionsMenuEnabled = false;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
if (optionsMenuEnabled) {
getMenuInflater().inflate(R.menu.option, menu);
return super.onCreateOptionsMenu(menu);
} else {
return false;
}
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.opt_settings:
Intent settings = new Intent(this, SettingsActivity.class);
startActivity(settings);
return true;
default:
return super.onOptionsItemSelected(item);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
45ea84a98b6df8d17daf8a35ad8b187d2e621aca
|
7400115347e23e5da7e467360c248f72e572d628
|
/gomint-api/src/main/java/io/gomint/world/block/BlockEndStone.java
|
49a235ea1a11e3f95e925b0d93445220ce78f2da
|
[
"BSD-3-Clause"
] |
permissive
|
hanbule/GoMint
|
44eaf0ec20ff0eeaaf757de9d6540de786deead9
|
a5a5b937d145598e59febdb2cca0fe2eb58dd1ee
|
refs/heads/master
| 2022-12-15T14:35:23.310316
| 2020-08-22T13:40:46
| 2020-08-22T13:40:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 287
|
java
|
/*
* Copyright (c) 2018 Gomint team
*
* This code is licensed under the BSD license found in the
* LICENSE file in the root directory of this source tree.
*/
package io.gomint.world.block;
/**
* @author geNAZt
* @version 1.0
*/
public interface BlockEndStone extends Block {
}
|
[
"fabian.fassbender42@googlemail.com"
] |
fabian.fassbender42@googlemail.com
|
efab289e3fc03dd23bea4b32ed56a5308e9d5923
|
eaec4795e768f4631df4fae050fd95276cd3e01b
|
/src/cmps252/HW4_2/UnitTesting/record_262.java
|
092857ab5db17b533cf3f45904f94120ac310a83
|
[
"MIT"
] |
permissive
|
baraabilal/cmps252_hw4.2
|
debf5ae34ce6a7ff8d3bce21b0345874223093bc
|
c436f6ae764de35562cf103b049abd7fe8826b2b
|
refs/heads/main
| 2023-01-04T13:02:13.126271
| 2020-11-03T16:32:35
| 2020-11-03T16:32:35
| 307,839,669
| 1
| 0
|
MIT
| 2020-10-27T22:07:57
| 2020-10-27T22:07:56
| null |
UTF-8
|
Java
| false
| false
| 2,425
|
java
|
package cmps252.HW4_2.UnitTesting;
import static org.junit.jupiter.api.Assertions.*;
import java.io.FileNotFoundException;
import java.util.List;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Test;
import cmps252.HW4_2.Customer;
import cmps252.HW4_2.FileParser;
@Tag("40")
class Record_262 {
private static List<Customer> customers;
@BeforeAll
public static void init() throws FileNotFoundException {
customers = FileParser.getCustomers(Configuration.CSV_File);
}
@Test
@DisplayName("Record 262: FirstName is Rhett")
void FirstNameOfRecord262() {
assertEquals("Rhett", customers.get(261).getFirstName());
}
@Test
@DisplayName("Record 262: LastName is Lenser")
void LastNameOfRecord262() {
assertEquals("Lenser", customers.get(261).getLastName());
}
@Test
@DisplayName("Record 262: Company is Pavailler Machinery Sls Co Inc")
void CompanyOfRecord262() {
assertEquals("Pavailler Machinery Sls Co Inc", customers.get(261).getCompany());
}
@Test
@DisplayName("Record 262: Address is 5431 Preston Fall City")
void AddressOfRecord262() {
assertEquals("5431 Preston Fall City", customers.get(261).getAddress());
}
@Test
@DisplayName("Record 262: City is Fall City")
void CityOfRecord262() {
assertEquals("Fall City", customers.get(261).getCity());
}
@Test
@DisplayName("Record 262: County is King")
void CountyOfRecord262() {
assertEquals("King", customers.get(261).getCounty());
}
@Test
@DisplayName("Record 262: State is WA")
void StateOfRecord262() {
assertEquals("WA", customers.get(261).getState());
}
@Test
@DisplayName("Record 262: ZIP is 98024")
void ZIPOfRecord262() {
assertEquals("98024", customers.get(261).getZIP());
}
@Test
@DisplayName("Record 262: Phone is 425-222-2094")
void PhoneOfRecord262() {
assertEquals("425-222-2094", customers.get(261).getPhone());
}
@Test
@DisplayName("Record 262: Fax is 425-222-7351")
void FaxOfRecord262() {
assertEquals("425-222-7351", customers.get(261).getFax());
}
@Test
@DisplayName("Record 262: Email is rhett@lenser.com")
void EmailOfRecord262() {
assertEquals("rhett@lenser.com", customers.get(261).getEmail());
}
@Test
@DisplayName("Record 262: Web is http://www.rhettlenser.com")
void WebOfRecord262() {
assertEquals("http://www.rhettlenser.com", customers.get(261).getWeb());
}
}
|
[
"mbdeir@aub.edu.lb"
] |
mbdeir@aub.edu.lb
|
010ae02176102389a8fd2b5cc6826dba12bcb213
|
dee13699fb392c3f1ad8d7c07682df0b3c71db96
|
/src/Oct16/CollectStundetBio.java
|
170939ae7a8ac280b1248a3bbe60571a71159539
|
[] |
no_license
|
uday246/Oct18
|
6e251d2949815b158b22acd2ca16d8501f9fa4d5
|
7c6b6d635d6bd2e6a3c7f3434e9a94d9b89a4b9a
|
refs/heads/master
| 2020-08-15T07:39:34.550052
| 2019-10-15T13:13:10
| 2019-10-15T13:13:10
| 215,302,334
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
package Oct16;
import java.util.Scanner;
class Student {
private String name;
private String address;
private String education;
private String hobbies;
private int age;
public String getName() {
return name;
}
public void setName(String aName) {
name = aName;
}
public String getAddress() {
return address;
}
public void setAddress(String aAddress) {
address = aAddress;
}
public String getEducation() {
return education;
}
public void setEducation(String aEducation) {
education = aEducation;
}
public String getHobbies() {
return hobbies;
}
public void setHobbies(String aHobbies) {
hobbies = aHobbies;
}
public int getAge() {
return age;
}
public void setAge(int aAge) {
age = aAge;
}
@Override
public String toString() {
return "Student [name=" + name + ", address=" + address + ", education=" + education + ", hobbies=" + hobbies
+ ", age=" + age + "]";
}
}
public class CollectStundetBio {
public static void main(String[] args) {
Student st[] = new Student[10];
Scanner sc = new Scanner(System.in);
for (int i = 0; i < 10; i++) {
st[i] = new Student();
System.out.println("Enter Student Name ");
st[i].setName(sc.nextLine());
System.out.println("Enter Student Address");
st[i].setAddress(sc.nextLine());
System.out.println("Enter Student education");
st[i].setEducation(sc.nextLine());
System.out.println("Enter Student hobbies");
st[i].setHobbies(sc.nextLine());
System.out.println("Enter Student age");
st[i].setAge(sc.nextInt());
sc.nextLine();
}
sc.close();
for (int i = 0; i < 10; i++) {
System.out.println(st[i]);
}
}
}
|
[
"teegalaudaykumar@gmail.com"
] |
teegalaudaykumar@gmail.com
|
0056f2c423ae930256c949a0ebc87fbc39c6f04e
|
7653e008384de73b57411b7748dab52b561d51e6
|
/SrcGame/dwo/gameserver/handler/chat/ChatShout.java
|
569f79b6da00ad96cb7d2e5c335e332d27b7fd07
|
[] |
no_license
|
BloodyDawn/Ertheia
|
14520ecd79c38acf079de05c316766280ae6c0e8
|
d90d7f079aa370b57999d483c8309ce833ff8af0
|
refs/heads/master
| 2021-01-11T22:10:19.455110
| 2017-01-14T12:15:56
| 2017-01-14T12:15:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,941
|
java
|
/*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package dwo.gameserver.handler.chat;
import dwo.config.Config;
import dwo.gameserver.handler.ChatHandlerParams;
import dwo.gameserver.handler.CommandHandler;
import dwo.gameserver.handler.NumericCommand;
import dwo.gameserver.instancemanager.MapRegionManager;
import dwo.gameserver.instancemanager.RelationListManager;
import dwo.gameserver.instancemanager.WorldManager;
import dwo.gameserver.model.actor.instance.L2PcInstance;
import dwo.gameserver.model.player.ChatType;
import dwo.gameserver.model.player.FloodAction;
import dwo.gameserver.network.game.serverpackets.Say2;
import org.apache.log4j.Level;
/**
* Shout chat handler.
*
* @author durgus
* @author Yorie
*/
public class ChatShout extends CommandHandler<Integer>
{
@NumericCommand(1)
public boolean shoutChat(ChatHandlerParams<Integer> params)
{
L2PcInstance activeChar = params.getPlayer();
try
{
Say2 cs = new Say2(activeChar.getObjectId(), ChatType.values()[params.getCommand()], activeChar.getName(), params.getMessage());
L2PcInstance[] pls = WorldManager.getInstance().getAllPlayersArray();
if(Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("on") || Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("gm") && activeChar.isGM())
{
int region = MapRegionManager.getInstance().getMapRegion(activeChar.getLoc()).getLocId();
for(L2PcInstance player : pls)
{
if(region == MapRegionManager.getInstance().getMapRegion(player.getLoc()).getLocId() && !RelationListManager.getInstance().isBlocked(player, activeChar) && player.getInstanceId() == activeChar.getInstanceId())
{
player.sendPacket(cs);
}
}
}
else if(Config.DEFAULT_GLOBAL_CHAT.equalsIgnoreCase("global"))
{
if(!activeChar.isGM() && !activeChar.getFloodProtectors().getGlobalChat().tryPerformAction(FloodAction.CHAT_GLOBAL))
{
activeChar.sendMessage("Do not spam shout channel.");
return false;
}
for(L2PcInstance player : pls)
{
if(!RelationListManager.getInstance().isBlocked(player, activeChar))
{
player.sendPacket(cs);
}
}
}
}
catch(Exception e)
{
log.log(Level.ERROR, getClass().getSimpleName() + ": Error while global chatting: Player:" + activeChar.getName() + " Location: " + activeChar.getLoc());
}
return true;
}
}
|
[
"echipachenko@gmail.com"
] |
echipachenko@gmail.com
|
921f88c692c8c7af897e4b84119010bdf81a1c0d
|
1043c01b7637098d046fbb9dba79b15eefbad509
|
/core/testsuite/src/test/hibernate/com/blazebit/persistence/testsuite/hibernate/EmbeddableIdTestEntityId.java
|
7f56587779c04a07b0eed229dba0ff3bb358c469
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
ares3/blaze-persistence
|
45c06a3ec25c98236a109ab55a3205fc766734ed
|
2258e9d9c44bb993d41c5295eccbc894f420f263
|
refs/heads/master
| 2020-10-01T16:13:01.380347
| 2019-12-06T01:24:34
| 2019-12-09T09:29:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,128
|
java
|
/*
* Copyright 2014 - 2019 Blazebit.
*
* 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.blazebit.persistence.testsuite.hibernate;
import com.blazebit.persistence.testsuite.entity.EmbeddableTestEntityIdEmbeddable;
import com.blazebit.persistence.testsuite.entity.IntIdEntity;
import javax.persistence.*;
import java.io.Serializable;
@Embeddable
public class EmbeddableIdTestEntityId implements Serializable {
private static final long serialVersionUID = 1L;
private IntIdEntity intIdEntity;
private String key;
private EmbeddableTestEntityIdEmbeddable localizedEntity;
public EmbeddableIdTestEntityId() {
}
public EmbeddableIdTestEntityId(IntIdEntity intIdEntity, String key) {
this.intIdEntity = intIdEntity;
this.key = key;
}
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "int_id_entity_id", nullable = false)
public IntIdEntity getIntIdEntity() {
return intIdEntity;
}
public void setIntIdEntity(IntIdEntity intIdEntity) {
this.intIdEntity = intIdEntity;
}
// Rename because mysql can't handle "key"
// Fixed size because mysql has size limitations
@Column(name = "test_key", nullable = false, length = 100)
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
@Embedded
public EmbeddableTestEntityIdEmbeddable getLocalizedEntity() {
return localizedEntity;
}
public void setLocalizedEntity(EmbeddableTestEntityIdEmbeddable localizedEntity) {
this.localizedEntity = localizedEntity;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((intIdEntity == null) ? 0 : intIdEntity.hashCode());
result = prime * result + ((key == null) ? 0 : key.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;
EmbeddableIdTestEntityId other = (EmbeddableIdTestEntityId) obj;
if (intIdEntity == null) {
if (other.intIdEntity != null)
return false;
} else if (!intIdEntity.equals(other.intIdEntity))
return false;
if (key == null) {
if (other.key != null)
return false;
} else if (!key.equals(other.key))
return false;
return true;
}
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
a565316e403cac6a5003e2bea9f4cfbe4acaa17c
|
611b2f6227b7c3b4b380a4a410f357c371a05339
|
/src/main/java/android/support/v4/view/accessibility/AccessibilityNodeProviderCompat.java
|
297b5c6a08618d3050dcda047caf522fae74fd9b
|
[] |
no_license
|
obaby/bjqd
|
76f35fcb9bbfa4841646a8888c9277ad66b171dd
|
97c56f77380835e306ea12401f17fb688ca1373f
|
refs/heads/master
| 2022-12-04T21:33:17.239023
| 2020-08-25T10:53:15
| 2020-08-25T10:53:15
| 290,186,830
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,489
|
java
|
package android.support.v4.view.accessibility;
import android.os.Build;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.annotation.RequiresApi;
import android.view.accessibility.AccessibilityNodeInfo;
import android.view.accessibility.AccessibilityNodeProvider;
import java.util.ArrayList;
import java.util.List;
public class AccessibilityNodeProviderCompat {
public static final int HOST_VIEW_ID = -1;
private final Object mProvider;
@Nullable
public AccessibilityNodeInfoCompat createAccessibilityNodeInfo(int i) {
return null;
}
@Nullable
public List<AccessibilityNodeInfoCompat> findAccessibilityNodeInfosByText(String str, int i) {
return null;
}
@Nullable
public AccessibilityNodeInfoCompat findFocus(int i) {
return null;
}
public boolean performAction(int i, int i2, Bundle bundle) {
return false;
}
@RequiresApi(16)
static class AccessibilityNodeProviderApi16 extends AccessibilityNodeProvider {
final AccessibilityNodeProviderCompat mCompat;
AccessibilityNodeProviderApi16(AccessibilityNodeProviderCompat accessibilityNodeProviderCompat) {
this.mCompat = accessibilityNodeProviderCompat;
}
public AccessibilityNodeInfo createAccessibilityNodeInfo(int i) {
AccessibilityNodeInfoCompat createAccessibilityNodeInfo = this.mCompat.createAccessibilityNodeInfo(i);
if (createAccessibilityNodeInfo == null) {
return null;
}
return createAccessibilityNodeInfo.unwrap();
}
public List<AccessibilityNodeInfo> findAccessibilityNodeInfosByText(String str, int i) {
List<AccessibilityNodeInfoCompat> findAccessibilityNodeInfosByText = this.mCompat.findAccessibilityNodeInfosByText(str, i);
if (findAccessibilityNodeInfosByText == null) {
return null;
}
ArrayList arrayList = new ArrayList();
int size = findAccessibilityNodeInfosByText.size();
for (int i2 = 0; i2 < size; i2++) {
arrayList.add(findAccessibilityNodeInfosByText.get(i2).unwrap());
}
return arrayList;
}
public boolean performAction(int i, int i2, Bundle bundle) {
return this.mCompat.performAction(i, i2, bundle);
}
}
@RequiresApi(19)
static class AccessibilityNodeProviderApi19 extends AccessibilityNodeProviderApi16 {
AccessibilityNodeProviderApi19(AccessibilityNodeProviderCompat accessibilityNodeProviderCompat) {
super(accessibilityNodeProviderCompat);
}
public AccessibilityNodeInfo findFocus(int i) {
AccessibilityNodeInfoCompat findFocus = this.mCompat.findFocus(i);
if (findFocus == null) {
return null;
}
return findFocus.unwrap();
}
}
public AccessibilityNodeProviderCompat() {
if (Build.VERSION.SDK_INT >= 19) {
this.mProvider = new AccessibilityNodeProviderApi19(this);
} else if (Build.VERSION.SDK_INT >= 16) {
this.mProvider = new AccessibilityNodeProviderApi16(this);
} else {
this.mProvider = null;
}
}
public AccessibilityNodeProviderCompat(Object obj) {
this.mProvider = obj;
}
public Object getProvider() {
return this.mProvider;
}
}
|
[
"obaby.lh@gmail.com"
] |
obaby.lh@gmail.com
|
20ace312f6e4ac30d3340f3900520eeee9afa48a
|
817cb78b727390b628028c3e78f06f8934299f59
|
/dataStructure/src/ch01/Max4_01_01.java
|
5c775ca1f9bfb5eec455a659581945ad151825d7
|
[] |
no_license
|
pparksuuu/DataStructure-Algorithm-JAVA
|
8739b78cc678efc45187874b6f6c6eb130a314bb
|
38d7b3d0e6022697cfec8ec013f71ccf3576cde6
|
refs/heads/master
| 2020-04-13T06:22:00.283815
| 2019-02-13T16:14:48
| 2019-02-13T16:14:48
| 163,018,307
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package ch01;
import java.util.Scanner;
// p.19
// Q. 네 값의 최댓값을 구하는 max4 메서드를 작성하세요
// 네 값은 사용자에게 입력받아야 합니다.
public class Max4_01_01 {
static int max4(int a, int b, int c, int d) {
int MAX = a;
if (b > MAX) MAX = b;
if (c > MAX) MAX = c;
if (d > MAX) MAX = d;
return MAX;
}
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int a = Integer.parseInt(sc.nextLine());
int b = Integer.parseInt(sc.nextLine());
int c = Integer.parseInt(sc.nextLine());
int d = Integer.parseInt(sc.nextLine());
System.out.printf("max(%d,%d,%d,%d)의 값은 : %d\n", a, b, c, d, max4(a,b,c,d));
}
}
|
[
"supr2000@gmail.com"
] |
supr2000@gmail.com
|
d4e5078e5206ce6dbf52a34e311dafc904924c39
|
4710631182e4b475b4247198a195a0d1978f4567
|
/app/src/main/java/com/jb/goscanner/util/ColorUtil.java
|
0b2e765aac69c660190c30557742b7e58cf2f7c8
|
[] |
no_license
|
RuijiePan/GoScanner
|
7fc1ed563310f410d61ed94f4bafdf0ff4875e2b
|
c9e0087522307dfb4c17d4436dc8023b01b8952c
|
refs/heads/master
| 2021-01-21T22:54:58.207683
| 2017-09-10T18:57:06
| 2017-09-10T18:57:06
| 102,177,289
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 641
|
java
|
package com.jb.goscanner.util;
import android.content.Context;
import android.support.v4.content.ContextCompat;
import android.util.TypedValue;
import com.jb.goscanner.R;
/**
* Created by panruijie on 2017/9/4.
* Email : zquprj@gmail.com
*/
public class ColorUtil {
public static int getColor(Context context, int ResourcesId) {
return ContextCompat.getColor(context, ResourcesId);
}
public static int getColorPrimary(Context context) {
TypedValue typedValue = new TypedValue();
context.getTheme().resolveAttribute(R.attr.colorPrimary, typedValue, true);
return typedValue.data;
}
}
|
[
"zquprj@gmail.com"
] |
zquprj@gmail.com
|
dcc22de2cb7ab6f1a7a5a9a488ad60f394db441c
|
cc04231a129882f0ac819474223429ce790ac6bb
|
/src/com/freetymekiyan/algorithms/Other/TwoSumClosestPair.java
|
0ac09e469e5d94c7dbc9028ab7eaba3bebf60c33
|
[
"MIT"
] |
permissive
|
chjwang/LeetCode-Sol-Res
|
f7c2e898ec5ff375a12e484a3ca93d59b695cc85
|
db90cb452139035815a56d3da8093db9a69c0216
|
refs/heads/master
| 2021-01-22T09:16:51.741035
| 2017-01-27T18:47:07
| 2017-01-27T18:47:07
| 66,747,899
| 1
| 0
| null | 2016-08-28T03:42:38
| 2016-08-28T03:42:38
| null |
UTF-8
|
Java
| false
| false
| 1,350
|
java
|
import java.util.Arrays;
/**
* Given an integer array, find a pair from it that their sum is closest to 0.
* <p>
* Created by kiyan on 6/3/16.
*/
public class TwoSumClosestPair {
public int[] closest(int[] nums) {
int closest = Integer.MAX_VALUE;
int[] res = new int[2];
for (int i = 0; i < nums.length - 1; i++) {
for (int j = i + 1; j < nums.length; j++) {
int sum = nums[i] + nums[j];
if (Math.abs(sum) < closest) {
closest = sum;
res[0] = nums[i];
res[1] = nums[j];
}
}
}
return res;
}
public int[] closestB(int[] nums) {
if (nums == null || nums.length <= 1) return null;
if (nums.length == 2) return new int[]{nums[0], nums[1]};
Arrays.sort(nums);
int[] res = new int[2];
int i = 0;
int j = nums.length - 1;
int closest = Integer.MAX_VALUE;
while (i < j) {
int sum = nums[i] + nums[j];
if (Math.abs(sum) < closest) {
closest = sum;
res[0] = nums[i];
res[1] = nums[j];
}
if (sum > 0) j--;
else if (sum < 0) i++;
else return res;
}
return res;
}
}
|
[
"freetymesunkiyan@gmail.com"
] |
freetymesunkiyan@gmail.com
|
b1a94a9692dd61509dcd14eb2af6809967c79b1c
|
65b5df32720abe1b57b35568121e9afbeb59aa1c
|
/java_01/src/day25/TcpIpServer.java
|
5bd6a4b8da868fb0247b0d2d01edcff9f405944f
|
[] |
no_license
|
rhaoddl72/bit_java
|
f90c5c6006ae523b5869447844b3e89baaa3c5da
|
f19529b96de3e160cab73632a805731187732ef4
|
refs/heads/master
| 2020-07-03T09:49:57.018860
| 2019-08-21T07:29:46
| 2019-08-21T07:29:46
| 201,861,770
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,547
|
java
|
package day25;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.net.ServerSocket;
import java.net.Socket;
import java.util.Scanner;
import java.util.concurrent.locks.Condition;
public class TcpIpServer {
public static void main(String[] args) {
ServerSocket serversocket = null;
BufferedReader br = null;
BufferedWriter bw = null;
try {
serversocket = new ServerSocket(7777);
System.out.println("서버가 준비되었습니다.");
} catch (Exception e) {
e.printStackTrace();
}
while(true) {
try {
System.out.println("Client 요청을 기다립니다.");
Socket socket = serversocket.accept(); // 기다리는 구문
//System.out.println(socket.getInetAddress()+"와 연결중입니다.");
br = new BufferedReader(new InputStreamReader(socket.getInputStream()));
bw = new BufferedWriter(new OutputStreamWriter(socket.getOutputStream()));
String name = br.readLine();
//System.out.println("hello ~~~"+name +"님 \n");
bw.write("Hello ~~"+name+"님\n");
bw.flush();
String msg = null;
while((msg = br.readLine()) != null) {
bw.write(name+":"+msg+"\n");
bw.flush();
}
} catch (Exception e) {
e.printStackTrace();
} finally {
}
}
}
}
|
[
"user@DESKTOP-V882PTR"
] |
user@DESKTOP-V882PTR
|
aa42dc2ebdbe1bfee04b6aa2050c87a919cbf28f
|
c46a39b5b855cdad9d8f52ec2e44627c159cbe67
|
/checklistbank-mybatis-service/src/test/java/org/gbif/checklistbank/service/mybatis/mapper/ReferenceMapperTest.java
|
1a257964e33b6c16bf81877e7a50a40ec7c78d53
|
[
"Apache-2.0"
] |
permissive
|
ahahn-gbif/checklistbank
|
1a4db53c48375d85d1c524739f7b6f048de2daab
|
9bd65a831d9d6ed7b4e1f93e3b7e0ff8f51c7d4f
|
refs/heads/master
| 2020-07-12T03:17:52.596386
| 2019-08-27T12:20:34
| 2019-08-27T12:20:34
| 204,703,029
| 0
| 0
|
Apache-2.0
| 2019-08-27T14:54:39
| 2019-08-27T12:54:39
| null |
UTF-8
|
Java
| false
| false
| 2,162
|
java
|
package org.gbif.checklistbank.service.mybatis.mapper;
import org.gbif.api.model.checklistbank.Reference;
import org.gbif.api.model.common.paging.PagingRequest;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
public class ReferenceMapperTest extends MapperITBase<ReferenceMapper> {
public ReferenceMapperTest() {
super(ReferenceMapper.class, true);
}
@Test
public void testMapper() throws Exception {
assertTrue(mapper.listByChecklistUsage(usageKey, new PagingRequest()).isEmpty());
assertTrue(mapper.listByNubUsage(usageKey, new PagingRequest()).isEmpty());
Reference obj = new Reference();
obj.setCitation(citation2);
obj.setDoi(citation2doi);
obj.setLink(citation2link);
obj.setRemarks("few remarks");
obj.setType("no type");
// deprecated fields
obj.setTitle("my title");
obj.setAuthor("Mecka");
obj.setDate("1988, March 15");
// these should get ignored
obj.setSource("sourcy s");
obj.setSourceTaxonKey(123);
mapper.insert(usageKey, citationKey2, obj);
Reference obj2 = mapper.listByChecklistUsage(usageKey, new PagingRequest()).get(0);
assertObject(obj, obj2, null, null);
obj2 = mapper.listByNubUsage(nubKey, new PagingRequest()).get(0);
// these are now nub source usage values
assertObject(obj, obj2, datasetTitle, usageKey);
}
private void assertObject(Reference obj, Reference obj2, String source, Integer sourceTaxonKey) {
assertEquals(obj.getCitation(), obj2.getCitation());
assertEquals(obj.getDoi(), obj2.getDoi());
assertEquals(obj.getLink(), obj2.getLink());
assertEquals(obj.getRemarks(), obj2.getRemarks());
assertEquals(obj.getType(), obj2.getType());
assertNull(obj2.getAuthor());
assertNull(obj2.getDate());
assertNull(obj2.getTitle());
assertEquals(source, obj2.getSource());
assertEquals(sourceTaxonKey, obj2.getSourceTaxonKey());
}
}
|
[
"m.doering@mac.com"
] |
m.doering@mac.com
|
b703d43777b79a216aa242298944573068925c6c
|
9049eabb2562cd3e854781dea6bd0a5e395812d3
|
/sources/com/google/android/gms/location/DeviceOrientationRequest.java
|
fd8c71b1d1a2f828f4e78f042cc99b7446fdf72f
|
[] |
no_license
|
Romern/gms_decompiled
|
4c75449feab97321da23ecbaac054c2303150076
|
a9c245404f65b8af456b7b3440f48d49313600ba
|
refs/heads/master
| 2022-07-17T23:22:00.441901
| 2020-05-17T18:26:16
| 2020-05-17T18:26:16
| 264,227,100
| 2
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,982
|
java
|
package com.google.android.gms.location;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.SystemClock;
import com.google.android.gms.common.internal.safeparcel.AbstractSafeParcelable;
import java.util.Arrays;
/* compiled from: :com.google.android.gms@201515033@20.15.15 (120300-306758586) */
public final class DeviceOrientationRequest extends AbstractSafeParcelable {
public static final Parcelable.Creator CREATOR = new aegl();
/* renamed from: a */
boolean f79329a;
/* renamed from: b */
long f79330b;
/* renamed from: c */
float f79331c;
/* renamed from: d */
long f79332d;
/* renamed from: e */
int f79333e;
public DeviceOrientationRequest() {
this(true, 50, 0.0f, Long.MAX_VALUE, Integer.MAX_VALUE);
}
public final boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (obj instanceof DeviceOrientationRequest) {
DeviceOrientationRequest deviceOrientationRequest = (DeviceOrientationRequest) obj;
return this.f79329a == deviceOrientationRequest.f79329a && this.f79330b == deviceOrientationRequest.f79330b && Float.compare(this.f79331c, deviceOrientationRequest.f79331c) == 0 && this.f79332d == deviceOrientationRequest.f79332d && this.f79333e == deviceOrientationRequest.f79333e;
}
}
public final int hashCode() {
return Arrays.hashCode(new Object[]{Boolean.valueOf(this.f79329a), Long.valueOf(this.f79330b), Float.valueOf(this.f79331c), Long.valueOf(this.f79332d), Integer.valueOf(this.f79333e)});
}
public final String toString() {
StringBuilder sb = new StringBuilder();
sb.append("DeviceOrientationRequest[mShouldUseMag=");
sb.append(this.f79329a);
sb.append(" mMinimumSamplingPeriodMs=");
sb.append(this.f79330b);
sb.append(" mSmallestAngleChangeRadians=");
sb.append(this.f79331c);
long j = this.f79332d;
if (j != Long.MAX_VALUE) {
long elapsedRealtime = SystemClock.elapsedRealtime();
sb.append(" expireIn=");
sb.append(j - elapsedRealtime);
sb.append("ms");
}
if (this.f79333e != Integer.MAX_VALUE) {
sb.append(" num=");
sb.append(this.f79333e);
}
sb.append(']');
return sb.toString();
}
public DeviceOrientationRequest(boolean z, long j, float f, long j2, int i) {
this.f79329a = z;
this.f79330b = j;
this.f79331c = f;
this.f79332d = j2;
this.f79333e = i;
}
public final void writeToParcel(Parcel parcel, int i) {
int a = see.m35030a(parcel);
see.m35051a(parcel, 1, this.f79329a);
see.m35036a(parcel, 2, this.f79330b);
see.m35034a(parcel, 3, this.f79331c);
see.m35036a(parcel, 4, this.f79332d);
see.m35063b(parcel, 5, this.f79333e);
see.m35062b(parcel, a);
}
}
|
[
"roman.karwacik@rwth-aachen.de"
] |
roman.karwacik@rwth-aachen.de
|
ae9ec86c86ecbe7f7f9bff0482a60652b3d0c27f
|
0da0a6b3b50fc100e54d947b11937498152328f1
|
/src/main/java/polyakov/java3d/object/scen/primitives/Triangle.java
|
3de715c7c797df63a38edeadabaff73c97cdcfd1
|
[] |
no_license
|
a-polyakov/j3d
|
f9bc90edb3ae0683d3e0f5e099d059fecf3c659a
|
4be9ab3497b54c5d31039ae27777c6e5d9ab0c0f
|
refs/heads/master
| 2020-07-04T08:26:01.872230
| 2019-08-13T21:53:40
| 2019-08-13T21:53:40
| 202,221,484
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 892
|
java
|
package polyakov.java3d.object.scen.primitives;
import polyakov.java3d.object.dynamical.Tochka;
import polyakov.java3d.object.dynamical.Rebro;
import polyakov.java3d.object.dynamical.Gran;
import polyakov.java3d.object.dynamical.*;
/**
* Created by IntelliJ IDEA.
* User: Alex
* Date: 09.03.2010
* Time: 14:10:53
* треугольник
* !!!
* внутрений радиус(равностороний)
* внешний радиус(равностороний)
* способ задания три стороны
* две стороны и угол
* сторона и два угла
*/
public class Triangle extends Telo
{
public Triangle(Scen scen, int id, double r)
{
super(scen, id, "Triangle", 3, 3, 1);
addTochka(0, 0, 0); //0
addTochka(r, 0, 0); //1
addTochka(0, r, 0); //2
addRebro( 0, 1);
addRebro( 0, 2);
addRebro( 1, 2);
addGran( 0, 1, 2);
}
}
|
[
"polyakov.alexandr.alexandrovich@gmail.com"
] |
polyakov.alexandr.alexandrovich@gmail.com
|
3ad04e1206e563fc4e29c000eeb0b69db5c46719
|
d94b0f52a306ae8429d8daf687012805460401b1
|
/Java_Oneday20_WordQUIZ/src/com/callor/word/service/RpServiceV1.java
|
04d0e055d59b6ba7a8383133c5177e11c3aca14e
|
[] |
no_license
|
kisoo6203/Onedayproject
|
a4e0db6d424225723d41c0fe4bd4fc136e61d4ec
|
316e91c2a47fd307d747d996c0759b97dd455e37
|
refs/heads/master
| 2023-04-01T07:05:40.180237
| 2021-04-16T07:43:46
| 2021-04-16T07:43:46
| 353,859,838
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 275
|
java
|
package com.callor.word.service;
import com.callor.word.model.RpVO;
public interface RpServiceV1 {
public void selectMenu();
public void inputWord();
public void lordWord();
// public RpVO getWord();
public void viewWord();
public void saveScore(Integer nPoint);
}
|
[
"kisoo6203@naver.com"
] |
kisoo6203@naver.com
|
500b7d7ac68a31d25df1ff00fe1f05f46b89d6db
|
2d4e4709fd9eb663c0e693451b27ad73a0ba3a26
|
/consumer.batch/src/main/java/com/iqb/consumer/batch/scheduler/OrderSpecialTimeScheduleTask.java
|
89a8afd3de6585b10d92ebf54eb1e3b893d513cf
|
[] |
no_license
|
hapylong/consumer.platform
|
0e7c21587e938d5e5a327af4fb1434183c6ac0c8
|
0005bdd447f325396cd48ce0b2b1547f45fec35a
|
refs/heads/master
| 2020-04-11T04:04:13.826338
| 2018-12-19T10:00:42
| 2018-12-19T10:00:42
| 161,500,288
| 4
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,405
|
java
|
package com.iqb.consumer.batch.scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;
import com.iqb.consumer.batch.service.schedule.ScheduleTaskService;
/**
*
* Description:
*
* @author adam
* @version 1.0
*
* <pre>
* Modification History:
* Date Author Version Description
------------------------------------------------------------------
* 2017年7月5日 adam 1.0 1.0 Version
* </pre>
*/
@Component
public class OrderSpecialTimeScheduleTask {
private static final Logger log = LoggerFactory.getLogger(OrderSpecialTimeScheduleTask.class);
@Autowired
private ScheduleTaskService scheduleTaskServiceImpl;
/**
*
* Description:FINANCE-1442 抵质押节点30天流程终止需求 FINANCE-1443 抵质押节点30天流程终止需求 【以租代售抵质押物估价节点|抵押车车价复评节点】
*
* @param
* @return void
* @throws @Author adam Create Date: 2017年6月6日 下午5:08:45
*/
// @Scheduled(cron = "0 0 9,18 * * ?")
@Scheduled(cron = "0 30 0 * * ?")
public void orderSpecialTimeScheduleTask() {
try {
scheduleTaskServiceImpl.orderSpecialTimeScheduleTask();
} catch (Throwable e) {
log.error("OrderSpecialTimeScheduleTask error :", e);
}
}
/**
*
* Description:罚息减免每日作废任务
*
* @author haojinlong
* @param objs
* @param request
* @return 2017年11月29日
*/
@Scheduled(cron = "0 59 23 * * ?")
public void instPenaltyDerateScheduleTask() {
log.debug("---罚息减免每日作废任务---开始--");
try {
scheduleTaskServiceImpl.instPenaltyDerateScheduleTask();
} catch (Exception e) {
log.error("OrderSpecialTimeScheduleTask error :", e);
}
log.debug("---罚息减免每日作废任务---完成--");
}
/**
*
* Description:提前结清每日作废任务 0 0/5 * * * ? 0 30 3 * * ?
*
* @author haojinlong
* @param objs
* @param request
* @return 2017年12月28日
*/
@Scheduled(cron = "0 30 3 * * ?")
public void prepaymentEndScheduleTask() {
log.debug("---提前结清每日作废任务---开始--");
try {
scheduleTaskServiceImpl.prepaymentEndScheduleTask();
} catch (Exception e) {
log.error("---提前结清每日作废任务---报错--", e);
}
log.debug("---提前结清每日作废任务---完成--");
}
/**
*
* Description:已结清订单车辆取消监控任务 0 30 * * * ?
*
* @author chenyong
* @param objs
* @param request
* @return 2018年8月16日
*/
@Scheduled(cron = "0 30 * * * ?")
public void stopMonitorOrderLoanriskTask() {
log.info("---已结清订单车辆取消监控任务---开始--");
try {
scheduleTaskServiceImpl.stopMonitorOrderLoanrisk(null);
} catch (Exception e) {
log.error("---已结清订单车辆取消监控任务---报错--", e);
}
log.info("---已结清订单车辆取消监控任务---完成--");
}
}
|
[
"52418304@qq.com"
] |
52418304@qq.com
|
24de5c8fc85c377729e4ac276e2785f3efaee4f2
|
7a8e18ad7ad1cdc6b3a91ca4ff5d402d0d20be17
|
/CFT/elasticsearch/e39a3bae2c9724d837f961268c6890649fd3089d/MembersInjectorStore.java/res_MembersInjectorStore.java
|
58039153acf5cbc1964653a19ae47495a5a9228e
|
[] |
no_license
|
mandelbrotset/Test
|
ec5d5ad5b29d28240f6d21073b41ca60070404b1
|
2a119c9a6077dce184d2edb872489f3f2c5d872e
|
refs/heads/master
| 2021-01-21T04:46:42.441186
| 2016-06-30T15:10:39
| 2016-06-30T15:10:39
| 50,836,379
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,943
|
java
|
/**
* Copyright (C) 2009 Google 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 org.elasticsearch.common.inject;
import org.elasticsearch.common.inject.internal.Errors;
import org.elasticsearch.common.inject.internal.ErrorsException;
import org.elasticsearch.common.inject.internal.FailableCache;
import org.elasticsearch.common.inject.spi.InjectionPoint;
import org.elasticsearch.common.inject.spi.TypeListenerBinding;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
/**
* Members injectors by type.
*
* @author jessewilson@google.com (Jesse Wilson)
*/
class MembersInjectorStore {
private final InjectorImpl injector;
private final List<TypeListenerBinding> typeListenerBindings;
private final FailableCache<TypeLiteral<?>, MembersInjectorImpl<?>> cache
= new FailableCache<TypeLiteral<?>, MembersInjectorImpl<?>>() {
@Override
protected MembersInjectorImpl<?> create(TypeLiteral<?> type, Errors errors)
throws ErrorsException {
return createWithListeners(type, errors);
}
};
MembersInjectorStore(InjectorImpl injector,
List<TypeListenerBinding> typeListenerBindings) {
this.injector = injector;
this.typeListenerBindings = Collections.unmodifiableList(typeListenerBindings);
}
/**
* Returns true if any type listeners are installed. Other code may take shortcuts when there
* aren't any type listeners.
*/
public boolean hasTypeListeners() {
return !typeListenerBindings.isEmpty();
}
/**
* Returns a new complete members injector with injection listeners registered.
*/
@SuppressWarnings("unchecked") // the MembersInjector type always agrees with the passed type
public <T> MembersInjectorImpl<T> get(TypeLiteral<T> key, Errors errors) throws ErrorsException {
return (MembersInjectorImpl<T>) cache.get(key, errors);
}
/**
* Creates a new members injector and attaches both injection listeners and method aspects.
*/
private <T> MembersInjectorImpl<T> createWithListeners(TypeLiteral<T> type, Errors errors)
throws ErrorsException {
int numErrorsBefore = errors.size();
Set<InjectionPoint> injectionPoints;
try {
injectionPoints = InjectionPoint.forInstanceMethodsAndFields(type);
} catch (ConfigurationException e) {
errors.merge(e.getErrorMessages());
injectionPoints = e.getPartialValue();
}
List<SingleMemberInjector> injectors = getInjectors(injectionPoints, errors);
errors.throwIfNewErrors(numErrorsBefore);
EncounterImpl<T> encounter = new EncounterImpl<>(errors, injector.lookups);
for (TypeListenerBinding typeListener : typeListenerBindings) {
if (typeListener.getTypeMatcher().matches(type)) {
try {
typeListener.getListener().hear(type, encounter);
} catch (RuntimeException e) {
errors.errorNotifyingTypeListener(typeListener, type, e);
}
}
}
encounter.invalidate();
errors.throwIfNewErrors(numErrorsBefore);
return new MembersInjectorImpl<>(injector, type, encounter, injectors);
}
/**
* Returns the injectors for the specified injection points.
*/
List<SingleMemberInjector> getInjectors(
Set<InjectionPoint> injectionPoints, Errors errors) {
List<SingleMemberInjector> injectors = new ArrayList<>();
for (InjectionPoint injectionPoint : injectionPoints) {
try {
Errors errorsForMember = injectionPoint.isOptional()
? new Errors(injectionPoint)
: errors.withSource(injectionPoint);
SingleMemberInjector injector = injectionPoint.getMember() instanceof Field
? new SingleFieldInjector(this.injector, injectionPoint, errorsForMember)
: new SingleMethodInjector(this.injector, injectionPoint, errorsForMember);
injectors.add(injector);
} catch (ErrorsException ignoredForNow) {
// ignored for now
}
}
return Collections.unmodifiableList(injectors);
}
}
|
[
"dollarmannen@gmail.com"
] |
dollarmannen@gmail.com
|
f7ca2882fab829e7bc18df86554d11cdbad0a086
|
eb866cc8920911c79afa0c3f22611f400d15874c
|
/simpleos/src.simple/net/simpleframework/web/page/component/ui/colorpalette/ColorPaletteResourceProvider.java
|
c58d0a91dd8803b02823c3f75be355d21aa8dd95
|
[] |
no_license
|
eliyanfei/simpleos
|
bca0d8520ccae5bc1a8acceaaf1031441a5c315b
|
c371c0d4bbb87462209f424cddd796578cf967c8
|
refs/heads/master
| 2021-01-21T13:49:19.610336
| 2015-08-18T01:23:13
| 2015-08-18T01:23:13
| 26,625,820
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,651
|
java
|
package net.simpleframework.web.page.component.ui.colorpalette;
import java.util.Collection;
import net.simpleframework.web.page.PageRequestResponse;
import net.simpleframework.web.page.component.AbstractComponentBean;
import net.simpleframework.web.page.component.AbstractComponentResourceProvider;
import net.simpleframework.web.page.component.IComponentRegistry;
import net.simpleframework.web.page.component.ui.slider.SliderRegistry;
/**
* 这是一个开源的软件,请在LGPLv3下合法使用、修改或重新发布。
*
* @author 陈侃(cknet@126.com, 13910090885)
* http://code.google.com/p/simpleframework/
* http://www.simpleframework.net
*/
public class ColorPaletteResourceProvider extends AbstractComponentResourceProvider {
private final static String[] JAVASCRIPT_PATH = new String[] { "/js/colorutils.js",
"/js/colorpalette.js" };
public ColorPaletteResourceProvider(final IComponentRegistry componentRegistry) {
super(componentRegistry);
}
@Override
public String[] getDependentComponents(final PageRequestResponse requestResponse,
final Collection<AbstractComponentBean> componentBeans) {
return new String[] { SliderRegistry.slider };
}
@Override
public String[] getCssPath(final PageRequestResponse requestResponse,
final Collection<AbstractComponentBean> componentBeans) {
return new String[] { getCssSkin(requestResponse, "colorpalette.css") };
}
@Override
public String[] getJavascriptPath(final PageRequestResponse requestResponse,
final Collection<AbstractComponentBean> componentBeans) {
return JAVASCRIPT_PATH;
}
}
|
[
"eliyanfei@126.com"
] |
eliyanfei@126.com
|
20d228206b8f9f5973286930c14494d4e6686399
|
eb9f655206c43c12b497c667ba56a0d358b6bc3a
|
/plugins/lombok/src/main/java/de/plushnikov/intellij/plugin/psi/LombokLightFieldBuilder.java
|
60d1d38bbe45643e014392ef3c9f87ed08082bc9
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-community
|
2ed226e200ecc17c037dcddd4a006de56cd43941
|
05dbd4575d01a213f3f4d69aa4968473f2536142
|
refs/heads/master
| 2023-09-03T17:06:37.560889
| 2023-09-03T11:51:00
| 2023-09-03T12:12:27
| 2,489,216
| 16,288
| 6,635
|
Apache-2.0
| 2023-09-12T07:41:58
| 2011-09-30T13:33:05
| null |
UTF-8
|
Java
| false
| false
| 5,128
|
java
|
package de.plushnikov.intellij.plugin.psi;
import com.intellij.openapi.util.TextRange;
import com.intellij.psi.*;
import com.intellij.psi.impl.CheckUtil;
import com.intellij.psi.impl.light.LightFieldBuilder;
import com.intellij.psi.impl.light.LightModifierList;
import com.intellij.util.IncorrectOperationException;
import icons.LombokIcons;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Objects;
import java.util.stream.Stream;
/**
* @author Plushnikov Michail
*/
public class LombokLightFieldBuilder extends LightFieldBuilder implements SyntheticElement {
private String myName;
private final LombokLightIdentifier myNameIdentifier;
private final LombokLightModifierList myModifierList;
public LombokLightFieldBuilder(@NotNull PsiManager manager, @NotNull String name, @NotNull PsiType type) {
super(manager, name, type);
myName = name;
myNameIdentifier = new LombokLightIdentifier(manager, name);
myModifierList = new LombokLightModifierList(manager);
setBaseIcon(LombokIcons.Nodes.LombokField);
}
@Override
@NotNull
public LombokLightModifierList getModifierList() {
return myModifierList;
}
@Override
public @NotNull LombokLightFieldBuilder setModifiers(@NotNull String @NotNull ... modifiers) {
myModifierList.clearModifiers();
Stream.of(modifiers).forEach(myModifierList::addModifier);
return this;
}
@Override
public @NotNull LombokLightFieldBuilder setModifierList(LightModifierList modifierList) {
setModifiers(modifierList.getModifiers());
return this;
}
@Override
public boolean hasModifierProperty(@NonNls @NotNull String name) {
return myModifierList.hasModifierProperty(name);
}
@Nullable
@Override
public PsiFile getContainingFile() {
PsiClass containingClass = getContainingClass();
return containingClass != null ? containingClass.getContainingFile() : null;
}
public LombokLightFieldBuilder withContainingClass(PsiClass psiClass) {
setContainingClass(psiClass);
return this;
}
public LombokLightFieldBuilder withImplicitModifier(@PsiModifier.ModifierConstant @NotNull @NonNls String modifier) {
myModifierList.addImplicitModifierProperty(modifier);
return this;
}
public LombokLightFieldBuilder withModifier(@PsiModifier.ModifierConstant @NotNull @NonNls String modifier) {
myModifierList.addModifier(modifier);
return this;
}
public LombokLightFieldBuilder withNavigationElement(PsiElement navigationElement) {
setNavigationElement(navigationElement);
return this;
}
@NotNull
@Override
public String getName() {
return myName;
}
@Override
public PsiElement setName(@NotNull String name) {
myName = name;
myNameIdentifier.setText(myName);
return this;
}
@NotNull
@Override
public PsiIdentifier getNameIdentifier() {
return myNameIdentifier;
}
public String toString() {
return "LombokLightFieldBuilder: " + getName();
}
@Override
public PsiElement replace(@NotNull PsiElement newElement) throws IncorrectOperationException {
// just add new element to the containing class
final PsiClass containingClass = getContainingClass();
if (null != containingClass) {
CheckUtil.checkWritable(containingClass);
return containingClass.add(newElement);
}
return null;
}
@Override
public TextRange getTextRange() {
TextRange r = super.getTextRange();
return r == null ? TextRange.EMPTY_RANGE : r;
}
@Override
public void delete() throws IncorrectOperationException {
// simple do nothing
}
@Override
public void checkDelete() throws IncorrectOperationException {
// simple do nothing
}
@Override
public boolean isEquivalentTo(PsiElement another) {
if (another instanceof LombokLightFieldBuilder anotherLightField) {
boolean stillEquivalent = getName().equals(anotherLightField.getName()) &&
getType().equals(anotherLightField.getType());
if (stillEquivalent) {
final PsiClass containingClass = getContainingClass();
final PsiClass anotherContainingClass = anotherLightField.getContainingClass();
stillEquivalent = (null == containingClass && null == anotherContainingClass) ||
(null != containingClass && containingClass.isEquivalentTo(anotherContainingClass));
}
return stillEquivalent;
} else {
return super.isEquivalentTo(another);
}
}
@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
LombokLightFieldBuilder that = (LombokLightFieldBuilder) o;
return
Objects.equals(myName, that.myName) &&
Objects.equals(myNameIdentifier, that.myNameIdentifier) &&
Objects.equals(myModifierList, that.myModifierList) &&
Objects.equals(getContainingClass(), that.getContainingClass());
}
@Override
public int hashCode() {
return Objects.hash(myName, myNameIdentifier, myModifierList, getContainingClass());
}
}
|
[
"intellij-monorepo-bot-no-reply@jetbrains.com"
] |
intellij-monorepo-bot-no-reply@jetbrains.com
|
15728b1f24d5651904468d72951d01aadd5fdaeb
|
1e0d2613af81362370a59fc99bde1429088d4f2c
|
/src/test/java/tests/java/lang/ThreadLocalTest.java
|
ccf1c24a1f9890b4bc81fed477052009b2e7b408
|
[
"Apache-2.0"
] |
permissive
|
jjYBdx4IL/java-evaluation
|
3134605ae4a666cabf41494dd4261a0d21585a16
|
744dc4f4a26e264eb1aeab9383babb505aeae056
|
refs/heads/master
| 2021-07-01T16:25:16.416416
| 2021-06-19T14:44:44
| 2021-06-19T14:44:44
| 88,812,127
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,175
|
java
|
package tests.java.lang;
/*
* #%L
* Evaluation
* %%
* Copyright (C) 2014 Github jjYBdx4IL Projects
* %%
* #L%
*/
import static org.junit.Assert.*;
import org.junit.Test;
public class ThreadLocalTest {
@Test
public void test1() throws InterruptedException {
final ThreadLocal<String> threadLocalMap = new ThreadLocal<>();
threadLocalMap.set("1");
Thread t = new Thread() {
@Override
public void run() {
threadLocalMap.set("2");
}
};
t.start();
t.join();
assertEquals("1", threadLocalMap.get());
}
@Test
public void testInitialValueNoUserDef() throws InterruptedException {
final ThreadLocal<String> strings = new ThreadLocal<>();
assertNull(strings.get());
}
@Test
public void testInitialValueUserDef() throws InterruptedException {
final ThreadLocal<String> strings = new ThreadLocal<String>() {
@Override protected String initialValue() {
return "abc";
}
};
assertNotNull(strings.get());
assertEquals("abc", strings.get());
}
}
|
[
"jjYBdx4IL@github.com"
] |
jjYBdx4IL@github.com
|
87c988cd82023f0d2aa88f8415205ed66d479eda
|
9d351294aaaa2248713afd64325f13b1c85f36f8
|
/web/common/src/main/java/org/appfuse/webapp/filter/LocaleFilter.java
|
46e24890acd0d0bfd2ca749bfcd44c4084098317
|
[
"Apache-2.0"
] |
permissive
|
irakov/appfuse
|
4d4b75721ca624e3b115d190b32f1fdede8ba46c
|
4d7fca8451dd3e3dbf008e60dfc6c8f9e3a19696
|
refs/heads/master
| 2021-01-17T10:18:59.754473
| 2015-02-20T21:25:41
| 2015-02-20T21:25:41
| 31,731,029
| 1
| 0
| null | 2015-03-05T19:09:47
| 2015-03-05T19:09:47
| null |
UTF-8
|
Java
| false
| false
| 2,650
|
java
|
package org.appfuse.webapp.filter;
import org.appfuse.Constants;
import org.springframework.context.i18n.LocaleContextHolder;
import org.springframework.web.filter.OncePerRequestFilter;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import javax.servlet.jsp.jstl.core.Config;
import java.io.IOException;
import java.util.Locale;
/**
* Filter to wrap request with a request including user preferred locale.
*/
public class LocaleFilter extends OncePerRequestFilter {
/**
* This method looks for a "locale" request parameter. If it finds one, it sets it as the preferred locale
* and also configures it to work with JSTL.
*
* @param request the current request
* @param response the current response
* @param chain the chain
* @throws IOException when something goes wrong
* @throws ServletException when a communication failure happens
*/
@SuppressWarnings("unchecked")
public void doFilterInternal(HttpServletRequest request, HttpServletResponse response,
FilterChain chain)
throws IOException, ServletException {
String locale = request.getParameter("locale");
Locale preferredLocale = null;
if (locale != null) {
int indexOfUnderscore = locale.indexOf('_');
if (indexOfUnderscore != -1) {
String language = locale.substring(0, indexOfUnderscore);
String country = locale.substring(indexOfUnderscore + 1);
preferredLocale = new Locale(language, country);
} else {
preferredLocale = new Locale(locale);
}
}
HttpSession session = request.getSession(false);
if (session != null) {
if (preferredLocale == null) {
preferredLocale = (Locale) session.getAttribute(Constants.PREFERRED_LOCALE_KEY);
} else {
session.setAttribute(Constants.PREFERRED_LOCALE_KEY, preferredLocale);
Config.set(session, Config.FMT_LOCALE, preferredLocale);
}
if (preferredLocale != null && !(request instanceof LocaleRequestWrapper)) {
request = new LocaleRequestWrapper(request, preferredLocale);
LocaleContextHolder.setLocale(preferredLocale);
}
}
chain.doFilter(request, response);
// Reset thread-bound LocaleContext.
LocaleContextHolder.setLocaleContext(null);
}
}
|
[
"matt@raibledesigns.com"
] |
matt@raibledesigns.com
|
eafadef875fd205c32a440dfc98c5b90d986b788
|
7d169e796639b01c6b652f12effa1d59951b8345
|
/src/java/org/apache/bcel/generic/IMPDEP2.java
|
ebbb5248a61e4dd5cde703fa543bcafcae7a6b0a
|
[
"Apache-2.0"
] |
permissive
|
dubenju/javay
|
65555744a895ecbd345df07e5537072985095e3b
|
29284c847c2ab62048538c3973a9fb10090155aa
|
refs/heads/master
| 2021-07-09T23:44:55.086890
| 2020-07-08T13:03:50
| 2020-07-08T13:03:50
| 47,082,846
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,453
|
java
|
package org.apache.bcel.generic;
/* ====================================================================
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. 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. The end-user documentation included with the redistribution,
* if any, must include the following acknowledgment:
* "This product includes software developed by the
* Apache Software Foundation (http://www.apache.org/)."
* Alternately, this acknowledgment may appear in the software itself,
* if and wherever such third-party acknowledgments normally appear.
*
* 4. The names "Apache" and "Apache Software Foundation" and
* "Apache BCEL" must not be used to endorse or promote products
* derived from this software without prior written permission. For
* written permission, please contact apache@apache.org.
*
* 5. Products derived from this software may not be called "Apache",
* "Apache BCEL", nor may "Apache" appear in their name, without
* prior written permission of the Apache Software Foundation.
*
* THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED 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 APACHE SOFTWARE FOUNDATION OR
* ITS 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.
* ====================================================================
*
* This software consists of voluntary contributions made by many
* individuals on behalf of the Apache Software Foundation. For more
* information on the Apache Software Foundation, please see
* <http://www.apache.org/>.
*/
/**
* IMPDEP2 - Implementation dependent
*
* @version $Id: IMPDEP2.java,v 1.2 2006/08/23 13:48:30 andos Exp $
* @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A>
*/
public class IMPDEP2 extends Instruction {
/**
*
*/
private static final long serialVersionUID = 4097564761941607538L;
public IMPDEP2() {
super(org.apache.bcel.Constants.IMPDEP2, (short)1);
}
/**
* Call corresponding visitor method(s). The order is:
* Call visitor methods of implemented interfaces first, then
* call methods according to the class hierarchy in descending order,
* i.e., the most specific visitXXX() call comes last.
*
* @param v Visitor object
*/
public void accept(Visitor v) {
v.visitIMPDEP2(this);
}
}
|
[
"dubenju@163.com"
] |
dubenju@163.com
|
c6c9fcf2df6c8d2348db479d6f7d869beabcccfd
|
91e8d244f5f90e9d16bb322cf1e4ad13b74fbb71
|
/src/com/gmail/berndivader/MythicPlayers/Mechanics/mmSetTarget.java
|
309b566b0584c4fab92e5aa0f48f41abdbbe3cf4
|
[] |
no_license
|
Jwguy0/mmCustomSkills26
|
b4fb877345d851bbd7c3a91ec8b73d7b43fe5507
|
955fc29c9beb97e2e04d93da665dfd82c18d5f67
|
refs/heads/master
| 2021-05-06T08:55:32.129665
| 2017-12-09T22:59:02
| 2017-12-09T22:59:02
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,763
|
java
|
package com.gmail.berndivader.MythicPlayers.Mechanics;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import com.gmail.berndivader.mmcustomskills26.CustomSkillStuff;
import io.lumine.xikage.mythicmobs.adapters.bukkit.BukkitAdapter;
import io.lumine.xikage.mythicmobs.io.MythicLineConfig;
import io.lumine.xikage.mythicmobs.mobs.ActiveMob;
import io.lumine.xikage.mythicmobs.skills.INoTargetSkill;
import io.lumine.xikage.mythicmobs.skills.SkillMechanic;
import io.lumine.xikage.mythicmobs.skills.SkillMetadata;
public class mmSetTarget extends SkillMechanic implements INoTargetSkill {
protected String[] filter;
protected boolean targetself;
public mmSetTarget(String skill, MythicLineConfig mlc) {
super(skill, mlc);
this.ASYNC_SAFE = false;
this.filter = mlc.getString(new String[] { "filter", "f" }, "").split(",");
this.targetself = mlc.getBoolean(new String[] { "selfnotarget", "snt" }, false);
}
@Override
public boolean cast(SkillMetadata data) {
LivingEntity le;
if (data.getCaster().getEntity().isPlayer() && (data.getCaster() instanceof ActiveMob)) {
ActiveMob am = (ActiveMob) data.getCaster();
if (am.getThreatTable().size() > 0) {
am.getThreatTable().clearTarget();
am.getThreatTable().getAllThreatTargets().clear();
}
le = CustomSkillStuff.getTargetedEntity((Player) BukkitAdapter.adapt(data.getCaster().getEntity()));
if (le != null) {
am.getThreatTable().threatGain(BukkitAdapter.adapt(le), 99999999);
am.getThreatTable().targetHighestThreat();
} else if (this.targetself) {
am.getThreatTable().threatGain(am.getEntity(), 99999999);
am.getThreatTable().targetHighestThreat();
}
}
return true;
}
}
|
[
"kasermandel@gmail.com"
] |
kasermandel@gmail.com
|
a8e624a80dd576729005017addff661050969ae1
|
feba5f4eb48d3ebeeb21b02375d7f1ef13b0ba60
|
/ideaworks/basic_code/day11/src/demo/innerclass/BodyTest.java
|
bcbaf90ccd97712146ee08bf01206860e063d380
|
[] |
no_license
|
1123762330/idea_works
|
585eb009bbe4e4adcac355449ee9067ef7562c42
|
8a2bdf4bddcdf3ab7d63d3d32c93ff579c49b156
|
refs/heads/master
| 2022-12-21T08:47:09.217103
| 2019-12-18T04:39:06
| 2019-12-18T04:39:06
| 228,755,276
| 0
| 0
| null | 2022-12-16T04:39:35
| 2019-12-18T04:06:38
|
Java
|
UTF-8
|
Java
| false
| false
| 160
|
java
|
package demo.innerclass;
public class BodyTest {
public static void main(String[] args) {
Body body=new Body();
body.methodBody();
}
}
|
[
"1123762330@qq.com"
] |
1123762330@qq.com
|
4ec318ed237fd672c1ca1357261d2d4e162cda7a
|
d68b23a8af66b07f6e443e1ad485fa16150b0dc0
|
/csharp-impl/src/main/java/consulo/csharp/impl/ide/actions/navigate/GotoSuperMethodHandler.java
|
1cb93a4a3ea699730e0551d43fe5432e96135a0f
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-csharp
|
34e1f591b31411cfa4ac6b96e82522e5ffbf80ad
|
ccb078d27b4ba37be9bb3f2c258aad9fb152a640
|
refs/heads/master
| 2023-08-31T16:12:36.841763
| 2023-08-17T10:56:13
| 2023-08-17T10:56:13
| 21,350,424
| 51
| 9
|
Apache-2.0
| 2023-01-01T16:33:23
| 2014-06-30T12:35:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,170
|
java
|
/*
* Copyright 2013-2017 consulo.io
*
* 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 consulo.csharp.impl.ide.actions.navigate;
import consulo.annotation.component.ExtensionImpl;
import consulo.codeEditor.Editor;
import consulo.csharp.lang.CSharpFileType;
import consulo.csharp.lang.CSharpLanguage;
import consulo.csharp.lang.impl.psi.source.resolve.overrideSystem.OverrideUtil;
import consulo.dotnet.psi.DotNetModifier;
import consulo.dotnet.psi.DotNetModifierListOwner;
import consulo.dotnet.psi.DotNetVirtualImplementOwner;
import consulo.language.Language;
import consulo.language.editor.action.GotoSuperActionHander;
import consulo.language.psi.PsiElement;
import consulo.language.psi.PsiFile;
import consulo.language.psi.util.PsiTreeUtil;
import consulo.navigation.Navigatable;
import consulo.project.Project;
import consulo.util.collection.ContainerUtil;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import java.util.Collection;
/**
* @author VISTALL
* @since 16.12.14
*/
@ExtensionImpl
public class GotoSuperMethodHandler implements GotoSuperActionHander
{
@Nullable
public static DotNetVirtualImplementOwner findVirtualImplementOwner(@Nonnull Editor editor, @Nonnull PsiFile file)
{
if(file.getFileType() != CSharpFileType.INSTANCE)
{
return null;
}
final int offset = editor.getCaretModel().getOffset();
final PsiElement elementAt = file.findElementAt(offset);
if(elementAt == null)
{
return null;
}
return PsiTreeUtil.getParentOfType(elementAt, DotNetVirtualImplementOwner.class);
}
@Override
public boolean isValidFor(Editor editor, PsiFile file)
{
return findVirtualImplementOwner(editor, file) != null;
}
@Override
public void invoke(@Nonnull Project project, @Nonnull Editor editor, @Nonnull PsiFile file)
{
DotNetVirtualImplementOwner virtualImplementOwner = findVirtualImplementOwner(editor, file);
if(virtualImplementOwner == null)
{
return;
}
Collection<DotNetVirtualImplementOwner> collection = OverrideUtil.collectOverridingMembers(virtualImplementOwner);
for(DotNetVirtualImplementOwner owner : collection)
{
if(!(owner instanceof DotNetModifierListOwner && ((DotNetModifierListOwner) owner).hasModifier(DotNetModifier.ABSTRACT)))
{
((Navigatable)owner).navigate(true);
return;
}
}
DotNetVirtualImplementOwner firstItem = ContainerUtil.getFirstItem(collection);
if(firstItem instanceof Navigatable)
{
((Navigatable) firstItem).navigate(true);
}
}
@Override
public boolean startInWriteAction()
{
return false;
}
@Nonnull
@Override
public Language getLanguage()
{
return CSharpLanguage.INSTANCE;
}
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
0915814ed5f97eb9aae6d1f452b34b68019d3d87
|
d66be5471ac454345de8f118ab3aa3fe55c0e1ee
|
/loadbalancer/src/main/java/org/jclouds/loadbalancer/strategy/LoadBalanceNodesStrategy.java
|
6e9a8b86fdbfaeeb47970519accf5f48ba8df9a2
|
[
"Apache-2.0"
] |
permissive
|
adiantum/jclouds
|
3405b8daf75b8b45e95a24ff64fda6dc3eca9ed6
|
1cfbdf00f37fddf04249feedd6fc18ee122bdb72
|
refs/heads/master
| 2021-01-18T06:02:46.877904
| 2011-04-05T07:14:18
| 2011-04-05T07:14:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,378
|
java
|
/**
*
* Copyright (C) 2010 Cloud Conscious, LLC. <info@cloudconscious.com>
*
* ====================================================================
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ====================================================================
*/
package org.jclouds.loadbalancer.strategy;
import org.jclouds.compute.domain.NodeMetadata;
import org.jclouds.domain.Location;
import org.jclouds.loadbalancer.domain.LoadBalancerMetadata;
import com.google.common.annotations.Beta;
/**
* Creates a load balancer for nodes listed
*
* @author Lili Nader
*/
public interface LoadBalanceNodesStrategy {
/**
* @param location
* null if default
* @param loadBalancerName
* Load balancer name
* @param protocol
* LoadBalancer transport protocol to use for routing - TCP or HTTP. This property
* cannot be modified for the life of the LoadBalancer.
* @param loadBalancerPort
* The external TCP port of the LoadBalancer. Valid LoadBalancer ports are - 80, 443
* and 1024 through 65535. This property cannot be modified for the life of the
* LoadBalancer.
* @param instancePort
* The InstancePort data type is simple type of type: integer. It is the TCP port on
* which the server on the instance is listening. Valid instance ports are one (1)
* through 65535. This property cannot be modified for the life of the LoadBalancer.
* @param nodes
* nodes to loadbalance
*
* @return newly created loadbalancer
* @see org.jclouds.compute.ComputeService
*/
@Beta
LoadBalancerMetadata createLoadBalancerInLocation(Location location, String name, String protocol, int loadBalancerPort,
int instancePort, Iterable<? extends NodeMetadata> nodes);
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
476bd8ffd5f6a4154f1c25fd86c237fcad09236f
|
590f065619a7168d487eec05db0fd519cfb103b5
|
/evosuite-tests/com/iluwatar/mediator/Hobbit_ESTest_scaffolding.java
|
a7da48fe49c23cdd9c0ba79f401f57cb8546f192
|
[] |
no_license
|
parthenos0908/EvoSuiteTrial
|
3de131de94e8d23062ab3ba97048d01d504be1fb
|
46f9eeeca7922543535737cca3f5c62d71352baf
|
refs/heads/master
| 2023-02-17T05:00:39.572316
| 2021-01-18T00:06:01
| 2021-01-18T00:06:01
| 323,848,050
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,139
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Jan 11 09:38:18 GMT 2021
*/
package com.iluwatar.mediator;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class Hobbit_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.iluwatar.mediator.Hobbit";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "C:\\Users\\disto\\gitrepos\\EvoSuiteTrial");
java.lang.System.setProperty("java.io.tmpdir", "C:\\Users\\disto\\AppData\\Local\\Temp\\");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Hobbit_ESTest_scaffolding.class.getClassLoader() ,
"com.iluwatar.mediator.Party",
"com.iluwatar.mediator.Hobbit",
"com.iluwatar.mediator.Action",
"com.iluwatar.mediator.PartyMember",
"com.iluwatar.mediator.PartyMemberBase"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(Hobbit_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.iluwatar.mediator.PartyMemberBase",
"com.iluwatar.mediator.Hobbit",
"com.iluwatar.mediator.PartyImpl",
"com.iluwatar.mediator.Wizard",
"com.iluwatar.mediator.Hunter",
"com.iluwatar.mediator.Rogue"
);
}
}
|
[
"distortion0908@gmail.com"
] |
distortion0908@gmail.com
|
1cf2fa5f300081c20a72253db016b7597f8a53eb
|
590f10f439fc7b8835c84434aea334be5f4496ef
|
/src/main/java/edu/uiowa/slis/ClinicalTrialsTagLib/resultsMeasurement/ResultsMeasurementID.java
|
326d78ae2961fe1720f42d33c51aa3157a99f783
|
[] |
no_license
|
data2health/ClinicalTrialsTagLib
|
9202067a2627727f4570f12cb1875bc0e87f7d41
|
cd209a50afbf2cc5dc82f5e5a360719ccf18eadf
|
refs/heads/master
| 2021-12-08T06:50:14.620121
| 2021-01-11T22:59:09
| 2021-01-11T22:59:09
| 213,464,785
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,831
|
java
|
package edu.uiowa.slis.ClinicalTrialsTagLib.resultsMeasurement;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import edu.uiowa.slis.ClinicalTrialsTagLib.ClinicalTrialsTagLibTagSupport;
@SuppressWarnings("serial")
public class ResultsMeasurementID extends ClinicalTrialsTagLibTagSupport {
private static final Log log = LogFactory.getLog(ResultsMeasurementID.class);
public int doStartTag() throws JspException {
try {
ResultsMeasurement theResultsMeasurement = (ResultsMeasurement)findAncestorWithClass(this, ResultsMeasurement.class);
if (!theResultsMeasurement.commitNeeded) {
pageContext.getOut().print(theResultsMeasurement.getID());
}
} catch (Exception e) {
log.error("Can't find enclosing ResultsMeasurement for ID tag ", e);
throw new JspTagException("Error: Can't find enclosing ResultsMeasurement for ID tag ");
}
return SKIP_BODY;
}
public int getID() throws JspTagException {
try {
ResultsMeasurement theResultsMeasurement = (ResultsMeasurement)findAncestorWithClass(this, ResultsMeasurement.class);
return theResultsMeasurement.getID();
} catch (Exception e) {
log.error(" Can't find enclosing ResultsMeasurement for ID tag ", e);
throw new JspTagException("Error: Can't find enclosing ResultsMeasurement for ID tag ");
}
}
public void setID(int ID) throws JspTagException {
try {
ResultsMeasurement theResultsMeasurement = (ResultsMeasurement)findAncestorWithClass(this, ResultsMeasurement.class);
theResultsMeasurement.setID(ID);
} catch (Exception e) {
log.error("Can't find enclosing ResultsMeasurement for ID tag ", e);
throw new JspTagException("Error: Can't find enclosing ResultsMeasurement for ID tag ");
}
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
c380b60d8c9eacebe371bedbf3e29028e6998639
|
81b2447476f403b06ec41ec9d93cd6963fe57869
|
/customnavigationdrawer2/src/main/java/com/shrikanthravi/customnavigationdrawer2/data/MenuItem.java
|
d1ebe67e073e4c8631319da231240b301002e73f
|
[] |
no_license
|
MeghaPatel2022/Calendar
|
61934eab299d9e0870fb0892a59049d986141ced
|
28490c480d17c87baaee93d34a76e8a982ed69bf
|
refs/heads/master
| 2023-08-12T05:38:34.236289
| 2021-10-11T10:25:23
| 2021-10-11T10:25:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 769
|
java
|
package com.shrikanthravi.customnavigationdrawer2.data;
public class MenuItem {
String title;
int imageId;
int imageIdSmall;
public MenuItem(String title, int imageId, int imageIdSmall) {
this.title = title;
this.imageId = imageId;
this.imageIdSmall = imageIdSmall;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public int getImageId() {
return imageId;
}
public void setImageId(int imageId) {
this.imageId = imageId;
}
public int getImageIdSmall() {
return imageIdSmall;
}
public void setImageIdSmall(int imageIdSmall) {
this.imageIdSmall = imageIdSmall;
}
}
|
[
"megha.bpatel2022@gmail.com"
] |
megha.bpatel2022@gmail.com
|
15f4f313775938efea668231379d33604019b14e
|
12a99ab3fe76e5c7c05609c0e76d1855bd051bbb
|
/src/main/java/com/alipay/api/domain/AlipayOpenMiniAppdeployBydeployversionQueryModel.java
|
34ad131ec8245b8bfca45bec25fb474510146445
|
[
"Apache-2.0"
] |
permissive
|
WindLee05-17/alipay-sdk-java-all
|
ce2415cfab2416d2e0ae67c625b6a000231a8cfc
|
19ccb203268316b346ead9c36ff8aa5f1eac6c77
|
refs/heads/master
| 2022-11-30T18:42:42.077288
| 2020-08-17T05:57:47
| 2020-08-17T05:57:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,354
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 根据发布版本查询小程序发布信息
*
* @author auto create
* @since 1.0, 2020-04-09 16:32:59
*/
public class AlipayOpenMiniAppdeployBydeployversionQueryModel extends AlipayObject {
private static final long serialVersionUID = 1878959979141623112L;
/**
* 客户端标识
*/
@ApiField("bundle_id")
private String bundleId;
/**
* 发布标识
*/
@ApiField("deploy_version")
private String deployVersion;
/**
* 租户
*/
@ApiField("inst_code")
private String instCode;
/**
* 小程序ID
*/
@ApiField("mini_app_id")
private String miniAppId;
public String getBundleId() {
return this.bundleId;
}
public void setBundleId(String bundleId) {
this.bundleId = bundleId;
}
public String getDeployVersion() {
return this.deployVersion;
}
public void setDeployVersion(String deployVersion) {
this.deployVersion = deployVersion;
}
public String getInstCode() {
return this.instCode;
}
public void setInstCode(String instCode) {
this.instCode = instCode;
}
public String getMiniAppId() {
return this.miniAppId;
}
public void setMiniAppId(String miniAppId) {
this.miniAppId = miniAppId;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
6aa5299cbe49e874536367f764572159fdd2a32d
|
2c658561c97e833f723a520d062ddca6468fa4fa
|
/src/test/java/com/submitted/resultmap/PhoneNumber.java
|
03fda5a9e8e02faaf0fd63d111ef88c93ddb830a
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
deboss/mybatis
|
3e3f3784052893d32f700a9ad5efef73ed5f017f
|
30272c0ec05ba809c3c98dfcb0ad6f0abd0964cd
|
refs/heads/master
| 2021-01-13T17:05:05.905388
| 2014-02-01T18:44:51
| 2014-02-01T18:44:51
| 15,296,108
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,042
|
java
|
/*
* Copyright 2009-2012 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 com.submitted.resultmap;
public class PhoneNumber {
private Integer id;
private String number;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNumber() {
return number;
}
public void setNumber(String number) {
this.number = number;
}
public String toString() {
return number;
}
}
|
[
"eduardo.macarron@gmail.com"
] |
eduardo.macarron@gmail.com
|
39299a427f73a4f34a30dd8bb8bd9ff03b40b42d
|
e83352f5898fa7b49034e0c0af37f62c4eaacc06
|
/Concept/src/com/corejava/arrays/Lab234.java
|
ba40dc3a22193ac46c7d0c5f91d3b9ba100c2dc1
|
[] |
no_license
|
binodjava/Project
|
8541bf5d1f23952949b796b9e678e3efdc00aadf
|
9c261abe8fd1058957437b95c806141fcad6f9d7
|
refs/heads/master
| 2021-09-09T14:12:15.536067
| 2018-03-16T21:38:53
| 2018-03-16T21:38:53
| 125,569,126
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 385
|
java
|
package com.corejava.arrays;
public class Lab234 {
static int arr[];
static String names[];
public static void main(String[] args) {
System.out.println(arr);//null
System.out.println(names);//null
// Since Array has not been created, so refrence variable contains null value, no any address
// if Array is created then ref var point addredd i.e elements in array
}
}
|
[
"binodk.java@gmail.com"
] |
binodk.java@gmail.com
|
281e496d2a6872d3458cc3c115d78aa796f5bde4
|
4b2b6fe260ba39f684f496992513cb8bc07dfcbc
|
/com/planet_ink/coffee_mud/Commands/Link.java
|
269594859da8574d1765fecfce0a00976faaecc7
|
[
"Apache-2.0"
] |
permissive
|
vjanmey/EpicMudfia
|
ceb26feeac6f5b3eb48670f81ea43d8648314851
|
63c65489c673f4f8337484ea2e6ebfc11a09364c
|
refs/heads/master
| 2021-01-18T20:12:08.160733
| 2014-06-22T04:38:14
| 2014-06-22T04:38:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,750
|
java
|
package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
/*
Copyright 2000-2014 Bo Zimmerman
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.
*/
@SuppressWarnings("rawtypes")
public class Link extends At
{
public Link(){}
private final String[] access=_i(new String[]{"LINK"});
@Override public String[] getAccessWords(){return access;}
@Override
public boolean execute(MOB mob, Vector commands, int metaFlags)
throws java.io.IOException
{
mob.location().show(mob,null,CMMsg.MSG_OK_VISUAL,_("^S<S-NAME> wave(s) <S-HIS-HER> arms...^?"));
if(commands.size()<3)
{
mob.tell(_("You have failed to specify the proper fields.\n\rThe format is LINK [ROOM ID] [DIRECTION]\n\r"));
mob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,_("<S-NAME> flub(s) a powerful spell."));
return false;
}
final String dirStr=(String)commands.lastElement();
commands.removeElementAt(commands.size()-1);
final int direction=Directions.getGoodDirectionCode(dirStr);
if(direction<0)
{
mob.tell(_("You have failed to specify a direction. Try @x1.\n\r",Directions.LETTERS()));
mob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,_("<S-NAME> flub(s) a powerful spell."));
return false;
}
Room thisRoom=null;
final String RoomID=CMParms.combine(commands,1);
thisRoom=CMLib.map().getRoom(RoomID);
if(thisRoom==null)
{
thisRoom=CMLib.map().findWorldRoomLiberally(mob,RoomID,"R",100,120000);
if(thisRoom==null)
{
mob.tell(_("Room \"@x1\" is unknown. Try again.",RoomID));
mob.location().showOthers(mob,null,CMMsg.MSG_OK_ACTION,_("<S-NAME> flub(s) a powerful spell."));
return false;
}
}
exitifyNewPortal(mob,thisRoom,direction);
mob.location().getArea().fillInAreaRoom(mob.location());
mob.location().getArea().fillInAreaRoom(thisRoom);
mob.location().recoverRoomStats();
mob.location().showHappens(CMMsg.MSG_OK_ACTION,_("Suddenly a portal opens up in the landscape.\n\r"));
Log.sysOut("Link",mob.Name()+" linked "+CMLib.map().getExtendedRoomID(mob.location())+" to room "+CMLib.map().getExtendedRoomID(thisRoom)+".");
return false;
}
protected void exitifyNewPortal(MOB mob, Room room, int direction)
{
Room opRoom=mob.location().rawDoors()[direction];
if((opRoom!=null)&&(opRoom.roomID().length()==0))
opRoom=null;
Room reverseRoom=null;
final int opDir=Directions.getOpDirectionCode(direction);
if(opRoom!=null)
reverseRoom=opRoom.rawDoors()[opDir];
if((reverseRoom!=null)
&&((reverseRoom==mob.location())||(reverseRoom==mob.location().getGridParent())))
mob.tell(_("Opposite room already exists and heads this way. One-way link created."));
if(opRoom!=null)
mob.location().rawDoors()[direction]=null;
WorldMap.CrossExit CE=null;
final GridLocale hereGL=(mob.location().getGridParent()!=null)?mob.location().getGridParent():null;
final int hereX=(hereGL!=null)?hereGL.getGridChildX(mob.location()):-1;
final int hereY=(hereGL!=null)?hereGL.getGridChildY(mob.location()):-1;
final GridLocale thereGL=(room.getGridParent()!=null)?room.getGridParent():null;
final int thereX=(thereGL!=null)?thereGL.getGridChildX(room):-1;
final int thereY=(thereGL!=null)?thereGL.getGridChildY(room):-1;
if(hereGL!=null)
{
for(final Iterator<WorldMap.CrossExit> hereIter=hereGL.outerExits();hereIter.hasNext();)
{
CE=hereIter.next();
if((CE.out)
&&(CE.dir==direction)
&&(CE.x==hereX)&&(CE.y==hereY))
hereGL.delOuterExit(CE);
}
CE=WorldMap.CrossExit.make(hereX,hereY,direction,CMLib.map().getExtendedRoomID(room),true);
hereGL.addOuterExit(CE);
}
if(thereGL!=null)
mob.location().rawDoors()[direction]=thereGL;
else
mob.location().rawDoors()[direction]=room;
Exit thisExit=mob.location().getRawExit(direction);
if(thisExit==null)
{
thisExit=CMClass.getExit("StdOpenDoorway");
mob.location().setRawExit(direction,thisExit);
}
if(thereGL!=null)
{
for(final Iterator<WorldMap.CrossExit> thereIter=thereGL.outerExits();thereIter.hasNext();)
{
CE=thereIter.next();
if((!CE.out)
&&(CE.dir==direction)
&&(CE.destRoomID.equals(CMLib.map().getExtendedRoomID(mob.location()))))
thereGL.delOuterExit(CE);
}
CE=WorldMap.CrossExit.make(thereX,thereY,direction,CMLib.map().getExtendedRoomID(mob.location()),false);
thereGL.addOuterExit(CE);
if((room.rawDoors()[opDir]==null)
||(thereGL==room.rawDoors()[opDir])
||(thereGL.isMyGridChild(room.rawDoors()[opDir])))
{
for(final Iterator<WorldMap.CrossExit> thereIter=thereGL.outerExits();thereIter.hasNext();)
{
CE=thereIter.next();
if((CE.out)
&&(CE.dir==opDir)
&&(CE.x==thereX)&&(CE.y==thereY))
thereGL.delOuterExit(CE);
}
CE=WorldMap.CrossExit.make(thereX,thereY,opDir,CMLib.map().getExtendedRoomID(mob.location()),true);
thereGL.addOuterExit(CE);
if(hereGL!=null)
{
room.rawDoors()[opDir]=hereGL;
for(final Iterator<WorldMap.CrossExit> hereIter=hereGL.outerExits();hereIter.hasNext();)
{
CE=hereIter.next();
if((!CE.out)
&&(CE.dir==opDir)
&&(CE.destRoomID.equals(CMLib.map().getExtendedRoomID(room))))
hereGL.delOuterExit(CE);
}
CE=WorldMap.CrossExit.make(hereX,hereY,opDir,CMLib.map().getExtendedRoomID(room),false);
hereGL.addOuterExit(CE);
}
else
room.rawDoors()[opDir]=mob.location();
room.setRawExit(opDir,thisExit);
}
}
else
if(room.rawDoors()[opDir]==null)
{
if(hereGL!=null)
{
room.rawDoors()[opDir]=hereGL;
for(final Iterator<WorldMap.CrossExit> hereIter=hereGL.outerExits();hereIter.hasNext();)
{
CE=hereIter.next();
if((!CE.out)
&&(CE.dir==opDir)
&&(CE.destRoomID.equals(room.roomID())))
hereGL.delOuterExit(CE);
}
CE=WorldMap.CrossExit.make(hereX,hereY,opDir,CMLib.map().getExtendedRoomID(room),false);
hereGL.addOuterExit(CE);
}
else
room.rawDoors()[opDir]=mob.location();
room.setRawExit(opDir,thisExit);
}
if(hereGL!=null)
CMLib.database().DBUpdateExits(hereGL);
else
CMLib.database().DBUpdateExits(mob.location());
if(thereGL!=null)
CMLib.database().DBUpdateExits(thereGL);
else
CMLib.database().DBUpdateExits(room);
}
@Override public boolean canBeOrdered(){return true;}
@Override public boolean securityCheck(MOB mob){return CMSecurity.isAllowed(mob,mob.location(),CMSecurity.SecFlag.CMDEXITS);}
}
|
[
"vjanmey@gmail.com"
] |
vjanmey@gmail.com
|
f0e8acdb61d1c8481828ab18733d75af03c20a8d
|
fa2d84d1fd00ee5ffd0cb85808dce6f0d909d204
|
/algs/src/main/java/edu/princeton/cs/algs4/ch35/DeDup.java
|
1f9084702d0cf30c470e41355da3cf2d033e34ef
|
[] |
no_license
|
hbwzhsh/tutorials
|
8ad70095fa9c4a5d3f2ca27a98afe404a1e0101c
|
02d0f97da44e71f3fd47def8010611796efce3e8
|
refs/heads/master
| 2021-01-18T00:58:05.822652
| 2015-05-29T08:28:26
| 2015-05-29T08:28:26
| 36,609,864
| 1
| 0
| null | 2015-05-31T15:42:17
| 2015-05-31T15:42:17
| null |
UTF-8
|
Java
| false
| false
| 2,549
|
java
|
package edu.princeton.cs.algs4.ch35;
import edu.princeton.cs.algs4.SET;
import edu.princeton.cs.introcs.*;
/*************************************************************************
* Compilation: javac DeDup.java
* Execution: java DeDup < input.txt
* Dependencies: SET StdIn.java StdOut.java
* Data files: http://algs4.cs.princeton.edu/35applications/tinyTale.txt
*
* Read in a list of words from standard input and print out
* each word, removing any duplicates.
*
* % more tinyTale.txt
* it was the best of times it was the worst of times
* it was the age of wisdom it was the age of foolishness
* it was the epoch of belief it was the epoch of incredulity
* it was the season of light it was the season of darkness
* it was the spring of hope it was the winter of despair
*
* % java DeDup < tinyTale.txt
* it
* was
* the
* best
* of
* times
* worst
* age
* wisdom
* ...
* winter
* despair
*
*************************************************************************/
public class DeDup {
public static void main(String[] args) {
SET<String> set = new SET<String>();
// read in strings and add to set
while (!StdIn.isEmpty()) {
String key = StdIn.readString();
if (!set.contains(key)) {
set.add(key);
StdOut.println(key);
}
}
}
}
/*************************************************************************
* Copyright 2002-2012, Robert Sedgewick and Kevin Wayne.
*
* This file is part of algs4-package.jar, which accompanies the textbook
*
* Algorithms, 4th edition by Robert Sedgewick and Kevin Wayne,
* Addison-Wesley Professional, 2011, ISBN 0-321-57351-X.
* http://algs4.cs.princeton.edu
*
*
* algs4-package.jar is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* algs4-package.jar is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with algs4-package.jar. If not, see http://www.gnu.org/licenses.
*************************************************************************/
|
[
"zqhxuyuan@gmail.com"
] |
zqhxuyuan@gmail.com
|
70214735f5a98d138bf64a9534244849368bf65f
|
cd9d753ecb5bd98e5e1381bc7bd2ffbd1eacc04d
|
/src/main/java/one/SegmentTree/NumArray2.java
|
a179586cfcb9886300fe28f2d925c34767dd6d9f
|
[] |
no_license
|
never123450/aDailyTopic
|
ea1bcdec840274442efa1223bf6ed33c0a394d3d
|
9b17d34197a3ef2a9f95e8b717cbf7904c8dcfe4
|
refs/heads/master
| 2022-08-06T15:49:25.317366
| 2022-07-24T13:47:07
| 2022-07-24T13:47:07
| 178,113,303
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 847
|
java
|
package one.SegmentTree;/// 303. Range Sum Query - Immutable
/// https://leetcode.com/problems/range-sum-query-immutable/description/
public class NumArray2 {
// sum[i]存储前i个元素和, sum[0] = 0
// 即sum[i]存储nums[0...i-1]的和
// sum(i, j) = sum[j + 1] - sum[i]
private int[] sum;
private SegmentTree<Integer> SegmentTree;
public NumArray2(int[] nums) {
sum = new int[nums.length + 1];
sum[0] = 0;
for(int i = 1 ; i < sum.length ; i ++)
sum[i] = sum[i - 1] + nums[i - 1];
}
public int sumRange(int i, int j) {
return sum[j + 1] - sum[i];
}
public void update(int index,int val) {
if (SegmentTree == null ){
throw new IllegalArgumentException("Segment three is null");
}
SegmentTree.set(index,val);
}
}
|
[
"845619585@qq.com"
] |
845619585@qq.com
|
938d28cd2e1394d8315555a8542231320c78db01
|
e572a619225da466744b4e1f87bb9dfeaec5b598
|
/jbpm-console-ng-process-runtime/jbpm-console-ng-process-runtime-client/src/main/java/org/jbpm/console/ng/pr/client/editors/definition/details/multi/basic/BasicProcessDefDetailsMultiViewImpl.java
|
3cf8cc740933fcea8738be847b8ef103da16fb76
|
[
"Apache-2.0"
] |
permissive
|
rorogarcete/jbpm-console-ng
|
7b02361ad6c197a0f4a3fc32174c2d143132fc42
|
b8269ba6f26f6490515bbe71f22d1ec8193eed2f
|
refs/heads/master
| 2021-01-17T01:22:01.384143
| 2015-07-29T12:47:14
| 2015-07-29T12:47:14
| 35,900,580
| 1
| 0
| null | 2015-05-19T18:26:44
| 2015-05-19T18:26:44
| null |
UTF-8
|
Java
| false
| false
| 2,040
|
java
|
/*
* Copyright 2015 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* 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.jbpm.console.ng.pr.client.editors.definition.details.multi.basic;
import javax.enterprise.context.Dependent;
import javax.inject.Inject;
import org.jbpm.console.ng.pr.client.editors.definition.details.BaseProcessDefDetailsPresenter;
import org.jbpm.console.ng.pr.client.editors.definition.details.basic.BasicProcessDefDetailsPresenter;
import org.jbpm.console.ng.pr.client.editors.definition.details.multi.BaseProcessDefDetailsMultiViewImpl;
import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Widget;
@Dependent
public class BasicProcessDefDetailsMultiViewImpl extends BaseProcessDefDetailsMultiViewImpl implements
BasicProcessDefDetailsMultiPresenter.BasicProcessDefDetailsMultiView {
interface Binder
extends
UiBinder<Widget, BasicProcessDefDetailsMultiPresenter.BasicProcessDefDetailsMultiView> {
}
private static Binder uiBinder = GWT.create( Binder.class );
@Inject
private BasicProcessDefDetailsPresenter detailsPresenter;
@Override
protected BaseProcessDefDetailsPresenter getSpecificProcessDefDetailPresenter() {
return detailsPresenter;
}
@Override
protected void createAndBindUi() {
uiBinder.createAndBindUi( this );
}
@Override
protected int getSpecificOffsetHeight() {
return BasicProcessDefDetailsMultiViewImpl.this.getParent()
.getOffsetHeight();
}
}
|
[
"salaboy@gmail.com"
] |
salaboy@gmail.com
|
f30304cff102713918440c1965b6c3a43da5f2a4
|
1b50dbd2e87d2c17c5d695cfc50781a458402a38
|
/src/goryachev/common/test/TestException.java
|
ddf1bce799be67a13419b2117d493c4eef9f8e6a
|
[
"Apache-2.0"
] |
permissive
|
rrohm/FxTextEditor
|
104d7d29d46719e98c371e53424c8fb46d936bf8
|
2b973fb503a54c08b941fddfedb636826d0603f4
|
refs/heads/master
| 2023-06-26T11:52:34.914364
| 2021-08-02T02:52:23
| 2021-08-02T02:52:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,215
|
java
|
// Copyright © 2015-2021 Andy Goryachev <andy@goryachev.com>
package goryachev.common.test;
/**
* TestException is an exception with modified stack trace:
* it starts with the method marked with @Test annotation.
*
* This class subclasses RuntimeException so as not to add throws keywords
* to the test methods.
*/
public class TestException
extends RuntimeException
{
public TestException(String message, Throwable cause)
{
super(message, cause);
}
public TestException(Throwable cause)
{
super(cause);
}
public TestException(String message)
{
super(message);
}
public TestException()
{
}
public StackTraceElement[] getStackTrace()
{
StackTraceElement[] ss = super.getStackTrace();
String testPrefix = TestException.class.getPackage().getName();
for(int i=0; i<ss.length; i++)
{
StackTraceElement em = ss[i];
String name = em.getClassName();
if(!name.startsWith(testPrefix))
{
// found first non-test method
int ct = ss.length - i;
StackTraceElement[] rv = new StackTraceElement[ct];
System.arraycopy(ss, i, rv, 0, ct);
return rv;
}
}
return ss;
}
}
|
[
"andy@goryachev.com"
] |
andy@goryachev.com
|
faaed7511d68c4de519809f5907ad21c684c36c1
|
963599f6f1f376ba94cbb504e8b324bcce5de7a3
|
/sources/com/google/android/gms/dynamic/zaa.java
|
2decbd7b75ecccdf267af4be8d0ce5ef58a3ebdd
|
[] |
no_license
|
NikiHard/cuddly-pancake
|
563718cb73fdc4b7b12c6233d9bf44f381dd6759
|
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
|
refs/heads/main
| 2023-04-09T06:58:04.403056
| 2021-04-20T00:45:08
| 2021-04-20T00:45:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 806
|
java
|
package com.google.android.gms.dynamic;
import android.os.Bundle;
import com.google.android.gms.dynamic.DeferredLifecycleHelper;
import java.util.Iterator;
/* compiled from: com.google.android.gms:play-services-base@@17.5.0 */
final class zaa implements OnDelegateCreatedListener<T> {
private final /* synthetic */ DeferredLifecycleHelper zaa;
zaa(DeferredLifecycleHelper deferredLifecycleHelper) {
this.zaa = deferredLifecycleHelper;
}
public final void onDelegateCreated(T t) {
LifecycleDelegate unused = this.zaa.zaa = t;
Iterator it = this.zaa.zac.iterator();
while (it.hasNext()) {
((DeferredLifecycleHelper.zaa) it.next()).zaa(this.zaa.zaa);
}
this.zaa.zac.clear();
Bundle unused2 = this.zaa.zab = null;
}
}
|
[
"a.amirovv@mail.ru"
] |
a.amirovv@mail.ru
|
04cf02933e12f7a3697bbddba91ee76066c310d2
|
a02e3b43487741d940497158da372a33e04420ca
|
/src/Dijkstra_minPath_point_to_point.java
|
2fe1a366e28885456151331baf5526a341f0df75
|
[] |
no_license
|
shxxyw/Graph
|
5a3bacacc0a7498ce2fd493ef6f9f79ad863676b
|
0cf5d125771f30aab8b5c10396a9b3d5ea1097c2
|
refs/heads/master
| 2020-03-26T22:52:02.314199
| 2018-09-02T11:48:40
| 2018-09-02T11:48:40
| 145,492,307
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 2,974
|
java
|
//图形相邻矩阵类声明
class Adjacency{
final int INFINITE = 99999;
public int [][] Graph_Matrix;
//构造函数
public Adjacency(int[][] Weight_Path,int number) {
int i,j;
int Start_Point,End_Point;
Graph_Matrix = new int[number][number];
//初始化
for(i=1;i<number;i++) {
for(j=1;j<number;j++) {
if(i!=j)
Graph_Matrix[i][j]=INFINITE;
else
Graph_Matrix[i][j]=0;
}
}
//赋值
for(i=0;i<Weight_Path.length;i++) {
Start_Point = Weight_Path[i][0];
End_Point = Weight_Path[i][1];
Graph_Matrix[Start_Point][End_Point]=Weight_Path[i][2];
}
}
//图形显示方法
public void printGraph_Matrix() {
for(int i=1;i<Graph_Matrix.length;i++) {
for(int j=1;j<Graph_Matrix[i].length;j++) {
if(Graph_Matrix[i][j]==INFINITE)
System.out.print(" x ");
else {
if(Graph_Matrix[i][j]==0)
System.out.print(" ");
System.out.print(Graph_Matrix[i][j]+" ");
}
}
System.out.println();
}
}
}
//Dijkstra算法(迪杰斯特拉)
class Dijkstra extends Adjacency{
private int[] cost;
private int[] selected;
//构造函数
public Dijkstra(int[][] Weight_Path,int number) {
super(Weight_Path,number);
cost = new int[number];
selected = new int[number];
for(int i=1;i<number;i++)
selected[i]=0;
}
//单点对全部顶点得最短距离
public void shortestPath(int source) {
int shortest_distance;
int shortest_vertex=1;
int i,j;
//源点到各边的距离
for(i=1;i<Graph_Matrix.length;i++)
cost[i]=Graph_Matrix[source][i];//指定顶点到各个顶点的距离
selected[source]=1;
cost[source]=0;
for(i=1;i<Graph_Matrix.length-1;i++) {
shortest_distance = INFINITE;
for(j=1;j<Graph_Matrix.length;j++)
if(shortest_distance>cost[j]&&selected[j]==0) {
shortest_vertex=j;
shortest_distance=cost[j];
}
selected[shortest_vertex]=1;
for(j=1;j<Graph_Matrix.length;j++) {
if(selected[j]==0 &&
cost[shortest_vertex]+Graph_Matrix[shortest_vertex][j]<
cost[j]) {
cost[j]=cost[shortest_vertex]+Graph_Matrix[shortest_vertex][j];
}
}
}
//输出
System.out.println("========================================");
System.out.println("顶点1到各顶点最短距离的最终结果");
System.out.println("========================================");
for(j=1;j<Graph_Matrix.length;j++)
System.out.println("顶点1到顶点"+j+"最短距离="+cost[j]);
}
}
public class Dijkstra_minPath_point_to_point {
public static void main(String[] args) {
//主程序
int Weight_Path[][]= {{1,2,10},{2,3,20},{2,4,25},{3,5,18},
{4,5,22},{4,6,95},{5,6,77}};
Dijkstra object = new Dijkstra(Weight_Path,7);
System.out.println("========================================");
System.out.println("此范例图形的相邻矩阵如下");
System.out.println("========================================");
object.printGraph_Matrix();
object.shortestPath(1);
}
}
|
[
"tony@gmail.com"
] |
tony@gmail.com
|
99a69e8dc0286bc2e2e8cc39e7a1ede80e91a224
|
a9b32099e663ef573e0fc813d84fd6657dc50517
|
/src/main/java/com/rodrigo/escola/document/Aluno.java
|
09c2fa687bec5ee3513d16fe045405b232267e83
|
[] |
no_license
|
RodrigoMCarvalho/sistema-escolar
|
d2599b2215dc8af1a4e368412330f2fef601a2f3
|
849fde864016a793cf3d744524612e4025500348
|
refs/heads/master
| 2022-11-14T06:34:08.682927
| 2020-07-01T00:03:57
| 2020-07-01T00:03:57
| 275,026,519
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,112
|
java
|
package com.rodrigo.escola.document;
import org.bson.types.ObjectId;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
@Document
public class Aluno {
@Id
private String id;
private String nome;
//@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date dataNascimento;
private Curso curso;
private List<Nota> notas;
private List<Habilidade> habilidades;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getNome() {
return nome;
}
public void setNome(String nome) {
this.nome = nome;
}
public Date getDataNascimento() {
return dataNascimento;
}
public void setDataNascimento(Date dataNascimento) {
this.dataNascimento = dataNascimento;
}
public Curso getCurso() {
return curso;
}
public void setCurso(Curso curso) {
this.curso = curso;
}
public List<Nota> getNotas() {
return notas;
}
public void setNotas(List<Nota> notas) {
this.notas = notas;
}
public List<Habilidade> getHabilidades() {
return habilidades;
}
public void setHabilidades(List<Habilidade> habilidades) {
this.habilidades = habilidades;
}
public Aluno adicionaHabilidade(Aluno aluno, Habilidade habilidade) {
List<Habilidade> habilidades = new ArrayList<>();
if(aluno.getHabilidades() != null) {
habilidades = aluno.getHabilidades();
}
habilidades.add(habilidade);
aluno.setHabilidades(habilidades);
return aluno;
}
public Aluno adicionaNota(Aluno aluno, Nota nota) {
List<Nota> notas = new ArrayList<>();
if(aluno.getNotas() != null) {
notas = aluno.getNotas();
}
notas.add(nota);
aluno.setNotas(notas);
return aluno;
}
}
|
[
"rodrigo_moreira84@hotmail.com"
] |
rodrigo_moreira84@hotmail.com
|
e8b00ca0d1341f5a3e20cd2afd0daed7b559dce2
|
b4d3d16c650138f03ed39de14f383ff3f46c02c7
|
/inflearn-oop/src/Encapsulation/TimerMain.java
|
f142f98986eaea85893bcbd08f155103a54cce11
|
[] |
no_license
|
koola97620/inflearn
|
aea00344b743d2d1c4e00fb7b83071438d5b1efe
|
d5b687a8b7e866a4fd0ee858a0c37063d99bc3da
|
refs/heads/master
| 2020-04-29T17:20:11.614223
| 2019-05-14T14:01:05
| 2019-05-14T14:01:05
| 176,292,905
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package Encapsulation;
import java.util.concurrent.TimeUnit;
/**
* @author choijaeyong on 11/04/2019.
* @project inflearn-oop
* @description
*/
public class TimerMain {
public static void main(String[] args) {
Timer t = new Timer();
// t.startTime = System.currentTimeMillis();
// t.stopTime = System.currentTimeMillis();
// long elaspedTime = t.stopTime - t.startTime;
t.start();
t.stop();
long time = t.elapsedTime(TimeUnit.MILLISECONDS);
}
}
|
[
"koola97620@nate.com"
] |
koola97620@nate.com
|
377d57a605aa02f914c2480b51954a39333805e9
|
966e6efcd8c420598f4c451abaca5fd9f0370584
|
/JavaRushHomeWork/JavaRushTasks/6.OldJavaRush/src/test/level04/lesson06/task06/Solution.java
|
70c206d6cb4b06b3e0dc502ffe53c64182c43988
|
[] |
no_license
|
ivshebanov/JavaRush
|
7c04329a12db0970cf72b97327c0108fe9412b15
|
778463f3339a565934b04df7b0f327c4178bf0bf
|
refs/heads/master
| 2021-06-03T14:13:29.442321
| 2021-04-20T17:31:16
| 2021-04-20T17:31:16
| 83,684,136
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package com.javarush.test.level04.lesson06.task06;
/* И 18-ти достаточно
Ввести с клавиатуры имя и возраст. Если возраст больше 20 вывести надпись «И 18-ти достаточно».
*/
import java.io.*;
public class Solution
{
public static void main(String[] args) throws Exception
{
//напишите тут ваш код
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String name = reader.readLine();
String sAge = reader.readLine();
int age = Integer.parseInt(sAge);
if(age > 20)System.out.println("И 18-ти достаточно");
}
}
|
[
"ivshebanov@gmail.com"
] |
ivshebanov@gmail.com
|
6b2fd6644dd26ba4e0dc907b8fe8b0db1deb49d0
|
c20c3cb1699f726fc285a6917d0ee673915f5b06
|
/VV/asmackbeem/org/jivesoftware/smackx/muc/DeafOccupantInterceptor.java
|
58d9560ab47271c762e311845e4e653afd6f604f
|
[
"Apache-2.0"
] |
permissive
|
zoozooll/MyExercise
|
35a18c0ead552d5be45f627066a5066f6cc8c99b
|
1be14e0252babb28e32951fa1e35fc867a6ac070
|
refs/heads/master
| 2023-04-04T04:24:14.275531
| 2021-04-18T15:01:03
| 2021-04-18T15:01:03
| 108,665,215
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,767
|
java
|
/**
* $RCSfile$
* $Revision: $
* $Date: $
*
* Copyright 2003-2006 Jive Software.
*
* All rights reserved. Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.muc;
import org.jivesoftware.smack.PacketInterceptor;
import org.jivesoftware.smack.packet.Packet;
import org.jivesoftware.smack.packet.PacketExtension;
import org.jivesoftware.smack.packet.Presence;
/**
* Packet interceptor that will intercept presence packets sent to the MUC service to indicate that
* the user wants to be a deaf occupant. A user can only indicate that he wants to be a deaf
* occupant while joining the room. It is not possible to become deaf or stop being deaf after the
* user joined the room.
* <p>
* Deaf occupants will not get messages broadcasted to all room occupants. However, they will be
* able to get private messages, presences, IQ packets or room history. To use this functionality
* you will need to send the message
* {@link MultiUserChat#addPresenceInterceptor(org.jivesoftware.smack.PacketInterceptor)} and pass
* this interceptor as the parameter.
* <p>
* Note that this is a custom extension to the MUC service so it may not work with other servers
* than Wildfire.
* @author Gaston Dombiak
*/
public class DeafOccupantInterceptor implements PacketInterceptor {
@Override
public void interceptPacket(Packet packet) {
Presence presence = (Presence) packet;
// Check if user is joining a room
if (Presence.Type.available == presence.getType()
&& presence.getExtension("x", "http://jabber.org/protocol/muc") != null) {
// Add extension that indicates that user wants to be a deaf
// occupant
packet.addExtension(new DeafExtension());
}
}
private static class DeafExtension implements PacketExtension {
@Override
public String getElementName() {
return "x";
}
@Override
public String getNamespace() {
return "http://jivesoftware.org/protocol/muc";
}
@Override
public String toXML() {
StringBuilder buf = new StringBuilder();
buf.append("<").append(getElementName()).append(" xmlns=\"")
.append(getNamespace()).append("\">");
buf.append("<deaf-occupant/>");
buf.append("</").append(getElementName()).append(">");
return buf.toString();
}
}
}
|
[
"kangkang365@gmail.com"
] |
kangkang365@gmail.com
|
6b56ce4bf84667c59482327323cd3a91f9bd0554
|
d4896a7eb2ee39cca5734585a28ca79bd6cc78da
|
/sources/com/google/android/play/core/internal/cb.java
|
32aa63089050c90ce18a2b0a59d4fa3061a7eb33
|
[] |
no_license
|
zadweb/zadedu.apk
|
a235ad005829e6e34ac525cbb3aeca3164cf88be
|
8f89db0590333929897217631b162e39cb2fe51d
|
refs/heads/master
| 2023-08-13T03:03:37.015952
| 2021-10-12T21:22:59
| 2021-10-12T21:22:59
| 416,498,604
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 684
|
java
|
package com.google.android.play.core.internal;
public final class cb<T> implements ce<T> {
/* renamed from: a reason: collision with root package name */
private ce<T> f168a;
public static <T> void b(ce<T> ceVar, ce<T> ceVar2) {
bh.j(ceVar2);
cb cbVar = (cb) ceVar;
if (cbVar.f168a == null) {
cbVar.f168a = ceVar2;
return;
}
throw new IllegalStateException();
}
@Override // com.google.android.play.core.internal.ce
public final T a() {
ce<T> ceVar = this.f168a;
if (ceVar != null) {
return ceVar.a();
}
throw new IllegalStateException();
}
}
|
[
"midoekid@gmail.com"
] |
midoekid@gmail.com
|
8f568670ba7bdd63f43b7fc919122dab33d672f5
|
db2c094b83f1a9c53b8dd8087417d67daa303ba9
|
/Firstclass/src/com/icici/loans/personalloans/ExceptionDemo.java
|
1e7dddba7ab133b4f43d3acc440414169148814a
|
[] |
no_license
|
ravilella1234/HARI
|
84afdb5b354d37cd7f15fd7bf48ebee732d52418
|
3a2f99e3895af850ec09e0ef7c25a3fb9f81b623
|
refs/heads/master
| 2021-01-02T01:37:12.911434
| 2020-04-07T05:52:21
| 2020-04-07T05:52:21
| 239,436,642
| 0
| 4
| null | 2020-02-10T05:41:07
| 2020-02-10T05:41:06
| null |
UTF-8
|
Java
| false
| false
| 884
|
java
|
package com.icici.loans.personalloans;
import java.util.NoSuchElementException;
import java.util.Scanner;
public class ExceptionDemo
{
public static void main(String[] args)
{
int nr,dr,result;
Scanner sc=new Scanner(System.in);
while (true)
{
System.out.println("Enter the nr value : ");
nr=sc.nextInt();
System.out.println("Enter the dr value : ");
dr=sc.nextInt();
try
{
result = nr / dr;
System.out.println(result);
break;
}
catch (NullPointerException e) {
// TODO: handle exception
}
catch (ArithmeticException e)
{
//e.printStackTrace();
//System.out.println(e);
System.out.println("Denominator value should be greater than Zero...");
}
catch (NoSuchElementException e) {
// TODO: handle exception
}
catch (Exception e) {
// TODO: handle exception
}
}
}
}
|
[
"maha@gmail.com"
] |
maha@gmail.com
|
1fb22dd026b9534d6c32f6e5d778de8466b942cb
|
a971c3650b6095e060d1cb2adc30c56ac6aa1f83
|
/extensions/servlet/src/main/java/com/stormpath/sdk/servlet/mvc/LoginController.java
|
e587c9511f23b56cb19273529238d72cdcd1ac58
|
[
"Apache-2.0"
] |
permissive
|
adaptris/stormpath-sdk-java
|
8b308db85dfc311c7c1f902f6d6ccd4b48da0929
|
d48ffc59051c90ceee4e285b87d0d4c8019673a5
|
refs/heads/master
| 2020-07-13T23:04:20.710564
| 2019-06-18T11:04:12
| 2019-06-18T11:04:12
| 46,339,701
| 0
| 0
| null | 2015-11-17T10:25:56
| 2015-11-17T10:25:55
| null |
UTF-8
|
Java
| false
| false
| 7,054
|
java
|
/*
* Copyright 2015 Stormpath, 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.stormpath.sdk.servlet.mvc;
import com.stormpath.sdk.account.Account;
import com.stormpath.sdk.authc.AuthenticationResult;
import com.stormpath.sdk.lang.Assert;
import com.stormpath.sdk.lang.Strings;
import com.stormpath.sdk.servlet.account.AccountResolver;
import com.stormpath.sdk.servlet.authc.impl.TransientAuthenticationResult;
import com.stormpath.sdk.servlet.form.DefaultField;
import com.stormpath.sdk.servlet.form.Field;
import com.stormpath.sdk.servlet.form.Form;
import com.stormpath.sdk.servlet.http.Saver;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
/**
* @since 1.0.RC4
*/
public class LoginController extends FormController {
private static final Logger log = LoggerFactory.getLogger(LoginController.class);
private String nextUri;
private String forgotLoginUri;
private String registerUri;
private String logoutUri;
private Saver<AuthenticationResult> authenticationResultSaver;
public void init() {
super.init();
Assert.hasText(this.nextUri, "nextUri property cannot be null or empty.");
Assert.hasText(this.forgotLoginUri, "forgotLoginUri property cannot be null or empty.");
Assert.hasText(this.registerUri, "registerUri property cannot be null or empty.");
Assert.hasText(this.logoutUri, "logoutUri property cannot be null or empty.");
Assert.notNull(this.authenticationResultSaver, "authenticationResultSaver property cannot be null.");
}
public String getNextUri() {
return nextUri;
}
public void setNextUri(String nextUri) {
this.nextUri = nextUri;
}
public String getForgotLoginUri() {
return forgotLoginUri;
}
public void setForgotLoginUri(String forgotLoginUri) {
this.forgotLoginUri = forgotLoginUri;
}
public String getRegisterUri() {
return registerUri;
}
public void setRegisterUri(String registerUri) {
Assert.hasText(registerUri, "registerUri property cannot be null or empty.");
this.registerUri = registerUri;
}
public String getLogoutUri() {
return logoutUri;
}
public void setLogoutUri(String logoutUri) {
this.logoutUri = logoutUri;
}
public Saver<AuthenticationResult> getAuthenticationResultSaver() {
return this.authenticationResultSaver;
}
public void setAuthenticationResultSaver(Saver<AuthenticationResult> authenticationResultSaver) {
Assert.notNull(authenticationResultSaver, "authenticationResultSaver cannot be null.");
this.authenticationResultSaver = authenticationResultSaver;
}
@Override
protected ViewModel doGet(HttpServletRequest request, HttpServletResponse response) throws Exception {
if (AccountResolver.INSTANCE.hasAccount(request)) {
//already logged in:
return new DefaultViewModel(getNextUri()).setRedirect(true);
}
//otherwise should be able to visit:
return super.doGet(request, response);
}
@Override
protected ViewModel doPost(HttpServletRequest request, HttpServletResponse response) throws Exception {
//logged in users should not be trying to login again - could be malicious activity - log out the user:
//TODO: should do this logout immediately and not redirect
if (AccountResolver.INSTANCE.hasAccount(request)) {
return new DefaultViewModel(getLogoutUri()).setRedirect(true);
}
return super.doPost(request, response);
}
@Override
protected void appendModel(HttpServletRequest request, HttpServletResponse response, Form form, List<String> errors,
Map<String, Object> model) {
model.put("forgotLoginUri", getForgotLoginUri());
model.put("registerUri", getRegisterUri());
}
@Override
protected List<Field> createFields(HttpServletRequest request, boolean retainPassword) {
List<Field> fields = new ArrayList<Field>(2);
String[] fieldNames = new String[]{ "login", "password" };
for (String fieldName : fieldNames) {
DefaultField field = new DefaultField();
field.setName(fieldName);
field.setLabel("stormpath.web.login.form.fields." + fieldName + ".label");
field.setPlaceholder("stormpath.web.login.form.fields." + fieldName + ".placeholder");
field.setRequired(true);
field.setType("text");
String param = request.getParameter(fieldName);
field.setValue(param != null ? param : "");
if ("password".equals(fieldName)) {
field.setType("password");
if (!retainPassword) {
field.setValue("");
}
}
fields.add(field);
}
return fields;
}
@Override
protected List<String> toErrors(HttpServletRequest request, Form form, Exception e) {
log.debug("Unable to login user.", e);
List<String> errors = new ArrayList<String>(1);
errors.add("Invalid username or password.");
return errors;
}
@Override
protected ViewModel onValidSubmit(HttpServletRequest req, HttpServletResponse resp, Form form) throws Exception {
String usernameOrEmail = form.getFieldValue("login");
String password = form.getFieldValue("password");
req.login(usernameOrEmail, password);
//Login was successful - get the Account that just logged in:
final Account account = getAccount(req);
//simulate a result for the benefit of the 'saveResult' method signature:
AuthenticationResult result = new TransientAuthenticationResult(account);
saveResult(req, resp, result);
String next = form.getNext();
if (!Strings.hasText(next)) {
next = getNextUri();
}
return new DefaultViewModel(next).setRedirect(true);
}
protected Account getAccount(HttpServletRequest req) {
return AccountResolver.INSTANCE.getRequiredAccount(req);
}
protected void saveResult(HttpServletRequest request, HttpServletResponse response, AuthenticationResult result) {
getAuthenticationResultSaver().set(request, response, result);
}
}
|
[
"les@hazlewood.com"
] |
les@hazlewood.com
|
dd5ccde29dc7cbfd82bc22cbb972f97def2abf81
|
23bc5bae179a08fc42574561805907231a33c0f4
|
/14 EXERCISE FILTERS AND USER AUTHENTICATION/Resident Evil v 1.3/residentevil/src/main/java/org/softuni/residentevil/domain/entities/User.java
|
e6bef81fc4358780aefa7d02085bb6eadcd95b9d
|
[
"MIT"
] |
permissive
|
TsvetanNikolov123/JAVA---Java-MVC-Frameworks-Spring
|
98aecddbcf6eb75f277bbafb3a285d514f6e6ba8
|
b63706210c8a3aa18ec3a05dcaf08cb3ca343163
|
refs/heads/master
| 2022-01-31T02:18:31.838482
| 2019-12-13T20:23:42
| 2019-12-13T20:23:42
| 173,348,472
| 0
| 0
|
MIT
| 2022-01-21T23:30:03
| 2019-03-01T18:18:26
|
Java
|
UTF-8
|
Java
| false
| false
| 2,747
|
java
|
package org.softuni.residentevil.domain.entities;
import org.springframework.security.core.userdetails.UserDetails;
import javax.persistence.*;
import java.util.HashSet;
import java.util.Set;
@Entity
@Table(name = "users")
public class User extends BaseEntity implements UserDetails {
private String username;
private String password;
private String email;
private boolean isAccountNonExpired;
private boolean isAccountNonLocked;
private boolean isCredentialsNonExpired;
private boolean isEnabled;
private Set<Role> authorities;
public User() {
this.authorities = new HashSet<>();
}
@Override
@Column(name = "username", unique = true, updatable = false)
public String getUsername() {
return this.username;
}
public void setUsername(String username) {
this.username = username;
}
@Override
@Column(name = "password", nullable = false)
public String getPassword() {
return this.password;
}
public void setPassword(String password) {
this.password = password;
}
@Column(name = "email", nullable = false)
public String getEmail() {
return this.email;
}
public void setEmail(String email) {
this.email = email;
}
@Override
@Column(name = "is_account_non_expired")
public boolean isAccountNonExpired() {
return true;
}
public void setAccountNonExpired(boolean accountNonExpired) {
isAccountNonExpired = accountNonExpired;
}
@Override
@Column(name = "is_account_non_locked")
public boolean isAccountNonLocked() {
return true;
}
public void setAccountNonLocked(boolean accountNonLocked) {
isAccountNonLocked = accountNonLocked;
}
@Override
@Column(name = "is_credentials_non_expired")
public boolean isCredentialsNonExpired() {
return true;
}
public void setCredentialsNonExpired(boolean credentialsNonExpired) {
isCredentialsNonExpired = credentialsNonExpired;
}
@Override
@Column(name = "is_enabled")
public boolean isEnabled() {
return true;
}
public void setEnabled(boolean enabled) {
isEnabled = enabled;
}
@Override
@ManyToMany(targetEntity = Role.class, fetch = FetchType.EAGER)
@JoinTable(
name = "user_roles",
joinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id"),
inverseJoinColumns = @JoinColumn(name = "role_id", referencedColumnName = "id")
)
public Set<Role> getAuthorities() {
return this.authorities;
}
public void setAuthorities(Set<Role> authorities) {
this.authorities = authorities;
}
}
|
[
"tsdman1985@gmail.com"
] |
tsdman1985@gmail.com
|
e7952b0025817ddb000c1c7f3d3d3e8f33af1d86
|
c5878097ed654906aeb26fb815b238b5da3ab443
|
/decorator/src/main/java/edu/csupomona/cs356/decorator/FooterDecorator2.java
|
0943eb62f956395d3a908bc8b58eb55bfd7864a3
|
[] |
no_license
|
csupomona-cs356/design-pattern-samples
|
f766dfd22819ef0a7cb45d8a58d7f859b5bfbf17
|
5fd5cf3bafe1f58ef5b5a847645c188f9d9aef36
|
refs/heads/master
| 2021-01-01T19:51:19.127177
| 2017-11-09T16:04:19
| 2017-11-09T16:04:19
| 25,605,602
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 307
|
java
|
package edu.csupomona.cs356.decorator;
public class FooterDecorator2 extends TicketDecorator {
public FooterDecorator2(Component c) {
super(c);
}
public void printTicket() {
super.printTicket();
this.printFooter();
}
public void printFooter() {
System.out.println("## FOOTER Two ##");
}
}
|
[
"yu.sun.cs@gmail.com"
] |
yu.sun.cs@gmail.com
|
2256744d00f2ba5700fa67e1a4ac220976721d9c
|
88ed8131b9b2260b53286d6ed11cd418cc1e7630
|
/RegistrationWithFirbaseDatabase/app/src/main/java/com/example/registrationwithfirbasedatabase/MainActivity.java
|
f32ee08d22b77442bfa8ed7e992a4fa3d2b82c78
|
[] |
no_license
|
likhitha-1/android-pstp-aits-tirupathi
|
02b7ed66ad2c38d01ea1745e53f1fe5990ab67d5
|
040d9cf0717dcbaee2263cb90ccc4301b615e37a
|
refs/heads/master
| 2023-05-29T12:30:31.480919
| 2021-06-08T03:50:06
| 2021-06-08T03:50:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,858
|
java
|
package com.example.registrationwithfirbasedatabase;
import androidx.appcompat.app.AppCompatActivity;
import androidx.recyclerview.widget.LinearLayoutManager;
import androidx.recyclerview.widget.RecyclerView;
import android.os.Bundle;
import android.view.View;
import android.widget.EditText;
import android.widget.Toast;
import com.google.android.gms.tasks.OnSuccessListener;
import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;
import com.google.firebase.database.ValueEventListener;
import java.util.ArrayList;
import java.util.List;
public class MainActivity extends AppCompatActivity {
EditText et_name,et_rollnumber,et_mail,et_mobile,et_branch;
String t_name,t_rollnumber,t_mail,t_mobile,t_branch;
List<studentPojo> list;
studentPojo pojo;
FirebaseDatabase database;
DatabaseReference reference;
MyAdapter adapter;
RecyclerView recyclerView;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
init();
database=FirebaseDatabase.getInstance();
reference=database.getReference();
}
private void init() {
et_branch=findViewById(R.id.editTextbranch);
et_rollnumber=findViewById(R.id.editTextrollnumber);
et_mail=findViewById(R.id.editTextEmail);
et_mobile=findViewById(R.id.editTextmobile);
et_name=findViewById(R.id.editTextTextPersonName);
recyclerView=findViewById(R.id.mainrec);
}
public void savedata(View view) {
t_name=et_name.getText().toString();
t_rollnumber=et_rollnumber.getText().toString();
t_mail=et_mail.getText().toString();
t_mobile=et_mobile.getText().toString();
t_branch=et_branch.getText().toString();
writeNewUser(t_name,t_rollnumber,t_branch,t_mobile,t_mail);
}
private void writeNewUser(String t_name, String t_rollnumber, String t_branch, String t_mobile, String t_mail) {
pojo=new studentPojo(t_name,t_rollnumber,t_branch,t_mobile,t_mail);
/*pojo.setBranch(t_branch);
pojo.setName(t_name);
pojo.setMobilenumbr(t_mobile);
pojo.setRollNumber(t_rollnumber);
pojo.setEmail(t_mail);*/
list=new ArrayList<>();
list.add(pojo);
reference.child("students").child(t_rollnumber).push().setValue(pojo).addOnSuccessListener(new OnSuccessListener<Void>() {
@Override
public void onSuccess(Void aVoid) {
Toast.makeText(MainActivity.this, "Register success "+t_name , Toast.LENGTH_SHORT).show();
}
});
}
public void retriveData(View view) {
adapter=new MyAdapter(this,list);
recyclerView.setLayoutManager(new LinearLayoutManager(this));
recyclerView.setAdapter(adapter);
}
}
|
[
"muneiahtellakula@gmail.com"
] |
muneiahtellakula@gmail.com
|
a730177722d6c95208136f90360c1fa7450b02ef
|
a7c85a1e89063038e17ed2fa0174edf14dc9ed56
|
/spring-aop-perf-tests/src/main/java/coas/perf/ComplexCondition50/Advice49.java
|
b3ec4220f1181724a30a5a5c5b0d927caf41a7a8
|
[] |
no_license
|
pmaslankowski/java-contracts
|
28b1a3878f68fdd759d88b341c8831716533d682
|
46518bb9a83050956e631faa55fcdf426589830f
|
refs/heads/master
| 2021-03-07T13:15:28.120769
| 2020-09-07T20:06:31
| 2020-09-07T20:06:31
| 246,267,189
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,636
|
java
|
package coas.perf.ComplexCondition50;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.springframework.stereotype.Component;
import coas.perf.ComplexCondition50.Subject50;
@Aspect
@Component("Advice_50_49_cc")
public class Advice49 {
@Around("execution(* coas.perf.ComplexCondition50.Subject50.*(..)) and (execution(* *.junk0(..)) or execution(* *.junk1(..)) or execution(* *.junk2(..)) or execution(* *.junk3(..)) or execution(* *.junk4(..)) or execution(* *.junk5(..)) or execution(* *.junk6(..)) or execution(* *.junk7(..)) or execution(* *.junk8(..)) or execution(* *.junk9(..)) or execution(* *.junk10(..)) or execution(* *.junk11(..)) or execution(* *.junk12(..)) or execution(* *.junk13(..)) or execution(* *.junk14(..)) or execution(* *.junk15(..)) or execution(* *.junk16(..)) or execution(* *.junk17(..)) or execution(* *.junk18(..)) or execution(* *.junk19(..)) or execution(* *.junk20(..)) or execution(* *.junk21(..)) or execution(* *.junk22(..)) or execution(* *.junk23(..)) or execution(* *.junk24(..)) or execution(* *.junk25(..)) or execution(* *.junk26(..)) or execution(* *.junk27(..)) or execution(* *.junk28(..)) or execution(* *.junk29(..)) or execution(* *.target(..)))")
public Object onTarget(ProceedingJoinPoint joinPoint) throws Throwable {
int res = (int) joinPoint.proceed();
for (int i=0; i < 1000; i++) {
if (res % 2 == 0) {
res /= 2;
} else {
res = 2 * res + 1;
}
}
return res;
}
}
|
[
"pmaslankowski@gmail.com"
] |
pmaslankowski@gmail.com
|
7fbbf03e43d9950dfe60a9b340d9cad0e645c372
|
3ceacff5e473a477dd5f4c2e316bcef0076150da
|
/src/main/java/com/thoughtworks/capability/gtb/controller/PersonController.java
|
493639d28931da58c256778dc9f2ac2c53c26585
|
[] |
no_license
|
Tiehuijie/B-java-serialization-with-jackson-homework
|
a892f2e3a8788fe90f5866febaf663c72fe3051f
|
b788e21a861f91c5c807c42465341c447e5e1f3b
|
refs/heads/master
| 2023-01-05T10:11:26.839917
| 2020-11-04T16:25:56
| 2020-11-04T16:25:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 487
|
java
|
package com.thoughtworks.capability.gtb.controller;
import com.thoughtworks.capability.gtb.vo.PersonVo;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class PersonController {
@GetMapping("/persons/{id}")
public PersonVo getPerson(@PathVariable("id") String id) {
return new PersonVo(id, null, "张三", null);
}
}
|
[
"zhaozhang@thoughtworks.com"
] |
zhaozhang@thoughtworks.com
|
8d47a481f91fba872d5155ae37ba4a2c21f92fbd
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Roller/Roller1961.java
|
62dacd247ffb212cb3de23914f37e459d323140d
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
public String toString() {
StringBuilder buf = new StringBuilder();
buf.append("{");
buf.append(getId());
buf.append(", ").append(getName());
buf.append(", ").append(getPingUrl());
buf.append(", ").append(getLastSuccess());
buf.append(", ").append(isAutoEnabled());
buf.append("}");
return buf.toString();
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
6ebe7842470f843b92b20233759f9e27ada8b208
|
028cbe18b4e5c347f664c592cbc7f56729b74060
|
/v2/appserv-commons-ee/synchronization-api/src/java/com/sun/enterprise/ee/synchronization/api/SynchronizationContext.java
|
1eca20bbd403ca0589754165a1dd84b574a88291
|
[] |
no_license
|
dmatej/Glassfish-SVN-Patched
|
8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e
|
269e29ba90db6d9c38271f7acd2affcacf2416f1
|
refs/heads/master
| 2021-05-28T12:55:06.267463
| 2014-11-11T04:21:44
| 2014-11-11T04:21:44
| 23,610,469
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,959
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can obtain
* a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html
* or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at glassfish/bootstrap/legal/LICENSE.txt.
* Sun designates this particular file as subject to the "Classpath" exception
* as provided by Sun in the GPL Version 2 section of the License file that
* accompanied this code. If applicable, add the following below the License
* Header, with the fields enclosed by brackets [] replaced by your own
* identifying information: "Portions Copyrighted [year]
* [name of copyright owner]"
*
* Contributor(s):
*
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package com.sun.enterprise.ee.synchronization.api;
import com.sun.enterprise.config.ConfigContext;
/**
* Synchronization context. It is intended for use by a remote server
* instance with access to configuration (domain.xml). It provides
* access to the synchronization managers. The managers allow convenient
* APIs to synchronize (pull) content from the central repository via
* domain administration server (DAS). DAS connection information
* is obtained from das properties kept in each node agent.
*
* <xmp>
* Example: The following code snippet shows how to get hold of
* synchronization managers.
*
* // config context
* ConfigContext configContext = event.getConfigContext();
*
* // creates a synchronization context
* SynchronizationContext synchCtx =
* SynchronizationFactory.createSynchronizationContext(configContext);
*
* // applications synchronization manager
* ApplicationsMgr appSynchMgr = synchCtx.getApplicationsMgr();
*
* // security service synchronization manager
* SecurityServiceMgr securitySynchMgr = synchCtx.getSecurityServiceMgr();
* </xmp>
*
* @author Nazrul Islam
* @since JDK1.4
*/
public interface SynchronizationContext {
/**
* Returns the synchronization manager for applications.
*
* @return synchronization manager for applications
*/
public ApplicationsMgr getApplicationsMgr();
/**
* Returns the synchronization manager for security service.
*
* @return synchronization manager for security service
*/
public SecurityServiceMgr getSecurityServiceMgr();
/**
* Sets the config context for this synchronization context.
*
* @param ctx config context
*/
public void setConfigContext(ConfigContext ctx);
/**
* Returns the config context associated with this synchronization context.
*
* @return config context associated with the synchronization context
*/
public ConfigContext getConfigContext();
}
|
[
"kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] |
kohsuke@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5
|
3d14ef9caee6954a0d252f33e233f666d1e5770c
|
993aa3e6ad102203a9cda87a99b2b6ea1bcf6bba
|
/Final/test/element/TicketOfficeTest.java
|
057f7772151b6500b4b84535e4368ee62d5f2341
|
[] |
no_license
|
cocagolau/NEXT_13-02_Java-Lab
|
0715a02474ef61c38d3440289bddf5aaf873678b
|
c241c3b43c3641b2be6d01d27cc3e0648eaeef62
|
refs/heads/master
| 2018-12-31T17:03:54.754165
| 2014-07-07T13:00:47
| 2014-07-07T13:00:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,452
|
java
|
package element;
import java.util.ArrayList;
import java.util.List;
import simulation.Start;
import utility.Parser;
import map.MapParser;
import map.Region;
import map.TrainMap;
import junit.framework.TestCase;
public class TicketOfficeTest extends TestCase{
TicketOffice ticketOffice;
List<Customer> customers1, customers2, customers3;
List<Customer> allCustomers;
TrainMap tMap;
MapParser mapParser;
public void setUp() {
mapParser = new MapParser(Start.TRAIN_MAP_PATH, Parser.Separator.TAP);
tMap = TrainMap.create(mapParser.getToRegionList(), mapParser.getCreations());
ticketOffice = new TicketOffice(3, Start.NUMBER_OF_STAFF, tMap);
allCustomers = new ArrayList<Customer>();
customers1 = new ArrayList<Customer>();
customers2 = new ArrayList<Customer>();
customers3 = new ArrayList<Customer>();
setupCustomers();
}
private void setupCustomers () {
// start
customers1.add(Customer.create( 1, "customer1", 0, 1, Region.Name.Seoul, Region.Name.Deajeon)); // 1
customers1.add(Customer.create( 2, "customer2", 0, 2, Region.Name.Seoul, Region.Name.Deajeon)); // 2
customers1.add(Customer.create( 3, "customer3", 0, 3, Region.Name.Seoul, Region.Name.Deajeon)); // 3
customers1.add(Customer.create( 4, "customer4", 0, 1, Region.Name.Seoul, Region.Name.Deajeon)); // 1
// after 1min
customers2.add(Customer.create( 5, "customer5", 1, 1, Region.Name.Seoul, Region.Name.Deajeon)); // 2
// after 2min
customers3 = new ArrayList<Customer>();
customers3.add(Customer.create( 6, "customer6", 2, 6, Region.Name.Seoul, Region.Name.Deajeon)); // 8
customers3.add(Customer.create( 7, "customer7", 2, 7, Region.Name.Seoul, Region.Name.Deajeon)); // 9
customers3.add(Customer.create( 8, "customer8", 2, 3, Region.Name.Seoul, Region.Name.Deajeon)); // 5
customers3.add(Customer.create( 9, "customer9", 2, 1, Region.Name.Seoul, Region.Name.Deajeon)); // 3
customers3.add(Customer.create(10, "customer10", 2, 1, Region.Name.Seoul, Region.Name.Deajeon)); // 3
allCustomers.addAll(customers1);
allCustomers.addAll(customers2);
allCustomers.addAll(customers3);
}
public void testProcess() {
//presentTime = 0;
Start.presentTime = 0;
ticketOffice.process(customers1);
assertEquals(1, ticketOffice.size());
assertEquals(0, ticketOffice.getMovementList().size());
//after a minute // 1
Start.presentTime++;
ticketOffice.process(customers2);
assertEquals(0, ticketOffice.size());
assertEquals(2, ticketOffice.getMovementList().size());
//after a minute // 2
Start.presentTime++;
ticketOffice.process(customers3);
assertEquals(3, ticketOffice.size());
assertEquals(2, ticketOffice.getMovementList().size());
//after a minute // 3
Start.presentTime++;
ticketOffice.process();
assertEquals(1, ticketOffice.size());
assertEquals(2, ticketOffice.getMovementList().size());
//after a minute // 4
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(1, ticketOffice.getMovementList().size());
//after a minute // 5
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(0, ticketOffice.getMovementList().size());
//after a minute // 6
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(1, ticketOffice.getMovementList().size());
//after a minute // 7
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(0, ticketOffice.getMovementList().size());
//after a minute // 8
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(0, ticketOffice.getMovementList().size());
//after a minute // 9
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(1, ticketOffice.getMovementList().size());
//after a minute // 10
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(0, ticketOffice.getMovementList().size());
//after a minute // 11
Start.presentTime++;
ticketOffice.process();
assertEquals(0, ticketOffice.size());
assertEquals(1, ticketOffice.getMovementList().size());
Staff.flag = true;
}
}
|
[
"cocagolau@gmail.com"
] |
cocagolau@gmail.com
|
90a844f777aeb4bf0d190bed15b73b7096abcde5
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_165/Testnull_16470.java
|
12723b8b6f9e3527f3409212c01bcbe7cb976667
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_165;
import static org.junit.Assert.*;
public class Testnull_16470 {
private final Productionnull_16470 production = new Productionnull_16470("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
d340726d0335dcf00c83adf01a99621a893a2e9a
|
982dbe80046a0a1af4c060568fcaef021e6a4256
|
/Selenium/src/com/selenium/practies/MultipleCheckBoxTest.java
|
c7347b1248361a5f45d714ed106fe13d1db7353e
|
[] |
no_license
|
qedge9/vasu
|
b358e634163a99d7f8e2b5c053aa05c28c91ed63
|
834b45385ed3e090fa168adf13a808702076dc71
|
refs/heads/master
| 2022-09-09T08:08:57.097538
| 2020-06-02T16:25:32
| 2020-06-02T16:25:32
| 265,294,662
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,582
|
java
|
package com.selenium.practies;
import java.util.List;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;
public class MultipleCheckBoxTest
{
public static void main(String[] args)
{
FirefoxDriver driver=new FirefoxDriver();
driver.get("http://www.echoecho.com/htmlforms09.htm");
driver.manage().window().maximize();
WebElement table=driver.findElement(By.xpath("/html/body/div[2]/table[9]/tbody/tr/td[4]/table/tbody/tr/td/div/span/form/table[3]/tbody/tr/td/table/tbody/tr/td"));
List<WebElement> checkList=table.findElements(By.tagName("input"));
//System.out.println(checkList.size());
/*for (int i = 0; i < checkList.size(); i++)
{
checkList.get(i).click();
}*/
/*for (int i = 0; i < checkList.size(); i++)
{
if (checkList.get(i).getAttribute("value").equals("Cheese"))
{
checkList.get(i).click();
}
}*/
/*for (int i = 0; i < checkList.size(); i++)
{
System.out.println(checkList.get(i).getAttribute("value")+" "+checkList.get(i).getAttribute("checked"));
}*/
//validation
for (int i = 0; i < checkList.size(); i++)
{
System.out.println(i+" click on : "+checkList.get(i).getAttribute("value"));
checkList.get(i).click();
//status of three check boxes
for (int j = 0; j < checkList.size(); j++)
{
System.out.println(checkList.get(j).getAttribute("value")+"-----"+checkList.get(j).getAttribute("checked"));
}
}
}
}
|
[
"vasu.584@gmail.com"
] |
vasu.584@gmail.com
|
114386e92a97ee4cbd5690e5c9746ca321ab7d22
|
f4b1768c3c6990d9028f408d10e73611ea6b131c
|
/bizcore/WEB-INF/health_core_src/com/doublechaintech/health/Page.java
|
7e9606e36e8e4cda0e7a650373127dd5646d74ae
|
[] |
no_license
|
doublechaintech/health-biz-suite
|
6d74a8716e0ac6bb49df79618e051c3642115167
|
f90ddec02b3a0d243ea0ef9eb6904118a8b33c88
|
refs/heads/master
| 2021-08-07T01:12:11.268389
| 2020-05-07T03:51:16
| 2020-05-07T03:51:16
| 236,412,030
| 1
| 1
| null | 2021-01-06T03:19:35
| 2020-01-27T03:14:01
|
Java
|
UTF-8
|
Java
| false
| false
| 1,007
|
java
|
package com.doublechaintech.health;
public class Page extends BaseEntity{
/**
*
*/
private static final long serialVersionUID = 1L;
String title;
String link;
boolean disabled;
boolean selected;
int pageNumber;
public int getPageNumber() {
return pageNumber;
}
public void setPageNumber(int pageNumber) {
this.pageNumber = pageNumber;
}
public boolean isSelected() {
return selected;
}
public void setSelected(boolean selected) {
this.selected = selected;
}
public boolean isDisabled() {
return disabled;
}
public void setDisabled(boolean disabled) {
this.disabled = disabled;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getLink() {
return link;
}
public void setLink(String link) {
this.link = link;
}
public String toString(){
if(link.isEmpty()){
return title;
}
if(this.selected){
return title+"(!)";
}
return title;
//return title+"("+link+")";
}
}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
0cf9d8e4afb42e9f1cc5dd91c822b0ee111dad87
|
c91b8495710e7a8f8fdf898abe0b51041f8499b0
|
/mybatis-generator-core/src/main/java/org/mybatis/generator/runtime/dynamic/sql/elements/v1/DeleteByExampleMethodGenerator.java
|
547b739cababb1e15be859b535802b0929ee0594
|
[
"Apache-2.0"
] |
permissive
|
yangfancoming/mybatis-generator
|
79ae52c2d289db445fefbdd2e0fef302070fe9c3
|
00298bf16cfc9d9ad84aa8cebbed2dbaf2631c6d
|
refs/heads/master
| 2022-08-21T09:31:04.749069
| 2019-12-01T11:33:58
| 2019-12-01T11:33:58
| 225,001,875
| 0
| 0
|
Apache-2.0
| 2022-06-21T02:20:50
| 2019-11-30T11:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 2,381
|
java
|
package org.mybatis.generator.runtime.dynamic.sql.elements.v1;
import java.util.HashSet;
import java.util.Set;
import org.mybatis.generator.api.dom.java.FullyQualifiedJavaType;
import org.mybatis.generator.api.dom.java.Interface;
import org.mybatis.generator.api.dom.java.Method;
import org.mybatis.generator.runtime.dynamic.sql.elements.AbstractMethodGenerator;
import org.mybatis.generator.runtime.dynamic.sql.elements.MethodAndImports;
public class DeleteByExampleMethodGenerator extends AbstractMethodGenerator {
private DeleteByExampleMethodGenerator(Builder builder) {
super(builder);
}
@Override
public MethodAndImports generateMethodAndImports() {
if (!introspectedTable.getRules().generateDeleteByExample()) {
return null;
}
Set<FullyQualifiedJavaType> imports = new HashSet<>();
imports.add(new FullyQualifiedJavaType("org.mybatis.dynamic.sql.delete.DeleteDSL")); //$NON-NLS-1$
imports.add(new FullyQualifiedJavaType(
"org.mybatis.dynamic.sql.delete.MyBatis3DeleteModelAdapter")); //$NON-NLS-1$
Method method = new Method("deleteByExample"); //$NON-NLS-1$
method.setDefault(true);
context.getCommentGenerator().addGeneralMethodAnnotation(method, introspectedTable, imports);
FullyQualifiedJavaType returnType =
new FullyQualifiedJavaType("DeleteDSL<MyBatis3DeleteModelAdapter<Integer>>"); //$NON-NLS-1$
method.setReturnType(returnType);
method.addBodyLine(
"return DeleteDSL.deleteFromWithMapper(this::delete, " //$NON-NLS-1$
+ tableFieldName + ");"); //$NON-NLS-1$
return MethodAndImports.withMethod(method)
.withImports(imports)
.build();
}
@Override
public boolean callPlugins(Method method, Interface interfaze) {
return context.getPlugins().clientDeleteByExampleMethodGenerated(method, interfaze, introspectedTable);
}
public static class Builder extends BaseBuilder<Builder, DeleteByExampleMethodGenerator> {
@Override
public Builder getThis() {
return this;
}
@Override
public DeleteByExampleMethodGenerator build() {
return new DeleteByExampleMethodGenerator(this);
}
}
}
|
[
"34465021+jwfl724168@users.noreply.github.com"
] |
34465021+jwfl724168@users.noreply.github.com
|
0994c11fbe3196c020378624cbf574a24c60e4ba
|
f3f0b3bf630b365feea84116b3360721e22d56d5
|
/Chapter25/java/GameObject.java
|
573e2dfc09d1d03de126da8fb57d6f697a62897d
|
[
"MIT"
] |
permissive
|
fwangyt/Learning-Java-by-Building-Android-Games-Second-Edition
|
f003ad33f97d7dcda7758f51bb3254b740ebca6d
|
dd0af518a4035148d0bf4755c152b3ced3a6d62d
|
refs/heads/master
| 2023-01-30T18:17:57.277860
| 2020-12-14T19:31:09
| 2020-12-14T19:31:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,610
|
java
|
package com.gamecodeschool.c25platformer;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.PointF;
import com.gamecodeschool.c25platformer.GOSpec.GameObjectSpec;
class GameObject {
private Transform mTransform;
private boolean mActive = true;
private String mTag;
private GraphicsComponent mGraphicsComponent;
private UpdateComponent mUpdateComponent;
void setGraphics(GraphicsComponent g,
Context c,
GameObjectSpec spec,
PointF objectSize,
int pixelsPerMetre) {
mGraphicsComponent = g;
g.initialize(c, spec, objectSize, pixelsPerMetre);
}
void setMovement(UpdateComponent m) {
mUpdateComponent = m;
}
void setPlayerInputTransform(PlayerInputComponent s) {
s.setTransform(mTransform);
}
void setTransform(Transform t) {
mTransform = t;
}
void draw(Canvas canvas, Paint paint, Camera cam) {
mGraphicsComponent.draw(canvas,
paint,
mTransform, cam);
}
void update(long fps, Transform playerTransform) {
mUpdateComponent.update(fps,
mTransform,
playerTransform);
}
boolean checkActive() {
return mActive;
}
String getTag() {
return mTag;
}
void setInactive() {
mActive = false;
}
Transform getTransform() {
return mTransform;
}
void setTag(String tag) {
mTag = tag;
}
}
|
[
"ralphr@packtpub.com"
] |
ralphr@packtpub.com
|
1c92012a1a1a1d56f01a39f361b5bbda5c2d3d84
|
f9f287ea12388a81f8ef96e9cd41cca380321d3b
|
/src/main/java/com/prostate/record/controller/ClickCountController.java
|
a561f0d1cf227cfb6906dd81375f0658e3f187ef
|
[] |
no_license
|
ProstateRehabilitationAlliance/RecordServer
|
8f798a252389379b2dfe499070e9f29450a71c5d
|
33a72ce4895ba1c5a7ffddd4c26774b24f8c6d1b
|
refs/heads/master
| 2020-03-11T14:05:18.587686
| 2018-08-13T09:06:24
| 2018-08-13T09:06:24
| 130,043,626
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,571
|
java
|
package com.prostate.record.controller;
import com.prostate.record.entity.ClickCountDoctor;
import com.prostate.record.service.ClickCountDoctorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.Map;
@RestController
@RequestMapping(value = "clickCount")
public class ClickCountController extends BaseController {
@Autowired
private ClickCountDoctorService clickCountDoctorService;
/**
* 医生 查看医生主页触发
*
* @param userId
* @return
*/
@PostMapping(value = "addDoctorClick")
public Map addDoctorClick(String userId) {
ClickCountDoctor clickCountDoctor = new ClickCountDoctor();
clickCountDoctor.setDoctorId(userId);
clickCountDoctor.setClickStatus("DOCTOR_CLICK");
clickCountDoctorService.insertSelective(clickCountDoctor);
return insertSuccseeResponse();
}
/**
* 患者 查看医生主页触发
*
* @param userId
* @return
*/
@PostMapping(value = "addPatientClick")
public Map addPatientClick(String userId) {
ClickCountDoctor clickCountDoctor = new ClickCountDoctor();
clickCountDoctor.setDoctorId(userId);
clickCountDoctor.setClickStatus("PATIENT_CLICK");
clickCountDoctorService.insertSelective(clickCountDoctor);
return insertSuccseeResponse();
}
}
|
[
"MaxCoderCh@users.noreply.github.com"
] |
MaxCoderCh@users.noreply.github.com
|
1c90428847f71252185f3d1c75f53a261ca6dc71
|
a99c0313da1e46b8e3749e56eeec2241386d19e9
|
/app/src/main/java/com/prettyyes/user/app/mvpView/OtherQueView.java
|
d05304025893c5df1994099c3bf53a935e383fcb
|
[] |
no_license
|
cglw/how
|
5d06a675393f9b1ef77083afbb2b39b59d167a35
|
c90f7d2130ed2130d7e1cb2aeec9b3c58cc100fd
|
refs/heads/master
| 2020-04-26T23:59:29.571983
| 2019-03-05T09:58:06
| 2019-03-05T09:58:06
| 173,920,703
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package com.prettyyes.user.app.mvpView;
import android.view.View;
import com.prettyyes.user.app.adapter.mainpage.HomeBannerVpAdapter;
import com.prettyyes.user.app.ui.appview.HomeActivityEnterView;
import com.prettyyes.user.app.view.AutoViewPager;
import com.prettyyes.user.app.view.BadgeView;
/**
* Project Name: user
* Package Name: com.prettyyes.user.app.mvpView
* Author: SmileChen
* Created on: 2016/12/14
* Description: Nothing
*/
public interface OtherQueView extends BaseView {
public AutoViewPager getBannerVp();
public HomeBannerVpAdapter getVpAdapter();
HomeActivityEnterView getHomeEnter();
BadgeView getBadgeView();
View getBannerView();
void notifyRv();
}
|
[
"1410488687@qq.com"
] |
1410488687@qq.com
|
6f913ad15b4df5e4d2d9aea23c63409345ca5d79
|
6baa09045c69b0231c35c22b06cdf69a8ce227d6
|
/modules/adwords_axis/src/main/java/com/google/api/ads/adwords/axis/v201605/cm/BiddingStrategyType.java
|
deb3f03e9a282e75de389e7c2f813b6070fbed0c
|
[
"Apache-2.0"
] |
permissive
|
remotejob/googleads-java-lib
|
f603b47117522104f7df2a72d2c96ae8c1ea011d
|
a330df0799de8d8de0dcdddf4c317d6b0cd2fe10
|
refs/heads/master
| 2020-12-11T01:36:29.506854
| 2016-07-28T22:13:24
| 2016-07-28T22:13:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,580
|
java
|
/**
* BiddingStrategyType.java
*
* This file was auto-generated from WSDL
* by the Apache Axis 1.4 Mar 02, 2009 (07:08:06 PST) WSDL2Java emitter.
*/
package com.google.api.ads.adwords.axis.v201605.cm;
public class BiddingStrategyType implements java.io.Serializable {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected BiddingStrategyType(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
}
public static final java.lang.String _BUDGET_OPTIMIZER = "BUDGET_OPTIMIZER";
public static final java.lang.String _CONVERSION_OPTIMIZER = "CONVERSION_OPTIMIZER";
public static final java.lang.String _MANUAL_CPC = "MANUAL_CPC";
public static final java.lang.String _MANUAL_CPM = "MANUAL_CPM";
public static final java.lang.String _PAGE_ONE_PROMOTED = "PAGE_ONE_PROMOTED";
public static final java.lang.String _TARGET_SPEND = "TARGET_SPEND";
public static final java.lang.String _ENHANCED_CPC = "ENHANCED_CPC";
public static final java.lang.String _TARGET_CPA = "TARGET_CPA";
public static final java.lang.String _TARGET_ROAS = "TARGET_ROAS";
public static final java.lang.String _TARGET_OUTRANK_SHARE = "TARGET_OUTRANK_SHARE";
public static final java.lang.String _NONE = "NONE";
public static final java.lang.String _UNKNOWN = "UNKNOWN";
public static final BiddingStrategyType BUDGET_OPTIMIZER = new BiddingStrategyType(_BUDGET_OPTIMIZER);
public static final BiddingStrategyType CONVERSION_OPTIMIZER = new BiddingStrategyType(_CONVERSION_OPTIMIZER);
public static final BiddingStrategyType MANUAL_CPC = new BiddingStrategyType(_MANUAL_CPC);
public static final BiddingStrategyType MANUAL_CPM = new BiddingStrategyType(_MANUAL_CPM);
public static final BiddingStrategyType PAGE_ONE_PROMOTED = new BiddingStrategyType(_PAGE_ONE_PROMOTED);
public static final BiddingStrategyType TARGET_SPEND = new BiddingStrategyType(_TARGET_SPEND);
public static final BiddingStrategyType ENHANCED_CPC = new BiddingStrategyType(_ENHANCED_CPC);
public static final BiddingStrategyType TARGET_CPA = new BiddingStrategyType(_TARGET_CPA);
public static final BiddingStrategyType TARGET_ROAS = new BiddingStrategyType(_TARGET_ROAS);
public static final BiddingStrategyType TARGET_OUTRANK_SHARE = new BiddingStrategyType(_TARGET_OUTRANK_SHARE);
public static final BiddingStrategyType NONE = new BiddingStrategyType(_NONE);
public static final BiddingStrategyType UNKNOWN = new BiddingStrategyType(_UNKNOWN);
public java.lang.String getValue() { return _value_;}
public static BiddingStrategyType fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
BiddingStrategyType enumeration = (BiddingStrategyType)
_table_.get(value);
if (enumeration==null) throw new java.lang.IllegalArgumentException();
return enumeration;
}
public static BiddingStrategyType fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
public java.lang.Object readResolve() throws java.io.ObjectStreamException { return fromValue(_value_);}
public static org.apache.axis.encoding.Serializer getSerializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumSerializer(
_javaType, _xmlType);
}
public static org.apache.axis.encoding.Deserializer getDeserializer(
java.lang.String mechType,
java.lang.Class _javaType,
javax.xml.namespace.QName _xmlType) {
return
new org.apache.axis.encoding.ser.EnumDeserializer(
_javaType, _xmlType);
}
// Type metadata
private static org.apache.axis.description.TypeDesc typeDesc =
new org.apache.axis.description.TypeDesc(BiddingStrategyType.class);
static {
typeDesc.setXmlType(new javax.xml.namespace.QName("https://adwords.google.com/api/adwords/cm/v201605", "BiddingStrategyType"));
}
/**
* Return type metadata object
*/
public static org.apache.axis.description.TypeDesc getTypeDesc() {
return typeDesc;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
1fb57c052036c1b15dae98c17f0b27446c34720d
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/JetBrains--kotlin/b5828a5fa10f20f5b291fcc4e3d180a8bc02ed5e/after/AbstractExpressionSelectionTest.java
|
5dfbdd1e7d60c3330d89bd5131e289435d30c73d
|
[] |
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,257
|
java
|
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* 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.jetbrains.kotlin.idea;
import com.intellij.psi.PsiElement;
import com.intellij.testFramework.LightCodeInsightTestCase;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.kotlin.idea.codeInsight.CodeInsightUtils;
import org.jetbrains.kotlin.idea.refactoring.KotlinRefactoringUtil;
import org.jetbrains.kotlin.psi.KtFile;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import java.util.Collections;
public abstract class AbstractExpressionSelectionTest extends LightCodeInsightTestCase {
public void doTestExpressionSelection(@NotNull String path) throws Exception {
configureByFile(path);
final String expectedExpression = KotlinTestUtils.getLastCommentInFile((KtFile) getFile());
try {
KotlinRefactoringUtil.selectElement(
getEditor(),
(KtFile) getFile(),
Collections.singletonList(CodeInsightUtils.ElementKind.EXPRESSION),
new KotlinRefactoringUtil.SelectElementCallback() {
@Override
public void run(@Nullable PsiElement element) {
assertNotNull("Selected expression mustn't be null", element);
assertEquals(expectedExpression, element.getText());
}
}
);
}
catch (KotlinRefactoringUtil.IntroduceRefactoringException e) {
assertEquals(expectedExpression, "");
}
}
@NotNull
@Override
protected String getTestDataPath() {
return "";
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
41be565e2688e310018b51591174df9881221d0c
|
201dce84c0c685c7b959fed4cd347c6dcf0c158b
|
/src/main/java/litewolf101/wuffysmagicmayhem/tileentity/TileEntityBlockTotemUpgradeBase.java
|
e4365c956de20f736bc30da3f6c2499dabaa095e
|
[] |
no_license
|
LiteWolf101/wuffysmagicmayhem
|
e301266f40d756158b4c1a32d53061aacafe354b
|
98af9f635f5469c6e46dde5337faae80af3b8d57
|
refs/heads/LiteWolf101-wuffysmagicmayhem
| 2021-09-18T22:03:36.403060
| 2018-07-20T04:01:00
| 2018-07-20T04:01:05
| 111,757,430
| 1
| 0
| null | 2017-11-23T03:28:03
| 2017-11-23T03:12:15
|
Java
|
UTF-8
|
Java
| false
| false
| 331
|
java
|
package litewolf101.wuffysmagicmayhem.tileentity;
/**
* Created by LiteWolf101 on 5/15/2018.
*/
public class TileEntityBlockTotemUpgradeBase extends TileEntityInventoryBase {
public TileEntityBlockTotemUpgradeBase(){
super(5);
}
@Override
public int getInventoryStackLimit() {
return 1;
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
b2e70b29b26e60227aa3b138b27222bd220cf4f7
|
30142c5ec5e176550f46c4920269ab230e7ebb41
|
/smart/src/main/java/yitgogo/smart/view/OnDialogListener.java
|
6833c9d0e7ae7655a7b39d0f421c23e7fd887dd5
|
[] |
no_license
|
KungFuBrother/yitgogo_smart
|
7454d4d93149ed4bef8cac8674b2a94984d8c9af
|
ece40ca26f365faadad48e0467ae02fb2ab43f24
|
refs/heads/master
| 2021-01-10T16:48:24.207637
| 2016-01-18T09:27:18
| 2016-01-18T09:27:18
| 47,446,354
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package yitgogo.smart.view;
/**
* Created by Tiger on 2015-12-28.
*/
public interface OnDialogListener {
void onDismiss();
}
|
[
"1076192306@qq.com"
] |
1076192306@qq.com
|
39407ece3ffcf0c795156711452e9f9df97aac9d
|
df904a1c02c0c9adee2b0adeac78b85eab68f073
|
/biz.bi.vtcd/src/biz/bi/vtcd/provider/VTCDDiagramMainItemProvider.java
|
b092bc6669d3fc7ea8e7d770ffacc3432dbbcde7
|
[] |
no_license
|
sergioemv/bin.rcp-plugin.casemakerVisual
|
2882e327442fe994fcf18aab6536f88cabdbc82c
|
19c4c23ff2be841e2c3f913bc01f39bd9273bf99
|
refs/heads/master
| 2023-04-01T12:29:41.859578
| 2021-04-07T23:59:58
| 2021-04-07T23:59:58
| 355,716,232
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,058
|
java
|
/**
* <copyright>
* </copyright>
*
* $Id: VTCDDiagramMainItemProvider.java,v 1.6 2005/07/09 00:21:27 smoreno Exp $
*/
package biz.bi.vtcd.provider;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
import biz.bi.cmcore.model.CMProxyTestObject;
import biz.bi.vtcd.model.VTCDDiagramMain;
import biz.bi.vtcd.model.VTCDFactory;
import biz.bi.vtcd.model.VTCDPackage;
/**
* This is the item provider adapter for a {@link biz.bi.vtcd.model.VTCDDiagramMain} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class VTCDDiagramMainItemProvider extends ItemProviderAdapter implements
IEditingDomainItemProvider, IStructuredItemContentProvider,
ITreeItemContentProvider, IItemLabelProvider, IItemPropertySource {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = "Business Innovations"; //$NON-NLS-1$
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public VTCDDiagramMainItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public List getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addM_TestObjectPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the MTest Object feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addM_TestObjectPropertyDescriptor(Object object) {
itemPropertyDescriptors
.add(createItemPropertyDescriptor(
((ComposeableAdapterFactory) adapterFactory)
.getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_VTCDDiagramMain_m_TestObject_feature"), //$NON-NLS-1$
getString(
"_UI_PropertyDescriptor_description", "_UI_VTCDDiagramMain_m_TestObject_feature", "_UI_VTCDDiagramMain_type"), //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
VTCDPackage.eINSTANCE.getVTCDDiagramMain_M_TestObject(),
true, ItemPropertyDescriptor.GENERIC_VALUE_IMAGE, null,
null));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Collection getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(VTCDPackage.eINSTANCE
.getVTCDDiagram_M_VTCDNote());
childrenFeatures.add(VTCDPackage.eINSTANCE
.getVTCDDiagramMain_M_VTCDFigureElement());
childrenFeatures.add(VTCDPackage.eINSTANCE
.getVTCDDiagramMain_M_VTCDFigureDependency());
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns VTCDDiagramMain.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Object getImage(Object object) {
return getResourceLocator().getImage("full/obj16/VTCDDiagramMain"); //$NON-NLS-1$
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getText(Object object) {
CMProxyTestObject labelValue = ((VTCDDiagramMain) object)
.getM_TestObject();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ? getString("_UI_VTCDDiagramMain_type") : //$NON-NLS-1$
getString("_UI_VTCDDiagramMain_type") + " " + label; //$NON-NLS-1$ //$NON-NLS-2$
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(VTCDDiagramMain.class)) {
case VTCDPackage.VTCD_DIAGRAM_MAIN__MTEST_OBJECT:
fireNotifyChanged(new ViewerNotification(notification, notification
.getNotifier(), false, true));
return;
case VTCDPackage.VTCD_DIAGRAM_MAIN__MVTCD_NOTE:
case VTCDPackage.VTCD_DIAGRAM_MAIN__MVTCD_FIGURE_ELEMENT:
case VTCDPackage.VTCD_DIAGRAM_MAIN__MVTCD_FIGURE_DEPENDENCY:
fireNotifyChanged(new ViewerNotification(notification, notification
.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
/**
* This adds to the collection of {@link org.eclipse.emf.edit.command.CommandParameter}s
* describing all of the children that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void collectNewChildDescriptors(Collection newChildDescriptors,
Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add(createChildParameter(VTCDPackage.eINSTANCE
.getVTCDDiagram_M_VTCDNote(), VTCDFactory.eINSTANCE
.createVTCDNote()));
newChildDescriptors.add(createChildParameter(VTCDPackage.eINSTANCE
.getVTCDDiagramMain_M_VTCDFigureElement(),
VTCDFactory.eINSTANCE.createVTCDFigureElement()));
newChildDescriptors.add(createChildParameter(VTCDPackage.eINSTANCE
.getVTCDDiagramMain_M_VTCDFigureDependency(),
VTCDFactory.eINSTANCE.createVTCDFigureDependency()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ResourceLocator getResourceLocator() {
return VTCDEditPlugin.INSTANCE;
}
}
|
[
"sergioemv@gmail.com"
] |
sergioemv@gmail.com
|
c0d02b7b2afeca37c30be0005ab587dac31b60b9
|
4e53569b84e430534b6cf501b6b1ce9a7b996180
|
/testSpringSide4/src/org/springside/examples/showcase/jms/advanced/AdvancedNotifyMessageListener.java
|
8cc41c400e63780141cf628e701bf3a69c0e74b6
|
[] |
no_license
|
hebei8267/meloneehr
|
3010a437acda3416d42d743b4f64da715860bb8b
|
0eebd817082296a00862919812f259c9a80c7f14
|
refs/heads/master
| 2021-01-23T19:38:36.021189
| 2014-01-12T05:02:31
| 2014-01-12T05:02:31
| 32,136,383
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 974
|
java
|
package org.springside.examples.showcase.jms.advanced;
import javax.jms.MapMessage;
import javax.jms.Message;
import javax.jms.MessageListener;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 消息的异步被动接收者.
*
* 使用Spring的MessageListenerContainer侦听消息并调用本Listener进行处理.
*
* @author calvin
*
*/
public class AdvancedNotifyMessageListener implements MessageListener {
private static Logger logger = LoggerFactory.getLogger(AdvancedNotifyMessageListener.class);
/**
* MessageListener回调函数.
*/
@Override
public void onMessage(Message message) {
try {
MapMessage mapMessage = (MapMessage) message;
//打印消息详情
logger.info("UserName:" + mapMessage.getString("userName") + ", Email:" + mapMessage.getString("email")
+ ", ObjectType:" + mapMessage.getStringProperty("objectType"));
} catch (Exception e) {
logger.error("处理消息时发生异常.", e);
}
}
}
|
[
"hebei198267@gmail.com@30b3abd0-cf4e-0410-978e-df9001e6a3d7"
] |
hebei198267@gmail.com@30b3abd0-cf4e-0410-978e-df9001e6a3d7
|
ea1c881e03fb7a414ff0bdab0aff7dce304ced8d
|
976875c25f26ef3e75c051ee9f94f4e1c69fb57f
|
/src/typeinfo/Person.java
|
db494619c0c4bbd13d09cb372af4f861c02c529f
|
[] |
no_license
|
NanCarp/think-in-java-4-learning
|
21c4f14b65c58cd33e81145a12cb11be122919f5
|
9090a00d10ac3d11ccacee280f2754f6a3b80a9d
|
refs/heads/master
| 2021-03-27T20:18:46.516874
| 2018-08-19T15:35:57
| 2018-08-19T15:35:57
| 96,985,603
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 934
|
java
|
package typeinfo;
import net.mindview.util.Null;
/**
* Created by nanca on 8/18/2017.
* A class with a Null Object.
*/
class Person {
public final String first;
public final String last;
public final String address;
// etc.
public Person(String first, String last, String address) {
this.first = first;
this.last = last;
this.address = address;
}
@Override
public String toString() {
return "Person{" +
"first='" + first + '\'' +
", last='" + last + '\'' +
", address='" + address + '\'' +
'}';
}
public static class NullPerson extends Person implements Null {
private NullPerson() {
super("None", "None", "None");
}
public String toString() {
return "NullPerson()";
}
}
public static final Person NULL = new NullPerson();
}
|
[
"nancarpli@163.com"
] |
nancarpli@163.com
|
31d8fef512cd8aafd4fe8e380a9c0a54bea99647
|
6e4978da76071211117a8ecbde208553c26a1087
|
/Taxware/src/Java/atg/integrations/taxware/TaxWareVerifyZipInfo.java
|
e8278d727c72d0e3908c67b37d01810c1f7c7db0
|
[] |
no_license
|
vkscorpio3/ATG_TASK
|
3b41df29898447bb4409bf46bc735045ce7d8cc6
|
8751d555c35a968d4d73c9e22d7f56a6c82192e7
|
refs/heads/master
| 2020-03-08T16:56:40.463816
| 2014-12-12T10:55:01
| 2014-12-12T10:55:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,624
|
java
|
/*<ATGCOPYRIGHT>
* Copyright (C) 1998-2011 Art Technology Group, Inc.
* All Rights Reserved. No use, copying or distribution of this
* work may be made except in accordance with a valid license
* agreement from Art Technology Group. This notice must be
* included on all copies, modifications and derivatives of this
* work.
*
* Art Technology Group (ATG) MAKES NO REPRESENTATIONS OR WARRANTIES
* ABOUT THE SUITABILITY OF THE SOFTWARE, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. ATG SHALL NOT BE
* LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING,
* MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES.
*
* "Dynamo" is a trademark of Art Technology Group, Inc.
</ATGCOPYRIGHT>*/
package atg.integrations.taxware;
import atg.nucleus.*;
import java.util.Date;
import atg.payment.avs.AddressVerificationInfo;
/**
* <p> This orderprocessing object verifies zipcode.
*
*
* @author michaelt (cmore)
* @see VeraZipable
* @see VeraZipOrderImpl
* @version $Id: //product/DCS/version/10.0.3/Java/atg/integrations/taxware/TaxWareVerifyZipInfo.java#2 $$Change: 651448 $
* @updated $DateTime: 2011/06/07 13:55:45 $$Author: rbarbier $
**/
public class TaxWareVerifyZipInfo extends GenericService {
//-------------------------------------
// Class version string
public static String CLASS_VERSION = "$Id: //product/DCS/version/10.0.3/Java/atg/integrations/taxware/TaxWareVerifyZipInfo.java#2 $$Change: 651448 $";
/** Stop processing on tax calculation error? Defaults to true. */
protected boolean mStopProcessingOnError = true;
/** Set whether processOrder will return false if an exception occurs */
public void setStopProcessingOnError(boolean pStopProcessingOnError) {
mStopProcessingOnError = pStopProcessingOnError;
}
/** Get whether processOrder will return false if an exception occurs. */
public boolean getStopProcessingOnError() { return(mStopProcessingOnError); }
protected String mErrorMessage;
/**
* @deprecated This method is not thread safe. Inspect the AddressVerificationInfo for
* error messages
**/
public void setErrorMessage(String pErrorMessage) {
mErrorMessage = pErrorMessage;
}
/**
* @deprecated This method is not thread safe. Inspect the AddressVerificationInfo for
* error messages
**/
public String getErrorMessage() {
return mErrorMessage;
}
/** Constructor. */
public TaxWareVerifyZipInfo() {
}
/** Sets the zip error string associated with the order,
* and returns the status for processOrder. */
protected boolean setErrorAndGetReturnValue(String strError, String address,
ZipRequest zrequest)
{
Object[] array = {address.toUpperCase(), zrequest.getCityName(),
zrequest.getStateCode(), zrequest.getZipCode(), strError};
String logErrorString = SalesTaxService.msg.format("TXWRErrorVerifyZip", array);
setErrorMessage(logErrorString);
if (mStopProcessingOnError)
return(false);
return(true);
}
/** Modifies the request before submitting it to TaxWare. */
protected void modifyRequest(AddressVerificationInfo pOrder,
ZipRequest request, boolean isBilling) {
// do nothing -- can be overridden by subclasses
}
/** Returns whether or not we need to reverify shipTo info. */
protected static boolean shouldReverify(ZipRequest zipRequest,
ZipResult zipResult) {
return(!zipResult.matchesRequest(zipRequest));
}
//--------------------------------------
/** This method gets the shipping cost from the ShippingMethod class. */
public boolean verifyZip(AddressVerificationInfo pOrder) {
boolean bResult = true;
VeraZipable zipOrder = (VeraZipable) pOrder;
int cAddresses = zipOrder.getMaxCountOfZipAddresses();
for (int i = 0; i < cAddresses; i++) {
ZipResult zipresultOld = zipOrder.getZipResultAt(i);
ZipRequest ziprequest = zipOrder.getZipRequestForAddress(i);
if (ziprequest != null && isLoggingDebug())
logDebug(ziprequest.toString());
boolean bShouldVerify = true;
// if getZipRequestForAddress returned NULL,
// that means this address should not be checked
if (null == ziprequest) {
// okay, don't check this sucker
bShouldVerify = false;
// blow the old result away
if (zipresultOld != null)
zipOrder.setZipResultAt(i, null);
} else if (null != zipresultOld) {
bShouldVerify = shouldReverify(ziprequest, zipresultOld);
if (!bShouldVerify) {
// probably should add error again,
// if we haven't chosen a valid option
if (zipresultOld.getErrorCode() != 0 && zipresultOld.getErrorCode() != 29 &&
zipresultOld.getChosenIndex() == -1) {
bResult = setErrorAndGetReturnValue(zipresultOld.getErrorMessage(),
zipOrder.getAddressNameForIndex(i),
ziprequest)
&& bResult;
}
}
}
if (bShouldVerify) {
ZipResult zipresult = null;
boolean bCalculated = false;
try {
zipresult = VeraZipCaller.calculate(ziprequest);
bCalculated = true;
} catch (TaxwareException except) {
if (isLoggingError())
logError(SalesTaxService.msg.format("TXWRErrorWithExceptVerifyZip",
except.toString()));
bCalculated = setErrorAndGetReturnValue(except.toString(),
zipOrder.getAddressNameForIndex(i),
ziprequest);
}
bResult = bResult && bCalculated;
// always reset the zip result, so the old
// one will be blown away in case of failure.
zipOrder.setZipResultAt(i, zipresult);
if (bCalculated && (zipresult != null)) {
// what to do the code of 29 ? There is no way to pass the county
// name from the web interface. Also, even if the county is passed in the
// ziprequest object, this code is returned anyways...
if (zipresult.getErrorCode() != 0 && zipresult.getErrorCode() != 29) {
bCalculated = setErrorAndGetReturnValue(zipresult.getErrorMessage(),
zipOrder.getAddressNameForIndex(i),
ziprequest);
bResult = bResult && bCalculated;
}
}
if (isLoggingDebug()) {
if ((null != zipresult) && (zipresult.getResultItemCount() > 0)) {
int numRecs = zipresult.getResultItemCount();
for (int j=0; j < numRecs; j++) {
System.out.println(zipresult.getDescriptionAt(j));
}
}
}
}
}
if (mStopProcessingOnError)
return(bResult);
else
return(true);
}
}
|
[
"Andrii_Borovyk1@EPUAKHAW0679.kyiv.epam.com"
] |
Andrii_Borovyk1@EPUAKHAW0679.kyiv.epam.com
|
c76e5a48269e69de525c775a1c4d0cc1de3a6f7d
|
8c443950699bc70ff032c7364e78543f86ef7baa
|
/08.JavaServerFaces/src/main/java/app/services/EmployeeServiceImpl.java
|
51755d61e1269cf75444cd2804074008c4298c31
|
[] |
no_license
|
AleksandarBoev/Softuni-Java-Web-Development-Basics
|
b514199afc97ddc07b234d4f151250cb8f18adfc
|
0fdd405370cc277da2436283d9365035812744a4
|
refs/heads/master
| 2020-04-17T17:12:05.096987
| 2019-03-20T23:32:31
| 2019-03-20T23:32:31
| 166,773,086
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,895
|
java
|
package app.services;
import app.domain.entities.Employee;
import app.domain.service_models.EmployeeServiceModel;
import app.repository.EmployeeRepository;
import org.modelmapper.ModelMapper;
import org.modelmapper.TypeMap;
import javax.inject.Inject;
import java.math.BigDecimal;
import java.util.List;
import java.util.stream.Collectors;
public class EmployeeServiceImpl implements EmployeeService {
private EmployeeRepository employeeRepository;
private ModelMapper modelMapper;
@Inject
public EmployeeServiceImpl(EmployeeRepository employeeRepository, ModelMapper modelMapper) {
this.employeeRepository = employeeRepository;
this.modelMapper = modelMapper;
}
@Override
public boolean save(EmployeeServiceModel employeeServiceModel) {
try {
Employee employee = this.modelMapper.map(employeeServiceModel, Employee.class);
this.employeeRepository.save(employee);
return true;
} catch (Exception e) { //if some validation fails
return false;
}
}
@Override
public List<EmployeeServiceModel> getAllEmployees() {
return this.employeeRepository.getAll()
.stream()
.map(e -> this.modelMapper.map(e, EmployeeServiceModel.class))
.collect(Collectors.toList());
}
@Override
public EmployeeServiceModel findEmployeeById(String id) {
return this.modelMapper.map(this.employeeRepository.findById(id), EmployeeServiceModel.class);
}
@Override
public boolean removeEmployee(String id) {
return this.employeeRepository.delete(id);
}
@Override
public BigDecimal getSalariesSum() {
return this.employeeRepository.getSalariesSum();
}
@Override
public BigDecimal getSalariesAvg() {
return this.employeeRepository.getSalariesAvg();
}
}
|
[
"aleksandarboev95@gmail.com"
] |
aleksandarboev95@gmail.com
|
5a26cda61c35f8721392fbe020b2b13d5303871a
|
369270a14e669687b5b506b35895ef385dad11ab
|
/java.desktop/sun/awt/X11/XChar2b.java
|
c224878e7e3e29014eb093564c3b7f2c0b24d818
|
[] |
no_license
|
zcc888/Java9Source
|
39254262bd6751203c2002d9fc020da533f78731
|
7776908d8053678b0b987101a50d68995c65b431
|
refs/heads/master
| 2021-09-10T05:49:56.469417
| 2018-03-20T06:26:03
| 2018-03-20T06:26:03
| 125,970,208
| 3
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,481
|
java
|
// This file is an automatically generated file, please do not edit this file, modify the WrapperGenerator.java file instead !
package sun.awt.X11;
import jdk.internal.misc.Unsafe;
import sun.util.logging.PlatformLogger;
public class XChar2b extends XWrapperBase {
private Unsafe unsafe = XlibWrapper.unsafe;
private final boolean should_free_memory;
public static int getSize() { return 2; }
public int getDataSize() { return getSize(); }
long pData;
public long getPData() { return pData; }
public XChar2b(long addr) {
log.finest("Creating");
pData=addr;
should_free_memory = false;
}
public XChar2b() {
log.finest("Creating");
pData = unsafe.allocateMemory(getSize());
should_free_memory = true;
}
public void dispose() {
log.finest("Disposing");
if (should_free_memory) {
log.finest("freeing memory");
unsafe.freeMemory(pData);
}
}
public byte get_byte1() { log.finest("");return (Native.getByte(pData+0)); }
public void set_byte1(byte v) { log.finest(""); Native.putByte(pData+0, v); }
public byte get_byte2() { log.finest("");return (Native.getByte(pData+1)); }
public void set_byte2(byte v) { log.finest(""); Native.putByte(pData+1, v); }
String getName() {
return "XChar2b";
}
String getFieldsAsString() {
StringBuilder ret = new StringBuilder(80);
ret.append("byte1 = ").append( get_byte1() ).append(", ");
ret.append("byte2 = ").append( get_byte2() ).append(", ");
return ret.toString();
}
}
|
[
"841617433@qq.com"
] |
841617433@qq.com
|
5154626febda1d47920b56745b1a853b0c7e55b7
|
59ca721ca1b2904fbdee2350cd002e1e5f17bd54
|
/aliyun-java-sdk-vpc/src/main/java/com/aliyuncs/vpc/model/v20160428/DescribePhysicalConnectionsResponse.java
|
91e444c030ddf02869b73cb31ece88b891375673
|
[
"Apache-2.0"
] |
permissive
|
longtx/aliyun-openapi-java-sdk
|
8fadfd08fbcf00c4c5c1d9067cfad20a14e42c9c
|
7a9ab9eb99566b9e335465a3358553869563e161
|
refs/heads/master
| 2020-04-26T02:00:35.360905
| 2019-02-28T13:47:08
| 2019-02-28T13:47:08
| 173,221,745
| 2
| 0
|
NOASSERTION
| 2019-03-01T02:33:35
| 2019-03-01T02:33:35
| null |
UTF-8
|
Java
| false
| false
| 5,835
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.aliyuncs.vpc.model.v20160428;
import java.util.List;
import com.aliyuncs.AcsResponse;
import com.aliyuncs.vpc.transform.v20160428.DescribePhysicalConnectionsResponseUnmarshaller;
import com.aliyuncs.transform.UnmarshallerContext;
/**
* @author auto create
* @version
*/
public class DescribePhysicalConnectionsResponse extends AcsResponse {
private String requestId;
private Integer pageNumber;
private Integer pageSize;
private Integer totalCount;
private List<PhysicalConnectionType> physicalConnectionSet;
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
}
public Integer getPageNumber() {
return this.pageNumber;
}
public void setPageNumber(Integer pageNumber) {
this.pageNumber = pageNumber;
}
public Integer getPageSize() {
return this.pageSize;
}
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
public Integer getTotalCount() {
return this.totalCount;
}
public void setTotalCount(Integer totalCount) {
this.totalCount = totalCount;
}
public List<PhysicalConnectionType> getPhysicalConnectionSet() {
return this.physicalConnectionSet;
}
public void setPhysicalConnectionSet(List<PhysicalConnectionType> physicalConnectionSet) {
this.physicalConnectionSet = physicalConnectionSet;
}
public static class PhysicalConnectionType {
private String physicalConnectionId;
private String accessPointId;
private String type;
private String status;
private String businessStatus;
private String creationTime;
private String enabledTime;
private String lineOperator;
private String spec;
private String peerLocation;
private String portType;
private String redundantPhysicalConnectionId;
private String name;
private String description;
private String adLocation;
private String portNumber;
private String circuitCode;
private Long bandwidth;
public String getPhysicalConnectionId() {
return this.physicalConnectionId;
}
public void setPhysicalConnectionId(String physicalConnectionId) {
this.physicalConnectionId = physicalConnectionId;
}
public String getAccessPointId() {
return this.accessPointId;
}
public void setAccessPointId(String accessPointId) {
this.accessPointId = accessPointId;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
}
public String getBusinessStatus() {
return this.businessStatus;
}
public void setBusinessStatus(String businessStatus) {
this.businessStatus = businessStatus;
}
public String getCreationTime() {
return this.creationTime;
}
public void setCreationTime(String creationTime) {
this.creationTime = creationTime;
}
public String getEnabledTime() {
return this.enabledTime;
}
public void setEnabledTime(String enabledTime) {
this.enabledTime = enabledTime;
}
public String getLineOperator() {
return this.lineOperator;
}
public void setLineOperator(String lineOperator) {
this.lineOperator = lineOperator;
}
public String getSpec() {
return this.spec;
}
public void setSpec(String spec) {
this.spec = spec;
}
public String getPeerLocation() {
return this.peerLocation;
}
public void setPeerLocation(String peerLocation) {
this.peerLocation = peerLocation;
}
public String getPortType() {
return this.portType;
}
public void setPortType(String portType) {
this.portType = portType;
}
public String getRedundantPhysicalConnectionId() {
return this.redundantPhysicalConnectionId;
}
public void setRedundantPhysicalConnectionId(String redundantPhysicalConnectionId) {
this.redundantPhysicalConnectionId = redundantPhysicalConnectionId;
}
public String getName() {
return this.name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getAdLocation() {
return this.adLocation;
}
public void setAdLocation(String adLocation) {
this.adLocation = adLocation;
}
public String getPortNumber() {
return this.portNumber;
}
public void setPortNumber(String portNumber) {
this.portNumber = portNumber;
}
public String getCircuitCode() {
return this.circuitCode;
}
public void setCircuitCode(String circuitCode) {
this.circuitCode = circuitCode;
}
public Long getBandwidth() {
return this.bandwidth;
}
public void setBandwidth(Long bandwidth) {
this.bandwidth = bandwidth;
}
}
@Override
public DescribePhysicalConnectionsResponse getInstance(UnmarshallerContext context) {
return DescribePhysicalConnectionsResponseUnmarshaller.unmarshall(this, context);
}
}
|
[
"haowei.yao@alibaba-inc.com"
] |
haowei.yao@alibaba-inc.com
|
0881bc373782e0cc4575cc0c32ab2a131971c5ce
|
bfdb7a4a9fc8b23b9ca8eff94ec24bcab091f31b
|
/datacentre/accessPermission/resourceServer/src/main/java/com/standard/resource/entity/OAthGrantedAuthority.java
|
22b89ad0e301c7c6225fdf34d191ec2cabf9516b
|
[] |
no_license
|
hzjianglf/standard
|
1c8514fc2a9fdb8a8c4b128475904534903e8f32
|
06a777d6bd2cb70433e206673b470f75f7d4515d
|
refs/heads/master
| 2020-07-27T02:08:20.298130
| 2019-07-07T10:47:19
| 2019-07-07T10:47:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,552
|
java
|
package com.standard.resource.entity;
import com.standard.base.entity.BaseEntity;
import com.standard.codecreate.feature.annotation.IsCreate;
import lombok.Getter;
import lombok.Setter;
import org.springframework.http.HttpMethod;
import javax.persistence.*;
@Getter
@Setter
@Entity
@IsCreate
@Table(name = "oath_granted_authority_",
uniqueConstraints = {@UniqueConstraint(columnNames = {"resource_id_", "role_id_", "api_uri_"})},
indexes = {@Index(columnList = "resource_id_")
, @Index(columnList = "role_id_")})
public class OAthGrantedAuthority extends BaseEntity {
private static final long serialVersionUID = 4062924753193768577L;
@Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
@Column(name = "id_")
private Long id;
@Column(name = "resource_id_")
private String resourceId;
/*apiName*/
@Column(name = "api_name_")
private String apiName;
/*api描述*/
@Column(name = "api_description_")
private String apiDescription;
/*资源定位*/
@Column(name = "api_uri_")
private String apiUri;
//对此接口的读写权限,如果多个
@Column(name = "method_")
@Enumerated(EnumType.STRING)
private HttpMethod method = HttpMethod.GET;
@Column(name = "macther_type_")
private String mactherType;
@Column(name = "role_id_")
private String roleId;
@Column(name = "role_name_")
private String roleName;
// 定义某几个参数的规则,
@Column(name = "scope_")
private String scope;
}
|
[
"422375723@qq.com"
] |
422375723@qq.com
|
d8a4a4b113ea80c2bab2a1ae9823cebc4da71ac5
|
ce54a65bd0a1206b49adcdc8706b114dc5c60dc8
|
/src/main/java/com/xcs/phase2/dao/master/MasProductCategoryGroupPRCDAOImpl.java
|
06d17f4de6074b7f1ba4b5fe2212acb8296f352f
|
[] |
no_license
|
Sitta-Dev/Excise_API
|
d961fa215ef59ed13b5749b010563e07bf00516c
|
c1657a342ac759e7acf8eae60a2c4ceefba73098
|
refs/heads/master
| 2023-01-13T12:05:50.060374
| 2020-11-19T05:58:08
| 2020-11-19T05:58:08
| 285,178,533
| 0
| 1
| null | 2020-08-05T09:22:54
| 2020-08-05T04:26:09
|
Java
|
UTF-8
|
Java
| false
| false
| 3,610
|
java
|
package com.xcs.phase2.dao.master;
import com.xcs.phase2.constant.Pattern;
import com.xcs.phase2.model.master.MasProductCategoryGroupPRC;
import com.xcs.phase2.request.master.MasProductCategoryGroupPRCgetByConReq;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.List;
@Service
@Transactional
public class MasProductCategoryGroupPRCDAOImpl extends MasterExt implements MasProductCategoryGroupPRCDAO{
private static final Logger log = LoggerFactory.getLogger(MasProductCategoryGroupPRCDAOImpl.class);
@Override
public List<MasProductCategoryGroupPRC> MasProductCategoryGroupPRCgetByCon(MasProductCategoryGroupPRCgetByConReq req) {
StringBuilder sqlBuilder = new StringBuilder()
.append(" select " +
" DUTY_CODE," +
" TYPE_CODE," +
" SUBTYPE_CODE," +
" PRODUCT_CODE," +
" PRODUCT_NAME," +
" to_char(BEGIN_DATE,'" + Pattern.FORMAT_DATE + "') as BEGIN_DATE," +
" to_char(END_DATE,'" + Pattern.FORMAT_DATE + "') as END_DATE," +
" UPD_USERID," +
" to_char(UPD_DATE,'" + Pattern.FORMAT_DATE + "') as UPD_DATE," +
" PRC_PARAM," +
" LAW_DUTY_CODE," +
" DUTY_FLAG," +
" SETTYPE_CODE," +
" PRODUCT_CODE_OLD," +
" NAME_DUTY," +
" CATAGORY_FLAG," +
" IS_ACTIVE" +
" from MAS_PRODUCT_PRC" +
" where IS_ACTIVE = 1 and SUBSTR(DUTY_CODE, 1, 2) = '"+req.getDUTY_CODE()+"'");
log.info("[SQL] : " + sqlBuilder.toString());
@SuppressWarnings("unchecked")
List<MasProductCategoryGroupPRC> dataList = getJdbcTemplate().query(sqlBuilder.toString(), new RowMapper() {
public MasProductCategoryGroupPRC mapRow(ResultSet rs, int rowNum) throws SQLException {
MasProductCategoryGroupPRC item = new MasProductCategoryGroupPRC();
item.setDUTY_CODE(rs.getString("DUTY_CODE"));
item.setTYPE_CODE(rs.getString("TYPE_CODE"));
item.setSUBTYPE_CODE(rs.getString("SUBTYPE_CODE"));
item.setPRODUCT_CODE(rs.getString("PRODUCT_CODE"));
item.setPRODUCT_NAME(rs.getString("PRODUCT_NAME"));
item.setBEGIN_DATE(rs.getString("BEGIN_DATE"));
item.setEND_DATE(rs.getString("END_DATE"));
item.setUPD_USERID(rs.getString("UPD_USERID"));
item.setUPD_DATE(rs.getString("UPD_DATE"));
item.setPRC_PARAM(rs.getString("PRC_PARAM"));
item.setLAW_DUTY_CODE(rs.getString("LAW_DUTY_CODE"));
item.setDUTY_FLAG(rs.getString("DUTY_FLAG"));
item.setSETTYPE_CODE(rs.getString("SETTYPE_CODE"));
item.setPRODUCT_CODE_OLD(rs.getString("PRODUCT_CODE_OLD"));
item.setNAME_DUTY(rs.getString("NAME_DUTY"));
item.setCATAGORY_FLAG(rs.getString("CATAGORY_FLAG"));
item.setIS_ACTIVE(rs.getInt("IS_ACTIVE"));
return item;
}
});
return dataList;
}
}
|
[
"bakugan_chun@hotmail.com"
] |
bakugan_chun@hotmail.com
|
a6520bb7fd090916642862506544f27f3493a61e
|
fdc69ea741986f14c3e7676ac8bda9a3314471d2
|
/Exercises/03 - Inheritance/Source/Scacchi/src/scacchi/scacchiera/pezzi/Pezzo.java
|
dc94974bc92471b3ca935c4d380a90731daeb186
|
[] |
no_license
|
deib-polimi/didattica-ing-software
|
8902f7b11a818f7a40ed5ecfb89ad6516df3ac11
|
4c76178b2aa739c9e3ab29f907312f250da24225
|
refs/heads/master
| 2020-04-12T06:37:15.114827
| 2017-04-10T12:52:16
| 2017-04-10T12:52:16
| 32,870,182
| 8
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package scacchi.scacchiera.pezzi;
import scacchi.scacchiera.Casella;
import scacchi.scacchiera.Color;
import scacchi.scacchiera.Scacchiera;
public abstract class Pezzo {
private final Color color;
private Casella casella;
public Pezzo(Casella casella, Color color){
this.setCasella(casella);
this.color=color;
}
public Color getColor() {
return color;
}
public Casella getCasella() {
return casella;
}
public void setCasella(Casella casella) {
this.casella = casella;
}
public abstract boolean mossaValida(Scacchiera scacchiera, Casella destinazione);
}
|
[
"cla.menghi@gmail.com"
] |
cla.menghi@gmail.com
|
0ba4d4bbe2a8c07086a0f418357ca46f55402198
|
69cd2c960e14297f364ea83ef0c1106d8368b15c
|
/mbhd-swing/src/main/java/org/multibit/hd/ui/views/wizards/request_bitcoin/RequestBitcoinWizard.java
|
cdac3d02b0315629b5d9e2194b21a502fec1d0df
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
litecoin-project/multibit-hd
|
90d03bd4fd8828931efcfde47d26ba4d330116ad
|
e4a6c84d5adf42e300be9a71b5faa97914793063
|
refs/heads/develop
| 2020-12-28T21:27:49.173734
| 2015-03-19T07:21:41
| 2015-03-19T07:21:41
| 29,544,039
| 7
| 13
| null | 2015-01-20T18:11:52
| 2015-01-20T18:11:52
| null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
package org.multibit.hd.ui.views.wizards.request_bitcoin;
import com.google.common.base.Optional;
import org.multibit.hd.ui.views.wizards.AbstractWizard;
import org.multibit.hd.ui.views.wizards.AbstractWizardPanelView;
import java.util.Map;
/**
* <p>Wizard to provide the following to UI for "request bitcoin":</p>
* <ol>
* <li>Enter details</li>
* <li>Present QR code popover</li>
* </ol>
*
* @since 0.0.1
*
*/
public class RequestBitcoinWizard extends AbstractWizard<RequestBitcoinWizardModel> {
public RequestBitcoinWizard(RequestBitcoinWizardModel model, boolean isExiting) {
super(model, isExiting, Optional.absent());
}
@Override
protected void populateWizardViewMap(Map<String, AbstractWizardPanelView> wizardViewMap) {
wizardViewMap.put(RequestBitcoinState.REQUEST_ENTER_DETAILS.name(), new RequestBitcoinEnterDetailsPanelView(this, RequestBitcoinState.REQUEST_ENTER_DETAILS.name()));
}
}
|
[
"g.rowe@froot.co.uk"
] |
g.rowe@froot.co.uk
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.