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
e8877bee3491e05bbc936558049be8362204a32d
5cb5d1fc80c1f68ade44f0a26a02d1aeb118c64d
/ink-user/ink-user-api/src/main/java/com/ink/user/api/model/in/AccInterestInput.java
9aeba6bd87409d0ba007f1bfe67e939f1a7d0f89
[]
no_license
gspandy/zx-parent
4350d1ef851d05eabdcf8c6c7049a46593e3c22e
5cdc52e645537887e86e5cbc117139ca1a56f55d
refs/heads/master
2023-08-31T15:29:50.763388
2016-08-11T09:17:29
2016-08-11T09:20:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,051
java
package com.ink.user.api.model.in; import java.io.Serializable; import java.util.ArrayList; import java.util.List; import javax.validation.constraints.NotNull; import com.ink.user.api.model.InterestBean; import org.hibernate.validator.constraints.Length; import com.alibaba.fastjson.annotation.JSONField; /** * @Description: 计息 * @author wanghao^_^ * @date 2016年6月13日 下午3:55:53 * @version V1.0 */ public class AccInterestInput implements Serializable { /** * @Fields serialVersionUID : TODO */ private static final long serialVersionUID = 7948353875662529871L; // 交易代码 @NotNull @Length(max = 8) private String txnCode; @NotNull @Length(max = 64) private String id; // 订单日期(YYYYMMDD) @NotNull @Length(max = 14) private String tradeDate; // 商户编号(托管商户编号) @NotNull @Length(max = 24) private String mchId; @NotNull @JSONField(serialize = false) private List<InterestBean> list = new ArrayList<InterestBean>();// 不序列化改字段 public String getTxnCode() { return txnCode; } public void setTxnCode(String txnCode) { this.txnCode = txnCode; } public String getId() { return id; } public void setId(String id) { this.id = id; } public String getTradeDate() { return tradeDate; } public void setTradeDate(String tradeDate) { this.tradeDate = tradeDate; } public String getMchId() { return mchId; } public void setMchId(String mchId) { this.mchId = mchId; } public List<InterestBean> getList() { return list; } public void setList(List<InterestBean> list) { this.list = list; } @Override public String toString() { StringBuilder builder = new StringBuilder(); builder.append("AccInterestInput [txnCode="); builder.append(txnCode); builder.append(", id="); builder.append(id); builder.append(", tradeDate="); builder.append(tradeDate); builder.append(", mchId="); builder.append(mchId); builder.append(", list="); builder.append(list); builder.append("]"); return builder.toString(); } }
[ "zxzhouxiang123@163.com" ]
zxzhouxiang123@163.com
976ff2e2a9b24222070f26a70a66094240f4ce19
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/54_db-everywhere-com.gbshape.dbe.struts.bean.DataBaseBean-1.0-4/com/gbshape/dbe/struts/bean/DataBaseBean_ESTest_scaffolding.java
0f5ca358e3ae57fcd4d5ed322d814b8b9a09bd11
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
546
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Mon Oct 28 17:07:10 GMT 2019 */ package com.gbshape.dbe.struts.bean; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; import org.evosuite.runtime.sandbox.Sandbox; import org.evosuite.runtime.sandbox.Sandbox.SandboxMode; @EvoSuiteClassExclude public class DataBaseBean_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
4c304e06875ddc6c60396029920adc359215d477
866cc70a0f6ffc4446c9d378d2e01aee58919198
/src/main/java/mayday/graphviewer/core/edges/EdgeWeightAction.java
17e79875f66e236a8e28ead65c416270f058fa07
[]
no_license
Integrative-Transcriptomics/Mayday-pathway
eb4a6ca4ee057f4a0280e487428f77dee5d5f9de
a64b6df0eb5c942daa8ed11a1b29f32d30eefe18
refs/heads/master
2023-01-12T00:46:38.341409
2016-08-01T09:07:07
2016-08-01T09:07:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
913
java
package mayday.graphviewer.core.edges; import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import mayday.core.settings.SettingDialog; import mayday.core.settings.typed.DoubleSetting; import mayday.graphviewer.core.GraphViewerPlot; @SuppressWarnings("serial") public class EdgeWeightAction extends AbstractAction { private GraphViewerPlot canvas; public EdgeWeightAction(GraphViewerPlot c) { super("Set Weight"); canvas=c; } @Override public void actionPerformed(ActionEvent e) { double w=canvas.getHighlightEdge().getWeight(); DoubleSetting setting=new DoubleSetting("Weight", "The weight of the edge: any real number" , w); SettingDialog dialog=new SettingDialog(canvas.getOutermostJWindow(), "New Edge weight", setting); dialog.showAsInputDialog(); if(dialog.closedWithOK()) { canvas.getHighlightEdge().setWeight(setting.getDoubleValue()); } } }
[ "adrian.geissler@student.uni-tuebingen.de" ]
adrian.geissler@student.uni-tuebingen.de
0825b25e3eb8d0a25ae4435d2d0388daf2c11d78
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/19/19_e635d7a51b0732ba7975d17a7b03a3befcf616ae/FrontEnd/19_e635d7a51b0732ba7975d17a7b03a3befcf616ae_FrontEnd_t.java
a7d75b716a757cbee734165f87b7da63f0697e2f
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
6,242
java
/** * [[[copyright]]] */ package edu.cmu.sphinx.frontend; import edu.cmu.sphinx.util.SphinxProperties; import edu.cmu.sphinx.util.Timer; import java.io.IOException; /** * Pre-processes the audio into Features. The FrontEnd consists * of a series of processors. The FrontEnd connects all the processors * by the input and output points. * * <p>The input to the FrontEnd is an AudioSource. For an audio stream, * the <code>StreamAudioSource</code> should be used. The * input can also be a file containing a list of audio files, in which case * the <code>BatchFileAudioSource</code> can be used. * * <p>The output of the FrontEnd are Features, so a <code>FeatureSource</code> * is needed. * A typical sequence of calls to initialize the FrontEnd is: * <pre> * FrontEnd fe = new FrontEnd("frontend", context); * fe.setAudioSource(new StreamAudioSource(...)); * * // create the processors * Preemphasizer preemphasizer = new Preemphasizer * ("Preemphasizer", context, fe.getAudioSource()); * Windower windower = new Windower * ("HammingWindow", context, preemphasizer); * SpectrumAnalyzer spectrumAnalyzer = new SpectrumAnalyzer * ("FFT", context, windower); * MelFilterbank melFilterbank = new MelFilterbank * ("MelFilter", context, spectrumAnalyzer); * MelCepstrumProducer melCepstrum = new MelCepstrumProducer * ("MelCepstrum", context, melFilterbank); * CepstralMeanNormalizer cmn = new CepstralMeanNormalizer * ("CMN", context, melCepstrum); * * // FeatureExtractor implements FeatureSource * fe.setFeatureSource(new FeatureExtractor(name, context, cmn)); * </pre> * * <p>To obtain <code>Feature</code>(s) from the FrontEnd, you would use: * <pre> * fe.getFeatureFrame(10); * </pre> * which will return a <code>FeatureFrame</code> with 10 <code>Feature</code>s * in it. If there are only 5 more features before the end of segment, * * @see AudioSource * @see CepstralMeanNormalizer * @see Feature * @see FeatureExtractor * @see FeatureFrame * @see FeatureSource * @see MelCepstrumProducer * @see MelFilterbank * @see SpectrumAnalyzer * @see Windower */ public class FrontEnd extends DataProcessor { /** * The name of the SphinxProperty for sample rate in Hertz (i.e., * number of times per second), which has a default value of 8000. */ public static final String PROP_SAMPLE_RATE = "edu.cmu.sphinx.frontend.sampleRate"; /** * The name of the SphinxProperty for the number of bytes per frame, * which has a default value of 4000. */ public static final String PROP_BYTES_PER_AUDIO_FRAME = "edu.cmu.sphinx.frontend.bytesPerAudioFrame"; /** * The name of the SphinxProperty for window size in milliseconds, * which has a default value of 25.625F. */ public static final String PROP_WINDOW_SIZE_MS = "edu.cmu.sphinx.frontend.windowSizeInMs"; /** * The name of the SphinxProperty for window shift in milliseconds, * which has a default value of 10F. */ public static final String PROP_WINDOW_SHIFT_MS = "edu.cmu.sphinx.frontend.windowShiftInMs"; /** * The name of the SphinxProperty for the size of a cepstrum, which is * 13 by default. */ public static final String PROP_CEPSTRUM_SIZE = "edu.cmu.sphinx.frontend.cepstrumSize"; private AudioSource audioSource; private FeatureSource featureSource; /** * Constructs a default FrontEnd. * * @param name the name of this FrontEnd * @param context the context of this FrontEnd */ public FrontEnd(String name, String context) { super(name, context); } /** * Returns the AudioSource of this FrontEnd. The AudioSource of * the front end is where it gets its audio data. * * @return the AudioSource */ public AudioSource getAudioSource() { return audioSource; } /** * Sets the AudioSource of this FrontEnd. The AudioSource of * the front end is where it gets its audio data * * @param audioSource the AudioSource */ public void setAudioSource(AudioSource audioSource) { this.audioSource = audioSource; } /** * Returns the FeatureSource of this FrontEnd. * * @return the FeatureSource of this FrontEnd */ public FeatureSource getFeatureSource() { return featureSource; } /** * Sets the FeatureSource of this FrontEnd. * * @param featureSource the FeatureSource */ public void setFeatureSource(FeatureSource featureSource) { this.featureSource = featureSource; } /** * Returns the next N number of Features produced by this FrontEnd * as a single FeatureFrame. * The number of Features return maybe less than N, in which * case the last Feature will contain a Signal.SEGMENT_END signal. * Consequently, the size of the FeatureFrame will be less than N. * * @param numberFeatures the number of Features to return * * @return the next N number of Features in a FeatureFrame * * @see FeatureFrame */ public FeatureFrame getFeatureFrame(int numberFeatures) throws IOException { Feature[] features = new Feature[numberFeatures]; Feature feature = null; int i = 0; do { feature = featureSource.getFeature(); features[i++] = feature; if (feature.hasSegmentEndSignal()) { break; } } while (i < numberFeatures); // if we hit the end of segment before getting the // desired number of features, shrink the array if (i < numberFeatures) { Feature[] lessFeatures = new Feature[i]; for (i = 0; i < lessFeatures.length; i++) { lessFeatures[i] = features[i]; } features = lessFeatures; } FeatureFrame featureFrame = new FeatureFrame(features); return featureFrame; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
e22d38977c10685601b035af7722486cace28a25
95d8d7567e028d153ee24b2de238464352db340c
/_/1980EN_11_Code/ticket-agency-cluster/ticket-agency-cluster-client/src/main/java/com/packtpub/wflydevelopment/chapter11/client/IOUtils.java
274ba06847b51fa4b014a81aff87a9627c58010b
[ "Apache-2.0" ]
permissive
paullewallencom/java-978-1-7821-7198-0
4a9896201b9d54ca4af96acd2b3929bbd60a96f6
02a2efbafec11976fa5dd0ece1c6686e61c2b9cc
refs/heads/main
2023-02-05T07:50:05.980996
2020-12-30T05:49:45
2020-12-30T05:49:45
319,457,697
0
0
null
null
null
null
UTF-8
Java
false
false
849
java
package com.packtpub.wflydevelopment.chapter11.client; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class IOUtils { private static final BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(System.in)); public static String readLine(String s) { System.out.print(s); try { return bufferedReader.readLine(); } catch (IOException e) { e.printStackTrace(); } return null; } public static int readInt(String s) { System.out.print(s); try { final String text = bufferedReader.readLine(); return Integer.parseInt(text); } catch (IOException e) { e.printStackTrace(); } return 0; } }
[ "paullewallencom@users.noreply.github.com" ]
paullewallencom@users.noreply.github.com
482943326f1be4f94e19e244f788e2edf5096c16
49d760e666f59b1d3607e3c0c4239f8a37f7b654
/src/main/java/com/trails/uaa/security/AuthoritiesConstants.java
31621ab30d434b5d2c38b239fa7e24e516e3131c
[]
no_license
fmatuszewski/trailsUaa
ffb218cd85bef5b01243cc73ed9f2896f4f2927c
5006d69320cf6a48d1947f57efaacd16f66ff1da
refs/heads/master
2020-03-09T13:47:40.935845
2018-04-09T18:56:11
2018-04-09T18:56:11
128,819,721
0
0
null
null
null
null
UTF-8
Java
false
false
344
java
package com.trails.uaa.security; /** * Constants for Spring Security authorities. */ public final class AuthoritiesConstants { public static final String ADMIN = "ROLE_ADMIN"; public static final String USER = "ROLE_USER"; public static final String ANONYMOUS = "ROLE_ANONYMOUS"; private AuthoritiesConstants() { } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
3dda2e6557dfad7bde423e0cbb8b95cf42aa2e67
55f49873b2281da14d6e6d106de4b87a86a9129e
/Tool-Impl-Tray/src/main/java/xdean/tool/tray/Context.java
9ff776f59b87449c3c51bcfa8b0ead11e6de23d8
[ "Apache-2.0" ]
permissive
XDean/ExtendableTool
1699a19507cdc052b375ba4607c034d94b6306f8
cb9410fdb696b480d956b64ac69e9fc1a19431e4
refs/heads/master
2021-06-10T18:13:18.099884
2021-03-18T03:16:37
2021-03-18T03:16:37
90,104,910
0
0
Apache-2.0
2021-03-18T03:16:38
2017-05-03T03:37:23
Java
UTF-8
Java
false
false
145
java
package xdean.tool.tray; public class Context { public static final String ICON_PATH = xdean.tool.api.Context.HOME_PATH + "/icon.png"; }
[ "373216024@qq.com" ]
373216024@qq.com
1ae3b3f68f133ed976fcea41bc11104f52bb3325
87276f1b173d95f3a4732c8310c9b90cfd189c70
/src/test/java/com/vinzlac/myapp/config/timezone/HibernateTimeZoneIT.java
95a91e164c1a773945649398dd095fc43572a6be
[]
no_license
vinzlac/jhipster-angular-sample-application
617347fd13c837def4f9d9a3dec766a478e8a912
bdbce93190a2ad8de592d7bd342170934dd34fdf
refs/heads/main
2023-01-24T18:36:38.816069
2020-12-08T18:41:21
2020-12-08T18:41:21
317,318,221
0
0
null
2020-12-08T18:41:22
2020-11-30T18:59:14
Java
UTF-8
Java
false
false
6,884
java
package com.vinzlac.myapp.config.timezone; import static java.lang.String.format; import static org.assertj.core.api.Assertions.assertThat; import com.vinzlac.myapp.JhipsterSampleApplication2App; import com.vinzlac.myapp.repository.timezone.DateTimeWrapper; import com.vinzlac.myapp.repository.timezone.DateTimeWrapperRepository; import java.time.*; import java.time.format.DateTimeFormatter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.jdbc.support.rowset.SqlRowSet; import org.springframework.transaction.annotation.Transactional; /** * Integration tests for the ZoneId Hibernate configuration. */ @SpringBootTest(classes = JhipsterSampleApplication2App.class) public class HibernateTimeZoneIT { @Autowired private DateTimeWrapperRepository dateTimeWrapperRepository; @Autowired private JdbcTemplate jdbcTemplate; @Value("${spring.jpa.properties.hibernate.jdbc.time_zone:UTC}") private String zoneId; private DateTimeWrapper dateTimeWrapper; private DateTimeFormatter dateTimeFormatter; private DateTimeFormatter timeFormatter; private DateTimeFormatter dateFormatter; @BeforeEach public void setup() { dateTimeWrapper = new DateTimeWrapper(); dateTimeWrapper.setInstant(Instant.parse("2014-11-12T05:50:00.0Z")); dateTimeWrapper.setLocalDateTime(LocalDateTime.parse("2014-11-12T07:50:00.0")); dateTimeWrapper.setOffsetDateTime(OffsetDateTime.parse("2011-12-14T08:30:00.0Z")); dateTimeWrapper.setZonedDateTime(ZonedDateTime.parse("2011-12-14T08:30:00.0Z")); dateTimeWrapper.setLocalTime(LocalTime.parse("14:30:00")); dateTimeWrapper.setOffsetTime(OffsetTime.parse("14:30:00+02:00")); dateTimeWrapper.setLocalDate(LocalDate.parse("2016-09-10")); dateTimeFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss.S").withZone(ZoneId.of(zoneId)); timeFormatter = DateTimeFormatter.ofPattern("HH:mm:ss").withZone(ZoneId.of(zoneId)); dateFormatter = DateTimeFormatter.ofPattern("yyyy-MM-dd"); } @Test @Transactional public void storeInstantWithZoneIdConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("instant", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeFormatter.format(dateTimeWrapper.getInstant()); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalDateTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper.getLocalDateTime().atZone(ZoneId.systemDefault()).format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeOffsetDateTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("offset_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper.getOffsetDateTime().format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeZoneDateTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZone() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("zoned_date_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper.getZonedDateTime().format(dateTimeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getLocalTime() .atDate(LocalDate.of(1970, Month.JANUARY, 1)) .atZone(ZoneId.systemDefault()) .format(timeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeOffsetTimeWithZoneIdConfigShouldBeStoredOnGMTTimeZoneAccordingToHis1stJan1970Value() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("offset_time", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper .getOffsetTime() .toLocalTime() .atDate(LocalDate.of(1970, Month.JANUARY, 1)) .atZone(ZoneId.systemDefault()) .format(timeFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } @Test @Transactional public void storeLocalDateWithZoneIdConfigShouldBeStoredWithoutTransformation() { dateTimeWrapperRepository.saveAndFlush(dateTimeWrapper); String request = generateSqlRequest("local_date", dateTimeWrapper.getId()); SqlRowSet resultSet = jdbcTemplate.queryForRowSet(request); String expectedValue = dateTimeWrapper.getLocalDate().format(dateFormatter); assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(resultSet, expectedValue); } private String generateSqlRequest(String fieldName, long id) { return format("SELECT %s FROM jhi_date_time_wrapper where id=%d", fieldName, id); } private void assertThatDateStoredValueIsEqualToInsertDateValueOnGMTTimeZone(SqlRowSet sqlRowSet, String expectedValue) { while (sqlRowSet.next()) { String dbValue = sqlRowSet.getString(1); assertThat(dbValue).isNotNull(); assertThat(dbValue).isEqualTo(expectedValue); } } }
[ "jhipster-bot@jhipster.tech" ]
jhipster-bot@jhipster.tech
783a976fdb6d58218d4d5bcee9b31aaee042868d
37903e9a9e446b089aa1ae3acd440d03adc9c373
/Kinetise/src/com/kinetise/helpers/encoding/Decoder.java
01ca452764e23b89b73e81b4261e24ddf0824007
[]
no_license
mobilechampion/Cieo-Home
43b62cf1c499fd1446641b264629aac947d55740
d56c302e910c213bcb654092cda9de622f89a9bf
refs/heads/master
2020-06-25T04:59:41.784713
2017-06-10T07:33:44
2017-06-10T07:33:44
94,236,177
1
1
null
null
null
null
UTF-8
Java
false
false
1,386
java
package com.kinetise.helpers.encoding; /** * <p>Provides the highest level of abstraction for Decoders. * This is the sister interface of {@link Encoder}. All * Decoders implement this common generic interface.</p> * * <p>Allows a user to pass a generic Object to any Decoder * implementation in the codec package.</p> * * <p>One of the two interfaces at the center of the codec package.</p> * * @author Apache Software Foundation * @version $Id: Decoder.java,v 1.9 2004/02/29 04:08:31 tobrien Exp $ */ public interface Decoder { /** * Decodes an "encoded" Object and returns a "decoded" * Object. Note that the implementation of this * interface will try to cast the Object parameter * to the specific type expected by a particular Decoder * implementation. If a {@link java.lang.ClassCastException} occurs * this decode method will throw a DecoderException. * * @param pObject an object to "decode" * * @return a 'decoded" object * * @throws DecoderException a decoder exception can * be thrown for any number of reasons. Some good * candidates are that the parameter passed to this * method is null, a param cannot be cast to the * appropriate type for a specific encoder. */ Object decode(Object pObject) throws Exception; }
[ "henryblanc0403@yahoo.com" ]
henryblanc0403@yahoo.com
38f56efd183182718cb36dc6f50b36a3c26c4b86
ff84da45fcaf796cb164ca4c71531c33350d70ce
/shop3/com/enation/app/shop/core/plugin/goods/IGoodsAfterAddEvent.java
ed3a7fcaba2ca98ee4ea884ac312342fc4e78bc0
[]
no_license
xxs/xxs_src
25306a20acbdc4558e99990fded6949f769c4c0a
27cff88c3e9a475eb9d0f6494ca4bca921e9de06
refs/heads/master
2021-01-02T09:34:09.444655
2013-04-23T05:23:42
2013-04-23T05:23:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
480
java
package com.enation.app.shop.core.plugin.goods; import java.util.Map; import javax.servlet.http.HttpServletRequest; public abstract interface IGoodsAfterAddEvent { public abstract void onAfterGoodsAdd(Map paramMap, HttpServletRequest paramHttpServletRequest) throws RuntimeException; } /* Location: C:\Users\xiaxiaoshi\Desktop\shop\ * Qualified Name: com.enation.app.shop.core.plugin.goods.IGoodsAfterAddEvent * JD-Core Version: 0.6.0 */
[ "xiaoshi332@163.com" ]
xiaoshi332@163.com
4c60fef6e24a97bc34f9dc8c17f2e32ddfc6d7db
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/29/29_5bfbc8bcd0dbf935f167d103f74973c742a9581b/DeltasHud/29_5bfbc8bcd0dbf935f167d103f74973c742a9581b_DeltasHud_s.java
c6fd7ac4510710f999da0e3a3489ab22337d30df
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,284
java
package aigilas.hud; import aigilas.creatures.BaseCreature; import aigilas.items.Equipment; import aigilas.items.GenericItem; import aigilas.items.ItemSlot; import sps.graphics.Renderer; import sps.text.Text; import sps.text.TextPool; import sps.util.StringSquisher; import sps.util.StringStorage; public class DeltasHud extends BaseHud { private final Equipment _equipment; public DeltasHud(BaseCreature owner, Equipment equipment) { super(owner, Renderer.VirtualWidth / 2, Renderer.VirtualHeight / 2); _equipment = equipment; } @Override public void draw() { } private GenericItem getEquipmentIn(ItemSlot slot) { if (_equipment.getItems().containsKey(slot)) { return _equipment.getItems().get(slot); } return null; } private static final String delim = "|"; private static final String positive = "+"; private static final String title = "Deltas"; private String display = "EMPTY"; private Text heading; private Text deltas; public void update(GenericItem item, boolean refresh) { if (_isVisible) { if (item != null && refresh) { if (getEquipmentIn(item.getItemClass().Slot) != null) { StringSquisher.clear(); for (Integer stat : getEquipmentIn(item.getItemClass().Slot).Modifiers.getDeltas(item.Modifiers)) { StringSquisher.squish(((stat > 0) ? positive : ""), StringStorage.get(stat), delim); } display = StringSquisher.flush(); } } if (heading == null || !heading.isVisible() || refresh) { if (deltas != null) { heading.hide(); deltas.hide(); } heading = TextPool.get().write(title, getInventoryAnchor().add(30, (int) (_dimensions.Y * .2))); deltas = TextPool.get().write(display, getInventoryAnchor().add(30, (int) (_dimensions.Y * .1))); } } else { if (heading != null) { heading.hide(); deltas.hide(); } } } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
ac3eae02ef9a59ecfbe4942a40967819d5a176f6
6a922e840b33f11ab3d0f154afa0b33cff272676
/src/xlsx4j/java/org/xlsx4j/sml/CTDdeValues.java
f96d4cdf636185d805defe72cac1f7ba3d0202e5
[ "Apache-2.0" ]
permissive
baochanghong/docx4j
912fc146cb5605e6f7869c4839379a83a8b4afd8
4c83d8999c9396067dd583b82a6fc892469a3919
refs/heads/master
2021-01-12T15:30:26.971311
2016-10-20T00:44:25
2016-10-20T00:44:25
71,792,895
3
0
null
2016-10-24T13:39:57
2016-10-24T13:39:57
null
UTF-8
Java
false
false
5,126
java
/* * Copyright 2010-2013, Plutext Pty Ltd. * * This file is part of xlsx4j, a component of docx4j. docx4j is 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.xlsx4j.sml; import java.util.ArrayList; import java.util.List; import javax.xml.bind.Unmarshaller; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAttribute; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlTransient; import javax.xml.bind.annotation.XmlType; import org.jvnet.jaxb2_commons.ppp.Child; /** * <p>Java class for CT_DdeValues complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="CT_DdeValues"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="value" type="{http://schemas.openxmlformats.org/spreadsheetml/2006/main}CT_DdeValue" maxOccurs="unbounded"/> * &lt;/sequence> * &lt;attribute name="rows" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" default="1" /> * &lt;attribute name="cols" type="{http://www.w3.org/2001/XMLSchema}unsignedInt" default="1" /> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "CT_DdeValues", propOrder = { "value" }) public class CTDdeValues implements Child { @XmlElement(required = true) protected List<CTDdeValue> value; @XmlAttribute(name = "rows") @XmlSchemaType(name = "unsignedInt") protected Long rows; @XmlAttribute(name = "cols") @XmlSchemaType(name = "unsignedInt") protected Long cols; @XmlTransient private Object parent; /** * Gets the value of the value property. * * <p> * This accessor method returns a reference to the live list, * not a snapshot. Therefore any modification you make to the * returned list will be present inside the JAXB object. * This is why there is not a <CODE>set</CODE> method for the value property. * * <p> * For example, to add a new item, do as follows: * <pre> * getValue().add(newItem); * </pre> * * * <p> * Objects of the following type(s) are allowed in the list * {@link CTDdeValue } * * */ public List<CTDdeValue> getValue() { if (value == null) { value = new ArrayList<CTDdeValue>(); } return this.value; } /** * Gets the value of the rows property. * * @return * possible object is * {@link Long } * */ public long getRows() { if (rows == null) { return 1L; } else { return rows; } } /** * Sets the value of the rows property. * * @param value * allowed object is * {@link Long } * */ public void setRows(Long value) { this.rows = value; } /** * Gets the value of the cols property. * * @return * possible object is * {@link Long } * */ public long getCols() { if (cols == null) { return 1L; } else { return cols; } } /** * Sets the value of the cols property. * * @param value * allowed object is * {@link Long } * */ public void setCols(Long value) { this.cols = value; } /** * Gets the parent object in the object tree representing the unmarshalled xml document. * * @return * The parent object. */ public Object getParent() { return this.parent; } public void setParent(Object parent) { this.parent = parent; } /** * This method is invoked by the JAXB implementation on each instance when unmarshalling completes. * * @param parent * The parent object in the object tree. * @param unmarshaller * The unmarshaller that generated the instance. */ public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) { setParent(parent); } }
[ "jason@plutext.org" ]
jason@plutext.org
e9b8c6cb652900883e3f336d69745829da921ce2
7fbefb6e189c94823fcea718bf859fd292302e61
/customer/src/main/java/com/demo/customer/bean/Customer.java
12f57bdc29582e85fd5843ff8ed4a83cc2f55827
[]
no_license
aquaauto/microrepo
c4339b1d02e737d390af67b838755505996b6a16
73fd8c6396d36012e912f1a0f087a739140e067e
refs/heads/master
2020-04-07T18:38:03.202377
2018-11-22T12:07:50
2018-11-22T12:07:50
158,617,707
0
0
null
null
null
null
UTF-8
Java
false
false
516
java
package com.demo.customer.bean; import java.io.Serializable; import java.util.UUID; public class Customer implements Serializable { private static final long serialVersionUID = 1L; private String name; private UUID id; public Customer(String name, UUID id) { super(); this.name = name; this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public UUID getId() { return id; } public void setId(UUID id) { this.id = id; } }
[ "apple@Apples-MacBook-Pro.local" ]
apple@Apples-MacBook-Pro.local
56260793a949860cfd9a6f2a2f3b3cbebcc5ce66
451709e6462c9d0a1f648c8f780298dd52e3bfb4
/java/ChinaSoft_njetc/testGeneric/src/test/TestGeneric.java
c381f0901abf1d9cd8867f2c6bc9c0a7209fcd94
[]
no_license
forsunchao/forsunchao
acec1606e9550f66e2eac36c6f0ee7b8a4589778
75ff7c7be27b8babbc03b2d3e500b9bcf2cf3753
refs/heads/master
2021-01-02T22:43:51.809188
2013-05-28T12:36:31
2013-05-28T12:36:31
34,045,525
2
1
null
null
null
null
UTF-8
Java
false
false
494
java
package test; import java.util.Hashtable; public class TestGeneric<K, V> { public Hashtable<K, V> hash = new Hashtable<K, V>(); public void put(K k, V v) { hash.put(k, v); } public V get(K k) { return hash.get(k); } public static void main(String[] args) { TestGeneric<String, String> test = new TestGeneric<String, String>(); test.put("001", "admin"); test.put("002", "liuzhongbing"); String str = test.get("001"); System.out.println(str); } }
[ "forsunchao@f3c5aaa3-ccec-8fd9-5322-fc38b0fccad4" ]
forsunchao@f3c5aaa3-ccec-8fd9-5322-fc38b0fccad4
65cf82377d75318d2bbda61f77b493fd63a590b2
030a0708b6dd316dbdb64acfe66c6005f343bb2d
/code/source/tundra/assertion/document.java
bb54115e668c324662251defcf88427bafce10a9
[ "MIT" ]
permissive
rpeach-sag/Tundra
62fc94c189744eb47a1958c0fc9c917d6ea3bdb1
0dc743e0a1e41faff6b2e3fef04eeb55c9208258
refs/heads/master
2020-03-30T16:03:19.238220
2018-09-14T02:13:09
2018-09-14T02:13:09
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,295
java
package tundra.assertion; // -----( IS Java Code Template v1.2 // -----( CREATED: 2017-05-03 12:57:59 EST // -----( ON-HOST: 192.168.66.129 import com.wm.data.*; import com.wm.util.Values; import com.wm.app.b2b.server.Service; import com.wm.app.b2b.server.ServiceException; // --- <<IS-START-IMPORTS>> --- import permafrost.tundra.data.IDataHelper; import permafrost.tundra.lang.ObjectHelper; // --- <<IS-END-IMPORTS>> --- public final class document { // ---( internal utility methods )--- final static document _instance = new document(); static document _newInstance() { return new document(); } static document _cast(Object o) { return (document)o; } // ---( server methods )--- public static final void equal (IData pipeline) throws ServiceException { // --- <<IS-START(equal)>> --- // @subtype unknown // @sigtype java 3.5 // [i] record:0:required $expected // [i] record:0:required $actual // [i] field:0:optional $message IDataCursor cursor = pipeline.getCursor(); try { IData expected = IDataHelper.get(cursor, "$expected", IData.class); IData actual = IDataHelper.get(cursor, "$actual", IData.class); String message = IDataHelper.get(cursor, "$message", String.class); equal(expected, actual, message); } finally { cursor.destroy(); } // --- <<IS-END>> --- } public static final void unequal (IData pipeline) throws ServiceException { // --- <<IS-START(unequal)>> --- // @subtype unknown // @sigtype java 3.5 // [i] record:0:required $expected // [i] record:0:required $actual // [i] field:0:optional $message IDataCursor cursor = pipeline.getCursor(); try { IData expected = IDataHelper.get(cursor, "$expected", IData.class); IData actual = IDataHelper.get(cursor, "$actual", IData.class); String message = IDataHelper.get(cursor, "$message", String.class); unequal(expected, actual, message); } finally { cursor.destroy(); } // --- <<IS-END>> --- } // --- <<IS-START-SHARED>> --- // asserts that two documents are equal public static void equal(IData expected, IData actual, String message) { if (!ObjectHelper.equal(expected, actual)) { if (message == null) { message = java.text.MessageFormat.format("Assertion failed: expected '{'{0}'}' is not equal to actual '{'{1}'}'", expected, actual); } else { message = java.text.MessageFormat.format("Assertion failed: {0} (expected '{'{1}'}' is not equal to actual '{'{2}'}')", message, expected, actual); } throw new AssertionError(message); } } // asserts that two documents are not equal public static void unequal(IData expected, IData actual, String message) { if (ObjectHelper.equal(expected, actual)) { if (message == null) { message = java.text.MessageFormat.format("Assertion failed: expected '{'{0}'}' is equal to actual '{'{1}'}'", expected, actual); } else { message = java.text.MessageFormat.format("Assertion failed: {0} (expected '{'{1}'}' is equal to actual '{'{2}'}')", message, expected, actual); } throw new AssertionError(message); } } // --- <<IS-END-SHARED>> --- }
[ "lachlan@permafro.st" ]
lachlan@permafro.st
c577b7e53cad45c9df35cec8efc90d95cd2c6152
3fcb8a44e8406b1340412392660d0a89b111413a
/BME/target/.generated/medizin/client/a_nonroo/app/client/ui/assesment/QuestionTypeCountViewImpl_QuestionTypeCountViewImplUiBinderImpl_GenCss_style.java
a154545c195e59e1cc0d99cc83fe8a84318e52cb
[]
no_license
nikotsunami/bme
6426e37d7f5a53a8addca9cc74579983424a7330
9c14e496f57b3764679a4222fdc313fc8a2ab600
refs/heads/master
2016-08-08T04:36:43.693418
2011-10-22T13:50:36
2011-10-22T13:50:36
2,615,618
0
1
null
null
null
null
UTF-8
Java
false
false
710
java
package medizin.client.a_nonroo.app.client.ui.assesment; import com.google.gwt.resources.client.CssResource; public interface QuestionTypeCountViewImpl_QuestionTypeCountViewImplUiBinderImpl_GenCss_style extends CssResource { String scroll1(); String label2(); String trenner(); String panelHTML(); String label(); String fieldsFliestext(); String header(); String boundary(); String content(); String listView(); String controls(); String details(); String button(); String textarea(); String underline(); String nav(); String barPopup(); String headerLine(); String bar(); String right(); String barDetailsList(); String buttonDetailsList(); String fields(); }
[ "nikotsunami@gmail.com" ]
nikotsunami@gmail.com
2375ac179f5b2b20653393f7191568a802ae016e
5a0901ce189b7ff7540419ef8dcea8159456b620
/src/main/java/com/mahogano/core/presta/mapper/StockAvailableMapper.java
cd3977ebaabf36a39eaad2d05e7e427260064e11
[ "MIT" ]
permissive
mahogano/mahogano
a2500235deb4922305b6768e6a73ea74ff9e267e
e4e8db4659946cd997b5aa34660c19749312e2a0
refs/heads/master
2022-05-31T04:22:22.366646
2020-04-24T17:32:24
2020-04-24T17:32:24
255,907,135
0
0
null
null
null
null
UTF-8
Java
false
false
1,224
java
package com.mahogano.core.presta.mapper; import com.mahogano.core.presta.entity.StockAvailable; import org.springframework.jdbc.core.RowMapper; import java.sql.ResultSet; import java.sql.SQLException; public class StockAvailableMapper implements RowMapper<StockAvailable> { @Override public StockAvailable mapRow(ResultSet rs, int i) throws SQLException { StockAvailable stockAvailable = new StockAvailable(); stockAvailable.setIdStockAvailable(rs.getInt("id_stock_available")); stockAvailable.setIdProduct(rs.getInt("id_product")); stockAvailable.setIdProductAttribute(rs.getInt("id_product_attribute")); stockAvailable.setIdShop(rs.getInt("id_shop")); stockAvailable.setIdShopGroup(rs.getInt("id_shop_group")); stockAvailable.setQuantity(rs.getInt("quantity")); stockAvailable.setPhysicalQuantity(rs.getInt("physical_quantity")); stockAvailable.setReservedQuantity(rs.getInt("reserved_quantity")); stockAvailable.setDependsOnStock(rs.getInt("depends_on_stock")); stockAvailable.setOutOfStock(rs.getInt("out_of_stock")); stockAvailable.setLocation(rs.getString("location")); return stockAvailable; } }
[ "rostyslav.rava@gmail.com" ]
rostyslav.rava@gmail.com
f327d1336cd615c88e7df985e0a662cfe3ce7789
8e5e2cfb1dcfb746b8d4feae18389f3dded9b4a4
/SeviciosProcesos/PrimeraEvaluacion/ejerciciosCompletos/src/ejercicioscompletos/ejercicio4.java
94ad7e12bd3be4939b9152548b287a869c6edd95
[]
no_license
alvarogomezmu/dam
739e8a75762f807e24806891ce30cd1ef8487867
ebfd55a43f4f3117b7ece35e698f75115b45ed39
refs/heads/master
2020-04-06T06:58:40.387939
2016-06-01T11:52:07
2016-06-01T11:52:07
42,882,043
0
0
null
null
null
null
UTF-8
Java
false
false
278
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package ejercicioscompletos; /** * * @author AlumnoT */ public class ejercicio4 { }
[ "alvarog.m@hotmail.com" ]
alvarog.m@hotmail.com
a61d19cc3e35c5a7d737bf0db2ba3fb5480c2e91
db72943db19f34832cdbbba0805a107a1fbad127
/src/main/java/com/caitu99/lsp/parser/bank/jianshe/normal/BaseTpl.java
684f4b25687a77aaa1a46d52aa90d412fbcfcae1
[]
no_license
qinains/lsp
3742234c55c73d68c9e83ae273ed9ca24c015105
a20b945add2d1262e18024cbef3446d2d41be645
refs/heads/master
2020-12-13T23:30:17.086238
2016-07-05T05:11:22
2016-07-05T05:11:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
762
java
package com.caitu99.lsp.parser.bank.jianshe.normal; import com.caitu99.lsp.model.parser.ParserContext; import com.caitu99.lsp.parser.BaseConfig; import com.caitu99.lsp.parser.ICard; import com.caitu99.lsp.parser.ITpl; import com.caitu99.lsp.utils.SpringContext; /** * Created by Lion on 2015/12/15 0015. */ public abstract class BaseTpl extends BaseConfig implements ITpl{ private ICard card; public BaseTpl(ParserContext context) { super(context); card = SpringContext.getBean(NormalCard.class); } @Override public ICard getCard() { return card; } @Override public void setCard(ICard card) { this.card = card; } @Override public boolean is() { return false; } }
[ "admin@admin-PC" ]
admin@admin-PC
316cecb605aecc47a46d607d4e43a7b514332a8c
ad01d3afcadd5b163ecf8ba60ba556ea268b4827
/ignouedrp/trunk/ePortfolio/src/java/org/IGNOU/ePortfolio/Model/UserPlan.java
ce655025241b0804763cabdbb79f2c545f5b24a0
[]
no_license
ynsingh/repos
64a82c103f0033480945fcbb567b599629c4eb1b
829ad133367014619860932c146c208e10bb71e0
refs/heads/master
2022-04-18T11:39:24.803073
2020-04-08T09:39:43
2020-04-08T09:39:43
254,699,274
1
2
null
null
null
null
UTF-8
Java
false
false
1,748
java
package org.IGNOU.ePortfolio.Model; // Generated Jul 11, 2012 5:35:40 PM by Hibernate Tools 3.2.1.GA import java.util.HashSet; import java.util.Set; /** * UserPlan generated by hbm2java */ public class UserPlan implements java.io.Serializable { private long planId; private String userId; private String PTitle; private String PDescription; private Set<UserPlanTask> userPlanTasks = new HashSet<UserPlanTask>(0); public UserPlan() { } public UserPlan(long planId) { this.planId = planId; } public UserPlan(long planId, String userId, String PTitle, String PDescription, Set<UserPlanTask> userPlanTasks) { this.planId = planId; this.userId = userId; this.PTitle = PTitle; this.PDescription = PDescription; this.userPlanTasks = userPlanTasks; } public long getPlanId() { return this.planId; } public void setPlanId(long planId) { this.planId = planId; } public String getUserId() { return this.userId; } public void setUserId(String userId) { this.userId = userId; } public String getPTitle() { return this.PTitle; } public void setPTitle(String PTitle) { this.PTitle = PTitle; } public String getPDescription() { return this.PDescription; } public void setPDescription(String PDescription) { this.PDescription = PDescription; } public Set<UserPlanTask> getUserPlanTasks() { return this.userPlanTasks; } public void setUserPlanTasks(Set<UserPlanTask> userPlanTasks) { this.userPlanTasks = userPlanTasks; } }
[ "ynsingh@0c22728b-0eb9-4c4e-a44d-29de7e55569f" ]
ynsingh@0c22728b-0eb9-4c4e-a44d-29de7e55569f
21e474f24a366ba53e77c10aa9565ec97ee89a3e
b09f56919e3baac6aff3cc7a590505b21efd72eb
/src/main/java/com/zorm/exception/ConfigurationException.java
9df3e6eee036c9e88355b355f6e1a865e77af7c6
[]
no_license
SHENJIAYUN/zorm
51d2d2674dfb98bf77203e3de35f7f5191148180
fe849f55d5523bd24d5069e8f54678108a9de162
refs/heads/master
2021-01-18T21:50:28.686984
2016-05-19T14:52:39
2016-05-19T14:52:39
52,928,318
0
0
null
null
null
null
UTF-8
Java
false
false
244
java
package com.zorm.exception; public class ConfigurationException extends ZormException { public ConfigurationException(String string, Throwable root) { super( string, root ); } public ConfigurationException(String s) { super( s ); } }
[ "1096392316@qq.com" ]
1096392316@qq.com
91d66bd15af007299abde0c7bb3860e96bdfb326
43bc71c15ae56de3d99b0404e4f9c6ea95f3fc05
/src/bai_11_dsa_stack_and_queue/bai_tap/dao_nguoc_phan_tu_su_dung_stack/Reverse.java
5a88ffba1e4059077df435d8ad9ce9cbf52f53a9
[]
no_license
sontra2611/C0321G1_NguyenDinhSonTra_Module_2
086b2a0f09cf4f66af71edac1e4dffc85f455a6b
5307695c3488933da70ef0da45d5b1b085e63bcd
refs/heads/master
2023-05-10T13:00:27.376323
2021-06-04T08:30:05
2021-06-04T08:30:05
363,975,429
0
0
null
null
null
null
UTF-8
Java
false
false
1,482
java
package bai_11_dsa_stack_and_queue.bai_tap.dao_nguoc_phan_tu_su_dung_stack; import java.util.Stack; public class Reverse { public static void reverserArrayElement(int[] array) { int n = array.length; System.out.print("Mang ban dau : "); for (int i = 0; i < n; i++) { System.out.print(array[i] + " "); } Stack<Integer> stack = new Stack<>(); for (int i = 0; i < n; i++) { stack.push(array[i]); } System.out.println(); System.out.print("Mang sau khi dao nguoc : "); for (int i = 0; i < n; i++) { array[i] = stack.pop(); System.out.print(array[i] + " "); } } public static void reverserString(String str) { System.out.println("Chuoi ban dau : " + str); int n = str.length(); String[] mWord = str.split(""); Stack<String> wStack = new Stack<>(); for (int i = 0; i < n; i++) { wStack.push(mWord[i]); } String newString = ""; for (int i = 0; i < str.length(); i++) { mWord[i] = wStack.pop(); newString += mWord[i]; } System.out.print("Chuoi sau khi dao nguoc : " + newString); } public static void main(String[] args) { int[] array = {1, 2, 3, 4, 5}; reverserArrayElement(array); System.out.println("\n"); String string = "codegym"; reverserString(string); } }
[ "sontra9798@gmail.com" ]
sontra9798@gmail.com
13bbb9d987b33b2c491ec3a1dd21d577df88e871
73b9f35b96af8c5b17526484c867e524f94dd1ec
/src/main/java/com/fuguo/zookeeper/ZKTest.java
886fc7499093d31916cd762bf46e78e063aa3ecc
[]
no_license
wangfuguo/spring-boot-demo
73b9b1738bf874c2e09807a4f24c5181f4dc8d05
8111a8c8c9f6c0abdcc6767f31c17966a9c68464
refs/heads/master
2021-05-03T09:03:58.207198
2018-04-09T01:48:49
2018-04-09T01:48:49
120,569,610
1
0
null
null
null
null
UTF-8
Java
false
false
4,817
java
package com.fuguo.zookeeper; import org.apache.zookeeper.*; import org.apache.zookeeper.data.Stat; import java.io.File; import java.util.List; import static org.apache.zookeeper.ZooDefs.Ids; /** * @author 00938658-王富国 * @description: TODO * @date 2018-01-18 16:48 * @since V1.0.0 */ public class ZKTest { private ZooKeeper zk = null; private void init() throws Exception { zk = new ZooKeeper("127.0.0.1:2181", 2000, new Watcher() { /** * 监听事件发生时的回调方法 */ @Override public void process(WatchedEvent event) { if (event.getType() == Event.EventType.None) { System.out.println("Event:null"); return; } System.out.println("EventType:" + event.getType()); System.out.println("Path" + event.getPath()); try { zk.getData("/nodes1", true, null); zk.getChildren("/nodes1", true); } catch (KeeperException | InterruptedException e) { e.printStackTrace(); } } }); } /** * 向zookeeper服务(集群)中注册数据,添加znode * @throws Exception */ public void testCreateZnode() throws Exception { zk.create("/nodes1", "nodes1".getBytes("utf-8"), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); // 在一个父节点的范围之内,sequential的顺序是递增的 zk.create("/nodes1/testNode1", "/nodes1/testNode1".getBytes("utf-8"), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); zk.create("/nodes1/testNode2", "/nodes1/testNode2".getBytes("utf-8"), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); // 换一个父节点,序号的递增顺序重新开始 zk.create("/nodes2", "nodes2".getBytes("utf-8"), ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); zk.create("/nodes2/testNode1", "/nodes2/testNode1".getBytes("utf-8"), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT_SEQUENTIAL); zk.create("/nodes3", "/nodes3".getBytes("utf-8"), Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); zk.close(); } /** * 从zookeeper中删除znode * @throws Exception */ public void testDeleteZnode() throws Exception { // 参数1:要删除的节点的路径 参数2:要删除的节点的版本,-1匹配所有版本 // 只能删除不为空的节点 zk.delete("/nodes3", -1); Stat exists = zk.exists("/nodes3", false); System.out.println(exists); } public void testUpdateZnode() throws Exception { byte[] data = zk.getData("/nodes1", false, null); System.out.println(new String(data, "utf-8")); zk.setData("/nodes1", "/nodes1 data changed".getBytes("utf-8"), -1); data = zk.getData("/nodes1", false, null); System.out.println(new String(data, "utf-8")); } /** * 获取子节点信息 * @throws Exception */ public void testGetChildren() throws Exception { List<String> children = zk.getChildren("/nodes1", false); for (String child : children) { System.out.println(child); } } /** * zk的监听机制: * 在初始化zk对象的时候定义好回调函数,对znode进行操作时可以注册监听 * 监听的znode上发生相应事件时,客户端zk会接收到zookeeper的事件通知 * 客户端zk根据事件调用我们事先定义好的回调函数 * @throws Exception * */ public void testWatch() throws Exception { //获取/nodes1的数据时进行监听 //第二个参数true表示监听 byte[] data = zk.getData("/nodes1", true, null); //获取/nodes1的子节点时进行监听 List<String> children = zk.getChildren("/nodes1", true); Thread.sleep(Long.MAX_VALUE); } /** * 将配置文件上传到zookeeper中进行管理 * @throws Exception */ public void testUploadConfigFileToZookeeper() throws Exception{ String schema_xml = org.apache.commons.io.FileUtils.readFileToString(new File("c:/web.xml")); zk.create("/conf", null, ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); zk.create("/conf/web.xml", schema_xml.getBytes(), ZooDefs.Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT); zk.close(); } public static void main(String[] args) throws Exception { ZKTest zkTest = new ZKTest(); zkTest.init(); zkTest.testGetChildren(); System.out.println(); } }
[ "wangfuguo_wfg@163.com" ]
wangfuguo_wfg@163.com
226e0720bcf89db607aba384475082542e203129
a4cb372ced240bf1cf0a9d123bdd4a805ff05df6
/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/web/server/MimeMappingsTests.java
04fc512c39f65157d4c3262187dc44041004bd92
[]
no_license
ZhaoBinxian/spring-boot-maven-ben
c7ea6a431c3206959009ff5344547436e98d75ca
ebd43548bae1e35fff174c316ad154cd0e5defb3
refs/heads/master
2023-07-18T12:53:49.028864
2021-09-07T04:55:54
2021-09-07T04:55:54
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,410
java
/* * Copyright 2012-2019 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.boot.web.server; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThatExceptionOfType; /** * Tests for {@link MimeMappings}. * * @author Phillip Webb */ class MimeMappingsTests { @Test void defaultsCannotBeModified() { assertThatExceptionOfType(UnsupportedOperationException.class) .isThrownBy(() -> MimeMappings.DEFAULT.add("foo", "foo/bar")); } @Test void createFromExisting() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); MimeMappings clone = new MimeMappings(mappings); mappings.add("baz", "bar"); assertThat(clone.get("foo")).isEqualTo("bar"); assertThat(clone.get("baz")).isNull(); } @Test void createFromMap() { Map<String, String> mappings = new HashMap<>(); mappings.put("foo", "bar"); MimeMappings clone = new MimeMappings(mappings); mappings.put("baz", "bar"); assertThat(clone.get("foo")).isEqualTo("bar"); assertThat(clone.get("baz")).isNull(); } @Test void iterate() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); mappings.add("baz", "boo"); List<MimeMappings.Mapping> mappingList = new ArrayList<>(); for (MimeMappings.Mapping mapping : mappings) { mappingList.add(mapping); } assertThat(mappingList.get(0).getExtension()).isEqualTo("foo"); assertThat(mappingList.get(0).getMimeType()).isEqualTo("bar"); assertThat(mappingList.get(1).getExtension()).isEqualTo("baz"); assertThat(mappingList.get(1).getMimeType()).isEqualTo("boo"); } @Test void getAll() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); mappings.add("baz", "boo"); List<MimeMappings.Mapping> mappingList = new ArrayList<>(mappings.getAll()); assertThat(mappingList.get(0).getExtension()).isEqualTo("foo"); assertThat(mappingList.get(0).getMimeType()).isEqualTo("bar"); assertThat(mappingList.get(1).getExtension()).isEqualTo("baz"); assertThat(mappingList.get(1).getMimeType()).isEqualTo("boo"); } @Test void addNew() { MimeMappings mappings = new MimeMappings(); assertThat(mappings.add("foo", "bar")).isNull(); } @Test void addReplacesExisting() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); assertThat(mappings.add("foo", "baz")).isEqualTo("bar"); } @Test void remove() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); assertThat(mappings.remove("foo")).isEqualTo("bar"); assertThat(mappings.remove("foo")).isNull(); } @Test void get() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); assertThat(mappings.get("foo")).isEqualTo("bar"); } @Test void getMissing() { MimeMappings mappings = new MimeMappings(); assertThat(mappings.get("foo")).isNull(); } @Test void makeUnmodifiable() { MimeMappings mappings = new MimeMappings(); mappings.add("foo", "bar"); MimeMappings unmodifiable = MimeMappings.unmodifiableMappings(mappings); try { unmodifiable.remove("foo"); } catch (UnsupportedOperationException ex) { // Expected } mappings.remove("foo"); assertThat(unmodifiable.get("foo")).isNull(); } }
[ "zhaobinxian@greatyun.com" ]
zhaobinxian@greatyun.com
12a3ce2d9201dc84d5adb5c02bc814df07960f19
243eaf02e124f89a21c5d5afa707db40feda5144
/src/unk/com/tencent/mm/ui/bindqq/z.java
556435c43280ebff5c037729b4378b542ed23bd0
[]
no_license
laohanmsa/WeChatRE
e6671221ac6237c6565bd1aae02f847718e4ac9d
4b249bce4062e1f338f3e4bbee273b2a88814bf3
refs/heads/master
2020-05-03T08:43:38.647468
2013-05-18T14:04:23
2013-05-18T14:04:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,359
java
package unk.com.tencent.mm.ui.bindqq; import android.app.Activity; import android.content.DialogInterface; import android.content.DialogInterface.OnClickListener; import com.tencent.mm.k.y; import com.tencent.mm.model.bd; import com.tencent.mm.platformtools.v; import com.tencent.mm.sdk.platformtools.n; import com.tencent.mm.ui.applet.SecurityImage; import com.tencent.mm.ui.base.i; import com.tencent.mm.z.o; final class z implements DialogInterface.OnClickListener { z(VerifyQQUI paramVerifyQQUI) { } public final void onClick(DialogInterface paramDialogInterface, int paramInt) { n.ak("MicroMsg.VerifyQQUI", "imgSid:" + VerifyQQUI.g(this.cuz) + " img len" + VerifyQQUI.h(this.cuz).length + " " + v.ta()); o localo = new o(VerifyQQUI.b(this.cuz), VerifyQQUI.c(this.cuz), VerifyQQUI.i(this.cuz).aeb(), VerifyQQUI.i(this.cuz).aec(), VerifyQQUI.i(this.cuz).aed(), VerifyQQUI.d(this.cuz), VerifyQQUI.e(this.cuz)); bd.hM().d(localo); VerifyQQUI localVerifyQQUI = this.cuz; Activity localActivity = this.cuz.acZ(); this.cuz.getString(2131166512); VerifyQQUI.a(localVerifyQQUI, i.a(localActivity, this.cuz.getString(2131166516), true, new aa(this, localo))); } } /* Location: /home/danghvu/0day/WeChat/WeChat_4.5_dex2jar.jar * Qualified Name: com.tencent.mm.ui.bindqq.z * JD-Core Version: 0.6.2 */
[ "danghvu@gmail.com" ]
danghvu@gmail.com
1e850251a7529125adbfe05bfe6a841a3adf6d29
40464bd5ad01f82d1657255e877b5987af6983f8
/src/main/java/com/shimizukenta/http/HttpRequestMessageReader.java
c601ce978be33aacecefe9d18865cfa9b4c1a383
[ "Apache-2.0" ]
permissive
kenta-shimizu/httpjava8
0a54851d5b881031285a227e0b31d006aa69e37a
05d5ac22d257162f036037947bef2c73f086fd4e
refs/heads/master
2021-07-08T01:16:20.667121
2020-05-05T10:57:12
2020-05-05T10:57:12
196,191,481
1
0
null
null
null
null
UTF-8
Java
false
false
160
java
package com.shimizukenta.http; public interface HttpRequestMessageReader { public HttpRequestMessage read() throws InterruptedException, HttpReadException; }
[ "shimizukentagm1@gmail.com" ]
shimizukentagm1@gmail.com
3c9dbad218082b3c0d513c802b2501f0ea1314df
9750d8bd08dfebcee1b0954da673838851b5b841
/common/src/main/java/com/xinlian/biz/model/TFreezeCycleOption.java
e8fc193aa0e259a41497cb2de87b9ac67efc4de8
[]
no_license
wangxiang22/wallet
7f030eba292c12b6f5561b949b95d298aa7a7114
1a3909d115d8713c067659fee8b7e098fa07673e
refs/heads/main
2023-02-11T04:55:32.623925
2021-01-12T06:40:36
2021-01-12T06:40:36
328,890,500
0
3
null
null
null
null
UTF-8
Java
false
false
1,108
java
package com.xinlian.biz.model; import com.baomidou.mybatisplus.annotations.TableField; import com.baomidou.mybatisplus.annotations.TableId; import com.baomidou.mybatisplus.annotations.TableName; import com.baomidou.mybatisplus.enums.IdType; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; /** * <p> * 冻结周期配置表 * </p> * * @author lt * @since 2020-05-29 */ @Data @TableName("t_freeze_cycle_option") public class TFreezeCycleOption implements Serializable { private static final long serialVersionUID = 1L; /** * 主键id */ @TableId(value = "id", type = IdType.AUTO) private Long id; /** * 冻结原因编码 */ @TableField("freeze_type_code") private String freezeTypeCode; /** * 冻结周期(单位:天) */ @TableField("freeze_cycle") private Integer freezeCycle; /** * 冻结金额 */ @TableField("freeze_amount") private BigDecimal freezeAmount; /** * 冻结原因备注 */ @TableField("freeze_note") private String freezeNote; }
[ "2356807033@qq.com" ]
2356807033@qq.com
8a27751b1c3e0fa22baa84750b05bf5ecd0dbd13
57b5a57182f029ec64fb47503463c3242904cf12
/BackEnd/Core/sailfish-core/src/main/java/com/exactpro/sf/scriptrunner/impl/htmlreport/data/MachineLearningData.java
d9e80f5995a038585b17b88281592543570d792e
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
exactpro/sailfish-core
ac77a5e32460f8d4b2643bba3bf16c0ce7556ccc
9886bdda0ed6e568d984f3b5fc091cffc17387bf
refs/heads/master
2023-09-03T15:56:29.896363
2023-08-23T18:39:49
2023-08-24T07:28:56
163,079,637
42
11
Apache-2.0
2023-03-04T04:37:31
2018-12-25T12:11:23
Java
UTF-8
Java
false
false
3,398
java
/****************************************************************************** * Copyright 2009-2018 Exactpro (Exactpro Systems Limited) * * 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.exactpro.sf.scriptrunner.impl.htmlreport.data; import java.util.ArrayList; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; import org.apache.commons.lang3.StringUtils; import com.exactpro.sf.common.messages.MsgMetaData; import com.exactpro.sf.comparison.ComparisonResult; import com.exactpro.sf.comparison.ComparisonUtil; @Deprecated // Used only in old HTML report public class MachineLearningData { private final String name; private final String namespace; private final String dictionaryURI; private final String protocol; private final long periodStart; private long periodEnd; private final Map<String, Object> expected; private final List<Long> actuals = new ArrayList<>(); @SuppressWarnings("unchecked") public MachineLearningData(ComparisonResult expected, long periodStart) { Objects.requireNonNull(expected, "expected cannot be null"); MsgMetaData metaData = Objects.requireNonNull(expected.getMetaData(), "metaData cannot be null"); this.name = Objects.requireNonNull(metaData.getMsgName(), "name cannot be null"); this.namespace = Objects.requireNonNull(metaData.getMsgNamespace(), "namespace cannot be null"); this.dictionaryURI = Objects.toString(metaData.getDictionaryURI(), StringUtils.EMPTY); this.protocol = StringUtils.defaultString(metaData.getProtocol()); Object value = ComparisonUtil.toMap(expected, true).get("value"); this.expected = value instanceof Map<?, ?> ? (Map<String, Object>)value : Collections.<String, Object>emptyMap(); this.periodStart = periodStart; } public List<Long> getActuals() { return Collections.unmodifiableList(actuals); } public String getName() { return name; } public String getNamespace() { return namespace; } public String getDictionaryURI() { return dictionaryURI; } public String getProtocol() { return protocol; } public long getPeriodStart() { return periodStart; } public long getPeriodEnd() { return periodEnd; } public void setPeriodEnd(long periodEnd) { this.periodEnd = periodEnd; } public Map<String, Object> getExpected() { return expected; } public void addActual(ComparisonResult actual) { Objects.requireNonNull(actual, "actual cannot be null"); MsgMetaData metaData = Objects.requireNonNull(actual.getMetaData(), "metaData cannot be null"); actuals.add(metaData.getId()); } }
[ "nikita.smirnov@exactprosystems.com" ]
nikita.smirnov@exactprosystems.com
aacad71efb84887868ac2e8262caec12548da51f
883b7801d828a0994cae7367a7097000f2d2e06a
/python/experiments/projects/Angel-ML-angel/real_error_dataset/1/755/GBDTTrainParam.java
8b74e20150fd975f1855b3ce6aabb264d6550f59
[]
no_license
pombredanne/styler
9c423917619912789289fe2f8982d9c0b331654b
f3d752d2785c2ab76bacbe5793bd8306ac7961a1
refs/heads/master
2023-07-08T05:55:18.284539
2020-11-06T05:09:47
2020-11-06T05:09:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,764
java
/* * Tencent is pleased to support the open source community by making Angel available. * * Copyright (C) 2017 THL A29 Limited, a Tencent company. All rights reserved. * * Licensed under the BSD 3-Clause License (the "License"); you may not use this file except in * compliance with the License. You may obtain a copy of the License at * * https://opensource.org/licenses/BSD-3-Clause * * 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.tencent.angel.ml.algorithm.param; /** * Description: * */ public class GBDTTrainParam extends RegTTrainParam { public int treeNum = 10; public int maxThreadNum = 10; // quantile sketch, size = featureNum * splitNum public String sketchName; // gradient histograms, size = treeNodeNum * featureNum * splitNum public String gradHistNamePrefix; // active tree nodes, size = pow(2, treeDepth) -1 public String activeTreeNodesName; // sampled features. size = treeNum * sampleRatio * featureNum public String sampledFeaturesName; // split features, size = treeNum * treeNodeNum public String splitFeaturesName; // split values, size = treeNum * treeNodeNum public String splitValuesName; // split gains, size = treeNum * treeNodeNum public String splitGainsName; // node weights, size = treeNum * treeNodeNum public String nodeGradStatsName; // node preds, size = treeNum * treeNodeNum public String nodePredsName; // if using PS to perform split public boolean isServerSplit = true; }
[ "fer.madeiral@gmail.com" ]
fer.madeiral@gmail.com
36f8d173b7978ba892dffee6afe5323fbb0807d1
26183990a4c6b9f6104e6404ee212239da2d9f62
/components/review_score_aggregator/src/java/tests/com/topcoder/management/review/scoreaggregator/impl/AveragingAggregationAlgorithmTest.java
c4509b118fd88f87b3a358b421811376f504472b
[]
no_license
topcoder-platform/tc-java-components
34c5798ece342a9f1804daeb5acc3ea4b0e0765b
51b204566eb0df3902624c15f4fb69b5f99dc61b
refs/heads/dev
2023-08-08T22:09:32.765506
2022-02-25T06:23:56
2022-02-25T06:23:56
138,811,944
0
8
null
2022-02-23T21:06:12
2018-06-27T01:10:36
Rich Text Format
UTF-8
Java
false
false
4,563
java
/* * Copyright (C) 2006 TopCoder Inc., All Rights Reserved. */ package com.topcoder.management.review.scoreaggregator.impl; import junit.framework.Test; import junit.framework.TestCase; import junit.framework.TestSuite; /** * <p> * This test case aggregates all test cases for <code>AveragingAggregationAlgorithm</code>. * </p> * * @author daiwb * @version 1.0 */ public class AveragingAggregationAlgorithmTest extends TestCase { /** * An <code>AveragingAggregationAlgorithm</code> instance used for tests. */ private AveragingAggregationAlgorithm algo = null; /** * Returns the test suite of this test case. * * @return the test suite of this test case. */ public static Test suite() { return new TestSuite(AveragingAggregationAlgorithmTest.class); } /** * Set up. * @throws Exception to JUnit */ protected void setUp() throws Exception { algo = new AveragingAggregationAlgorithm(); } /** * Tear down. * @throws Exception to JUnit */ protected void tearDown() throws Exception { algo = null; } /** * Test method <code>AveragingAggregationAlgorithm()</code>. */ public void testAveragingAggregationAlgorithm_Accuracy() { assertNotNull("The instance should be created successfully.", algo); } /** * Test method <code>calculateAggregateScore(float[])</code>. */ public void testCalculateAggregateScore_Accuracy_1() { float[] scores = new float[] {0.0f, 90.0f}; assertEquals("The aggregated score mismatches.", 45.0f, algo.calculateAggregateScore(scores), 1e-8); } /** * Test method <code>calculateAggregateScore(float[])</code>. */ public void testCalculateAggregateScore_Accuracy_2() { float[] scores = new float[0]; assertEquals("The aggregated score mismatches.", 0.0f, algo.calculateAggregateScore(scores), 1e-8); } /** * Test method <code>calculateAggregateScore(float[])</code> with null <code>scores</code>. * <code>IllegalArgumentException</code> is expected. */ public void testCalculateAggregateScore_NullScores() { try { algo.calculateAggregateScore(null); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException iae) { // Success } } /** * Test method <code>calculateAggregateScore(float[])</code> with <code>scores</code> containing negative element. * <code>IllegalArgumentException</code> is expected. */ public void testCalculateAggregateScore_ScoresWithNegativeElement() { try { algo.calculateAggregateScore(new float[] {0.0f, -90.0f}); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException iae) { // Success } } /** * Test method <code>calculateAggregateScore(float[])</code> with <code>scores</code> containing invalid element. * <code>IllegalArgumentException</code> is expected. */ public void testCalculateAggregateScore_ScoresWithInvalidElement_1() { try { algo.calculateAggregateScore(new float[] {Float.NaN}); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException iae) { // Success } } /** * Test method <code>calculateAggregateScore(float[])</code> with <code>scores</code> containing invalid element. * <code>IllegalArgumentException</code> is expected. */ public void testCalculateAggregateScore_ScoresWithInvalidElement_2() { try { algo.calculateAggregateScore(new float[] {Float.POSITIVE_INFINITY}); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException iae) { // Success } } /** * Test method <code>calculateAggregateScore(float[])</code> with <code>scores</code> containing invalid element. * <code>IllegalArgumentException</code> is expected. */ public void testCalculateAggregateScore_ScoresWithInvalidElement_3() { try { algo.calculateAggregateScore(new float[] {Float.NEGATIVE_INFINITY}); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException iae) { // Success } } }
[ "pvmagacho@gmail.com" ]
pvmagacho@gmail.com
b362b1d56cdc700ef9a255bffc03bac491f2e59a
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
/java/flink/2015/12/Output.java
0cbc954b34ed4330a6fabbf52d4f3e4bd757fc3c
[]
no_license
rosoareslv/SED99
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
a062c118f12b93172e31e8ca115ce3f871b64461
refs/heads/main
2023-02-22T21:59:02.703005
2021-01-28T19:40:51
2021-01-28T19:40:51
306,497,459
1
1
null
2020-11-24T20:56:18
2020-10-23T01:18:07
null
UTF-8
Java
false
false
1,605
java
/* * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you may not use this file except in compliance * with the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.apache.flink.streaming.api.operators; import org.apache.flink.streaming.api.watermark.Watermark; import org.apache.flink.util.Collector; /** * A {@link org.apache.flink.streaming.api.operators.StreamOperator} is supplied with an object * of this interface that can be used to emit elements and other messages, such as barriers * and watermarks, from an operator. * * @param <T> The type of the elements that can be emitted. */ public interface Output<T> extends Collector<T> { /** * Emits a {@link Watermark} from an operator. This watermark is broadcast to all downstream * operators. * * <p>A watermark specifies that no element with a timestamp older or equal to the watermark * timestamp will be emitted in the future. */ void emitWatermark(Watermark mark); }
[ "rodrigosoaresilva@gmail.com" ]
rodrigosoaresilva@gmail.com
1f06739268a5737e5fddb9e1d537338163de23e8
15c33eb2ad75385ae16e5d4309f49665b2cce0fa
/Java/lib/iSoft-Core/M开源扩展/src/com/isoft/struts2/views/tags/jquery/easyui/datagrid/$Button.java
d444c1a7159b1d728de6ecffe6cf9137151c1523
[]
no_license
caocaodl/zabbix_with_java
588cb13ebce707bec79611981149582cb6712ed2
41d1e8b5bb417b5010678ffc9dff795e5d218c75
refs/heads/master
2021-01-21T23:16:51.657808
2017-06-26T11:12:51
2017-06-26T11:12:51
95,219,984
4
4
null
null
null
null
UTF-8
Java
false
false
1,141
java
package com.isoft.struts2.views.tags.jquery.easyui.datagrid; import java.io.IOException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import com.isoft.struts2.components.AndurilComponent; import com.isoft.struts2.views.tags.HtmlResponseWriter; import com.opensymphony.xwork2.util.ValueStack; public class $Button extends AndurilComponent { public $Button(ValueStack stack, HttpServletRequest request, HttpServletResponse response) { super(stack, request, response); } @Override protected boolean encodeBegin(HtmlResponseWriter writer) throws IOException { return false; } @Override protected boolean encodeEnd(HtmlResponseWriter writer) throws IOException { return false; } @Override protected void popComponentStack() { super.popComponentStack(); if (this.isRendered()) { Object component = this.getComponentStack().peek(); if (component instanceof $DataGrid) { (($DataGrid)component).getModel().addButtonItem(model); } this.model = null; } } private ButtonItem model; public void setModel(ButtonItem model) { this.model = model; } }
[ "wlx0710@gmail.com" ]
wlx0710@gmail.com
7a95720f8845cecfc6c65a3be133249551869858
17c30fed606a8b1c8f07f3befbef6ccc78288299
/Mate10_8_1_0/src/main/java/android/util/HwLog.java
a1d2f20e3611d424fcdf7a881a7199c732b4df94
[]
no_license
EggUncle/HwFrameWorkSource
4e67f1b832a2f68f5eaae065c90215777b8633a7
162e751d0952ca13548f700aad987852b969a4ad
refs/heads/master
2020-04-06T14:29:22.781911
2018-11-09T05:05:03
2018-11-09T05:05:03
157,543,151
1
0
null
2018-11-14T12:08:01
2018-11-14T12:08:01
null
UTF-8
Java
false
false
886
java
package android.util; public final class HwLog { public static final int HW_LOG_ID_DUBAI = 2; public static final int HW_LOG_ID_EXCEPTION = 0; public static final int HW_LOG_ID_JANK = 1; public static native int print_hwlog_native(int i, int i2, String str, String str2); private HwLog() { } public static int dubaiv(String tag, String msg) { return print_hwlog_native(2, 2, tag, msg); } public static int dubaid(String tag, String msg) { return print_hwlog_native(3, 2, tag, msg); } public static int dubaii(String tag, String msg) { return print_hwlog_native(4, 2, tag, msg); } public static int dubaiw(String tag, String msg) { return print_hwlog_native(5, 2, tag, msg); } public static int dubaie(String tag, String msg) { return print_hwlog_native(6, 2, tag, msg); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
78aeb6f1b8f0e3f34bb7fe2996f168a822635125
13cbb329807224bd736ff0ac38fd731eb6739389
/javax/naming/directory/SchemaViolationException.java
f8ef8b03d3169f30af350bdb92ab73e727f93d76
[]
no_license
ZhipingLi/rt-source
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
refs/heads/master
2023-07-14T15:00:33.100256
2021-09-01T04:49:04
2021-09-01T04:49:04
401,933,858
0
0
null
null
null
null
UTF-8
Java
false
false
530
java
package javax.naming.directory; import javax.naming.NamingException; public class SchemaViolationException extends NamingException { private static final long serialVersionUID = -3041762429525049663L; public SchemaViolationException() {} public SchemaViolationException(String paramString) { super(paramString); } } /* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\javax\naming\directory\SchemaViolationException.class * Java compiler version: 8 (52.0) * JD-Core Version: 1.0.7 */
[ "michael__lee@yeah.net" ]
michael__lee@yeah.net
8ddfd2704d8b4487abc079485a10e63cc2b13cac
5da5f8bba90a33f2e74e89f031e3092a4a27e976
/anchorcms-web/src/main/java/com/anchorcms/cms/task/job/ContentDayJob.java
6a7dc8f1c5b2b1c29d6286489f4255ecfe9857fd
[]
no_license
hanshuxia/nmggyy
3700210e6f1421d67e7bbf2c004a479ea2faef00
75665cac07c74e972753874a9f28077a7b649fee
refs/heads/master
2020-03-27T02:32:23.219385
2018-08-24T02:37:17
2018-08-24T02:37:17
145,797,102
0
0
null
null
null
null
UTF-8
Java
false
false
1,260
java
package com.anchorcms.cms.task.job; import java.util.Date; import java.util.List; import com.anchorcms.cms.model.main.Content; import com.anchorcms.cms.model.main.ContentCheck; import com.anchorcms.cms.service.main.ContentMng; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; /** * @Description 每日任务(内容相关1检查到期置顶,2检查到期归档任务) * @author tom */ public class ContentDayJob{ private static final Logger log = LoggerFactory.getLogger(ContentDayJob.class); public void execute() { resetExpiredTopLevel(); pigeonholeContent(); } //重置到期置顶内容 private void resetExpiredTopLevel(){ List<Content>contents=contentMng.getExpiredTopLevelContents((byte) 0, new Date()); for(Content c:contents){ c.setTopLevel((byte) 0); contentMng.update(c); } log.info("Expired Content TopLevel Job success!"); } //内容归档 private void pigeonholeContent(){ List<Content>contents=contentMng.getPigeonholeContents(new Date()); for(Content c:contents){ c.setStatus(ContentCheck.PIGEONHOLE); contentMng.update(c); } log.info("Pigeonhole Content Job success!"); } @Autowired private ContentMng contentMng; }
[ "605128459@qq.com" ]
605128459@qq.com
e2da164f122ff61045392655f15b01160a15fb6e
082e26b011e30dc62a62fae95f375e4f87d9e99c
/docs/weixin_7.0.4_source/反编译源码/未反混淆/src/main/java/com/tencent/tencentmap/mapsdk/maps/a/fe.java
f0cdceb0136e1537e08d91c052ee2b4eec6daa69
[]
no_license
xsren/AndroidReverseNotes
9631a5aabc031006e795a112b7ac756a8edd4385
9202c276fe9f04a978e4e08b08e42645d97ca94b
refs/heads/master
2021-04-07T22:50:51.072197
2019-07-16T02:24:43
2019-07-16T02:24:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,848
java
package com.tencent.tencentmap.mapsdk.maps.a; import android.view.animation.Interpolator; import com.tencent.matrix.trace.core.AppMethodBeat; import java.util.ArrayList; import java.util.Arrays; public class fe { int a; fd b; fd c; Interpolator d; ArrayList<fd> e = new ArrayList(); fi f; public /* synthetic */ Object clone() { AppMethodBeat.i(98874); fe b = b(); AppMethodBeat.o(98874); return b; } public fe(fd... fdVarArr) { AppMethodBeat.i(98869); this.a = fdVarArr.length; this.e.addAll(Arrays.asList(fdVarArr)); this.b = (fd) this.e.get(0); this.c = (fd) this.e.get(this.a - 1); this.d = this.c.c(); AppMethodBeat.o(98869); } public static fe a(double... dArr) { int i = 1; AppMethodBeat.i(98870); int length = dArr.length; a[] aVarArr = new a[Math.max(length, 2)]; if (length == 1) { aVarArr[0] = (a) fd.a(0.0f); aVarArr[1] = (a) fd.a(1.0f, dArr[0]); } else { aVarArr[0] = (a) fd.a(0.0f, dArr[0]); while (i < length) { aVarArr[i] = (a) fd.a(((float) i) / ((float) (length - 1)), dArr[i]); i++; } } fa faVar = new fa(aVarArr); AppMethodBeat.o(98870); return faVar; } public static fe a(Object... objArr) { int i = 1; AppMethodBeat.i(98871); int length = objArr.length; b[] bVarArr = new b[Math.max(length, 2)]; if (length == 1) { bVarArr[0] = (b) fd.b(0.0f); bVarArr[1] = (b) fd.a(1.0f, objArr[0]); } else { bVarArr[0] = (b) fd.a(0.0f, objArr[0]); while (i < length) { bVarArr[i] = (b) fd.a(((float) i) / ((float) (length - 1)), objArr[i]); i++; } } fe feVar = new fe(bVarArr); AppMethodBeat.o(98871); return feVar; } public void a(fi fiVar) { this.f = fiVar; } public fe b() { AppMethodBeat.i(98872); ArrayList arrayList = this.e; int size = this.e.size(); fd[] fdVarArr = new fd[size]; for (int i = 0; i < size; i++) { fdVarArr[i] = ((fd) arrayList.get(i)).clone(); } fe feVar = new fe(fdVarArr); AppMethodBeat.o(98872); return feVar; } public String toString() { AppMethodBeat.i(98873); String str = " "; int i = 0; while (true) { int i2 = i; if (i2 < this.a) { str = str + ((fd) this.e.get(i2)).a() + " "; i = i2 + 1; } else { AppMethodBeat.o(98873); return str; } } } }
[ "alwangsisi@163.com" ]
alwangsisi@163.com
fafa99103a8b3f9ecd587d859ae22c80fda723d2
40745fb2a674027740cf1306070d4855f238571f
/src/main/java/com/gmail/socraticphoenix/collect/container/ResettingDouble.java
fbed4e5751286181c76ffa90189999e226a0c697
[]
no_license
SocraticPhoenix/Collect
ad75879c00d8ef7826b24d5cd8a659872c86f5b0
ac009827b4d539711c9e1f5485c513b9d8af0218
refs/heads/master
2021-12-12T18:29:13.509517
2021-11-12T03:57:04
2021-11-12T03:57:04
84,259,372
0
0
null
null
null
null
UTF-8
Java
false
false
1,592
java
/* * The MIT License (MIT) * * Copyright (c) 2016 socraticphoenix@gmail.com * Copyright (c) 2016 contributors * * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and * associated documentation files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, publish, distribute, * sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT * NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ package com.gmail.socraticphoenix.collect.container; public class ResettingDouble { private double val; private double state; public ResettingDouble(double val) { this.val = this.state = val; } public double get() { double temp = this.state; this.state = this.val; return temp; } public void set(double val) { this.state = val; } }
[ "socraticphoenix@gmail.com" ]
socraticphoenix@gmail.com
8ac436dba7e87c0a92f5423d5286e2530ff28841
1b664c1b8538db16b188ace54b0d6483516e4c0e
/elibrary-controller/src/main/java/by/it/academy/grodno/elibrary/controller/controllers/UserSubscriptionController.java
ba9f3b836961d0f4969f9e7b3472a3aebd99d91e
[]
no_license
owaresabd/elibrary
186d391ae36b444939d68ed557ff37d5a96dd789
57498a461f173597c733c2b6f6d7131e7b5529ad
refs/heads/master
2023-08-24T07:37:56.710817
2021-10-27T12:10:37
2021-10-27T12:10:37
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,772
java
package by.it.academy.grodno.elibrary.controller.controllers; import by.it.academy.grodno.elibrary.api.dto.books.SubscriptionDto; import by.it.academy.grodno.elibrary.api.dto.books.SubscriptionRequest; import by.it.academy.grodno.elibrary.api.dto.users.UserDto; import by.it.academy.grodno.elibrary.api.services.IUserService; import by.it.academy.grodno.elibrary.api.services.books.ISubscriptionService; import by.it.academy.grodno.elibrary.controller.utils.PageNumberListCreator; import org.springframework.data.domain.Page; import org.springframework.data.domain.PageImpl; import org.springframework.data.domain.Pageable; import org.springframework.data.domain.Sort; import org.springframework.data.web.PageableDefault; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import org.springframework.web.servlet.ModelAndView; import javax.validation.constraints.Max; import javax.validation.constraints.Min; import java.security.Principal; import java.util.Collections; import java.util.Optional; @RestController @RequestMapping(value = "/subscriptions") public class UserSubscriptionController { private final IUserService userService; private final ISubscriptionService subscriptionService; public UserSubscriptionController(IUserService userService, ISubscriptionService subscriptionService) { this.userService = userService; this.subscriptionService = subscriptionService; } @GetMapping public ModelAndView findAll(@RequestParam(value = "status", required = false) @Min(1) @Max(5) Integer status, @RequestParam(value = "subscriptionId", required = false) Long subscriptionId, @PageableDefault(sort = {"status"}, direction = Sort.Direction.ASC) Pageable pageable, Principal principal) { UserDto userDto = userService.findUser(principal); Page<SubscriptionDto> subscriptionPage; if (status != null) { subscriptionPage = subscriptionService.findAllByUserIdAndStatus(userDto.getId(), status, pageable); } else if (subscriptionId != null) { Optional<SubscriptionDto> optionalSubscriptionDto = subscriptionService.findBySubscriptionIdAndUserId(subscriptionId, userDto.getId()); if (optionalSubscriptionDto.isPresent()) { subscriptionPage = new PageImpl<>(Collections.singletonList(optionalSubscriptionDto.get()), pageable, 1L); } else { subscriptionPage = Page.empty(pageable); } } else { subscriptionPage = subscriptionService.findAllByUserId(userDto.getId(), pageable); } ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("subscriptions/subscriptionInfo"); modelAndView.addObject("currentUser", userDto); modelAndView.addObject("pageSubscriptionDto", subscriptionPage); modelAndView.addObject("currentStatusCode", status); modelAndView.addObject("pageNumbers", PageNumberListCreator.getListOfPagesNumber(subscriptionPage.getNumber(), subscriptionPage.getTotalPages())); return modelAndView; } @PostMapping public ModelAndView bookingBook(SubscriptionRequest request, Principal principal) { if (principal != null) { UserDto userDto = userService.findById(principal.getName()); if (userDto != null) { request.setUserId(userDto.getId()); subscriptionService.booking(request); } } ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("redirect:/subscriptions"); return modelAndView; } @PostMapping(value = "/undo") public ModelAndView undoBookingBook(SubscriptionRequest request, Principal principal) { ModelAndView modelAndView = new ModelAndView(); modelAndView.setViewName("redirect:/subscriptions"); if (principal != null) { UserDto userDto = userService.findById(principal.getName()); if (userDto != null) { request.setUserId(userDto.getId()); subscriptionService.undoBooking(request).ifPresent(subscriptionDto -> modelAndView.setViewName("redirect:/subscriptions?subscriptionId=" + subscriptionDto.getId())); } } return modelAndView; } }
[ "rachko.a.ch@gmail.com" ]
rachko.a.ch@gmail.com
c9fd010ceba463ef850e4241274ffb50a754e68e
2989f548f8bfe73a6b97ab9743f0c3c04da95f8e
/src/main/java/com/cloudmersive/client/model/OcrLineElement.java
38e59e2135b4682a9ffe17f6d2d87c73bf1b71c6
[ "Apache-2.0" ]
permissive
OswaldZero/Cloudmersive.APIClient.Java
8a9acefe95015df582b89ee7d1f8f78de5488c07
7c2ba0c4f46c0eddd12070a9379c58927e45fc09
refs/heads/master
2023-02-10T08:28:15.833877
2021-01-08T03:10:20
2021-01-08T03:10:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,295
java
/* * ocrapi * The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text. * * OpenAPI spec version: v1 * * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git * Do not edit the class manually. */ package com.cloudmersive.client.model; import java.util.Objects; import java.util.Arrays; import com.cloudmersive.client.model.OcrWordElement; import com.google.gson.TypeAdapter; import com.google.gson.annotations.JsonAdapter; import com.google.gson.annotations.SerializedName; import com.google.gson.stream.JsonReader; import com.google.gson.stream.JsonWriter; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import java.io.IOException; import java.util.ArrayList; import java.util.List; /** * A contiguous line of text in an OCR document */ @ApiModel(description = "A contiguous line of text in an OCR document") @javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2021-01-07T19:08:50.969-08:00") public class OcrLineElement { @SerializedName("LineText") private String lineText = null; @SerializedName("Words") private List<OcrWordElement> words = null; public OcrLineElement lineText(String lineText) { this.lineText = lineText; return this; } /** * Text of the line * @return lineText **/ @ApiModelProperty(value = "Text of the line") public String getLineText() { return lineText; } public void setLineText(String lineText) { this.lineText = lineText; } public OcrLineElement words(List<OcrWordElement> words) { this.words = words; return this; } public OcrLineElement addWordsItem(OcrWordElement wordsItem) { if (this.words == null) { this.words = new ArrayList<OcrWordElement>(); } this.words.add(wordsItem); return this; } /** * Word objects in the line * @return words **/ @ApiModelProperty(value = "Word objects in the line") public List<OcrWordElement> getWords() { return words; } public void setWords(List<OcrWordElement> words) { this.words = words; } @Override public boolean equals(java.lang.Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } OcrLineElement ocrLineElement = (OcrLineElement) o; return Objects.equals(this.lineText, ocrLineElement.lineText) && Objects.equals(this.words, ocrLineElement.words); } @Override public int hashCode() { return Objects.hash(lineText, words); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class OcrLineElement {\n"); sb.append(" lineText: ").append(toIndentedString(lineText)).append("\n"); sb.append(" words: ").append(toIndentedString(words)).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 "); } }
[ "35204726+Cloudmersive@users.noreply.github.com" ]
35204726+Cloudmersive@users.noreply.github.com
17724f609c9f6345397f6983f8c732ec1186325b
7568b869f3951fac45a2a2f7f7d25a3b2b2b2740
/Class_Codes/abc.java
ca1d240cd663c2357a4121c1fc97112f88fa1477
[]
no_license
kishankg/Object-Oriented-Programming
189d0fade68e6d09db21f3fa79aa37a0731e9fa9
5988ac874d0674aae6fb9f96925889ee98479608
refs/heads/master
2020-08-04T07:32:58.663732
2019-10-01T09:24:19
2019-10-01T09:24:19
212,057,112
0
0
null
null
null
null
UTF-8
Java
false
false
1,544
java
/*class abc { public static void main(String[] args) { short num1 = 20000; short num2 = 16000; short num3 = 4000; byte A1 = 10; byte A2 = 20; byte sum = (byte) (A1 + A2); int sum1 = num1 + num2 + num3; System.out.println(sum + " " + sum1); int i = 2000790000; //int j = 1108800000; char b = 66; //long sum = i + j; //System.out.println(b); char a = 'A'; int j = a; //a = a + 1; incompatible data types //a = (char)(a+1); //a += 1; //no error here as in a = a+1 a++; System.out.println(a + " " + j); } } */ import java.util.Scanner; public class abc { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("================================"); for (int i = 0; i < 3; i++) { String s1 = sc.next(); int x = sc.nextInt(); // for(int j=0;j<3;j++) { int len = s1.length(); int diff = (15 - len); System.out.print(s1); // printing the whitespaces while (diff-- > 0) System.out.print(" "); // printing the numbers if (x < 10) System.out.println("00" + x); else if ((x > 9) && (x < 100)) System.out.println("0" + x); else System.out.println(x); } } System.out.println("================================"); } }
[ "root@localhost.localdomain" ]
root@localhost.localdomain
1d1a6e70336a714ffbfb5b27d1456dcaaf36fd95
67a1b5e8dc998ce3594c1c3bb2ec89c30850dee7
/AccessibilityServiceDemo/app/src/main/java/com/android/talkback/eventprocessor/EventState.java
aab102b4ef052df22f5b8dc7fe850ed61e920516
[ "Apache-2.0" ]
permissive
matrixxun/FMTech
4a47bd0bdd8294cc59151f1bffc6210567487bac
31898556baad01d66e8d87701f2e49b0de930f30
refs/heads/master
2020-12-29T01:31:53.155377
2016-01-07T04:39:43
2016-01-07T04:39:43
49,217,400
2
0
null
2016-01-07T16:51:44
2016-01-07T16:51:44
null
UTF-8
Java
false
false
1,883
java
/* * Copyright (C) 2015 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); you may not * use this file except in compliance with the License. You may obtain a copy of * the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the * License for the specific language governing permissions and limitations under * the License. */ package com.android.talkback.eventprocessor; import android.os.SystemClock; import android.util.SparseArray; /** * Single instance that keeps info about events and their time */ public class EventState { // When moving with granularity focus could be moved to next node automatically. In that case // TalkBack will also move with granularity inside newly focused node and pronounce part of // the content. There is no need to pronounce the whole content of the node in that case public static int EVENT_SKIP_FOCUS_PROCESSING_AFTER_GRANULARITY_MOVE = 1; private static EventState sInstance = new EventState(); public static EventState getInstance() { return sInstance; } private SparseArray mEvents = new SparseArray(); public void addEvent(int event) { mEvents.put(event, SystemClock.uptimeMillis()); } public void clearEvent(int event) { mEvents.remove(event); } public boolean hasEvent(int event, long timeout) { Long lastEventTime = (Long) mEvents.get(event); if (lastEventTime != null) { return SystemClock.uptimeMillis() - lastEventTime < timeout; } return false; } public void clear() { mEvents.clear(); } }
[ "jiangchuna@126.com" ]
jiangchuna@126.com
fd2e3ace6ece332cea87054c89dbf90dd91c32f9
dfcb99fd9feb71da35182811ed5f32bf69cd2bbf
/src/simulations/roomsimulation-service/src/main/java/de/iwes/sim/roomsimservice/logic/RoomVolume.java
7dff42b2397a94ed03e61e2b71dc731a3128a473
[ "Apache-2.0" ]
permissive
ogema/ogema-widgets
99d544d0ec6aebf68fd846fe2c08f5ac5dee7790
3adac6461c52555a42a4f1837267380adce293fb
refs/heads/public
2022-11-29T21:33:14.704989
2019-12-09T08:25:41
2019-12-09T08:25:41
124,270,200
0
1
Apache-2.0
2022-11-16T06:25:46
2018-03-07T17:23:28
JavaScript
UTF-8
Java
false
false
2,382
java
/** * Copyright 2014-2018 Fraunhofer-Gesellschaft zur Förderung der angewandten Wissenschaften e.V. * * 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. */ /** * Copyright 2009 - 2016 * * Fraunhofer-Gesellschaft zur Förderung der angewandten Wissenschaften e.V. * * Fraunhofer IWES * * All Rights reserved */ /** * Copyright 2009 - 2014 * * Fraunhofer-Gesellschaft zur Förderung der angewandten Wissenschaften e.V. * * Fraunhofer IIS Fraunhofer ISE Fraunhofer IWES * * All Rights reserved */ package de.iwes.sim.roomsimservice.logic; import java.util.Map; import org.ogema.core.model.units.VolumeResource; import org.ogema.tools.simulation.service.api.model.SimulationComplexConfiguration; import org.slf4j.LoggerFactory; public class RoomVolume implements SimulationComplexConfiguration { private final VolumeResource volume; // value must be positive (m^3) //@Override //public VolumeResource value() { // return volume; //} @Override public String getValue() { return String.format("%.2f", volume.getValue()); } @Override public boolean setValue(String value) { try { float val = Float.parseFloat(value); if (Float.isNaN(val) || val< 0) { LoggerFactory.getLogger(getClass()).info("Simulated room size set to negative value. Resizing to 10 m^3"); val = 10; } else if ( Float.isInfinite(val)) { LoggerFactory.getLogger(getClass()).info("Simulated room size infinite. Resizing to 1000 m^3"); val = 1000; } return volume.setValue(val); } catch(NumberFormatException e) { return false; } } public RoomVolume(VolumeResource volume) { this.volume = volume; } @Override public String getId() { return "Room volume"; } @Override public String getDescription() { return "Set the room volume (in m^3)"; } @Override public Map<String,String> getOptions() { return null; } }
[ "christoph.noelle@iee.fraunhofer.de" ]
christoph.noelle@iee.fraunhofer.de
85da7916704d7786cb7e5bab2b6cbb76f29c8819
f87904b0d14bc865b174c21b9c6e8406ccccf6d1
/inner-classes/app3/src/Manager5.java
ba35a87208f0ec1655261e4d3d4299917efb6342
[]
no_license
nextuser88/lara_java_code
f7c90e662b4d25cfb9a572f68a8ab86773febb92
f53349afa87aa5a8fa475b29ccf0c5ea903dcc74
refs/heads/master
2021-05-15T20:19:00.931695
2017-10-22T06:28:48
2017-10-22T06:28:48
107,842,369
0
0
null
null
null
null
UTF-8
Java
false
false
144
java
class Manager5 { public static void main(String[] args) { B b1 = new B(); b1.test1(); b1.test2(); System.out.println("done!"); } }
[ "abhishekmishra034@gmail.com" ]
abhishekmishra034@gmail.com
46a67cbd83f67f0535cce4cbf335ab254387db81
cc2c8604ec5de0f3bddca2dac78ecfd9eee004d4
/src/test/java/com/naresh/demounittesting/model/UserTest.java
26d1ddec76811f2f22f5214591091df7b47323c9
[]
no_license
nareshkumar-h/userapp-unittesting
6f68ae3c7b93cddcb942671814094b6fe0f0abc4
d705f7e698e4b833315ebc2b1874f4023659df75
refs/heads/master
2020-05-18T21:07:27.300133
2019-09-05T10:36:14
2019-09-05T10:36:14
184,652,022
0
0
null
null
null
null
UTF-8
Java
false
false
503
java
package com.naresh.demounittesting.model; import static org.junit.Assert.assertEquals; import org.junit.Test; public class UserTest { @Test public void testUser() { User user = new User(); user.setId(1); user.setName("naresh"); user.setEmail("nareshkumarh@live.com"); user.setPassword("pass123$"); assertEquals(user.getId(), 1); assertEquals(user.getName(), "naresh"); assertEquals(user.getEmail(), "nareshkumarh@live.com"); assertEquals(user.getPassword(), "pass123$"); } }
[ "nareshkumarh@live.com" ]
nareshkumarh@live.com
1a181b58c0d98183c79d27e6ceafb5b86048429e
d9eee40a76aecafde448db9f380e28e835f197c8
/src/com/smart/platform/anyprint/NewplanDlg.java
36817eba76a8e7793b2df9b4d862357fea26642c
[]
no_license
liveqmock/SmartServer
94d1b1dc5b21e2b334298db93b40125250b15b82
914f34191cd827ffbabbabccfef828e488a1ae96
refs/heads/master
2021-01-21T16:54:21.468977
2013-10-28T13:21:05
2013-10-28T13:21:05
null
0
0
null
null
null
null
GB18030
Java
false
false
3,148
java
package com.smart.platform.anyprint; import java.awt.Container; import java.awt.GridBagConstraints; import java.awt.GridBagLayout; import java.awt.Insets; import java.awt.event.ActionEvent; import javax.swing.JButton; import javax.swing.JComboBox; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JTextField; import com.smart.platform.gui.control.CDialog; import com.smart.platform.gui.control.CToolbar; public class NewplanDlg extends CDialog{ private JTextField textPlanname; private JComboBox cbPrinttype; boolean ok=false; public NewplanDlg(java.awt.Frame owner){ super(owner,"新建打印方案",true); init(); this.localCenter(); this.setDefaultCloseOperation(CDialog.DISPOSE_ON_CLOSE); } void init(){ Container cp=this.getContentPane(); GridBagLayout g=new GridBagLayout(); cp.setLayout(g); int y=0; JLabel lb=new JLabel("方案名称"); cp.add(lb, new GridBagConstraints(0, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0)); textPlanname = new JTextField(20); addEnterkeyTraver(textPlanname); cp.add(textPlanname, new GridBagConstraints(1, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0)); y++; lb=new JLabel("打印类型"); cp.add(lb, new GridBagConstraints(0, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0)); String[] printtype={"表格打印","卡片打印"}; cbPrinttype = new JComboBox(printtype); addEnterkeyTraver(cbPrinttype); cp.add(cbPrinttype, new GridBagConstraints(1, y, 1, 1, 0.0, 0.0, GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0)); JPanel tb=new JPanel(); JButton btn=new JButton("确定"); addEnterkeyConfirm(btn); btn.setActionCommand("ok"); btn.addActionListener(this); tb.add(btn); btn=new JButton("取消"); addEnterkeyTraver(btn); btn.setActionCommand("cancel"); btn.addActionListener(this); tb.add(btn); y++; cp.add(tb, new GridBagConstraints(0, y, 2, 1, 0.0, 0.0, GridBagConstraints.CENTER, GridBagConstraints.NONE, new Insets(5, 12, 5, 5), 0, 0)); } @Override public void actionPerformed(ActionEvent e) { String cmd=e.getActionCommand(); if(cmd.equals("ok")){ onOk(); }else if(cmd.equals("cancel")){ onCancel(); } } String planname; String plantype; @Override protected void enterkeyConfirm() { onOk(); } void onOk(){ planname = textPlanname.getText().trim(); plantype=(String) cbPrinttype.getSelectedItem(); if(planname.trim().length()==0){ JOptionPane.showMessageDialog(this, "必须输入方案名称"); return; } ok=true; this.dispose(); } public String getPlanname() { return planname; } public String getPlantype() { return plantype; } void onCancel(){ ok=false; this.dispose(); } public boolean isOk(){ return ok; } public static void main(String[] args) { NewplanDlg dlg=new NewplanDlg(null); dlg.pack(); dlg.setVisible(true); } }
[ "jsetter2046@gmail.com" ]
jsetter2046@gmail.com
19b58a3f6cd8c1575f27a948454870a0cc091e0b
832a25d71428fcc97554ead3184c34c7668c13f6
/src/main/java/com/jeeplus/modules/paytype/dao/PayTypeDao.java
2f92a2ceea2fea8348bf03d6e2ec0e60005216ef
[]
no_license
wxbing2015/jeeplusS
bb3b2bc7e475a7042c9a147952008ca93de59feb
faf39d547fad5fad9ff0e046fd9a657f2202a886
refs/heads/master
2020-07-19T11:44:35.847707
2018-05-02T11:59:39
2018-05-02T11:59:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
455
java
/** * Copyright &copy; 2015-2020 <a href="http://www.jeeplus.org/">JeePlus</a> All rights reserved. */ package com.jeeplus.modules.paytype.dao; import com.jeeplus.common.persistence.CrudDao; import com.jeeplus.common.persistence.annotation.MyBatisDao; import com.jeeplus.modules.paytype.entity.PayType; /** * 支付方式DAO接口 * @author 瞿高青 * @version 2017-11-08 */ @MyBatisDao public interface PayTypeDao extends CrudDao<PayType> { }
[ "anti_magina@yeah.net" ]
anti_magina@yeah.net
af5d77521638dfc50c34516ede9e725069ea3d15
d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb
/PROMISE/archives/camel/1.0/org/apache/camel/builder/ProcessorFactory.java
62fef486cfbeb2a41cfe46027624ac5ed37c7c73
[]
no_license
hvdthong/DEFECT_PREDICTION
78b8e98c0be3db86ffaed432722b0b8c61523ab2
76a61c69be0e2082faa3f19efd76a99f56a32858
refs/heads/master
2021-01-20T05:19:00.927723
2018-07-10T03:38:14
2018-07-10T03:38:14
89,766,606
5
1
null
null
null
null
UTF-8
Java
false
false
308
java
package org.apache.camel.builder; import org.apache.camel.Exchange; import org.apache.camel.Processor; /** * An interface representing a builder of a {@link Processor} * * @version $Revision: 534145 $ */ public interface ProcessorFactory { public Processor createProcessor() throws Exception; }
[ "hvdthong@github.com" ]
hvdthong@github.com
aba2725ddcb7f5b7622826147cd6f9a7d8d14238
c30d4f174a28aac495463f44b496811ee0c21265
/java/execution/impl/src/com/intellij/execution/testframework/ResetConfigurationModuleAdapter.java
7e12f3c4a5ebce38dae2c9126541f911c1d02de6
[ "Apache-2.0" ]
permissive
sarvex/intellij-community
cbbf08642231783c5b46ef2d55a29441341a03b3
8b8c21f445550bd72662e159ae715e9d944ba140
refs/heads/master
2023-05-14T14:32:51.014859
2023-05-01T06:59:21
2023-05-01T06:59:21
32,571,446
0
0
Apache-2.0
2023-05-01T06:59:22
2015-03-20T08:16:17
Java
UTF-8
Java
false
false
5,834
java
/* * Copyright 2000-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 com.intellij.execution.testframework; import com.intellij.execution.CommonJavaRunConfigurationParameters; import com.intellij.execution.ExecutionException; import com.intellij.execution.Executor; import com.intellij.execution.configurations.JavaRunConfigurationModule; import com.intellij.execution.configurations.ModuleBasedConfiguration; import com.intellij.execution.executors.DefaultDebugExecutor; import com.intellij.execution.executors.DefaultRunExecutor; import com.intellij.execution.runners.ExecutionEnvironmentBuilder; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.module.Module; import com.intellij.openapi.module.ModuleManager; import com.intellij.openapi.module.ModuleUtilCore; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.MessageType; import com.intellij.openapi.ui.popup.Balloon; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.wm.ToolWindowId; import com.intellij.openapi.wm.ToolWindowManager; import com.intellij.psi.JavaPsiFacade; import com.intellij.psi.PsiDirectory; import com.intellij.psi.PsiPackage; import com.intellij.ui.HyperlinkAdapter; import com.intellij.util.Function; import javax.swing.event.HyperlinkEvent; import java.util.HashSet; import java.util.Set; public class ResetConfigurationModuleAdapter extends HyperlinkAdapter { private static final Logger LOG = Logger.getInstance("#" + ResetConfigurationModuleAdapter.class); private final Project myProject; private final boolean myIsDebug; private final ToolWindowManager myToolWindowManager; private final String myTestRunDebugId; private final ModuleBasedConfiguration myConfiguration; public ResetConfigurationModuleAdapter(ModuleBasedConfiguration configuration, final Project project, final boolean isDebug, final ToolWindowManager toolWindowManager, final String testRunDebugId) { myProject = project; myIsDebug = isDebug; myToolWindowManager = toolWindowManager; myTestRunDebugId = testRunDebugId; myConfiguration = configuration; } public static <T extends ModuleBasedConfiguration<JavaRunConfigurationModule> & CommonJavaRunConfigurationParameters> boolean tryWithAnotherModule(T configuration, boolean isDebug) { final String packageName = configuration.getPackage(); if (packageName == null) return false; final Project project = configuration.getProject(); final PsiPackage aPackage = JavaPsiFacade.getInstance(project).findPackage(packageName); if (aPackage == null) return false; final Module module = configuration.getConfigurationModule().getModule(); if (module == null) return false; final Set<Module> modulesWithPackage = new HashSet<Module>(); final PsiDirectory[] directories = aPackage.getDirectories(); for (PsiDirectory directory : directories) { final Module currentModule = ModuleUtilCore.findModuleForFile(directory.getVirtualFile(), project); if (module != currentModule && currentModule != null) { modulesWithPackage.add(currentModule); } } if (!modulesWithPackage.isEmpty()) { final String testRunDebugId = isDebug ? ToolWindowId.DEBUG : ToolWindowId.RUN; final ToolWindowManager toolWindowManager = ToolWindowManager.getInstance(project); final Function<Module, String> moduleNameRef = new Function<Module, String>() { @Override public String fun(Module module) { final String moduleName = module.getName(); return "<a href=\"" + moduleName + "\">" + moduleName + "</a>"; } }; String message = "Tests were not found in module \"" + module.getName() + "\".\n" + "Use "; if (modulesWithPackage.size() == 1) { message += "module \"" + moduleNameRef.fun(modulesWithPackage.iterator().next()) + "\" "; } else { message += "one of\n" + StringUtil.join(modulesWithPackage, moduleNameRef, "\n") + "\n"; } message += "instead"; toolWindowManager.notifyByBalloon(testRunDebugId, MessageType.WARNING, message, null, new ResetConfigurationModuleAdapter(configuration, project, isDebug, toolWindowManager, testRunDebugId)); return true; } return false; } @Override protected void hyperlinkActivated(HyperlinkEvent e) { final Module moduleByName = ModuleManager.getInstance(myProject).findModuleByName(e.getDescription()); if (moduleByName != null) { myConfiguration.getConfigurationModule().setModule(moduleByName); try { Executor executor = myIsDebug ? DefaultDebugExecutor.getDebugExecutorInstance() : DefaultRunExecutor.getRunExecutorInstance(); ExecutionEnvironmentBuilder.create(myProject, executor, myConfiguration).contentToReuse(null).buildAndExecute(); Balloon balloon = myToolWindowManager.getToolWindowBalloon(myTestRunDebugId); if (balloon != null) { balloon.hide(); } } catch (ExecutionException e1) { LOG.error(e1); } } } }
[ "anna.kozlova@jetbrains.com" ]
anna.kozlova@jetbrains.com
d5a5d5ff8dbd882df088db261162e57114a31f12
87901d9fd3279eb58211befa5357553d123cfe0c
/bin/ext-template/ycommercewebservices/web/testsrc/de/hybris/platform/ycommercewebservices/test/groovy/webservicetests/DummyTrustManager.java
8acc630fa4b79de9f6d8e232f896f43f754796fd
[]
no_license
prafullnagane/learning
4d120b801222cbb0d7cc1cc329193575b1194537
02b46a0396cca808f4b29cd53088d2df31f43ea0
refs/heads/master
2020-03-27T23:04:17.390207
2014-02-27T06:19:49
2014-02-27T06:19:49
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,046
java
/* * [y] hybris Platform * * Copyright (c) 2000-2013 hybris AG * All rights reserved. * * This software is the confidential and proprietary information of hybris * ("Confidential Information"). You shall not disclose such Confidential * Information and shall use it only in accordance with the terms of the * license agreement you entered into with hybris. * * */ package de.hybris.platform.ycommercewebservices.test.groovy.webservicetests; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import javax.net.ssl.X509TrustManager; public class DummyTrustManager implements X509TrustManager { @Override public void checkClientTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException { //TODO unimplemented } @Override public void checkServerTrusted(final X509Certificate[] arg0, final String arg1) throws CertificateException { //TODO unimplemented } @Override public X509Certificate[] getAcceptedIssuers() { return null; } }
[ "admin1@neev31.(none)" ]
admin1@neev31.(none)
36c6e3bfa99c8f7545b82f8446898c3e6a676688
1b99c5c904e90bdff4447e159dbe52b617018bdc
/javashop/shop-core/src/main/java/com/enation/app/shop/core/other/service/impl/LogsManager.java
e8f20d303ff7aa114fa2feba7888427a907acdfb
[]
no_license
xxfeng/fruits
133835b86fa1c6b83069403486a6d2eaa4296ab1
9f1e42e04b4c22c642e66f3b4a35a001d633ea8b
refs/heads/master
2021-05-07T21:01:38.840549
2017-11-01T01:47:08
2017-11-01T01:47:08
108,985,413
0
1
null
null
null
null
UTF-8
Java
false
false
2,424
java
package com.enation.app.shop.core.other.service.impl; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.enation.app.shop.core.other.service.ILogsManager; import com.enation.framework.database.IDaoSupport; import com.enation.framework.database.Page; import com.enation.framework.util.DateUtil; import com.enation.framework.util.StringUtil; /** * 日志 * @author fk * @version v1.0 * @since v6.2 * 2016年12月9日 下午3:15:31 */ @Service public class LogsManager implements ILogsManager{ @Autowired private IDaoSupport daoSupport; /* * (non-Javadoc) * @see com.enation.app.shop.core.other.service.ILogManager#getAllLogs(java.util.Map, int, int, java.lang.String, java.lang.String) */ @Override public Page getAllLogs(Map logsMap, int page, int pageSize, String sort, String order) { String sql = creatTempSql(logsMap); if(!StringUtil.isEmpty(sort)){ sql += " order by "+sort+" "; }else{ sql += " order by log_id "; } if(!StringUtil.isEmpty(order)){ sql += order; }else{ sql += "desc"; } return this.daoSupport.queryForPage(sql, page, pageSize, null); } /** * 拼装查询sql * @param logsMap * @return */ private String creatTempSql(Map logsMap) { String sql = "select log_type type,operator_name name,log_detail detail,log_time time from es_admin_logs where 1=1 "; String name = (String) logsMap.get("name"); Integer userid = (Integer) logsMap.get("userid"); String type = (String) logsMap.get("type"); String start_time = (String) logsMap.get("start_time"); String end_time = (String) logsMap.get("end_time"); if(!StringUtil.isEmpty(name)){ sql+= " and operator_name like '%"+ name +"%' "; } if(userid!=null && userid!=0){ sql+= " and operator_id = "+userid; } if(!StringUtil.isEmpty(type) && !type.equals("0")){ sql+= " and log_type = '"+ type +"'"; } if(!StringUtil.isEmpty(start_time)){ long stime = DateUtil.getDateline(start_time+" 00:00:00", "yyyy-MM-dd HH:mm:ss"); sql+=" and log_time>"+stime; } if(!StringUtil.isEmpty(end_time)){ long etime = DateUtil.getDateline(end_time +" 23:59:59", "yyyy-MM-dd HH:mm:ss"); sql+=" and log_time<"+etime; } return sql; } }
[ "777770@sina.com" ]
777770@sina.com
a56519e980d6a7c32c6ae17dd9f629c8313cd216
e86b758e086734343dd446bb90b510462d59b3b1
/app/src/main/java/com/lixinxinlove/algorithmsvisualization/algo/BranchMoneyActivity.java
e01b0513e82382e632a9935beb4b9ce467a5062b
[]
no_license
lixinxinlove/AlgorithmsVisualization
b5980a72adac26e0f3edefc628b011b1d1ec93ec
ec740bbfe9ffbf23b7a611c98deae30f153b88dc
refs/heads/master
2020-06-06T09:40:56.645626
2019-06-19T09:43:30
2019-06-19T09:43:30
192,704,133
0
0
null
null
null
null
UTF-8
Java
false
false
426
java
package com.lixinxinlove.algorithmsvisualization.algo; import android.os.Bundle; import androidx.appcompat.app.AppCompatActivity; import com.lixinxinlove.algorithmsvisualization.R; public class BranchMoneyActivity extends AppCompatActivity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_branch_money); } }
[ "895330766@qq.com" ]
895330766@qq.com
feb113ace91b42bda94afc975fc41198026f4cb4
1c97205a3e80355034d6442bf8035cd122984f8e
/app/src/main/java/com/heqifuhou/textdrawable/TextDrawable.java
56813535a6f3215e055533916a2447ce85f4d02b
[ "MIT" ]
permissive
suntinghui/PhinfoOA4Android
8a30f8f89824daa7294051e4de1b2575800741fd
fedbb973d7a2490d07d61c8b2c8cdefdc387f8fb
refs/heads/master
2023-04-08T20:11:15.147365
2021-04-21T03:02:16
2021-04-21T03:02:16
323,909,508
0
0
null
null
null
null
UTF-8
Java
false
false
7,932
java
package com.heqifuhou.textdrawable; import android.graphics.Canvas; import android.graphics.Color; import android.graphics.ColorFilter; import android.graphics.Paint; import android.graphics.PixelFormat; import android.graphics.Rect; import android.graphics.RectF; import android.graphics.Typeface; import android.graphics.drawable.ShapeDrawable; import android.graphics.drawable.shapes.OvalShape; import android.graphics.drawable.shapes.RectShape; import android.graphics.drawable.shapes.RoundRectShape; public class TextDrawable extends ShapeDrawable { private final Paint textPaint; private final Paint borderPaint; private static final float SHADE_FACTOR =0.9f; private final String text; private final int color; private final RectShape shape; private final int height; private final int width; private final int fontSize; private final float radius; private final int borderThickness; private TextDrawable(Builder builder) { super(builder.shape); // shape properties shape = builder.shape; height = builder.height; width = builder.width; radius = builder.radius; // text and color text = builder.toUpperCase ?builder.text.toUpperCase() : builder.text; color = builder.color; // text paint settings fontSize = builder.fontSize; textPaint = new Paint(); textPaint.setColor(builder.textColor); textPaint.setAntiAlias(true); textPaint.setFakeBoldText(builder.isBold); textPaint.setStyle(Paint.Style.FILL); textPaint.setTypeface(builder.font); textPaint.setTextAlign(Paint.Align.CENTER); textPaint.setStrokeWidth(builder.borderThickness); // border paint settings borderThickness =builder.borderThickness; borderPaint = new Paint(); borderPaint.setColor(getDarkerShade(color)); borderPaint.setStyle(Paint.Style.STROKE); borderPaint.setStrokeWidth(borderThickness); // drawable paint color Paint paint = getPaint(); paint.setColor(color); } private int getDarkerShade(int color) { return Color.rgb((int)(SHADE_FACTOR *Color.red(color)), (int)(SHADE_FACTOR *Color.green(color)), (int)(SHADE_FACTOR *Color.blue(color))); } @Override public void draw(Canvas canvas) { super.draw(canvas); Rect r = getBounds(); // draw border if (borderThickness > 0) { drawBorder(canvas); } int count = canvas.save(); canvas.translate(r.left, r.top); // draw text int width = this.width < 0 ?r.width() : this.width; int height = this.height < 0 ?r.height() : this.height; int fontSize = this.fontSize < 0 ?(Math.min(width, height) / 3) : this.fontSize; textPaint.setTextSize(fontSize); canvas.drawText(text, width / 2, height/ 2 - ((textPaint.descent() + textPaint.ascent()) / 2), textPaint); canvas.restoreToCount(count); } private void drawBorder(Canvas canvas) { RectF rect = new RectF(getBounds()); rect.inset(borderThickness/2,borderThickness/2); if (shape instanceof OvalShape) { canvas.drawOval(rect, borderPaint); } else if (shape instanceof RoundRectShape) { canvas.drawRoundRect(rect, radius,radius, borderPaint); } else { canvas.drawRect(rect, borderPaint); } } @Override public void setAlpha(int alpha) { textPaint.setAlpha(alpha); } @Override public void setColorFilter(ColorFilter cf){ textPaint.setColorFilter(cf); } @Override public int getOpacity() { return PixelFormat.TRANSLUCENT; } @Override public int getIntrinsicWidth() { return width; } @Override public int getIntrinsicHeight() { return height; } public static IShapeBuilder builder() { return new Builder(); } public static class Builder implements IConfigBuilder, IShapeBuilder, IBuilder{ private String text; private int color; private int borderThickness; private int width; private int height; private Typeface font; private RectShape shape; public int textColor; private int fontSize; private boolean isBold; private boolean toUpperCase; public float radius; private Builder() { text = ""; color = Color.GRAY; textColor = Color.WHITE; borderThickness = 0; width = -1; height = -1; shape = new RectShape(); font =Typeface.create("sans-serif-light", Typeface.NORMAL); fontSize = -1; isBold = false; toUpperCase = false; } public IConfigBuilder width(int width){ this.width = width; return this; } public IConfigBuilder height(int height) { this.height = height; return this; } public IConfigBuilder textColor(int color) { this.textColor = color; return this; } public IConfigBuilder withBorder(int thickness) { this.borderThickness = thickness; return this; } public IConfigBuilder useFont(Typeface font) { this.font = font; return this; } public IConfigBuilder fontSize(int size) { this.fontSize = size; return this; } public IConfigBuilder bold() { this.isBold = true; return this; } public IConfigBuilder toUpperCase() { this.toUpperCase = true; return this; } @Override public IConfigBuilder beginConfig() { return this; } @Override public IShapeBuilder endConfig() { return this; } @Override public IBuilder rect() { this.shape = new RectShape(); return this; } @Override public IBuilder round() { this.shape = new OvalShape(); return this; } @Override public IBuilder roundRect(int radius) { this.radius = radius; float[] radii = {radius, radius,radius, radius, radius, radius, radius, radius}; this.shape = new RoundRectShape(radii, null, null); return this; } @Override public TextDrawable buildRect(String text, int color) { rect(); return build(text, color); } @Override public TextDrawable buildRoundRect(String text, int color, int radius) { roundRect(radius); return build(text, color); } @Override public TextDrawable buildRound(String text, int color) { round(); return build(text, color); } @Override public TextDrawable build(String text,int color) { this.color = color; this.text = text; return new TextDrawable(this); } } }
[ "tinghuisun@163.com" ]
tinghuisun@163.com
0cb9ebd9e320d8b4d56dd62a3e460dd5927f0322
96342d1091241ac93d2d59366b873c8fedce8137
/dist/game/data/scripts/ai/npc/Teleports/PaganTeleporters/PaganTeleporters.java
3279fe713a7a6707e44efc72ee65ccd46057b00b
[]
no_license
soultobe/L2JOlivia_EpicEdition
c97ac7d232e429fa6f91d21bb9360cf347c7ee33
6f9b3de9f63d70fa2e281b49d139738e02d97cd6
refs/heads/master
2021-01-10T03:42:04.091432
2016-03-09T06:55:59
2016-03-09T06:55:59
53,468,281
0
1
null
null
null
null
UTF-8
Java
false
false
3,498
java
/* * This file is part of the L2J Olivia project. * * 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 ai.npc.Teleports.PaganTeleporters; import java.util.HashMap; import java.util.Map; import com.l2jolivia.gameserver.model.Location; import com.l2jolivia.gameserver.model.actor.L2Npc; import com.l2jolivia.gameserver.model.actor.instance.L2PcInstance; import ai.npc.AbstractNpcAI; /** * Pagan Temple teleport AI.<br> * Original Jython script by BiTi. * @author Plim */ final class PaganTeleporters extends AbstractNpcAI { // NPCs private static final int TRIOLS_MIRROR_1 = 32039; private static final int TRIOLS_MIRROR_2 = 32040; // Locations private static final Map<Integer, Location> TRIOLS_LOCS = new HashMap<>(); static { TRIOLS_LOCS.put(TRIOLS_MIRROR_1, new Location(-12766, -35840, -10856)); TRIOLS_LOCS.put(TRIOLS_MIRROR_2, new Location(36640, -51218, 718)); } // @formatter:off private static final int[] NPCS = { 32034, 32035, 32036, 32037, 32039, 32040 }; // @formatter:on // Items private static final int VISITORS_MARK = 8064; private static final int FADED_VISITORS_MARK = 8065; private static final int PAGANS_MARK = 8067; private PaganTeleporters() { super(PaganTeleporters.class.getSimpleName(), "ai/npc/Teleports"); addStartNpc(NPCS); addTalkId(NPCS); addFirstTalkId(TRIOLS_MIRROR_1, TRIOLS_MIRROR_2); } @Override public String onAdvEvent(String event, L2Npc npc, L2PcInstance player) { switch (event) { case "Close_Door1": { closeDoor(19160001, 0); break; } case "Close_Door2": { closeDoor(19160010, 0); closeDoor(19160011, 0); break; } } return ""; } @Override public String onFirstTalk(L2Npc npc, L2PcInstance player) { if (TRIOLS_LOCS.containsKey(npc.getId())) { player.teleToLocation(TRIOLS_LOCS.get(npc.getId())); } return ""; } @Override public String onTalk(L2Npc npc, L2PcInstance player) { switch (npc.getId()) { case 32034: { if (!hasAtLeastOneQuestItem(player, VISITORS_MARK, FADED_VISITORS_MARK, PAGANS_MARK)) { return "noItem.htm"; } openDoor(19160001, 0); startQuestTimer("Close_Door1", 10000, null, null); return "FadedMark.htm"; } case 32035: { openDoor(19160001, 0); startQuestTimer("Close_Door1", 10000, null, null); return "FadedMark.htm"; } case 32036: { if (!hasQuestItems(player, PAGANS_MARK)) { return "noMark.htm"; } startQuestTimer("Close_Door2", 10000, null, null); openDoor(19160010, 0); openDoor(19160011, 0); return "openDoor.htm"; } case 32037: { openDoor(19160010, 0); openDoor(19160011, 0); startQuestTimer("Close_Door2", 10000, null, null); return "FadedMark.htm"; } } return super.onTalk(npc, player); } public static void main(String[] args) { new PaganTeleporters(); } }
[ "kim@tsnet-j.co.jp" ]
kim@tsnet-j.co.jp
368b958cdab065a8787981561a7b055d72b66e1f
a9469adda77c7833452629e2b6560d4d52e6d59e
/JFinalDemo/src/cn/java/jfinal/controller/front/IndexController.java
1fcd2bf9555fc2b54765fd1b6e6d5df61f650b78
[]
no_license
brunoalbrito/javacodedemo
882cee2afe742e51354ca6fd60fc3546d481244c
840e84c252967e63022197116d170b3090927591
refs/heads/master
2020-04-22T17:50:36.975840
2017-06-30T11:11:47
2017-06-30T11:11:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package cn.java.jfinal.controller.front; import com.jfinal.core.Controller; public class IndexController extends Controller { public void index() { renderText("Hello JFinal World."); } }
[ "297963025@qq.com" ]
297963025@qq.com
15183df43c41bf189573061327ec1c46bec5ced1
15df00f5e670d704621950e0efb8ac587b97c46b
/library/src/main/java/cn/droidlover/xdroidmvp/base/XFragmentAdapter.java
840af4ddd7b5bcfaf303b4feef1904f939ce3d16
[]
no_license
chocozhao/BrushFace
109c325b73b0fddd8389468b5b4a9290faf89ea9
577591d921d57d8aac185d8851eac13083fb2e02
refs/heads/master
2020-08-03T15:34:08.682062
2019-09-30T07:38:35
2019-09-30T07:38:35
211,799,717
1
0
null
null
null
null
UTF-8
Java
false
false
1,220
java
package cn.droidlover.xdroidmvp.base; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import java.util.ArrayList; import java.util.List; /** * * ClaseName:${NAME} * Description: * Author:JensenWei * QQ: 2188307188 * Createtime:2016/12/10 10:32 * Modified By: * Fixtime:2016/12/10 10:32 * FixDescription: * @version * */ public class XFragmentAdapter extends FragmentPagerAdapter { private List<Fragment> fragmentList = new ArrayList<>(); private String[] titles; public XFragmentAdapter(FragmentManager fm, List<Fragment> fragmentList, String[] titles) { super(fm); this.fragmentList.clear(); this.fragmentList.addAll(fragmentList); this.titles = titles; } @Override public CharSequence getPageTitle(int position) { if (titles != null && titles.length > position) { return titles[position]; } return ""; } @Override public Fragment getItem(int position) { return fragmentList.get(position); } @Override public int getCount() { return fragmentList.size(); } }
[ "you@example.com" ]
you@example.com
04376055b77f762706c1f612c4b998fe65c3b8d8
b58dc287058cd64566e3b08c84cc7bf206dc511a
/TileEntities/TileEntityBattery.java
10f76f4c78833dfdc9dd5a00f506c19e3e7b011d
[]
no_license
lllMohandarlll/ElectriCraft
2f4b188fba895355e0f051cfc001384332841c7d
c6d80936eede3ad3d090c8071dfea916bd0e9597
refs/heads/master
2020-12-13T19:59:34.426019
2016-03-17T21:42:59
2016-03-17T21:42:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,845
java
/******************************************************************************* * @author Reika Kalseki * * Copyright 2015 * * All rights reserved. * Distribution of the software in any form is only allowed with * explicit, prior permission from the owner. ******************************************************************************/ package Reika.ElectriCraft.TileEntities; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.world.World; import net.minecraftforge.common.util.ForgeDirection; import Reika.DragonAPI.Libraries.MathSci.ReikaEngLibrary; import Reika.DragonAPI.Libraries.MathSci.ReikaMathLibrary; import Reika.DragonAPI.Libraries.World.ReikaWorldHelper; import Reika.ElectriCraft.Auxiliary.BatteryTile; import Reika.ElectriCraft.Auxiliary.WireEmitter; import Reika.ElectriCraft.Auxiliary.WireReceiver; import Reika.ElectriCraft.Base.NetworkTileEntity; import Reika.ElectriCraft.Registry.BatteryType; import Reika.ElectriCraft.Registry.ElectriItems; import Reika.ElectriCraft.Registry.ElectriTiles; public class TileEntityBattery extends NetworkTileEntity implements WireEmitter, WireReceiver, BatteryTile { private long energy; private long lastE; private boolean lastPower; @Override public void updateEntity(World world, int x, int y, int z, int meta) { super.updateEntity(world, x, y, z, meta); if (!world.isRemote && network != null) {/* if ((world.getTotalWorldTime()&31) == 0) { what was this for network.updateWires(); }*/ if (world.getTotalWorldTime()%64 == 0) { ReikaWorldHelper.causeAdjacentUpdates(world, x, y, z); } if (this.canReceivePower()) { int v = network.getTerminalVoltage(this); int a = network.getTerminalCurrent(this); long p = (long)v*(long)a; if (energy/20 < this.getMaxEnergy()) energy += p; if (energy/20 >= this.getMaxEnergy()) { energy = this.getMaxEnergy()*20; network.updateWires(); } } boolean flag = world.isBlockIndirectlyGettingPowered(x, y, z); if (flag != lastPower) { network.updateWires(); } if (this.canEmitPower()) { int v = this.getGenVoltage(); int a = this.getGenCurrent(); long p = (long)v*(long)a; energy -= p; if (energy <= 0) { energy = 0; network.updateWires(); } else if (lastE == 0) { network.updateWires(); } } lastPower = flag; lastE = energy; } } @Override public boolean canEmitPower() { boolean red = worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord); return energy > 0 && red && network.getNumberPathsStartingAt(this) > 0; } private long getGenPower() { return (long)this.getGenCurrent()*(long)this.getGenVoltage(); } public long getStoredEnergy() { return energy/20; } public long getMaxEnergy() { return this.getBatteryType().maxCapacity; } public BatteryType getBatteryType() { return BatteryType.batteryList[worldObj.getBlockMetadata(xCoord, yCoord, zCoord)]; } public String getDisplayEnergy() { long e = this.getStoredEnergy(); String pre = ReikaEngLibrary.getSIPrefix(e); double b = ReikaMathLibrary.getThousandBase(e); return String.format("%.3f%sJ", b, pre); } @Override public boolean canNetworkOnSide(ForgeDirection dir) { return true; } @Override public int getCurrentLimit() { return 0; } @Override public void overCurrent() { } @Override public ElectriTiles getMachine() { return ElectriTiles.BATTERY; } @Override protected void animateWithTick(World world, int x, int y, int z) { } @Override protected void writeSyncTag(NBTTagCompound NBT) { super.writeSyncTag(NBT); NBT.setLong("e", energy); } @Override protected void readSyncTag(NBTTagCompound NBT) { super.readSyncTag(NBT); energy = NBT.getLong("e"); } @Override public boolean canReceivePowerFromSide(ForgeDirection dir) { return dir != ForgeDirection.UP; } @Override public boolean canEmitPowerToSide(ForgeDirection dir) { return dir == ForgeDirection.UP; } @Override public int getGenVoltage() { return this.canEmitPower() ? this.getBatteryType().outputVoltage : 0; } @Override public int getGenCurrent() { return this.canEmitPower() ? this.getBatteryType().outputCurrent : 0; } public void setEnergyFromNBT(ItemStack is) { if (is.getItem() == ElectriItems.BATTERY.getItemInstance()) { if (is.stackTagCompound != null) energy = is.stackTagCompound.getLong("nrg")*20L; else energy = 0; } else { energy = 0; } } @Override public boolean canReceivePower() { return energy < this.getMaxEnergy()*20; } @Override public int getRedstoneOverride() { return (int)(15D*this.getStoredEnergy()/this.getMaxEnergy()); } @Override public String getFormattedCapacity() { return this.getBatteryType().getFormattedCapacity(); } }
[ "reikasminecraft@gmail.com" ]
reikasminecraft@gmail.com
caf0b47011bfd2c4f2038f9194a175f217cd88f8
5e7ccb707b80626f9f476076e1b0c1f7d7247f3e
/app/src/main/java/com/yc/compare/ui/fragment/sub/NewsItemFragment.java
1eb3a5757d239882c13ac098f17c466bce115290
[]
no_license
myflying/compare
f3745e708bef62513ce8033f677dbb2e19d8096b
f3d6e94311a88e45bbd697076cf02769e226c4fb
refs/heads/master
2021-10-08T10:49:23.235719
2018-12-11T10:02:50
2018-12-11T10:02:50
159,907,192
0
0
null
null
null
null
UTF-8
Java
false
false
2,908
java
package com.yc.compare.ui.fragment.sub; import android.os.Bundle; import android.support.v7.widget.LinearLayoutManager; import android.support.v7.widget.RecyclerView; import android.view.LayoutInflater; import android.view.View; import com.wang.avi.AVLoadingIndicatorView; import com.yc.compare.R; import com.yc.compare.bean.NewsInfo; import com.yc.compare.bean.NewsInfoRet; import com.yc.compare.presenter.NewsInfoPresenterImp; import com.yc.compare.ui.adapter.NewsInfoAdapter; import com.yc.compare.ui.base.BaseFragment; import com.yc.compare.ui.custom.RecycleViewDivider; import com.yc.compare.view.NewsInfoView; import java.util.ArrayList; import java.util.List; import butterknife.BindView; import butterknife.ButterKnife; /** * Created by iflying on 2018/2/6. */ public class NewsItemFragment extends BaseFragment implements NewsInfoView { private NewsInfoPresenterImp newsInfoPresenterImp; private NewsInfoAdapter newsInfoAdapter; @BindView(R.id.avi) AVLoadingIndicatorView avi; @BindView(R.id.news_list) RecyclerView mNewsListView; /** * onCreateView */ @Override protected View onCreateView() { View root = LayoutInflater.from(getActivity()).inflate(R.layout.fragment_item_page, null); ButterKnife.bind(this, root); initViews(); return root; } public static NewsItemFragment newInstance(int i) { NewsItemFragment fragment = new NewsItemFragment(); Bundle bundle = new Bundle(); bundle.putString("category_id", i == 0 ? "" : i + ""); fragment.setArguments(bundle); return fragment; } public void initViews() { avi.hide(); //newsInfoPresenterImp = new NewsInfoPresenterImp(this, getActivity()); //newsInfoPresenterImp.getNewsInfoList(1); List<NewsInfo> list = new ArrayList<>(); for (int i = 0; i < 12; i++) { list.add(new NewsInfo()); } newsInfoAdapter = new NewsInfoAdapter(getActivity(), list); mNewsListView.setLayoutManager(new LinearLayoutManager(getActivity())); mNewsListView.addItemDecoration(new RecycleViewDivider( getActivity(), LinearLayoutManager.VERTICAL, 1, getResources().getColor(R.color.line_color))); mNewsListView.setAdapter(newsInfoAdapter); } /** * @descriptoin 请求前加载progress */ @Override public void showProgress() { } /** * @descriptoin 请求结束之后隐藏progress */ @Override public void dismissProgress() { } /** * @param tData 数据类型 * @descriptoin 请求数据成功 */ @Override public void loadDataSuccess(NewsInfoRet tData) { } /** * @param throwable 异常类型 * @descriptoin 请求数据错误 */ @Override public void loadDataError(Throwable throwable) { } }
[ "512710257@qq.com" ]
512710257@qq.com
4e2a8fda8a27d6d18cdd452e6b3f5a7c4e29a1b6
59cf78462375b729bb4eb05a8dd36cdfe6b5ce03
/src/main/java/com/uni/service/rbac/dto/request/RbacPermissionRequestDto.java
0804d81865e27d033cf01faea87b2c048e3f9d42
[ "Apache-2.0" ]
permissive
geeker-lait/uni-life
fe90306e7622749397db8dac2493dab3312d06fd
95c7a1b5864ae0cadfdaf3d383b9c5449b63c648
refs/heads/master
2022-12-25T18:37:05.707091
2020-10-04T15:58:39
2020-10-04T15:58:39
296,855,786
1
2
null
null
null
null
UTF-8
Java
false
false
973
java
package com.uni.service.rbac.dto.request; import com.uni.framework.crud.base.dto.BaseRequestDto; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.ToString; /** * RbacPermission Dto generated by auto * 这是类的注释 * * @author lait * Created On 2020-10-04. */ @Data @ToString(callSuper = true) @EqualsAndHashCode(callSuper = false) public class RbacPermissionRequestDto extends BaseRequestDto { private static final long serialVersionUID = -1L; /** * TODO 字段信息描述 */ private String permissionCode; /** * TODO 字段信息描述 */ private String permissionName; /** * TODO 字段信息描述 */ private String permissionVal; /** * TODO 字段信息描述 */ private String permissionUri; /** * TODO 字段信息描述 */ private String permissionTyp; /** * TODO 字段信息描述 */ private Integer sorted; }
[ "lait.zhang@gmail.com" ]
lait.zhang@gmail.com
9e48577142fae6902b6ca8729e5d398a7d047a2e
56f7650386eee7a31c84e78fcc5fe204a744eff0
/main/einvoice-commons/oasis/src/main/java/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/DeliveredQuantityType.java
a5f2fdc6fb943d6acaeac1f592328de45a58fc95
[]
no_license
egcarlos/einvoice
968153d4b96fa51823c734ef0136141dd7166078
42edf502a265462686cdd36512b3396ecd31b07a
refs/heads/master
2021-05-01T13:48:30.674282
2015-11-25T15:16:04
2015-11-25T15:16:04
26,558,590
0
1
null
null
null
null
UTF-8
Java
false
false
924
java
package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import un.unece.uncefact.data.specification.unqualifieddatatypesschemamodule._2.QuantityType; /** * <p>Clase Java para DeliveredQuantityType complex type. * * <p>El siguiente fragmento de esquema especifica el contenido que se espera que haya en esta clase. * * <pre> * &lt;complexType name="DeliveredQuantityType"> * &lt;simpleContent> * &lt;extension base="&lt;urn:un:unece:uncefact:data:specification:UnqualifiedDataTypesSchemaModule:2>QuantityType"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "DeliveredQuantityType") public class DeliveredQuantityType extends QuantityType { }
[ "carlos.echeverria@labtech.pe" ]
carlos.echeverria@labtech.pe
41ddd7c40ff64b7657439e9a408616cdc57d9b24
a5dbeadebfd268a529d6a012fb23dc0b635f9b8c
/core/src/test/java/ru/mipt/cybersecurity/crypto/tls/test/TlsTestServerProtocol.java
92344fa94974f673d08181de6b9eb5dcb0641cf2
[]
no_license
skhvostyuk/CyberSecurity
22f6a272e38b56bfb054aae0dd7aa03bc96b6d06
33ea483df41973984d0edbe47a20201b204150aa
refs/heads/master
2021-08-29T04:44:31.041415
2017-12-13T12:15:29
2017-12-13T12:15:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
511
java
package ru.mipt.cybersecurity.crypto.tls.test; import java.io.InputStream; import java.io.OutputStream; import java.security.SecureRandom; import ru.mipt.cybersecurity.crypto.tls.TlsServerProtocol; class TlsTestServerProtocol extends TlsServerProtocol { protected final TlsTestConfig config; public TlsTestServerProtocol(InputStream input, OutputStream output, SecureRandom secureRandom, TlsTestConfig config) { super(input, output, secureRandom); this.config = config; } }
[ "hvostuksergey@gmail.com" ]
hvostuksergey@gmail.com
9d6eed30eddf96a715cca03d1a201361a161b707
09e03ba73062c62c1d3389cdecb94f68430cd82d
/storage/common/src/main/java/org/artifactory/io/checksum/Sha1Md5ChecksumInputStream.java
6de8d7193a01d323d1a091a45943d1f34ff3d7a9
[ "Apache-2.0" ]
permissive
alancnet/artifactory
1ee6183301b581e60f67691d7fa025b0fb44b118
7ac3ea76471a00543eaf60e82b554d8edd894c0f
refs/heads/master
2021-01-10T14:58:53.769805
2015-10-07T16:46:14
2015-10-07T16:46:14
43,829,862
3
6
null
2016-03-09T18:30:58
2015-10-07T16:38:51
Java
UTF-8
Java
false
false
1,503
java
/* * Artifactory is a binaries repository manager. * Copyright (C) 2012 JFrog Ltd. * * Artifactory 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. * * Artifactory 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 Artifactory. If not, see <http://www.gnu.org/licenses/>. */ package org.artifactory.io.checksum; import org.artifactory.checksum.ChecksumType; import javax.annotation.Nonnull; import java.io.InputStream; /** * A {@link org.artifactory.io.checksum.ChecksumInputStream} that calculates SHA-1 and MD5 checksums. * * @author Yossi Shaul */ public class Sha1Md5ChecksumInputStream extends ChecksumInputStream { public Sha1Md5ChecksumInputStream(InputStream is) { // the order of the checksums does matter super(is, new Checksum(ChecksumType.sha1), new Checksum(ChecksumType.md5)); } @Nonnull public String getSha1() { return getChecksums()[0].getChecksum(); } @Nonnull public String getMd5() { return getChecksums()[1].getChecksum(); } }
[ "github@alanc.net" ]
github@alanc.net
1cb8f408ca476075ce237e3194c3c7819945dbe2
be73270af6be0a811bca4f1710dc6a038e4a8fd2
/crash-reproduction-moho/results/MOCKITO-21b-2-10-MOEAD-WeightedSum:TestLen:CallDiversity/org/mockito/internal/creation/instance/ConstructorInstantiator_ESTest.java
841742a00233e32da46d83305d5375ab8d718f8f
[]
no_license
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
cf118b23ecb87a8bf59643e42f7556b521d1f754
3bb39683f9c343b8ec94890a00b8f260d158dfe3
refs/heads/master
2022-07-29T14:44:00.774547
2020-08-10T15:14:49
2020-08-10T15:14:49
285,804,495
0
0
null
null
null
null
UTF-8
Java
false
false
962
java
/* * This file was automatically generated by EvoSuite * Wed Apr 08 11:55:16 UTC 2020 */ package org.mockito.internal.creation.instance; import org.junit.Test; import static org.junit.Assert.*; import static org.evosuite.runtime.EvoAssertions.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; import org.mockito.internal.creation.instance.ConstructorInstantiator; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class ConstructorInstantiator_ESTest extends ConstructorInstantiator_ESTest_scaffolding { @Test(timeout = 4000) public void test0() throws Throwable { Object object0 = new Object(); ConstructorInstantiator constructorInstantiator0 = new ConstructorInstantiator(object0); Class<String> class0 = String.class; // Undeclared exception! constructorInstantiator0.newInstance((Class<?>) class0); } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
a31fe1d4c805f38f1ae4f1fe9f9a9cb231044a2f
7dd0bc318958b5666ee7c30b3e38d440958a6eca
/property/src/main/java/com/modinfodesigns/property/BinaryFunctionProperty.java
42f58780430d3947eb394d3bd4711c78da3da69a
[ "Apache-2.0" ]
permissive
Shicheng-Guo/modular-informatic-designs
50b0f83ffc1bb3115702269a679c906964fa4bec
15f5ff2abe1aefe9286daaeb7ac00d68e69d761d
refs/heads/master
2023-03-16T17:29:23.430366
2016-10-06T13:36:51
2016-10-06T13:36:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,958
java
package com.modinfodesigns.property; import com.modinfodesigns.property.schema.PropertyDescriptor; import java.util.ArrayList; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class BinaryFunctionProperty extends BooleanFunctionProperty implements IExposeInternalProperties { private transient static final Logger LOG = LoggerFactory.getLogger( BinaryFunctionProperty.class ); private String primaryChoice; // Choice for a truth value of the boolean function private String secondaryChoice; // Choice for the false value of the boolean function @Override public IProperty execute() { LOG.debug( "execute( )" ); boolean tf = getBooleanValue( ); BinaryProperty binaryProp = new BinaryProperty( primaryChoice, secondaryChoice ); binaryProp.setName( getName( ) ); try { binaryProp.setValue( ((tf) ? primaryChoice : secondaryChoice), null ); } catch (Exception e ) { } return binaryProp; } public void setPrimaryChoice( String primaryChoice ) { this.primaryChoice = primaryChoice; } public void setSecondaryChoice( String secondaryChoice ) { this.secondaryChoice = secondaryChoice; } @Override public List<PropertyDescriptor> getInternalProperties() { ArrayList<PropertyDescriptor> internalProps = new ArrayList<PropertyDescriptor>( ); PropertyDescriptor affirmDesc = new PropertyDescriptor( ); affirmDesc.setName( "PrimaryChoice" ); affirmDesc.setPropertyType( "String" ); affirmDesc.setDisplayName( "Primary Choice" ); internalProps.add( affirmDesc ); PropertyDescriptor altDesc = new PropertyDescriptor( ); altDesc.setName( "SecondaryChoice" ); altDesc.setPropertyType( "String" ); altDesc.setDisplayName( "Secondary Choice" ); internalProps.add( altDesc ); return internalProps; } }
[ "ted.sullivan@lucidworks.com" ]
ted.sullivan@lucidworks.com
0604d1d6975f292f956556dd0f81a98ec77bb28a
256a3596eb3a9c694d2015b173c51b4e20b82ae0
/DailyRhythmPortal/drp-ws-client/target/generated-sources/wsimport/com/bestbuy/bbym/ise/iseclientacdsdevice/TextType.java
e3ee3429dadf6ff2d57cf329723e0e7f5e46c984
[]
no_license
sellasiyer/maven-drp
a8487325586bb6018d08a6cdb4078ce0ef5d5989
cbbab7027e1ee64cdaf9956a82c6ad964bb9ec86
refs/heads/master
2021-01-01T19:15:47.427243
2012-11-03T13:04:14
2012-11-03T13:04:14
5,146,773
0
0
null
null
null
null
UTF-8
Java
false
false
1,294
java
package com.bestbuy.bbym.ise.iseclientacdsdevice; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlType; import javax.xml.bind.annotation.XmlValue; /** * <p>Java class for TextType complex type. * * <p>The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="TextType"> * &lt;simpleContent> * &lt;extension base="&lt;http://www.w3.org/2001/XMLSchema>string"> * &lt;/extension> * &lt;/simpleContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "TextType", namespace = "http://www.tsh.bestbuy.com/common/datatype/v1", propOrder = { "value" }) public class TextType { @XmlValue protected String value; /** * Gets the value of the value property. * * @return * possible object is * {@link String } * */ public String getValue() { return value; } /** * Sets the value of the value property. * * @param value * allowed object is * {@link String } * */ public void setValue(String value) { this.value = value; } }
[ "sella.s.iyer@gmail.com" ]
sella.s.iyer@gmail.com
6a2609833ed07c0c34bb65a1e4fd819dd840ada3
e3990e8c3b1e0b8824a0a19bf9d12e48441def7a
/ebean-redis/src/main/java/io/ebean/redis/RedisConfig.java
a27fd77b6d054ee4526e39a1a8b538e884ffca3b
[ "Apache-2.0" ]
permissive
ebean-orm/ebean
13c9c465f597dd2cf8b3e54e4b300543017c9dee
bfe94786de3c3b5859aaef5afb3a7572e62275c4
refs/heads/master
2023-08-22T12:57:34.271133
2023-08-22T11:43:41
2023-08-22T11:43:41
5,793,895
1,199
224
Apache-2.0
2023-09-11T14:05:26
2012-09-13T11:49:56
Java
UTF-8
Java
false
false
4,211
java
package io.ebean.redis; import redis.clients.jedis.JedisPool; import redis.clients.jedis.JedisPoolConfig; import java.util.Properties; /** * Deployment configuration for redis. */ public class RedisConfig { private String server = "localhost"; private int port = 6379; private int maxTotal = 200; private int maxIdle = 200; private int minIdle = 1; private long maxWaitMillis = -1L; private boolean blockWhenExhausted = true; private int timeout = 2000; private String username; private String password; private boolean ssl; /** * Return a new JedisPool based on the configuration. */ public JedisPool createPool() { JedisPoolConfig poolConfig = new JedisPoolConfig(); poolConfig.setMaxTotal(maxTotal); poolConfig.setMaxIdle(maxIdle); poolConfig.setMinIdle(minIdle); poolConfig.setMaxWaitMillis(maxWaitMillis); poolConfig.setBlockWhenExhausted(blockWhenExhausted); return new JedisPool(poolConfig, server, port, timeout, username, password, ssl); } public String getServer() { return server; } public void setServer(String server) { this.server = server; } public int getPort() { return port; } public void setPort(int port) { this.port = port; } public int getMaxTotal() { return maxTotal; } public void setMaxTotal(int maxTotal) { this.maxTotal = maxTotal; } public int getMaxIdle() { return maxIdle; } public void setMaxIdle(int maxIdle) { this.maxIdle = maxIdle; } public int getMinIdle() { return minIdle; } public void setMinIdle(int minIdle) { this.minIdle = minIdle; } public long getMaxWaitMillis() { return maxWaitMillis; } public void setMaxWaitMillis(long maxWaitMillis) { this.maxWaitMillis = maxWaitMillis; } public boolean isBlockWhenExhausted() { return blockWhenExhausted; } public void setBlockWhenExhausted(boolean blockWhenExhausted) { this.blockWhenExhausted = blockWhenExhausted; } public int getTimeout() { return timeout; } public void setTimeout(int timeout) { this.timeout = timeout; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public boolean isSsl() { return ssl; } public void setSsl(boolean ssl) { this.ssl = ssl; } public void loadProperties(Properties properties) { Reader reader = new Reader(properties); this.server = reader.get("ebean.redis.server", server); this.port = reader.getInt("ebean.redis.port", port); this.ssl = reader.getBool("ebean.redis.ssl", ssl); this.minIdle = reader.getInt("ebean.redis.minIdle", minIdle); this.maxIdle = reader.getInt("ebean.redis.maxIdle", maxIdle); this.maxTotal = reader.getInt("ebean.redis.maxTotal", maxTotal); this.maxWaitMillis = reader.getLong("ebean.redis.maxWaitMillis", maxWaitMillis); this.timeout = reader.getInt("ebean.redis.timeout", timeout); this.username = reader.get("ebean.redis.username", username); this.password = reader.get("ebean.redis.password", password); this.blockWhenExhausted = reader.getBool("ebean.redis.blockWhenExhausted", blockWhenExhausted); } private static class Reader { private final Properties properties; Reader(Properties properties) { this.properties = (properties != null) ? properties : new Properties(); } String get(String key, String defaultVal) { return System.getProperty(key, properties.getProperty(key, defaultVal)); } int getInt(String key, int defaultVal) { final String val = get(key, null); return val != null ? Integer.parseInt(val.trim()) : defaultVal; } long getLong(String key, long defaultVal) { final String val = get(key, null); return val != null ? Integer.parseInt(val.trim()) : defaultVal; } boolean getBool(String key, boolean defaultVal) { final String val = get(key, null); return val != null ? Boolean.parseBoolean(val.trim()) : defaultVal; } } }
[ "robin.bygrave@gmail.com" ]
robin.bygrave@gmail.com
f028bfa7c5c7b32875e57e3e25636ffe1d196b8c
dd80a584130ef1a0333429ba76c1cee0eb40df73
/development/samples/training/multiscreen/newsreader/src/com/example/android/newsreader/HeadlinesFragment.java
99d02faf863c5c277771d09f2d473634f92c56cb
[ "MIT", "Apache-2.0" ]
permissive
karunmatharu/Android-4.4-Pay-by-Data
466f4e169ede13c5835424c78e8c30ce58f885c1
fcb778e92d4aad525ef7a995660580f948d40bc9
refs/heads/master
2021-03-24T13:33:01.721868
2017-02-18T17:48:49
2017-02-18T17:48:49
81,847,777
0
2
MIT
2020-03-09T00:02:12
2017-02-13T16:47:00
null
UTF-8
Java
false
false
4,099
java
/* * Copyright (C) 2011 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.example.android.newsreader; import android.os.Bundle; import android.support.v4.app.ListFragment; import android.view.View; import android.widget.AdapterView; import android.widget.AdapterView.OnItemClickListener; import android.widget.ArrayAdapter; import android.widget.ListView; import java.util.ArrayList; import java.util.List; /** * Fragment that displays the news headlines for a particular news category. * * This Fragment displays a list with the news headlines for a particular news category. * When an item is selected, it notifies the configured listener that a headlines was selected. */ public class HeadlinesFragment extends ListFragment implements OnItemClickListener { // The list of headlines that we are displaying List<String> mHeadlinesList = new ArrayList<String>(); // The list adapter for the list we are displaying ArrayAdapter<String> mListAdapter; // The listener we are to notify when a headline is selected OnHeadlineSelectedListener mHeadlineSelectedListener = null; /** * Represents a listener that will be notified of headline selections. */ public interface OnHeadlineSelectedListener { /** * Called when a given headline is selected. * @param index the index of the selected headline. */ public void onHeadlineSelected(int index); } /** * Default constructor required by framework. */ public HeadlinesFragment() { super(); } @Override public void onStart() { super.onStart(); setListAdapter(mListAdapter); getListView().setOnItemClickListener(this); loadCategory(0); } @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); mListAdapter = new ArrayAdapter<String>(getActivity(), R.layout.headline_item, mHeadlinesList); } /** * Sets the listener that should be notified of headline selection events. * @param listener the listener to notify. */ public void setOnHeadlineSelectedListener(OnHeadlineSelectedListener listener) { mHeadlineSelectedListener = listener; } /** * Load and display the headlines for the given news category. * @param categoryIndex the index of the news category to display. */ public void loadCategory(int categoryIndex) { mHeadlinesList.clear(); int i; NewsCategory cat = NewsSource.getInstance().getCategory(categoryIndex); for (i = 0; i < cat.getArticleCount(); i++) { mHeadlinesList.add(cat.getArticle(i).getHeadline()); } mListAdapter.notifyDataSetChanged(); } /** * Handles a click on a headline. * * This causes the configured listener to be notified that a headline was selected. */ @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { if (null != mHeadlineSelectedListener) { mHeadlineSelectedListener.onHeadlineSelected(position); } } /** Sets choice mode for the list * * @param selectable whether list is to be selectable. */ public void setSelectable(boolean selectable) { if (selectable) { getListView().setChoiceMode(ListView.CHOICE_MODE_SINGLE); } else { getListView().setChoiceMode(ListView.CHOICE_MODE_NONE); } } }
[ "karun.matharu@gmail.com" ]
karun.matharu@gmail.com
ae81a07917b47e7788ba7f5a115ee4e3d2fbf984
ec9b1c2bbf49885c5184286eb09bb1b921b94a7e
/Java Programming/OOPROG/P2W4/Oplossingen/SLIDES/src/MyException.java
b13dad0a69a9ab6eb683e3c7bca7dae6724ecdf1
[]
no_license
gvdhaege/KdG
a7c46973be303162c85383fe5eaa2d74fda12b0a
9fdec9800fdcd0773340472bc5d711bfe73be3e4
refs/heads/master
2020-03-27T17:44:10.149815
2018-05-25T09:52:42
2018-05-25T09:52:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
599
java
/** * Created by venj on 29/10/2014. */ public class MyException extends Exception { public MyException() { } public MyException(String message) { super(message); } public MyException(String message, Throwable cause) { super(message, cause); } public MyException(Throwable cause) { super(cause); } public String toString() { return String.format("I'm\n'%s'\nand I'm caused by\n'%s'" , super.toString() , getCause().toString()); } }
[ "steven.excelmans@cegeka.com" ]
steven.excelmans@cegeka.com
5c14cd7f6549f4f3a07e57baedc87dc507a4e9df
712a5e8475b6c9276bd4f8f857be95fdf6f30b9f
/com/google/android/gms/internal/zzzt.java
d7736d56eb4686ac1107aa747ec2686862d4e78e
[]
no_license
swapnilsen/OCR_2
b29bd22a51203b4d39c2cc8cb03c50a85a81218f
1889d208e17e94a55ddeae91336fe92110e1bd2d
refs/heads/master
2021-01-20T08:46:03.508508
2017-05-03T19:50:52
2017-05-03T19:50:52
90,187,623
1
0
null
null
null
null
UTF-8
Java
false
false
4,994
java
package com.google.android.gms.internal; import android.content.ContentResolver; import android.content.Context; import android.util.Log; import com.google.android.gms.common.internal.zzac; import com.google.firebase.remoteconfig.FirebaseRemoteConfig; import java.nio.ByteBuffer; import java.nio.charset.Charset; public class zzzt implements com.google.android.gms.internal.zzzk.zzb { private static final Charset UTF_8; static Boolean zzaxU; final zza zzaxV; static class zza { final ContentResolver mContentResolver; zza(Context context) { if (context == null || !zzaB(context)) { this.mContentResolver = null; return; } this.mContentResolver = context.getContentResolver(); zzble.zzb(this.mContentResolver, "gms:playlog:service:sampling_"); } private static boolean zzaB(Context context) { if (zzzt.zzaxU == null) { zzzt.zzaxU = Boolean.valueOf(zzadg.zzbi(context).checkCallingOrSelfPermission("com.google.android.providers.gsf.permission.READ_GSERVICES") == 0); } return zzzt.zzaxU.booleanValue(); } String zzdb(String str) { if (this.mContentResolver == null) { return null; } ContentResolver contentResolver = this.mContentResolver; String valueOf = String.valueOf("gms:playlog:service:sampling_"); String valueOf2 = String.valueOf(str); return zzble.zza(contentResolver, valueOf2.length() != 0 ? valueOf.concat(valueOf2) : new String(valueOf), null); } long zzuW() { return this.mContentResolver == null ? 0 : zzble.getLong(this.mContentResolver, "android_id", 0); } } static class zzb { public final String zzaxW; public final long zzaxX; public final long zzaxY; public zzb(String str, long j, long j2) { this.zzaxW = str; this.zzaxX = j; this.zzaxY = j2; } } static { UTF_8 = Charset.forName("UTF-8"); zzaxU = null; } public zzzt() { this(new zza(null)); } public zzzt(Context context) { this(new zza(context)); } zzzt(zza com_google_android_gms_internal_zzzt_zza) { this.zzaxV = (zza) zzac.zzw(com_google_android_gms_internal_zzzt_zza); } static long zzJ(long j) { return zzzq.zzn(ByteBuffer.allocate(8).putLong(j).array()); } static boolean zza(long j, long j2, long j3) { if (j2 >= 0 && j3 >= 0) { return j3 > 0 && zzzw.zzd(j, j3) < j2; } else { throw new IllegalArgumentException("negative values not supported: " + j2 + "/" + j3); } } static long zzd(String str, long j) { if (str == null || str.isEmpty()) { return zzJ(j); } byte[] bytes = str.getBytes(UTF_8); ByteBuffer allocate = ByteBuffer.allocate(bytes.length + 8); allocate.put(bytes); allocate.putLong(j); return zzzq.zzn(allocate.array()); } static zzb zzda(String str) { int i = 0; if (str == null) { return null; } String str2 = FirebaseRemoteConfig.DEFAULT_VALUE_FOR_STRING; int indexOf = str.indexOf(44); if (indexOf >= 0) { str2 = str.substring(0, indexOf); i = indexOf + 1; } int indexOf2 = str.indexOf(47, i); if (indexOf2 <= 0) { str2 = "LogSamplerImpl"; String str3 = "Failed to parse the rule: "; String valueOf = String.valueOf(str); Log.e(str2, valueOf.length() != 0 ? str3.concat(valueOf) : new String(str3)); return null; } try { long parseLong = Long.parseLong(str.substring(i, indexOf2)); long parseLong2 = Long.parseLong(str.substring(indexOf2 + 1)); if (parseLong >= 0 && parseLong2 >= 0) { return new zzb(str2, parseLong, parseLong2); } Log.e("LogSamplerImpl", "negative values not supported: " + parseLong + "/" + parseLong2); return null; } catch (Throwable e) { Throwable th = e; str3 = "LogSamplerImpl"; String str4 = "parseLong() failed while parsing: "; valueOf = String.valueOf(str); Log.e(str3, valueOf.length() != 0 ? str4.concat(valueOf) : new String(str4), th); return null; } } public boolean zzh(String str, int i) { if (str == null || str.isEmpty()) { str = i >= 0 ? String.valueOf(i) : null; } if (str == null) { return true; } long zzuW = this.zzaxV.zzuW(); zzb zzda = zzda(this.zzaxV.zzdb(str)); return zzda != null ? zza(zzd(zzda.zzaxW, zzuW), zzda.zzaxX, zzda.zzaxY) : true; } }
[ "swasen@cisco.com" ]
swasen@cisco.com
6749a1d00db556d9275a03eb33002f2607f2cda0
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
/program_data/JavaProgramData/97/1740.java
9ba1cf90ee723bcff6812c1a5565a1da944853b7
[ "MIT" ]
permissive
qiuchili/ggnn_graph_classification
c2090fefe11f8bf650e734442eb96996a54dc112
291ff02404555511b94a4f477c6974ebd62dcf44
refs/heads/master
2021-10-18T14:54:26.154367
2018-10-21T23:34:14
2018-10-21T23:34:14
null
0
0
null
null
null
null
UTF-8
Java
false
false
691
java
package <missing>; public class GlobalMembers { public static int Main() { int m; int a; int b; int c; int d; int e; int f; m = Integer.parseInt(ConsoleInput.readToWhiteSpace(true)); a = m % 100; b = a % 50; c = b % 20; d = c % 10; e = d % 5; System.out.print((m - a) / 100); System.out.print('\n'); System.out.print((a - b) / 50); System.out.print('\n'); System.out.print((b - c) / 20); System.out.print('\n'); System.out.print((c - d) / 10); System.out.print('\n'); System.out.print((d - e) / 5); System.out.print('\n'); System.out.print(e); System.out.print("\n"); return 0; } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
3bf155113cd44f1e3b6f612bd0804969356c7dd4
1f41df92e620178cb35d82a686c5425ecc6c70b9
/src/main/java/org/springrain/lottery/web/BetTodayrechargerebateController.java
fe6bc1477817e80f1e72f0a1f21280b8f35ea45c
[]
no_license
a12791602/agent
9779ea7a896a9b50b7bda082a1374919beae037f
34501c6e04a27413e151123eb557fd3faf8394d3
refs/heads/master
2021-10-27T05:38:51.792135
2019-04-16T09:58:55
2019-04-16T09:58:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
8,343
java
package org.springrain.lottery.web; import java.io.File; import java.util.Arrays; import java.util.List; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.commons.lang3.StringUtils; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.ResponseBody; import org.springrain.frame.controller.BaseController; import org.springrain.frame.util.Finder; import org.springrain.frame.util.GlobalStatic; import org.springrain.frame.util.Page; import org.springrain.frame.util.ReturnDatas; import org.springrain.frame.util.property.MessageUtils; import org.springrain.lottery.entity.BetTodayrechargerebate; import org.springrain.lottery.service.IBetSubordinateRebateService; import org.springrain.lottery.service.IBetTodayrechargerebateService; /** * TODO 在此加入类描述 * @copyright {@link weicms.net} * @author springrain<Auto generate> * @version 2017-06-12 13:25:02 * @see org.springrain.lottery.web.BetTodayrechargerebate */ @Controller @RequestMapping(value="/bettodayrechargerebate") public class BetTodayrechargerebateController extends BaseController { @Resource private IBetTodayrechargerebateService betTodayrechargerebateService; @Resource private IBetSubordinateRebateService betSubordinateRebateService; private String listurl="/lottery/bettodayrechargerebate/bettodayrechargerebateList"; /** * 列表数据,调用listjson方法,保证和app端数据统一 * * @param request * @param model * @param betTodayrechargerebate * @return * @throws Exception */ @RequestMapping("/list") public String list(HttpServletRequest request, Model model,BetTodayrechargerebate betTodayrechargerebate) throws Exception { if("1".equals(request.getParameter("todayrechargerebate"))){ String id2 = request.getParameter("memberid2"); ReturnDatas returnObject = ReturnDatas.getSuccessReturnDatas(); // ==构造分页请求 Page page = newPage(request); page.setSort("desc"); page.setOrder("receivetime"); // ==执行分页查询 List<BetTodayrechargerebate> datas=betTodayrechargerebateService.findListDataByFinder(new Finder("select * from bet_todayrechargerebate where memberid2=:id2 ").setParam("id2", id2),page,BetTodayrechargerebate.class,betTodayrechargerebate); returnObject.setQueryBean(betTodayrechargerebate); returnObject.setPage(page); returnObject.setData(datas); model.addAttribute("id2", id2); model.addAttribute(GlobalStatic.returnDatas, returnObject); return "/lottery/bettodayrechargerebate/bettodayrechargerebateList2"; }else{ ReturnDatas returnObject = listjson(request, model, betTodayrechargerebate); model.addAttribute(GlobalStatic.returnDatas, returnObject); // Double rcrebate = betSubordinateRebateService.queryForObject(new Finder("select rebate from bet_subordinate_rebate where remark=:remark ").setParam("remark", "rc"), Double.class); // model.addAttribute("rcrebate", rcrebate); return listurl; } } /** * json数据,为APP提供数据 * * @param request * @param model * @param betTodayrechargerebate * @return * @throws Exception */ @RequestMapping("/list/json") public @ResponseBody ReturnDatas listjson(HttpServletRequest request, Model model,BetTodayrechargerebate betTodayrechargerebate) throws Exception{ ReturnDatas returnObject = ReturnDatas.getSuccessReturnDatas(); // ==构造分页请求 Page page = newPage(request); // ==执行分页查询 List<BetTodayrechargerebate> datas=betTodayrechargerebateService.findListDataByFinder(null,page,BetTodayrechargerebate.class,betTodayrechargerebate); returnObject.setQueryBean(betTodayrechargerebate); returnObject.setPage(page); returnObject.setData(datas); return returnObject; } @RequestMapping("/list/export") public void listexport(HttpServletRequest request,HttpServletResponse response, Model model,BetTodayrechargerebate betTodayrechargerebate) throws Exception{ // ==构造分页请求 Page page = newPage(request); File file = betTodayrechargerebateService.findDataExportExcel(null,listurl, page,BetTodayrechargerebate.class,betTodayrechargerebate); String fileName="betTodayrechargerebate"+GlobalStatic.excelext; downFile(response, file, fileName,true); return; } /** * 查看操作,调用APP端lookjson方法 */ @RequestMapping(value = "/look") public String look(Model model,HttpServletRequest request,HttpServletResponse response) throws Exception { ReturnDatas returnObject = lookjson(model, request, response); model.addAttribute(GlobalStatic.returnDatas, returnObject); return "/lottery/bettodayrechargerebate/bettodayrechargerebateLook"; } /** * 查看的Json格式数据,为APP端提供数据 */ @RequestMapping(value = "/look/json") public @ResponseBody ReturnDatas lookjson(Model model,HttpServletRequest request,HttpServletResponse response) throws Exception { ReturnDatas returnObject = ReturnDatas.getSuccessReturnDatas(); String strId=request.getParameter("id"); java.lang.Integer id=null; if(StringUtils.isNotBlank(strId)){ id= java.lang.Integer.valueOf(strId.trim()); BetTodayrechargerebate betTodayrechargerebate = betTodayrechargerebateService.findBetTodayrechargerebateById(id); returnObject.setData(betTodayrechargerebate); }else{ returnObject.setStatus(ReturnDatas.ERROR); } return returnObject; } /** * 新增/修改 操作吗,返回json格式数据 * */ @RequestMapping("/update") public @ResponseBody ReturnDatas saveorupdate(Model model,BetTodayrechargerebate betTodayrechargerebate,HttpServletRequest request,HttpServletResponse response) throws Exception{ ReturnDatas returnObject = ReturnDatas.getSuccessReturnDatas(); returnObject.setMessage(MessageUtils.UPDATE_SUCCESS); try { betTodayrechargerebateService.saveorupdate(betTodayrechargerebate); } catch (Exception e) { String errorMessage = e.getLocalizedMessage(); logger.error(errorMessage,e); returnObject.setStatus(ReturnDatas.ERROR); returnObject.setMessage(MessageUtils.UPDATE_ERROR); } return returnObject; } /** * 进入修改页面,APP端可以调用 lookjson 获取json格式数据 */ @RequestMapping(value = "/update/pre") public String updatepre(Model model,HttpServletRequest request,HttpServletResponse response) throws Exception{ ReturnDatas returnObject = lookjson(model, request, response); model.addAttribute(GlobalStatic.returnDatas, returnObject); return "/lottery/bettodayrechargerebate/bettodayrechargerebateCru"; } /** * 删除操作 */ @RequestMapping(value="/delete") public @ResponseBody ReturnDatas delete(HttpServletRequest request) throws Exception { // 执行删除 try { String strId=request.getParameter("id"); java.lang.Integer id=null; if(StringUtils.isNotBlank(strId)){ id= java.lang.Integer.valueOf(strId.trim()); betTodayrechargerebateService.deleteById(id,BetTodayrechargerebate.class); return new ReturnDatas(ReturnDatas.SUCCESS, MessageUtils.DELETE_SUCCESS); } else { return new ReturnDatas(ReturnDatas.WARNING, MessageUtils.DELETE_WARNING); } } catch (Exception e) { logger.error(e.getMessage(), e); } return new ReturnDatas(ReturnDatas.WARNING, MessageUtils.DELETE_WARNING); } /** * 删除多条记录 * */ @RequestMapping("/delete/more") public @ResponseBody ReturnDatas deleteMore(HttpServletRequest request, Model model) { String records = request.getParameter("records"); if(StringUtils.isBlank(records)){ return new ReturnDatas(ReturnDatas.ERROR, MessageUtils.DELETE_ALL_FAIL); } String[] rs = records.split(","); if (rs == null || rs.length < 1) { return new ReturnDatas(ReturnDatas.ERROR, MessageUtils.DELETE_NULL_FAIL); } try { List<String> ids = Arrays.asList(rs); betTodayrechargerebateService.deleteByIds(ids,BetTodayrechargerebate.class); } catch (Exception e) { return new ReturnDatas(ReturnDatas.ERROR, MessageUtils.DELETE_ALL_FAIL); } return new ReturnDatas(ReturnDatas.SUCCESS, MessageUtils.DELETE_ALL_SUCCESS); } }
[ "446577004@qq.com" ]
446577004@qq.com
ea9b4741b21a52b32969f36ce3d1eb33c5c2b802
3735a07d455d7b40613c3c4160aa8b1cb1b3472a
/platform/bootstrap/src/com/intellij/util/lang/ZipResourceFile.java
cd850b354dcb2334ac8b58e68b35666379ad8d3c
[ "Apache-2.0" ]
permissive
caofanCPU/intellij-community
ede9417fc4ccb4b5efefb099906e4abe6871f3b4
5ad3e2bdf3c83d86e7c4396f5671929768d76999
refs/heads/master
2023-02-27T21:38:33.416107
2021-02-05T06:37:40
2021-02-05T06:37:40
321,209,485
1
0
Apache-2.0
2021-02-05T06:37:41
2020-12-14T02:22:32
null
UTF-8
Java
false
false
7,520
java
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.util.lang; import com.intellij.util.io.Murmur3_32Hash; import com.intellij.util.zip.ImmutableZipEntry; import com.intellij.util.zip.ImmutableZipFile; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.io.ByteArrayInputStream; import java.io.IOException; import java.io.InputStream; import java.io.UncheckedIOException; import java.net.MalformedURLException; import java.net.URL; import java.net.URLConnection; import java.net.URLStreamHandler; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.nio.IntBuffer; import java.nio.file.Path; import java.util.function.BiConsumer; import java.util.function.Predicate; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.Manifest; @SuppressWarnings("SuspiciousPackagePrivateAccess") public final class ZipResourceFile implements ResourceFile { private static final int MANIFEST_HASH_CODE = Murmur3_32Hash.MURMUR3_32.hashString(JarFile.MANIFEST_NAME, 0, JarFile.MANIFEST_NAME.length()); private final ImmutableZipFile zipFile; public ZipResourceFile(@NotNull Path file) { try { zipFile = ImmutableZipFile.load(file, buffer -> { buffer.order(ByteOrder.LITTLE_ENDIAN); buffer.getInt(); }); } catch (IOException e) { throw new UncheckedIOException(e); } } @Override public void processResources(@NotNull String dir, @NotNull Predicate<? super String> nameFilter, @NotNull BiConsumer<? super String, ? super InputStream> consumer) throws IOException { int minNameLength = dir.length() + 2; for (ImmutableZipEntry entry : zipFile.getEntries()) { String name = entry.getName(); if (name.length() >= minNameLength && name.startsWith(dir) && name.charAt(dir.length()) == '/' && nameFilter.test(name)) { try (InputStream stream = entry.getInputStream(zipFile)) { consumer.accept(name, stream); } } } } @Override public @Nullable Attributes loadManifestAttributes() throws IOException { ImmutableZipEntry entry = zipFile.getEntry(JarFile.MANIFEST_NAME, MANIFEST_HASH_CODE); if (entry != null) { return new Manifest(new ByteArrayInputStream(entry.getData(zipFile))).getMainAttributes(); } return null; } @Override public @NotNull ClasspathCache.IndexRegistrar buildClassPathCacheData() throws IOException { // name hash is not added - doesn't make sense as fast lookup by name is supported by ImmutableZipFile ImmutableZipEntry packageIndex = zipFile.getEntry("__packageIndex__"); if (packageIndex == null) { return computePackageIndex(); } ByteBuffer buffer = packageIndex.getByteBuffer(zipFile); buffer.order(ByteOrder.LITTLE_ENDIAN); int[] classPackages = new int[buffer.getInt()]; int[] resourcePackages = new int[buffer.getInt()]; IntBuffer intBuffer = buffer.asIntBuffer(); intBuffer.get(classPackages); intBuffer.get(resourcePackages); return (classMap, resourceMap, loader) -> { ClasspathCache.addResourceEntries(classPackages, classMap, loader); ClasspathCache.addResourceEntries(resourcePackages, resourceMap, loader); }; } @NotNull private ClasspathCache.LoaderDataBuilder computePackageIndex() { ClasspathCache.LoaderDataBuilder builder = new ClasspathCache.LoaderDataBuilder(false); for (ImmutableZipEntry entry : zipFile.getRawNameSet()) { if (entry == null) { continue; } String name = entry.getName(); if (name.endsWith(ClassPath.CLASS_EXTENSION)) { builder.addClassPackageFromName(name); } else { builder.addResourcePackageFromName(name); } } return builder; } @Override public @Nullable Class<?> findClass(String fileName, String className, JarLoader jarLoader, ClassPath.ClassDataConsumer classConsumer) throws IOException { ImmutableZipEntry entry = zipFile.getEntry(fileName); if (entry == null) { return null; } if (classConsumer.isByteBufferSupported(className, null)) { ByteBuffer buffer = entry.getByteBuffer(zipFile); try { return classConsumer.consumeClassData(className, buffer, jarLoader, null); } finally { entry.releaseBuffer(buffer); } } else { return classConsumer.consumeClassData(className, entry.getData(zipFile), jarLoader, null); } } @Override public @Nullable Resource getResource(@NotNull String name, @NotNull JarLoader jarLoader) throws IOException { ImmutableZipEntry entry = zipFile.getEntry(name); if (entry == null) { return null; } return new ZipFileResource(jarLoader.url, entry, zipFile); } private static final class ZipFileResource implements Resource { private final URL baseUrl; private URL url; private final ImmutableZipEntry entry; private final ImmutableZipFile file; private ZipFileResource(@NotNull URL baseUrl, @NotNull ImmutableZipEntry entry, @NotNull ImmutableZipFile file) { this.baseUrl = baseUrl; this.entry = entry; this.file = file; } @Override public String toString() { return "ZipFileResource(name=" + entry.getName() + ", file=" + file + ')'; } @Override public @NotNull URL getURL() { URL result = url; if (result == null) { try { result = new URL(baseUrl, entry.getName(), new MyURLStreamHandler(entry, file)); } catch (MalformedURLException e) { throw new RuntimeException(e); } url = result; } return result; } @Override public @NotNull InputStream getInputStream() throws IOException { return entry.getInputStream(file); } @Override public byte @NotNull [] getBytes() throws IOException { return entry.getData(file); } } private static final class MyURLStreamHandler extends URLStreamHandler { private @NotNull final ImmutableZipEntry entry; private @NotNull final ImmutableZipFile file; private MyURLStreamHandler(@NotNull ImmutableZipEntry entry, @NotNull ImmutableZipFile file) { this.entry = entry; this.file = file; } @Override protected URLConnection openConnection(URL url) { return new MyURLConnection(url, entry, file); } } private static final class MyURLConnection extends URLConnection { private final ImmutableZipEntry entry; private final ImmutableZipFile file; private byte[] data; MyURLConnection(@NotNull URL url, @NotNull ImmutableZipEntry entry, @NotNull ImmutableZipFile file) { super(url); this.entry = entry; this.file = file; } private byte[] getData() throws IOException { byte[] result = data; if (result == null) { result = entry.getData(file); data = result; } return result; } @Override public void connect() throws IOException { } @Override public Object getContent() throws IOException { return getData(); } @Override public InputStream getInputStream() throws IOException { return entry.getInputStream(file); } @Override public int getContentLength() { return entry.getUncompressedSize(); } } }
[ "intellij-monorepo-bot-no-reply@jetbrains.com" ]
intellij-monorepo-bot-no-reply@jetbrains.com
475f7709ce9a34cd20895499183166595e4c1663
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/defpackage/awt.java
bb0c4786a8c0d9916a43bef8985f123c2537aa74
[ "BSD-3-Clause" ]
permissive
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
318
java
package defpackage; import android.graphics.Bitmap; /* renamed from: awt reason: default package */ /* compiled from: IQRScanService */ public interface awt extends esc { Bitmap a(String str, int i); String a(Bitmap bitmap); void a(String str); String b(Bitmap bitmap); void b(String str); }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
4196773a51840b924c78e9fcaf4937ae8e6feb7a
ea4b2e14a0d00d8dd03dd5a69ff56da1e693dcd4
/Java-Examples-WORKSPACE/jenkovjavaexamples/src/com/nestedclasses/Demo_3_AnonymousClass.java
d59294f12d3ee20afe457479ff266bba54e9c914
[]
no_license
umeshkilkile/java
c69aa244a3f62988cee94337b1b47581a35d1764
0879eecf56faae8842bcde7aebccb42b52c6d189
refs/heads/master
2020-04-09T22:36:28.326660
2019-01-04T11:02:49
2019-01-04T11:02:49
160,633,177
0
0
null
null
null
null
UTF-8
Java
false
false
536
java
package com.nestedclasses; /* * Anonymous Classes - Anonymous classes in Java are nested classes without a class name. - They are typically declared as either subclasses of an existing class, or as implementations of some interface. - Anonymous classes are defined when they are instantiated. */ public class Demo_3_AnonymousClass { public static void main(String[] args) { SuperClass instance = new SuperClass() { public void doIt() { System.out.println("Anonymous class doIt()"); } }; instance.doIt(); } }
[ "umeshsubhash.kilkile@lowes.com" ]
umeshsubhash.kilkile@lowes.com
f4ffe58f9d99698bcb83f8af631a9d8a793fb36b
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/143/988/CWE789_Uncontrolled_Mem_Alloc__PropertiesFile_HashSet_09.java
5cfecf5fdd21f1de8ed152e817e0b1f205610408
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
5,362
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE789_Uncontrolled_Mem_Alloc__PropertiesFile_HashSet_09.java Label Definition File: CWE789_Uncontrolled_Mem_Alloc.int.label.xml Template File: sources-sink-09.tmpl.java */ /* * @description * CWE: 789 Uncontrolled Memory Allocation * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded non-zero, non-min, non-max, even number * BadSink: HashSet Create a HashSet using data as the initial size * Flow Variant: 09 Control flow: if(IO.STATIC_FINAL_TRUE) and if(IO.STATIC_FINAL_FALSE) * * */ import java.util.Properties; import java.io.FileInputStream; import java.io.IOException; import java.util.logging.Level; import java.util.HashSet; public class CWE789_Uncontrolled_Mem_Alloc__PropertiesFile_HashSet_09 extends AbstractTestCase { /* uses badsource and badsink */ public void bad() throws Throwable { int data; if (IO.STATIC_FINAL_TRUE) { data = Integer.MIN_VALUE; /* Initialize data */ /* retrieve the property */ { Properties properties = new Properties(); FileInputStream streamFileInput = null; try { streamFileInput = new FileInputStream("../common/config.properties"); properties.load(streamFileInput); /* POTENTIAL FLAW: Read data from a .properties file */ String stringNumber = properties.getProperty("data"); if (stringNumber != null) // avoid NPD incidental warnings { try { data = Integer.parseInt(stringNumber.trim()); } catch(NumberFormatException exceptNumberFormat) { IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat); } } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error with stream reading", exceptIO); } finally { /* Close stream reading object */ try { if (streamFileInput != null) { streamFileInput.close(); } } catch (IOException exceptIO) { IO.logger.log(Level.WARNING, "Error closing FileInputStream", exceptIO); } } } } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } /* POTENTIAL FLAW: Create a HashSet using data as the initial size. data may be very large, creating memory issues */ HashSet intHashSet = new HashSet(data); } /* goodG2B1() - use goodsource and badsink by changing IO.STATIC_FINAL_TRUE to IO.STATIC_FINAL_FALSE */ private void goodG2B1() throws Throwable { int data; if (IO.STATIC_FINAL_FALSE) { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } else { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } /* POTENTIAL FLAW: Create a HashSet using data as the initial size. data may be very large, creating memory issues */ HashSet intHashSet = new HashSet(data); } /* goodG2B2() - use goodsource and badsink by reversing statements in if */ private void goodG2B2() throws Throwable { int data; if (IO.STATIC_FINAL_TRUE) { /* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */ data = 2; } else { /* INCIDENTAL: CWE 561 Dead Code, the code below will never run * but ensure data is inititialized before the Sink to avoid compiler errors */ data = 0; } /* POTENTIAL FLAW: Create a HashSet using data as the initial size. data may be very large, creating memory issues */ HashSet intHashSet = new HashSet(data); } public void good() throws Throwable { goodG2B1(); goodG2B2(); } /* Below is the main(). It is only used when building this testcase on * its own for testing or for building a binary to use in testing binary * analysis tools. It is not used when compiling all the testcases as one * application, which is how source code analysis tools are tested. */ public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException { mainFromParent(args); } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
383660631ade2b64ff0e1ec2f447d571ca50b835
ad9d57a23e4029428b511c34ee505338fe9ebee4
/src/main/java/org/spongepowered/asm/mixin/transformer/MixinPreProcessorAccessor.java
b53f24ff2b52c57eb8b1f7f5ad48a1428f976396
[]
no_license
yunusborazan/Notorious-0.6
550435b5f4dfd3c4b8e79b0c7dd7c0e7c4a35c0c
8cc051b75986cae29fe540c2b021a34102df8842
refs/heads/main
2023-07-29T05:01:50.544957
2021-09-08T21:11:21
2021-09-08T21:11:21
null
0
0
null
null
null
null
UTF-8
Java
false
false
386
java
package org.spongepowered.asm.mixin.transformer; import org.spongepowered.asm.mixin.transformer.MixinInfo; import org.spongepowered.asm.mixin.transformer.MixinPreProcessorInterface; class MixinPreProcessorAccessor extends MixinPreProcessorInterface { public MixinPreProcessorAccessor(MixinInfo mixin, MixinInfo.MixinClassNode classNode) { super(mixin, classNode); } }
[ "jhonsberger12@gmail.com" ]
jhonsberger12@gmail.com
732e2a9fb4541ade71c4cdaf03c3bb1ec7ed3e05
dd0f0f563f4f8796a6167537b940ae12c5cb3a90
/genlab.graphstream/src/genlab/graphstream/algos/measure/ColoringWelshPowell.java
bdc9bc49f15b1a8e64c50610f3f3e79d24768c12
[]
no_license
margaritis/genlab
93be8c9be9dc70166867eb0efe0d5f122a13dd0f
90b8f84576d1e264a75e9cec09f9359ec6527534
refs/heads/master
2021-01-15T12:54:24.288087
2013-11-19T16:41:43
2013-11-19T16:41:43
16,492,672
1
0
null
null
null
null
UTF-8
Java
false
false
2,770
java
package genlab.graphstream.algos.measure; import java.util.HashMap; import java.util.Map; import org.graphstream.algorithm.coloring.WelshPowell; import org.graphstream.graph.Graph; import genlab.core.exec.IContainerTask; import genlab.core.exec.IExecution; import genlab.core.model.exec.IAlgoExecution; import genlab.core.model.exec.IComputationProgress; import genlab.core.model.instance.AlgoInstance; import genlab.core.model.meta.IInputOutput; import genlab.core.model.meta.basics.flowtypes.GraphInOut; import genlab.core.model.meta.basics.flowtypes.IntegerInOut; import genlab.core.model.meta.basics.graphs.AbstractGraphstreamBasedGraph; import genlab.core.model.meta.basics.graphs.IGenlabGraph; import genlab.core.parameters.StringParameter; import genlab.core.usermachineinteraction.ListOfMessages; public class ColoringWelshPowell extends AbstractGraphStreamMeasure { public static final GraphInOut OUTPUT_GRAPH = new GraphInOut( "out_graph", "graph", "colored graph" ); public static final IntegerInOut OUTPUT_COLORS_COUNT = new IntegerInOut( "out_count", "count", "count of colors" ); public static final StringParameter PARAM_ATTRIBUTE_NAME = new StringParameter( "param_attribute", "attribute name", "vertex attribute to use for color", "color" ); public ColoringWelshPowell() { super("coloring Welsh-Powell (graphstream)", "Welsh-Powell algorithm for the problem of graph coloring"); outputs.add(OUTPUT_GRAPH); outputs.add(OUTPUT_COLORS_COUNT); registerParameter(PARAM_ATTRIBUTE_NAME); } @Override public IAlgoExecution createExec(IExecution execution, AlgoInstance algoInstance) { return new AbstractGraphstreamMeasureExecution(execution, algoInstance) { @Override public long getTimeout() { // TODO Auto-generated method stub return 1000; } @Override protected Map<IInputOutput<?>, Object> analyzeGraph( IComputationProgress progress, Graph gsGraph, IGenlabGraph genlabGraph, ListOfMessages messages) { Map<IInputOutput<?>, Object> res = new HashMap<IInputOutput<?>, Object>(5); IGenlabGraph outGraph = genlabGraph.clone("dup"); String attributeId = (String)algoInst.getValueForParameter(PARAM_ATTRIBUTE_NAME.getId()); if (isUsed(OUTPUT_GRAPH) || exec.getExecutionForced()) { outGraph.declareVertexAttribute(attributeId, Integer.class); } Graph outGSgraph = ((AbstractGraphstreamBasedGraph)outGraph)._getInternalGraphstreamGraph(); WelshPowell wp = new WelshPowell(attributeId); wp.init(outGSgraph); wp.compute(); res.put(OUTPUT_COLORS_COUNT, wp.getChromaticNumber()); res.put(OUTPUT_GRAPH, outGraph); return res; } }; } }
[ "samuel.thiriot.accounts@res-ear.ch" ]
samuel.thiriot.accounts@res-ear.ch
fa71ba0a0f7b03aa2913f55aa6bfa81650be460b
c4f0c0e9fe5f656686f63b41d0af38b02120e735
/trade-sharding-core/src/main/java/com/midea/trade/sharding/core/timetracker/TrackerExecutor.java
c143cec0f044ca7b64db4fe3f4a533404068e5f1
[]
no_license
chenjy16/xudansharding
8bd77595d3368127571d5fbe520244204391a6f4
61d11e2ea010ba3daa05cba8849071181bc4a8cb
refs/heads/master
2021-07-10T22:32:58.447890
2016-11-09T11:59:06
2016-11-09T11:59:06
59,795,406
1
0
null
null
null
null
UTF-8
Java
false
false
2,261
java
package com.midea.trade.sharding.core.timetracker; import com.midea.trade.sharding.core.context.StatementContext.BatchItem; import com.midea.trade.sharding.core.timetracker.handler.TrackPointHandler; /** * 耗时监控执行器 */ public final class TrackerExecutor { private static final ThreadLocal<String> tableNameLocal = new ThreadLocal<String>(); private static final ThreadLocal<String> sqlLocal = new ThreadLocal<String>(); public static final void trackBegin(final TrackPoint trackPoint) { trackBegin(trackPoint, null, null); } public static final void trackBegin(final TrackPoint trackPoint, final String sql) { trackBegin(trackPoint, null, sql); } public static final void trackBegin(final TrackPoint trackPoint, final BatchItem batchItem) { trackBegin(trackPoint, batchItem, null); } public static final void trackBegin(final TrackPoint trackPoint, final BatchItem batchItem, final String sql) { TimeMeter.getContext().begin(trackPoint); if(sql!=null){ sqlLocal.set(sql); } if(batchItem==null){ return; }else if(batchItem.getAnalyzeResult()==null){ return; }else if(batchItem.getAnalyzeResult().getTableInfos()==null){ return; } tableNameLocal.set(batchItem.getAnalyzeResult().getTableInfos().iterator().next().getName()); } public static final void trackEnd(final TrackPoint trackPoint) { long costTime = TimeMeter.getContext().getTimeSpan(trackPoint); String tableName = tableNameLocal.get(); String sql = sqlLocal.get(); TrackerHodler trackerHodler = getTrackerHodler(trackPoint, tableName); TrackPointHandler.handle(trackPoint, trackerHodler, tableName, sql, costTime); } private static TrackerHodler getTrackerHodler(final TrackPoint trackPoint, final String tableName){ TrackerHodler trackerHodler = null; trackerHodler = Tracker.getTableTracker(tableName, trackPoint); // 如果没有table对应的 Tracker 就返回全局的 Tracker if(trackerHodler == null){ trackerHodler = Tracker.getTracker(trackPoint); } return trackerHodler; } public static final void trackRelease() { TimeMeter.release(); tableNameLocal.set(null); sqlLocal.set(null); } }
[ "326800567@qq.com" ]
326800567@qq.com
130c53207f8729c1f666fdb25622588944b02da9
d60e287543a95a20350c2caeabafbec517cabe75
/LACCPlus/HBase/7230_1.java
2fbb225276b03025e8da3d21aac68d15b59d2e33
[ "MIT" ]
permissive
sgholamian/log-aware-clone-detection
242067df2db6fd056f8d917cfbc143615c558b2c
9993cb081c420413c231d1807bfff342c39aa69a
refs/heads/main
2023-07-20T09:32:19.757643
2021-08-27T15:02:50
2021-08-27T15:02:50
337,837,827
0
0
null
null
null
null
UTF-8
Java
false
false
781
java
//,temp,THBaseService.java,5389,5402,temp,THBaseService.java,5130,5143 //,2 public class xxx { public void onComplete(java.lang.Boolean o) { checkAndDelete_result result = new checkAndDelete_result(); result.success = o; result.setSuccessIsSet(true); try { fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid); } catch (org.apache.thrift.transport.TTransportException e) { _LOGGER.error("TTransportException writing to internal frame buffer", e); fb.close(); } catch (java.lang.Exception e) { _LOGGER.error("Exception writing to internal frame buffer", e); onError(e); } } };
[ "sgholami@uwaterloo.ca" ]
sgholami@uwaterloo.ca
8b3805c414c35634a5ed266819db4918842af282
09f4ba36dc3e8e8dc2e0f9c640b1231ca9313b3b
/inno72-alarm-service/src/main/java/com/inno72/service/CommonService.java
3fd4b3cb1dd97ceb62cfbd4577ffd56166cb1a0f
[]
no_license
pologood/inno72-front
2cd16ce24253c091e4cf3524bf0b1a6303441128
e2257b14fe5a80ec376f6a4682a289954adf7091
refs/heads/master
2020-05-25T16:39:52.554389
2019-03-29T09:06:20
2019-03-29T09:06:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
173
java
package com.inno72.service; import com.inno72.common.Result; import com.inno72.vo.RespCommonVo; public interface CommonService { Result<RespCommonVo> queryInitParam(); }
[ "546657868@qq.com" ]
546657868@qq.com
b992c72f7e02d338a6a8ed2eaf26a79bf3bd93dd
a64010cfd9b18dbf6e30455f6b6401d37423d03c
/src/test/java/fr/quatrevieux/araknemu/game/fight/ending/reward/drop/SynchronizeLifeTest.java
2c815ea276a79413dcc392d746f8e5f2b60e0e1a
[]
no_license
OrionGoultard/Araknemu
db6fe44d1c28d4c0633c2ef6f335eb843377d798
0b7fcf24bd0c64bee6e633136ba33c4a67da3662
refs/heads/master
2020-07-06T14:06:28.566113
2019-08-15T19:16:15
2019-08-15T19:16:15
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,824
java
package fr.quatrevieux.araknemu.game.fight.ending.reward.drop; import fr.quatrevieux.araknemu.game.fight.Fight; import fr.quatrevieux.araknemu.game.fight.FightBaseCase; import fr.quatrevieux.araknemu.game.fight.ending.reward.RewardType; import fr.quatrevieux.araknemu.game.fight.ending.reward.drop.action.SynchronizeLife; import fr.quatrevieux.araknemu.game.fight.fighter.monster.MonsterFighter; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import java.util.Collections; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertTrue; class SynchronizeLifeTest extends FightBaseCase { private SynchronizeLife action; private Fight fight; @Override @BeforeEach public void setUp() throws Exception { super.setUp(); action = new SynchronizeLife(); fight = createPvmFight(); fight.nextState(); } @Test void applyOnPlayer() { player.fighter().life().alter(player.fighter(), -100); DropReward reward = new DropReward(RewardType.WINNER, player.fighter(), Collections.emptyList()); action.apply(reward, player.fighter()); assertEquals(195, player.properties().life().current()); } @Test void applyOnPlayerFullLife() { DropReward reward = new DropReward(RewardType.WINNER, player.fighter(), Collections.emptyList()); action.apply(reward, player.fighter()); assertTrue(player.properties().life().isFull()); } @Test void applyOnMonster() { MonsterFighter fighter = (MonsterFighter) fight.team(1).fighters().stream().findFirst().get(); DropReward reward = new DropReward(RewardType.WINNER, fighter, Collections.emptyList()); action.apply(reward, fighter); } }
[ "quatrevieux.vincent@gmail.com" ]
quatrevieux.vincent@gmail.com
6314cb10d30334cf74f81e0ec3e0c8364186b6b1
4476cf883d6cde3ad86cdc600595ff33e88d81a9
/estatioapp/app/src/main/java/org/estatio/app/mixins/budgetassignment/Budget_DownloadCalculations.java
ba0c6182322701fc5aeea3f1e807b6ecbcf27554
[ "Apache-2.0" ]
permissive
jhtpm/estatio
a415ea962a29d63f304310448b48b1f34c648caf
2f8620f63622190c31f4ba5568063e9ef6f33eac
refs/heads/master
2021-01-11T14:01:29.547317
2017-06-20T09:01:44
2017-06-20T09:01:44
94,929,218
0
1
null
null
null
null
UTF-8
Java
false
false
1,652
java
package org.estatio.app.mixins.budgetassignment; import javax.inject.Inject; import org.apache.isis.applib.annotation.Action; import org.apache.isis.applib.annotation.ActionLayout; import org.apache.isis.applib.annotation.Mixin; import org.apache.isis.applib.annotation.SemanticsOf; import org.apache.isis.applib.value.Blob; import org.isisaddons.module.excel.dom.ExcelService; import org.isisaddons.module.excel.dom.WorksheetContent; import org.isisaddons.module.excel.dom.WorksheetSpec; import org.estatio.dom.budgetassignment.BudgetAssignmentService; import org.estatio.dom.budgetassignment.calculationresult.BudgetCalculationRunRepository; import org.estatio.dom.budgetassignment.viewmodels.CalculationResultViewModel; import org.estatio.dom.budgeting.budget.Budget; @Mixin public class Budget_DownloadCalculations { private final Budget budget; public Budget_DownloadCalculations(Budget budget){ this.budget = budget; } @Action(semantics = SemanticsOf.SAFE) @ActionLayout(cssClassFa = "fa-download") public Blob downloadCalculations() { final String fileName = budget.title() + ".xlsx"; WorksheetSpec spec = new WorksheetSpec(CalculationResultViewModel.class, "values"); WorksheetContent worksheetContent = new WorksheetContent(budgetAssignmentService.getCalculationResults(budget), spec); return excelService.toExcelPivot(worksheetContent, fileName); } @Inject private BudgetCalculationRunRepository budgetCalculationRunRepository; @Inject private BudgetAssignmentService budgetAssignmentService; @Inject private ExcelService excelService; }
[ "johan@filternet.nl" ]
johan@filternet.nl
f763cbfbc8d7f58ae0f609467975f97c115acd18
387bb7a32f73bfd34f30813ecbc07bd3cc69ac89
/app/src/main/java/com/zh/metermanagementcw/view/linkagerecyclerview/RvListener.java
c5ef15c9908572cecae670d53d74a542fb2925fd
[]
no_license
haihuishen/MeterManagementCW
58a5be24b896b3d30f7e93ac9d4e76a23f135de1
eaac83254640e13c9a4345c8a3a3aee6adfbfb21
refs/heads/master
2021-01-21T12:20:28.091830
2017-10-24T02:31:14
2017-10-24T02:31:14
102,066,482
0
0
null
null
null
null
UTF-8
Java
false
false
431
java
package com.zh.metermanagementcw.view.linkagerecyclerview; /** * 接口 -- RecyclerView的item点击事件(将点击事件暴露给子类) */ public interface RvListener { /** * RecyclerView的item点击事件(将点击事件暴露给子类) * * @param id 被点击的控件的id * @param position 被点击的item的下标 */ void onItemClick(int id, int position); }
[ "987775154@qq.com" ]
987775154@qq.com
08462a4f382262484db7337e863645221bd4723b
f0ec508f4b480d8d5399a2880e4cbb0533fc2fc1
/com.gzedu.xlims.third/src/main/java/com/gzedu/xlims/third/eechat/util/EEIMHttpClientUtil.java
3609f65b5189e3c879ae3a156034f4d32cb1089c
[]
no_license
lizm335/MyLizm
a327bd4d08a33c79e9b6ef97144d63dae7114a52
1bcca82395b54d431fb26817e61a294f9d7dd867
refs/heads/master
2020-03-11T17:25:25.687426
2018-04-19T03:10:28
2018-04-19T03:10:28
130,146,458
3
0
null
null
null
null
UTF-8
Java
false
false
2,687
java
/** * Copyright(c) 2013 版权所有:广州远程教育中心 www.969300.com */ package com.gzedu.xlims.third.eechat.util; import org.apache.commons.httpclient.DefaultHttpMethodRetryHandler; import org.apache.commons.httpclient.HttpClient; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.commons.httpclient.methods.PostMethod; import org.apache.commons.httpclient.params.HttpMethodParams; /** * 功能说明: * * @author 李明 liming@eenet.com * @Date 2016年8月17日 * @version 2.5 * */ public class EEIMHttpClientUtil { public static String doHttpGet(String url, String data) { String responseMsg = ""; HttpClient httpClient = new HttpClient(); httpClient.getParams().setContentCharset("UTF-8"); url = url + "?data=" + data; GetMethod getMethod = new GetMethod(url); getMethod.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, new DefaultHttpMethodRetryHandler()); try { httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(3000); int num = httpClient.executeMethod(getMethod); if (num == 200) { byte[] responseBody = getMethod.getResponseBodyAsString().getBytes("GBK"); responseMsg = new String(responseBody); } } catch (Exception e) { e.printStackTrace(); } finally { getMethod.releaseConnection(); } return responseMsg; } public static String doHttpPost(String url, String data) { String responseMsg = ""; HttpClient httpClient = new HttpClient(); httpClient.getParams().setContentCharset("UTF-8"); PostMethod postMethod = new PostMethod(url); postMethod.addParameter("data", data); try { httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(3000); int num = httpClient.executeMethod(postMethod); if (num == 200) { responseMsg = postMethod.getResponseBodyAsString().trim(); } } catch (Exception e) { e.printStackTrace(); } finally { postMethod.releaseConnection(); } return responseMsg; } public static String doHttpPostNew(String url, String data) { String responseMsg = ""; HttpClient httpClient = new HttpClient(); httpClient.getParams().setContentCharset("UTF-8"); PostMethod postMethod = new PostMethod(url); postMethod.addParameter("data", data); postMethod.setRequestHeader("Referer", "http://eechat.tt.gzedu.com"); try { httpClient.getHttpConnectionManager().getParams().setConnectionTimeout(3000); int num = httpClient.executeMethod(postMethod); if (num == 200) { responseMsg = postMethod.getResponseBodyAsString().trim(); } } catch (Exception e) { e.printStackTrace(); } finally { postMethod.releaseConnection(); } return responseMsg; } }
[ "lizengming@eenet.com" ]
lizengming@eenet.com
04102feb2de838ab06f1d6ef7cc2ea6a0d961a57
f443adebbf5f1c9a11a20d5def51639dd89a3362
/常用项目/ecotourism/ecotourism-supplier/src/main/java/com/ecotourism/supplier/device/domain/CarEquipmentDO.java
1347e94f32e6036dc4884d6010804dd75b6b3943
[]
no_license
yaozhili1997/repo1
6f8dc2d260d7e762817438e51e3191ca56a590e1
41ff2f9d869561c05474d00c6cf31533a9b650b4
refs/heads/master
2022-12-23T09:11:58.739090
2020-02-22T12:51:31
2020-02-22T12:51:33
242,442,154
1
0
null
2022-12-16T04:25:33
2020-02-23T02:13:50
JavaScript
UTF-8
Java
false
false
8,629
java
package com.ecotourism.supplier.device.domain; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** * 设备表 * * @author 陈启勇 * @email chqy_ljy@163.com * @date 2018-07-09 19:17:58 */ public class CarEquipmentDO implements Serializable { private static final long serialVersionUID = 1L; //id private Integer id; //设备编码 private String deviceNo; //设备名称 private String deviceName; //设备mac地址 private String deviceMac; //景点编号 private String spotNo; //是否可用 private Integer enable; //创建时间 private Date createTime; //更新时间 private Date updateTime; //创建人 private String createUser; //修改人 private String updateUser; // private String deviceMacEncrypt; //分销商编号 private String distributionNo; //模板id private String templateNo; //设备编号 private String equipmentNumber; //设备类型 private String deviceType; //欢迎乘坐 private String welcomeText; //贵港5号 private String transitNo; //基础票价 private BigDecimal basePrice; //车牌号 private String carNo; //请刷卡 private String prompt; //心跳时间 private Date heartbeatTime; // private String longitude; // private String latitude; //基础信息 private String baseText; //所属线路 private String subordinateLine; //公司编号 private String companyNo; //车辆编号 private String vehicleNumber; //剩余纸张数 private Integer leavePaper; //购票开关 0表示关,1表示开 private String gouP; //取票开关 0表示关 1表示开 private String quP; // private String passworldU; //总纸张数 private Integer totalPaper; //取票模板 private String getTicketTemplate; /** * 设置:id */ public void setId(Integer id) { this.id = id; } /** * 获取:id */ public Integer getId() { return id; } /** * 设置:设备编码 */ public void setDeviceNo(String deviceNo) { this.deviceNo = deviceNo; } /** * 获取:设备编码 */ public String getDeviceNo() { return deviceNo; } /** * 设置:设备名称 */ public void setDeviceName(String deviceName) { this.deviceName = deviceName; } /** * 获取:设备名称 */ public String getDeviceName() { return deviceName; } /** * 设置:设备mac地址 */ public void setDeviceMac(String deviceMac) { this.deviceMac = deviceMac; } /** * 获取:设备mac地址 */ public String getDeviceMac() { return deviceMac; } /** * 设置:景点编号 */ public void setSpotNo(String spotNo) { this.spotNo = spotNo; } /** * 获取:景点编号 */ public String getSpotNo() { return spotNo; } /** * 设置:是否可用 */ public void setEnable(Integer enable) { this.enable = enable; } /** * 获取:是否可用 */ public Integer getEnable() { return enable; } /** * 设置:创建时间 */ public void setCreateTime(Date createTime) { this.createTime = createTime; } /** * 获取:创建时间 */ public Date getCreateTime() { return createTime; } /** * 设置:更新时间 */ public void setUpdateTime(Date updateTime) { this.updateTime = updateTime; } /** * 获取:更新时间 */ public Date getUpdateTime() { return updateTime; } /** * 设置:创建人 */ public void setCreateUser(String createUser) { this.createUser = createUser; } /** * 获取:创建人 */ public String getCreateUser() { return createUser; } /** * 设置:修改人 */ public void setUpdateUser(String updateUser) { this.updateUser = updateUser; } /** * 获取:修改人 */ public String getUpdateUser() { return updateUser; } /** * 设置: */ public void setDeviceMacEncrypt(String deviceMacEncrypt) { this.deviceMacEncrypt = deviceMacEncrypt; } /** * 获取: */ public String getDeviceMacEncrypt() { return deviceMacEncrypt; } /** * 设置:分销商编号 */ public void setDistributionNo(String distributionNo) { this.distributionNo = distributionNo; } /** * 获取:分销商编号 */ public String getDistributionNo() { return distributionNo; } /** * 设置:模板id */ public void setTemplateNo(String templateNo) { this.templateNo = templateNo; } /** * 获取:模板id */ public String getTemplateNo() { return templateNo; } /** * 设置:设备编号 */ public void setEquipmentNumber(String equipmentNumber) { this.equipmentNumber = equipmentNumber; } /** * 获取:设备编号 */ public String getEquipmentNumber() { return equipmentNumber; } /** * 设置:设备类型 */ public void setDeviceType(String deviceType) { this.deviceType = deviceType; } /** * 获取:设备类型 */ public String getDeviceType() { return deviceType; } /** * 设置:欢迎乘坐 */ public void setWelcomeText(String welcomeText) { this.welcomeText = welcomeText; } /** * 获取:欢迎乘坐 */ public String getWelcomeText() { return welcomeText; } /** * 设置:贵港5号 */ public void setTransitNo(String transitNo) { this.transitNo = transitNo; } /** * 获取:贵港5号 */ public String getTransitNo() { return transitNo; } /** * 设置:基础票价 */ public void setBasePrice(BigDecimal basePrice) { this.basePrice = basePrice; } /** * 获取:基础票价 */ public BigDecimal getBasePrice() { return basePrice; } /** * 设置:车牌号 */ public void setCarNo(String carNo) { this.carNo = carNo; } /** * 获取:车牌号 */ public String getCarNo() { return carNo; } /** * 设置:请刷卡 */ public void setPrompt(String prompt) { this.prompt = prompt; } /** * 获取:请刷卡 */ public String getPrompt() { return prompt; } /** * 设置:心跳时间 */ public void setHeartbeatTime(Date heartbeatTime) { this.heartbeatTime = heartbeatTime; } /** * 获取:心跳时间 */ public Date getHeartbeatTime() { return heartbeatTime; } /** * 设置: */ public void setLongitude(String longitude) { this.longitude = longitude; } /** * 获取: */ public String getLongitude() { return longitude; } /** * 设置: */ public void setLatitude(String latitude) { this.latitude = latitude; } /** * 获取: */ public String getLatitude() { return latitude; } /** * 设置:基础信息 */ public void setBaseText(String baseText) { this.baseText = baseText; } /** * 获取:基础信息 */ public String getBaseText() { return baseText; } /** * 设置:所属线路 */ public void setSubordinateLine(String subordinateLine) { this.subordinateLine = subordinateLine; } /** * 获取:所属线路 */ public String getSubordinateLine() { return subordinateLine; } /** * 设置:公司编号 */ public void setCompanyNo(String companyNo) { this.companyNo = companyNo; } /** * 获取:公司编号 */ public String getCompanyNo() { return companyNo; } /** * 设置:车辆编号 */ public void setVehicleNumber(String vehicleNumber) { this.vehicleNumber = vehicleNumber; } /** * 获取:车辆编号 */ public String getVehicleNumber() { return vehicleNumber; } /** * 设置:剩余纸张数 */ public void setLeavePaper(Integer leavePaper) { this.leavePaper = leavePaper; } /** * 获取:剩余纸张数 */ public Integer getLeavePaper() { return leavePaper; } /** * 设置:购票开关 0表示关,1表示开 */ public void setGouP(String gouP) { this.gouP = gouP; } /** * 获取:购票开关 0表示关,1表示开 */ public String getGouP() { return gouP; } /** * 设置:取票开关 0表示关 1表示开 */ public void setQuP(String quP) { this.quP = quP; } /** * 获取:取票开关 0表示关 1表示开 */ public String getQuP() { return quP; } /** * 设置: */ public void setPassworldU(String passworldU) { this.passworldU = passworldU; } /** * 获取: */ public String getPassworldU() { return passworldU; } /** * 设置:总纸张数 */ public void setTotalPaper(Integer totalPaper) { this.totalPaper = totalPaper; } /** * 获取:总纸张数 */ public Integer getTotalPaper() { return totalPaper; } /** * 设置:取票模板 */ public void setGetTicketTemplate(String getTicketTemplate) { this.getTicketTemplate = getTicketTemplate; } /** * 获取:取票模板 */ public String getGetTicketTemplate() { return getTicketTemplate; } }
[ "1144946637@qq.com" ]
1144946637@qq.com
fb95f6af793e007f0d425fb3192a4dac7dd7c53d
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XRENDERING-422-18-5-Single_Objective_GGA-WeightedSum/org/xwiki/rendering/wikimodel/xhtml/filter/XHTMLWhitespaceXMLFilter_ESTest.java
bc20c2d92cc0c584f91524423959d3807fd8bb6e
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
597
java
/* * This file was automatically generated by EvoSuite * Tue Mar 31 19:40:33 UTC 2020 */ package org.xwiki.rendering.wikimodel.xhtml.filter; import org.junit.Test; import static org.junit.Assert.*; import org.evosuite.runtime.EvoRunner; import org.evosuite.runtime.EvoRunnerParameters; import org.junit.runner.RunWith; @RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true) public class XHTMLWhitespaceXMLFilter_ESTest extends XHTMLWhitespaceXMLFilter_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
ec21802da48dbdc8a972c34dc04f0d61dcbd5e2d
a00326c0e2fc8944112589cd2ad638b278f058b9
/src/main/java/000/127/512/CWE134_Uncontrolled_Format_String__PropertiesFile_format_51b.java
41cc374c069a864fba409ea6e98eeeb5720ac5ec
[]
no_license
Lanhbao/Static-Testing-for-Juliet-Test-Suite
6fd3f62713be7a084260eafa9ab221b1b9833be6
b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68
refs/heads/master
2020-08-24T13:34:04.004149
2019-10-25T09:26:00
2019-10-25T09:26:00
216,822,684
0
1
null
2019-11-08T09:51:54
2019-10-22T13:37:13
Java
UTF-8
Java
false
false
1,524
java
/* TEMPLATE GENERATED TESTCASE FILE Filename: CWE134_Uncontrolled_Format_String__PropertiesFile_format_51b.java Label Definition File: CWE134_Uncontrolled_Format_String.label.xml Template File: sources-sinks-51b.tmpl.java */ /* * @description * CWE: 134 Uncontrolled Format String * BadSource: PropertiesFile Read data from a .properties file (in property named data) * GoodSource: A hardcoded string * Sinks: format * GoodSink: dynamic formatted stdout with string defined * BadSink : dynamic formatted stdout without validation * Flow Variant: 51 Data flow: data passed as an argument from one function to another in different classes in the same package * * */ public class CWE134_Uncontrolled_Format_String__PropertiesFile_format_51b { public void badSink(String data ) throws Throwable { if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.format(data); } } /* goodG2B() - use goodsource and badsink */ public void goodG2BSink(String data ) throws Throwable { if (data != null) { /* POTENTIAL FLAW: uncontrolled string formatting */ System.out.format(data); } } /* goodB2G() - use badsource and goodsink */ public void goodB2GSink(String data ) throws Throwable { if (data != null) { /* FIX: explicitly defined string formatting */ System.out.format("%s%n", data); } } }
[ "anhtluet12@gmail.com" ]
anhtluet12@gmail.com
655198bb606d0d8dda1c5994efe0e8851f909d42
e0327701479b58ee984307704da5096c0a019dc1
/sitewhere-microservice/src/main/java/com/sitewhere/spi/microservice/kafka/IKafkaTopicNaming.java
db4db6339de1a6bd1d71222c44d5007f9dfed12f
[]
no_license
ATM006/sitewhere-microservice-core
27101f3707df3e878d0cac58a316905d0f2b08f6
9a91290cd8650535352daf081d616603b92af30c
refs/heads/master
2022-12-10T05:04:24.367839
2020-08-26T19:47:45
2020-08-26T19:47:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,073
java
/* * Copyright (c) SiteWhere, LLC. All rights reserved. http://www.sitewhere.com * * The software in this package is published under the terms of the CPAL v1.0 * license, a copy of which has been included with this distribution in the * LICENSE.txt file. */ package com.sitewhere.spi.microservice.kafka; import io.sitewhere.k8s.crd.tenant.SiteWhereTenant; /** * Provides names for Kafka topics used in SiteWhere. */ public interface IKafkaTopicNaming { /** * Get prefix that uniquely identifies SiteWhere instance. * * @return */ String getInstancePrefix(); /** * Get prefix used for global topics. * * @return */ String getGlobalPrefix(); /** * Get prefix used for tenant-specific topics. * * @param tenant * @return */ String getTenantPrefix(SiteWhereTenant tenant); /** * Get topic name for tracking tenant model updates. * * @return */ String getTenantUpdatesTopic(); /** * Get topic name for tracking microservice state updates. * * @return */ String getMicroserviceStateUpdatesTopic(); /** * Get topic name for tracking instance topology updates. * * @return */ String getInstanceTopologyUpdatesTopic(); /** * Get topic for log aggregation across all microservices. * * @return */ String getInstanceLoggingTopic(); /** * Get name for topic that contains events that have been decoded from inbound * event sources. * * @param tenant * @return */ String getEventSourceDecodedEventsTopic(SiteWhereTenant tenant); /** * Get name for topic that contains events that could not be decoded from event * sources. * * @param tenant * @return */ String getEventSourceFailedDecodeTopic(SiteWhereTenant tenant); /** * Get topic for inbound events that have been validated by inbound processing * logic. * * @param tenant * @return */ String getInboundEventsTopic(SiteWhereTenant tenant); /** * Get topic for inbound events that were sent for out-of-band processing, then * returned to be reprocessed. * * @param tenant * @return */ String getInboundReprocessEventsTopic(SiteWhereTenant tenant); /** * Get name for topic that contains events for device registration requests * decoded by event sources. * * @param tenant * @return */ String getDeviceRegistrationEventsTopic(SiteWhereTenant tenant); /** * Get name for topic that contains events for devices that were not registered * in the system. * * @param tenant * @return */ String getUnregisteredDeviceEventsTopic(SiteWhereTenant tenant); /** * Get topic for events that have been persisted and enriched with * device/assignment data. * * @param tenant * @return */ String getOutboundEventsTopic(SiteWhereTenant tenant); /** * Get topic for device command invocations that have been persisted and * enriched with device/assignment data. * * @param tenant * @return */ String getOutboundCommandInvocationsTopic(SiteWhereTenant tenant); /** * Get topic for device command invocations that could not be delievered. * * @param tenant * @return */ String getUndeliveredCommandInvocationsTopic(SiteWhereTenant tenant); /** * Get topic for unprocessed batch operations. * * @param tenant * @return */ String getUnprocessedBatchOperationsTopic(SiteWhereTenant tenant); /** * Get topic for unprocessed batch elements. * * @param tenant * @return */ String getUnprocessedBatchElementsTopic(SiteWhereTenant tenant); /** * Get topic for failed batch elements. * * @param tenant * @return */ String getFailedBatchElementsTopic(SiteWhereTenant tenant); }
[ "derek.adams@sitewhere.com" ]
derek.adams@sitewhere.com
d496f9effa5b7b40c3314f7266fe3bda70fcbb00
6baf1fe00541560788e78de5244ae17a7a2b375a
/hollywood/com.oculus.updater-OSUpdater/sources/com/facebook/secure/trustedapp/TrustedApp.java
82de515093e59e6b458eb080fc18ba8e86f6d019
[]
no_license
phwd/quest-tracker
286e605644fc05f00f4904e51f73d77444a78003
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
refs/heads/main
2023-03-29T20:33:10.959529
2021-04-10T22:14:11
2021-04-10T22:14:11
357,185,040
4
2
null
2021-04-12T12:28:09
2021-04-12T12:28:08
null
UTF-8
Java
false
false
4,438
java
package com.facebook.secure.trustedapp; import android.annotation.SuppressLint; import android.annotation.TargetApi; import android.content.Context; import android.os.Build; import android.text.TextUtils; import com.facebook.ultralight.UL; import java.util.Arrays; import java.util.Collections; import java.util.Map; import java.util.Objects; import java.util.Set; import javax.annotation.Nullable; @SuppressLint({"CatchGeneralException", "DeprecatedMethod", "TodoWithoutTask"}) public class TrustedApp { private final Map<AppSignatureHash, Set<String>> mTrustedPackages; private final Set<AppSignatureHash> mTrustedSignatures; @Deprecated public static AppIdentity getAppIdentity(int i, Context context) { String[] packageNamesFromUid = AppVerifier.getPackageNamesFromUid(context, i); return new AppIdentity(i, Collections.unmodifiableList(Arrays.asList(packageNamesFromUid)), AppVerifier.getSignatureHashFromPackageNames(context, packageNamesFromUid), null, null); } @Deprecated public boolean isAppIdentityTrusted(int i, Context context) { return isAppIdentityTrusted(getAppIdentity(i, context), context); } @Deprecated public boolean isAppIdentityTrusted(@Nullable AppIdentity appIdentity, Context context) { return isAppIdentityTrusted(appIdentity, AppVerifier.verifySignedWithDebugKey(context)); } /* access modifiers changed from: protected */ public boolean isAppIdentityTrusted(@Nullable AppIdentity appIdentity, boolean z) { AppSignatureHash signatureHash; if (appIdentity == null || appIdentity.getSignatureHash() == null || (signatureHash = appIdentity.getSignatureHash()) == null) { return false; } for (AppSignatureHash appSignatureHash : this.mTrustedSignatures) { if (appIdentitySignatureMatch(signatureHash, appSignatureHash, z)) { return true; } } for (AppSignatureHash appSignatureHash2 : this.mTrustedPackages.keySet()) { if (appIdentitySignatureMatch(signatureHash, appSignatureHash2, z)) { for (String str : appIdentity.getPackageNames()) { if (this.mTrustedPackages.get(appSignatureHash2).contains(str)) { return true; } } continue; } } return false; } private static boolean appIdentitySignatureMatch(AppSignatureHash appSignatureHash, AppSignatureHash appSignatureHash2, boolean z) { if (appSignatureHash.equals(appSignatureHash2)) { return true; } if (!z || !AllFamilyTrustedSignatures.getDebugAppSignatureHashes(appSignatureHash2).contains(appSignatureHash)) { return false; } return true; } public boolean mightMatchTrustedAppScope(String str) { if (TextUtils.isEmpty(str) || !this.mTrustedSignatures.isEmpty()) { return true; } for (Set<String> set : this.mTrustedPackages.values()) { if (set.contains(str)) { return true; } } return false; } public boolean equals(Object obj) { boolean z; boolean z2; if (obj == this) { return true; } if (!(obj instanceof TrustedApp)) { return false; } TrustedApp trustedApp = (TrustedApp) obj; Set<AppSignatureHash> set = trustedApp.mTrustedSignatures; if (set != null) { z = set.equals(this.mTrustedSignatures); } else { z = this.mTrustedSignatures == null; } Map<AppSignatureHash, Set<String>> map = trustedApp.mTrustedPackages; if (map != null) { z2 = map.equals(this.mTrustedPackages); } else { z2 = this.mTrustedPackages == null; } if (!z || !z2) { return false; } return true; } @SuppressLint({"ObjectsUse"}) @TargetApi(UL.id._UL__ULSEP_com_oculus_updater_core_monitors_SystemUpdatePolicyMonitor_ULSEP_BINDING_ID) public int hashCode() { if (Build.VERSION.SDK_INT > 18) { return Objects.hash(this.mTrustedSignatures, this.mTrustedPackages); } return Arrays.hashCode(Arrays.asList(this.mTrustedSignatures, this.mTrustedPackages).toArray(new Object[0])); } }
[ "cyuubiapps@gmail.com" ]
cyuubiapps@gmail.com
099461559748f0f9492f45cc825c67d2951225d3
4319d3a9a72f295376845eae267805198421417c
/20191124-2/src/com/user/User.java
420df3fcd9bddf57a58a90b0885e2dd98a861c52
[]
no_license
Lemonsj/testsjj
29e1e60a0365923a22557b7fa852b4947d6d6860
4e9944b6d5d29293a3691bd974303e4edd14e925
refs/heads/master
2022-11-27T15:48:15.759663
2021-04-16T15:47:45
2021-04-16T15:47:45
222,240,828
0
0
null
2022-11-16T08:36:48
2019-11-17T11:56:58
Java
UTF-8
Java
false
false
440
java
package com.user; import com.book.BookList; import com.operation.IOperation; public abstract class User { public String name; //IOperation-->实现了这个接口的类都可以存放进去 public IOperation[] operations; // 根据用户选项执行操作 public void doOperation(int choice, BookList bookList) { operations[choice].work(bookList); //对象 . } public abstract int menu(); }
[ "1480845939@qq.com" ]
1480845939@qq.com
bd40e27100cc6d87afaefc02d8551c3dc4ae9ea5
6b4cdc6e5c461ed4ab0490de5a0e7e66a6a7d26f
/OpaAPI/src/main/java/gov/nara/opa/api/services/impl/annotation/comments/CommentsHelper.java
b7b01e3215a42dbea45b1235200e9af63a59dbc8
[ "CC0-1.0", "LicenseRef-scancode-public-domain" ]
permissive
usnationalarchives/catalog-source
c281dd2963cc204313202c7d9bc2b4e5a942f089
74187b9096a388c033ff1f5ca4ec6634b5bba69e
refs/heads/master
2022-12-23T10:25:40.725697
2018-10-01T14:34:56
2018-10-01T14:34:56
151,100,359
5
0
NOASSERTION
2022-12-16T01:33:10
2018-10-01T14:15:31
Java
UTF-8
Java
false
false
1,358
java
package gov.nara.opa.api.services.impl.annotation.comments; import gov.nara.opa.api.dataaccess.user.UserAccountDao; import gov.nara.opa.api.security.OPAAuthenticationProvider; import gov.nara.opa.common.valueobject.annotation.comments.CommentValueObject; import gov.nara.opa.common.valueobject.user.accounts.UserAccountValueObject; import java.sql.Timestamp; import java.util.Date; import org.apache.commons.codec.digest.DigestUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @Component public class CommentsHelper { @Autowired private UserAccountDao userAccountDao; public CommentValueObject createCommentForInsert(Integer accountId, String naId, String objectId, String text, Integer pageNum) { CommentValueObject comment = new CommentValueObject(); comment.setAccountId(accountId); comment.setAnnotation(text); comment.setAnnotationMD5(DigestUtils.md5Hex(text)); comment.setAnnotationTS(new Timestamp(new Date().getTime())); comment.setNaId(naId); comment.setObjectId(objectId); comment.setStatus(true); comment.setPageNum(pageNum); return comment; } public UserAccountValueObject getSessionUserAccount() { Integer accountId = OPAAuthenticationProvider .getAccountIdForLoggedInUser(); return userAccountDao.selectByAccountId(accountId); } }
[ "jason.clingerman@nara.gov" ]
jason.clingerman@nara.gov
f3928b4e6920582d7286bb1081649a66f36ee45e
542dc2cfb8a45a60dc60363eeb92b549ab3bc4e5
/trunk/Server/StorageComponent/src/eu/aladdin_project/storagecomponent/impl/UpdateAdministratorDocumentImpl.java
214e41891372f1a47a3ecb0d64af17a667124f46
[]
no_license
BackupTheBerlios/aladdin-svn
f2b77f97c0a2b05b2fe5fc3b2bd3868adf41af05
431fc966e5f1f5e605e7f88648e134312d89f12d
refs/heads/master
2021-01-01T16:12:49.680795
2011-11-28T13:30:27
2011-11-28T13:30:27
40,671,933
0
0
null
null
null
null
UTF-8
Java
false
false
7,753
java
/* * An XML document type. * Localname: UpdateAdministrator * Namespace: http://aladdin-project.eu/StorageComponent/ * Java type: eu.aladdin_project.storagecomponent.UpdateAdministratorDocument * * Automatically generated - do not modify. */ package eu.aladdin_project.storagecomponent.impl; /** * A document containing one UpdateAdministrator(@http://aladdin-project.eu/StorageComponent/) element. * * This is a complex type. */ public class UpdateAdministratorDocumentImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements eu.aladdin_project.storagecomponent.UpdateAdministratorDocument { public UpdateAdministratorDocumentImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName UPDATEADMINISTRATOR$0 = new javax.xml.namespace.QName("http://aladdin-project.eu/StorageComponent/", "UpdateAdministrator"); /** * Gets the "UpdateAdministrator" element */ public eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator getUpdateAdministrator() { synchronized (monitor()) { check_orphaned(); eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator target = null; target = (eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator)get_store().find_element_user(UPDATEADMINISTRATOR$0, 0); if (target == null) { return null; } return target; } } /** * Sets the "UpdateAdministrator" element */ public void setUpdateAdministrator(eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator updateAdministrator) { synchronized (monitor()) { check_orphaned(); eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator target = null; target = (eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator)get_store().find_element_user(UPDATEADMINISTRATOR$0, 0); if (target == null) { target = (eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator)get_store().add_element_user(UPDATEADMINISTRATOR$0); } target.set(updateAdministrator); } } /** * Appends and returns a new empty "UpdateAdministrator" element */ public eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator addNewUpdateAdministrator() { synchronized (monitor()) { check_orphaned(); eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator target = null; target = (eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator)get_store().add_element_user(UPDATEADMINISTRATOR$0); return target; } } /** * An XML UpdateAdministrator(@http://aladdin-project.eu/StorageComponent/). * * This is a complex type. */ public static class UpdateAdministratorImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements eu.aladdin_project.storagecomponent.UpdateAdministratorDocument.UpdateAdministrator { public UpdateAdministratorImpl(org.apache.xmlbeans.SchemaType sType) { super(sType); } private static final javax.xml.namespace.QName DATA$0 = new javax.xml.namespace.QName("", "data"); private static final javax.xml.namespace.QName USERID$2 = new javax.xml.namespace.QName("", "userId"); /** * Gets the "data" element */ public eu.aladdin_project.xsd.Administrator getData() { synchronized (monitor()) { check_orphaned(); eu.aladdin_project.xsd.Administrator target = null; target = (eu.aladdin_project.xsd.Administrator)get_store().find_element_user(DATA$0, 0); if (target == null) { return null; } return target; } } /** * Sets the "data" element */ public void setData(eu.aladdin_project.xsd.Administrator data) { synchronized (monitor()) { check_orphaned(); eu.aladdin_project.xsd.Administrator target = null; target = (eu.aladdin_project.xsd.Administrator)get_store().find_element_user(DATA$0, 0); if (target == null) { target = (eu.aladdin_project.xsd.Administrator)get_store().add_element_user(DATA$0); } target.set(data); } } /** * Appends and returns a new empty "data" element */ public eu.aladdin_project.xsd.Administrator addNewData() { synchronized (monitor()) { check_orphaned(); eu.aladdin_project.xsd.Administrator target = null; target = (eu.aladdin_project.xsd.Administrator)get_store().add_element_user(DATA$0); return target; } } /** * Gets the "userId" element */ public java.lang.String getUserId() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERID$2, 0); if (target == null) { return null; } return target.getStringValue(); } } /** * Gets (as xml) the "userId" element */ public org.apache.xmlbeans.XmlString xgetUserId() { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(USERID$2, 0); return target; } } /** * Sets the "userId" element */ public void setUserId(java.lang.String userId) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(USERID$2, 0); if (target == null) { target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(USERID$2); } target.setStringValue(userId); } } /** * Sets (as xml) the "userId" element */ public void xsetUserId(org.apache.xmlbeans.XmlString userId) { synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.XmlString target = null; target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(USERID$2, 0); if (target == null) { target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(USERID$2); } target.set(userId); } } } }
[ "ababoshin@459d45aa-ea84-0410-b58b-f86611838273" ]
ababoshin@459d45aa-ea84-0410-b58b-f86611838273
9b22900fede6b6afe9697c949840ae68952a5506
dea92fc41db6a97d8cb32b266c399edd3a61989f
/source/org.strategoxt.imp.spoofax.generator/src-gen/org/strategoxt/imp/spoofax/generator/chain_$Descriptor$P$P$Table_0_0.java
7271a78161f83a09d2459e67ffaad8a24156f9aa
[]
no_license
adilakhter/spoofaxlang
19170765e690477a79069e05fd473f521d1d1ddc
27515280879cc108a3cf2108df00760b6d39e15e
refs/heads/master
2020-03-17T01:15:18.833754
2015-01-22T07:12:05
2015-01-22T07:12:05
133,145,594
1
0
null
null
null
null
UTF-8
Java
false
false
2,026
java
package org.strategoxt.imp.spoofax.generator; import org.strategoxt.stratego_lib.*; import org.strategoxt.stratego_lib.*; import org.strategoxt.stratego_sglr.*; import org.strategoxt.stratego_gpp.*; import org.strategoxt.stratego_xtc.*; import org.strategoxt.stratego_aterm.*; import org.strategoxt.stratego_rtg.*; import org.strategoxt.stratego_sdf.*; import org.strategoxt.stratego_tool_doc.*; import org.strategoxt.java_front.*; import org.strategoxt.lang.*; import org.spoofax.interpreter.terms.*; import static org.strategoxt.lang.Term.*; import org.spoofax.interpreter.library.AbstractPrimitive; import java.util.ArrayList; import java.lang.ref.WeakReference; @SuppressWarnings("all") public class chain_$Descriptor$P$P$Table_0_0 extends Strategy { public static chain_$Descriptor$P$P$Table_0_0 instance = new chain_$Descriptor$P$P$Table_0_0(); @Override public IStrategoTerm invoke(Context context, IStrategoTerm term) { ITermFactory termFactory = context.getFactory(); context.push("chain_DescriptorPPTable_0_0"); Fail27102: { IStrategoTerm d_4430 = null; IStrategoTerm f_4430 = null; f_4430 = term; Success11012: { Fail27103: { IStrategoTerm g_4430 = null; IStrategoTerm i_4430 = null; IStrategoTerm j_4430 = null; i_4430 = term; g_4430 = generator.const7124; j_4430 = i_4430; term = dr_lookup_rule_0_2.instance.invoke(context, j_4430, g_4430, generator.constCons4561); if(term == null) break Fail27103; if(true) break Success11012; } term = generator.constNil7; } d_4430 = term; term = f_4430; term = termFactory.makeTuple(d_4430, term); term = foldl_1_0.instance.invoke(context, term, lifted10045.instance); if(term == null) break Fail27102; context.popOnSuccess(); if(true) return term; } context.popOnFailure(); return null; } }
[ "md.adilakhter@gmail.com" ]
md.adilakhter@gmail.com
874df44c774d8cf8121ba1638cf8d1603aeb2b28
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/8/8_c56c66db7c8ab04c739028629612f55a42fdc662/FetchArtTask/8_c56c66db7c8ab04c739028629612f55a42fdc662_FetchArtTask_t.java
27e1b0a5efe7679b8a88a22c76d485be5363d220
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
4,341
java
/* * Copyright 2011 Uwe Trottmann * * 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.battlelancer.seriesguide.util; import android.content.Context; import android.graphics.Bitmap; import android.os.AsyncTask; import android.text.TextUtils; import android.view.View; import android.view.animation.AnimationUtils; import android.widget.ImageView; import com.battlelancer.thetvdbapi.TheTVDB; import com.uwetrottmann.seriesguide.R; public class FetchArtTask extends AsyncTask<Void, Void, Bitmap> { private String mImagePath; private ImageView mImageView; private Context mContext; private View mProgressContainer; private View mContainer; public FetchArtTask(String path, View container, Context context) { mImagePath = path; mContainer = container; mContext = context; } @Override protected void onPreExecute() { // immediately hide container if there is no image, cancel the task if (TextUtils.isEmpty(mImagePath)) { mContainer.setVisibility(View.GONE); cancel(false); return; } mContainer.setVisibility(View.VISIBLE); mImageView = (ImageView) mContainer.findViewById(R.id.ImageViewEpisodeImage); mProgressContainer = mContainer.findViewById(R.id.image_progress_container); if (mImageView == null || mProgressContainer == null) { cancel(true); } } @Override protected Bitmap doInBackground(Void... params) { if (isCancelled()) { return null; } final Bitmap bitmap = ImageProvider.getInstance(mContext).getImage(mImagePath, false); if (bitmap != null) { // image is in cache return bitmap; } else { // abort if we are cancelled or have no connection if (isCancelled() || !Utils.isAllowedConnection(mContext)) { return null; } // download image from TVDb publishProgress(); if (TheTVDB.fetchArt(mImagePath, false, mContext)) { return ImageProvider.getInstance(mContext).getImage(mImagePath, false); } } return null; } @Override protected void onCancelled() { releaseReferences(); } @Override protected void onProgressUpdate(Void... values) { if (mImageView != null && mProgressContainer != null) { // this will only get called if we have to download the image mProgressContainer.setVisibility(View.VISIBLE); mImageView.setVisibility(View.GONE); } } @Override protected void onPostExecute(Bitmap bitmap) { if (bitmap != null) { mImageView.setImageBitmap(bitmap); } else { // we can be sure that there must be an image here, we just couldn't // get it somehow, so set a place holder mImageView.setImageResource(R.drawable.show_generic); } // make image view visible if (mImageView.getVisibility() == View.GONE) { mProgressContainer.startAnimation(AnimationUtils.loadAnimation(mContext, android.R.anim.fade_out)); mImageView.startAnimation(AnimationUtils .loadAnimation(mContext, android.R.anim.fade_in)); mProgressContainer.setVisibility(View.GONE); mImageView.setVisibility(View.VISIBLE); } releaseReferences(); } private void releaseReferences() { mContext = null; mContainer = null; mProgressContainer = null; mImageView = null; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
8617f09349b171c81ed8bbdc6be2f352a94d212e
4c09637e52c3c53a896a351c6e59dd1ad938b5b3
/DepartmentProject/src/main/java/com/fpt/soft/controller/DepartmentController.java
9ed657a973630b41e4baed01bef7e9739efbec5f
[]
no_license
huyhue/PROJECTS-WEB
20f9e3da9ef09a0565aedb97030d4003ae234103
cadbcb6cb81aa719bc697de9e1f054ca639d84e4
refs/heads/main
2023-05-14T17:21:43.694583
2021-06-04T14:23:14
2021-06-04T14:23:14
358,826,288
0
0
null
null
null
null
UTF-8
Java
false
false
6,159
java
package com.fpt.soft.controller; import java.util.List; import java.util.Optional; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Page; import org.springframework.data.repository.query.Param; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.ui.ModelMap; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.fpt.soft.form.DepartmentForm; import com.fpt.soft.model.Address; import com.fpt.soft.model.Attachments; import com.fpt.soft.model.Department; import com.fpt.soft.model.Images; import com.fpt.soft.service.AddressService; import com.fpt.soft.service.AttachmentsService; import com.fpt.soft.service.DepartmentService; import com.fpt.soft.service.ImagesService; @Controller public class DepartmentController { @Autowired private DepartmentService departmentService; @Autowired private ImagesService imagesService; @Autowired private AttachmentsService attachmentsService; @Autowired private AddressService addressService; @GetMapping("/user") public String listForUser(Model model) { List<Department> list= departmentService.findAll(); model.addAttribute("list", list); return "user/list"; } @GetMapping("/calendar/{id}") public String calendar(ModelMap model, @PathVariable(name = "id") Integer id) { Optional<Department> optDepart = departmentService.findById(id); if (optDepart.isPresent()) { model.addAttribute("department", optDepart.get()); } model.addAttribute("listImage", optDepart.get().getImages()); model.addAttribute("listFile", optDepart.get().getImages()); return "user/calendar"; } @GetMapping("/") public String viewHomePage(Model model) { return findPaginated(1, "name", "asc", model, null); } @GetMapping("/showEdit/{id}") public String showEdit(@PathVariable(value = "id") int id, Model model) { Optional<Department> optDepart = departmentService.findById(id); if (optDepart.isPresent()) { model.addAttribute("department", optDepart.get()); } List<Images> listImage = imagesService.findImagesByDepartmentId(optDepart.get().getId()); List<Attachments> listFile = attachmentsService.findAttachmentsByDepartmentId(optDepart.get().getId()); model.addAttribute("listImage", listImage); model.addAttribute("listFile", listFile); return "edit"; } @PostMapping("/update") public String update(@Validated @ModelAttribute("department") Department df,@RequestParam("radioName") String radio, BindingResult bindingResult) { if (bindingResult.hasErrors()) { return "inforManager"; } System.out.println("Radio name: "+radio); if (radio.equals("option1")) { System.out.println("Radio name true: "); List<Images> list = imagesService.findImagesByDepartmentId(df.getId()); imagesService.deleteAll(list); } departmentService.updateDepartment(df); return "redirect:/"; } @GetMapping("/register") public String showNewForm(@ModelAttribute("department") DepartmentForm df) { return "inforManager"; } @PostMapping("/save") public String save(@Validated @ModelAttribute("department") DepartmentForm df, BindingResult bindingResult) { if (bindingResult.hasErrors()) { return "inforManager"; } departmentService.register(df); imagesService.register(df); attachmentsService.register(df); return "redirect:/"; } @GetMapping("/delete/{id}") public String delete(@PathVariable(value = "id") int id) { this.departmentService.deleteById(id); return "redirect:/"; } @RequestMapping(value="/searchAddress", method=RequestMethod.POST) public @ResponseBody Address search(@RequestParam String newSearch, ModelMap model) { Optional<Address> ad = addressService.findById(Integer.parseInt(newSearch)); Address result = ad.get(); System.out.println("Name "+result.getName()); model.addAttribute("ok", result.getName()); return result; } @GetMapping("/find") public String find(ModelMap model, @RequestParam(defaultValue = "") String name) { List<Department> list = departmentService.findByNameLikeOrderByName(name); model.addAttribute("list", list); return "departments"; } @GetMapping("/detail/{id}") public String edit(ModelMap model, @PathVariable(name = "id") Integer id) { Optional<Department> optDepart = departmentService.findById(id); if (optDepart.isPresent()) { model.addAttribute("depart", optDepart.get()); } List<Images> listImage = imagesService.findImagesByDepartmentId(optDepart.get().getId()); List<Attachments> listFile = attachmentsService.findAttachmentsByDepartmentId(optDepart.get().getId()); model.addAttribute("listImage", optDepart.get().getImages()); model.addAttribute("listFile", listFile); return "detail"; } @GetMapping("/page/{pageNo}") public String findPaginated(@PathVariable(value = "pageNo") int pageNo, @RequestParam("sortField") String sortField, @RequestParam("sortDir") String sortDir, Model model, @Param("keyword") String keyword) { int pageSize = 5; Page<Department> page = departmentService.findPaginated(pageNo, pageSize, sortField, sortDir, keyword); List<Department> list = page.getContent(); System.out.println("Keyword: " + keyword); model.addAttribute("currentPage", pageNo); model.addAttribute("totalPages", page.getTotalPages()); model.addAttribute("totalItems", page.getTotalElements()); model.addAttribute("sortField", sortField); model.addAttribute("sortDir", sortDir); model.addAttribute("reverseSortDir", sortDir.equals("asc") ? "desc" : "asc"); model.addAttribute("list", list); return "departments"; } }
[ "tpgiahuy5@gmail.com" ]
tpgiahuy5@gmail.com
2d0618c3268178e332c434bf3b26acba03addd1d
e3c38acaa9105863d6181afa68c15ef61122bc56
/src/org/jsoup/parser/TokeniserState$31.java
cc863e0c90fde4674fca641ddd3a0a2c5b05bcec
[]
no_license
Neio/iMessageChatDecompile
2d3349d848c25478e2bbbbaaf15006e9566b2f26
f0b32c44a6e7ba6bb6952adf73fa8529b70db59c
refs/heads/master
2021-01-18T06:52:36.066331
2013-09-24T17:29:28
2013-09-24T17:29:28
null
0
0
null
null
null
null
UTF-8
Java
false
false
920
java
package org.jsoup.parser; enum TokeniserState$31 { TokeniserState$31() { super(str, 30, (byte)0); } final void a(Tokeniser paramTokeniser, CharacterReader paramCharacterReader) { char c = paramCharacterReader.d(); switch (c) { default: paramTokeniser.a(c); paramTokeniser.a(C); return; case '-': paramTokeniser.a(c); return; case '<': paramTokeniser.a(c); paramTokeniser.a(F); return; case '>': paramTokeniser.a(c); paramTokeniser.a(f); return; case '\000': paramTokeniser.c(this); paramTokeniser.a(65533); paramTokeniser.a(C); return; case '￿': } paramTokeniser.d(this); paramTokeniser.a(a); } } /* Location: /Users/mdp/Downloads/iMessage/classes-dex2jar.jar * Qualified Name: org.jsoup.parser.TokeniserState.31 * JD-Core Version: 0.6.2 */
[ "mdp@yahoo-inc.com" ]
mdp@yahoo-inc.com
51cbc2c8c5c3eaab53f4907f8ebce4dee54b9270
d82bd580ce97033443911febb66fb3d28077fa77
/core/src/libgdx/screens/game/service/keyboardletter/KeyboardLetterService.java
9fbbd87c5b3a91adbe9d33683f760c4fa66744ba
[]
no_license
horeab/LettGame_Android
3a97fbf59146c3c95b9a6d2f590515232f352c00
8cf775d635f92d2a10aebf5af5d38cb7cf68de07
refs/heads/master
2020-06-06T14:37:21.486154
2019-11-20T18:46:01
2019-11-20T18:46:04
192,766,266
0
0
null
null
null
null
UTF-8
Java
false
false
4,585
java
package libgdx.screens.game.service.keyboardletter; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.Input; import com.badlogic.gdx.scenes.scene2d.InputEvent; import com.badlogic.gdx.scenes.scene2d.Touchable; import java.util.HashMap; import java.util.Map; import libgdx.controls.button.MyButton; import libgdx.model.LetterButton; import libgdx.screens.game.service.letters.LettersToPressService; import libgdx.screens.game.service.extrabuttons.ExtraButtonsService; import libgdx.screens.game.service.submitanddelete.SubmitAndDeleteService; import libgdx.services.FinalWordContext; import libgdx.services.LettersGameService; public abstract class KeyboardLetterService { private Map<Integer, String> keysWithLetters = new HashMap<>(); private LettersGameService lettersGameService; private LettersToPressService lettersToPressService; private SubmitAndDeleteService submitAndDeleteService; private FinalWordContext finalWordContext; KeyboardLetterService(LettersToPressService lettersToPressService, ExtraButtonsService shuffleAndBackspaceService, SubmitAndDeleteService submitAndDeleteService, FinalWordContext finalWordContext) { prepareKeysWithLetters(); this.lettersToPressService = lettersToPressService; this.submitAndDeleteService = submitAndDeleteService; this.finalWordContext = finalWordContext; this.lettersGameService = new LettersGameService(finalWordContext.getTotalCrossWords(), finalWordContext.getTotalNrOfLetters()); } public void renderKeyPress() { for (Map.Entry<Integer, String> entry : keysWithLetters.entrySet()) { int index = 0; int amountOfElemInList = lettersGameService.getAmountOfElemInList(lettersToPressService.getPressedLetters(), entry.getValue()); while (index <= amountOfElemInList) { String buttonKeyToPress = entry.getValue() + index; index++; LetterButton letterButton = lettersToPressService.getLetterButtons().get(buttonKeyToPress); if (letterButton != null && letterButton.getMyButton().getTouchable() != Touchable.disabled && !letterButton.getMyButton().isPressed() && Gdx.input.isKeyJustPressed(entry.getKey())) { pressButton(letterButton.getMyButton()); break; } } } if (Gdx.input.isKeyJustPressed(Input.Keys.ENTER)) { pressButton(submitAndDeleteService.getSubmitBtn()); } if (Gdx.input.isKeyJustPressed(Input.Keys.FORWARD_DEL)) { pressButton(submitAndDeleteService.getDeleteBtn()); } if (Gdx.input.isKeyJustPressed(Input.Keys.TAB)) { pressButton(finalWordContext.getFinalWordService().getFinalWordCells().get(0).getLetterBtn()); } submitAndDeleteService.processSubmitDeleteBtnVisibility(); } private void prepareKeysWithLetters() { keysWithLetters.put(Input.Keys.A, "a"); keysWithLetters.put(Input.Keys.B, "b"); keysWithLetters.put(Input.Keys.C, "c"); keysWithLetters.put(Input.Keys.D, "d"); keysWithLetters.put(Input.Keys.E, "e"); keysWithLetters.put(Input.Keys.F, "f"); keysWithLetters.put(Input.Keys.G, "g"); keysWithLetters.put(Input.Keys.H, "h"); keysWithLetters.put(Input.Keys.I, "i"); keysWithLetters.put(Input.Keys.J, "j"); keysWithLetters.put(Input.Keys.K, "k"); keysWithLetters.put(Input.Keys.L, "l"); keysWithLetters.put(Input.Keys.M, "m"); keysWithLetters.put(Input.Keys.N, "n"); keysWithLetters.put(Input.Keys.O, "o"); keysWithLetters.put(Input.Keys.P, "p"); keysWithLetters.put(Input.Keys.Q, "q"); keysWithLetters.put(Input.Keys.R, "r"); keysWithLetters.put(Input.Keys.S, "s"); keysWithLetters.put(Input.Keys.T, "t"); keysWithLetters.put(Input.Keys.U, "u"); keysWithLetters.put(Input.Keys.V, "v"); keysWithLetters.put(Input.Keys.W, "w"); keysWithLetters.put(Input.Keys.X, "x"); keysWithLetters.put(Input.Keys.Y, "y"); keysWithLetters.put(Input.Keys.Z, "z"); } void pressButton(MyButton button) { if (button != null) { InputEvent event = new InputEvent(); event.setType(InputEvent.Type.touchDown); button.fire(event); event.setType(InputEvent.Type.touchUp); button.fire(event); } } }
[ "horea.bucerzan@gmail.com" ]
horea.bucerzan@gmail.com
7010c6488f8bc572339a2b4994ae117197b874bd
729b091eb91817684fa8423919ec31e61c7a0ccb
/src/java/org/jivesoftware/openfire/handler/IQSessionEstablishmentHandler.java
58a416f9e27fce6a8f0c0641e2c898d35d79ca90
[ "Apache-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
idwanglu2010/openfire
77ac5c19db71193c74bf126f382e060ce3516ee2
cbfc8211ce0dce7ddb48dd2e5aece96b2ab81aab
refs/heads/master
2021-01-19T15:01:33.678637
2014-10-04T05:33:03
2014-10-04T05:33:03
24,532,636
4
2
null
null
null
null
UTF-8
Java
false
false
1,939
java
/** * $RCSfile$ * $Revision: $ * $Date: $ * * Copyright (C) 2005-2008 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.openfire.handler; import org.jivesoftware.openfire.IQHandlerInfo; import org.jivesoftware.openfire.auth.UnauthorizedException; import org.xmpp.packet.IQ; /** * Activate client sessions once resource binding has been done. Clients need to active their * sessions in order to engage in instant messaging and presence activities. The server may * deny sessions activations if the max number of sessions in the server has been reached or * if a user does not have permissions to create sessions.<p> * * Current implementation does not check any of the above conditions. However, future versions * may add support for those checkings. * * @author Gaston Dombiak */ public class IQSessionEstablishmentHandler extends IQHandler { private IQHandlerInfo info; public IQSessionEstablishmentHandler() { super("Session Establishment handler"); info = new IQHandlerInfo("session", "urn:ietf:params:xml:ns:xmpp-session"); } @Override public IQ handleIQ(IQ packet) throws UnauthorizedException { // Just answer that the session has been activated IQ reply = IQ.createResultIQ(packet); return reply; } @Override public IQHandlerInfo getInfo() { return info; } }
[ "idwanglu2010@gmail.com" ]
idwanglu2010@gmail.com
4b917acede5d22af52179ac0e0635a1785d551d8
e9d1b2db15b3ae752d61ea120185093d57381f73
/mytcuml-src/src/java/components/diagram_uml_sequence_elements/trunk/src/java/main/com/topcoder/gui/diagramviewer/uml/sequenceelements/TextChangedEvent.java
5e58743f37eca0eb008720b3616df5cf2139c686
[]
no_license
kinfkong/mytcuml
9c65804d511ad997e0c4ba3004e7b831bf590757
0786c55945510e0004ff886ff01f7d714d7853ab
refs/heads/master
2020-06-04T21:34:05.260363
2014-10-21T02:31:16
2014-10-21T02:31:16
25,495,964
1
0
null
null
null
null
UTF-8
Java
false
false
1,888
java
/* * Copyright (C) 2007 TopCoder Inc., All Rights Reserved. */ package com.topcoder.gui.diagramviewer.uml.sequenceelements; import java.util.EventObject; /** * <p> * This is an event object used to indicate text of text field is changed. It contains three properties. They are the * TextField whose text is changed, the old text value, the new text value. Note, the TextField property can be * retrieved by getSource(). * </p> * <p> * This class is immutable, and thread-safe. * </p> * @author gniuxiao, TCSDEVELOPER * @version 1.1 * @since 1.1 */ public class TextChangedEvent extends EventObject { /** * <p> * Represents the old value of the node name. Initialized in the constructor and can not be null. * </p> */ private final String oldValue; /** * <p> * Represents the new value of the node name. Initialized in the constructor and can not be null. * </p> */ private final String newValue; /** * <p> * Creates a new instance with fields initialized using the given arguments. * </p> * @param source the TextField to be changed * @param oldValue the old name * @param newValue the new name * @throws IllegalArgumentException if source, oldValue or newValue is null */ public TextChangedEvent(TextField source, String oldValue, String newValue) { super(source); Util.checkNull(oldValue, "oldValue"); Util.checkNull(newValue, "newValue"); this.oldValue = oldValue; this.newValue = newValue; } /** * <p> * Gets the old value. * </p> * @return the old value */ public String getOldValue() { return oldValue; } /** * <p> * Gets the new value. * </p> * @return the new value */ public String getNewValue() { return newValue; } }
[ "kinfkong@126.com" ]
kinfkong@126.com
eef52cebcfaffdc4f6eb177d32a22a220a111cc7
dd76d0b680549acb07278b2ecd387cb05ec84d64
/divestory-Fernflower/com/github/mikephil/charting/formatter/IndexAxisValueFormatter.java
1fb184a8ae576bf2a15b340926baca298bfd51f2
[]
no_license
ryangardner/excursion-decompiling
43c99a799ce75a417e636da85bddd5d1d9a9109c
4b6d11d6f118cdab31328c877c268f3d56b95c58
refs/heads/master
2023-07-02T13:32:30.872241
2021-08-09T19:33:37
2021-08-09T19:33:37
299,657,052
0
0
null
null
null
null
UTF-8
Java
false
false
1,024
java
package com.github.mikephil.charting.formatter; import java.util.Collection; public class IndexAxisValueFormatter extends ValueFormatter { private int mValueCount = 0; private String[] mValues = new String[0]; public IndexAxisValueFormatter() { } public IndexAxisValueFormatter(Collection<String> var1) { if (var1 != null) { this.setValues((String[])var1.toArray(new String[var1.size()])); } } public IndexAxisValueFormatter(String[] var1) { if (var1 != null) { this.setValues(var1); } } public String getFormattedValue(float var1) { int var2 = Math.round(var1); return var2 >= 0 && var2 < this.mValueCount && var2 == (int)var1 ? this.mValues[var2] : ""; } public String[] getValues() { return this.mValues; } public void setValues(String[] var1) { String[] var2 = var1; if (var1 == null) { var2 = new String[0]; } this.mValues = var2; this.mValueCount = var2.length; } }
[ "ryan.gardner@coxautoinc.com" ]
ryan.gardner@coxautoinc.com
4527d785a5a6aab82ae5f2050b36fbe145b071d9
6a39ce069f3c82d539cbe4731fc14b7a12139865
/app/src/main/java/com/yxys365/smartglasses/entity/LoginEntity.java
3d27cc52e5fd05805dfd4772ae69ecfcc06de448
[]
no_license
marufei/SmartGlasses
6253ab4a416fdcd1588f9310fec760b1911084d5
a521c27a7e730c5ab63a5fd9a7094d63c122a5a6
refs/heads/master
2020-03-18T23:51:14.431612
2019-06-17T11:35:12
2019-06-17T11:35:12
135,433,436
1
0
null
null
null
null
UTF-8
Java
false
false
2,461
java
package com.yxys365.smartglasses.entity; /** * Created by MaRufei * on 2018/6/25. * Email: www.867814102@qq.com * Phone:13213580912 * Purpose:TODO * update: */ public class LoginEntity extends BaseEntity { /** * data : {"access_token":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMTIuNzQuMTI3Ljk5OjgwMDJcL2FwaVwvbG9naW4iLCJpYXQiOjE1MzI1MjI4NTUsImV4cCI6MTUzMjk1NDg1NSwibmJmIjoxNTMyNTIyODU1LCJqdGkiOiJ2ZFZuVkRCQ0NWelRNcVJoIiwic3ViIjoyOSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyIsInBhc3N3b3JkX2hhc2giOiIkMnkkMTAkUk14TS5nd3FvelJsSHRXTEtoRVcwLlwvQlZRQm9YTUVqaVJiXC9TVXB6QlYxbjkxbXIyb0ZJUyJ9.uMkBziteRL1jvZtRCcXNlRxfgA88D7R_8I1ixn5P4jk","token_type":"bearer","expires_in":432000,"vision_upload":0} */ private DataBean data; public DataBean getData() { return data; } public void setData(DataBean data) { this.data = data; } public static class DataBean { /** * access_token : eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOlwvXC8xMTIuNzQuMTI3Ljk5OjgwMDJcL2FwaVwvbG9naW4iLCJpYXQiOjE1MzI1MjI4NTUsImV4cCI6MTUzMjk1NDg1NSwibmJmIjoxNTMyNTIyODU1LCJqdGkiOiJ2ZFZuVkRCQ0NWelRNcVJoIiwic3ViIjoyOSwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyIsInBhc3N3b3JkX2hhc2giOiIkMnkkMTAkUk14TS5nd3FvelJsSHRXTEtoRVcwLlwvQlZRQm9YTUVqaVJiXC9TVXB6QlYxbjkxbXIyb0ZJUyJ9.uMkBziteRL1jvZtRCcXNlRxfgA88D7R_8I1ixn5P4jk * token_type : bearer * expires_in : 432000 * vision_upload : 0 */ private String access_token; private String token_type; private int expires_in; private int vision_upload; public String getAccess_token() { return access_token; } public void setAccess_token(String access_token) { this.access_token = access_token; } public String getToken_type() { return token_type; } public void setToken_type(String token_type) { this.token_type = token_type; } public int getExpires_in() { return expires_in; } public void setExpires_in(int expires_in) { this.expires_in = expires_in; } public int getVision_upload() { return vision_upload; } public void setVision_upload(int vision_upload) { this.vision_upload = vision_upload; } } }
[ "867814102@qq.com" ]
867814102@qq.com