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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f0795be3d548aa168769c9334c2bd3e3dbe41887
|
1748053ae0229c37da6eec429b9f47fc9d836f54
|
/shengka-media-content/shengka-media-content-provider/src/main/java/com/geek/shengka/content/mapper/SkCommentNoticeDAO.java
|
00b05addc8c33a0c617d76162a5682bc9274d394
|
[] |
no_license
|
chaochaoGT/shangka
|
54d2a436a2a0348b7d4f2a994dc657dd3a3e8fa2
|
e43f7d7c26db15974e0ddc612a3ee16c9360b36a
|
refs/heads/master
| 2023-02-28T03:37:11.085305
| 2021-02-05T13:15:36
| 2021-02-05T13:15:36
| 336,273,377
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 288
|
java
|
package com.geek.shengka.content.mapper;
import com.geek.shengka.content.entity.SkCommentNotice;
import org.springframework.stereotype.Repository;
/**
* SkCommentNoticeDAO继承基类
*/
@Repository
public interface SkCommentNoticeDAO extends MyBatisBaseDao<SkCommentNotice, Long> {
}
|
[
"952904879@qq.com"
] |
952904879@qq.com
|
375f19e8b14afb9674b527c70e7ed0e2b58e7bc3
|
23bff833ce1d04fd39a1df13a774d233c83dc1ba
|
/src/test/produceTest/ProducesTest.java
|
1525a784c3d5ee2bc4d3a28a37252ea9eea01fca
|
[] |
no_license
|
IdeaUJetBrains/RestExample1
|
dd867da184098f876af47276404aec9d948196a6
|
c6fd291a5516473c240bdea2c42e0924ae4a5dd3
|
refs/heads/master
| 2020-12-29T18:48:01.624837
| 2015-12-15T11:24:59
| 2015-12-15T11:24:59
| 43,672,445
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,987
|
java
|
package test.produceTest;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
@Produces(MediaType.TEXT_XML)
@Path(value = "/produces")
public class ProducesTest {
public String htmlstr = "<!DOCTYPE html>\n" +
"<html>\n" +
"<body>\n" +
"\n" +
"<h1>My First Heading</h1>\n" +
"\n" +
"<p>My first paragraph.</p>\n" +
"\n" +
"</body>\n" +
"</html>";
@GET
@Produces("text/html")
@Path("/html")
public String post1() { return htmlstr; }
@GET
@Produces(MediaType.TEXT_PLAIN)
@Path("/plain")
public String post2() { return htmlstr; }
@GET
@Produces(MediaType.TEXT_HTML)
@Path("/html1")
public String post3(){ return htmlstr; }
@GET
@Produces({MediaType.TEXT_XML, MediaType.TEXT_HTML, MediaType.TEXT_PLAIN, MediaType.APPLICATION_JSON})
@Path("/xml")
public String post4() { return htmlstr; }
@GET
@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_XHTML_XML, MediaType.APPLICATION_JSON, MediaType.APPLICATION_JSON})
@Path("/xml1")
public String post5() { return htmlstr; }
@GET
@Produces(MediaType.APPLICATION_XHTML_XML)
@Path("/1")
public String post6() { return htmlstr; }
@GET
@Produces()
@Path("/html")
public String post11() { return htmlstr; }
//Локаторы дочерних ресурсов - методы, служащие для уточнения того,
// какой ресурс должен обрабатывать входящий запрос
@Path(value="/{contactName}/ch")
public ForLocator getContactDepartment(@PathParam(value="contactName")
String contactName) {
ForLocator lock = new ForLocator(contactName);
return lock;
}
}
|
[
"olga.pavlova@jetbrains.com"
] |
olga.pavlova@jetbrains.com
|
ff253ca68c43958e9212f550417da3c8fbfc2d11
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/MATH-1b-1-9-NSGA_II-LineCoverage:ExceptionType:StackTraceSimilarity/org/apache/commons/math3/fraction/BigFraction_ESTest.java
|
5e5f7fcc6ce0c35dd3984a94d9754fd30a929e1e
|
[] |
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
| 718
|
java
|
/*
* This file was automatically generated by EvoSuite
* Mon Apr 06 06:35:25 UTC 2020
*/
package org.apache.commons.math3.fraction;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import org.apache.commons.math3.fraction.BigFraction;
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 BigFraction_ESTest extends BigFraction_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
BigFraction bigFraction0 = new BigFraction((double) 0, (-1075));
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
ba170b994c330f35e46fc864c046d62e4640c7fd
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project15/src/test/java/org/gradle/test/performance/largejavamultiproject/project15/p75/Test1503.java
|
49549be702d13bab118fc3b17eb1fbae5d0acc70
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,170
|
java
|
package org.gradle.test.performance.largejavamultiproject.project15.p75;
import org.junit.Test;
import static org.junit.Assert.*;
public class Test1503 {
Production1503 objectUnderTest = new Production1503();
@Test
public void testProperty0() {
Production1500 value = new Production1500();
objectUnderTest.setProperty0(value);
assertEquals(value, objectUnderTest.getProperty0());
}
@Test
public void testProperty1() {
Production1501 value = new Production1501();
objectUnderTest.setProperty1(value);
assertEquals(value, objectUnderTest.getProperty1());
}
@Test
public void testProperty2() {
Production1502 value = new Production1502();
objectUnderTest.setProperty2(value);
assertEquals(value, objectUnderTest.getProperty2());
}
@Test
public void testProperty3() {
String value = "value";
objectUnderTest.setProperty3(value);
assertEquals(value, objectUnderTest.getProperty3());
}
@Test
public void testProperty4() {
String value = "value";
objectUnderTest.setProperty4(value);
assertEquals(value, objectUnderTest.getProperty4());
}
@Test
public void testProperty5() {
String value = "value";
objectUnderTest.setProperty5(value);
assertEquals(value, objectUnderTest.getProperty5());
}
@Test
public void testProperty6() {
String value = "value";
objectUnderTest.setProperty6(value);
assertEquals(value, objectUnderTest.getProperty6());
}
@Test
public void testProperty7() {
String value = "value";
objectUnderTest.setProperty7(value);
assertEquals(value, objectUnderTest.getProperty7());
}
@Test
public void testProperty8() {
String value = "value";
objectUnderTest.setProperty8(value);
assertEquals(value, objectUnderTest.getProperty8());
}
@Test
public void testProperty9() {
String value = "value";
objectUnderTest.setProperty9(value);
assertEquals(value, objectUnderTest.getProperty9());
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
229c744f441577da0bae1fd73b462f0d976a6f33
|
b0e21ec497802f56df884f9dee7f68cd036eb2bb
|
/scim-model/src/main/java/org/gluu/oxtrust/model/scim2/SearchRequest.java
|
889cede1c8f49eba210a1dbb1e16f5d0e5c1644b
|
[
"Apache-2.0"
] |
permissive
|
GluuFederation/scim
|
ad577a9f565332c23f7d5d91536419dbae573e7b
|
d343b2f28b58c529943527fc4c1596cb5983f397
|
refs/heads/master
| 2023-08-21T06:50:47.922325
| 2023-07-25T19:15:57
| 2023-07-25T19:15:57
| 247,885,689
| 12
| 9
|
Apache-2.0
| 2023-08-09T07:03:30
| 2020-03-17T05:19:52
|
Java
|
UTF-8
|
Java
| false
| false
| 5,583
|
java
|
/*
* oxTrust is available under the MIT License (2008). See http://opensource.org/licenses/MIT for full text.
*
* Copyright (c) 2015, Gluu
*/
package org.gluu.oxtrust.model.scim2;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;
import static org.gluu.oxtrust.model.scim2.Constants.SEARCH_REQUEST_SCHEMA_ID;
/**
* This class represents the components of a search request that is employed when doing searches via POST.
* See section 3.4.3 RFC 7644.
*
* @author Val Pecaoco
*/
/*
* Updated by jgomer on 2017-10-08.
*/
@JsonIgnoreProperties(ignoreUnknown = true)
public class SearchRequest {
private List<String> schemas;
private List<String> attributes;
private List<String> excludedAttributes;
private String filter;
private String sortBy;
private String sortOrder;
private Integer startIndex;
private Integer count;
@JsonIgnore
private String attributesStr;
@JsonIgnore
private String excludedAttributesStr;
/**
* Default no args constructor. It creates an instance of <code>SearchRequest</code> initializing {@link #getSchemas()
* schemas} properly.
*/
public SearchRequest() {
schemas = Collections.singletonList(SEARCH_REQUEST_SCHEMA_ID);
}
public List<String> getSchemas() {
return schemas;
}
public void setSchemas(List<String> schemas) {
this.schemas = schemas;
}
public List<String> getAttributes() {
return attributes;
}
/**
* Specifies a list of strings indicating the names of the resource attributes to return in response to a search,
* overriding the set of attributes that would be returned by default.
*
* @param attributes A <code>List</code> of Strings
*/
@JsonProperty
public void setAttributes(List<String> attributes) {
this.attributes = attributes;
}
/**
* Specifies the names of the resource attributes to return in the response to a search, overriding the set of
* attributes that would be returned by default.
*
* @param commaSeparatedString The attribute names in a comma-separated String
*/
public void setAttributes(String commaSeparatedString) {
setAttributes(commaSeparatedString == null ? null : Arrays.asList(commaSeparatedString.split(",")));
}
public List<String> getExcludedAttributes() {
return excludedAttributes;
}
/**
* Specifies a list of strings indicating the names of the resource attributes to be removed from the default set of
* attributes to return.
*
* @param excludedAttributes A <code>List</code> of Strings
*/
@JsonProperty
public void setExcludedAttributes(List<String> excludedAttributes) {
this.excludedAttributes = excludedAttributes;
}
/**
* Specifies the names of the resource attributes to be removed from the default set of attributes to return.
*
* @param commaSeparatedString The attribute names in a comma-separated String
*/
public void setExcludedAttributes(String commaSeparatedString) {
setExcludedAttributes(commaSeparatedString == null ? null : Arrays.asList(commaSeparatedString.split(",")));
}
public String getFilter() {
return filter;
}
/**
* A filter expression so that the search will return only those resources matching the expression. To learn more
* about SCIM filter expressions and operators, see section 3.4.2.2 of RFC 7644.
*
* @param filter A valid filter
*/
public void setFilter(String filter) {
this.filter = filter;
}
public String getSortBy() {
return sortBy;
}
/**
* Specifies the attribute whose value will be used to order the returned responses.
*
* @param sortBy Attribute name path. Examples are: <code>userName, name.givenName, emails.value</code>.
*/
public void setSortBy(String sortBy) {
this.sortBy = sortBy;
}
public String getSortOrder() {
return sortOrder;
}
/**
* The order in which the <code>sortBy</code> parameter is applied. Allowed values are "ascending" and "descending",
* being "ascending" the default if unspecified.
*
* @param sortOrder A string value
*/
public void setSortOrder(String sortOrder) {
this.sortOrder = sortOrder;
}
public Integer getStartIndex() {
return startIndex;
}
/**
* Sets the 1-based index of the first query result.
*
* @param startIndex Specifies "where" the result set will start when the search is performed
*/
public void setStartIndex(Integer startIndex) {
this.startIndex = startIndex;
}
public Integer getCount() {
return count;
}
/**
* Specifies the desired maximum number of query results per page the response must include.
*
* @param count An <code>Integer</code> object
*/
public void setCount(Integer count) {
this.count = count;
}
public String getAttributesStr() {
return attributes == null ? null : attributes.stream().collect(Collectors.joining(","));
}
public String getExcludedAttributesStr() {
return excludedAttributes == null ? null : excludedAttributes.stream().collect(Collectors.joining(","));
}
}
|
[
"bonustrack310@gmail.com"
] |
bonustrack310@gmail.com
|
da946b040ec15143757d690dc81232107348e855
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a081/A081632Test.java
|
52fadf13f0511742b104eb98859ae3fa17999b83
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a081;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A081632Test extends AbstractSequenceTest {
}
|
[
"sairvin@gmail.com"
] |
sairvin@gmail.com
|
5a7c59016201122ccae28d7766e0d4052c2b2743
|
bfb8a9fcb4ea44baeb22c802d7e4acc1344ab9be
|
/optaplanner-core/src/main/java/org/optaplanner/core/api/package-info.java
|
536035cf991245eb3ece0dd184627b5f49807d3f
|
[
"Apache-2.0"
] |
permissive
|
azthief/optaplanner
|
bfc27f63bd7cbd88196984342d6cc2af6c667d4a
|
05295acd336eaac9e24a1e9ef2adcdcdfb1bc039
|
refs/heads/master
| 2021-01-15T11:12:42.189888
| 2015-06-16T17:19:48
| 2015-06-16T17:19:48
| 37,574,566
| 1
| 0
| null | 2015-06-17T05:31:20
| 2015-06-17T05:31:20
| null |
UTF-8
|
Java
| false
| false
| 963
|
java
|
/*
* Copyright 2015 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* 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.
*/
/**
* The public API of OptaPlanner.
* <p/>
* All classes in this namespace are backwards compatible in future releases (especially minor and hotfix releases).
* If a major version number changes, a few specific classes might not be backwards compatible,
* in which case the upgrade recipe will clearly document those cases.
*/
package org.optaplanner.core.api;
|
[
"gds.geoffrey.de.smet@gmail.com"
] |
gds.geoffrey.de.smet@gmail.com
|
49386159df10347ec35ded38412d39d36d79b922
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_5b17a3e080500689108d7d4691a2a375a49727a9/JMSSource/2_5b17a3e080500689108d7d4691a2a375a49727a9_JMSSource_t.java
|
bb583942c19a3dc63e74a923394faae586f447e9
|
[] |
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,994
|
java
|
package com.redshape.jobs.jms.sources;
import com.redshape.jobs.IJob;
import com.redshape.jobs.JobException;
import com.redshape.jobs.JobStatus;
import com.redshape.jobs.result.IJobResult;
import com.redshape.jobs.sources.IJobSource;
import com.redshape.persistence.entities.DtoUtils;
import com.redshape.persistence.entities.IDTO;
import com.redshape.utils.Commons;
import com.redshape.utils.events.AbstractEventDispatcher;
import org.apache.log4j.Logger;
import javax.jms.*;
import java.util.ArrayList;
import java.util.List;
/**
* @author Cyril A. Karpenko <self@nikelin.ru>
* @package com.redshape.jobs.sources
* @date 2/8/12 {6:30 PM}
*/
public class JMSSource extends AbstractEventDispatcher implements IJobSource<IJob> {
private static final Logger log = Logger.getLogger(JMSSource.class);
private int workChunkSize;
private int maxFailuresCount;
private int receiveTimeout;
private int updateInterval;
private int maxReceivingTime;
private QueueConnection connection;
private QueueSession session;
private MessageProducer producer;
private MessageConsumer consumer;
private Queue producingQueueAddr;
private Queue consumingQueueAddr;
private String name;
private String consumingQueue;
private String producingQueue;
public JMSSource( String name,
QueueConnection connection,
String consumingQueue,
String producingQueue,
int updateInterval,
int receiveTimeout,
int workChunkSize,
int maxFailuresCount )
throws JobException {
super();
Commons.checkArgument( workChunkSize > 0 );
Commons.checkNotNull(connection);
this.name = name;
this.updateInterval = updateInterval;
this.receiveTimeout = receiveTimeout;
this.workChunkSize = workChunkSize;
this.maxFailuresCount = maxFailuresCount;
this.consumingQueue = consumingQueue;
this.producingQueue = producingQueue;
this.connection = connection;
this.init();
}
@Override
public String getName() {
return this.name;
}
public int getMaxReceivingTime() {
return maxReceivingTime;
}
public void setMaxReceivingTime(int maxReceivingTime) {
this.maxReceivingTime = maxReceivingTime;
}
protected MessageConsumer getConsumer() {
return this.consumer;
}
protected MessageProducer getProducer() {
return this.producer;
}
protected int getReceiveTimeout() {
return this.receiveTimeout;
}
protected int getMaxFailuresCount() {
return this.maxFailuresCount;
}
protected int getWorkChunkSize() {
return this.workChunkSize;
}
protected QueueSession getSession() {
return this.session;
}
protected QueueConnection getConnection() {
return this.connection;
}
protected String getConsumingQueue() {
return this.consumingQueue;
}
protected String getProducingQueue() {
return this.producingQueue;
}
protected void init() throws JobException {
try {
this.session = this.connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
this.session.run();
} catch ( JMSException e ) {
throw new JobException("Unable to establish JMS session through provided connection");
}
try {
this.producingQueueAddr = this.session.createQueue( this.getProducingQueue() );
this.producer = this.session.createSender( this.producingQueueAddr );
} catch ( JMSException e ) {
throw new JobException( "Unable to start messages producing thread", e );
}
try {
this.consumingQueueAddr = this.session.createQueue(this.getConsumingQueue());
this.consumer = this.session.createConsumer( this.consumingQueueAddr );
} catch ( JMSException e ) {
throw new JobException( "Unable to start messages consuming thread", e );
}
}
@Override
public int getUpdateInterval() {
return this.updateInterval;
}
@Override
public void complete(IJob job, IJobResult result) throws JobException {
if ( job.getState().equals( JobStatus.COMPLETED ) ) {
return;
}
}
@Override
public void save(IJob entity) throws JobException {
try {
ObjectMessage message = this.getSession().createObjectMessage();
message.setJMSDestination( this.producingQueueAddr );
message.setObject(entity);
this.getProducer().send(message);
} catch ( JMSException e ) {
throw new JobException( e.getMessage(), e );
}
}
@Override
public List<IJob> fetch() throws JobException {
int failuresCount = 0;
List<IJob> result = new ArrayList<IJob>();
long startReceivingTime = System.currentTimeMillis();
while ( result.size() <= this.getWorkChunkSize()
&& failuresCount < this.getMaxFailuresCount() ) {
try {
Message message = this.getConsumer().receive(this.getReceiveTimeout());
if ( message == null ) {
continue;
}
log.info("New job received....");
if ( message instanceof ObjectMessage ) {
Object object = ((ObjectMessage) message).getObject();
if ( IJob.class.isAssignableFrom( object.getClass() ) ) {
log.info("Adding " + object.getClass().getCanonicalName() + " job object to processing chunk...");
result.add( (IJob) ( object instanceof IDTO ? DtoUtils.fromDTO( (IDTO) object) : object ) );
}
} else {
log.info("Unsupported job type...");
}
log.info("Sending acknowledge");
message.acknowledge();
if ( result.size() >= this.getWorkChunkSize() || ( this.getMaxReceivingTime() != 0 &&
( startReceivingTime - System.nanoTime() ) >= this.getMaxReceivingTime() ) ) {
log.debug("Breaking a receiving cycle with a chunk of " + result.size() + "...");
break;
}
} catch ( Throwable e ) {
log.error( e.getMessage(), e );
failuresCount++;
}
}
return result;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
49b53efd6541040a0fde9d47fe14dc70ddeac9fd
|
139960e2d7d55e71c15e6a63acb6609e142a2ace
|
/mobile_app1/module606/src/main/java/module606packageJava0/Foo419.java
|
335d18ad85773c4e899d808d3ecac55bd8a98245
|
[
"Apache-2.0"
] |
permissive
|
uber-common/android-build-eval
|
448bfe141b6911ad8a99268378c75217d431766f
|
7723bfd0b9b1056892cef1fef02314b435b086f2
|
refs/heads/master
| 2023-02-18T22:25:15.121902
| 2023-02-06T19:35:34
| 2023-02-06T19:35:34
| 294,831,672
| 83
| 7
|
Apache-2.0
| 2021-09-24T08:55:30
| 2020-09-11T23:27:37
|
Java
|
UTF-8
|
Java
| false
| false
| 511
|
java
|
package module606packageJava0;
import java.lang.Integer;
public class Foo419 {
Integer int0;
Integer int1;
public void foo0() {
new module606packageJava0.Foo418().foo8();
}
public void foo1() {
foo0();
}
public void foo2() {
foo1();
}
public void foo3() {
foo2();
}
public void foo4() {
foo3();
}
public void foo5() {
foo4();
}
public void foo6() {
foo5();
}
public void foo7() {
foo6();
}
public void foo8() {
foo7();
}
}
|
[
"oliviern@uber.com"
] |
oliviern@uber.com
|
34b5443440d2fce7ec410e9015d3cc392802d17f
|
35348f6624d46a1941ea7e286af37bb794bee5b7
|
/Ghidra/Features/Base/src/test.slow/java/ghidra/app/plugin/core/datawindow/DataWindowPluginTest.java
|
3e91237963d997c24853038c06afd70d038e5205
|
[
"Apache-2.0",
"GPL-1.0-or-later",
"GPL-3.0-only",
"LicenseRef-scancode-public-domain",
"LGPL-2.1-only",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
StarCrossPortal/ghidracraft
|
7af6257c63a2bb7684e4c2ad763a6ada23297fa3
|
a960e81ff6144ec8834e187f5097dfcf64758e18
|
refs/heads/master
| 2023-08-23T20:17:26.250961
| 2021-10-22T00:53:49
| 2021-10-22T00:53:49
| 359,644,138
| 80
| 19
|
Apache-2.0
| 2021-10-20T03:59:55
| 2021-04-20T01:14:29
|
Java
|
UTF-8
|
Java
| false
| false
| 4,468
|
java
|
/* ###
* IP: GHIDRA
*
* 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 ghidra.app.plugin.core.datawindow;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.awt.Dimension;
import org.junit.*;
import docking.widgets.table.GTable;
import docking.widgets.table.threaded.ThreadedTableModel;
import ghidra.app.plugin.core.codebrowser.CodeBrowserPlugin;
import ghidra.app.services.ProgramManager;
import ghidra.framework.plugintool.PluginTool;
import ghidra.program.model.address.Address;
import ghidra.program.model.listing.Program;
import ghidra.test.*;
import ghidra.util.task.TaskMonitorAdapter;
public class DataWindowPluginTest extends AbstractGhidraHeadedIntegrationTest {
private TestEnv env;
private PluginTool tool;
private FilterAction filterAction;
private Program program;
private DataWindowPlugin plugin;
private CodeBrowserPlugin browser;
private GTable dataTable;
private DataWindowProvider provider;
@Before
public void setUp() throws Exception {
env = new TestEnv();
loadProgram("notepad");
tool = env.launchDefaultTool(program);
plugin = env.getPlugin(DataWindowPlugin.class);
browser = env.getPlugin(CodeBrowserPlugin.class);
filterAction = (FilterAction) getAction(plugin, "Filter Data Types");
tool.getToolFrame().setSize(new Dimension(1024, 768));
waitForSwing();
provider = plugin.getProvider();
runSwing(() -> tool.showComponentProvider(provider, true));
DataWindowProvider dataWindowProvider =
(DataWindowProvider) tool.getComponentProvider("Data Window");
dataTable = dataWindowProvider.getTable();
assertNotNull(dataTable);
waitForNotBusy(dataTable);
}
private void waitForNotBusy(GTable table) {
waitForTableModel((ThreadedTableModel<?, ?>) table.getModel());
}
@After
public void tearDown() {
env.dispose();
}
private void loadProgram(String programName) throws Exception {
ClassicSampleX86ProgramBuilder builder = new ClassicSampleX86ProgramBuilder();
program = builder.getProgram();
}
private void closeProgram() {
ProgramManager pm = tool.getService(ProgramManager.class);
pm.closeProgram(program, true);
}
@Test
public void testNavigation() throws Exception {
int numRows = dataTable.getRowCount();
for (int i = 0; i < numRows; i++) {
clickTableCell(dataTable, i, DataTableModel.LOCATION_COL, 2);
waitForSwing();
Address addr = browser.getCurrentAddress();
Object tableAddr =
addr.getAddress(dataTable.getValueAt(i, DataTableModel.LOCATION_COL).toString());
assertEquals(addr, tableAddr);
}
}
@Test
public void testDeleteAndRestore() throws Exception {
int numData = dataTable.getRowCount();
int id = program.startTransaction(testName.getMethodName());
try {
program.getListing().clearAll(false, TaskMonitorAdapter.DUMMY_MONITOR);
}
finally {
program.endTransaction(id, true);
}
waitForNotBusy(dataTable);
assertEquals(0, dataTable.getRowCount());
undo(program);
waitForNotBusy(dataTable);
assertEquals(numData, dataTable.getRowCount());
}
@Test
public void testFilter() throws Exception {
int totalRows = dataTable.getRowCount();
String type = dataTable.getValueAt(0, DataTableModel.TYPE_COL).toString();
filterAction.setTypeEnabled(type, false);
filterAction.setFilterEnabled(true);
plugin.reload();
waitForNotBusy(dataTable);
int filteredRows = dataTable.getRowCount();
for (int i = 0; i < filteredRows; i++) {
assertEquals(dataTable.getValueAt(i, DataTableModel.TYPE_COL).toString().equals(type),
false);
}
assertEquals(totalRows > filteredRows, true);
filterAction.setFilterEnabled(false);
plugin.reload();
waitForNotBusy(dataTable);
assertEquals(dataTable.getRowCount(), totalRows);
}
@Test
public void testProgramClose() throws Exception {
closeProgram();
waitForNotBusy(dataTable);
assertEquals(dataTable.getRowCount(), 0);
loadProgram("notepad");
}
}
|
[
"46821332+nsadeveloper789@users.noreply.github.com"
] |
46821332+nsadeveloper789@users.noreply.github.com
|
244ebedef8517632ea93e050e16a2118a9aaba8d
|
c164d8f1a6068b871372bae8262609fd279d774c
|
/src/main/java/edu/uiowa/slis/VIVOISF/GeographicRegion/GeographicRegionNameShortARIterator.java
|
a4edb44ce090097c3a03d5da4d47855233068bde
|
[
"Apache-2.0"
] |
permissive
|
eichmann/VIVOISF
|
ad0a299df177d303ec851ff2453cbcbd7cae1ef8
|
e80cd8b74915974fac7ebae8e5e7be8615355262
|
refs/heads/master
| 2020-03-19T03:44:27.662527
| 2018-06-03T22:44:58
| 2018-06-03T22:44:58
| 135,757,275
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,362
|
java
|
package edu.uiowa.slis.VIVOISF.GeographicRegion;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
import org.apache.jena.query.QuerySolution;
import org.apache.jena.query.ResultSet;
@SuppressWarnings("serial")
public class GeographicRegionNameShortARIterator extends edu.uiowa.slis.VIVOISF.TagLibSupport {
static GeographicRegionNameShortARIterator currentInstance = null;
private static final Log log = LogFactory.getLog(GeographicRegionNameShortARIterator.class);
static boolean firstInstance = false;
static boolean lastInstance = false;
String subjectURI = null;
String nameShortAR = null;
ResultSet rs = null;
public int doStartTag() throws JspException {
currentInstance = this;
try {
GeographicRegion ancestorInstance = (GeographicRegion) findAncestorWithClass(this, GeographicRegion.class);
if (ancestorInstance != null) {
subjectURI = ancestorInstance.getSubjectURI();
}
if (ancestorInstance == null && subjectURI == null) {
throw new JspException("subject URI generation currently not supported");
}
rs = getResultSet(prefix+"SELECT ?s where { <" + subjectURI + "> <http://aims.fao.org/aos/geopolitical.owl#nameShortAR> ?s } ");
if(rs.hasNext()) {
QuerySolution sol = rs.nextSolution();
nameShortAR = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString();
firstInstance = true;
lastInstance = ! rs.hasNext();
return EVAL_BODY_INCLUDE;
}
} catch (Exception e) {
log.error("Exception raised in GeographicRegionIterator doStartTag", e);
clearServiceState();
freeConnection();
throw new JspTagException("Exception raised in GeographicRegionIterator doStartTag");
}
return SKIP_BODY;
}
public int doAfterBody() throws JspException {
try {
if(rs.hasNext()) {
QuerySolution sol = rs.nextSolution();
nameShortAR = sol.get("?s").isLiteral() ? sol.get("?s").asLiteral().getString() : sol.get("?s").toString();
firstInstance = false;
lastInstance = ! rs.hasNext();
return EVAL_BODY_AGAIN;
}
} catch (Exception e) {
log.error("Exception raised in GeographicRegionIterator doAfterBody", e);
clearServiceState();
freeConnection();
throw new JspTagException("Exception raised in GeographicRegionIterator doAfterBody");
}
return SKIP_BODY;
}
public int doEndTag() throws JspException {
currentInstance = null;
try {
// do processing
} catch (Exception e) {
log.error("Exception raised in GeographicRegion doEndTag", e);
throw new JspTagException("Exception raised in GeographicRegion doEndTag");
} finally {
clearServiceState();
freeConnection();
}
return super.doEndTag();
}
private void clearServiceState() {
subjectURI = null;
}
public void setNameShortAR(String theNameShortAR) {
nameShortAR = theNameShortAR;
}
public String getNameShortAR() {
return nameShortAR;
}
public static void setFirstInstance(Boolean theFirstInstance) {
firstInstance = theFirstInstance;
}
public static Boolean getFirstInstance() {
return firstInstance;
}
public static void setLastInstance(Boolean theLastInstance) {
lastInstance = theLastInstance;
}
public static Boolean getLastInstance() {
return lastInstance;
}
}
|
[
"david-eichmann@uiowa.edu"
] |
david-eichmann@uiowa.edu
|
8a773a253b21da94ccccc6cbf37800554b0390c9
|
7730793c2e5981f98fcc3c2f12526e153fba2e72
|
/src/test/java/com/apptium/order/config/WebConfigurerTest.java
|
c46ceecd7da7b95599fbd2d1c1e5f5e046d9513d
|
[] |
no_license
|
ravi7mech/order-management
|
3de18db5e26099d5fa5968ea991b62089e9b3699
|
a968c8cc71fc0a23c739999de4cce1d97f9b2cb3
|
refs/heads/main
| 2023-06-16T16:51:09.393167
| 2021-07-14T07:39:11
| 2021-07-14T07:39:11
| 385,852,996
| 0
| 0
| null | 2021-07-14T07:39:12
| 2021-07-14T07:31:15
|
Java
|
UTF-8
|
Java
| false
| false
| 5,734
|
java
|
package com.apptium.order.config;
import static org.assertj.core.api.Assertions.assertThatCode;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.*;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.options;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import java.util.*;
import javax.servlet.*;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.http.HttpHeaders;
import org.springframework.mock.env.MockEnvironment;
import org.springframework.mock.web.MockServletContext;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import tech.jhipster.config.JHipsterConstants;
import tech.jhipster.config.JHipsterProperties;
/**
* Unit tests for the {@link WebConfigurer} class.
*/
class WebConfigurerTest {
private WebConfigurer webConfigurer;
private MockServletContext servletContext;
private MockEnvironment env;
private JHipsterProperties props;
@BeforeEach
public void setup() {
servletContext = spy(new MockServletContext());
doReturn(mock(FilterRegistration.Dynamic.class)).when(servletContext).addFilter(anyString(), any(Filter.class));
doReturn(mock(ServletRegistration.Dynamic.class)).when(servletContext).addServlet(anyString(), any(Servlet.class));
env = new MockEnvironment();
props = new JHipsterProperties();
webConfigurer = new WebConfigurer(env, props);
}
@Test
void shouldStartUpProdServletContext() throws ServletException {
env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_PRODUCTION);
assertThatCode(() -> webConfigurer.onStartup(servletContext)).doesNotThrowAnyException();
}
@Test
void shouldStartUpDevServletContext() throws ServletException {
env.setActiveProfiles(JHipsterConstants.SPRING_PROFILE_DEVELOPMENT);
assertThatCode(() -> webConfigurer.onStartup(servletContext)).doesNotThrowAnyException();
}
@Test
void shouldCorsFilterOnApiPath() throws Exception {
props.getCors().setAllowedOrigins(Collections.singletonList("other.domain.com"));
props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
props.getCors().setAllowedHeaders(Collections.singletonList("*"));
props.getCors().setMaxAge(1800L);
props.getCors().setAllowCredentials(true);
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()).addFilters(webConfigurer.corsFilter()).build();
mockMvc
.perform(
options("/api/test-cors")
.header(HttpHeaders.ORIGIN, "other.domain.com")
.header(HttpHeaders.ACCESS_CONTROL_REQUEST_METHOD, "POST")
)
.andExpect(status().isOk())
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com"))
.andExpect(header().string(HttpHeaders.VARY, "Origin"))
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET,POST,PUT,DELETE"))
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"))
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "1800"));
mockMvc
.perform(get("/api/test-cors").header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().string(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, "other.domain.com"));
}
@Test
void shouldCorsFilterOnOtherPath() throws Exception {
props.getCors().setAllowedOrigins(Collections.singletonList("*"));
props.getCors().setAllowedMethods(Arrays.asList("GET", "POST", "PUT", "DELETE"));
props.getCors().setAllowedHeaders(Collections.singletonList("*"));
props.getCors().setMaxAge(1800L);
props.getCors().setAllowCredentials(true);
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()).addFilters(webConfigurer.corsFilter()).build();
mockMvc
.perform(get("/test/test-cors").header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
void shouldCorsFilterDeactivatedForNullAllowedOrigins() throws Exception {
props.getCors().setAllowedOrigins(null);
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()).addFilters(webConfigurer.corsFilter()).build();
mockMvc
.perform(get("/api/test-cors").header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
@Test
void shouldCorsFilterDeactivatedForEmptyAllowedOrigins() throws Exception {
props.getCors().setAllowedOrigins(new ArrayList<>());
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new WebConfigurerTestController()).addFilters(webConfigurer.corsFilter()).build();
mockMvc
.perform(get("/api/test-cors").header(HttpHeaders.ORIGIN, "other.domain.com"))
.andExpect(status().isOk())
.andExpect(header().doesNotExist(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN));
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
2e565ad79f7b2ef3fd5b91c327eb6be70382b7bc
|
48e013de4833035fb34b30b02f0903f4ce4ceed7
|
/aura-impl/src/test/java/org/auraframework/impl/factory/ComponentEventDefAccessAttributeTest.java
|
6d3a087e998291153dd324d549c9cf2180940ce3
|
[
"BSD-3-Clause",
"Apache-2.0",
"LGPL-2.0-or-later",
"ICU",
"LicenseRef-scancode-mx4j",
"W3C",
"CC-BY-4.0",
"SAX-PD",
"MPL-2.0",
"WTFPL",
"CDDL-1.0",
"MIT"
] |
permissive
|
nagyist/forcedotcom-aura
|
064609732afa4bc7551eec9972218dc9f1a30fd8
|
779ffdcc715565d3b961becd28aa163d289557aa
|
refs/heads/master
| 2022-12-21T13:31:26.447628
| 2022-02-12T08:35:12
| 2022-02-12T08:35:12
| 27,166,886
| 0
| 0
|
Apache-2.0
| 2022-12-16T22:49:11
| 2014-11-26T08:29:51
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 2,873
|
java
|
/*
* Copyright (C) 2013 salesforce.com, inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.auraframework.impl.factory;
import org.auraframework.def.EventDef;
import org.auraframework.impl.util.AuraTestingUtil;
import org.auraframework.impl.util.AuraTestingUtil.BundleEntryInfo;
import org.auraframework.system.Source;
import org.junit.Test;
import com.google.common.collect.Lists;
public class ComponentEventDefAccessAttributeTest extends BaseAccessAttributeTest<EventDef> {
public ComponentEventDefAccessAttributeTest() {
super(EventDef.class, "<aura:event type='component' %s>%s</aura:event>");
}
@Test
@Override
public void testDefinitionWithPrivateAccessCustomNamespace() throws Exception {
AuraTestingUtil util = getAuraTestingUtil();
Source<EventDef> source = util.buildBundleSource(util.getCustomNamespace(),
defClass,
Lists.newArrayList(
new BundleEntryInfo(type, String.format(tag, "access='PRIVATE'", ""))
));
EventDef def = compilerService.compile(source.getDescriptor(), source);
assertNotNull("Bogus. We should faile here.", def);
}
@Test
@Override
public void testDefinitionWithPrivateAccessInternalNamespace() throws Exception {
AuraTestingUtil util = getAuraTestingUtil();
Source<EventDef> source = util.buildBundleSource(util.getInternalNamespace(),
defClass,
Lists.newArrayList(
new BundleEntryInfo(type, String.format(tag, "access='PRIVATE'", ""))
));
EventDef def = compilerService.compile(source.getDescriptor(), source);
assertNotNull("Bogus. We should faile here.", def);
}
@Test
@Override
public void testDefinitionWithPrivateAccessPrivilegedNamespace() throws Exception {
AuraTestingUtil util = getAuraTestingUtil();
Source<EventDef> source = util.buildBundleSource(util.getPrivilegedNamespace(),
defClass,
Lists.newArrayList(
new BundleEntryInfo(type, String.format(tag, "access='PRIVATE'", ""))
));
EventDef def = compilerService.compile(source.getDescriptor(), source);
assertNotNull("Bogus. We should faile here.", def);
}
}
|
[
"byao@salesforce.com"
] |
byao@salesforce.com
|
719c9679c5ef8cf181d7374b19e04ff0f6b34901
|
aa9cea8a89324432f6477415ca95e9e182b06d8c
|
/src/main/java/com/example/restaurantapp/RestaurantAppApplication.java
|
4c8f825baccbee6fdc6d6238f7f125d59ec14393
|
[] |
no_license
|
mbhave/restaurant-app
|
f14e95284b26f52b1a1cdb3f8e70808bd1f20604
|
bd135cad4e81b442e3723a535b495b76ee206c23
|
refs/heads/master
| 2021-08-22T04:40:36.092729
| 2017-11-15T13:28:36
| 2017-11-28T20:28:34
| 110,765,214
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 331
|
java
|
package com.example.restaurantapp;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class RestaurantAppApplication {
public static void main(String[] args) {
SpringApplication.run(RestaurantAppApplication.class, args);
}
}
|
[
"snicoll@pivotal.io"
] |
snicoll@pivotal.io
|
70abe047134f50c75b85d5c63245c751c29ae9cc
|
141b4bbcf20bd0b04448b9451294bb18f7d3a7df
|
/src/main/java/ru/ci/admin/config/SecurityConfiguration.java
|
79388f9992c15eecee2f4d0dbb4843cdd265ff4b
|
[] |
no_license
|
algkazakov/ci-admin
|
41be9e7a86eadcd53499ec681fc55c87e6353340
|
e611f798b813222a795b3bdae632202ca95f1e93
|
refs/heads/master
| 2022-12-21T22:43:22.468583
| 2020-01-26T15:34:17
| 2020-01-26T15:34:17
| 236,332,286
| 0
| 0
| null | 2022-12-16T04:43:37
| 2020-01-26T15:34:01
|
Java
|
UTF-8
|
Java
| false
| false
| 4,578
|
java
|
package ru.ci.admin.config;
import ru.ci.admin.security.*;
import ru.ci.admin.security.jwt.*;
import org.springframework.beans.factory.BeanInitializationException;
import org.springframework.beans.factory.InitializingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Import;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.builders.WebSecurity;
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
import org.springframework.security.config.http.SessionCreationPolicy;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;
import org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter;
import org.springframework.security.web.header.writers.ReferrerPolicyHeaderWriter;
import org.springframework.web.filter.CorsFilter;
import org.zalando.problem.spring.web.advice.security.SecurityProblemSupport;
@EnableWebSecurity
@EnableGlobalMethodSecurity(prePostEnabled = true, securedEnabled = true)
@Import(SecurityProblemSupport.class)
public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
private final TokenProvider tokenProvider;
private final CorsFilter corsFilter;
private final SecurityProblemSupport problemSupport;
public SecurityConfiguration(TokenProvider tokenProvider, CorsFilter corsFilter, SecurityProblemSupport problemSupport) {
this.tokenProvider = tokenProvider;
this.corsFilter = corsFilter;
this.problemSupport = problemSupport;
}
@Bean
public PasswordEncoder passwordEncoder() {
return new BCryptPasswordEncoder();
}
@Override
public void configure(WebSecurity web) {
web.ignoring()
.antMatchers(HttpMethod.OPTIONS, "/**")
.antMatchers("/app/**/*.{js,html}")
.antMatchers("/i18n/**")
.antMatchers("/content/**")
.antMatchers("/h2-console/**")
.antMatchers("/swagger-ui/index.html")
.antMatchers("/test/**");
}
@Override
public void configure(HttpSecurity http) throws Exception {
// @formatter:off
http
.csrf()
.disable()
.addFilterBefore(corsFilter, UsernamePasswordAuthenticationFilter.class)
.exceptionHandling()
.authenticationEntryPoint(problemSupport)
.accessDeniedHandler(problemSupport)
.and()
.headers()
.contentSecurityPolicy("default-src 'self'; frame-src 'self' data:; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://storage.googleapis.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:")
.and()
.referrerPolicy(ReferrerPolicyHeaderWriter.ReferrerPolicy.STRICT_ORIGIN_WHEN_CROSS_ORIGIN)
.and()
.featurePolicy("geolocation 'none'; midi 'none'; sync-xhr 'none'; microphone 'none'; camera 'none'; magnetometer 'none'; gyroscope 'none'; speaker 'none'; fullscreen 'self'; payment 'none'")
.and()
.frameOptions()
.deny()
.and()
.sessionManagement()
.sessionCreationPolicy(SessionCreationPolicy.STATELESS)
.and()
.authorizeRequests()
.antMatchers("/api/authenticate").permitAll()
.antMatchers("/api/register").permitAll()
.antMatchers("/api/activate").permitAll()
.antMatchers("/api/account/reset-password/init").permitAll()
.antMatchers("/api/account/reset-password/finish").permitAll()
.antMatchers("/api/**").authenticated()
.antMatchers("/management/health").permitAll()
.antMatchers("/management/info").permitAll()
.antMatchers("/management/prometheus").permitAll()
.antMatchers("/management/**").hasAuthority(AuthoritiesConstants.ADMIN)
.and()
.httpBasic()
.and()
.apply(securityConfigurerAdapter());
// @formatter:on
}
private JWTConfigurer securityConfigurerAdapter() {
return new JWTConfigurer(tokenProvider);
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
95a279e2d8f26f464c966b9500173c8e32111d23
|
a3d6556180e74af7b555f8d47d3fea55b94bcbda
|
/base/test/android/javatests/src/org/chromium/base/test/util/DoNotRevive.java
|
28ab9232794f20441d43369e4486dfc0f7c74908
|
[
"BSD-3-Clause"
] |
permissive
|
chromium/chromium
|
aaa9eda10115b50b0616d2f1aed5ef35d1d779d6
|
a401d6cf4f7bf0e2d2e964c512ebb923c3d8832c
|
refs/heads/main
| 2023-08-24T00:35:12.585945
| 2023-08-23T22:01:11
| 2023-08-23T22:01:11
| 120,360,765
| 17,408
| 7,102
|
BSD-3-Clause
| 2023-09-10T23:44:27
| 2018-02-05T20:55:32
| null |
UTF-8
|
Java
| false
| false
| 817
|
java
|
// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.base.test.util;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* This annotation is for disabled tests that should not be run in Test Reviver. Tests that cause
* other tests to fail or caue problems to the testing the infrastructure should have this
* annotation. <p> This should be used in conjunction with @DisabledTest or @DisableIf to prevent a
* test from running on normal bots.
*/
@Target({ElementType.METHOD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface DoNotRevive {
String reason();
}
|
[
"chromium-scoped@luci-project-accounts.iam.gserviceaccount.com"
] |
chromium-scoped@luci-project-accounts.iam.gserviceaccount.com
|
a050945a09d8d7a21bb52d2fc222b8855991347f
|
57ab5ccfc179da80bed6dc6aa1407c2181cee926
|
/org.springframework.boot:statementAccount/src/main/java/co/moviired/support/src/main/java/co/moviired/support/helper/SignatureHelper.java
|
a448721043b61f79e12e9a5ccc8211aa4d3a900e
|
[] |
no_license
|
sandys/filtro
|
7190e8e8af7c7b138922c133a7a0ffe9b9b8efa7
|
9494d10444983577a218a2ab2e0bbce374c6484e
|
refs/heads/main
| 2022-12-08T20:46:08.611664
| 2020-09-11T09:26:22
| 2020-09-11T09:26:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,386
|
java
|
package co.moviired.support.helper;
import co.moviired.base.domain.exception.DataException;
import co.moviired.base.domain.exception.ParsingException;
import co.moviired.base.util.Security;
import co.moviired.support.conf.StatusCodeConfig;
import co.moviired.support.domain.entity.account.Document;
import javax.crypto.spec.SecretKeySpec;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.security.NoSuchAlgorithmException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import static co.moviired.support.util.ConstantsHelper.*;
public final class SignatureHelper implements Serializable {
private static final int NUMBER_7 = 7;
private static final int NUMBER_10 = 10;
private final SecretKeySpec keySpec;
private final StatusCodeConfig statusCodeConfig;
public SignatureHelper(@NotNull String psecret, @NotNull StatusCodeConfig pstatusCodeConfig) throws UnsupportedEncodingException, NoSuchAlgorithmException {
super();
this.keySpec = Security.generateKeyFrom(psecret);
this.statusCodeConfig = pstatusCodeConfig;
}
// Get the signature of payment
public String sign(@NotNull Document documentWithOutSignature) throws ParsingException {
Document document = new Document(documentWithOutSignature);
Calendar calendar = Calendar.getInstance();
calendar.setTime(document.getCreationDate());
StringBuilder dateHash = new StringBuilder()
.append(calendar.get(Calendar.HOUR))
.append(calendar.get(Calendar.YEAR)).append(calendar.get(Calendar.HOUR_OF_DAY)).append(calendar.get(Calendar.DAY_OF_MONTH))
.append(calendar.get(Calendar.MONTH)).append(calendar.get(Calendar.DATE));
String dataHash1 = document.getToken().substring(0, (document.getToken().length() / 2)) +
dateHash.substring(0, NUMBER_7);
String hash1 = Security.encrypt(dataHash1, keySpec);
SimpleDateFormat sdf = new SimpleDateFormat(MAHINDRA_DB_DATE_FORMAT);
StringBuilder signature = new StringBuilder();
signature.append(document.getToken());
signature.append(SEPARATOR);
signature.append(sdf.format(document.getCreationDate()), 0, NUMBER_10);
signature.append(SEPARATOR);
signature.append(document.isAltered());
signature.append(SEPARATOR);
signature.append(hash1, 0, (hash1.length() / 2));
signature.append(SEPARATOR);
signature.append(document.getYear());
signature.append(SEPARATOR);
signature.append(document.getPhoneNumber());
signature.append(SEPARATOR);
signature.append(document.getType());
signature.append(SEPARATOR);
signature.append(document.getMonth());
signature.append(SEPARATOR);
signature.append(sdf.format(document.getCreationDate()), 0, NUMBER_10);
signature.trimToSize();
return Security.encrypt(signature.toString(), this.keySpec);
}
// Validate signature of payment
public void validate(Document document) throws ParsingException, DataException {
String signature = sign(document);
if (!signature.equals(document.getSignature())) {
throw new DataException(statusCodeConfig.of(ALTERED_CODE));
}
}
}
|
[
"me@deletescape.ch"
] |
me@deletescape.ch
|
c610db59dee32c0e771f207e858759615e783411
|
446015b6459aa08cf0c9a9ac07f7ebf154a628b4
|
/core/src/main/java/io/sailrocket/core/steps/ForeachStep.java
|
e8a14c51b88f21903e4fee56b716e1f4be53fb5b
|
[
"Apache-2.0"
] |
permissive
|
stalep/SailRocket
|
8c2d2a77eb623231408eb4041f1866cd3e5c2ffb
|
bb77fd3dfd57970f95ebae990da3fddaafb58f71
|
refs/heads/master
| 2020-03-19T15:37:36.449986
| 2018-10-09T12:57:36
| 2018-10-09T12:57:36
| 136,678,997
| 0
| 0
| null | 2018-06-09T00:54:20
| 2018-06-09T00:54:20
| null |
UTF-8
|
Java
| false
| false
| 3,000
|
java
|
package io.sailrocket.core.steps;
import java.util.Collections;
import java.util.List;
import io.sailrocket.api.config.BenchmarkDefinitionException;
import io.sailrocket.api.config.Sequence;
import io.sailrocket.api.session.Session;
import io.sailrocket.api.config.Step;
import io.sailrocket.api.session.VarReference;
import io.sailrocket.core.api.ResourceUtilizer;
import io.sailrocket.core.builders.BaseSequenceBuilder;
import io.sailrocket.core.builders.DependencyStepBuilder;
import io.sailrocket.core.session.SimpleVarReference;
public class ForeachStep extends DependencyStep implements ResourceUtilizer {
private final String dataVar;
private final String counterVar;
private final Sequence template;
public ForeachStep(VarReference[] dependencies, String dataVar, String counterVar, Sequence template) {
super(dependencies);
this.dataVar = dataVar;
this.counterVar = counterVar;
this.template = template;
}
@Override
public void invoke(Session session) {
Object value = session.getObject(dataVar);
if (!(value instanceof Session.Var[])) {
throw new IllegalStateException("Variable " + dataVar + " does not contain var array: " + value);
}
// Java array polymorphism is useful at times...
Session.Var[] array = (Session.Var[]) value;
int i = 0;
for (; i < array.length; i++) {
if (!array[i].isSet()) break;
template.instantiate(session, i);
}
if (counterVar != null) {
session.setInt(counterVar, i);
}
}
@Override
public void reserve(Session session) {
session.declareInt(counterVar);
}
public static class Builder extends DependencyStepBuilder {
private String dataVar;
private String counterVar;
private String sequenceTemplate;
public Builder(BaseSequenceBuilder parent, String dataVar, String counterVar) {
super(parent);
this.dataVar = dataVar;
this.counterVar = counterVar;
dependency(new SimpleVarReference(dataVar));
}
public Builder dataVar(String dataVar) {
this.dataVar = dataVar;
return this;
}
public Builder counterVar(String counterVar) {
this.counterVar = counterVar;
return this;
}
public Builder sequence(String sequenceTemplate) {
this.sequenceTemplate = sequenceTemplate;
return this;
}
@Override
public List<Step> build() {
if (sequenceTemplate == null) {
throw new BenchmarkDefinitionException("Template sequence must be defined");
}
Sequence sequence = parent.end().endSequence().findSequence(sequenceTemplate).build();
return Collections.singletonList(new ForeachStep(dependencies(), dataVar, counterVar, sequence));
}
public Builder sequenceTemplate(String sequenceTemplate) {
this.sequenceTemplate = sequenceTemplate;
return this;
}
}
}
|
[
"rvansa@redhat.com"
] |
rvansa@redhat.com
|
7d7ce77dd75c4a4388cca0c651f25e3c367af4dc
|
e3f9bdebdf68b2b2e273f537e65ed09f125e59bc
|
/src/com/Variables/Variables.java
|
1ae65546e7a59ebfaf051ececcb0312e0b6d4b4d
|
[] |
no_license
|
VeeraPrathapSelenium/Selenium_Online
|
79c106fde8db8771e1916cd04b9ec0198e4fbb69
|
880aecea6ca8d5f1422412a178872fd4e2160747
|
refs/heads/master
| 2021-01-23T10:20:24.258893
| 2017-06-02T12:01:15
| 2017-06-02T12:01:15
| 93,051,832
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 211
|
java
|
package com.Variables;
public class Variables {
public static void main(String[] args)
{
int a=10;
int b=20;
int result=a+b;
System.out.println(result);
}
}
|
[
"prathap.ufttest@gmail.com"
] |
prathap.ufttest@gmail.com
|
bd30a652569dcc6468909b2f0bf12984e0f7ac92
|
3adc99579f53ee8f56e37c4a9e9107b4438abe8f
|
/4.JavaCollections/src/main/java/com/jr/level/level31/task3107/NullFileData.java
|
df3bde86253a2dc9f170001a3a9c16a6e1fa25f9
|
[] |
no_license
|
Qventeen/JavaLearn
|
3fa87b7b48c968f3c3813816c524e14702786f6b
|
9157dae1be1c73da587457c17906bcb3a75e54ec
|
refs/heads/master
| 2023-02-04T16:24:59.982269
| 2020-12-18T16:17:58
| 2020-12-18T16:17:58
| 322,562,417
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 577
|
java
|
package com.jr.level.level31.task3107;
public class NullFileData implements FileData {
private Exception exception;
public NullFileData(Exception e) {
this.exception = e;
}
public Exception getException() {
return exception;
}
@Override
public boolean isHidden() {
return false;
}
@Override
public boolean isExecutable() {
return false;
}
@Override
public boolean isDirectory() {
return false;
}
@Override
public boolean isWritable() {
return false;
}
}
|
[
"qventeen@gmail.com"
] |
qventeen@gmail.com
|
3749cae304f70d89748d07132a1113d6f5fd6b51
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/large-multiproject/project84/src/main/java/org/gradle/test/performance84_5/Production84_404.java
|
c36ce6628d6e6bea1a16e1e85ca69a24918c9a34
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 305
|
java
|
package org.gradle.test.performance84_5;
public class Production84_404 extends org.gradle.test.performance16_5.Production16_404 {
private final String property;
public Production84_404() {
this.property = "foo";
}
public String getProperty() {
return property;
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
25de3f5bb4de6b182c0d5ba2a6ab58500db0f35b
|
0c00b6e769d3201f358c700048f3a3397ccae0db
|
/core/viewer-restfulobjects-applib/src/main/java/org/apache/isis/viewer/restfulobjects/applib/version/VersionRepresentation.java
|
fa4912467aecf6a9b3e6ea214632501a61c51383
|
[
"Apache-2.0"
] |
permissive
|
consh004/isis
|
07e6a35aee74f12d4d992066b16d8ef9aea9681b
|
8a9378b1f209f16cec27c5d2990837237ccca7ee
|
refs/heads/master
| 2021-01-22T23:20:49.022566
| 2014-11-11T23:35:32
| 2014-11-11T23:35:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
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.isis.viewer.restfulobjects.applib.version;
import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation;
import org.apache.isis.viewer.restfulobjects.applib.JsonRepresentation.HasLinkToUp;
import org.apache.isis.viewer.restfulobjects.applib.LinkRepresentation;
import org.apache.isis.viewer.restfulobjects.applib.Rel;
import org.apache.isis.viewer.restfulobjects.applib.domainobjects.DomainRepresentation;
import org.codehaus.jackson.JsonNode;
public class VersionRepresentation extends DomainRepresentation implements HasLinkToUp {
public VersionRepresentation(final JsonNode jsonNode) {
super(jsonNode);
}
@Override
public LinkRepresentation getUp() {
return getLinkWithRel(Rel.UP);
}
public JsonRepresentation getOptionalCapabilities() {
return getMap("optionalCapabilities");
}
}
|
[
"danhaywood@apache.org"
] |
danhaywood@apache.org
|
428058355215207977e3057894f05537a2db272e
|
324fea83bc8135ab591f222f4cefa19b43d30944
|
/src/main/java/xml/encoding/Short.java
|
9102b23c10e45c370a1ac4b233d8b22446c254b0
|
[
"MIT"
] |
permissive
|
kanonirov/lanb-client
|
2c14fac4d583c1c9f524634fa15e0f7279b8542d
|
bfe333cf41998e806f9c74ad257c6f2d7e013ba1
|
refs/heads/master
| 2021-01-10T08:47:46.996645
| 2015-10-26T07:51:35
| 2015-10-26T07:51:35
| 44,953,384
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,914
|
java
|
package xml.encoding;
import java.util.HashMap;
import java.util.Map;
import javax.annotation.Generated;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAnyAttribute;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlID;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.namespace.QName;
/**
* <p>Java class for short complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="short">
* <simpleContent>
* <extension base="<http://www.w3.org/2001/XMLSchema>short">
* <attGroup ref="{encoding.xml}commonAttributes"/>
* <anyAttribute processContents='lax' namespace='##other'/>
* </extension>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "short", propOrder = {
"value"
})
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public class Short {
@XmlValue
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
protected short value;
@XmlAttribute(name = "id")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlID
@XmlSchemaType(name = "ID")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
protected java.lang.String id;
@XmlAttribute(name = "href")
@XmlSchemaType(name = "anyURI")
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
protected java.lang.String href;
@XmlAnyAttribute
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
private Map<QName, java.lang.String> otherAttributes = new HashMap<QName, java.lang.String>();
/**
* Gets the value of the value property.
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public short getValue() {
return value;
}
/**
* Sets the value of the value property.
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public void setValue(short value) {
this.value = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link java.lang.String }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public java.lang.String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link java.lang.String }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public void setId(java.lang.String value) {
this.id = value;
}
/**
* Gets the value of the href property.
*
* @return
* possible object is
* {@link java.lang.String }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public java.lang.String getHref() {
return href;
}
/**
* Sets the value of the href property.
*
* @param value
* allowed object is
* {@link java.lang.String }
*
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public void setHref(java.lang.String value) {
this.href = value;
}
/**
* Gets a map that contains attributes that aren't bound to any typed property on this class.
*
* <p>
* the map is keyed by the name of the attribute and
* the value is the string value of the attribute.
*
* the map returned by this method is live, and you can add new attribute
* by updating the map directly. Because of this design, there's no setter.
*
*
* @return
* always non-null
*/
@Generated(value = "com.sun.tools.xjc.Driver", date = "2015-10-25T05:29:34+06:00", comments = "JAXB RI v2.2.11")
public Map<QName, java.lang.String> getOtherAttributes() {
return otherAttributes;
}
}
|
[
"kio@iteratia.com"
] |
kio@iteratia.com
|
6119f64700ade173e9dff339e03f5360a5f8215b
|
f3a61278b7603156c47264568224e7f5eb9084b7
|
/gdpr-expert-web/src/main/java/com/app/domain/entities/OrganisationEntity.java
|
debacb38f29b32a21f9f243394c8f772bea0cb46
|
[] |
no_license
|
IvanPostu/GDPR-Expert
|
1d864ca34b2226bfe697d218cdd3b89e8537906e
|
c064c919c65463ffce0c5ab52be992e88938161a
|
refs/heads/main
| 2023-03-18T10:40:14.968004
| 2020-11-23T18:01:15
| 2020-11-23T18:01:15
| 312,710,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,578
|
java
|
package com.app.domain.entities;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Objects;
import javax.persistence.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Getter;
import lombok.Setter;
@Entity
@Table(name="organisation", schema = "app")
public class OrganisationEntity {
@Setter
@Getter
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name="organisation_id", unique = true)
private Long id;
@Setter
@Getter
@Column(name = "name")
private String name;
@Setter
@Getter
@Column(name = "legal_form")
private String legalForm;
@Setter
@Getter
@Column(name = "address")
private String address;
@Setter
@Getter
@Column(name = "administrator")
private String administrator;
@Setter
@Getter
@Column(name = "phone_number")
private String phoneNumber;
@Setter
@Getter
@Column(name = "email")
private String email;
@Setter
@Getter
@Column(name = "active")
private Boolean active;
@Setter
@Getter
@Column(name = "description")
private String description;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy hh:mm:ss")
@Setter
@Getter
@Column(name = "created_on_platform_at", columnDefinition = "TIMESTAMP")
private LocalDateTime createdOnPlatformAt;
@JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "dd-MM-yyyy")
@Setter
@Getter
@Column(name = "founded_at", columnDefinition = "DATE")
private Date foundedAt;
@JsonIgnore
@Setter
@Getter
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name="user_owner_id")
private UserEntity owner;
@JsonIgnore
@Setter
@Getter
@OneToOne(fetch = FetchType.LAZY, cascade = {CascadeType.ALL})
@JoinColumn(name = "organisation_id")
private OrganisationLogoEntity organisationLogoEntity;
// @PreRemove
// private void removeLogo() {
// organisationLogoEntity.setOrganisationEntity(null);
// }
@JsonIgnore
@Setter
@Getter
@OneToMany(fetch = FetchType.LAZY)
@JoinColumn(name="organisation_id")
private List<DepartmentEntity> depatrments;
@Override
public boolean equals(Object o) {
if(this == o){
return true;
}
if(o == null){
return false;
}
if(getClass() != o.getClass()){
return false;
}
OrganisationEntity obj = (OrganisationEntity)o;
return Objects.equals(obj.getId(), getId());
}
@Override
public int hashCode() {
return Objects.hash(getId());
}
}
|
[
"ipostu20000127@gmail.com"
] |
ipostu20000127@gmail.com
|
793cf6f6440e1a32f02be5b24902a57f974347cd
|
e96e9bfd0231a327672e69c25e7b251da3adab36
|
/app/src/main/java/com/example/jingbin/cloudreader/adapter/JokeAdapter.java
|
82256634ba3c30c3bc1a0f19716f590df8048096
|
[
"Apache-2.0"
] |
permissive
|
iffy1/CloudReader
|
5dde7e9c66d733d7f6153d8601d431cc16329973
|
2b8045b2e98ce49befb9d58cf9a8328696d112a4
|
refs/heads/master
| 2020-11-29T19:03:51.166668
| 2020-02-09T07:43:21
| 2020-02-09T07:43:21
| 230,195,607
| 0
| 0
|
Apache-2.0
| 2019-12-26T04:38:06
| 2019-12-26T04:38:05
| null |
UTF-8
|
Java
| false
| false
| 815
|
java
|
package com.example.jingbin.cloudreader.adapter;
import com.example.jingbin.cloudreader.R;
import com.example.jingbin.cloudreader.base.binding.BaseBindingAdapter;
import com.example.jingbin.cloudreader.bean.wanandroid.DuanZiBean;
import com.example.jingbin.cloudreader.databinding.ItemJokeBinding;
import com.example.jingbin.cloudreader.utils.TimeUtil;
/**
* Created by jingbin on 2016/11/25.
*/
public class JokeAdapter extends BaseBindingAdapter<DuanZiBean, ItemJokeBinding> {
public JokeAdapter() {
super(R.layout.item_joke);
}
@Override
protected void bindView(DuanZiBean bean, ItemJokeBinding binding, int position) {
binding.setBean(bean);
String time = TimeUtil.formatDataTime(Long.valueOf(bean.getCreateTime() + "000"));
binding.setTime(time);
}
}
|
[
"770413277@qq.com"
] |
770413277@qq.com
|
3ce0393d061df855227b11e7d58e50f6b4bd8cc8
|
d526fcc3fc1e32f7da7b312a44ac8fc06a60eafa
|
/src/main/java/com/gp/spring/constructorinjection/anamoly/Address.java
|
f0cf6f6f8d0d03dfe1a13575326998e61a1e0039
|
[] |
no_license
|
callgp/spring_bt
|
0ecb47978df8b2e1b3cf6a874e2d8b2d12312cef
|
de13b04ed2aa19f2e0a73be2e16366e83d60f7db
|
refs/heads/master
| 2023-02-16T02:26:37.457529
| 2021-01-03T00:58:54
| 2021-01-03T00:58:54
| 315,136,701
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 637
|
java
|
package com.gp.spring.constructorinjection.anamoly;
public class Address {
private int hno;
private String city;
private String street;
public int getHno() {
return hno;
}
public void setHno(int hno) {
this.hno = hno;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getStreet() {
return street;
}
public void setStreet(String street) {
this.street = street;
}
@Override
public String toString() {
return "Address [hno=" + hno + ", city=" + city + ", street=" + street + "]";
}
}
|
[
"callgp@gmail.com"
] |
callgp@gmail.com
|
eeabbe742057b284472030d8d5cb3f86fa96f2bc
|
1646441d091844cd8e58659ab13f113bffe9f6ce
|
/Thinking Java 2/src/containers/Synchronization.java
|
f8ef09f026ca2a37c9981a362a0a1d06af363c48
|
[] |
no_license
|
PhilDolganov/kantora
|
b51fca7c0be4227328c662a787ecb9dcb4f9e332
|
b4b09538ce89f72715f167d6c9c0a70e0e87977c
|
refs/heads/master
| 2021-10-02T21:46:07.658179
| 2018-12-01T04:49:49
| 2018-12-01T04:49:49
| 104,503,272
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 643
|
java
|
package containers;
// Using the Collections.synchronized methods
import java.util.*;
public class Synchronization {
public static void main(String[] args) {
Collection<String> c = Collections.synchronizedCollection(new ArrayList<>());
List<String> list = Collections.synchronizedList(new ArrayList<>());
Set<String> s = Collections.synchronizedSet(new HashSet<>());
Set<String> ss = Collections.synchronizedSortedSet(new TreeSet<>());
Map<String,String> m = Collections.synchronizedMap(new HashMap<>());
Map<String,String> sm = Collections.synchronizedSortedMap(new TreeMap<>());
}
}
|
[
"phildolganov@yahoo.com"
] |
phildolganov@yahoo.com
|
b8786859db498ed02f71c808609ce3f42ee91ab4
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/tomcat70/914.java
|
4c7e742e033c4be914a3b38d3489be1368826c6b
|
[
"MIT"
] |
permissive
|
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
|
d3fd21745dfddb2979e8ac262588cfdfe471899f
|
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
|
refs/heads/master
| 2020-03-31T15:52:01.005505
| 2018-10-01T23:38:50
| 2018-10-01T23:38:50
| 152,354,327
| 1
| 0
|
MIT
| 2018-10-10T02:57:02
| 2018-10-10T02:57:02
| null |
UTF-8
|
Java
| false
| false
| 1,362
|
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 javax.servlet.jsp.tagext;
import java.io.InputStream;
public abstract class PageData {
/**
* Sole constructor. (For invocation by subclass constructors,
* typically implicit.)
*/
public PageData() {
// NOOP by default
}
/**
* Returns an input stream on the XML view of a JSP page.
* The stream is encoded in UTF-8. Recall that the XML view of a
* JSP page has the include directives expanded.
*
* @return An input stream on the document.
*/
public abstract InputStream getInputStream();
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
eac6e4a29d105ba4f48be64e16bf4bef6779737a
|
00c09e939cf0cd1a16dc092dff93c00b914369f9
|
/common-orm/src/main/java/org/easyframe/enterprise/spring/POJODaoSupport.java
|
b7c501c3e23ca7476b26ffdab4f25f236b28c0fd
|
[
"Apache-2.0"
] |
permissive
|
Chaexsy/ef-orm
|
9eb624fc26938ff9fac6888da1b3362e9177021a
|
e2bb5f044a641f56b94e5914235bdaabc827a7a0
|
refs/heads/master
| 2021-01-17T05:55:08.725425
| 2015-02-03T09:52:09
| 2015-02-03T09:52:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,969
|
java
|
package org.easyframe.enterprise.spring;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.sql.SQLException;
import java.util.Collections;
import java.util.List;
import javax.persistence.PersistenceException;
import jef.common.log.LogUtil;
import jef.database.DbUtils;
import jef.database.IQueryableEntity;
import jef.database.PojoWrapper;
import jef.database.meta.ITableMetadata;
import jef.database.meta.MetaHolder;
import jef.database.query.Query;
import jef.tools.reflect.ClassEx;
import jef.tools.reflect.GenericUtils;
public class POJODaoSupport<T> extends BaseDao{
protected Class<T> entityClass;
/**
* 根据泛型参数构造
*/
@SuppressWarnings("unchecked")
public POJODaoSupport() {
Class<?> c = getClass();
c = ClassEx.getRealClass(c);
Type[] t = GenericUtils.getTypeParameters(c, POJODaoSupport.class);
Type type = t[0];
if (type instanceof Class<?>) {
} else if (type instanceof ParameterizedType) {
type = GenericUtils.getRawClass(type);
} else {
throw new IllegalArgumentException("The class " + this.getClass().getName() + " must assign the generic type T.");
}
this.entityClass = (Class<T>) type;
}
public T insert(T entity) {
if (entity == null)
return null;
try {
if (entity instanceof IQueryableEntity) {
getSession().insertCascade((IQueryableEntity) entity);
} else {
ITableMetadata meta = MetaHolder.getMeta(entity.getClass());
getSession().insertCascade(meta.transfer(entity, false));
}
return entity;
} catch (SQLException e) {
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
public int update(T entity) {
if (entity == null)
return 0;
try {
if (entity instanceof IQueryableEntity) {
return getSession().update((IQueryableEntity) entity);
} else {
ITableMetadata meta = MetaHolder.getMeta(entity);
PojoWrapper pojo = meta.transfer(entity, true);
return getSession().update(pojo);
}
} catch (SQLException e) {
LogUtil.exception(e);
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
public void remove(T entity) {
super.getEntityManager().remove(entity);
}
public T merge(T entity) {
super.getEntityManager().remove(entity);
return entity;
}
public T load(T entity) {
if (entity == null)
return null;
try {
if (entity instanceof IQueryableEntity) {
return (T) getSession().load((IQueryableEntity) entity);
} else {
ITableMetadata meta = MetaHolder.getMeta(entity.getClass());
PojoWrapper vw = getSession().load(meta.transfer(entity, true));
return vw == null ? null : (T) vw.get();
}
} catch (SQLException e) {
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
@SuppressWarnings("unchecked")
public int removeByExample(T entity,String... properties) {
try {
if (entity instanceof IQueryableEntity) {
return getSession().delete(DbUtils.populateExampleConditions((IQueryableEntity) entity, properties));
} else {
ITableMetadata meta = MetaHolder.getMeta(entity.getClass());
Query<PojoWrapper> q;
if (properties.length == 0) {
q = (Query<PojoWrapper>) meta.transfer(entity, true).getQuery();
} else {
q = DbUtils.populateExampleConditions(meta.transfer(entity, false), properties);
}
return getSession().delete(q);
}
} catch (SQLException e) {
throw new PersistenceException(e);
}
}
public List<T> find(T obj) {
if (obj == null)
return Collections.emptyList();
try {
if (obj instanceof IQueryableEntity) {
return (List<T>) getSession().select((IQueryableEntity) obj);
} else {
ITableMetadata meta = MetaHolder.getMeta(obj);
PojoWrapper pojo = meta.transfer(obj, true);
if (!pojo.hasQuery() && pojo.getUpdateValueMap().isEmpty()) {
pojo.getQuery().setAllRecordsCondition();
}
List<PojoWrapper> result = getSession().select(pojo);
return PojoWrapper.unwrapList(result);
}
} catch (SQLException e) {
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
public List<T> getAll() {
T t;
try {
t = (T) entityClass.newInstance();
} catch (InstantiationException e) {
e.printStackTrace();
throw new PersistenceException(e);
} catch (IllegalAccessException e) {
throw new PersistenceException(e);
}
return find(t);
}
public int batchInsert(List<T> entities) {
if (entities == null || entities.isEmpty())
return 0;
try {
T t = entities.get(0);
if (t instanceof IQueryableEntity) {
getSession().batchInsert((List<IQueryableEntity>) entities, null);
} else {
List<PojoWrapper> list = PojoWrapper.wrap(entities, false);
getSession().batchInsert(list, null);
}
return entities.size();
} catch (SQLException e) {
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
public int batchRemove(List<T> entities) {
if (entities == null || entities.isEmpty())
return 0;
try {
T t = entities.get(0);
if (t instanceof IQueryableEntity) {
getSession().executeBatchDeletion((List<IQueryableEntity>) entities, null);
} else {
List<PojoWrapper> list = PojoWrapper.wrap(entities, false);
getSession().executeBatchDeletion(list, null);
}
return entities.size();
} catch (SQLException e) {
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
public int batchUpdate(List<T> entities) {
if (entities == null || entities.isEmpty())
return 0;
try {
T t = entities.get(0);
if (t instanceof IQueryableEntity) {
getSession().batchUpdate((List<IQueryableEntity>) entities, null);
} else {
List<PojoWrapper> list = PojoWrapper.wrap(entities, false);
getSession().batchUpdate(list, null);
}
return entities.size();
} catch (SQLException e) {
throw new PersistenceException(e.getMessage() + " " + e.getSQLState(), e);
}
}
}
|
[
"hzjiyi@gmail.com"
] |
hzjiyi@gmail.com
|
131599de032844bdaa6f6a7ceafc0dbd8c916cde
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_395/Testnull_39431.java
|
473bb3ba31e18ac4d93402b53759f3d324d0785b
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.gradle.test.performancenull_395;
import static org.junit.Assert.*;
public class Testnull_39431 {
private final Productionnull_39431 production = new Productionnull_39431("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
741a7db95a49cc12b34dd32f01fc668a9651737e
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/spoon/learning/7659/CtEnumImpl.java
|
7ea7b575be97491afb2f8780a7d08dd18ae5dc33
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,362
|
java
|
/**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* 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 CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.support.reflect.declaration;
import spoon.reflect.annotations.MetamodelPropertyField;
import spoon.reflect.declaration.CtEnum;
import spoon.reflect.declaration.CtEnumValue;
import spoon.reflect.declaration.CtField;
import spoon.reflect.declaration.CtFormalTypeDeclarer;
import spoon.reflect.declaration.CtMethod;
import spoon.reflect.declaration.CtType;
import spoon.reflect.declaration.CtTypeParameter;
import spoon.reflect.declaration.ModifierKind;
import spoon.reflect.reference.CtTypeReference;
import spoon.reflect.visitor.CtVisitor;
import spoon.support.DerivedProperty;
import spoon.support.UnsettableProperty;
import spoon.support.util.SignatureBasedSortedSet;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import static spoon.reflect.path.CtRole.VALUE;
public class CtEnumImpl<T extends Enum<?>> extends CtClassImpl<T> implements CtEnum<T> {
private static final long serialVersionUID = 1L;
@MetamodelPropertyField(role = VALUE)
private List<CtEnumValue<?>> enumValues = CtElementImpl.emptyList();
@MetamodelPropertyField(role = VALUE)
private CtMethod<T[]> valuesMethod;
private CtMethod<T> valueOfMethod;
@Override
public void accept(CtVisitor visitor) {
visitor.visitCtEnum(this);
}
@Override
public Set<CtMethod<?>> getAllMethods() {
Set<CtMethod<?>> allMethods = new SignatureBasedSortedSet();
allMethods.addAll(getMethods());
allMethods.addAll(getFactory().Type().get(Enum.class).getMethods());
allMethods.add(valuesMethod());
allMethods.add(valueOfMethod());
return allMethods;
}
@Override
public boolean isSubtypeOf(CtTypeReference<?> type) {
return getReference().isSubtypeOf(type);
}
@Override
public <C extends CtEnum<T>> C addEnumValue(CtEnumValue<?> enumValue) {
if (enumValue == null) {
return (C) this;
}
if (enumValues == CtElementImpl.<CtEnumValue<?>>emptyList()) {
enumValues = new ArrayList<>();
}
if (!enumValues.contains(enumValue)) {
enumValue.setParent(this);
getFactory().getEnvironment().getModelChangeListener().onListAdd(this, VALUE, this.enumValues, enumValue);
enumValues.add(enumValue);
}
// enum value already exists.
return (C) this;
}
@Override
public boolean removeEnumValue(CtEnumValue<?> enumValue) {
if (enumValues == CtElementImpl.<CtEnumValue<?>>emptyList()) {
return false;
}
getFactory().getEnvironment().getModelChangeListener().onListDelete(this, VALUE, enumValues, enumValues.indexOf(enumValue), enumValue);
return enumValues.remove(enumValue);
}
@Override
public CtEnumValue<?> getEnumValue(String name) {
for (CtEnumValue<?> enumValue : enumValues) {
if (enumValue.getSimpleName().equals(name)) {
return enumValue;
}
}
return null;
}
@Override
public List<CtEnumValue<?>> getEnumValues() {
return Collections.unmodifiableList(enumValues);
}
@Override
public <C extends CtEnum<T>> C setEnumValues(List<CtEnumValue<?>> enumValues) {
if (enumValues == null) {
this.enumValues = emptyList();
return (C) this;
}
getFactory().getEnvironment().getModelChangeListener().onListDeleteAll(this, VALUE, this.enumValues, new ArrayList<>(enumValues));
if (enumValues.isEmpty()) {
this.enumValues = emptyList();
return (C) this;
}
this.enumValues.clear();
for (CtEnumValue<?> enumValue : enumValues) {
addEnumValue(enumValue);
}
return (C) this;
}
@Override
@DerivedProperty
public List<CtField<?>> getFields() {
List<CtField<?>> result = new ArrayList<>();
result.addAll(getEnumValues());
result.addAll(super.getFields());
return Collections.unmodifiableList(result);
}
@Override
public CtField<?> getField(String name) {
final CtField<?> field = super.getField(name);
if (field == null) {
return getEnumValue(name);
}
return field;
}
@Override
public CtEnum<T> clone() {
return (CtEnum<T>) super.clone();
}
@Override
@DerivedProperty
public CtTypeReference<?> getSuperclass() { return getFactory().Type().createReference(Enum.class);
}
@Override
@UnsettableProperty
public <C extends CtType<T>> C setSuperclass(CtTypeReference<?> superClass) {
return (C) this;
}
private CtMethod valuesMethod() {
if (valuesMethod == null) {
valuesMethod = getFactory().Core().createMethod();
valuesMethod.setParent(this);
valuesMethod.addModifier(ModifierKind.PUBLIC);
valuesMethod.addModifier(ModifierKind.STATIC);
valuesMethod.setSimpleName("values");
valuesMethod.setImplicit(true);
valuesMethod.setType(factory.Type().createArrayReference(getReference()));
}
return valuesMethod;
}
private CtMethod valueOfMethod() {
if (valueOfMethod == null) {
valueOfMethod = getFactory().Core().createMethod();
valueOfMethod.setParent(this);
valueOfMethod.addModifier(ModifierKind.PUBLIC);
valueOfMethod.addModifier(ModifierKind.STATIC);
valueOfMethod.setSimpleName("valueOf");
valueOfMethod.setImplicit(true);
valueOfMethod.addThrownType(
getFactory().Type().createReference(IllegalArgumentException.class));
valueOfMethod.setType(getReference());
factory.Method().createParameter(valueOfMethod, factory.Type().STRING, "name");
}
return valueOfMethod;
}
@Override
public <R> CtMethod<R> getMethod(String name, CtTypeReference<?>... parameterTypes) {
if ("values".equals(name) && parameterTypes.length == 0) {
return valuesMethod();
} else if ("valueOf".equals(name) && parameterTypes.length == 1 && parameterTypes[0].equals(factory.Type().STRING)) {
return valueOfMethod();
} else {
return super.getMethod(name, parameterTypes);
}
}
@Override
public <R> CtMethod<R> getMethod(CtTypeReference<R> returnType, String name, CtTypeReference<?>... parameterTypes) {
if ("values".equals(name)
&& parameterTypes.length == 0
&& returnType.equals(getReference())) {
return valuesMethod();
} else if ("valueOf".equals(name)
&& parameterTypes.length == 1
&& parameterTypes[0].equals(factory.Type().STRING)
&& returnType.equals(factory.Type().createArrayReference(getReference()))) {
return valueOfMethod();
} else {
return super.getMethod(returnType, name, parameterTypes);
}
}
@Override
public boolean isClass() {
return false;
}
@Override
public boolean isEnum() {
return true;
}
@Override
@DerivedProperty
public List<CtTypeParameter> getFormalCtTypeParameters() {
return emptyList();
}
@Override
@UnsettableProperty
public <C extends CtFormalTypeDeclarer> C setFormalCtTypeParameters(List<CtTypeParameter> formalTypeParameters) {
return (C) this;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
12399e76049e27227816f6c5376d7d2c9925e1db
|
481a2ccdbaad190d02015f2e99eebe41415b956c
|
/Core/SDK/org.emftext.sdk.concretesyntax.resource.cs/src-gen/org/emftext/sdk/concretesyntax/resource/cs/grammar/CsRule.java
|
d0ba688daa29f1f6a46bc2fa8ba8f3e960b7f668
|
[] |
no_license
|
balazsgrill/EMFText
|
2f3d5eb1ac9d794325b61a8bbea2e1d2c7d4b279
|
cbbf0f472f5a4ab7222c7d9df9cb0962dac989da
|
refs/heads/master
| 2020-12-30T18:38:38.790410
| 2013-04-24T10:03:32
| 2013-04-24T10:03:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,597
|
java
|
/*******************************************************************************
* Copyright (c) 2006-2012
* Software Technology Group, Dresden University of Technology
* DevBoost GmbH, Berlin, Amtsgericht Charlottenburg, HRB 140026
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Software Technology Group - TU Dresden, Germany;
* DevBoost GmbH - Berlin, Germany
* - initial API and implementation
******************************************************************************/
package org.emftext.sdk.concretesyntax.resource.cs.grammar;
/**
* A class to represent a rules in the grammar.
*/
public class CsRule extends org.emftext.sdk.concretesyntax.resource.cs.grammar.CsSyntaxElement {
private final org.eclipse.emf.ecore.EClass metaclass;
public CsRule(org.eclipse.emf.ecore.EClass metaclass, org.emftext.sdk.concretesyntax.resource.cs.grammar.CsChoice choice, org.emftext.sdk.concretesyntax.resource.cs.grammar.CsCardinality cardinality) {
super(cardinality, new org.emftext.sdk.concretesyntax.resource.cs.grammar.CsSyntaxElement[] {choice});
this.metaclass = metaclass;
}
public org.eclipse.emf.ecore.EClass getMetaclass() {
return metaclass;
}
public org.emftext.sdk.concretesyntax.resource.cs.grammar.CsChoice getDefinition() {
return (org.emftext.sdk.concretesyntax.resource.cs.grammar.CsChoice) getChildren()[0];
}
}
|
[
"jendrik.johannes@devboost.de"
] |
jendrik.johannes@devboost.de
|
52acbca998b2947686aeb9cc9656a5e5078ce4f8
|
228e1962e5a784b676601d6feeb1ab1b9f7dd89a
|
/src/test/java/org/csveed/test/model/BeanWithCustomIndexes.java
|
8000777ea10bd7399c1cebb4dfa7c0bca4c98062
|
[
"Apache-2.0"
] |
permissive
|
bsungur/CSVeed
|
64257a3d9d6ebe67140fad859cd736a1a38b7f45
|
62ced819524e32bebb66d6824416d2b967b6c8ce
|
refs/heads/master
| 2020-06-29T12:44:50.105030
| 2019-04-03T00:33:34
| 2019-04-03T00:33:34
| 200,540,715
| 0
| 0
|
Apache-2.0
| 2019-08-04T20:55:14
| 2019-08-04T20:55:13
| null |
UTF-8
|
Java
| false
| false
| 950
|
java
|
package org.csveed.test.model;
import org.csveed.annotations.CsvCell;
import org.csveed.annotations.CsvFile;
@CsvFile(useHeader = false)
public class BeanWithCustomIndexes {
@CsvCell(columnIndex = 5)
private String line3;
@CsvCell(columnIndex = 2)
private String line0;
@CsvCell(columnIndex = 3)
private String line1;
@CsvCell(columnIndex = 4)
private String line2;
public String getLine3() {
return line3;
}
public void setLine3(String line3) {
this.line3 = line3;
}
public String getLine0() {
return line0;
}
public void setLine0(String line0) {
this.line0 = line0;
}
public String getLine1() {
return line1;
}
public void setLine1(String line1) {
this.line1 = line1;
}
public String getLine2() {
return line2;
}
public void setLine2(String line2) {
this.line2 = line2;
}
}
|
[
"bor.robert@gmail.com"
] |
bor.robert@gmail.com
|
427e36a81360a28b1988f08976b5248417778089
|
a87d9e5617db6ef62883b9d9066f1f2bb1b22265
|
/src/item10/PhoneNumber.java
|
f451bd0ff09aa281a76b0456020301c4046c2525
|
[] |
no_license
|
jinioh88/effectivejava_study
|
04afa6fec811632bd76521f5083bba7e96d7cf3f
|
7f042fb036a859fcd81c6af22c2c639750e9efa6
|
refs/heads/master
| 2022-04-17T15:27:21.835506
| 2020-04-22T02:36:12
| 2020-04-22T02:36:12
| 255,756,196
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 610
|
java
|
package item10;
public class PhoneNumber {
private final int areaCode;
private final int prefix;
private final int lineNum;
public PhoneNumber(int areaCode, int prefix, int lineNum) {
this.areaCode = areaCode;
this.prefix = prefix;
this.lineNum = lineNum;
}
@Override
public boolean equals(Object o) {
if(this == o)
return true;
if(!(o instanceof PhoneNumber))
return false;
PhoneNumber pn = (PhoneNumber) o;
return pn.lineNum == lineNum && pn.prefix == prefix && pn.areaCode == areaCode;
}
}
|
[
"jinioh88@gmail.com"
] |
jinioh88@gmail.com
|
9e7caa5fc0599134fd8f9eb6db764532a90f3492
|
866d73b0913835c201da71cc3f615ba9655996c8
|
/src/com/orte/javaessential/modifexample/package2/ExamplePackage2.java
|
d23114da5be8214563e3b3e2092b095ad05f8c61
|
[] |
no_license
|
Orte82/JastApp
|
471e633611df3c66c5b95df8c6b71bb285f82422
|
2d40932b692af9b6b122fd4733cf644971cfd222
|
refs/heads/master
| 2020-07-29T09:48:58.058765
| 2019-09-20T09:16:25
| 2019-09-20T09:16:25
| 209,751,648
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 310
|
java
|
package com.orte.javaessential.modifexample.package2;
public class ExamplePackage2 {
private String name = "private";
String name2 = "package"; //package private => only package classes
protected String name3 = "protected"; // package classes and descendants
public String name4 = "public";
}
|
[
"kortes29@gmail.com"
] |
kortes29@gmail.com
|
17df41e9e3592e0b18a531a75942923c19ff1418
|
d3ae635b8a19aa54855b080c69a9bd73d6ba196a
|
/core/mybatis-generator-systests-mybatis3/src/test/java/mbg/test/mb3/generated/annotated/conditional/model/Pkblobs.java
|
39cce58ba2b152d727bb7d2782280557db1ea7a6
|
[
"Apache-2.0"
] |
permissive
|
357037959/mg-code
|
6afd09838997ed27b3f41cc36d8042969f57adec
|
9f32bc55b8adc7130f15b4e0d060721ceabc1310
|
refs/heads/master
| 2021-01-23T03:37:37.088271
| 2017-05-02T03:03:23
| 2017-05-02T03:03:23
| 86,106,318
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,482
|
java
|
package mbg.test.mb3.generated.annotated.conditional.model;
import java.io.Serializable;
import java.util.Arrays;
public class Pkblobs implements Serializable {
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PKBLOBS.ID
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
private Integer id;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PKBLOBS.BLOB1
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
private byte[] blob1;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PKBLOBS.BLOB2
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
private byte[] blob2;
/**
*
* This field was generated by MyBatis Generator.
* This field corresponds to the database column PKBLOBS.CHARACTERLOB
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
private String characterlob;
/**
* This field was generated by MyBatis Generator.
* This field corresponds to the database table PKBLOBS
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
private static final long serialVersionUID = 1L;
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PKBLOBS.ID
*
* @return the value of PKBLOBS.ID
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public Integer getId() {
return id;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PKBLOBS.ID
*
* @param id the value for PKBLOBS.ID
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public void setId(Integer id) {
this.id = id;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PKBLOBS.BLOB1
*
* @return the value of PKBLOBS.BLOB1
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public byte[] getBlob1() {
return blob1;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PKBLOBS.BLOB1
*
* @param blob1 the value for PKBLOBS.BLOB1
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public void setBlob1(byte[] blob1) {
this.blob1 = blob1;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PKBLOBS.BLOB2
*
* @return the value of PKBLOBS.BLOB2
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public byte[] getBlob2() {
return blob2;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PKBLOBS.BLOB2
*
* @param blob2 the value for PKBLOBS.BLOB2
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public void setBlob2(byte[] blob2) {
this.blob2 = blob2;
}
/**
* This method was generated by MyBatis Generator.
* This method returns the value of the database column PKBLOBS.CHARACTERLOB
*
* @return the value of PKBLOBS.CHARACTERLOB
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public String getCharacterlob() {
return characterlob;
}
/**
* This method was generated by MyBatis Generator.
* This method sets the value of the database column PKBLOBS.CHARACTERLOB
*
* @param characterlob the value for PKBLOBS.CHARACTERLOB
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
public void setCharacterlob(String characterlob) {
this.characterlob = characterlob == null ? null : characterlob.trim();
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PKBLOBS
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
@Override
public boolean equals(Object that) {
if (this == that) {
return true;
}
if (that == null) {
return false;
}
if (getClass() != that.getClass()) {
return false;
}
Pkblobs other = (Pkblobs) that;
return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
&& (Arrays.equals(this.getBlob1(), other.getBlob1()))
&& (Arrays.equals(this.getBlob2(), other.getBlob2()))
&& (this.getCharacterlob() == null ? other.getCharacterlob() == null : this.getCharacterlob().equals(other.getCharacterlob()));
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table PKBLOBS
*
* @mbg.generated Sat Mar 25 03:24:58 CST 2017
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
result = prime * result + (Arrays.hashCode(getBlob1()));
result = prime * result + (Arrays.hashCode(getBlob2()));
result = prime * result + ((getCharacterlob() == null) ? 0 : getCharacterlob().hashCode());
return result;
}
}
|
[
"357037959@qq.com"
] |
357037959@qq.com
|
9edf8492f77b9bc2f1535c93ae4e3244d4fe37d2
|
a30e41fa5f9973a044bcda559b6459200b66c886
|
/app/src/main/java/com/dolphpire/instamanage/iglogin/IGLoginActivity.java
|
346e5080f9d2652119bf4ae42c67646f6fc7f7fd
|
[
"Apache-2.0"
] |
permissive
|
teogor/instagram-get-android
|
a38a7092de3905bcc22a6ac1f18f2e5cca7e75b3
|
ca1da69cc75a752bd6cde555d44f3b4a05ca5d8e
|
refs/heads/master
| 2023-02-24T12:41:39.970639
| 2020-08-17T22:59:03
| 2020-08-17T22:59:03
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,086
|
java
|
package com.dolphpire.instamanage.iglogin;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.Log;
import android.view.KeyEvent;
import android.view.View;
import android.view.inputmethod.EditorInfo;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import androidx.appcompat.app.AppCompatActivity;
import com.dolphpire.android.material.textfield.TextInputEditText;
import com.dolphpire.android.material.textfield.TextInputLayout;
import com.dolphpire.api.initializer.DolphPireApp;
import com.dolphpire.insapi.manager.IGCommonFieldsManager;
import com.dolphpire.insapi.request.InsRequestCallBack;
import com.dolphpire.insapi.request.api.follower.FollowersResponseData;
import com.dolphpire.insapi.request.api.header.GetHeaderRequest;
import com.dolphpire.insapi.request.api.login.LoginRequest;
import com.dolphpire.insapi.request.api.login.LoginResponseData;
import com.dolphpire.insapi.response.InsBaseResponseData;
import com.dolphpire.instamanage.R;
import java.util.Objects;
import butterknife.BindView;
import butterknife.ButterKnife;
import static com.dolphpire.instamanage.utils.Utils.hideKeyboard;
public class IGLoginActivity extends AppCompatActivity
{
@BindView(R.id.imvBack)
ImageView imvBack;
@BindView(R.id.llLoginHolder)
LinearLayout llLoginHolder;
@BindView(R.id.llTermsPolicy)
LinearLayout llTermsPolicy;
@BindView(R.id.llLoadingHolder)
RelativeLayout llLoadingHolder;
@BindView(R.id.llLoginButton)
LinearLayout llLoginButton;
@BindView(R.id.tilLogIn)
TextInputLayout tilLogIn;
@BindView(R.id.tietLogIn)
TextInputEditText tietLogIn;
@BindView(R.id.tilPassword)
TextInputLayout tilPassword;
@BindView(R.id.tietPassword)
TextInputEditText tietPassword;
FollowersResponseData mFollowersResponseData = new FollowersResponseData();
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_ig_login);
ButterKnife.bind(this);
imvBack.setOnClickListener(view -> finish());
tietPassword.setOnEditorActionListener((v, actionId, event) ->
{
if ((event != null && (event.getKeyCode() == KeyEvent.KEYCODE_ENTER)) || (actionId == EditorInfo.IME_ACTION_DONE))
{
tryLogin();
}
return false;
});
llLoginButton.setOnClickListener(v -> tryLogin());
llLoadingHolder.setVisibility(View.GONE);
}
private void tryLogin()
{
hideKeyboard(IGLoginActivity.this);
llLoadingHolder.setVisibility(View.VISIBLE);
llLoginHolder.setVisibility(View.GONE);
llTermsPolicy.setVisibility(View.GONE);
if (validateInput())
{
String inputData = Objects.requireNonNull(tietLogIn.getText()).toString().trim();
String password = Objects.requireNonNull(tietPassword.getText()).toString().trim();
getCsftoken();
LoginRequest loginRequest = new LoginRequest(inputData, password);
loginRequest.execute(new InsRequestCallBack<LoginResponseData>()
{
@Override
public void onSuccess(int statusCode, LoginResponseData insBaseData)
{
LoginResponseData.LoggedInUserBean loggedInUserBean;
if (insBaseData != null && (loggedInUserBean = insBaseData.getLogged_in_user()) != null)
{
String pkId = String.valueOf(loggedInUserBean.getPk());
if (!TextUtils.isEmpty(pkId))
{
IGCommonFieldsManager.getInstance().savePKID(pkId);
DolphPireApp.initializeApi()
.igAccount()
.linkAccount()
.withIGID(loggedInUserBean.getPk())
.withPassword(password)
.withUsername(loggedInUserBean.getUsername())
.withProfilePicture(loggedInUserBean.getProfile_pic_url())
.isPrivate(loggedInUserBean.isIs_private())
.set()
.addOnCompleteListener(() -> finish())
.addOnFailureListener(e ->
{
llLoadingHolder.setVisibility(View.GONE);
llLoginHolder.setVisibility(View.VISIBLE);
llTermsPolicy.setVisibility(View.VISIBLE);
})
.execute();
} else
{
llLoadingHolder.setVisibility(View.GONE);
llLoginHolder.setVisibility(View.VISIBLE);
llTermsPolicy.setVisibility(View.VISIBLE);
}
}
}
@Override
public void onFailure(int errorCode, String errorMsg)
{
if (errorMsg.contains("username"))
{
tilLogIn.setErrorEnabled(true);
tilLogIn.setError("Bad login key");
} else if (errorMsg.contains("password"))
{
tilPassword.setErrorEnabled(true);
tilPassword.setError("Bad password");
}
llLoadingHolder.setVisibility(View.GONE);
llLoginHolder.setVisibility(View.VISIBLE);
llTermsPolicy.setVisibility(View.VISIBLE);
}
});
} else
{
llLoadingHolder.setVisibility(View.GONE);
llLoginHolder.setVisibility(View.VISIBLE);
llTermsPolicy.setVisibility(View.VISIBLE);
}
}
private boolean validateInput()
{
boolean validData = true;
String inputData = Objects.requireNonNull(tietLogIn.getText()).toString().trim();
String password = Objects.requireNonNull(tietPassword.getText()).toString().trim();
if (inputData.isEmpty())
{
tilLogIn.setErrorEnabled(true);
tilLogIn.setError("Empty field");
validData = false;
} else
{
tilLogIn.setErrorEnabled(false);
}
if (password.isEmpty())
{
tilPassword.setErrorEnabled(true);
tilPassword.setError("Empty field");
validData = false;
} else
{
tilPassword.setErrorEnabled(false);
}
return validData;
}
private void getCsftoken()
{
final GetHeaderRequest getHeaderRequest = new GetHeaderRequest();
getHeaderRequest.execute(new InsRequestCallBack()
{
@Override
public void onSuccess(int statusCode, InsBaseResponseData insBaseData)
{
String csrfCookie = getHeaderRequest.getCsrfCookie();
Log.d("succeed", "get Csftoken onSuccess,csrfCookie = " + csrfCookie);
}
@Override
public void onFailure(int errorCode, String errorMsg)
{
Log.d("error", "get Csftoken onFailure ");
}
});
}
@Override
protected void onStart()
{
super.onStart();
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
@Override
protected void onDestroy()
{
super.onDestroy();
overridePendingTransition(R.anim.fade_in, R.anim.fade_out);
}
@Override
public void onBackPressed()
{
super.onBackPressed();
}
}
|
[
"grigor.teodor@gmail.com"
] |
grigor.teodor@gmail.com
|
07a8377ffaaaa390a4cd8a1403b843a9389430c7
|
cacec52e5653ab773d35d7f1b4f4f660580d7826
|
/web-admin/src/main/java/com/alipay/api/domain/CraftsmanSubAssessment.java
|
89e0542f1f59b57be1d2f42ab8a549f894a6dbb5
|
[] |
no_license
|
liuyuhua1984/GameAdminWeb
|
6d830e7ad1551ac1803abd12e9359c6bfd5965ec
|
c590fd88d768c8231e2160bf7415996b0027ac98
|
refs/heads/master
| 2021-08-28T13:40:50.540862
| 2017-12-12T10:20:06
| 2017-12-12T10:20:06
| 106,268,614
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 711
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 手艺人子评分项
*
* @author auto create
* @since 1.0, 2017-10-26 10:35:48
*/
public class CraftsmanSubAssessment extends AlipayObject {
private static final long serialVersionUID = 6775955574439499762L;
/**
* 子评分
*/
@ApiField("score")
private Long score;
/**
* 子评分项名
*/
@ApiField("title")
private String title;
public Long getScore() {
return this.score;
}
public void setScore(Long score) {
this.score = score;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
}
|
[
"lyh@163.com"
] |
lyh@163.com
|
894c260415abdd9e71ba0aa92be1d02cf6f8a208
|
43dd94ca10e0bf109aff08a2b712eb4650dab694
|
/src/main/java/com/yanxiu/ce/core/train/dao/ProjectUserStatusDao.java
|
5e93079739959da1c732f20995bd4d2dfb840f7c
|
[] |
no_license
|
tangmin721/cedu
|
7c0c49dbfd149dc46e68444cb37eb7247798fa8a
|
56eb29689ee68809053a88df41741497cb270f75
|
refs/heads/master
| 2021-01-19T08:24:20.630218
| 2017-04-08T10:00:26
| 2017-04-08T10:00:26
| 87,624,482
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,145
|
java
|
package com.yanxiu.ce.core.train.dao;
import org.apache.ibatis.annotations.Param;
import com.yanxiu.ce.common.core.dao.BaseDao;
import com.yanxiu.ce.common.mybatis.annotation.MybatisDao;
import com.yanxiu.ce.core.train.entity.ProjectRoster;
import com.yanxiu.ce.core.train.entity.ProjectUserStatus;
import com.yanxiu.ce.core.train.entity.ProjectUserStatusQuery;
/**
* 项目用户状态管理
* @author tangmin
* @date 2016-06-23 12:34:37
*/
@MybatisDao
public interface ProjectUserStatusDao extends BaseDao<ProjectUserStatus, ProjectUserStatusQuery>{
/**
* 获取seq
* @return Integer
*/
Integer selectMaxSeq();
/**
* 查找name为@name,且id不为@id的记录条数
* @param code
* @param id
* @return
*/
public Long selectCheckNameExit(@Param("name")String name,@Param("id")Long id);
/**
* 一个项目,根据以下查询条件是唯一的(相当于selectById)
* @return
*/
ProjectUserStatus selectOneStatus(@Param("pid")Long pid,
@Param("province")Integer province,@Param("city")Integer city,
@Param("town")Integer town,@Param("school")Long school,@Param("userType") Integer userType);
}
|
[
"191102902@qq.com"
] |
191102902@qq.com
|
a2e4288d237f6586c04292f3aeea90a5559d5c62
|
7e1511cdceeec0c0aad2b9b916431fc39bc71d9b
|
/flakiness-predicter/input_data/original_tests/doanduyhai-Achilles/nonFlakyMethods/info.archinnov.achilles.internal.statement.cache.CacheManagerTest-should_generate_insert_prepared_statement_when_not_found_in_cache.java
|
927c20d7a0bacb6b19a05009df7469d74b6dde60
|
[
"BSD-3-Clause"
] |
permissive
|
Taher-Ghaleb/FlakeFlagger
|
6fd7c95d2710632fd093346ce787fd70923a1435
|
45f3d4bc5b790a80daeb4d28ec84f5e46433e060
|
refs/heads/main
| 2023-07-14T16:57:24.507743
| 2021-08-26T14:50:16
| 2021-08-26T14:50:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,083
|
java
|
@Test public void should_generate_insert_prepared_statement_when_not_found_in_cache() throws Exception {
EntityMeta meta=new EntityMeta();
meta.setTableName("table");
PropertyMeta nameMeta=completeBean(Void.class,String.class).field("name").type(SIMPLE).build();
PropertyMeta ageMeta=completeBean(Void.class,String.class).field("age").type(SIMPLE).build();
List<PropertyMeta> pms=asList(nameMeta,ageMeta);
when(context.<CompleteBean>getEntityClass()).thenReturn(CompleteBean.class);
when(context.getEntityMeta()).thenReturn(meta);
when(cache.getIfPresent(cacheKeyCaptor.capture())).thenReturn(null);
when(generator.prepareInsert(session,meta,pms,noOptions())).thenReturn(ps);
PreparedStatement actual=manager.getCacheForEntityInsert(session,cache,context,pms);
assertThat(actual).isSameAs(ps);
StatementCacheKey cacheKey=cacheKeyCaptor.getValue();
assertThat(cacheKey.<CompleteBean>getEntityClass()).isSameAs(CompleteBean.class);
assertThat(cacheKey.getType()).isEqualTo(CacheType.INSERT);
assertThat(cacheKey.getFields()).containsOnly("name","age");
}
|
[
"aalsha2@masonlive.gmu.edu"
] |
aalsha2@masonlive.gmu.edu
|
2a6597e34f632b16074170be1fb49223409b4fa1
|
3bab81792c722411c542596fedc8e4b1d086c1a9
|
/src/main/java/com/gome/maven/pom/PomModel.java
|
5b48abe3b0c21214e2237d2fbf1512fa35d5cce6
|
[] |
no_license
|
nicholas879110/maven-code-check-plugin
|
80d6810cc3c12a3b6c22e3eada331136e3d9a03e
|
8162834e19ed0a06ae5240b5e11a365c0f80d0a0
|
refs/heads/master
| 2021-04-30T07:09:42.455482
| 2018-03-01T03:21:21
| 2018-03-01T03:21:21
| 121,457,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,435
|
java
|
/*
* Copyright 2000-2009 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.gome.maven.pom;
import com.gome.maven.openapi.Disposable;
import com.gome.maven.openapi.util.UserDataHolder;
import com.gome.maven.pom.event.PomModelListener;
import com.gome.maven.util.IncorrectOperationException;
import java.util.Set;
public interface PomModel extends UserDataHolder {
<T extends PomModelAspect> T getModelAspect( Class<T> aClass);
void registerAspect( Class<? extends PomModelAspect> aClass,
PomModelAspect aspect,
Set<PomModelAspect> dependencies);
void addModelListener( PomModelListener listener);
void addModelListener( PomModelListener listener, Disposable parentDisposable);
void removeModelListener( PomModelListener listener);
void runTransaction( PomTransaction transaction) throws IncorrectOperationException;
}
|
[
"zhangliewei@gome.com.cn"
] |
zhangliewei@gome.com.cn
|
a57817d81fd579e2ba8d5020153f8b92ce95dc83
|
97a48e7ef9a50362dd88d22ff05cdeb7adf41c6b
|
/src/main/java/lib/org/bouncycastle/asn1/DERGeneralString.java
|
f297360d3dfbeec0729b6550a936c7aca26b06c9
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
gusmp/appletCatcertDI
|
2164a6dd7c3f1568eb7e30f6e13338df02b84118
|
868da9683aa8946a9d60d902d93789a9157a489d
|
refs/heads/master
| 2021-01-20T21:49:26.039179
| 2018-08-18T11:29:15
| 2018-08-18T11:29:15
| 6,111,520
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,145
|
java
|
package lib.org.bouncycastle.asn1;
import java.io.IOException;
public class DERGeneralString
extends ASN1Object implements DERString
{
private String string;
public static DERGeneralString getInstance(
Object obj)
{
if (obj == null || obj instanceof DERGeneralString)
{
return (DERGeneralString) obj;
}
if (obj instanceof ASN1OctetString)
{
return new DERGeneralString(((ASN1OctetString) obj).getOctets());
}
if (obj instanceof ASN1TaggedObject)
{
return getInstance(((ASN1TaggedObject) obj).getObject());
}
throw new IllegalArgumentException("illegal object in getInstance: "
+ obj.getClass().getName());
}
public static DERGeneralString getInstance(
ASN1TaggedObject obj,
boolean explicit)
{
return getInstance(obj.getObject());
}
public DERGeneralString(byte[] string)
{
char[] cs = new char[string.length];
for (int i = 0; i != cs.length; i++)
{
cs[i] = (char)(string[i] & 0xff);
}
this.string = new String(cs);
}
public DERGeneralString(String string)
{
this.string = string;
}
public String getString()
{
return string;
}
public String toString()
{
return string;
}
public byte[] getOctets()
{
char[] cs = string.toCharArray();
byte[] bs = new byte[cs.length];
for (int i = 0; i != cs.length; i++)
{
bs[i] = (byte) cs[i];
}
return bs;
}
void encode(DEROutputStream out)
throws IOException
{
out.writeEncoded(GENERAL_STRING, this.getOctets());
}
public int hashCode()
{
return this.getString().hashCode();
}
boolean asn1Equals(DERObject o)
{
if (!(o instanceof DERGeneralString))
{
return false;
}
DERGeneralString s = (DERGeneralString) o;
return this.getString().equals(s.getString());
}
}
|
[
"none@none.es"
] |
none@none.es
|
cdaa0cea603282b3af33704e8aba0fd8b688a163
|
13cbb329807224bd736ff0ac38fd731eb6739389
|
/com/sun/xml/internal/ws/wsdl/writer/document/soap12/HeaderFault.java
|
8d462ce36ea7cc78b2787287a568ec253f14d0a8
|
[] |
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
| 626
|
java
|
package com.sun.xml.internal.ws.wsdl.writer.document.soap12;
import com.sun.xml.internal.txw2.TypedXmlWriter;
import com.sun.xml.internal.txw2.annotation.XmlAttribute;
import com.sun.xml.internal.txw2.annotation.XmlElement;
import javax.xml.namespace.QName;
@XmlElement("headerFault")
public interface HeaderFault extends TypedXmlWriter, BodyType {
@XmlAttribute
HeaderFault message(QName paramQName);
}
/* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\xml\internal\ws\wsdl\writer\document\soap12\HeaderFault.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/
|
[
"michael__lee@yeah.net"
] |
michael__lee@yeah.net
|
bfd25136ab8b28eef31c9fcb0fced6c4860f504b
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_751552cb707767b196f7ff3817bfb5dd25297cad/InventoryChecker/2_751552cb707767b196f7ff3817bfb5dd25297cad_InventoryChecker_s.java
|
05c5381b626c225dd0bad735c6541f12c99feb32
|
[] |
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,400
|
java
|
package com.herocraftonline.dev.heroes.inventory;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;
import com.herocraftonline.dev.heroes.Heroes;
import com.herocraftonline.dev.heroes.classes.HeroClass;
import com.herocraftonline.dev.heroes.classes.HeroClass.WeaponItems;
import com.herocraftonline.dev.heroes.persistence.Hero;
import com.herocraftonline.dev.heroes.util.MaterialUtil;
import com.herocraftonline.dev.heroes.util.Messaging;
public class InventoryChecker {
private Heroes plugin;
private boolean allowHats = false;
public InventoryChecker(Heroes plugin) {
this.plugin = plugin;
this.allowHats = plugin.getConfigManager().getProperties().allowHats;
}
public void checkInventory(Player p) {
PlayerInventory inv = p.getInventory();
Hero h = plugin.getHeroManager().getHero(p);
HeroClass hc = h.getHeroClass();
int removedCount = 0;
int count = 0;
String item;
if (inv.getHelmet() != null && inv.getHelmet().getTypeId() != 0 && !allowHats) {
item = inv.getHelmet().getType().toString();
if (!hc.getAllowedArmor().contains(item) && !hc.getAllowedArmor().contains("*")) {
if (moveItem(p, -1, inv.getHelmet())) {
removedCount++;
}
inv.setHelmet(null);
count++;
}
}
if (inv.getChestplate() != null && inv.getChestplate().getTypeId() != 0) {
item = inv.getChestplate().getType().toString();
if (!hc.getAllowedArmor().contains(item) && !hc.getAllowedArmor().contains("*")) {
if (moveItem(p, -1, inv.getChestplate())) {
removedCount++;
}
inv.setChestplate(null);
count++;
}
}
if (inv.getLeggings() != null && inv.getLeggings().getTypeId() != 0) {
item = inv.getLeggings().getType().toString();
if (!hc.getAllowedArmor().contains(item) && !hc.getAllowedArmor().contains("*")) {
if (moveItem(p, -1, inv.getLeggings())) {
removedCount++;
}
inv.setLeggings(null);
count++;
}
}
if (inv.getBoots() != null && inv.getBoots().getTypeId() != 0) {
item = inv.getBoots().getType().toString();
if (!hc.getAllowedArmor().contains(item) && !hc.getAllowedArmor().contains("*")) {
if (moveItem(p, -1, inv.getBoots())) {
removedCount++;
}
inv.setBoots(null);
count++;
}
}
for (int i = 0; i < 9; i++) {
ItemStack itemStack = inv.getItem(i);
String itemType = itemStack.getType().toString();
// Perform a check to see if what we have is a Weapon.
if (!itemType.equalsIgnoreCase("BOW")) {
try {
WeaponItems.valueOf(itemType.substring(itemType.indexOf("_") + 1, itemType.length()));
} catch (IllegalArgumentException e1) {
continue;
}
}
if (!hc.getAllowedWeapons().contains(itemType)) {
if (moveItem(p, i, itemStack)) {
removedCount++;
}
count++;
}
}
// If items were removed from the Players inventory then we need to alert them of such event.
if (removedCount > 0) {
Messaging.send(p, "$1 have been removed from your inventory due to class restrictions.", removedCount + " Items");
Messaging.send(p, "Please make space in your inventory then type '$1'", "/heroes recoveritems");
}
// If any items were removed or moved in the inventory then we need to make sure the Client is in Sync.
if (count > 0) {
syncInventory(p);
}
}
/**
* Check the given Players inventory for any Armor or Weapons which are restricted.
*
* @param name
*/
public void checkInventory(String name) {
Player player = Bukkit.getServer().getPlayer(name);
if (player != null) {
checkInventory(player);
}
}
/**
* Grab the first empty INVENTORY SLOT, skips the Hotbar.
*
* @param p
* @return
*/
public int firstEmpty(Player p) {
ItemStack[] inventory = p.getInventory().getContents();
for (int i = 9; i < inventory.length; i++) {
if (inventory[i] == null) {
return i;
}
}
return -1;
}
/**
* Move the selected Item to an available slot, if a slot does not exist then we remove it from the inventory.
*
* @param p
* @param slot
* @param item
* @return
*/
public boolean moveItem(Player p, int slot, ItemStack item) {
PlayerInventory inv = p.getInventory();
Hero h = plugin.getHeroManager().getHero(p);
int empty = firstEmpty(p);
if (empty == -1) {
h.addRecoveryItem(item);
if (slot != -1) {
inv.setItem(slot, null);
}
return true;
} else {
inv.setItem(empty, item);
if (slot != -1) {
inv.setItem(slot, null);
}
Messaging.send(p, "You are not trained to use a $1.", MaterialUtil.getFriendlyName(item.getType()));
return false;
}
}
/**
* Synchronize the Clients Inventory with the Server. This is dealt during a scheduler so it happens after ANY
* changes are made.
* Synchronizing during changes often results in the client losing Sync.
*
* @param player
*/
public void syncInventory(final Player player) {
plugin.getServer().getScheduler().scheduleSyncDelayedTask(plugin, new Runnable() {
@SuppressWarnings("deprecation")
public void run() {
player.updateInventory();
}
});
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d4af34bef92c9778c7927424fb6e1c65751c0ba9
|
47bdf7c2b72ba7b57bb9cc2ce0b94a21af4ed795
|
/information_android/asmack/org/jivesoftware/smackx/workgroup/settings/SearchSettings.java
|
c00f54055d76772fd19d9ce1ca57a646e79513b6
|
[] |
no_license
|
srsman/information
|
a37151d3a04f6188a9919c143a2efa6355226482
|
e943c34f94c620aedde22983e6520c6c5cf86073
|
refs/heads/master
| 2021-01-17T23:09:06.372954
| 2016-04-09T10:52:04
| 2016-04-09T10:52:04
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,546
|
java
|
/**
* Copyright 2003-2007 Jive Software.
* <p>
* 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
* <p>
* http://www.apache.org/licenses/LICENSE-2.0
* <p>
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.jivesoftware.smackx.workgroup.settings;
import org.jivesoftware.smackx.workgroup.util.ModelUtil;
import org.jivesoftware.smack.packet.IQ;
import org.jivesoftware.smack.provider.IQProvider;
import org.xmlpull.v1.XmlPullParser;
public class SearchSettings extends IQ {
private String forumsLocation;
private String kbLocation;
public boolean isSearchEnabled() {
return ModelUtil.hasLength(getForumsLocation()) && ModelUtil.hasLength(getKbLocation());
}
public String getForumsLocation() {
return forumsLocation;
}
public void setForumsLocation(String forumsLocation) {
this.forumsLocation = forumsLocation;
}
public String getKbLocation() {
return kbLocation;
}
public void setKbLocation(String kbLocation) {
this.kbLocation = kbLocation;
}
public boolean hasKB() {
return ModelUtil.hasLength(getKbLocation());
}
public boolean hasForums() {
return ModelUtil.hasLength(getForumsLocation());
}
/**
* Element name of the packet extension.
*/
public static final String ELEMENT_NAME = "search-settings";
/**
* Namespace of the packet extension.
*/
public static final String NAMESPACE = "http://jivesoftware.com/protocol/workgroup";
@Override
public String getChildElementXML() {
StringBuilder buf = new StringBuilder();
buf.append("<").append(ELEMENT_NAME).append(" xmlns=");
buf.append('"');
buf.append(NAMESPACE);
buf.append('"');
buf.append("></").append(ELEMENT_NAME).append("> ");
return buf.toString();
}
/**
* Packet extension provider for AgentStatusRequest packets.
*/
public static class InternalProvider implements IQProvider {
@Override
public IQ parseIQ(XmlPullParser parser) throws Exception {
if (parser.getEventType() != XmlPullParser.START_TAG) {
throw new IllegalStateException("Parser not in proper position, or bad XML.");
}
SearchSettings settings = new SearchSettings();
boolean done = false;
String kb = null;
String forums = null;
while (!done) {
int eventType = parser.next();
if ((eventType == XmlPullParser.START_TAG) && ("forums".equals(parser.getName()))) {
forums = parser.nextText();
} else if ((eventType == XmlPullParser.START_TAG) && ("kb".equals(parser.getName()))) {
kb = parser.nextText();
} else if (eventType == XmlPullParser.END_TAG && "search-settings".equals(parser.getName())) {
done = true;
}
}
settings.setForumsLocation(forums);
settings.setKbLocation(kb);
return settings;
}
}
}
|
[
"1047860491@qq.com"
] |
1047860491@qq.com
|
51bb7f78b42a39f7b5125a80c09d067af23c92bd
|
e7ad19b061b426e07c137e43f2a10c1049d084ae
|
/src/main/java/com/google/code/p/keytooliui/shared/swing/panel/PSelBtnTfdUrlRem.java
|
29eeacb6506943f754adb23a7a4c9bb6bef19dee
|
[] |
no_license
|
tevjef/keytool-iui
|
30ebb50de207807ab9458be9ac2419b11d029a24
|
f67762175af7192fca3a40025e10543220eeabdb
|
refs/heads/master
| 2020-03-21T03:26:19.263391
| 2018-06-20T15:41:52
| 2018-06-20T15:41:52
| 138,053,362
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,919
|
java
|
/*
*
* Copyright (c) 2001-2011 keyTool IUI Project.
* LGPL License.
* http://code.google.com/p/keytool-iui/
*
* This software is the confidential and proprietary information of RagingCat Project.
* You shall not disclose such confidential information and shall use it only in
* accordance with the terms of RagingCat Project's license agreement.
*
* THE SOFTWARE IS PROVIDED AND LICENSED "AS IS" WITHOUT WARRANTY OF ANY KIND,
* EITHER EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
* LICENSE FOR THE SOFTWARE DOES NOT INCLUDE ANY CONSIDERATION FOR ASSUMPTION OF RISK
* BY KEYTOOL IUI PROJECT, AND KEYTOOL IUI PROJECT DISCLAIMS ANY AND ALL LIABILITY FOR INCIDENTAL
* OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR OPERATION OF OR INABILITY
* TO USE THE SOFTWARE, EVEN IF KEYTOOL IUI PROJECT HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
*
*/
package com.google.code.p.keytooliui.shared.swing.panel;
/**
a panel that displays, from left to right:
. 1 buttonSelect
. 1 buttonClearSelection
. 1 textfieldSelection
textfield is not editable, width = 30
... used to select a string
eg: keypass, storepass, alias
**/
import com.google.code.p.keytooliui.shared.swing.textfield.*;
import com.google.code.p.keytooliui.shared.swing.optionpane.*;
import com.google.code.p.keytooliui.shared.lang.*;
import java.awt.*;
final public class PSelBtnTfdUrlRem extends PSelBtnTfdStrWAbs
{
// --------------------
// FINAL STATIC PRIVATE
final static private int _f_s_intNbCharMin = 9;
// ------
// PUBLIC
public PSelBtnTfdUrlRem(
javax.swing.event.DocumentListener docListenerParent,
Frame frmParent,
String strTitleAppli,
String strLabel,
Object objDocPropValue,
boolean blnFieldRequired
)
{
super(
frmParent,
strTitleAppli,
strLabel,
new TF30x20SelUrlRem(docListenerParent),
objDocPropValue,
blnFieldRequired
);
}
// ---------
// PROTECTED
/**
called by superclass,
overwrite superclass's method
**/
protected boolean _validateText_(String str)
{
String strMethod = "_validateText_(str)";
String strBodyWrongBeg =
"Wrong remote URL value!" +
"\n" +
"\n"
;
String strBodyWrongEnd =
"\n\n" +
"EG, correct URL:" +
"\n" +
" " +
"\"http://www.foo.com\""
;
if (str == null)
{
MySystem.s_printOutError(this, strMethod, "nil strText");
return false;
}
str = str.trim(); // not really needed!, done in calling methods
if ((str.indexOf(' ') != -1))
{
MySystem.s_printOutWarning(this, strMethod, "str.indexOf(' ') != -1");
String strWhat = "No spaces allowed.";
_showDialogWarning(strWhat, str);
return true;
}
if (str.length() < _f_s_intNbCharMin)
{
MySystem.s_printOutWarning(this, strMethod, "str.length() < _f_s_intNbCharMin");
String strWhat = "Value requires at least ";
strWhat += Integer.toString(_f_s_intNbCharMin);
strWhat += " chars.";
_showDialogWarning(strWhat, str);
return true;
}
if (! str.toLowerCase().startsWith("http"))
{
MySystem.s_printOutWarning(this, strMethod, "! str.toLowerCase().startsWith(\"http\")");
String strWhat = "Value should start with \"http\"";
_showDialogWarning(strWhat, str);
return true;
}
if (str.indexOf('.') == -1)
{
MySystem.s_printOutWarning(this, strMethod, "str.indexOf('.') == -1");
String strWhat = "Value does not contain any \".\" char.";
_showDialogWarning(strWhat, str);
return true;
}
if (str.indexOf("://") == -1)
{
MySystem.s_printOutWarning(this, strMethod, "str.indexOf(\"://\") == -1");
String strWhat = "Value does not contain \"://\".";
_showDialogWarning(strWhat, str);
return true;
}
// ending
return super._validateText_(str);
}
// -------
// PRIVATE
private void _showDialogWarning(String strWhat, String strValue)
{
String strBodyWrongBeg =
"Wrong remote URL value!" +
"\n" +
"\n"
;
String strBodyWrongEnd =
"\n\n" +
"EG, correct URL:" +
"\n" +
" " +
"\"http://www.foo.com\""
;
String strBodyWrongMid =
"\n\n" +
"Value entered:" +
"\n" +
" " +
"\"" +
strValue +
"\""
;
String strBody = new String();
strBody += strBodyWrongBeg;
strBody += strWhat;
strBody += strBodyWrongMid;
strBody += strBodyWrongEnd;
OPAbstract.s_showDialogWarning(super._frmParent_, super._strTitleAppli_, strBody);
}
}
|
[
"tevin@prolificinteractive.com"
] |
tevin@prolificinteractive.com
|
eb8555039b54f122fad4cb3247b3a28762393654
|
56e701011e34cd9f5933d60469ed66e04a673f69
|
/src/main/java/demo/spring/boot/demospringboot/sdxd/common/api/common/web/doc/RestOperationParameterReader.java
|
4829971a1a16d324ab2d41d5d19d50d9990cd059
|
[] |
no_license
|
chao313/ssh-docker
|
b91f93a7e9eb0b6258bceb8918c0847a57c796c4
|
02a1a5ced7c1332d8c9eae8787bd297dc30c5b5c
|
refs/heads/master
| 2021-01-25T11:27:21.241817
| 2018-04-25T06:37:55
| 2018-04-25T06:37:55
| 123,397,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,746
|
java
|
//package demo.spring.boot.demospringboot.sdxd.common.api.common.web.doc;
//
//import com.google.common.base.Predicate;
//import com.google.common.collect.FluentIterable;
//
//import com.fasterxml.classmate.ResolvedType;
//
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.ModelAttribute;
//
//import java.lang.annotation.Annotation;
//import java.util.List;
//import java.util.Set;
//
//import springfox.documentation.builders.ParameterBuilder;
//import springfox.documentation.service.Parameter;
//import springfox.documentation.service.ResolvedMethodParameter;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spi.service.contexts.OperationContext;
//import springfox.documentation.spi.service.contexts.ParameterContext;
//import springfox.documentation.spring.web.plugins.DocumentationPluginsManager;
//import springfox.documentation.spring.web.readers.operation.OperationParameterReader;
//import springfox.documentation.spring.web.readers.parameter.ModelAttributeParameterExpander;
//
//import static com.google.common.base.Predicates.not;
//import static com.google.common.collect.Lists.newArrayList;
//import static springfox.documentation.schema.Collections.isContainerType;
//import static springfox.documentation.schema.Maps.isMapType;
//import static springfox.documentation.schema.Types.isBaseType;
//import static springfox.documentation.schema.Types.typeNameFor;
//
///**
// * *****************************************************************************
// * <p>
// * 功能名 :demo.spring.boot.demospringboot.sdxd.common.api.common.web.doc
// * 系统名 :
// * <p>
// * *****************************************************************************
// * Modification History
// * <p>
// * Date Name Reason for Change
// * ---------- ---------------------- -----------------------------------------
// * 16/11/2 melvin Created
// */
//public class RestOperationParameterReader extends OperationParameterReader {
//
// private final ModelAttributeParameterExpander expander;
//
// private Class<? extends Annotation>[] shouldExpandAnnotationTypes;
//
// @Autowired
// private DocumentationPluginsManager pluginsManager;
//
// public RestOperationParameterReader(ModelAttributeParameterExpander expander) {
// super(expander);
// this.expander = expander;
// }
//
// @Override
// public void apply(OperationContext context) {
// context.operationBuilder().parameters(context.getGlobalOperationParameters());
// context.operationBuilder().parameters(readParameters(context));
// }
//
// @Override
// public boolean supports(DocumentationType delimiter) {
// return true;
// }
//
// @SafeVarargs
// public final void setShouldExpandAnnotationTypes(Class<? extends Annotation>... shouldExpandAnnotationTypes) {
// this.shouldExpandAnnotationTypes = shouldExpandAnnotationTypes;
// }
//
// private List<Parameter> readParameters(final OperationContext context) {
//
// List<ResolvedMethodParameter> methodParameters = context.getParameters();
// List<Parameter> parameters = newArrayList();
//
// for (ResolvedMethodParameter methodParameter : methodParameters) {
// ResolvedType alternate = context.alternateFor(methodParameter.getParameterType());
// if (!shouldIgnore(methodParameter, alternate, context.getIgnorableParameterTypes())) {
//
// ParameterContext parameterContext = new ParameterContext(methodParameter,
// new ParameterBuilder(),
// context.getDocumentationContext(),
// context.getGenericsNamingStrategy(),
// context);
//
// if (shouldExpand(methodParameter, alternate)) {
// parameters.addAll(
// expander.expand(
// "",
// methodParameter.getParameterType(),
// context.getDocumentationContext()));
// } else {
// parameters.add(pluginsManager.parameter(parameterContext));
// }
// }
// }
// return FluentIterable.from(parameters).filter(not(hiddenParams())).toList();
// }
//
// private Predicate<Parameter> hiddenParams() {
// return new Predicate<Parameter>() {
// @Override
// public boolean apply(Parameter input) {
// return input.isHidden();
// }
// };
// }
//
// private boolean shouldIgnore(
// final ResolvedMethodParameter parameter,
// ResolvedType resolvedParameterType,
// final Set<Class> ignorableParamTypes) {
//
// if (ignorableParamTypes.contains(resolvedParameterType.getErasedType())) {
// return true;
// }
// return FluentIterable.from(ignorableParamTypes)
// .filter(isAnnotation())
// .filter(parameterIsAnnotatedWithIt(parameter)).size() > 0;
//
// }
//
// private Predicate<Class> parameterIsAnnotatedWithIt(final ResolvedMethodParameter parameter) {
// return new Predicate<Class>() {
// @Override
// public boolean apply(Class input) {
// return parameter.hasParameterAnnotation(input);
// }
// };
// }
//
// private Predicate<Class> isAnnotation() {
// return new Predicate<Class>() {
// @Override
// public boolean apply(Class input) {
// return Annotation.class.isAssignableFrom(input);
// }
// };
// }
//
// private boolean shouldExpand(final ResolvedMethodParameter parameter, ResolvedType resolvedParamType) {
// return (!parameter.hasParameterAnnotations() || parameter.hasParameterAnnotation(ModelAttribute.class) || includeAnnotations(parameter))
// && !isBaseType(typeNameFor(resolvedParamType.getErasedType()))
// && !resolvedParamType.getErasedType().isEnum()
// && !isContainerType(resolvedParamType)
// && !isMapType(resolvedParamType);
//
// }
//
// private boolean includeAnnotations(final ResolvedMethodParameter parameter) {
// boolean include = false;
// for (Class<? extends Annotation> type : shouldExpandAnnotationTypes) {
// if (parameter.hasParameterAnnotation(type)) {
// include = true;
// break;
// }
// }
// return include;
// }
//}
|
[
"m18888106873@163.com"
] |
m18888106873@163.com
|
09df099a918e206124a1e213fdacbb65027e954a
|
0f1f7332b8b06d3c9f61870eb2caed00aa529aaa
|
/ebean/tags/v1.1.0/src/com/avaje/ebean/server/persist/ExeUpdateSql.java
|
78ea94a004e5b0a8328a488240f13480435416fb
|
[] |
no_license
|
rbygrave/sourceforge-ebean
|
7e52e3ef439ed64eaf5ce48e0311e2625f7ee5ed
|
694274581a188be664614135baa3e4697d52d6fb
|
refs/heads/master
| 2020-06-19T10:29:37.011676
| 2019-12-17T22:09:29
| 2019-12-17T22:09:29
| 196,677,514
| 1
| 0
| null | 2019-12-17T22:07:13
| 2019-07-13T04:21:16
|
Java
|
UTF-8
|
Java
| false
| false
| 6,077
|
java
|
/**
* Copyright (C) 2006 Robin Bygrave
*
* This file is part of Ebean.
*
* Ebean is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or
* (at your option) any later version.
*
* Ebean 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 Ebean; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
package com.avaje.ebean.server.persist;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.persistence.PersistenceException;
import com.avaje.ebean.SqlUpdate;
import com.avaje.ebean.server.core.PersistRequestUpdateSql;
import com.avaje.ebean.server.core.ProtectedMethod;
import com.avaje.ebean.server.core.ServerTransaction;
import com.avaje.ebean.server.core.PersistRequestUpdateSql.SqlType;
import com.avaje.ebean.server.plugin.PluginDbConfig;
import com.avaje.ebean.server.util.BindParamsParser;
import com.avaje.ebean.util.BindParams;
/**
* Executes the UpdateSql requests.
*/
public class ExeUpdateSql {
private static final Logger logger = Logger.getLogger(ExeUpdateSql.class.getName());
private final Binder binder;
private final PstmtFactory pstmtFactory;
/**
* Create with a given plugin.
*/
public ExeUpdateSql(PluginDbConfig dbConfig) {
pstmtFactory = new PstmtFactory();
binder = dbConfig.getBinder();
}
/**
* Execute the UpdateSql request.
*/
public int execute(PersistRequestUpdateSql request) {
ServerTransaction t = request.getTransaction();
boolean batchThisRequest = t.isBatchThisRequest();
PreparedStatement pstmt = null;
try {
pstmt = bindStmt(request, batchThisRequest);
if (batchThisRequest){
pstmt.addBatch();
// return -1 to indicate batch mode
return -1;
} else {
int rowCount = pstmt.executeUpdate();
request.checkRowCount(rowCount);
request.postExecute();
return rowCount;
}
} catch (SQLException ex) {
throw new PersistenceException(ex);
} finally {
if (!batchThisRequest && pstmt != null) {
try {
pstmt.close();
} catch (SQLException e) {
logger.log(Level.SEVERE, null, e);
}
}
}
}
private PreparedStatement bindStmt(PersistRequestUpdateSql request, boolean batchThisRequest) throws SQLException {
SqlUpdate updateSql = request.getUpdateSql();
ServerTransaction t = request.getTransaction();
String sql = updateSql.getSql();
BindParams bindParams = ProtectedMethod.getBindParams(updateSql);
// process named parameters if required
sql = BindParamsParser.parse(bindParams, sql);
PreparedStatement pstmt;
if (batchThisRequest){
pstmt = pstmtFactory.getPstmt(t, sql, request);
} else {
pstmt = pstmtFactory.getPstmt(t, sql);
}
if (updateSql.getTimeout() > 0){
pstmt.setQueryTimeout(updateSql.getTimeout());
}
String bindLog = null;
if (!bindParams.isEmpty()){
bindLog = binder.bind(bindParams, 0, pstmt);
}
request.setBindLog(bindLog);
// derive the statement type (for TransactionEvent)
parseUpdate(sql, request);
return pstmt;
}
private void determineType(String word1, String word2, String word3, PersistRequestUpdateSql request) {
if (word1.equalsIgnoreCase("UPDATE")) {
request.setType(SqlType.SQL_UPDATE, word2, "UpdateSql");
} else if (word1.equalsIgnoreCase("DELETE")) {
request.setType(SqlType.SQL_DELETE, word3, "DeleteSql");
} else if (word1.equalsIgnoreCase("INSERT")) {
request.setType(SqlType.SQL_INSERT, word3, "InsertSql");
} else {
request.setType(SqlType.SQL_UNKNOWN, null, "UnknownSql");
}
}
private void parseUpdate(String sql, PersistRequestUpdateSql request) {
int start = ltrim(sql);
int[] pos = new int[3];
int spaceCount = 0;
int len = sql.length();
for (int i = start; i < len; i++) {
char c = sql.charAt(i);
if (Character.isWhitespace(c)) {
pos[spaceCount] = i;
spaceCount++;
if (spaceCount > 2){
break;
}
}
}
String firstWord = sql.substring(0, pos[0]);
String secWord = sql.substring(pos[0]+1, pos[1]);
String thirdWord;
if (pos[2] == 0){
// there is nothing after the table name
thirdWord = sql.substring(pos[1]+1);
} else {
thirdWord = sql.substring(pos[1]+1, pos[2]);
}
determineType(firstWord, secWord, thirdWord, request);
}
private int ltrim(String s) {
int len = s.length();
int i = 0;
for (i = 0; i < len; i++) {
if (!Character.isWhitespace(s.charAt(i))) {
return i;
}
}
return 0;
}
}
|
[
"208973+rbygrave@users.noreply.github.com"
] |
208973+rbygrave@users.noreply.github.com
|
20e366c4554869676e07daf51290020af6f6f737
|
ac94ac4e2dca6cbb698043cef6759e328c2fe620
|
/apis/deltacloud/src/main/java/org/jclouds/deltacloud/domain/EnumHardwareProperty.java
|
3de1d06d246ea0d86640b50055189a2dca156fe3
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-generic-cla"
] |
permissive
|
andreisavu/jclouds
|
25c528426c8144d330b07f4b646aa3b47d0b3d17
|
34d9d05eca1ed9ea86a6977c132665d092835364
|
refs/heads/master
| 2021-01-21T00:04:41.914525
| 2012-11-13T18:11:04
| 2012-11-13T18:11:04
| 2,503,585
| 2
| 0
| null | 2012-10-16T21:03:12
| 2011-10-03T09:11:27
|
Java
|
UTF-8
|
Java
| false
| false
| 1,809
|
java
|
/**
* Licensed to jclouds, Inc. (jclouds) under one or more
* contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. jclouds 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.jclouds.deltacloud.domain;
import static com.google.common.base.Preconditions.checkNotNull;
import java.util.Set;
import com.google.common.collect.ImmutableSet;
/**
*
* @author Adrian Cole
*/
public class EnumHardwareProperty extends ParameterizedHardwareProperty {
private final Set<Object> availableValues;
public EnumHardwareProperty(String name, String unit, Object value, HardwareParameter param,
Set<Object> availableValues) {
super(Kind.FIXED, name, unit, value, param);
this.availableValues = ImmutableSet.copyOf(checkNotNull(availableValues, "availableValues"));
}
/**
*
* @return a set of available values
*/
public Set<Object> getAvailableValues() {
return availableValues;
}
@Override
public String toString() {
return "[kind=" + getKind() + ", name=" + getName() + ", unit=" + getUnit() + ", value=" + getValue()
+ ", param=" + getParam() + ", availableValues=" + availableValues + "]";
}
}
|
[
"adrian@jclouds.org"
] |
adrian@jclouds.org
|
d72a65dedf5a53a8755eed91378a7c5a6eeb3220
|
c498cefc16ba5d75b54d65297b88357d669c8f48
|
/gameserver/src/ru/catssoftware/gameserver/datatables/xml/EnchantHPBonusData.java
|
bdde84842ccabc4bb3c859d7648358006fdddf55
|
[] |
no_license
|
ManWithShotgun/l2i-JesusXD-3
|
e17f7307d9c5762b60a2039655d51ab36ec76fad
|
8e13b4dda28905792621088714ebb6a31f223c90
|
refs/heads/master
| 2021-01-17T16:10:42.561720
| 2016-07-22T18:41:22
| 2016-07-22T18:41:22
| 63,967,514
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,370
|
java
|
package ru.catssoftware.gameserver.datatables.xml;
import java.io.File;
import java.io.IOException;
import java.util.Collection;
import java.util.StringTokenizer;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
import org.apache.log4j.Logger;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.xml.sax.SAXException;
import ru.catssoftware.Config;
import ru.catssoftware.gameserver.datatables.ItemTable;
import ru.catssoftware.gameserver.skills.Stats;
import ru.catssoftware.gameserver.skills.funcs.FuncTemplate;
import ru.catssoftware.gameserver.templates.item.L2Item;
import javolution.util.FastMap;
public class EnchantHPBonusData
{
private static final Logger _log = Logger.getLogger(EnchantHPBonusData.class);
private final FastMap<Integer,Integer[]> _singleArmorHPBonus = new FastMap<Integer, Integer[]>();
private final FastMap<Integer,Integer[]> _fullArmorHPBonus = new FastMap<Integer, Integer[]>();
private static EnchantHPBonusData _instance;
public static final EnchantHPBonusData getInstance()
{
if (_instance == null)
_instance = new EnchantHPBonusData();
return _instance;
}
public EnchantHPBonusData()
{
if(!Config.ALT_ENCHANT_HP_BONUS)
return;
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
factory.setValidating(false);
factory.setIgnoringComments(true);
File file = new File(Config.DATAPACK_ROOT, "data/enchantHPBonus.xml");
Document doc = null;
if (file.exists())
{
try
{
doc = factory.newDocumentBuilder().parse(file);
}
catch(SAXException e)
{
e.printStackTrace();
}
catch(IOException e)
{
e.printStackTrace();
}
catch(ParserConfigurationException e)
{
e.printStackTrace();
}
for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
{
if ("list".equalsIgnoreCase(n.getNodeName()))
{
for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
{
if ("enchantHP".equalsIgnoreCase(d.getNodeName()))
{
NamedNodeMap attrs = d.getAttributes();
Node att;
Integer grade;
boolean fullArmor;
att = attrs.getNamedItem("grade");
if (att == null)
{
_log.warn("[EnchantHPBonusData] Missing grade, skipping");
continue;
}
grade = Integer.parseInt(att.getNodeValue());
att = attrs.getNamedItem("fullArmor");
if (att == null)
{
_log.warn("[EnchantHPBonusData] Missing fullArmor, skipping");
continue;
}
fullArmor = Boolean.valueOf(att.getNodeValue());
att = attrs.getNamedItem("values");
if (att == null)
{
_log.warn("[EnchantHPBonusData] Missing bonus id: "+grade+", skipping");
continue;
}
StringTokenizer st = new StringTokenizer(att.getNodeValue(), ",");
int tokenCount = st.countTokens();
Integer[] bonus = new Integer[tokenCount];
for (int i=0; i<tokenCount; i++)
{
Integer value = Integer.decode(st.nextToken().trim());
if (value == null)
{
_log.warn("[EnchantHPBonusData] Bad Hp value!! grade: "+grade + " FullArmor? "+ fullArmor + " token: "+ i);
value = 0;
}
bonus[i] = value;
}
if (fullArmor)
_fullArmorHPBonus.put(grade, bonus);
else
_singleArmorHPBonus.put(grade, bonus);
}
}
}
}
if (_fullArmorHPBonus.isEmpty() && _singleArmorHPBonus.isEmpty())
return;
Collection<Integer> itemIds = ItemTable.getInstance().getAllArmorsId();
int count = 0;
for (Integer itemId: itemIds)
{
L2Item item = ItemTable.getInstance().getTemplate(itemId);
if (item != null && item.getCrystalType() != L2Item.CRYSTAL_NONE)
{
switch(item.getBodyPart())
{
case L2Item.SLOT_CHEST:
case L2Item.SLOT_FEET:
case L2Item.SLOT_GLOVES:
case L2Item.SLOT_HEAD:
case L2Item.SLOT_LEGS:
case L2Item.SLOT_BACK:
case L2Item.SLOT_FULL_ARMOR:
case L2Item.SLOT_UNDERWEAR:
case L2Item.SLOT_L_HAND:
count++;
FuncTemplate ft = new FuncTemplate(null, null, "Enchant", Stats.MAX_HP, 0x60, "0");
item.attach(ft);
break;
}
}
}
// shields in the weapons table
itemIds = ItemTable.getInstance().getAllWeaponsId();
for (Integer itemId: itemIds)
{
L2Item item = ItemTable.getInstance().getTemplate(itemId);
if (item != null && item.getCrystalType() != L2Item.CRYSTAL_NONE)
{
switch(item.getBodyPart())
{
case L2Item.SLOT_L_HAND:
count++;
FuncTemplate ft = new FuncTemplate(null, null, "Enchant", Stats.MAX_HP, 0x60, "0");
item.attach(ft);
break;
}
}
}
_log.info("Enchant HP Bonus registered for " + count + " items!");
}
}
public final int getHPBonus(L2Item item,int enchantLevel)
{
final Integer[] values;
int itemGrade=item.getItemGrade();
if (itemGrade==0x06)
itemGrade=0x05;
if (item.getBodyPart() == L2Item.SLOT_FULL_ARMOR)
values = _fullArmorHPBonus.get(itemGrade);
else
values = _singleArmorHPBonus.get(itemGrade);
if (values == null || values.length == 0)
return 0;
return values[Math.min(enchantLevel, values.length) - 1];
}
}
|
[
"u3n3ter7@mail.ru"
] |
u3n3ter7@mail.ru
|
cb4a46639ab0aecc3080921795db73c0463c8e6d
|
a456d6b9c6c889c310456129c0b0f7aa2960fb11
|
/java-basic/examples/Test09_3.java
|
91e191d8999e6f6d02695322d58d4680a7217f12
|
[] |
no_license
|
yunhyojin/bitcamp
|
af80234550fda09922151392248a439091b2d61c
|
b509fb94c0f03a73032fa12323c5444d2c59ea94
|
refs/heads/master
| 2021-08-24T00:36:12.198133
| 2017-12-07T08:42:23
| 2017-12-07T08:42:23
| 104,423,449
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 141
|
java
|
package a.b.c;
public class Test09_3 {
public static void main(String[] ags) {
System.out.println("Hello!");
}
}
|
[
"xilm1004@naver.com"
] |
xilm1004@naver.com
|
c0db98f34e59511edd7a3f9d171ece7e0cc25588
|
48e835e6f176a8ac9ae3ca718e8922891f1e5a18
|
/benchmark/training/io/reactivex/internal/operators/maybe/MaybeDoOnTerminateTest.java
|
ef67b2f9af309f2f5743ae8eb4e2b1440c09854a
|
[] |
no_license
|
STAMP-project/dspot-experiments
|
f2c7a639d6616ae0adfc491b4cb4eefcb83d04e5
|
121487e65cdce6988081b67f21bbc6731354a47f
|
refs/heads/master
| 2023-02-07T14:40:12.919811
| 2019-11-06T07:17:09
| 2019-11-06T07:17:09
| 75,710,758
| 14
| 19
| null | 2023-01-26T23:57:41
| 2016-12-06T08:27:42
| null |
UTF-8
|
Java
| false
| false
| 3,611
|
java
|
/**
* Copyright (c) 2016-present, RxJava Contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License is
* distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See
* the License for the specific language governing permissions and limitations under the License.
*/
package io.reactivex.internal.operators.maybe;
import io.reactivex.TestHelper;
import io.reactivex.exceptions.CompositeException;
import io.reactivex.exceptions.TestException;
import io.reactivex.observers.TestObserver;
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import org.junit.Assert;
import org.junit.Test;
public class MaybeDoOnTerminateTest {
@Test(expected = NullPointerException.class)
public void doOnTerminate() {
io.reactivex.Maybe.just(1).doOnTerminate(null);
}
@Test
public void doOnTerminateSuccess() {
final AtomicBoolean atomicBoolean = new AtomicBoolean();
io.reactivex.Maybe.just(1).doOnTerminate(new io.reactivex.functions.Action() {
@Override
public void run() {
atomicBoolean.set(true);
}
}).test().assertResult(1);
Assert.assertTrue(atomicBoolean.get());
}
@Test
public void doOnTerminateError() {
final AtomicBoolean atomicBoolean = new AtomicBoolean();
io.reactivex.Maybe.error(new TestException()).doOnTerminate(new io.reactivex.functions.Action() {
@Override
public void run() {
atomicBoolean.set(true);
}
}).test().assertFailure(TestException.class);
Assert.assertTrue(atomicBoolean.get());
}
@Test
public void doOnTerminateComplete() {
final AtomicBoolean atomicBoolean = new AtomicBoolean();
io.reactivex.Maybe.empty().doOnTerminate(new io.reactivex.functions.Action() {
@Override
public void run() {
atomicBoolean.set(true);
}
}).test().assertResult();
Assert.assertTrue(atomicBoolean.get());
}
@Test
public void doOnTerminateSuccessCrash() {
io.reactivex.Maybe.just(1).doOnTerminate(new io.reactivex.functions.Action() {
@Override
public void run() {
throw new TestException();
}
}).test().assertFailure(TestException.class);
}
@Test
public void doOnTerminateErrorCrash() {
TestObserver<Object> to = io.reactivex.Maybe.error(new TestException("Outer")).doOnTerminate(new io.reactivex.functions.Action() {
@Override
public void run() {
throw new TestException("Inner");
}
}).test().assertFailure(CompositeException.class);
List<Throwable> errors = TestHelper.compositeList(to.errors().get(0));
TestHelper.assertError(errors, 0, TestException.class, "Outer");
TestHelper.assertError(errors, 1, TestException.class, "Inner");
}
@Test
public void doOnTerminateCompleteCrash() {
io.reactivex.Maybe.empty().doOnTerminate(new io.reactivex.functions.Action() {
@Override
public void run() {
throw new TestException();
}
}).test().assertFailure(TestException.class);
}
}
|
[
"benjamin.danglot@inria.fr"
] |
benjamin.danglot@inria.fr
|
f36c383b75556311ff16f7630f641b3eda5cddf8
|
281fc20ae4900efb21e46e8de4e7c1e476f0d132
|
/test-applications/seamApp/web/src/main/java/org/richfaces/helloworld/domain/dfs/DemoInventoryItem.java
|
bae8685c995b0201af2aecae65ee9ae147d9eecf
|
[] |
no_license
|
nuxeo/richfaces-3.3
|
c23b31e69668810219cf3376281f669fa4bf256f
|
485749c5f49ac6169d9187cc448110d477acab3b
|
refs/heads/master
| 2023-08-25T13:27:08.790730
| 2015-01-05T10:42:11
| 2015-01-05T10:42:11
| 10,627,040
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,017
|
java
|
/**
* License Agreement.
*
* JBoss RichFaces - Ajax4jsf Component Library
*
* Copyright (C) 2007 Exadel, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.richfaces.helloworld.domain.dfs;
import java.math.BigDecimal;
import java.io.Serializable;
/**
* Created by IntelliJ IDEA.
* User: Wesley
* Date: Jan 26, 2007
* Time: 8:21:36 AM
* To change this template use File | Settings | File Templates.
*/
public class DemoInventoryItem implements Serializable {
String make;
String model;
String stock;
String vin;
BigDecimal mileage;
BigDecimal mileageMarket;
Integer price;
BigDecimal priceMarket;
int daysLive;
BigDecimal changeSearches;
BigDecimal changePrice;
BigDecimal exposure;
BigDecimal activity;
BigDecimal printed;
BigDecimal inquiries;
public String getMake() {
return make;
}
public void setMake(String make) {
this.make = make;
}
public String getModel() {
return model;
}
public void setModel(String model) {
this.model = model;
}
public String getStock() {
return stock;
}
public void setStock(String stock) {
this.stock = stock;
}
public String getVin() {
return vin;
}
public void setVin(String vin) {
this.vin = vin;
}
public BigDecimal getMileage() {
return mileage;
}
public void setMileage(BigDecimal mileage) {
this.mileage = mileage;
}
public BigDecimal getMileageMarket() {
return mileageMarket;
}
public void setMileageMarket(BigDecimal mileageMarket) {
this.mileageMarket = mileageMarket;
}
public Integer getPrice() {
return price;
}
public void setPrice(Integer price) {
this.price = price;
}
public BigDecimal getPriceMarket() {
return priceMarket;
}
public void setPriceMarket(BigDecimal priceMarket) {
this.priceMarket = priceMarket;
}
public int getDaysLive() {
return daysLive;
}
public void setDaysLive(int daysLive) {
this.daysLive = daysLive;
}
public BigDecimal getChangeSearches() {
return changeSearches;
}
public void setChangeSearches(BigDecimal changeSearches) {
this.changeSearches = changeSearches;
}
public BigDecimal getChangePrice() {
return changePrice;
}
public void setChangePrice(BigDecimal changePrice) {
this.changePrice = changePrice;
}
public BigDecimal getExposure() {
return exposure;
}
public void setExposure(BigDecimal exposure) {
this.exposure = exposure;
}
public BigDecimal getActivity() {
return activity;
}
public void setActivity(BigDecimal activity) {
this.activity = activity;
}
public BigDecimal getPrinted() {
return printed;
}
public void setPrinted(BigDecimal printed) {
this.printed = printed;
}
public BigDecimal getInquiries() {
return inquiries;
}
public void setInquiries(BigDecimal inquiries) {
this.inquiries = inquiries;
}
}
|
[
"grenard@nuxeo.com"
] |
grenard@nuxeo.com
|
b7d2f8b77483f85614e2a27b76d1ba8d7476e912
|
c5d988ae16a5485dc22d874ce3e5edc9595dcd35
|
/data/src/main/java/com/customer/data/mapper/AllBrandsMapper.java
|
491001a756e8adab65da0d2de314c8d3d3ae7ec3
|
[] |
no_license
|
suryakishore/ecom_customer
|
4fcaa7ba32611a4fa40b858deed7fe89ba6316ac
|
d4663eab1381f83dd17c380bf756a7f5b973dad5
|
refs/heads/master
| 2022-12-12T04:34:31.587675
| 2020-08-31T08:50:32
| 2020-08-31T08:50:32
| 291,661,347
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,051
|
java
|
package com.customer.data.mapper;
import com.customer.data.utils.DataUtils;
import com.customer.domain.model.brands.AllBrandsListData;
import com.customer.domain.model.home.CategoryData;
import com.customer.remote.http.model.response.brands.AllBrandsListDetails;
import com.customer.remote.http.model.response.newHome.CategoryDetails;
import java.util.ArrayList;
public class AllBrandsMapper {
public AllBrandsListData mapper(AllBrandsListDetails categoryDetails) {
return new AllBrandsListData(categoryDetails.getPenCount(), categoryDetails.getMessage(),
convertToCategoryItemData(categoryDetails.getData())
);
}
private ArrayList<CategoryData> convertToCategoryItemData(
ArrayList<CategoryDetails> trackingItemDetailsArrayList) {
ArrayList<CategoryData> categoryData = new ArrayList<>();
if (!DataUtils.isEmptyArray(trackingItemDetailsArrayList)) {
for (CategoryDetails details : trackingItemDetailsArrayList) {
CategoryData data = new CategoryData(details.getSubCategoryName(), details.getPenCount(),
details.getProductCount(), details.getId(), details.getImageUrl(),
details.getLogo(), details.getName(), details.getBannerImage(),
details.getOfferdescription(), details.getCurrencySymbol(), details.getCurrency(),
details.getOfferId(), details.getOffername(), details.getCatName(),
details.getBannerImageUrl(),
CommonMapper.convertToImageData(details.getImages()),
details.getDiscountType(), details.getParentProductId(),
details.getAvailableQuantity(), details.getChildProductId(),
details.getDiscountPrice(), null,
null,
details.getUnitId(),
details.isOutOfStock(), null, details.getProductName(),
details.getBrandName(), details.getImageMobile(), details.getSubCatName(),
details.getType(), details.getTotalStarRating(), details.getOfferName());
categoryData.add(data);
}
}
return categoryData;
}
}
|
[
"surya@mobifyi.com"
] |
surya@mobifyi.com
|
34d3350de2af4567aa7aa46494b7f5d7689a5e4f
|
5db4b27607b28361c836a2001a42288b6aaf7912
|
/src/main/java/com/itigeeks/restaurant/business/serviceimpl/ResPrinterServiceImpl.java
|
e29143c1bc34b52f4ead63fe599afbb0cef9afd4
|
[] |
no_license
|
JavaAdore/Restaurant-Management-System
|
2bae7228f580e9b717581f604f3a68c22d6ec901
|
c294c0ca144f3675758463be221b5730d23f1739
|
refs/heads/master
| 2016-08-12T20:36:08.346464
| 2016-03-29T22:46:05
| 2016-03-29T22:46:05
| 54,293,670
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,704
|
java
|
package com.itigeeks.restaurant.business.serviceimpl;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.itigeeks.restaurant.business.service.ResPrinterService;
import com.itigeeks.restaurant.common.entity.schema.ResPrinter;
import com.itigeeks.restaurant.common.enums.QueryConjunctionType;
import com.itigeeks.restaurant.dataaccess.dao.ResPrinterDAO;
/**
* Implementation of ResPrinterService
*/
@Service
public class ResPrinterServiceImpl implements ResPrinterService {
@Autowired
private ResPrinterDAO resPrinterDAO;
@Override
public void delete(ResPrinter resPrinter) {
resPrinterDAO.delete(resPrinter);
}
@Override
public ResPrinter saveOrUpdate(ResPrinter resPrinter) {
return resPrinterDAO.saveOrUpdate(resPrinter);
}
@Override
public ResPrinter load(Long id) {
return resPrinterDAO.load(id);
}
@Override
public List<ResPrinter> loadAll() {
return resPrinterDAO.loadAll();
}
@Override
public List<ResPrinter> loadByNamedQuery(String queryName) {
return resPrinterDAO.loadByNamedQuery(queryName);
}
@Override
public List<ResPrinter> loadByNamedQuery(String queryName, Map<String, Object> queryParameters) {
return resPrinterDAO.loadByNamedQuery(queryName, queryParameters);
}
@Override
public List<ResPrinter> load(Map<String, Object> criteria) {
return loadWithAllCriteria(criteria);
}
@Override
public Integer countAll() {
return resPrinterDAO.countAll();
}
@Override
public List<ResPrinter> loadWithAllCriteria(Map<String, Object> criteria) {
return resPrinterDAO.load(criteria, QueryConjunctionType.AND);
}
@Override
public List<ResPrinter> loadAll(Integer startPage, Integer pageSize) {
return resPrinterDAO.loadAll(startPage, pageSize);
}
@Override
public List<ResPrinter> load(Map<String, Object> criteria, Integer startPage, Integer pageSize) {
return loadWithAllCriteria(criteria, startPage, pageSize, null, null);
}
@Override
public List<ResPrinter> loadWithAllCriteria(Map<String, Object> criteria, Integer startPage,
Integer pageSize) {
return loadWithAllCriteria(criteria, startPage, pageSize, null, null);
}
@Override
public List<ResPrinter> loadWithAnyCriteria(Map<String, Object> criteria, Integer startPage,
Integer pageSize) {
return loadWithAnyCriteria(criteria, startPage, pageSize, null, null);
}
@Override
public List<ResPrinter> loadWithAllCriteria(Map<String, Object> criteria, Integer startPage,
Integer pageSize, String sortField, Boolean ascending) {
return resPrinterDAO.load(criteria, startPage, pageSize, sortField, ascending,
QueryConjunctionType.AND);
}
@Override
public List<ResPrinter> loadWithAnyCriteria(Map<String, Object> criteria, Integer startPage,
Integer pageSize, String sortField, Boolean ascending) {
return resPrinterDAO.load(criteria, startPage, pageSize, sortField, ascending,
QueryConjunctionType.OR);
}
public List<ResPrinter> loadWithAnyCriteria(Map<String, Object> criteria) {
return resPrinterDAO.load(criteria, QueryConjunctionType.OR);
}
@Override
public Integer getCount(Map<String, Object> criteria) {
return getCountOfAllCriteria(criteria);
}
@Override
public Integer getCountOfAllCriteria(Map<String, Object> criteria) {
return resPrinterDAO.getCount(criteria, QueryConjunctionType.AND);
}
@Override
public Integer getCountOfWithAnyCriteria(Map<String, Object> criteria) {
return resPrinterDAO.getCount(criteria, QueryConjunctionType.OR);
}
}
|
[
"mahmoud.eltaieb@gmail.com"
] |
mahmoud.eltaieb@gmail.com
|
f4f0aa4f64f1a21e60fb97c35df5dd66e6372053
|
dfb3f631ed8c18bd4605739f1ecb6e47d715a236
|
/disconnect-highcharts/src/main/java/js/lang/external/highcharts/modules/SonificationPoint.java
|
3f30dd2908747cd22b10b0f3392cec13416fa368
|
[
"Apache-2.0"
] |
permissive
|
fluorumlabs/disconnect-project
|
ceb788b901d1bf7cfc5ee676592f55f8a584a34e
|
54f4ea5e6f05265ea985e1ee615cc3d59d5842b4
|
refs/heads/master
| 2022-12-26T11:26:46.539891
| 2020-08-20T16:37:19
| 2020-08-20T16:37:19
| 203,577,241
| 6
| 1
|
Apache-2.0
| 2022-12-16T00:41:56
| 2019-08-21T12:14:42
|
Java
|
UTF-8
|
Java
| false
| false
| 933
|
java
|
package js.lang.external.highcharts.modules;
import com.github.fluorumlabs.disconnect.core.annotations.Import;
import com.github.fluorumlabs.disconnect.core.annotations.NpmPackage;
import js.lang.external.highcharts.Point;
@NpmPackage(
name = "highcharts",
version = "^8.1.2"
)
@Import(
module = "highcharts/es-modules/masters/modules/sonification.src.js"
)
public interface SonificationPoint extends Point {
/**
* Cancel sonification of a point. Calls onEnd functions.
*
* @param fadeOut
* Whether or not to fade out as we stop. If false, the points
* are cancelled synchronously.
*
*/
void cancelSonify(boolean fadeOut);
/**
* Cancel sonification of a point. Calls onEnd functions.
*
*/
void cancelSonify();
/**
* Sonify a single point.
*
* @param options
* Options for the sonification of the point.
*
*/
void sonify(PointSonifyOptionsObject options);
}
|
[
"fluorumlabs@users.noreply.github.com"
] |
fluorumlabs@users.noreply.github.com
|
0ca41380aaec9c594d1190539fef437a64275d94
|
b857c0a9f29b7ff8d3aa177734526e97d3358f38
|
/app/src/main/java/com/lxyg/app/customer/fragment/SearchRecommedFragment.java
|
7f275e508843d75c843d1f4c0882b7ff62458a69
|
[] |
no_license
|
mirror5821/LXYG
|
a133d68b93901a375d1fef47710683c9c93cc953
|
d2be2366b41b5301d1d5c6bba6e0c5bbb25521e5
|
refs/heads/master
| 2021-01-21T13:41:20.864539
| 2016-05-05T06:50:58
| 2016-05-05T06:50:58
| 47,088,931
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,416
|
java
|
package com.lxyg.app.customer.fragment;
import android.os.Bundle;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.lxyg.app.customer.R;
import com.lxyg.app.customer.activity.SearchActivity;
import com.lxyg.app.customer.adapter.SearchRecommedAdapter;
import com.lxyg.app.customer.app.AppContext;
import com.lxyg.app.customer.bean.History;
import java.util.ArrayList;
import java.util.List;
/**
* Created by 王沛栋 on 2015/10/30.
*/
public class SearchRecommedFragment extends BaseFragment {
@Override
public int setLayoutId() {
return R.layout.fragment_search_recommed;
}
private RecyclerView mRecycleView;
private LinearLayout mView;
private SearchRecommedAdapter mAdapter;
private SearchActivity mActivitySearch;
@Override
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mRecycleView = (RecyclerView)view.findViewById(R.id.rView);
GridLayoutManager mLayoutManager = new GridLayoutManager(getActivity(), 3);
mLayoutManager.setOrientation(LinearLayoutManager.VERTICAL);
mRecycleView.setLayoutManager(mLayoutManager);
if(mActivitySearch == null){
mActivitySearch = (SearchActivity) getActivity();
}
String [] datas = {"火腿","香蕉","百事","劲酒","旺旺仙贝","老白干","长城干红","红旗渠"};
mAdapter = new SearchRecommedAdapter(getActivity(),datas);
mRecycleView.setAdapter(mAdapter);
mAdapter.setOnItemClickListener(new SearchRecommedAdapter.OnRecyclerViewItemClickListener() {
@Override
public void onItemClick(View view, String data) {
mActivitySearch.initSearchView(data.toString(),0);
}
});
mView = (LinearLayout)view.findViewById(R.id.view_history);
List<History> mHistorys = new ArrayList<History>();
mHistorys = AppContext.mDb.findAll(History.class);
if (mHistorys.size()>0){
View dView = getActivity().getLayoutInflater().inflate(R.layout.view_search_history_tv,null);
TextView dTv = (TextView)dView.findViewById(R.id.tv_history);
dTv.setText("您的搜索记录:");
mView.addView(dView);
for (int i=0;i<mHistorys.size();i++){
final String str = mHistorys.get(i).getName();
View v = getActivity().getLayoutInflater().inflate(R.layout.view_search_history_tv,null);
TextView tv = (TextView)v.findViewById(R.id.tv_history);
tv.setText(str);
tv.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mActivitySearch.initSearchView(str,0);
}
});
mView.addView(v);
}
}else{
View v = getActivity().getLayoutInflater().inflate(R.layout.view_search_history_tv,null);
TextView tv = (TextView)v.findViewById(R.id.tv_history);
tv.setText("暂无搜索记录!");
mView.addView(v);
}
}
}
|
[
"mirror5821@163.com"
] |
mirror5821@163.com
|
00f013370c880d89b75e52487507c8e4030b469e
|
49ae18c2ac97b629dc9ebe03e9ea645191d0603c
|
/AppCMS/src/main/java/com/viewlift/models/data/appcms/EquipmentElement.java
|
3a595ade2196be5e487335b6440cc7058a8614aa
|
[] |
no_license
|
Takendra/Takendra-repo
|
c4c7eacda03c7eeb011f3f1d0311d6803e67a8f8
|
8cee4c84abd9cfa66a813025aac398f5cf520d1b
|
refs/heads/master
| 2023-03-26T11:01:31.992442
| 2021-03-22T06:10:19
| 2021-03-22T06:10:19
| 350,227,189
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 966
|
java
|
package com.viewlift.models.data.appcms;
import android.graphics.drawable.Drawable;
public class EquipmentElement {
int image;
String name;
String equipment_needed;
int brand;
boolean isRequired;
public int getBrand() {
return brand;
}
public void setBrand(int brand) {
this.brand = brand;
}
public String getEquipment_needed() {
return equipment_needed;
}
public void setEquipment_needed(String equipment_needed) {
this.equipment_needed = equipment_needed;
}
public int getImage() {
return image;
}
public void setImage(int image) {
this.image = image;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public boolean isRequired() {
return isRequired;
}
public void setRequired(boolean required) {
isRequired = required;
}
}
|
[
"aaryan224@gmail.com"
] |
aaryan224@gmail.com
|
9d42cc6e4129bf117ba5c8eaee7e52c849cd5280
|
300ba8025a69ff2f3d31a999da19f3efde169bb3
|
/app/src/main/java/com/bhargav/hcms/TotalHealthTips/StomachAche.java
|
1bb56d636ed8995174ee09440638b7080884f4d6
|
[] |
no_license
|
bhargav944/HCMS
|
849ba41e46949614d0289e2d0aaa3171f46e0339
|
669cf36cf8ebd5414afb923ae2cab48fe4a6204a
|
refs/heads/master
| 2020-09-22T02:59:59.901157
| 2019-11-17T13:27:23
| 2019-11-17T13:27:23
| 157,401,002
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,972
|
java
|
package com.bhargav.hcms.TotalHealthTips;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.Toast;
import androidx.appcompat.app.AlertDialog;
import androidx.appcompat.app.AppCompatActivity;
import androidx.viewpager.widget.ViewPager;
import com.bhargav.hcms.LoginActivity;
import com.bhargav.hcms.MainActivity;
import com.bhargav.hcms.R;
import com.bhargav.hcms.TotalHealthTips.PageAdapter.StomachAchePageAdapter;
import com.bhargav.hcms.TotalHealthTips.Tabs.Stomach_Ache.StomachAcheTab1;
import com.bhargav.hcms.TotalHealthTips.Tabs.Stomach_Ache.StomachAcheTab2;
import com.bhargav.hcms.TotalHealthTips.Tabs.Stomach_Ache.StomachAcheTab3;
import com.bhargav.hcms.TotalHealthTips.Tabs.Stomach_Ache.StomachAcheTab4;
import com.bhargav.hcms.TotalHealthTips.Tabs.Stomach_Ache.StomachAcheTab5;
import com.google.android.material.tabs.TabLayout;
import com.google.firebase.auth.FirebaseAuth;
import com.google.firebase.auth.FirebaseUser;
public class StomachAche extends AppCompatActivity implements StomachAcheTab1.OnFragmentInteractionListener,StomachAcheTab2.OnFragmentInteractionListener,StomachAcheTab3.OnFragmentInteractionListener,StomachAcheTab4.OnFragmentInteractionListener,StomachAcheTab5.OnFragmentInteractionListener {
FirebaseAuth firebaseAuth;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_stomach_ache);
if(!isConnected(StomachAche.this)) buildDialog(StomachAche.this).show();
else {
Toast.makeText(StomachAche.this,R.string.stomach_ache, Toast.LENGTH_SHORT).show();
setContentView(R.layout.activity_stomach_ache);
}
getSupportActionBar().setDisplayShowHomeEnabled(true);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
firebaseAuth = FirebaseAuth.getInstance();
TabLayout tabLayout = (TabLayout)findViewById(R.id.tablayout);
tabLayout.addTab(tabLayout.newTab().setText(R.string.remedy1));
tabLayout.addTab(tabLayout.newTab().setText(R.string.remedy2));
tabLayout.addTab(tabLayout.newTab().setText(R.string.remedy3));
tabLayout.addTab(tabLayout.newTab().setText(R.string.remedy4));
tabLayout.addTab(tabLayout.newTab().setText(R.string.remedy5));
tabLayout.setTabGravity(TabLayout.GRAVITY_FILL);
final ViewPager viewPager = (ViewPager)findViewById(R.id.pager);
final StomachAchePageAdapter adapter = new StomachAchePageAdapter(getSupportFragmentManager(),tabLayout.getTabCount());
viewPager.setAdapter(adapter);
viewPager.setOnPageChangeListener(new TabLayout.TabLayoutOnPageChangeListener(tabLayout));
tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {
@Override
public void onTabSelected(TabLayout.Tab tab) {
viewPager.setCurrentItem(tab.getPosition());
}
@Override
public void onTabUnselected(TabLayout.Tab tab) {
}
@Override
public void onTabReselected(TabLayout.Tab tab) {
}
});
}
public boolean isConnected(Context context) {
ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
NetworkInfo netinfo = cm.getActiveNetworkInfo();
if (netinfo != null && netinfo.isConnectedOrConnecting()) {
NetworkInfo wifi = cm.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
NetworkInfo mobile = cm.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
if((mobile != null && mobile.isConnectedOrConnecting()) || (wifi != null && wifi.isConnectedOrConnecting())) return true;
else return false;
} else
return false;
}
public AlertDialog.Builder buildDialog(Context c) {
AlertDialog.Builder builder = new AlertDialog.Builder(c);
builder.setTitle(R.string.no_internet);
builder.setMessage(R.string.no_internet_msg);
builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
finish();
}
});
return builder;
}
@Override
public void onFragmentInteraction(Uri uri) {
}
private void checkUserStatus() {
FirebaseUser user = firebaseAuth.getCurrentUser();
if (user != null) {
}
else {
startActivity(new Intent(StomachAche.this, LoginActivity.class));
finish();
}
}
@Override
public boolean onSupportNavigateUp() {
onBackPressed();
return super.onSupportNavigateUp();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.dashboard, menu);
MenuItem item = menu.findItem(R.id.action_search).setVisible(false);
MenuItem item1 = menu.findItem(R.id.action_add_post).setVisible(false);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_logout) {
firebaseAuth.signOut();
checkUserStatus();
}
return super.onOptionsItemSelected(item);
}
}
|
[
"bhargav.gurramkonda@gmail.com"
] |
bhargav.gurramkonda@gmail.com
|
89a75a1e56d0c97c94bcb2fad599ca0f4993cf7c
|
287eb89274497cf3ec6bc44c4fe8bab1d81ddc9d
|
/src/main/java/com/wg8/gof23/memento/EmpMemento.java
|
4f1f53ddb29fefcc74a6953035cf609d50399cd0
|
[] |
no_license
|
wg8/JavaStudy
|
bfc4dd481d34b29730b9b7070671b18192f5cd09
|
3bf81c3dea181517c07f730cd3fa59cd4f29ccaa
|
refs/heads/master
| 2020-05-02T17:51:28.343021
| 2019-05-22T11:32:17
| 2019-05-22T11:32:17
| 178,111,361
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 791
|
java
|
package com.wg8.gof23.memento;
/**
* @author Harry
* @date 2019/4/22 10:39 PM
* 备忘录类
*/
public class EmpMemento {
private String name;
private int age;
private double salary;
/**
* 存储操作
*
* @param e
*/
public EmpMemento(Emp e) {
this.name = e.getName();
this.age = e.getAge();
this.salary = e.getSalary();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public double getSalary() {
return salary;
}
public void setSalary(double salary) {
this.salary = salary;
}
}
|
[
"null"
] |
null
|
d6b21b9ec42a9fd8e63d679765970c7fdbc0bfb2
|
2f5d43553c4bb21f051fdad3bf89b9ecb9c2c0fd
|
/TodoTest_ahn/src/test/java/org/study/todo/dao/DaoTest.java
|
9724b574354afc18cb3e5263680fac45c3ae08d9
|
[] |
no_license
|
ahn75/TodoTest_Spring_ahn
|
b91b2dd7cb5806f87b0f4544c7c0c39933df54b2
|
2088905ead68eaffb006b36e567bfd47b53055d2
|
refs/heads/master
| 2020-03-30T22:18:59.031917
| 2018-10-05T02:49:20
| 2018-10-05T02:49:20
| 151,662,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,288
|
java
|
package org.study.todo.dao;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.study.todo.model.Member;
import junit.framework.Assert;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"file:src/main/webapp/WEB-INF/spring/**/root-context.xml"})
public class DaoTest {
private static final Logger logger = LoggerFactory.getLogger(DaoTest.class);
@Autowired
MemberDao dao;
@Test
public void testInsertMember() throws Exception {
Member member = new Member();
member.setMember_id("user07");
member.setMember_pw("7777");
member.setMember_name("유저Test07");
member.setMember_email("user07@korea.com");
dao.insertMember(member);
}
/*@Test
public void testCreateMemberTable() {
dao.createMemberTable();
}
@Test
public void testExistMemberTable() {
if (dao.existMemberTable()) {
logger.info("table exists");
} else {
logger.info("table NOT ..");
}
}*/
}
|
[
"user@user-PC"
] |
user@user-PC
|
9d1e8e5e5c4711bb1c3618b24b529b1e04d46038
|
a13ab684732add3bf5c8b1040b558d1340e065af
|
/java6-src/com/sun/corba/se/spi/ior/Identifiable.java
|
e5c890c1c9f7dd0b57957ad53f82123801706b71
|
[] |
no_license
|
Alivop/java-source-code
|
554e199a79876343a9922e13ccccae234e9ac722
|
f91d660c0d1a1b486d003bb446dc7c792aafd830
|
refs/heads/master
| 2020-03-30T07:21:13.937364
| 2018-10-25T01:49:39
| 2018-10-25T01:51:38
| 150,934,150
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 659
|
java
|
/*
* %W% %E%
*
* Copyright (c) 2006, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
package com.sun.corba.se.spi.ior;
/** This interface represents an entity that can be written to an
* OutputStream and has an identity that is represented by an integer.
* This identity is essentially the type of the entity, and is used in
* order to know how to read the entity back from an InputStream.
* @author Ken Cavanaugh
*/
public interface Identifiable extends Writeable
{
/** Return the (type) identity of this entity.
* @return int
*/
public int getId();
}
|
[
"liulp@zjhjb.com"
] |
liulp@zjhjb.com
|
d4fd47cd5a7216d09d456b3ca396dc4840898fea
|
6a4fb726b8ecea772406a89f803fe43952ea0965
|
/src/main/java/com/tutorial/crud/security/dto/JwtDto.java
|
2c34c24c38d08af230302145496dd8abae78ffd7
|
[] |
no_license
|
AbreguWalter/ProyectoJWT
|
daa0c517991670085e952c11ed5a9c12c517adaf
|
c2e374addeee4f30aa2945c9a184f508497fa7e0
|
refs/heads/main
| 2023-02-04T09:55:53.174255
| 2020-12-29T04:08:31
| 2020-12-29T04:08:31
| 325,182,468
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,246
|
java
|
package com.tutorial.crud.security.dto;
import org.springframework.security.core.GrantedAuthority;
import java.util.Collection;
public class JwtDto {
private String token;
private String beader = "Bearer";
private String nombreUsuario;
private Collection<? extends GrantedAuthority> authorities;
public JwtDto(String token, String nombreUsuario, Collection<? extends GrantedAuthority> authorities) {
this.token = token;
this.nombreUsuario = nombreUsuario;
this.authorities = authorities;
}
public String getToken() {
return token;
}
public void setToken(String token) {
this.token = token;
}
public String getBeader() {
return beader;
}
public void setBeader(String beader) {
this.beader = beader;
}
public String getNombreUsuario() {
return nombreUsuario;
}
public void setNombreUsuario(String nombreUsuario) {
this.nombreUsuario = nombreUsuario;
}
public Collection<? extends GrantedAuthority> getAuthorities() {
return authorities;
}
public void setAuthorities(Collection<? extends GrantedAuthority> authorities) {
this.authorities = authorities;
}
}
|
[
"you@example.com"
] |
you@example.com
|
46ae85ca3cedd67160fbe6df27571f5b7efa6cbd
|
d43a41079529348ffb737c5f0b2dcd9a14573ec7
|
/Hibernate/June-2019/Introduction_to_Hibernate/Exercise/src/main/java/tasks/Addresses_with_Employee_Count.java
|
75a98c13fae663b1fd73ddb9fc0fb03b1a80c73d
|
[
"MIT"
] |
permissive
|
IvayloIV/Java
|
4688071e052c1a11179306f6464492286fbf0a88
|
00952f83f43ea8d8b300fcc762c2dae458dc5860
|
refs/heads/master
| 2022-12-04T01:13:20.175961
| 2022-09-28T21:11:38
| 2022-09-28T21:11:38
| 192,743,500
| 0
| 1
|
MIT
| 2022-11-24T09:54:29
| 2019-06-19T14:00:10
|
Java
|
UTF-8
|
Java
| false
| false
| 892
|
java
|
package tasks;
import entities.Address;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.Persistence;
import java.util.List;
public class Addresses_with_Employee_Count {
public static void main(String[] args) {
EntityManagerFactory emf = Persistence.createEntityManagerFactory("soft_uni");
EntityManager em = emf.createEntityManager();
em.getTransaction().begin();
List<Address> resultList = em.createQuery("FROM Address ORDER BY size(employees) DESC, town_id ASC", Address.class)
.setMaxResults(10)
.getResultList();
resultList.forEach(a -> System.out.println(String.format("%s, %s - %d employees",
a.getText(),
a.getTown().getName(),
a.getEmployees().size())));
em.getTransaction().commit();
}
}
|
[
"ivvo98@abv.bg"
] |
ivvo98@abv.bg
|
5b524cbe05bf1d151d869134deb0c685ceb875d9
|
ed3cb95dcc590e98d09117ea0b4768df18e8f99e
|
/project_1_3/src/b/c/h/a/Calc_1_3_12707.java
|
ce0afefc327d6ae22d028540c814be2453cedc1d
|
[] |
no_license
|
chalstrick/bigRepo1
|
ac7fd5785d475b3c38f1328e370ba9a85a751cff
|
dad1852eef66fcec200df10083959c674fdcc55d
|
refs/heads/master
| 2016-08-11T17:59:16.079541
| 2015-12-18T14:26:49
| 2015-12-18T14:26:49
| 48,244,030
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package b.c.h.a;
public class Calc_1_3_12707 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
|
[
"christian.halstrick@sap.com"
] |
christian.halstrick@sap.com
|
89dff31ea59da62aeaa52f3219142741bb5d85ae
|
efbfbad75813b92ba0cce0df492fe6c7cf41a8c6
|
/basic-scheduler-purejava/src/test/java/example/JobSchedulerTest.java
|
00be84646170123725c0732000a3f1881faf4a51
|
[] |
no_license
|
sergueik/springboot_study
|
d4636cd255cdaec07a22276393541a7dd9bb97c1
|
59c87d64d0d8d5e2eae6fe496b2a84425208fcfd
|
refs/heads/master
| 2023-09-01T14:04:34.285473
| 2023-08-31T22:29:09
| 2023-08-31T22:29:09
| 101,407,389
| 5
| 6
| null | 2023-03-04T00:57:19
| 2017-08-25T13:38:05
|
Java
|
UTF-8
|
Java
| false
| false
| 2,575
|
java
|
package example;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import static org.mockito.Matchers.eq;
import static org.mockito.Mockito.any;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.when;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.never;
import static org.mockito.Mockito.atLeast;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.doNothing;
import static org.junit.Assert.assertTrue;
import java.util.Date;
public class JobSchedulerTest {
private Runnable task;
private JobScheduler sut;
private final long interval = 5000L;
private final Date laterDate = new Date(
System.currentTimeMillis() + interval);
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
sut = new JobScheduler(0);
task = mock(Runnable.class);
// https://www.baeldung.com/mockito-void-methods
// Mockito.any(Object.class)
// The method when(T) in the type Mockito is not applicable for the
// arguments (void)
// when(task.run()).thenReturn();
doNothing().when(task).run();
}
@After
public void tearDown() {
}
@Test
public void test1() {
sut.execute(task);
try{
Thread.sleep(500);
} catch (InterruptedException e){
}
verify(task, times(1)).run();
}
@Test
public void test2() {
sut.executeAt(task, laterDate);
verify(task, never()).run();
}
@Test
public void test3() {
sut.executeAt(task, laterDate);
try {
Thread.sleep(2 * interval);
} catch (InterruptedException e) {
}
verify(task, times(1)).run();
}
@Test
public void test4() {
sut.executeIn(task, interval);
try {
Thread.sleep(interval / 2);
} catch (InterruptedException e) {
}
verify(task, times(0)).run();
}
@Test
public void test5() {
sut.executeIn(task, interval);
try {
Thread.sleep(2 * interval);
} catch (InterruptedException e) {
}
verify(task, times(1)).run();
}
// NOTE: Time-consuming
@Ignore
@Test
public void test6() {
sut.executeIn(task, interval);
sut.executeAtAndRepeat(task, laterDate, JobScheduler.PER_SECOND);
try {
Thread.sleep(interval + JobScheduler.PER_MINUTE);
} catch (InterruptedException e) {
}
verify(task, atLeast(59)).run();
}
}
|
[
"kouzmine_serguei@yahoo.com"
] |
kouzmine_serguei@yahoo.com
|
e17f78e315d90229c5b12aba7817479dffd68515
|
b2763a350dfb9ae8754bb9ac24265a3efbf59578
|
/core/src/test/java/nl/weeaboo/filesystem/RegularFileSystemTest.java
|
a8ad0a5371dbd716d38987fba9c795a6b2fd670e
|
[
"MIT"
] |
permissive
|
anonl/tcommon
|
e8b9169f03d5427194b463b7e4b6bf4ad9e1ff34
|
27aee724f8e83f5f56a47cf4b0428179223fba2c
|
refs/heads/master
| 2021-05-24T03:18:08.419896
| 2021-02-16T19:53:57
| 2021-02-16T19:53:57
| 53,435,573
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 654
|
java
|
package nl.weeaboo.filesystem;
import java.io.IOException;
import org.junit.Rule;
import org.junit.rules.TemporaryFolder;
public final class RegularFileSystemTest extends AbstractWritableFileSystemTest<RegularFileSystem> {
@Rule
public final TemporaryFolder tempFolder = new TemporaryFolder();
@Override
protected RegularFileSystem createTestFileSystem() throws IOException {
RegularFileSystem fs = new RegularFileSystem(tempFolder.newFolder());
FileSystemUtil.writeString(fs, VALID_NAME, VALID_CONTENTS);
FileSystemUtil.writeString(fs, SUBFOLDER_FILE, SUBFOLDER_FILE_CONTENTS);
return fs;
}
}
|
[
"mail@weeaboo.nl"
] |
mail@weeaboo.nl
|
f7a1928330976424f3ab353b1e4127f97fa9c473
|
c0fe21b86f141256c85ab82c6ff3acc56b73d3db
|
/ydsms/src/main/java/com/jdcloud/sdk/service/ydsms/model/SendMessagesByPinUsingPOSTRequest.java
|
05cf8c82a6b8bc3d37a4ecb52f8427bb5eb1160c
|
[
"Apache-2.0"
] |
permissive
|
jdcloud-api/jdcloud-sdk-java
|
3fec9cf552693520f07b43a1e445954de60e34a0
|
bcebe28306c4ccc5b2b793e1a5848b0aac21b910
|
refs/heads/master
| 2023-07-25T07:03:36.682248
| 2023-07-25T06:54:39
| 2023-07-25T06:54:39
| 126,275,669
| 47
| 61
|
Apache-2.0
| 2023-09-07T08:41:24
| 2018-03-22T03:41:41
|
Java
|
UTF-8
|
Java
| false
| false
| 4,324
|
java
|
/*
* Copyright 2018 JDCLOUD.COM
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http:#www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* 云鼎短信服务-发送短信相关接口
* 云鼎短信服务-发送短信相关接口
*
* OpenAPI spec version: v1
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.ydsms.model;
import java.util.List;
import java.util.ArrayList;
import com.jdcloud.sdk.annotation.Required;
import com.jdcloud.sdk.service.JdcloudRequest;
/**
* 根据pin发送短信
*/
public class SendMessagesByPinUsingPOSTRequest extends JdcloudRequest implements java.io.Serializable {
private static final long serialVersionUID = 1L;
/**
* 应用id
* Required:true
*/
@Required
private String appId;
/**
* 签名id
* Required:true
*/
@Required
private String signId;
/**
* 模板id
* Required:true
*/
@Required
private String templateId;
/**
* 用户pin
* Required:true
*/
@Required
private String pin;
/**
* 短信模板变量对应的数据值
*/
private List<String> params;
/**
* get 应用id
*
* @return
*/
public String getAppId() {
return appId;
}
/**
* set 应用id
*
* @param appId
*/
public void setAppId(String appId) {
this.appId = appId;
}
/**
* get 签名id
*
* @return
*/
public String getSignId() {
return signId;
}
/**
* set 签名id
*
* @param signId
*/
public void setSignId(String signId) {
this.signId = signId;
}
/**
* get 模板id
*
* @return
*/
public String getTemplateId() {
return templateId;
}
/**
* set 模板id
*
* @param templateId
*/
public void setTemplateId(String templateId) {
this.templateId = templateId;
}
/**
* get 用户pin
*
* @return
*/
public String getPin() {
return pin;
}
/**
* set 用户pin
*
* @param pin
*/
public void setPin(String pin) {
this.pin = pin;
}
/**
* get 短信模板变量对应的数据值
*
* @return
*/
public List<String> getParams() {
return params;
}
/**
* set 短信模板变量对应的数据值
*
* @param params
*/
public void setParams(List<String> params) {
this.params = params;
}
/**
* set 应用id
*
* @param appId
*/
public SendMessagesByPinUsingPOSTRequest appId(String appId) {
this.appId = appId;
return this;
}
/**
* set 签名id
*
* @param signId
*/
public SendMessagesByPinUsingPOSTRequest signId(String signId) {
this.signId = signId;
return this;
}
/**
* set 模板id
*
* @param templateId
*/
public SendMessagesByPinUsingPOSTRequest templateId(String templateId) {
this.templateId = templateId;
return this;
}
/**
* set 用户pin
*
* @param pin
*/
public SendMessagesByPinUsingPOSTRequest pin(String pin) {
this.pin = pin;
return this;
}
/**
* set 短信模板变量对应的数据值
*
* @param params
*/
public SendMessagesByPinUsingPOSTRequest params(List<String> params) {
this.params = params;
return this;
}
/**
* add item to 短信模板变量对应的数据值
*
* @param param
*/
public void addParam(String param) {
if (this.params == null) {
this.params = new ArrayList<>();
}
this.params.add(param);
}
}
|
[
"tancong@jd.com"
] |
tancong@jd.com
|
7e0d2de32fd2a04b0a9b289ad1bc3b6603dfc8e4
|
f378ddd47c8b7de6e9cf1d4228c84f73e9dc59f1
|
/projetos/lsi/src/com/ankit/session/servlet/AppServer.java
|
a57ff2ca6b9994353be9ae64f3115312d2b656a2
|
[] |
no_license
|
charles-marques/dataset-375
|
29e2f99ac1ba323f8cb78bf80107963fc180487c
|
51583daaf58d5669c69d8208b8c4ed4e009001a5
|
refs/heads/master
| 2023-01-20T07:23:09.445693
| 2020-11-27T22:35:49
| 2020-11-27T22:35:49
| 283,315,149
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,767
|
java
|
package com.ankit.session.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.impl.LogFactoryImpl;
import com.ankit.session.model.SessionCookie;
import com.ankit.session.rpc.CreateHelper;
import com.ankit.session.rpc.DeleteHelper;
import com.ankit.session.rpc.RPCServerThread;
import com.ankit.session.rpc.ReadHelper;
import com.ankit.session.rpc.UpdateHelper;
import com.ankit.session.util.MyUtil;
import com.ankit.ssm.db.MembershipProbeThread;
import com.ankit.ssm.db.SimpleDBManager;
import com.ankit.ssm.exceptions.SSMException;
/**
* @author ankitsingh
*
*/
@SuppressWarnings("serial")
@WebServlet("/1b")
public class AppServer extends HttpServlet{
/**
* The constant cookieName
*/
private final static String cookieName = "CS5300PROJECT1SESSIONAS2536";
private int sessionAge = 15;
private int cookieAge =sessionAge;
private static final Log log = LogFactoryImpl.getLog(AppServer.class);
@Override
public void init() throws ServletException {
log.info("Starting Deamon Thread");
DeamonThread deamonThread = new DeamonThread();
deamonThread.setDaemon(true);
startThread(deamonThread);
log.info("starting The RPC server thread");
RPCServerThread rpcST = new RPCServerThread();
startThread(rpcST);
log.info("Starting the random probe thread");
MembershipProbeThread mpt = new MembershipProbeThread();
startThread(mpt);
super.init();
}
private void startThread(Thread t){
if(!t.isAlive()){
t.start();
}
}
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
response.setContentType("text/html");
Cookie currentCookie = getCookie(request.getCookies());
ServerContext.getInstance().setCurrentRequest(request);
ServerContext.getInstance().setCurrentResponse(response);
if(currentCookie != null){
SessionCookie sc = new SessionCookie(currentCookie);
ServerContext.getInstance().setSessionCookie(sc);
}
if(currentCookie == null){
createSession();
}else{
if (request.getParameter("cmdRefresh")!=null){
processRead();
}
else if(request.getParameter("cmdLogout")!=null){
processLogout();
}
else if(request.getParameter("cmdReplace") != null){
processUpdate();
}else if(request.getParameter("cmdRefMEM") != null){
try {
SimpleDBManager.getInstance().refresh();
} catch (SSMException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
processRead();
}else if(request.getParameter("cmdKILL") != null){
System.exit(0);
}
else{
processRead();
}
}
//1. Get the response output stream
//2. send the new message and the new expiry time
response = ServerContext.getInstance().getCurrentResponse();
PrintWriter out = response.getWriter();
log.info("AppServer.doGet() HTML"+ServerContext.getInstance().getResponseHTML());
out.println(ServerContext.getInstance().getResponseHTML());
}
private void createSession(){
log.info("CREATE NEW SESSION");
CreateHelper creater = new CreateHelper();
SessionData data =creater.createNewSession();
buildResponse(data);
}
private void processUpdate(){
log.info("UPDATE SESSION");
try{
UpdateHelper updater = new UpdateHelper();
SessionData data = updater.updateSessionData();
buildResponse(data);
}catch (SessionNotFoundException e) {
//session not found
//display the expired message
buildExpiredHTML();
}
}
private void processLogout(){
log.info("LOGOUT SESSION");
DeleteHelper deleteHelper = new DeleteHelper();
SessionCookie sc= ServerContext.getInstance().getSessionCookie();
deleteHelper.deletSessionData(sc.getSessionID(), sc.getSessionVersion());
buildLogoutHTML();
}
private void processRead(){
log.info("READ SESSION");
try{
ReadHelper reader = new ReadHelper();
SessionData data = reader.readSessionData();
buildResponse(data);
}catch (SessionNotFoundException e) {
//session not found
//display the expired message
buildExpiredHTML();
}
}
private void buildResponse(SessionData sessionData){
SessionCookie sc = ServerContext.getInstance().getSessionCookie();
log.info("AppServer.buildResponse() SC :"+sc);
sc.setSessionVerion(sessionData.getSessionVersion());
Cookie c = sc.getCookie();
c.setMaxAge(cookieAge*60);
ServerContext.getInstance().getCurrentResponse().addCookie(c);
ServerContext.getInstance().setResponseHTML((MyUtil.getHtmlPage(sc.getSessionID(), sessionData)));
}
private void buildExpiredHTML(){
buildExitHTML("Session Expired", "Opps! Your Session can not be found or has expired");
}
private void buildLogoutHTML(){
buildExitHTML("Session Ended", "You have been logged out");
}
private void buildExitHTML(String heading,String message){
String s = MyUtil.getLogoutPage(heading, message);
SessionCookie sc = ServerContext.getInstance().getSessionCookie();
Cookie c = sc.getCookie();
c.setMaxAge(0);
ServerContext.getInstance().getCurrentResponse().addCookie(c);
ServerContext.getInstance().setResponseHTML(s);
}
/**
* @param cookies
* @return
*/
private Cookie getCookie(Cookie[] cookies){
Cookie retVal = null;
if (cookies != null) {
for (int i = 0; i < cookies.length; i++) {
if (cookies[i].getName().equals(cookieName)) {
retVal = cookies[i];
break;
}
}
}
log.info("SessionStateServlet.getCookie() Cookie Value : "+retVal);
return retVal;
}
}
|
[
"suporte@localhost.localdomain"
] |
suporte@localhost.localdomain
|
dbe819cf24c23bb913925e3c548bbdbbe8166255
|
fda629d19bdafefe57506c93185c093250d204ad
|
/app/src/main/java/jp/co/shiratsuki/walkietalkie/widget/xrecyclerview/XRecyclerViewDivider.java
|
50da0f61bac8ff11b53f595809172395c644980e
|
[] |
no_license
|
lwgboy/WalkieTalkie
|
4e97e88a18869961d09a308e66daaaf939ee0287
|
05c71f524e0e4b09048151c2b19990b1a6704c1a
|
refs/heads/master
| 2022-01-05T07:21:14.580705
| 2019-03-18T09:35:39
| 2019-03-18T09:35:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,481
|
java
|
package jp.co.shiratsuki.walkietalkie.widget.xrecyclerview;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.support.v4.content.ContextCompat;
import android.support.v7.widget.LinearLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import jp.co.shiratsuki.walkietalkie.utils.DeviceUtil;
/**
* XRecyclerView分割线
* 添加分割线的时候XRecyclerView把footerview也算成了一个childView,所以多添加了一个
* Created at 2018/7/31 0031 15:33
*
* @author LiYuliang
* @version 1.0
*/
public class XRecyclerViewDivider extends RecyclerView.ItemDecoration {
private Paint mPaint;
private Drawable mDivider;
/**
* 分割线高度,默认为2px
*/
private int mDividerHeight = 2;
/**
* 列表的方向:LinearLayoutManager.VERTICAL或LinearLayoutManager.HORIZONTAL
*/
private int mOrientation;
private static final int[] ATTRS = new int[]{android.R.attr.listDivider};
/**
* 默认分割线:高度为2px,颜色为灰色
*
* @param context Context对象
* @param orientation 列表方向
*/
public XRecyclerViewDivider(Context context, int orientation) {
if (orientation != LinearLayoutManager.VERTICAL && orientation != LinearLayoutManager.HORIZONTAL) {
throw new IllegalArgumentException("请输入正确的参数!");
}
mOrientation = orientation;
final TypedArray a = context.obtainStyledAttributes(ATTRS);
mDivider = a.getDrawable(0);
a.recycle();
}
/**
* 自定义分割线
*
* @param context Context对象
* @param orientation 列表方向
* @param drawableId 分割线图片
*/
public XRecyclerViewDivider(Context context, int orientation, int drawableId) {
this(context, orientation);
mDivider = ContextCompat.getDrawable(context, drawableId);
mDividerHeight = mDivider.getIntrinsicHeight();
}
/**
* 自定义分割线
*
* @param context Context对象
* @param orientation 列表方向
* @param dividerHeight 分割线高度(dp)
* @param dividerColor 分割线颜色
*/
public XRecyclerViewDivider(Context context, int orientation, int dividerHeight, int dividerColor) {
this(context, orientation);
//dp转px
mDividerHeight = DeviceUtil.dp2px(context, dividerHeight);
mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
mPaint.setColor(dividerColor);
mPaint.setStyle(Paint.Style.FILL);
}
/**
* 获取分割线尺寸
*
* @param outRect
* @param view
* @param parent
* @param state
*/
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
super.getItemOffsets(outRect, view, parent, state);
outRect.set(0, 0, 0, mDividerHeight);
}
/**
* 绘制分割线
*
* @param c
* @param parent
* @param state
*/
@Override
public void onDraw(Canvas c, RecyclerView parent, RecyclerView.State state) {
super.onDraw(c, parent, state);
if (mOrientation == LinearLayoutManager.VERTICAL) {
drawVertical(c, parent);
} else {
drawHorizontal(c, parent);
}
}
/**
* 绘制横向 item 分割线
*
* @param canvas
* @param parent
*/
private void drawHorizontal(Canvas canvas, RecyclerView parent) {
final int left = parent.getPaddingLeft();
final int right = parent.getMeasuredWidth() - parent.getPaddingRight();
final int childSize = parent.getChildCount() - 1;
for (int i = 0; i < childSize; i++) {
final View child = parent.getChildAt(i);
RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) child.getLayoutParams();
final int top = child.getBottom() + layoutParams.bottomMargin;
final int bottom = top + mDividerHeight;
if (mDivider != null) {
mDivider.setBounds(left, top, right, bottom);
mDivider.draw(canvas);
}
if (mPaint != null) {
canvas.drawRect(left, top, right, bottom, mPaint);
}
}
}
/**
* 绘制纵向 item 分割线
*
* @param canvas
* @param parent
*/
private void drawVertical(Canvas canvas, RecyclerView parent) {
final int top = parent.getPaddingTop();
final int bottom = parent.getMeasuredHeight() - parent.getPaddingBottom();
final int childSize = parent.getChildCount() - 1;
for (int i = 0; i < childSize; i++) {
final View child = parent.getChildAt(i);
RecyclerView.LayoutParams layoutParams = (RecyclerView.LayoutParams) child.getLayoutParams();
final int left = child.getRight() + layoutParams.rightMargin;
final int right = left + mDividerHeight;
if (mDivider != null) {
mDivider.setBounds(left, top, right, bottom);
mDivider.draw(canvas);
}
if (mPaint != null) {
canvas.drawRect(left, top, right, bottom, mPaint);
}
}
}
}
|
[
"liyuliang008@outlook.com"
] |
liyuliang008@outlook.com
|
e0fc0218b2a94d81d596f1f5eff53c0a86b38887
|
259c101b7bbeef9efcc25134e7e21f037a7a4092
|
/DTSEmbed_LSC_solve_path/src/softtest/ast/c/ASTUnaryExpression.java
|
708a4ee4a169fb1cd8954306c11c5a5fa0e33f8b
|
[] |
no_license
|
13001090108/dts-solve-path
|
a95c71c31d38afb2c55d85884b931f2938c1f75d
|
649b92eddcc76705bbb4926b33da00009303c04a
|
refs/heads/master
| 2020-04-16T23:17:21.340218
| 2019-01-24T09:34:50
| 2019-01-24T09:37:09
| 166,005,614
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 1,507
|
java
|
/* Generated By:JJTree: Do not edit this line. ASTUnaryExpression.java Version 4.3 */
/* JavaCCOptions:MULTI=true,NODE_USES_PARSER=true,VISITOR=true,TRACK_TOKENS=false,NODE_PREFIX=AST,NODE_EXTENDS=,NODE_FACTORY=,SUPPORT_CLASS_VISIBILITY_PUBLIC=true */
package softtest.ast.c;
import softtest.symboltable.c.NameDeclaration;
import softtest.symboltable.c.Scope;
import softtest.symboltable.c.Search;
import softtest.symboltable.c.VariableNameDeclaration;
public
class ASTUnaryExpression extends AbstractExpression {
NameDeclaration decl=null;
public NameDeclaration getDecl() {
return decl;
}
public void setDecl(NameDeclaration decl) {
this.decl = decl;
}
//多级指针的成员声明
//add by zhouhb
//2011.5.18
public VariableNameDeclaration getVariableDecl() {
VariableNameDeclaration ret = null;
if (!image.equals("")) {
Scope scope = getScope();
NameDeclaration decl = Search.searchInVariableUpward(image, scope);
if (decl instanceof VariableNameDeclaration) {
ret = (VariableNameDeclaration) decl;
}
}
return ret;
}
//end by zhouhb
public ASTUnaryExpression(int id) {
super(id);
}
public ASTUnaryExpression(CParser p, int id) {
super(p, id);
}
/** Accept the visitor. **/
public Object jjtAccept(CParserVisitor visitor, Object data) {
return visitor.visit(this, data);
}
}
/* JavaCC - OriginalChecksum=91cfc4f192e5cd62cdf589ee001748df (do not edit this line) */
|
[
"lishaochun@bupt.edu.cn"
] |
lishaochun@bupt.edu.cn
|
5ae251452ce13f35ddd4b69af611127a2910d84b
|
becfc02168247c141747ef5a52ce10dc581ab0bc
|
/action-root/action-dao/src/main/java/cn/gyyx/action/dao/cs2sign/ICs2SignBean.java
|
dacd78b73f61ce1601bb06c6b5cade79dbd0ae87
|
[] |
no_license
|
wangqingxian/springBoot
|
629d71200f2f62466ac6590924d49bd490601276
|
0efcd6ed29816c31f2843a24d9d6dc5d1c7f98d2
|
refs/heads/master
| 2020-04-22T02:42:01.757523
| 2017-06-08T10:56:51
| 2017-06-08T10:56:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 227
|
java
|
package cn.gyyx.action.dao.cs2sign;
import cn.gyyx.action.beans.cs2sign.Cs2SignBean;
public interface ICs2SignBean {
public void insertCs2SignBean(Cs2SignBean bean);
public int selectCs2SignBeanTodayCount(String account);
}
|
[
"lihu@gyyx.cn"
] |
lihu@gyyx.cn
|
592f9b782608912fb6e4f482e30d58c99ee4f3d4
|
5832504c187692c3410ab0754d647af1d191bec2
|
/bin/custom/cuppy/gensrc/de/hybris/platform/cuppy/jalo/GeneratedCountryFlag.java
|
2e9954e3ad4478e6722190aac48a595966a3766a
|
[] |
no_license
|
ramamohan/Hybris_TEST
|
d8505769885edc66ed85831def9e2b9f93bf33a6
|
820654707f194feb785483f9bf9851a1381af9d0
|
refs/heads/master
| 2021-12-09T05:35:58.257789
| 2016-04-28T23:42:26
| 2016-04-28T23:42:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,521
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at 28.04.2016 16:51:49 ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 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.cuppy.jalo;
import de.hybris.platform.jalo.Item.AttributeMode;
import de.hybris.platform.jalo.media.Media;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
/**
* Generated class for type {@link de.hybris.platform.cuppy.jalo.CountryFlag CountryFlag}.
*/
@SuppressWarnings({"deprecation","unused","cast","PMD"})
public abstract class GeneratedCountryFlag extends Media
{
protected static final Map<String, AttributeMode> DEFAULT_INITIAL_ATTRIBUTES;
static
{
final Map<String, AttributeMode> tmp = new HashMap<String, AttributeMode>(Media.DEFAULT_INITIAL_ATTRIBUTES);
DEFAULT_INITIAL_ATTRIBUTES = Collections.unmodifiableMap(tmp);
}
@Override
protected Map<String, AttributeMode> getDefaultAttributeModes()
{
return DEFAULT_INITIAL_ATTRIBUTES;
}
}
|
[
"kevind@mail.ru"
] |
kevind@mail.ru
|
9470a23e295610abcc154d4a8620cca40359a185
|
55821b09861478c6db214d808f12f493f54ff82a
|
/trunk/java.prj/ITSMCSharp2Java/Fusion.Foundation/Fusion/SoapTransferDirector.java
|
0b87621a6f01a290fdbd102d0134f8ec7bb84578
|
[] |
no_license
|
SiteView/ECC8.13
|
ede526a869cf0cb076cd9695dbc16075a1cf9716
|
bced98372138b09140dc108b33bb63f33ef769fe
|
refs/heads/master
| 2016-09-05T13:57:21.282048
| 2012-06-12T08:54:40
| 2012-06-12T08:54:40
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 733
|
java
|
package Fusion;
/**
* @author Administrator
* @version 1.0
* @created 20-ËÄÔÂ-2010 14:35:20
*/
public class SoapTransferDirector extends TransferDirector {
private SoapTransferAgent m_agent = null;
private byte m_nBuffer[] = null;
private final int m_nBuffSize = 0x8000;
public SoapTransferDirector(){
}
public void finalize() throws Throwable {
super.finalize();
}
/**
*
* @param agent
*/
public SoapTransferDirector(SoapTransferAgent agent){
}
/**
*
* @param indicator
*/
public FileInfo LoadFile(IProgressIndicator indicator){
return null;
}
/**
*
* @param indicator
*/
public void SendFile(IProgressIndicator indicator){
}
}
|
[
"136122085@163.com"
] |
136122085@163.com
|
17fb36cf0321302c72c8872a1c28eef51e5c3890
|
d5bd9c148f3ab96aa6df21ff6ef0bfc0f5001468
|
/im-demo-netty-tcp-websocket/src/main/java/com/kefu/netty/protocol/request/LogoutRequestPacket.java
|
8cbd9f934b37a64986c35197887949966bb8de60
|
[] |
no_license
|
dantefung/WebSocketDemo-1
|
cdc893303c183c663880d5b8c8e056d6647c5356
|
7fcd686e2edd5f3c77cdef956e908ed60d9e50a4
|
refs/heads/master
| 2020-09-10T19:12:44.796206
| 2019-11-20T12:13:24
| 2019-11-20T12:13:24
| 221,810,658
| 0
| 0
| null | 2019-11-15T00:21:46
| 2019-11-15T00:21:45
| null |
UTF-8
|
Java
| false
| false
| 344
|
java
|
package com.kefu.netty.protocol.request;
import com.kefu.netty.protocol.Packet;
import com.kefu.netty.protocol.command.Command;
import lombok.Data;
/**
* @author feng
* @date 2019-04-21
*/
@Data
public class LogoutRequestPacket extends Packet {
@Override
public Byte getCommand() {
return Command.LOGOUT_REQUEST;
}
}
|
[
"476400902@qq.com"
] |
476400902@qq.com
|
2a0798d44ed0642a02931c96419e7567c63f04b7
|
0ad9ee3e24303a5712bcfedb8a9f314e72dd2172
|
/src/com/springaop/advice/AdviceBean.java
|
44de812b2014956aaba41ab27cb8b7950900c638
|
[
"Apache-2.0"
] |
permissive
|
tlhhup/spring-aop
|
f4d9302f3fad417af22bd98528f8df615f6a7150
|
f590a425cfb7c7193e21a349502db26f1b12a7c3
|
refs/heads/master
| 2021-01-17T21:08:29.791959
| 2016-08-09T08:19:47
| 2016-08-09T08:19:47
| 64,469,018
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 641
|
java
|
package com.springaop.advice;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.ProceedingJoinPoint;
public class AdviceBean {
public void before(JoinPoint joinpoint){
//获取方法的签名
joinpoint.getSignature().getName();
System.out.println("前置增强");
}
/**
* 因为代理类中的返回存在有返回值则增强返回必须带object类型的返回值进行统配
*/
public Object round(ProceedingJoinPoint joinPoint){
System.out.println("环绕增强");
try {
return joinPoint.proceed();
} catch (Throwable e) {
e.printStackTrace();
}
return null;
}
}
|
[
"137273278@qq.com"
] |
137273278@qq.com
|
d5e556b33825a143558f0d45b3331910e8416824
|
3c73008e21c90d1de8d8fa5508460418e69474e1
|
/src/main/java/io/r2dbc/postgresql/message/frontend/FrontendMessageUtils.java
|
eddadfa6a4a3ff81a3090d8ee166b1aa972f94a1
|
[
"Apache-2.0"
] |
permissive
|
rdegnan/r2dbc-postgresql
|
3b41fcba19e077a21634b30713d160763477f113
|
068b6d59b31f5ad0940e836af9de25cc3b6d2fc3
|
refs/heads/master
| 2020-04-06T20:37:32.803816
| 2019-01-07T21:04:12
| 2019-01-07T21:04:12
| 157,777,709
| 0
| 0
| null | 2018-11-15T21:56:08
| 2018-11-15T21:56:08
| null |
UTF-8
|
Java
| false
| false
| 3,517
|
java
|
/*
* Copyright 2017-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package io.r2dbc.postgresql.message.frontend;
import io.netty.buffer.ByteBuf;
import io.r2dbc.postgresql.util.Assert;
import java.nio.ByteBuffer;
import static io.netty.util.CharsetUtil.UTF_8;
final class FrontendMessageUtils {
static final int MESSAGE_OVERHEAD = 1 + 4;
private static final int LENGTH_PLACEHOLDER = 0;
private static final byte TERMINAL = 0;
private FrontendMessageUtils() {
}
static ByteBuf writeByte(ByteBuf out, int... values) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(values, "values must not be null");
for (int value : values) {
out.writeByte(value);
}
return out;
}
static ByteBuf writeBytes(ByteBuf out, ByteBuf in) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(in, "in must not be null");
out.writeBytes(in);
return out;
}
static ByteBuf writeBytes(ByteBuf out, ByteBuffer in) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(in, "in must not be null");
out.writeBytes(in);
return out;
}
static ByteBuf writeCString(ByteBuf out, ByteBuf in) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(in, "in must not be null");
out.writeBytes(in, in.readerIndex(), in.readableBytes());
out.writeByte(TERMINAL);
return out;
}
static ByteBuf writeCStringUTF8(ByteBuf out, String s) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(s, "s must not be null");
out.writeCharSequence(s, UTF_8);
out.writeByte(TERMINAL);
return out;
}
static ByteBuf writeInt(ByteBuf out, int... values) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(values, "values must not be null");
for (int value : values) {
out.writeInt(value);
}
return out;
}
static ByteBuf writeLengthPlaceholder(ByteBuf out) {
Assert.requireNonNull(out, "out must not be null");
out.writeInt(LENGTH_PLACEHOLDER);
return out;
}
static ByteBuf writeShort(ByteBuf out, int... values) {
Assert.requireNonNull(out, "out must not be null");
Assert.requireNonNull(values, "values must not be null");
for (int value : values) {
out.writeShort(value);
}
return out;
}
static ByteBuf writeSize(ByteBuf out) {
Assert.requireNonNull(out, "out must not be null");
return writeSize(out, 1);
}
static ByteBuf writeSize(ByteBuf out, int startIndex) {
Assert.requireNonNull(out, "out must not be null");
out.setInt(startIndex, out.writerIndex() - startIndex);
return out;
}
}
|
[
"bhale@pivotal.io"
] |
bhale@pivotal.io
|
004c511458d5a7b2db7149384b29cc410d21b2df
|
0add69c608f614666166bd2b12264792ee023563
|
/jumbo-converters-compchem/jumbo-converters-compchem-amber/src/main/java/org/xmlcml/cml/converters/compchem/amber/in/AmberFFXMLProcessor.java
|
c2cd115c0541a49c90a44d54e45bc361a245c5c7
|
[
"Apache-2.0"
] |
permissive
|
BlueObelisk/jumbo-converters
|
60d4963803ea9f3469136c67f67230ba81493b6f
|
858ba47240f3109db7d0338e572736eb6f8e5b61
|
refs/heads/master
| 2021-07-03T06:58:33.946886
| 2020-01-05T19:59:51
| 2020-01-05T19:59:51
| 230,640,192
| 5
| 1
|
Apache-2.0
| 2021-04-26T19:50:10
| 2019-12-28T17:20:13
|
Java
|
UTF-8
|
Java
| false
| false
| 318
|
java
|
package org.xmlcml.cml.converters.compchem.amber.in;
import org.xmlcml.cml.converters.cml.RawXML2CMLProcessor;
public class AmberFFXMLProcessor extends RawXML2CMLProcessor {
public AmberFFXMLProcessor() {
}
protected void processXML() {
wrapWithProperty("./*[local-name()='scalar']");
}
}
|
[
"733515+petermr@users.noreply.github.com"
] |
733515+petermr@users.noreply.github.com
|
2560749c43decd989bc8bd659de2417e66e1f216
|
6500848c3661afda83a024f9792bc6e2e8e8a14e
|
/output/com.google.android.finsky.billing.addresschallenge.a.ap.java
|
753b70b72d0726608d435bbec45c58d5be83f4b3
|
[] |
no_license
|
enaawy/gproject
|
fd71d3adb3784d12c52daf4eecd4b2cb5c81a032
|
91cb88559c60ac741d4418658d0416f26722e789
|
refs/heads/master
| 2021-09-03T03:49:37.813805
| 2018-01-05T09:35:06
| 2018-01-05T09:35:06
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,687
|
java
|
package com.google.android.finsky.billing.addresschallenge.a;
public final class com.google.android.finsky.billing.addresschallenge.a.ap implements com.google.android.finsky.billing.addresschallenge.a.y
{
public Object a;
public boolean b;
ap(Object p0) {
this.a = p0;
this.b = 0;
}
public final void a() {
}
public final void b() {
enter this;
try {
this.b = 1;
exit this;
}
catch (Throwable ex) {
try {
exit this;
}
catch (Throwable ex) {
exit this;
throw ex;
}
throw ex;
}
enter this.a;
try {
this.a.notify();
exit this.a;
}
catch (Throwable ex) {
try {
exit this.a;
}
catch (Throwable ex) {
exit this.a;
throw ex;
}
throw ex;
}
}
public final void c() {
enter this;
try {
if (this.b != 0) {
exit this;
return;
}
exit this;
}
catch (Throwable ex) {
try {
exit this;
}
catch (Throwable ex) {
exit this;
throw ex;
}
throw ex;
}
enter this.a;
try {
this.a.wait();
exit this.a;
return;
exit this.a;
}
catch (Throwable ex) {
exit this.a;
throw ex;
}
}
}
|
[
"genius.ron@gmail.com"
] |
genius.ron@gmail.com
|
b64dd4e81a7aaae981d4866da65308d988b37997
|
edba60bb2b081bef0dde2141d4273a8ec5b85b59
|
/src/JADE_SL/onto/ACLOntology.java
|
fecbdf86280881437ae9490a65da4d7b2c2337c8
|
[] |
no_license
|
sgt101/zeus
|
6a087bc6438ff82b456b67f193dd554954cd0599
|
1f48ff24ffaa55128fbe0b9b67b2465e1d1e46ce
|
refs/heads/master
| 2020-05-30T11:02:22.819112
| 2015-02-26T15:25:23
| 2015-02-26T15:25:23
| 31,373,027
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,743
|
java
|
/**
* ***************************************************************
* JADE - Java Agent DEvelopment Framework is a framework to develop
* multi-agent systems in compliance with the FIPA specifications.
* Copyright (C) 2000 CSELT S.p.A.
*
* GNU Lesser General Public License
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation,
* version 2.1 of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* **************************************************************
*/
package JADE_SL.onto;
import JADE_SL.*;
import JADE_SL.acl.*;
import JADE_SL.schema.*;
/**
* Ontology containing the concepts that ACL mandates.
*
* see JADE_SL.Ontology
*
* @author Federico Bergenti - Universita` di Parma
*/
public class ACLOntology extends Ontology {
public static final String COMMUNICATIVE_ACT = "COMMUNICATIVEACT";
public static final String COMMUNICATIVE_ACT_SENDER = "sender";
public static final String COMMUNICATIVE_ACT_RECEIVERS = "receivers";
public static final String INFORM = "INFORM";
public static final String INFORM_PREDICATE = "predicate";
public static final String REQUEST = "REQUEST";
public static final String REQUEST_ACTION = "action";
public static final String QUERY_REF = "QUERYREF";
public static final String QUERY_REF_IRE = "ire";
private static final ACLOntology theInstance = new ACLOntology();
/**
* Constructor
*/
private ACLOntology() {
super("ACL_ONTOLOGY", BasicOntology.getInstance(), new ReflectiveIntrospector());
try {
AgentActionSchema baseSchema = new AgentActionSchema(COMMUNICATIVE_ACT);
baseSchema.add(COMMUNICATIVE_ACT_SENDER, (ConceptSchema) getSchema(BasicOntology.AID));
baseSchema.add(COMMUNICATIVE_ACT_RECEIVERS, (AggregateSchema) getSchema(BasicOntology.SEQUENCE));
add(baseSchema, CommunicativeActBase.class);
AgentActionSchema informSchema = new AgentActionSchema(INFORM);
informSchema.addSuperSchema(baseSchema);
informSchema.add(INFORM_PREDICATE, (PredicateSchema) PredicateSchema.getBaseSchema());
add(informSchema, Inform.class);
AgentActionSchema requestSchema = new AgentActionSchema(REQUEST);
requestSchema.addSuperSchema(baseSchema);
requestSchema.add(REQUEST_ACTION, (AgentActionSchema) AgentActionSchema.getBaseSchema());
add(requestSchema, Request.class);
AgentActionSchema queryrefSchema = new AgentActionSchema(QUERY_REF);
queryrefSchema.addSuperSchema(baseSchema);
queryrefSchema.add(QUERY_REF_IRE, (IRESchema) IRESchema.getBaseSchema());
add(queryrefSchema); // As the content of a QUERYREF is an IRE a concrete QueryRef class makes no sense
}
catch (OntologyException oe) {
oe.printStackTrace();
}
}
/**
* Returns the singleton instance of the <code>ACLOntology</code>.
* @return the <code>ACLOntology</code>
*/
public static Ontology getInstance() {
return theInstance;
}
}
|
[
"simon.2.thompson@gmail.com"
] |
simon.2.thompson@gmail.com
|
58904ddd79dd7dc292431bc12a6fc416772122f3
|
c024ac5e0b74dd7e5775753294962390b45e9ae7
|
/src/main/java/net/mcreator/blahmod/fuel/TropicsStairsFuelFuel.java
|
a400fc967ac3c255cb27e78bf6a6f96332d2cd14
|
[] |
no_license
|
blahblahbal/Blah-s-Minecraft-MCreator-Mod
|
600f9cce717b965c51de5b15a9762c50138cfe22
|
a8cdf57bc5078de5e07fc233f5f3542c94b3255d
|
refs/heads/master
| 2023-05-06T11:03:33.889262
| 2021-06-03T02:25:09
| 2021-06-03T02:25:09
| 373,354,094
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 839
|
java
|
package net.mcreator.blahmod.fuel;
import net.minecraftforge.eventbus.api.SubscribeEvent;
import net.minecraftforge.event.furnace.FurnaceFuelBurnTimeEvent;
import net.minecraftforge.common.MinecraftForge;
import net.minecraft.item.ItemStack;
import net.mcreator.blahmod.block.TropicsStairsBlock;
import net.mcreator.blahmod.BlahmodModElements;
@BlahmodModElements.ModElement.Tag
public class TropicsStairsFuelFuel extends BlahmodModElements.ModElement {
public TropicsStairsFuelFuel(BlahmodModElements instance) {
super(instance, 826);
MinecraftForge.EVENT_BUS.register(this);
}
@SubscribeEvent
public void furnaceFuelBurnTimeEvent(FurnaceFuelBurnTimeEvent event) {
if (event.getItemStack().getItem() == new ItemStack(TropicsStairsBlock.block, (int) (1)).getItem())
event.setBurnTime(300);
}
}
|
[
"jabawakijadehawk@gmail.com"
] |
jabawakijadehawk@gmail.com
|
5ab8c2d5a169012e4626b76379ae3eb86012ac7e
|
44298254e00bbac5a459bfe680161f5053d5530c
|
/app/src/main/java/com/fanting/aidongtan/widgets/SpacesItemDecoration.java
|
52e9a58cf96b6263ac58a0ce603794a9163637c3
|
[] |
no_license
|
FightTech/aidong
|
64e95be5363b2be3d1038a94e905f4a0e830ad9b
|
0e2948df266203f4cfcf8e23b6c19dee74e07867
|
refs/heads/master
| 2021-09-04T22:06:44.505118
| 2018-01-22T14:58:13
| 2018-01-22T14:58:13
| 112,009,587
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 990
|
java
|
package com.fanting.aidongtan.widgets;
import android.graphics.Rect;
import android.support.v7.widget.RecyclerView;
import android.view.View;
public class SpacesItemDecoration extends RecyclerView.ItemDecoration {
private final int mColumnCount;
private final int mSpace;
public SpacesItemDecoration(int space, int columnCount) {
this.mSpace = space;
this.mColumnCount = columnCount;
}
@Override
public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
outRect.bottom = mSpace;
// Add top margin only for the first item to avoid double mSpace between items
if (parent.getChildLayoutPosition(view) == mColumnCount - 1) {
outRect.right = 0;
} else {
outRect.right = mSpace / 2;
}
if (parent.getChildLayoutPosition(view) == 0) {
outRect.left = 0;
} else {
outRect.left = mSpace / 2;
}
}
}
|
[
"1184394624@qq.com"
] |
1184394624@qq.com
|
34e15c64c5e02369861ccb1aea2b548ccfc6c8a7
|
25baed098f88fc0fa22d051ccc8027aa1834a52b
|
/src/main/java/com/ljh/daoMz/UndrugInfo0510Mapper.java
|
7b14e805d3b479dc4e0546067fa45a24d94a8f1e
|
[] |
no_license
|
woai555/ljh
|
a5015444082f2f39d58fb3e38260a6d61a89af9f
|
17cf8f4415c9ae7d9fedae46cd9e9d0d3ce536f9
|
refs/heads/master
| 2022-07-11T06:52:07.620091
| 2022-01-05T06:51:27
| 2022-01-05T06:51:27
| 132,585,637
| 0
| 0
| null | 2022-06-17T03:29:19
| 2018-05-08T09:25:32
|
Java
|
UTF-8
|
Java
| false
| false
| 275
|
java
|
package com.ljh.daoMz;
import com.ljh.bean.UndrugInfo0510;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* <p>
* Mapper 接口
* </p>
*
* @author ljh
* @since 2020-10-26
*/
public interface UndrugInfo0510Mapper extends BaseMapper<UndrugInfo0510> {
}
|
[
"37681193+woai555@users.noreply.github.com"
] |
37681193+woai555@users.noreply.github.com
|
f2776262bbcfc93a90f05a9a2e0f591cb6d0af07
|
0fba861d2b4a29086efaa3f41ff5fd790bae08d6
|
/src/main/java/com/aractronic/sympo/domain/AbstractAuditingEntity.java
|
ecfb86f626b4e76a68511e2c11f2026e5cfb5f8e
|
[] |
no_license
|
BulkSecurityGeneratorProject/sympo
|
56f9c1d84497c439d87897ded7b1f8d0ce53851f
|
3cb425b958af843f4493b00fc24d305ce4c90a0b
|
refs/heads/master
| 2022-12-23T06:30:30.580461
| 2018-03-05T13:38:41
| 2018-03-05T13:38:41
| 296,606,373
| 0
| 0
| null | 2020-09-18T11:50:51
| 2020-09-18T11:50:50
| null |
UTF-8
|
Java
| false
| false
| 2,216
|
java
|
package com.aractronic.sympo.domain;
import java.io.Serializable;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.hibernate.envers.Audited;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
import java.time.Instant;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
/**
* Base abstract class for entities which will hold definitions for created, last modified by and created,
* last modified by date.
*/
@MappedSuperclass
@Audited
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@CreatedBy
@Column(name = "created_by", nullable = false, length = 50, updatable = false)
@JsonIgnore
private String createdBy;
@CreatedDate
@Column(name = "created_date", nullable = false)
@JsonIgnore
private Instant createdDate = Instant.now();
@LastModifiedBy
@Column(name = "last_modified_by", length = 50)
@JsonIgnore
private String lastModifiedBy;
@LastModifiedDate
@Column(name = "last_modified_date")
@JsonIgnore
private Instant lastModifiedDate = Instant.now();
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Instant getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
public Instant getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
}
|
[
"jhipster-bot@users.noreply.github.com"
] |
jhipster-bot@users.noreply.github.com
|
23a17dd37330fc87d567c80c90266313e55e99fa
|
2deb74d5bf569bdbe637846d93fac47c01b278a4
|
/android/location/Geocoder.java
|
7a9326430e242be0ff4cce602aaaa6ff23da7f58
|
[] |
no_license
|
isabella232/android-sdk-sources-for-api-level-11
|
8aefeff38cbc0bbe7cfbbd04a940f8c4aa319772
|
d772b816a1e388a5f8022d4bc47adc9016195600
|
refs/heads/master
| 2023-03-16T14:08:07.661845
| 2015-07-03T11:17:32
| 2015-07-03T11:17:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,251
|
java
|
/* */ package android.location;
/* */
/* */ import android.content.Context;
/* */ import java.io.IOException;
/* */ import java.util.List;
/* */ import java.util.Locale;
/* */
/* */ public final class Geocoder
/* */ {
/* */ public Geocoder(Context context, Locale locale)
/* */ {
/* 4 */ throw new RuntimeException("Stub!"); }
/* 5 */ public Geocoder(Context context) { throw new RuntimeException("Stub!"); }
/* 6 */ public static boolean isPresent() { throw new RuntimeException("Stub!"); }
/* 7 */ public List<Address> getFromLocation(double latitude, double longitude, int maxResults) throws IOException { throw new RuntimeException("Stub!"); }
/* 8 */ public List<Address> getFromLocationName(String locationName, int maxResults) throws IOException { throw new RuntimeException("Stub!"); }
/* 9 */ public List<Address> getFromLocationName(String locationName, int maxResults, double lowerLeftLatitude, double lowerLeftLongitude, double upperRightLatitude, double upperRightLongitude) throws IOException { throw new RuntimeException("Stub!");
/* */ }
/* */ }
/* Location: D:\xyh\Android_3.0\android.jar
* Qualified Name: android.location.Geocoder
* JD-Core Version: 0.6.0
*/
|
[
"root@ifeegoo.com"
] |
root@ifeegoo.com
|
033c62c171b0e9a8eecb2d31b605418da93b2bf5
|
19f7e40c448029530d191a262e5215571382bf9f
|
/decompiled/instagram/sources/p000X/B2R.java
|
f99be625eaba8bf6e63cbf0442c936b88517c849
|
[] |
no_license
|
stanvanrooy/decompiled-instagram
|
c1fb553c52e98fd82784a3a8a17abab43b0f52eb
|
3091a40af7accf6c0a80b9dda608471d503c4d78
|
refs/heads/master
| 2022-12-07T22:31:43.155086
| 2020-08-26T03:42:04
| 2020-08-26T03:42:04
| 283,347,288
| 18
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 322
|
java
|
package p000X;
/* renamed from: X.B2R */
public final class B2R implements C11590fD {
public final /* synthetic */ AnonymousClass0C1 A00;
public B2R(AnonymousClass0C1 r1) {
this.A00 = r1;
}
public final /* bridge */ /* synthetic */ Object get() {
return new C25116B1m(this.A00);
}
}
|
[
"stan@rooy.works"
] |
stan@rooy.works
|
db5a9d07a8ed606eed47e31a789c2f0038a99e22
|
57be11aa246a47ccb78dbd952eb7ff274706370a
|
/src/main/java/com/diffplug/freshmark/CommentScript.java
|
32ea552876c18041db46f0a9212990097dd5d3e9
|
[
"Apache-2.0"
] |
permissive
|
AustinShalit/freshmark
|
01fd9b90093980c8de9e23f66e33527027468fec
|
72eceac8d47686ee5e2d72c0574ac6080d0c2167
|
refs/heads/master
| 2020-03-14T03:36:02.637928
| 2016-08-16T17:04:47
| 2016-08-16T17:04:47
| 131,423,543
| 0
| 0
| null | 2018-04-28T15:57:34
| 2018-04-28T15:57:34
| null |
UTF-8
|
Java
| false
| false
| 4,373
|
java
|
/*
* Copyright 2015 DiffPlug
*
* 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.diffplug.freshmark;
import java.util.function.Function;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.script.ScriptEngine;
import javax.script.ScriptException;
import com.diffplug.common.base.Errors;
import com.diffplug.jscriptbox.Check;
/**
* A CommentScript is a way of automatically generating
* or modifying parts of a document by embedding scripts
* in the comments of that document.
* <p>
* A CommentScript has the following form:
* <pre>
* {@code
* [COMMENT_START sectionName
* script
* script
* COMMENT_END]
* body
* body
* body
* [COMMENT_START /sectionName COMMENT_END]
* }
* </pre>
* This class is a minimal implementation of a CommentScript. To create a CommentScript,
* you must provide:
* <ul>
* <li>A {@link Parser} to split the comment text from the body text.</li>
* <li>{@link #keyToValue} - defines how template keys in the script string are transformed into values.</li>
* <li>{@link #setupScriptEngine} - initializes any functions or variables which should be available to the script.</li>
* </ul>
* @see FreshMark
*/
public abstract class CommentScript implements Parser.SectionCompiler {
/**
* Creates a CommentScript using the given parser to
* delineate and combine comment blocks.
*/
protected CommentScript(Parser parser) {
this.parser = parser;
}
/** Parser which splits up the raw document into structured tags which get passed to the compiler. */
final Parser parser;
/** Compiles a single section/script/input combo into the appropriate output. */
@Override
public String compileSection(String section, String script, String input) {
return Errors.rethrow().get(() -> {
ScriptEngine engine = setupScriptEngine(section);
// apply the templating engine to the script
String templatedProgram = template(section, script);
// populate the input data
engine.put("input", input);
// evaluate the script and get the result
engine.eval(templatedProgram);
return Check.cast(engine.get("output"), String.class);
});
}
/** Compiles the given input string. Input must contain only unix newlines, output is guaranteed to be the same. */
public String compile(String input) throws ScriptException {
return parser.compile(input, this);
}
/**
* Performs templating on the script before passing it to the {@link ScriptEngine} created by {@link #setupScriptEngine}.
* <p>
* Defaults to mustache-based templating which uses {@link #keyToValue(String, String)} to decode keys.
*/
protected String template(String section, String script) {
return mustacheTemplate(script, key -> keyToValue(section, key));
}
/** For the given section, return the templated value for the given key. */
protected abstract String keyToValue(String section, String script);
/**
* For the given section, setup any built-in functions and variables.
* <p>
* The {@code input} value will be set for you, and the {@code output} value will
* be extracted for you, but you must do everything else.
*/
protected abstract ScriptEngine setupScriptEngine(String section) throws ScriptException;
/** Mustache templating. */
static String mustacheTemplate(String input, Function<String, String> keyToValue) {
Matcher matcher = MUSTACHE_PATTERN.matcher(input);
StringBuilder result = new StringBuilder(input.length() * 3 / 2);
int lastElement = 0;
while (matcher.find()) {
result.append(matcher.group(1));
result.append(keyToValue.apply(matcher.group(2)));
lastElement = matcher.end();
}
result.append(input.substring(lastElement));
return result.toString();
}
/** Regex which matches for {@code {{key}}}. */
private static final Pattern MUSTACHE_PATTERN = Pattern.compile("(.*?)\\{\\{(.*?)\\}\\}", Pattern.DOTALL);
}
|
[
"ned.twigg@diffplug.com"
] |
ned.twigg@diffplug.com
|
c20b1f8faf4645f42b56c34522b55b094ffecf79
|
6504352f86c2e4f7ef16cea3f5b7cc00bba96a33
|
/WmesWeb/src/com/fsll/wmes/entity/WebReadToDoEn.java
|
0ffc9753740314a8d28e1908de8f561abafaf737
|
[] |
no_license
|
jedyang/XFAWealth
|
1a20c7b4d16c72883b27c4d8aa72d67df4291b9a
|
029d45620b3375a86fec8bb1161492325f9f2c6c
|
refs/heads/master
| 2021-05-07T04:53:24.628018
| 2017-08-03T15:25:59
| 2017-08-03T15:25:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,163
|
java
|
package com.fsll.wmes.entity;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;
import org.hibernate.annotations.GenericGenerator;
import com.fasterxml.jackson.annotation.JsonIgnore;
@Entity
////@Cache(usage = CacheConcurrencyStrategy.READ_WRITE)
@Table(name = "web_read_to_do_en")
public class WebReadToDoEn implements java.io.Serializable {
@Id
@Column(name="id")
@GeneratedValue(generator = "paymentableGenerator")
@GenericGenerator(name = "paymentableGenerator", strategy = "uuid.hex")
private String id;
@Column(name = "title")
private String title;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
}
|
[
"549592047@qq.com"
] |
549592047@qq.com
|
a5bf4ca47acb688228b39b5971b2f06829e0b803
|
57bf34bdb6ae31fdff8b8c87e73ba27d8916610b
|
/src/main/java/chapter20/annotations/PasswordUtils.java
|
225665bab28a4d463f9bd113a47245d7f990a2bb
|
[] |
no_license
|
Nazar910/PhilosophyOfJavaProjects
|
ecbe207f79b1eecb4b5e954f91c7522831aa62cb
|
610a1ed6d39e30ee4ec9a8522d40554d86195004
|
refs/heads/master
| 2021-03-22T03:04:28.243593
| 2017-02-25T10:23:49
| 2017-02-25T10:23:49
| 80,540,661
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 706
|
java
|
package chapter20.annotations;
import java.util.List;
/**
* Created by pyvov on 24.02.2017.
*/
public class PasswordUtils {
@UseCase(id = 47, description =
"Passwords must contain at least one numeric")
public boolean validatePassword(String password) {
return password.matches("\\w*\\d\\w*");
}
@UseCase(id = 48)
public String encryptPassword(String password) {
return new StringBuilder(password).reverse().toString();
}
@UseCase(id = 49, description =
"New passwords can't equal previously used ones")
public boolean checkForNewPassword(List<String> prevPasswords, String password) {
return !prevPasswords.contains(password);
}
}
|
[
"pyvovarnazar@gmail.com"
] |
pyvovarnazar@gmail.com
|
7496eaf2cfbf642fc71b24714cbd08e28a831dfc
|
877ade460d9175fb7e2f01ab37d041decb769801
|
/fxgl-samples/src/main/java/sandbox/RESTClientSample.java
|
b0260bd72ab84dd1d91c69bd60e11c2e0c9f98cf
|
[
"MIT"
] |
permissive
|
neriudon/FXGL
|
f7b938a390ec30e56a68d4d6926a02a5cbca978c
|
5831728930305b217dc65c707bea48b62c109ce8
|
refs/heads/master
| 2021-04-28T16:17:40.741968
| 2018-02-03T16:57:35
| 2018-02-03T16:57:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,652
|
java
|
/*
* FXGL - JavaFX Game Library. The MIT License (MIT).
* Copyright (c) AlmasB (almaslvl@gmail.com).
* See LICENSE for details.
*/
package sandbox;
import com.almasb.fxgl.app.GameApplication;
import com.almasb.fxgl.gameplay.ScoreData;
import com.almasb.fxgl.scene.ProgressDialog;
import com.almasb.fxgl.settings.GameSettings;
import javafx.scene.input.KeyCode;
import static com.almasb.fxgl.app.DSLKt.onKeyDown;
/**
*
*
* @author Almas Baimagambetov (AlmasB) (almaslvl@gmail.com)
*/
public class RESTClientSample extends GameApplication {
@Override
protected void initSettings(GameSettings settings) {
settings.setWidth(800);
settings.setHeight(600);
settings.setTitle("RESTClientSample");
settings.setVersion("0.1");
}
@Override
protected void initInput() {
// TODO: we shouldn't allow closing game during progress dialog operations?
onKeyDown(KeyCode.Q, "Get Top", () -> {
getGameplay().getLeaderboard()
.loadTopTask(5)
.onSuccess(scores -> scores.forEach(System.out::println))
.executeAsyncWithDialogFX(new ProgressDialog("Connecting to FXGL server"));
});
onKeyDown(KeyCode.E, "Put New Score", () -> {
getGameplay().getLeaderboard()
.postNewScoreTask(new ScoreData("AlmasB", 1500))
.onSuccess(n -> System.out.println("Success put"))
.executeAsyncWithDialogFX(new ProgressDialog("Uploading to FXGL server"));
});
}
public static void main(String[] args) {
launch(args);
}
}
|
[
"almaslvl@gmail.com"
] |
almaslvl@gmail.com
|
13e4fa5470948f76d4a472bdef65767e55f80da7
|
32b72e1dc8b6ee1be2e80bb70a03a021c83db550
|
/ast_results/TobiasBielefeld_Simple-Solitaire/app/src/main/java/de/tobiasbielefeld/solitaire/helper/Timer.java
|
96df65af63d3dc4dd848bd789c96eba98a611868
|
[] |
no_license
|
cmFodWx5YWRhdjEyMTA5/smell-and-machine-learning
|
d90c41a17e88fcd99d543124eeb6e93f9133cb4a
|
0564143d92f8024ff5fa6b659c2baebf827582b1
|
refs/heads/master
| 2020-07-13T13:53:40.297493
| 2019-01-11T11:51:18
| 2019-01-11T11:51:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,231
|
java
|
// isComment
package de.tobiasbielefeld.solitaire.helper;
import de.tobiasbielefeld.solitaire.handler.HandlerTimer;
import de.tobiasbielefeld.solitaire.ui.GameManager;
import static de.tobiasbielefeld.solitaire.SharedData.*;
import static de.tobiasbielefeld.solitaire.helper.Preferences.DEFAULT_WINNING_TIME;
public class isClassOrIsInterface {
// isComment
public HandlerTimer isVariable;
// isComment
private long isVariable;
// isComment
private long isVariable;
// isComment
private boolean isVariable;
private long isVariable;
public isConstructor(GameManager isParameter) {
isNameExpr = new HandlerTimer(isNameExpr);
}
/**
* isComment
*/
public long isMethod() {
return isNameExpr != isIntegerConstant ? isNameExpr : isNameExpr;
}
// isComment
public void isMethod(long isParameter) {
isNameExpr = isNameExpr;
}
/**
* isComment
*/
public void isMethod() {
if (isNameExpr) {
return;
}
isNameExpr = true;
if (!isNameExpr.isMethod()) {
isNameExpr.isMethod(isNameExpr.isMethod());
isNameExpr.isMethod(isNameExpr);
} else {
isNameExpr.isMethod(isNameExpr);
}
}
/**
* isComment
*/
public void isMethod() {
isNameExpr = true;
isNameExpr = isNameExpr.isMethod() + isNameExpr.isMethod() - isNameExpr.isMethod();
isNameExpr = isNameExpr.isMethod();
isNameExpr.isMethod(isIntegerConstant);
}
/**
* isComment
*/
public void isMethod() {
isNameExpr = true;
isNameExpr.isMethod(isNameExpr.isMethod());
isNameExpr.isMethod(isNameExpr.isMethod());
isNameExpr.isMethod(isNameExpr);
isNameExpr = isIntegerConstant;
isNameExpr = isNameExpr.isMethod();
isNameExpr.isMethod(isIntegerConstant);
}
public boolean isMethod() {
return isNameExpr;
}
public long isMethod() {
return isNameExpr;
}
public void isMethod() {
isNameExpr = isNameExpr;
}
public void isMethod(long isParameter) {
isNameExpr = isNameExpr;
}
}
|
[
"matheus@melsolucoes.net"
] |
matheus@melsolucoes.net
|
296a706a02b21bf14255700f0ffc252738b08e23
|
bd5562090487237b27274d6ad4b0e64c90d70604
|
/abc.web.stage/src/main/java/com/autoserve/abc/web/module/screen/infomation/Regulations.java
|
2844cd111ec932716c26a33393a743772bb284d5
|
[] |
no_license
|
haxsscker/abc.parent
|
04b0d659958a4c1b91bb41a002e814ea31bd0e85
|
0522c15aed591e755662ff16152b702182692f54
|
refs/heads/master
| 2020-05-04T20:25:34.863818
| 2019-04-04T05:49:01
| 2019-04-04T05:49:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,228
|
java
|
package com.autoserve.abc.web.module.screen.infomation;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import com.alibaba.citrus.service.requestcontext.parser.ParameterParser;
import com.alibaba.citrus.turbine.Context;
import com.autoserve.abc.dao.common.PageCondition;
import com.autoserve.abc.dao.common.PageCondition.Order;
import com.autoserve.abc.service.biz.entity.ArticleInfo;
import com.autoserve.abc.service.biz.intf.article.ArticleInfoService;
import com.autoserve.abc.service.biz.result.PageResult;
import com.autoserve.abc.web.util.Pagebean;
public class Regulations {
@Autowired
private HttpSession session;
@Resource
private ArticleInfoService articleInfoService;
public void execute(Context context, ParameterParser params) {
int currentPage = params.getInt("currentPage");
int pageSize = 10;
if(currentPage==0)currentPage=1;
PageCondition pageCondition = new PageCondition(currentPage,pageSize,"aiAddDate",Order.DESC);
ArticleInfo articleInfo = new ArticleInfo();
articleInfo.setAiClassId(99);//政策法规
PageResult<ArticleInfo> result = articleInfoService.queryArticleInfoListByParam(articleInfo, pageCondition);
List<ArticleInfo> articleList = result.getData();
List<ArticleInfo> articles = new ArrayList<ArticleInfo>();
for (ArticleInfo articleInfo2 : articleList)
{
if(articleInfo2.getAiIsTop().getType()==1)
{
articles.add(articleInfo2);//先添加置顶的文章
}
}
for (ArticleInfo articleInfo2 : articleList)
{
if(articleInfo2.getAiIsTop().getType()==0)
{
articles.add(articleInfo2);//再添加非置顶的文章
}
}
for(int i=0;i<articles.size();i++){
articles.get(i).setAiArticlecontent(articles.get(i).getAiArticlecontent().replaceAll("\\&[a-zA-Z]{0,9};", "").replaceAll("<[^>]*>", "\n\t"));
}
Pagebean<ArticleInfo> pagebean = new Pagebean<ArticleInfo>(currentPage, pageSize, articles, result.getTotalCount());
context.put("pagebean", pagebean);
}
}
|
[
"845534336@qq.com"
] |
845534336@qq.com
|
14aea817720c206189d071c0692cad34cc06191a
|
f69b55503f3f5d7278b4504744876a484db2e8c0
|
/shop-activity/src/main/java/quick/pager/shop/controller/InviteController.java
|
766cf6971c1a01a60ee1f8aa03af02fa1f880d96
|
[
"MIT"
] |
permissive
|
552301/spring-cloud-shop
|
f83beb608b55f1b6b606e4692c1ce1742b91b64f
|
6d61946376c00e671efcfce26209b7179fcbc82d
|
refs/heads/master
| 2020-11-24T13:21:37.553117
| 2019-11-24T08:16:09
| 2019-11-24T08:16:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 327
|
java
|
package quick.pager.shop.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import quick.pager.shop.constants.Constants;
/**
* 好友邀请
*/
@RestController
@RequestMapping(Constants.Module.ACTIVITY)
public class InviteController {
}
|
[
"siguiyang1992@outlook.com"
] |
siguiyang1992@outlook.com
|
6792f975774dfe8c854b008bf3d3d75e68e1443c
|
6f36eb7fe5dfd876a65e787a0c88d0db147cd610
|
/Pandora/app/src/main/java/com/donut/app/mvp/auction/MyAuctionAdapter.java
|
a0323421e4bf2bffb5621e1d7ad1928f4327afab
|
[] |
no_license
|
Emmptee/dounat
|
34eda9879f21598dd594f22cf54b63402662ee13
|
9d601fdee54dc0e5ffacff8635685df3c542f154
|
refs/heads/master
| 2020-03-18T21:24:10.004883
| 2018-06-25T17:40:36
| 2018-06-25T17:40:36
| 135,278,734
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,507
|
java
|
package com.donut.app.mvp.auction;
import android.app.Dialog;
import android.content.Context;
import android.content.DialogInterface;
import android.databinding.BindingAdapter;
import android.databinding.DataBindingUtil;
import android.support.v7.app.AlertDialog;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.donut.app.R;
import com.donut.app.SysApplication;
import com.donut.app.databinding.ActivityAuctionItemBinding;
import com.donut.app.entity.UserInfo;
import com.donut.app.http.message.auction.MyAuctionDetail;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.List;
import java.util.Locale;
/**
*/
public class MyAuctionAdapter extends RecyclerView.Adapter {
private final List<MyAuctionDetail> mDetails;
private MyAuctionContract.View mListener;
private Context mContext;
private View footerView;
private static final int BOTTOM_TYPE = 1, ITEM_TYPE = 2;
MyAuctionAdapter(Context context, List<MyAuctionDetail> items,
MyAuctionContract.View listener, View footerView) {
mContext = context;
mDetails = items;
mListener = listener;
this.footerView = footerView;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
if (viewType == BOTTOM_TYPE) {
LinearLayout.LayoutParams lp = new LinearLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT,
ViewGroup.LayoutParams.WRAP_CONTENT);
footerView.setLayoutParams(lp);
return new FooterViewHolder(footerView);
}
ActivityAuctionItemBinding binding = DataBindingUtil.inflate(
LayoutInflater.from(parent.getContext()),
R.layout.activity_auction_item, parent, false);
BindingHolder holder = new BindingHolder(binding.getRoot());
holder.setBinding(binding);
return holder;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
if (holder instanceof BindingHolder) {
BindingHolder item = (BindingHolder) holder;
final MyAuctionDetail detail = mDetails.get(position);
item.binding.setDetail(detail);
item.binding.setHandler(this);
String strState;
switch (detail.getAuctionLogsStatus()) {
case 1:
case -1:
strState = "竞拍成功";
break;
case -2:
strState = "竞拍失败";
break;
case 0:
strState = "竞拍中";
break;
default:
strState = "";
break;
}
item.binding.auctionItemTvState.setText(strState);
String srtFreight;
UserInfo info = SysApplication.getUserInfo();
if (info.getMemberStatus() == 1) {
srtFreight = String.format(mContext.getString(R.string.auction_freight),
detail.getMemberFreight());
} else {
srtFreight = String.format(mContext.getString(R.string.auction_freight),
detail.getFreight());
}
item.binding.auctionItemTvFreight.setText(srtFreight);
item.binding.getRoot().setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
mListener.OnItemClick(detail);
}
});
}
}
@Override
public int getItemCount() {
return mDetails.size() + 1;
}
@Override
public int getItemViewType(int position) {
if (position == mDetails.size()) {
return BOTTOM_TYPE;
} else {
return ITEM_TYPE;
}
}
public void onToPayClick(MyAuctionDetail detail) {
mListener.OnItemPayClick(detail);
}
public void onToCancelClick(final MyAuctionDetail detail) {
Dialog dialog = new AlertDialog.Builder(mContext)
.setMessage("您确认放弃竞拍吗?")
.setNegativeButton(mContext.getString(R.string.cancel), null)
.setPositiveButton(mContext.getString(R.string.sure),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mListener.OnItemCancelClick(detail);
dialog.dismiss();
}
}).create();
dialog.show();
}
public void onToDeleteClick(final MyAuctionDetail detail) {
Dialog dialog = new AlertDialog.Builder(mContext)
.setMessage("您确认删除吗?")
.setNegativeButton(mContext.getString(R.string.cancel), null)
.setPositiveButton(mContext.getString(R.string.sure),
new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
mListener.OnItemDeleteClick(detail);
dialog.dismiss();
}
}).create();
dialog.show();
}
private static class BindingHolder extends RecyclerView.ViewHolder {
private ActivityAuctionItemBinding binding;
private BindingHolder(View view) {
super(view);
}
public ActivityAuctionItemBinding getBinding() {
return binding;
}
public void setBinding(ActivityAuctionItemBinding binding) {
this.binding = binding;
}
}
public static class FooterViewHolder extends RecyclerView.ViewHolder {
public FooterViewHolder(View itemView) {
super(itemView);
}
}
}
|
[
"dds.c@163.com"
] |
dds.c@163.com
|
71848af275948c510b87ef1dddffb42f01b50fc0
|
d4dc82fe83c52f5a5fce4f2beb782d44abf377e9
|
/admin-system/src/main/java/com/perye/modules/monitor/config/WebSocketConfig.java
|
058f4589069cd32168a0f56e023810904272a98f
|
[] |
no_license
|
muxisc/admin
|
0edf52fb98a29b50afa3c43c3d490fec5f8a2899
|
4b39b81e76a5c9ca3e88dee86b1082b8e3433fa8
|
refs/heads/master
| 2020-12-02T14:20:06.919794
| 2019-05-28T07:59:26
| 2019-05-28T07:59:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,522
|
java
|
package com.perye.modules.monitor.config;
import com.perye.modules.monitor.entity.LogMessage;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.messaging.simp.SimpMessagingTemplate;
import org.springframework.web.socket.config.annotation.StompEndpointRegistry;
import org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer;
import javax.annotation.PostConstruct;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* 配置WebSocket消息代理端点,即stomp服务端
* https://cloud.tencent.com/developer/article/1096792
*
* @Author: Perye
* @Date: 2019-04-13
*/
@Slf4j
@Configuration
public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
@Autowired
private SimpMessagingTemplate messagingTemplate;
private ExecutorService executorService = Executors.newSingleThreadExecutor();
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/websocket")
.setAllowedOrigins("*")
.withSockJS();
}
/**
* 推送日志到/topic/pullLogger
*/
@PostConstruct
public void pushLogger(){
Runnable runnable=new Runnable() {
@Override
public void run() {
while (true) {
try {
LogMessage log = LoggerQueue.getInstance().poll();
if(log!=null){
// 格式化异常堆栈信息
if("ERROR".equals(log.getLevel()) && "com.perye.common.exception.handler.GlobalExceptionHandler".equals(log.getClassName())){
log.setBody("<pre>"+log.getBody()+"</pre>");
}
if(log.getClassName().equals("jdbc.resultsettable")){
log.setBody("<br><pre>"+log.getBody()+"</pre>");
}
if(messagingTemplate!=null){
messagingTemplate.convertAndSend("/topic/logMsg",log);
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}
};
executorService.submit(runnable);
}
}
|
[
"11143526@qq.com"
] |
11143526@qq.com
|
5effe1c73b58f98cbc1341a961da1ee8d8a1336a
|
690cc376e33bed7655e412ceae68f1a0b927e382
|
/Java Advanced/String Processing/Exer/src/MatchFullName.java
|
3c695238b5892b53acf2b885f1b6e854a80bf2d6
|
[] |
no_license
|
VladimirBarzakov/Java-Fundamentals
|
6cabd0a26cf827917f9825056d1ab1ae48570927
|
5fb8dfd59aedb34ab4a90aaed5e07217759363e6
|
refs/heads/master
| 2020-03-27T03:09:46.156217
| 2018-08-23T11:09:15
| 2018-08-23T11:09:15
| 145,842,521
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 722
|
java
|
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class MatchFullName {
public static void main(String[] args) throws IOException {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
Pattern pattern = Pattern.compile("^[A-Z][a-z]+ [A-Z][a-z]+$");
String line;
while (true){
line=reader.readLine();
if (line.equals("end")){
break;
}
Matcher matcher = pattern.matcher(line);
if (matcher.find()){
System.out.println(line);
}
}
}
}
|
[
"vlbarzakov@gmail.com"
] |
vlbarzakov@gmail.com
|
02e6d13705735e33a20f44c13161163e538d236f
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/89/org/apache/commons/math/transform/FastFourierTransformer_isPowerOf2_484.java
|
89001cc9ae89de147e58050bd310a563b3634ce7
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 1,509
|
java
|
org apach common math transform
implement href http mathworld wolfram fast fourier transform fastfouriertransform html
fast fourier transform transform dimension data set
refer appli numer linear algebra isbn
chapter
convent definit fft invers fft
coeffici expon equat list
comment method
requir length data set power greatli simplifi
speed code user pad data zero meet
requir flavor fft refer winograd
comput discret fourier transform mathemat comput
version revis date
fast fourier transform fastfouriertransform serializ
return argument power
param number test
argument power
power of2 ispowerof2
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
c9e2a4f25cc349236505c2354aa6340d4cc8d7f2
|
2402c850da81ed2d6dcf6f97d1aa69c4c3a6be31
|
/okay-springcloud-code/ch3-4/ch3-4-eureka-server/src/main/java/com/okay/filter/SecurityConfig.java
|
213fc50e964a63202733fc2686840e78af9dfdd7
|
[] |
no_license
|
Pamgo/spring-sourceStudy
|
4e48ddde8fdf0f27287028d502745fe310dc14f7
|
ef787796d4ccdcab2c7891c58411445c1ffaf815
|
refs/heads/master
| 2022-12-23T01:44:20.833824
| 2019-06-03T13:12:04
| 2019-06-03T13:12:04
| 145,417,608
| 0
| 0
| null | 2022-12-16T08:53:36
| 2018-08-20T12:55:32
|
Java
|
UTF-8
|
Java
| false
| false
| 543
|
java
|
package com.okay.filter;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
/**
* spring-boot-starter-security默认开启了csrf校验,可以禁止
* Created by OKali on 2019/2/27.
*/
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception {
super.configure(http);
http.csrf().disable();
}
}
|
[
"pamgogdpyc@163.com"
] |
pamgogdpyc@163.com
|
09177e6f1c65fcf18a38657a0b9d415a5185c6a4
|
2ee773cbdc216c9165029632eb36fedd8de36ca5
|
/app/src/main/java/org/firstinspires/ftc/robotserver/internal/webserver/tempfile/UploadedTempFileManager.java
|
72029d4afc6ac6df8bd90abb8c5c1493f28d8dce
|
[] |
no_license
|
Killian-Townsend/Custom-FTC-Driver-Station-2021
|
6bee582afdb032ad2921b394280a2321f0f815ec
|
16e8999d7593ef2c4189902bf2d376db8a3a6b41
|
refs/heads/master
| 2023-03-28T04:48:30.704409
| 2021-03-19T01:09:18
| 2021-03-19T01:09:18
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,629
|
java
|
package org.firstinspires.ftc.robotserver.internal.webserver.tempfile;
import android.os.Environment;
import com.qualcomm.robotcore.util.RobotLog;
import fi.iki.elonen.NanoHTTPD;
import java.io.File;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
public class UploadedTempFileManager implements NanoHTTPD.TempFileManager {
private static final String TAG = "UploadedTempFileManager";
private static final File tempDir = new File(Environment.getExternalStorageDirectory(), "tmp");
private final List<NanoHTTPD.TempFile> tempFileList = new CopyOnWriteArrayList<NanoHTTPD.TempFile>();
UploadedTempFileManager() {
if (!tempDir.exists() && !tempDir.mkdirs())
RobotLog.ee("UploadedTempFileManager", "Failed to create temp directory");
}
public void clear() {
for (NanoHTTPD.TempFile tempFile : this.tempFileList) {
try {
tempFile.delete();
} catch (Exception exception) {
RobotLog.ee("UploadedTempFileManager", exception, "Failed to delete temp file");
}
}
this.tempFileList.clear();
}
public NanoHTTPD.TempFile createTempFile(String paramString) throws Exception {
UploadedTempFile uploadedTempFile = new UploadedTempFile(tempDir);
this.tempFileList.add(uploadedTempFile);
return uploadedTempFile;
}
}
/* Location: C:\Users\Student\Desktop\APK Decompiling\com.qualcomm.ftcdriverstation_38_apps.evozi.com\classes-dex2jar.jar!\org\firstinspires\ftc\robotserver\internal\webserver\tempfile\UploadedTempFileManager.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"admin@thatsfuckingstupid.org"
] |
admin@thatsfuckingstupid.org
|
19c00ab9d022abf0a6370f7119b539b649a6654f
|
366d3ddfe6c44d23face8f914d3188e824364b3d
|
/client/implementation/src/main/java/io/smallrye/graphql/client/impl/core/AbstractFragment.java
|
6af335650218760b1ae2b0cd36b17feb8dd78521
|
[
"Apache-2.0"
] |
permissive
|
smallrye/smallrye-graphql
|
7fc9a6439f1c26d5d87c81ca7fa7770ed29b50b7
|
74107939776694ddc866b843d45f7a061f3cb3d8
|
refs/heads/main
| 2023-08-17T17:07:02.097383
| 2023-08-11T11:54:37
| 2023-08-11T12:55:29
| 179,494,421
| 136
| 101
|
Apache-2.0
| 2023-09-13T13:00:25
| 2019-04-04T12:37:13
|
Java
|
UTF-8
|
Java
| false
| false
| 1,422
|
java
|
package io.smallrye.graphql.client.impl.core;
import static io.smallrye.graphql.client.core.utils.validation.NameValidation.validateFragmentName;
import static io.smallrye.graphql.client.core.utils.validation.NameValidation.validateName;
import java.util.List;
import io.smallrye.graphql.client.core.Directive;
import io.smallrye.graphql.client.core.FieldOrFragment;
import io.smallrye.graphql.client.core.Fragment;
public abstract class AbstractFragment implements Fragment {
private String name;
private String targetType;
private List<Directive> directives;
private List<FieldOrFragment> fields;
@Override
public String getName() {
return name;
}
@Override
public void setName(String name) {
this.name = validateFragmentName(name);
}
@Override
public List<FieldOrFragment> getFields() {
return fields;
}
@Override
public void setFields(List<FieldOrFragment> fields) {
this.fields = fields;
}
@Override
public String getTargetType() {
return targetType;
}
@Override
public void setTargetType(String targetType) {
this.targetType = validateName(targetType);
}
@Override
public List<Directive> getDirectives() {
return directives;
}
@Override
public void setDirectives(List<Directive> directives) {
this.directives = directives;
}
}
|
[
"jmartisk@redhat.com"
] |
jmartisk@redhat.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.