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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3fff7b5271b653d0e3a63d754fbfc2d4986705af | c0fe21b86f141256c85ab82c6ff3acc56b73d3db | /domainservice/src/main/java/com/jdcloud/sdk/service/domainservice/client/ModifyMonitorExecutor.java | b77cbde46605b6b47d1aeaf65ca707b452d64b48 | [
"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 | 1,399 | 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网站监控接口
*
* OpenAPI spec version: v2
* Contact:
*
* NOTE: This class is auto generated by the jdcloud code generator program.
*/
package com.jdcloud.sdk.service.domainservice.client;
import com.jdcloud.sdk.client.JdcloudExecutor;
import com.jdcloud.sdk.service.JdcloudResponse;
import com.jdcloud.sdk.service.domainservice.model.ModifyMonitorResponse;
/**
* 域名的监控项修改
*/
class ModifyMonitorExecutor extends JdcloudExecutor {
@Override
public String method() {
return "PUT";
}
@Override
public String url() {
return "/regions/{regionId}/domain/{domainId}/monitor";
}
@Override
public Class<? extends JdcloudResponse> returnType() {
return ModifyMonitorResponse.class;
}
}
| [
"tancong@jd.com"
] | tancong@jd.com |
0deb85cb49ea3f0d08bb01bead4bfe55e9867d3c | 10186b7d128e5e61f6baf491e0947db76b0dadbc | /org/apache/http/impl/nio/bootstrap/HttpServer.java | 1ca0a0ab1930d48acd61ac9f39e460d266be8b3e | [
"SMLNJ",
"Apache-1.1",
"Apache-2.0",
"BSD-2-Clause"
] | permissive | MewX/contendo-viewer-v1.6.3 | 7aa1021e8290378315a480ede6640fd1ef5fdfd7 | 69fba3cea4f9a43e48f43148774cfa61b388e7de | refs/heads/main | 2022-07-30T04:51:40.637912 | 2021-03-28T05:06:26 | 2021-03-28T05:06:26 | 351,630,911 | 2 | 0 | Apache-2.0 | 2021-10-12T22:24:53 | 2021-03-26T01:53:24 | Java | UTF-8 | Java | false | false | 5,922 | java | /* */ package org.apache.http.impl.nio.bootstrap;
/* */
/* */ import java.io.IOException;
/* */ import java.net.InetAddress;
/* */ import java.net.InetSocketAddress;
/* */ import java.util.concurrent.ExecutorService;
/* */ import java.util.concurrent.Executors;
/* */ import java.util.concurrent.TimeUnit;
/* */ import java.util.concurrent.atomic.AtomicReference;
/* */ import org.apache.http.ExceptionLogger;
/* */ import org.apache.http.impl.nio.DefaultHttpServerIODispatch;
/* */ import org.apache.http.impl.nio.DefaultNHttpServerConnection;
/* */ import org.apache.http.impl.nio.reactor.DefaultListeningIOReactor;
/* */ import org.apache.http.impl.nio.reactor.IOReactorConfig;
/* */ import org.apache.http.nio.NHttpConnectionFactory;
/* */ import org.apache.http.nio.NHttpServerEventHandler;
/* */ import org.apache.http.nio.reactor.IOEventDispatch;
/* */ import org.apache.http.nio.reactor.IOReactorException;
/* */ import org.apache.http.nio.reactor.IOReactorExceptionHandler;
/* */ import org.apache.http.nio.reactor.ListenerEndpoint;
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ public class HttpServer
/* */ {
/* */ private final int port;
/* */ private final InetAddress ifAddress;
/* */ private final IOReactorConfig ioReactorConfig;
/* */ private final NHttpServerEventHandler serverEventHandler;
/* */ private final NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory;
/* */ private final ExceptionLogger exceptionLogger;
/* */ private final ExecutorService listenerExecutorService;
/* */ private final ThreadGroup dispatchThreads;
/* */ private final AtomicReference<Status> status;
/* */ private final DefaultListeningIOReactor ioReactor;
/* */ private volatile ListenerEndpoint endpoint;
/* */
/* */ enum Status
/* */ {
/* 54 */ READY, ACTIVE, STOPPING;
/* */ }
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */
/* */ HttpServer(int port, InetAddress ifAddress, IOReactorConfig ioReactorConfig, NHttpServerEventHandler serverEventHandler, NHttpConnectionFactory<? extends DefaultNHttpServerConnection> connectionFactory, final ExceptionLogger exceptionLogger) {
/* 76 */ this.port = port;
/* 77 */ this.ifAddress = ifAddress;
/* 78 */ this.ioReactorConfig = ioReactorConfig;
/* 79 */ this.serverEventHandler = serverEventHandler;
/* 80 */ this.connectionFactory = connectionFactory;
/* 81 */ this.exceptionLogger = exceptionLogger;
/* 82 */ this.listenerExecutorService = Executors.newSingleThreadExecutor(new ThreadFactoryImpl("HTTP-listener-" + this.port));
/* */
/* 84 */ this.dispatchThreads = new ThreadGroup("I/O-dispatchers");
/* */ try {
/* 86 */ this.ioReactor = new DefaultListeningIOReactor(this.ioReactorConfig, new ThreadFactoryImpl("I/O-dispatch", this.dispatchThreads));
/* */
/* */ }
/* 89 */ catch (IOReactorException ex) {
/* 90 */ throw new IllegalStateException(ex);
/* */ }
/* 92 */ this.ioReactor.setExceptionHandler(new IOReactorExceptionHandler()
/* */ {
/* */ public boolean handle(IOException ex) {
/* 95 */ exceptionLogger.log(ex);
/* 96 */ return false;
/* */ }
/* */
/* */
/* */ public boolean handle(RuntimeException ex) {
/* 101 */ exceptionLogger.log(ex);
/* 102 */ return false;
/* */ }
/* */ });
/* 105 */ this.status = new AtomicReference<Status>(Status.READY);
/* */ }
/* */
/* */ public ListenerEndpoint getEndpoint() {
/* 109 */ return this.endpoint;
/* */ }
/* */
/* */ public void start() throws IOException {
/* 113 */ if (this.status.compareAndSet(Status.READY, Status.ACTIVE)) {
/* 114 */ this.endpoint = this.ioReactor.listen(new InetSocketAddress(this.ifAddress, (this.port > 0) ? this.port : 0));
/* 115 */ final DefaultHttpServerIODispatch ioEventDispatch = new DefaultHttpServerIODispatch(this.serverEventHandler, this.connectionFactory);
/* */
/* 117 */ this.listenerExecutorService.execute(new Runnable()
/* */ {
/* */ public void run()
/* */ {
/* */ try {
/* 122 */ HttpServer.this.ioReactor.execute(ioEventDispatch);
/* 123 */ } catch (Exception ex) {
/* 124 */ HttpServer.this.exceptionLogger.log(ex);
/* */ }
/* */ }
/* */ });
/* */ }
/* */ }
/* */
/* */
/* */ public void awaitTermination(long timeout, TimeUnit timeUnit) throws InterruptedException {
/* 133 */ this.listenerExecutorService.awaitTermination(timeout, timeUnit);
/* */ }
/* */
/* */ public void shutdown(long gracePeriod, TimeUnit timeUnit) {
/* 137 */ if (this.status.compareAndSet(Status.ACTIVE, Status.STOPPING)) {
/* */ try {
/* 139 */ this.ioReactor.shutdown(timeUnit.toMillis(gracePeriod));
/* 140 */ } catch (IOException ex) {
/* 141 */ this.exceptionLogger.log(ex);
/* */ }
/* 143 */ this.listenerExecutorService.shutdown();
/* */ }
/* */ }
/* */ }
/* Location: /mnt/r/ConTenDoViewer.jar!/org/apache/http/impl/nio/bootstrap/HttpServer.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"xiayuanzhong+gpg2020@gmail.com"
] | xiayuanzhong+gpg2020@gmail.com |
01b7aff9f5247277d4e0d9d68a13d8f1d397e573 | d11fb0d15b73a28742caa97e349dcfbe70d2563f | /server/iih_pub/iih.ci_pub/src/main/java/iih/ci/rcm/contagion/dto/d/ContagiondtoAggDTO.java | ed710e4e6c293bbe1e3a7214a09eeee831f0c860 | [] | no_license | fhis/order.client | 50a363fd3e4f56d95ccc5aa288e907a0a8571031 | 56cfa7877f600a10c54fdb30306a32ffa28b8217 | refs/heads/master | 2021-08-22T20:50:59.511923 | 2017-12-01T07:10:27 | 2017-12-01T07:10:27 | 112,678,072 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package iih.ci.rcm.contagion.dto.d;
import xap.sys.appfw.orm.model.agg.BaseAggDO;
import xap.mw.core.data.BaseDO;
import xap.mw.coreitf.i.IAggDesc;
/**
* 组件
*/
public class ContagiondtoAggDTO extends BaseAggDO {
private static final long serialVersionUID = 1L;
@Override
public EntDto getParentDO() {
return ((EntDto) super.getParentDO());
}
public void setParentDO(EntDto headDO) {
setParent(headDO);
}
public Contagiondto[] getContagiondto() {
return ((Contagiondto[]) getChildren(Contagiondto.class));
}
public void setContagiondto(Contagiondto[] dos) {
setChildren(Contagiondto.class, dos);
}
public BaseDO createParentDO() {
return new EntDto();
}
public BaseDO createChildDO(String clzName) {
if (clzName.equals("iih.ci.rcm.contagion.dto.d.Contagiondto")) {
return new Contagiondto();
}
return null;
}
/**
* AggDTO 中元数据描述不存在,此方法不应使用
*/
@Override
public IAggDesc getAggDesc() {
return null;
}
} | [
"27696830@qq.com"
] | 27696830@qq.com |
bd77b7df7b0894b99ec1c72c38d4f3952caee108 | f16e9171d4dd2dc899205e76c838dbfc7dd974a5 | /src/main/java/com/mvc/chapter10/service/JaxWsService.java | a8b24ebc84082d4f0819363001243460a83b7b66 | [] | no_license | yhb2010/spring_demo | d031db6b16789f24c738545ca082ad4b697ec645 | 4e1ec51c7ece01a0b0a02da6adb222e9bc627b4d | refs/heads/master | 2020-04-11T01:18:33.758878 | 2018-12-12T00:36:01 | 2018-12-12T00:41:35 | 161,411,311 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 346 | java | package com.mvc.chapter10.service;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import com.mvc.chapter10.domain.User;
@WebService
@SOAPBinding(style = SOAPBinding.Style.RPC)
public interface JaxWsService {
@WebMethod
String sayHello(String name);
@WebMethod
User sayHello2(String name);
}
| [
"youtong82@163.com"
] | youtong82@163.com |
81c85f49999e57d47f856c6ed517bf1d521fe803 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/20/20_c0cc728a2b7263e8cbcd40781a5d535245c20c90/FAQWebservice/20_c0cc728a2b7263e8cbcd40781a5d535245c20c90_FAQWebservice_s.java | 0aff05ed9192694ab7f8f89ced89486122506e4d | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 1,757 | java | /**
*
*/
package org.exoplatform.faq.service.ws;
import java.io.InputStream;
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.CacheControl;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.Response.Status;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.ks.rss.FeedContentProvider;
import org.exoplatform.ks.rss.FeedResolver;
import org.exoplatform.services.rest.resource.ResourceContainer;
/**
* @author Uoc Nguyen
*
*/
@Path("ks/faq")
public class FAQWebservice implements ResourceContainer {
protected final static String JSON_CONTENT_TYPE = MediaType.APPLICATION_JSON;
final public static String APP_TYPE = "faq".intern();
public FAQWebservice() {}
@GET
@Path("rss/{resourceid}")
@Produces(MediaType.TEXT_XML)
public Response viewrss(@PathParam("resourceid") String resourceid) throws Exception {
CacheControl cacheControl = new CacheControl();
cacheControl.setNoCache(true);
cacheControl.setNoStore(true);
try {
ExoContainer container = ExoContainerContext.getCurrentContainer();
FeedResolver feedResolver = (FeedResolver) container.getComponentInstanceOfType(FeedResolver.class);
FeedContentProvider provider = feedResolver.resolve(APP_TYPE);
InputStream is = provider.getFeedContent(resourceid);
return Response.ok(is, MediaType.TEXT_XML).cacheControl(cacheControl).build();
} catch (Exception e) {
e.printStackTrace();
return Response.status(Status.INTERNAL_SERVER_ERROR).build() ;
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
e14ddf0c210c46033117d77ffacbeff77fa0ebff | 26183990a4c6b9f6104e6404ee212239da2d9f62 | /components/search_builder/src/java/tests/com/topcoder/search/builder/accuracytests/filter/NullFilterAccuracyTest.java | fad90c18f551816f5bd1207f12a587c1c13122c5 | [] | no_license | topcoder-platform/tc-java-components | 34c5798ece342a9f1804daeb5acc3ea4b0e0765b | 51b204566eb0df3902624c15f4fb69b5f99dc61b | refs/heads/dev | 2023-08-08T22:09:32.765506 | 2022-02-25T06:23:56 | 2022-02-25T06:23:56 | 138,811,944 | 0 | 8 | null | 2022-02-23T21:06:12 | 2018-06-27T01:10:36 | Rich Text Format | UTF-8 | Java | false | false | 5,167 | java | /*
* Copyright (C) 2006 TopCoder Inc., All Rights Reserved.
*/
package com.topcoder.search.builder.accuracytests.filter;
import com.topcoder.search.builder.filter.NullFilter;
import com.topcoder.search.builder.ValidationResult;
import com.topcoder.util.datavalidator.ObjectValidator;
import junit.framework.Test;
import junit.framework.TestCase;
import junit.framework.TestSuite;
import junit.framework.Assert;
import java.util.Map;
import java.util.HashMap;
/**
* <p>An accuracy test for {@link NullFilter} class. Tests the methods for proper
* handling of valid input data and producing accurate results. Passes the valid arguments to the methods and verifies
* that either the state of the tested instance have been changed appropriately or a correct result is produced by the
* method.</p>
*
* @author isv
* @version 1.0
* @since 1.3
*/
public class NullFilterAccuracyTest extends TestCase {
/**
* <p>The instance of {@link NullFilter} which is tested. This instance is initialized in {@link #setUp()}
* method and released in {@link #tearDown()} method.</p>
*/
private NullFilter testedInstance = null;
/**
* <p>Gets the test suite for {@link NullFilter} class.</p>
*
* @return a <code>TestSuite</code> providing the tests for {@link NullFilter} class.
*/
public static Test suite() {
return new TestSuite(NullFilterAccuracyTest.class);
}
/**
* <p>Sets up the fixture. This method is called before a test is executed.</p>
*
* @throws Exception if any error occurs.
*/
protected void setUp() throws Exception {
super.setUp();
this.testedInstance = new NullFilter("NullFilterName");
}
/**
* <p>Tears down the fixture. This method is called after a test is executed.</p>
*
* @throws Exception if any error occurs.
*/
protected void tearDown() throws Exception {
this.testedInstance = null;
super.tearDown();
}
/**
* <p>Accuracy test. Tests the {@link NullFilter#getValue()} method for proper behavior.</p>
*
* <p>Verifies that the method returns NULL.</p>
*/
public void testGetValue() {
Assert.assertNull("Does not return NULL value", this.testedInstance.getValue());
}
/**
* <p>Accuracy test. Tests the {@link NullFilter#getName()} method for proper behavior.</p>
*
* <p>Verifies that the method returns name passed at construction time.</p>
*/
public void testGetName() {
Assert.assertEquals("Does not return NULL value", "NullFilterName", this.testedInstance.getName());
}
/**
* <p>Accuracy test. Tests the {@link NullFilter#clone()} method for proper behavior.</p>
*
* <p>Verifies that the method creates a clone copy correctly.</p>
*/
public void testClone() {
NullFilter clone = (NullFilter) this.testedInstance.clone();
Assert.assertNotSame("The clone copy is not created correctly", this.testedInstance, clone);
Assert.assertEquals("The clone copy is not created correctly", this.testedInstance.getName(), clone.getName());
Assert.assertEquals("The clone copy is not created correctly", this.testedInstance.getValue(), clone.getValue());
Assert.assertEquals("The clone copy is not created correctly",
this.testedInstance.getFilterType(), clone.getFilterType());
}
/**
* <p>Accuracy test. Tests the {@link NullFilter#isValid(Map, Map)} method for proper behavior.</p>
*
* <p>Verifies that the method returns a valid result if the filter is valid..</p>
*/
public void testIsValid_Valid() {
Map aliases = new HashMap();
Map validators = new HashMap();
validators.put(this.testedInstance.getName(), new ObjectValidator() {
public boolean valid(Object obj) { return true; }
public String getMessage(Object obj) { return null; }
});
ValidationResult result = this.testedInstance.isValid(validators, aliases);
Assert.assertTrue("The filter is not valid", result.isValid());
}
/**
* <p>Accuracy test. Tests the {@link NullFilter#isValid(Map, Map)} method for proper behavior.</p>
*
* <p>Verifies that the method returns an invalid result if the filter is invalid..</p>
*/
public void testIsValid_Invalid() {
Map aliases = new HashMap();
Map validators = new HashMap();
validators.put(this.testedInstance.getName(), new ObjectValidator() {
public boolean valid(Object obj) { return false; }
public String getMessage(Object obj) { return "Wrong Object"; }
});
ValidationResult result = this.testedInstance.isValid(validators, aliases);
Assert.assertFalse("The filter is valid", result.isValid());
Assert.assertEquals("The filter is valid",
this.testedInstance.getName(), ((NullFilter) result.getFailedFilter()).getName());
}
}
| [
"pvmagacho@gmail.com"
] | pvmagacho@gmail.com |
f85ce86ceda185742b87ce2a49805af642ab9b90 | bc1f98c7fdb039b206f491675528ff9d10918932 | /swap-fragments/src/test/java/de/alpharogroup/Start.java | 680f59ad932083c2708ad0afc426a3d940c5bdaa | [
"MIT"
] | permissive | astrapi69/wicket-examples | 3105b1b02c4ab5a94731af1ea38748465ca00765 | 0c4ec71bc460f72b3e30739f7262a2ff03a37e77 | refs/heads/master | 2020-12-30T09:49:57.993156 | 2017-07-07T11:10:30 | 2017-07-07T11:10:30 | 20,326,210 | 4 | 4 | null | 2017-07-07T11:10:30 | 2014-05-30T10:42:38 | Java | UTF-8 | Java | false | false | 2,686 | java | package de.alpharogroup;
import java.io.File;
import org.apache.wicket.protocol.http.ContextParamWebApplicationFactory;
import org.apache.wicket.protocol.http.WicketFilter;
import org.apache.wicket.util.time.Duration;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.servlet.DefaultServlet;
import org.eclipse.jetty.servlet.ServletContextHandler;
import de.alpharogroup.file.search.PathFinder;
import de.alpharogroup.jetty9.runner.Jetty9Runner;
import de.alpharogroup.jetty9.runner.config.FilterHolderConfiguration;
import de.alpharogroup.jetty9.runner.config.Jetty9RunConfiguration;
import de.alpharogroup.jetty9.runner.config.ServletContextHandlerConfiguration;
import de.alpharogroup.jetty9.runner.config.ServletHolderConfiguration;
import de.alpharogroup.jetty9.runner.factories.ServletContextHandlerFactory;
public class Start
{
public static void main(String[] args) throws Exception
{
int sessionTimeout = (int)Duration.minutes(30).seconds();// set timeout to 30min(60sec *
// 30min=1800sec)...
System.setProperty("wicket.configuration", "development");
String projectname = "swap.fragments";
File projectDirectory = PathFinder.getProjectDirectory();
File webapp = PathFinder.getRelativePath(projectDirectory, projectname, "src", "main",
"webapp");
String filterPath = "/*";
ServletContextHandler servletContextHandler = ServletContextHandlerFactory
.getNewServletContextHandler(ServletContextHandlerConfiguration.builder()
.filterHolderConfiguration(FilterHolderConfiguration.builder()
.filterClass(WicketFilter.class).filterPath(filterPath)
.initParameter(WicketFilter.FILTER_MAPPING_PARAM, "/*")
.initParameter(ContextParamWebApplicationFactory.APP_CLASS_PARAM,
WicketApplication.class.getName())
.build())
.servletHolderConfiguration(ServletHolderConfiguration.builder()
.servletClass(DefaultServlet.class).pathSpec(filterPath).build())
.contextPath("/").webapp(webapp).maxInactiveInterval(sessionTimeout)
.filterPath(filterPath).build());
final Jetty9RunConfiguration config = newJetty9RunConfiguration(servletContextHandler);
Server server = new Server();
Jetty9Runner.runServletContextHandler(server, config);
}
private static Jetty9RunConfiguration newJetty9RunConfiguration(
final ServletContextHandler servletContextHandler)
{
final Jetty9RunConfiguration config = Jetty9RunConfiguration.builder()
.servletContextHandler(servletContextHandler)
.httpPort(WicketApplication.DEFAULT_HTTP_PORT)
.httpsPort(WicketApplication.DEFAULT_HTTPS_PORT).keyStorePassword("wicket")
.keyStorePathResource("/keystore").build();
return config;
}
}
| [
"asterios.raptis@gmx.net"
] | asterios.raptis@gmx.net |
edfa168b458104bebaa2e46e21b3f4a7103c2009 | 597b0daa76ba28adf45359b5aa09cef5886f0e29 | /spring-webmvc/src/main/java/org/springframework/web/servlet/mvc/AbstractController.java | 2a31df924615680a8137933fee9d5a4c6ddcf587 | [
"Apache-2.0"
] | permissive | wjmwss-zz/spring | 78e579e3ec4abc983aa80a4547fadc2b654ea959 | e94eb5efb79fc4bc5336d0b571609c141d35d5cb | refs/heads/master | 2023-02-21T09:26:25.768420 | 2021-01-23T19:04:30 | 2021-01-23T19:04:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,944 | java | /*
* Copyright 2002-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
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.mvc;
import org.springframework.http.HttpMethod;
import org.springframework.lang.Nullable;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.support.WebContentGenerator;
import org.springframework.web.util.WebUtils;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
/**
* Convenient superclass for controller implementations, using the Template Method
* design pattern.
*
* <p><b>Workflow
* (<a href="Controller.html#workflow">and that defined by interface</a>):</b><br>
* <ol>
* <li>{@link #handleRequest(HttpServletRequest, HttpServletResponse) handleRequest()}
* will be called by the DispatcherServlet</li>
* <li>Inspection of supported methods (ServletException if request method
* is not support)</li>
* <li>If session is required, try to get it (ServletException if not found)</li>
* <li>Set caching headers if needed according to the cacheSeconds property</li>
* <li>Call abstract method
* {@link #handleRequestInternal(HttpServletRequest, HttpServletResponse) handleRequestInternal()}
* (optionally synchronizing around the call on the HttpSession),
* which should be implemented by extending classes to provide actual
* functionality to return {@link org.springframework.web.servlet.ModelAndView ModelAndView} objects.</li>
* </ol>
*
* <p><b><a name="config">Exposed configuration properties</a>
* (<a href="Controller.html#config">and those defined by interface</a>):</b><br>
* <table border="1">
* <tr>
* <td><b>name</b></td>
* <td><b>default</b></td>
* <td><b>description</b></td>
* </tr>
* <tr>
* <td>supportedMethods</td>
* <td>GET,POST</td>
* <td>comma-separated (CSV) list of methods supported by this controller,
* such as GET, POST and PUT</td>
* </tr>
* <tr>
* <td>requireSession</td>
* <td>false</td>
* <td>whether a session should be required for requests to be able to
* be handled by this controller. This ensures that derived controller
* can - without fear of null pointers - call request.getSession() to
* retrieve a session. If no session can be found while processing
* the request, a ServletException will be thrown</td>
* </tr>
* <tr>
* <td>cacheSeconds</td>
* <td>-1</td>
* <td>indicates the amount of seconds to include in the cache header
* for the response following on this request. 0 (zero) will include
* headers for no caching at all, -1 (the default) will not generate
* <i>any headers</i> and any positive number will generate headers
* that state the amount indicated as seconds to cache the content</td>
* </tr>
* <tr>
* <td>synchronizeOnSession</td>
* <td>false</td>
* <td>whether the call to {@code handleRequestInternal} should be
* synchronized around the HttpSession, to serialize invocations
* from the same client. No effect if there is no HttpSession.
* </td>
* </tr>
* </table>
*
* @author Rod Johnson
* @author Juergen Hoeller
* @author Rossen Stoyanchev
* @see WebContentInterceptor
*/
public abstract class AbstractController extends WebContentGenerator implements Controller {
private boolean synchronizeOnSession = false;
/**
* Create a new AbstractController which supports
* HTTP methods GET, HEAD and POST by default.
*/
public AbstractController() {
this(true);
}
/**
* Create a new AbstractController.
* @param restrictDefaultSupportedMethods {@code true} if this
* controller should support HTTP methods GET, HEAD and POST by default,
* or {@code false} if it should be unrestricted
* @since 4.3
*/
public AbstractController(boolean restrictDefaultSupportedMethods) {
super(restrictDefaultSupportedMethods);
}
/**
* Set if controller execution should be synchronized on the session,
* to serialize parallel invocations from the same client.
* <p>More specifically, the execution of the {@code handleRequestInternal}
* method will get synchronized if this flag is "true". The best available
* session mutex will be used for the synchronization; ideally, this will
* be a mutex exposed by HttpSessionMutexListener.
* <p>The session mutex is guaranteed to be the same object during
* the entire lifetime of the session, available under the key defined
* by the {@code SESSION_MUTEX_ATTRIBUTE} constant. It serves as a
* safe reference to synchronize on for locking on the current session.
* <p>In many cases, the HttpSession reference itself is a safe mutex
* as well, since it will always be the same object reference for the
* same active logical session. However, this is not guaranteed across
* different servlet containers; the only 100% safe way is a session mutex.
* @see AbstractController#handleRequestInternal
* @see org.springframework.web.util.HttpSessionMutexListener
* @see org.springframework.web.util.WebUtils#getSessionMutex(javax.servlet.http.HttpSession)
*/
public final void setSynchronizeOnSession(boolean synchronizeOnSession) {
this.synchronizeOnSession = synchronizeOnSession;
}
/**
* Return whether controller execution should be synchronized on the session.
*/
public final boolean isSynchronizeOnSession() {
return this.synchronizeOnSession;
}
@Override
@Nullable
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
throws Exception {
if (HttpMethod.OPTIONS.matches(request.getMethod())) {
response.setHeader("Allow", getAllowHeader());
return null;
}
// Delegate to WebContentGenerator for checking and preparing.
checkRequest(request);
prepareResponse(response);
// Execute handleRequestInternal in synchronized block if required.
if (this.synchronizeOnSession) {
HttpSession session = request.getSession(false);
if (session != null) {
Object mutex = WebUtils.getSessionMutex(session);
synchronized (mutex) {
return handleRequestInternal(request, response);
}
}
}
return handleRequestInternal(request, response);
}
/**
* Template method. Subclasses must implement this.
* The contract is the same as for {@code handleRequest}.
* @see #handleRequest
*/
@Nullable
protected abstract ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response)
throws Exception;
}
| [
"wjmcoo@outlook.com"
] | wjmcoo@outlook.com |
78279f7cb9d7adfe4f8d0719bb9b7a056a9df468 | e51de484e96efdf743a742de1e91bce67f555f99 | /Android/triviacrack_src/src/com/mopub/nativeads/factories/CustomEventNativeFactory.java | d6d08db6c325f762d616f4c6c9a04bff777ea7ca | [] | no_license | adumbgreen/TriviaCrap | b21e220e875f417c9939f192f763b1dcbb716c69 | beed6340ec5a1611caeff86918f107ed6807d751 | refs/heads/master | 2021-03-27T19:24:22.401241 | 2015-07-12T01:28:39 | 2015-07-12T01:28:39 | 28,071,899 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,231 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.mopub.nativeads.factories;
import com.mopub.nativeads.CustomEventNative;
import com.mopub.nativeads.MoPubCustomEventNative;
import java.lang.reflect.Constructor;
public class CustomEventNativeFactory
{
protected static CustomEventNativeFactory a = new CustomEventNativeFactory();
public CustomEventNativeFactory()
{
}
public static CustomEventNative create(String s)
{
if (s != null)
{
Class class1 = Class.forName(s).asSubclass(com/mopub/nativeads/CustomEventNative);
return a.a(class1);
} else
{
return new MoPubCustomEventNative();
}
}
public static void setInstance(CustomEventNativeFactory customeventnativefactory)
{
a = customeventnativefactory;
}
protected CustomEventNative a(Class class1)
{
Constructor constructor = class1.getDeclaredConstructor((Class[])null);
constructor.setAccessible(true);
return (CustomEventNative)constructor.newInstance(new Object[0]);
}
}
| [
"klayderpus@chimble.net"
] | klayderpus@chimble.net |
4f42c41395a5a2305e2f5b8339e8d26650537164 | 6ffc8b7027b5a18d3d367fc6a518c883a3da3d85 | /src/weka/classifiers/meta/MultiSchemeTest.java | 449cdb4b0ea4608cff3d89008b95701ff9e9af89 | [] | no_license | icesky0125/DecisionTreeSmoothing | 8aa20b96725a669d71ca9483a87dd58ba92e4e77 | fdc2c71e31b0dccdf083bfbb5c07040aeb5b2a7b | refs/heads/master | 2021-07-16T20:24:12.448519 | 2020-05-19T05:41:13 | 2020-05-19T05:41:13 | 158,150,516 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,530 | java | /*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
/*
* Copyright 2002 University of Waikato
*/
package weka.classifiers.meta;
import weka.classifiers.AbstractClassifierTest;
import weka.classifiers.Classifier;
import junit.framework.Test;
import junit.framework.TestSuite;
/**
* Tests MultiScheme. Run from the command line with:<p>
* java weka.classifiers.meta.MultiSchemeTest
*
* @author <a href="mailto:eibe@cs.waikato.ac.nz">Eibe Frank</a>
* @version $Revision: 8034 $
*/
public class MultiSchemeTest extends AbstractClassifierTest {
public MultiSchemeTest(String name) { super(name); }
/** Creates a default MultiScheme */
@Override
public Classifier getClassifier() {
return new MultiScheme();
}
public static Test suite() {
return new TestSuite(MultiSchemeTest.class);
}
public static void main(String[] args){
junit.textui.TestRunner.run(suite());
}
}
| [
"he.penny.zhang@gmail.com"
] | he.penny.zhang@gmail.com |
47cf30e757a1891c8b9998340ac970796725baf1 | 41bac86d728e5f900e3d60b5a384e7f00c966f5b | /communote/api/src/main/java/com/communote/server/api/core/image/ImageVO.java | 3583af884a023703f3f375af46583005024a6512 | [
"Apache-2.0"
] | permissive | Communote/communote-server | f6698853aa382a53d43513ecc9f7f2c39f527724 | e6a3541054baa7ad26a4eccbbdd7fb8937dead0c | refs/heads/master | 2021-01-20T19:13:11.466831 | 2019-02-02T18:29:16 | 2019-02-02T18:29:16 | 61,822,650 | 27 | 4 | Apache-2.0 | 2018-12-08T19:19:06 | 2016-06-23T17:06:40 | Java | UTF-8 | Java | false | false | 1,906 | java | package com.communote.server.api.core.image;
import java.util.Date;
/**
* @author Communote GmbH - <a href="http://www.communote.com/">http://www.communote.com/</a>
*/
public class ImageVO implements java.io.Serializable {
/**
* The serial version UID of this class. Needed for serialization.
*/
private static final long serialVersionUID = 3469071092893248193L;
private Date lastModificationDate;
private byte[] image;
public ImageVO() {
this.lastModificationDate = null;
this.image = null;
}
public ImageVO(Date lastModificationDate, byte[] image) {
this.lastModificationDate = lastModificationDate;
this.image = image;
}
/**
* Copies constructor from other ImageVO
*
* @param otherBean
* , cannot be <code>null</code>
* @throws NullPointerException
* if the argument is <code>null</code>
*/
public ImageVO(ImageVO otherBean) {
this(otherBean.getLastModificationDate(), otherBean.getImage());
}
/**
* Copies all properties from the argument value object into this value object.
*/
public void copy(ImageVO otherBean) {
if (otherBean != null) {
this.setLastModificationDate(otherBean.getLastModificationDate());
this.setImage(otherBean.getImage());
}
}
/**
* @return the content of the image as byte array
*/
public byte[] getImage() {
return this.image;
}
/**
* @return the date and time of the last modification of this image
*/
public Date getLastModificationDate() {
return this.lastModificationDate;
}
public void setImage(byte[] image) {
this.image = image;
}
public void setLastModificationDate(Date lastModificationDate) {
this.lastModificationDate = lastModificationDate;
}
} | [
"ronny.winkler@communote.com"
] | ronny.winkler@communote.com |
2f3da39641ee57e08f2f7f768ed57306da4d1ff7 | 4c908f4410c2cba63a8ce58d760474e3afe10a84 | /book/code/New Folder/RegExpr4.java | 64a8c837ac6e7c9b0ef0d7a1842c1b456ec037e7 | [] | no_license | dhirajprakash/Java | 932dfe11f6b9e283c13aa853de9d0576ddb9b894 | daae451b0d83433415ca4ba6335da8515488a899 | refs/heads/master | 2021-05-11T14:49:26.083725 | 2019-11-23T18:42:54 | 2019-11-23T18:42:54 | 117,710,001 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 298 | java | //listing 9
// Use a quantifier.
import java.util.regex.*;
class RegExpr4 {
public static void main(String args[]) {
Pattern pat = Pattern.compile("W+");
Matcher mat = pat.matcher("W WW WWW");
while(mat.find())
System.out.println("Match: " + mat.group());
}
}
| [
"plamen_stilyianov@yahoo.com"
] | plamen_stilyianov@yahoo.com |
e1b7c83885dc7a3a9aa8ed018705fd527e61b136 | e1e5bd6b116e71a60040ec1e1642289217d527b0 | /H5/L2jMaster_org/L2jMaster_org_2019_07_02/L2JMaster_DataPack/dist/game/data/scripts/ai/individual/DrakosWarrior.java | 2eb4dfc0f9b25f1e209b364bb1a5416d3aa462ce | [] | no_license | serk123/L2jOpenSource | 6d6e1988a421763a9467bba0e4ac1fe3796b34b3 | 603e784e5f58f7fd07b01f6282218e8492f7090b | refs/heads/master | 2023-03-18T01:51:23.867273 | 2020-04-23T10:44:41 | 2020-04-23T10:44:41 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,004 | java | /*
* Copyright (C) 2004-2019 L2J DataPack
*
* This file is part of L2J DataPack.
*
* L2J DataPack is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J DataPack is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package ai.individual;
import com.l2jserver.gameserver.model.actor.L2Npc;
import com.l2jserver.gameserver.model.actor.instance.L2PcInstance;
import com.l2jserver.gameserver.model.holders.SkillHolder;
import ai.npc.AbstractNpcAI;
/**
* Drakos Warrior AI.
* @author Adry_85
* @since 2.6.0.0
*/
public class DrakosWarrior extends AbstractNpcAI
{
// NPCs
private static final int DRAKOS_WARRIOR = 22822;
private static final int DRAKOS_ASSASSIN = 22823;
// Skill
private static final SkillHolder SUMMON = new SkillHolder(6858);
public DrakosWarrior()
{
super(DrakosWarrior.class.getSimpleName(), "ai/individual");
addAttackId(DRAKOS_WARRIOR);
}
@Override
public String onAttack(L2Npc npc, L2PcInstance attacker, int damage, boolean isSummon)
{
if (getRandom(100) < 1)
{
addSkillCastDesire(npc, npc, SUMMON, 99999999900000000L);
final int count = 2 + getRandom(3);
for (int i = 0; i < count; i++)
{
addSpawn(DRAKOS_ASSASSIN, npc.getX() + getRandom(200), npc.getY() + getRandom(200), npc.getZ(), 0, false, 0, false);
}
}
return super.onAttack(npc, attacker, damage, isSummon);
}
public static void main(String[] args)
{
new DrakosWarrior();
}
}
| [
"64197706+L2jOpenSource@users.noreply.github.com"
] | 64197706+L2jOpenSource@users.noreply.github.com |
8d617dded852994f5a83ad6c81c08566794bc5b8 | be25b2c018dbacd8147a8fbfbc66f257b050ea1f | /languages/languageDesign/generator/languages/templateLanguage/source_gen/jetbrains/mps/lang/generator/behavior/IfMacro_Condition_BehaviorDescriptor.java | 268e4542b5cf570f2ef845e16bf24ad33e10c887 | [
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] | permissive | blutkind/MPS | f5bef8c27c3cb65940ba74a5d1942fdab35ee096 | cac72cce91d98dec40bbadf7a049ed9dbbc18231 | refs/heads/master | 2020-04-08T01:22:10.782234 | 2011-12-09T20:58:07 | 2011-12-09T20:58:07 | 2,950,220 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | package jetbrains.mps.lang.generator.behavior;
/*Generated by MPS */
public class IfMacro_Condition_BehaviorDescriptor extends TemplateQueryBase_BehaviorDescriptor {
public IfMacro_Condition_BehaviorDescriptor() {
}
@Override
public String getConceptFqName() {
return "jetbrains.mps.lang.generator.structure.IfMacro_Condition";
}
}
| [
"Timur.Abishev@jetbrains.com"
] | Timur.Abishev@jetbrains.com |
b50e5dd71478ba244462fa61c5d9994a532569e2 | 68b81db811954a5890ab180e428eb466bcbf6531 | /Libraries/Minecraft/BuildTools/1.11.2/work/decompile-22de4839/net/minecraft/server/EntityMinecartMobSpawner.java | 339221f7e62ec99c32c685d1e6cac7be10271353 | [] | no_license | br45entei/RepoFiles | 0aba657229fbe4878e8ccfc8977c44de66722c9b | 5748079540b8127cf05048786a7db0d38b5ba46f | refs/heads/master | 2020-04-06T04:43:26.372998 | 2017-03-12T10:33:12 | 2017-03-12T10:33:12 | 82,893,180 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,109 | java | package net.minecraft.server;
public class EntityMinecartMobSpawner extends EntityMinecartAbstract {
private final MobSpawnerAbstract a = new MobSpawnerAbstract() {
public void a(int i) {
EntityMinecartMobSpawner.this.world.broadcastEntityEffect(EntityMinecartMobSpawner.this, (byte) i);
}
public World a() {
return EntityMinecartMobSpawner.this.world;
}
public BlockPosition b() {
return new BlockPosition(EntityMinecartMobSpawner.this);
}
};
public EntityMinecartMobSpawner(World world) {
super(world);
}
public EntityMinecartMobSpawner(World world, double d0, double d1, double d2) {
super(world, d0, d1, d2);
}
public static void a(DataConverterManager dataconvertermanager) {
a(dataconvertermanager, EntityMinecartMobSpawner.class);
dataconvertermanager.a(DataConverterTypes.ENTITY, new DataInspector() {
public NBTTagCompound a(DataConverter dataconverter, NBTTagCompound nbttagcompound, int i) {
String s = nbttagcompound.getString("id");
if (EntityTypes.getName(EntityMinecartMobSpawner.class).equals(new MinecraftKey(s))) {
nbttagcompound.setString("id", TileEntity.a(TileEntityMobSpawner.class).toString());
dataconverter.a(DataConverterTypes.BLOCK_ENTITY, nbttagcompound, i);
nbttagcompound.setString("id", s);
}
return nbttagcompound;
}
});
}
public EntityMinecartAbstract.EnumMinecartType v() {
return EntityMinecartAbstract.EnumMinecartType.SPAWNER;
}
public IBlockData x() {
return Blocks.MOB_SPAWNER.getBlockData();
}
protected void a(NBTTagCompound nbttagcompound) {
super.a(nbttagcompound);
this.a.a(nbttagcompound);
}
protected void b(NBTTagCompound nbttagcompound) {
super.b(nbttagcompound);
this.a.b(nbttagcompound);
}
public void A_() {
super.A_();
this.a.c();
}
}
| [
"br45entei@gmail.com"
] | br45entei@gmail.com |
d0852d3034eb4c54b3b379936503005225a1f9e5 | 7707b1d1d63198e86a0b8a7ae27c00e2f27a8831 | /screens/com.netxforge.netxstudio.common/src/com/netxforge/netxstudio/common/CommonService.java | 5d4b73050dbec3148ab51cba59e097e313065ecd | [] | no_license | dzonekl/netxstudio | 20535f66e5bbecd1cdd9c55a4d691fc48a1a83aa | f12c118b1ef08fe770e5ac29828653a93fea9352 | refs/heads/master | 2016-08-04T17:28:38.486076 | 2015-10-02T16:20:00 | 2015-10-02T16:20:00 | 6,561,565 | 2 | 0 | null | 2014-10-27T06:49:59 | 2012-11-06T12:18:44 | Java | UTF-8 | Java | false | false | 1,449 | java | /*******************************************************************************
* Copyright (c) May 22, 2011 NetXForge.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
*
* Contributors:
* Christophe Bouhier - initial API and implementation and/or initial documentation
*******************************************************************************/
package com.netxforge.netxstudio.common;
import com.google.inject.Inject;
import com.netxforge.base.security.IJCAService;
/**
* @author Christophe Bouhier christophe.bouhier@netxforge.com
*
*/
public class CommonService {
public String SERVICE_ID = "Common services";
private IJCAService jcaService;
public IJCAService getJcasService() {
return jcaService;
}
@Inject
public CommonService(IJCAService jcaService){
this.jcaService = jcaService;
}
}
| [
"dzonekl@gmail.com"
] | dzonekl@gmail.com |
7bba5cb3ff2e19031dc1257417f4aca411a69770 | 7462f9b3d667fad66e6c60432af0d94c28c199bc | /src/main/java/com/helger/peppol/comment/domain/ICommentIterationCallback.java | dd7c17cd76b955dae221e9de3e06eed1bc2e7a9a | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | phax/peppol-practical | e969d37ad781a597df040e238b10610abb6756aa | 6f6cd02dc24ecc6c35c845d0f86039188a4a4748 | refs/heads/master | 2023-08-27T20:38:53.770815 | 2023-08-25T16:17:55 | 2023-08-25T16:17:55 | 24,772,884 | 9 | 3 | Apache-2.0 | 2021-12-19T15:47:45 | 2014-10-03T20:35:57 | Java | UTF-8 | Java | false | false | 1,804 | java | /*
* Copyright (C) 2014-2023 Philip Helger (www.helger.com)
* philip[at]helger[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.helger.peppol.comment.domain;
import javax.annotation.Nonnegative;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
/**
* Callback interface for iterating all comments within a comment thread
*
* @author Philip Helger
*/
public interface ICommentIterationCallback
{
/**
* Called for each comment within a comment thread
*
* @param nLevel
* Current nesting level
* @param aParentComment
* The parent comment - is <code>null</code> for the top-level entry
* @param aComment
* The current comment
*/
default void onCommentStart (@Nonnegative final int nLevel, @Nullable final IComment aParentComment, @Nonnull final IComment aComment)
{}
/**
* Called for each comment within a comment thread
*
* @param nLevel
* Current nesting level
* @param aParentComment
* The parent comment - is <code>null</code> for the top-level entry
* @param aComment
* The current comment
*/
default void onCommentEnd (@Nonnegative final int nLevel, @Nullable final IComment aParentComment, @Nonnull final IComment aComment)
{}
}
| [
"philip@helger.com"
] | philip@helger.com |
0093bededd725a84bc66b6dfa73c23dd5a36bb98 | 022980735384919a0e9084f57ea2f495b10c0d12 | /src/ext-cttdt/ext-impl/src/com/nss/portlet/thu_tuc_hanh_chinh/service/http/FileDinhKemTTHCServiceHttp.java | d289b72736f05f18efc9fab85aab4c1520c8728f | [] | no_license | thaond/nsscttdt | 474d8e359f899d4ea6f48dd46ccd19bbcf34b73a | ae7dacc924efe578ce655ddfc455d10c953abbac | refs/heads/master | 2021-01-10T03:00:24.086974 | 2011-02-19T09:18:34 | 2011-02-19T09:18:34 | 50,081,202 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,388 | java | package com.nss.portlet.thu_tuc_hanh_chinh.service.http;
/**
* <a href="FileDinhKemTTHCServiceHttp.java.html"><b><i>View Source</i></b></a>
*
* <p>
* ServiceBuilder generated this class. Modifications in this class will be
* overwritten the next time is generated.
* </p>
*
* <p>
* This class provides a HTTP utility for the
* <code>com.nss.portlet.thu_tuc_hanh_chinh.service.FileDinhKemTTHCServiceUtil</code> service
* utility. The static methods of this class calls the same methods of the
* service utility. However, the signatures are different because it requires an
* additional <code>com.liferay.portal.security.auth.HttpPrincipal</code>
* parameter.
* </p>
*
* <p>
* The benefits of using the HTTP utility is that it is fast and allows for
* tunneling without the cost of serializing to text. The drawback is that it
* only works with Java.
* </p>
*
* <p>
* Set the property <code>tunnel.servlet.hosts.allowed</code> in
* portal.properties to configure security.
* </p>
*
* <p>
* The HTTP utility is only generated for remote services.
* </p>
*
* @author Brian Wing Shun Chan
*
* @see com.liferay.portal.security.auth.HttpPrincipal
* @see com.nss.portlet.thu_tuc_hanh_chinh.service.FileDinhKemTTHCServiceUtil
* @see com.nss.portlet.thu_tuc_hanh_chinh.service.http.FileDinhKemTTHCServiceSoap
*
*/
public class FileDinhKemTTHCServiceHttp {
}
| [
"nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e"
] | nguyentanmo@843501e3-6f96-e689-5e61-164601347e4e |
c20bba9ff76067b7287079bc17d95f20643e8fc6 | f7e7ae1bad707652916c950c1bdb2dd494157e02 | /Javabase_Plus/Six/BufferedStream/Demo03BufferedWriter.java | 72c6968376e3aaeb65ac5a9c83fe532a7dd16caa | [] | no_license | jacklizekun/Java_Base | 811d0eb4304618325d383f970dbd235589e2b597 | c35d64f98684ecc61c63142189bd276afde6820c | refs/heads/master | 2022-04-10T22:44:07.375468 | 2020-03-26T06:47:01 | 2020-03-26T06:47:01 | 250,180,331 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,635 | java | package BufferedStream;
import java.io.BufferedWriter;
import java.io.FileWriter;
import java.io.IOException;
/*
java.io.BufferedWriter extends Writer
BufferedWriter:字符缓冲输出流
继承自父类的共性成员方法:
- void write(int c) 写入单个字符。
- void write(char[] cbuf)写入字符数组。
- abstract void write(char[] cbuf, int off, int len)写入字符数组的某一部分,off数组的开始索引,len写的字符个数。
- void write(String str)写入字符串。
- void write(String str, int off, int len) 写入字符串的某一部分,off字符串的开始索引,len写的字符个数。
- void flush()刷新该流的缓冲。
- void close() 关闭此流,但要先刷新它。
构造方法:
BufferedWriter(Writer out) 创建一个使用默认大小输出缓冲区的缓冲字符输出流。
BufferedWriter(Writer out, int sz) 创建一个使用给定大小输出缓冲区的新缓冲字符输出流。
参数:
Writer out:字符输出流
我们可以传递FileWriter,缓冲流会给FileWriter增加一个缓冲区,提高FileWriter的写入效率
int sz:指定缓冲区的大小,不写默认大小
特有的成员方法:
void newLine() 写入一个行分隔符。会根据不同的操作系统,获取不同的行分隔符
换行:换行符号
windows:\r\n
linux:/n
mac:/r
使用步骤:
1.创建字符缓冲输出流对象,构造方法中传递字符输出流
2.调用字符缓冲输出流中的方法write,把数据写入到内存缓冲区中
3.调用字符缓冲输出流中的方法flush,把内存缓冲区中的数据,刷新到文件中
4.释放资源
*/
/**
* BufferedWriter
* @author 李泽坤
*
*/
public class Demo03BufferedWriter {
public static void main(String[] args) throws IOException {
//System.out.println();
//1.创建字符缓冲输出流对象,构造方法中传递字符输出流
BufferedWriter bw = new BufferedWriter(new FileWriter("IO\\c.txt"));
//2.调用字符缓冲输出流中的方法write,把数据写入到内存缓冲区中
for (int i = 0; i <10 ; i++) {
bw.write("kunkun坤");
//bw.write("\r\n");
bw.newLine();
}
//3.调用字符缓冲输出流中的方法flush,把内存缓冲区中的数据,刷新到文件中
bw.flush();
//4.释放资源
bw.close();
}
}
| [
"beike88888888@163.com"
] | beike88888888@163.com |
19398280ef99d8f218e0e87afd305abb110bfbed | 3a05a8a4ef7dd62620de65ac102d5d450dd1fc81 | /yoma-order/src/main/java/com/github/yoma/order/controller/BetonClientController.java | f790d01dc0b05c1703e97f286df4ab257042b7fe | [
"Apache-2.0"
] | permissive | tom-erealm/yoma | 6b8dcfe8cd2d8d0c3224260a01ce22d63d5e154e | 50b46bccf3e0b2885d451badbeeacf56d4b82777 | refs/heads/master | 2023-04-04T18:22:30.796790 | 2021-03-19T09:02:35 | 2021-03-19T09:02:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,171 | java | package com.github.yoma.order.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import com.github.pagehelper.PageInfo;
import com.github.yoma.common.persistence.BaseController;
import com.github.yoma.common.persistence.BatchDTO;
import com.github.yoma.common.result.CommonResponse;
import com.github.yoma.common.result.DetailResponse;
import com.github.yoma.common.result.PageResponse;
import com.github.yoma.common.result.ResponseUtil;
import com.github.yoma.order.domain.BetonClient;
import com.github.yoma.order.dto.BetonClientQueryDTO;
import com.github.yoma.order.service.BetonClientService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/**
* 商砼客户RestFull服务
*
* @author 马世豪
* @version 2020-11-20
*/
@RestController
@RequestMapping(value = "/order/betonClient")
@Api(tags = "商砼客户")
public class BetonClientController extends BaseController {
@Autowired
private BetonClientService betonClientService;
/**
* 列表查询
*/
@ApiOperation(value = " 列表查询")
@GetMapping("list")
public PageResponse<BetonClient> list(BetonClientQueryDTO queryDTO) {
PageInfo<BetonClient> pageInfo = betonClientService.findPage(queryDTO);
PageResponse<BetonClient> pageResponse = ResponseUtil.pageSuccess(pageInfo);
return pageResponse;
}
/**
* 保存或修改
*/
@ApiOperation(value = " 保存或修改")
@PostMapping("/save")
public DetailResponse<BetonClient> save(@RequestBody BetonClient betonClient) {
betonClientService.save(betonClient);
DetailResponse<BetonClient> success = ResponseUtil.detailSuccess(betonClient);
return success;
}
/**
* 详情
*/
@ApiOperation("详情")
@GetMapping("/detail/{betonClientId}")
public DetailResponse<BetonClient> detail(@PathVariable Long betonClientId) {
BetonClient betonClient = new BetonClient();
betonClient.setId(betonClientId);
betonClient = betonClientService.get(betonClient);
DetailResponse<BetonClient> success = ResponseUtil.detailSuccess(betonClient);
return success;
}
/**
* 删除操作
*/
@ApiOperation("删除")
@PostMapping("/delete/{betonClientId}")
public CommonResponse delete(@PathVariable Long betonClientId) {
BetonClient betonClient = new BetonClient();
betonClient.setId(betonClientId);
int count = betonClientService.delete(betonClient);
CommonResponse success = ResponseUtil.success();
return success;
}
/**
* 删除操作-批量
*/
@ApiOperation("批量删除")
@PostMapping("/batch/delete")
public CommonResponse batchDelete(@RequestBody BatchDTO batchDTO) {
// 获取当前操作人信息
BetonClientQueryDTO queryDTO = new BetonClientQueryDTO();
queryDTO.setBatchIdList(batchDTO.getBatchIdList());
int count = betonClientService.batchDelete(queryDTO);
CommonResponse success = ResponseUtil.success();
return success;
}
}
| [
"yingwaizhiying@gmail.com"
] | yingwaizhiying@gmail.com |
35928d5cfa56dbc2655e07da8fcf9eb464e3bc44 | 70f7a06017ece67137586e1567726579206d71c7 | /alimama/src/main/java/com/ali/user/mobile/register/ProtocolModel.java | e0731938b6e0366c7a2f94bb55c848a2415a9e10 | [] | no_license | liepeiming/xposed_chatbot | 5a3842bd07250bafaffa9f468562021cfc38ca25 | 0be08fc3e1a95028f8c074f02ca9714dc3c4dc31 | refs/heads/master | 2022-12-20T16:48:21.747036 | 2020-10-14T02:37:49 | 2020-10-14T02:37:49 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 206 | java | package com.ali.user.mobile.register;
import java.util.Map;
public class ProtocolModel {
public int protocolItemColor;
public Map<String, String> protocolItems;
public String protocolTitle;
}
| [
"zhangquan@snqu.com"
] | zhangquan@snqu.com |
717561e04f30b43bff2d33023945eb994eb69323 | db2c49a189e13554e73713ed2a69ca887a2ad9f0 | /org.orbit.infra.model/src/org/orbit/infra/model/extensionregistry/ExtensionItemSetPropertiesRequest.java | ee93ff6b22f3dca5c7261550d342f6a0be23f7aa | [] | no_license | EngineerBarsik/dev | fa501b6ff58e0b6b263d54d6e85c6d69a323f612 | 81715414de121e1d7cead7d4066d626b095816d6 | refs/heads/master | 2023-02-11T01:20:29.217287 | 2021-01-08T01:14:21 | 2021-01-08T01:14:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,177 | java | package org.orbit.infra.model.extensionregistry;
import java.util.LinkedHashMap;
import java.util.Map;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class ExtensionItemSetPropertiesRequest {
@XmlElement
protected String platformId;
@XmlElement
protected String typeId;
@XmlElement
protected String extensionId;
@XmlElement
protected Map<String, Object> properties = new LinkedHashMap<String, Object>();
public ExtensionItemSetPropertiesRequest() {
}
@XmlElement
public String getPlatformId() {
return this.platformId;
}
public void setPlatformId(String platformId) {
this.platformId = platformId;
}
@XmlElement
public String getTypeId() {
return typeId;
}
public void setTypeId(String typeId) {
this.typeId = typeId;
}
@XmlElement
public String getExtensionId() {
return extensionId;
}
public void setExtensionId(String extensionId) {
this.extensionId = extensionId;
}
@XmlElement
public Map<String, Object> getProperties() {
return this.properties;
}
public void setProperties(Map<String, Object> properties) {
this.properties = properties;
}
}
| [
"yangyang4cs@gmail.com"
] | yangyang4cs@gmail.com |
270ea61a0a61f3a40229ed780dcd3091c72410a5 | 139960e2d7d55e71c15e6a63acb6609e142a2ace | /mobile_app1/module502/src/main/java/module502packageJava0/Foo598.java | de51e111e5db44579874792a6026005fd50d0bc9 | [
"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 | 820 | java | package module502packageJava0;
import java.lang.Integer;
public class Foo598 {
Integer int0;
Integer int1;
Integer int2;
public void foo0() {
new module502packageJava0.Foo597().foo15();
}
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();
}
public void foo9() {
foo8();
}
public void foo10() {
foo9();
}
public void foo11() {
foo10();
}
public void foo12() {
foo11();
}
public void foo13() {
foo12();
}
public void foo14() {
foo13();
}
public void foo15() {
foo14();
}
}
| [
"oliviern@uber.com"
] | oliviern@uber.com |
39de69c738e0d9a5be0e13d7639adedea61414d4 | 862db3c0e897d966f2b00fecc19c8939f5852c85 | /bootstraptoggleclone/src/test/java/com/wimdeblauwe/examples/bootstraptoggleclone/BootstraptogglecloneApplicationTests.java | 2f2586fe7a6b1fffee3d8ee39c195238b9c7212c | [] | no_license | wimdeblauwe/blog-example-code | 693a935370abffdd1d04eedf8f121305f7f89208 | 0c58b6409a5230e4f419c72de1baf87a3b9e50d8 | refs/heads/master | 2023-03-14T11:46:51.963310 | 2023-02-21T20:41:58 | 2023-02-21T20:41:58 | 217,848,577 | 59 | 41 | null | 2022-12-24T08:22:45 | 2019-10-27T12:01:07 | Java | UTF-8 | Java | false | false | 251 | java | package com.wimdeblauwe.examples.bootstraptoggleclone;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class BootstraptogglecloneApplicationTests {
@Test
void contextLoads() {
}
}
| [
"wim.deblauwe@gmail.com"
] | wim.deblauwe@gmail.com |
f654fb20cfc80ba8c7e75c50530873aa98f12c63 | 9b19c49e7071cdc823a65578a7c855fecf8f6b29 | /jOOQ/src/main/java/org/jooq/tools/debug/impl/AbstractDebuggerObject.java | 329414ee61e5eaed1da3ba4767cea15c4e3414cd | [
"Apache-2.0",
"BSD-3-Clause"
] | permissive | dankosedin/jOOQ | 34dfb992cf721df2ab55c339d347f1903df037a6 | 661eff4df519487a6430627900ec07dbea5625b0 | refs/heads/master | 2021-01-18T10:11:29.632095 | 2012-10-03T08:54:47 | 2012-10-03T08:54:47 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,769 | java | /**
* Copyright (c) 2009-2012, Lukas Eder, lukas.eder@gmail.com
* Christopher Deckers, chrriis@gmail.com
* All rights reserved.
*
* This software is licensed to you under the Apache License, Version 2.0
* (the "License"); You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* . Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* . Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* . Neither the name "jOOQ" nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*/
package org.jooq.tools.debug.impl;
import java.util.List;
import java.util.UUID;
import org.jooq.tools.debug.DebuggerObject;
/**
* A common base class for {@link DebuggerObject}
*
* @author Christopher Deckers
* @author Lukas Eder
*/
abstract class AbstractDebuggerObject implements DebuggerObject {
/**
* Generated UID
*/
private static final long serialVersionUID = 794370947159841039L;
private final UUID uuid;
private transient AbstractDebuggerObject delegate;
AbstractDebuggerObject() {
this.uuid = UUID.randomUUID();
}
@Override
public final UUID getId() {
return uuid;
}
/**
* Call through to delegates in order to synchronise {@link DebuggerObject}
* state between client and server
*/
void apply() {
if (delegate != null) {
delegate.apply();
}
}
@Override
public void remove() {
if (delegate != null) {
delegate.remove();
}
}
@Override
public boolean equals(Object o) {
if (o instanceof AbstractDebuggerObject) {
return uuid.equals(((AbstractDebuggerObject) o).uuid);
}
return false;
}
@Override
public int hashCode() {
return uuid.hashCode();
}
/**
* Set a delegate object that handles {@link #apply()} and {@link #remove()}
* calls.
*/
void setDelegate(AbstractDebuggerObject delegate) {
this.delegate = delegate;
}
/**
* Create a delegate object
*/
static <P extends AbstractDebuggerObject, C extends AbstractDebuggerObject> C delegate(P parent, C child,
List<C> siblings) {
synchronized (parent) {
child.setDelegate(new Delegate<P, C>(parent, child, siblings));
siblings.add(child);
}
return child;
}
/**
* A delegate object
*/
static class Delegate<P extends AbstractDebuggerObject, C extends AbstractDebuggerObject> extends
AbstractDebuggerObject {
/**
* Generated UID
*/
private static final long serialVersionUID = 8305051097073149775L;
private final P parent;
private final C child;
private final List<C> siblings;
Delegate(P parent, C child, List<C> siblings) {
this.parent = parent;
this.child = child;
this.siblings = siblings;
}
@Override
void apply() {
parent.apply();
}
@Override
public void remove() {
synchronized (parent) {
siblings.remove(child);
apply();
}
}
}
}
| [
"lukas.eder@gmail.com"
] | lukas.eder@gmail.com |
ce924e95841cc349c98f16a4fe93bbecae24e133 | 08941e7de7f92311692cc2919c504f2585ff28ee | /xmlbeanchange/src/main/java/util/ChangeXmlFormat.java | 42d38cdf596f8aad05ff4dd6ac389800d5073ec3 | [] | no_license | codergithut/springmvc | 32b7727b8028000141792f7e8938d69b325dca4c | 9a2f7ea6d779c897d7aa39383aa35f1abdff2524 | refs/heads/master | 2020-06-15T18:30:24.597289 | 2017-04-05T14:53:42 | 2017-04-05T14:53:42 | 75,271,851 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,472 | java | package util;
import entity.BA_QLR;
import org.dom4j.*;
import org.dom4j.io.SAXReader;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author <a href="mailto:Administrator@gtmap.cn">Administrator</a>
* @version 1.0, 2017/3/24
* @description
*/
public class ChangeXmlFormat {
static Map<String,String> reflectData = new HashMap<String,String>();
static{
reflectData.put("ZTT_GY_QLR","baQLR");
}
public static Map<String,String> getParamValueByElement(String fileContent,String parentElement) throws DocumentException {
SAXReader reader = new SAXReader();
Document doc;
Element sonElement;
Document sonDoc;
String className;
String elementName;
doc = DocumentHelper.parseText(fileContent);
Map<String,String> data = new HashMap<String,String>();
Element root = doc.getRootElement();
Element son = root.element(parentElement);
List<Element> elements = son.elements();
for(Element e : elements){
elementName = e.getName();
className = (reflectData.get(elementName) == null ? elementName : reflectData.get(elementName));
sonElement = DocumentHelper.createElement(className);
List<Attribute> attributes = e.attributes();
for(Attribute attr : attributes){
sonElement.setAttributeValue(attr.getName().toLowerCase(),attr.getText());
}
sonDoc = DocumentHelper.createDocument(sonElement);
String s = sonDoc.asXML();
data.put(e.getName(),s);
}
return data;
}
public static void main(String[] args) throws DocumentException {
String xmlStr = "<Message>\n" +
" <Head>\n" +
" <BizMsgID>500115151030000031</BizMsgID>\n" +
" <ASID>AS100</ASID>\n" +
" <AreaCode>500115</AreaCode>\n" +
" <RecType>1000301</RecType>\n" +
" <RightType>3</RightType>\n" +
" <RegType>100</RegType>\n" +
" <CreateDate>2015-10-29T14:33:13</CreateDate>\n" +
" <RecFlowID>201504031190080</RecFlowID>\n" +
" <RegOrgID>500115</RegOrgID>\n" +
" <ParcelID />\n" +
" <EstateNum>500115003029GB00255</EstateNum>\n" +
" <DigitalSign>6bfa32a846896c9cf6</DigitalSign>\n" +
" <PreEstateNum>500115003029GB00255</PreEstateNum>\n" +
" <CertCount />\n" +
" <ProofCount />\n" +
" <PreCertID />\n" +
" </Head>\n" +
" <Data>\n" +
" <ZTT_GY_QLR YSDM=\"6003000000\" BDCDYH=\"500115003029GB00255\" SXH=\"1\" QLRMC=\"重庆市金司\" BDCQZH=\"渝(2015)长寿区不动产权\" QZYSXLH=\"50000003014\" SFCZR=\"0\" ZJZL=\"7\" ZJH=\"500221000039792 1-1-1\" GJ=\"142\" XB=\"3\" QLRLX=\"2\" GYFS=\"0\" GYQK=\"以上房屋 个权利人共有,共(或按份)共有。按份共有的共有份额各自为:\" QXDM=\"500115\" />\n" +
" </Data>\n" +
"</Message>";
Map<String,String> datas = getParamValueByElement(xmlStr,"Data");
BA_QLR baQlr = JaxbUtil.converyToJavaBean(datas.get("ZTT_GY_QLR"), BA_QLR.class);
System.out.println(baQlr.getZJH());
}
}
| [
"1731857742@qq.com"
] | 1731857742@qq.com |
dc09d61fc8d37cfaace2cf58e74f3044fdbf23c4 | c37076ae3ed292263a23637157f122aeb78f0fb6 | /android/hzti-qry/gen/com/bluestome/hzti/qry/R.java | ef535fe25cfcb4969850552d50419e788f7fbe52 | [] | no_license | mo3athBaioud/bluestome | ad1b992775dcebcfc5ed81cfb49e7d29ef9e12fb | 7de9ab0ad517f0e1da2a147e9079103824a99af3 | refs/heads/master | 2021-01-10T06:06:43.903950 | 2012-11-28T09:36:48 | 2012-11-28T09:36:48 | 43,675,743 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,555 | java | /* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.bluestome.hzti.qry;
public final class R {
public static final class array {
/** 车辆类型
*/
public static final int select_car_type=0x7f040000;
}
public static final class attr {
}
public static final class color {
public static final int black=0x7f050001;
public static final int black_75_transparent=0x7f050017;
public static final int blue=0x7f050002;
/** 推荐好友消息分隔
*/
public static final int chat_frd_separate=0x7f050015;
/** 聊天界面时间字体颜色
*/
public static final int chat_time=0x7f050013;
/** 编辑联系人Hint color
*/
public static final int contact_edit_hint_color=0x7f050018;
/** 联系人列表
*/
public static final int contacts_list_separate_below=0x7f050016;
public static final int emphasize_color=0x7f050007;
public static final int forget_password=0x7f05001a;
public static final int forget_password_bg=0x7f05001b;
public static final int grey=0x7f050003;
public static final int halftransparent=0x7f050006;
public static final int linker_color=0x7f05000b;
public static final int master_color=0x7f050008;
/** 消息列表item背景色
*/
public static final int message_list_item_focus=0x7f050011;
/** 消息列表中最后一条消息颜色
*/
public static final int message_list_item_lastmsg=0x7f05000f;
/** 消息列表中昵称文字颜色
*/
public static final int message_list_item_nickname=0x7f05000e;
public static final int message_list_item_normal=0x7f050012;
/** 消息列表中更新时间颜色
*/
public static final int message_list_item_updatetime=0x7f050010;
/** 消息列表分割线
*/
public static final int message_list_separate=0x7f05000d;
/** 短语列表
*/
public static final int phrase_list_item_bg=0x7f050019;
public static final int red=0x7f050004;
/** 搜索键盘分割线下/左
*/
public static final int search_input_dl=0x7f05001d;
/** 搜索键盘分割线上/右
*/
public static final int search_input_ur=0x7f05001c;
public static final int slave_color=0x7f050009;
/** 聊天界面表情输入背景颜色
*/
public static final int smiley_input_bg=0x7f050014;
public static final int stronger_color=0x7f05000c;
public static final int transparent=0x7f050005;
public static final int weaker_color=0x7f05000a;
public static final int white=0x7f050000;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int btn_cancel=0x7f070011;
public static final int btn_ok=0x7f070010;
public static final int checkCodeView=0x7f07000d;
public static final int e_car_id=0x7f07000a;
public static final int e_car_license_num=0x7f070008;
public static final int e_check_code=0x7f07000e;
public static final int linearLayout1=0x7f070004;
public static final int linearLayout2=0x7f07000b;
public static final int linearLayout3=0x7f07000f;
public static final int linearLayout_spinner=0x7f070005;
public static final int listView1=0x7f070000;
public static final int progress_bar_id=0x7f070003;
public static final int relativeLayout1=0x7f070001;
public static final int spinner1=0x7f070006;
public static final int textView1=0x7f070002;
public static final int textView2=0x7f070007;
public static final int textView3=0x7f070009;
public static final int textView4=0x7f07000c;
}
public static final class layout {
public static final int gridshow=0x7f030000;
public static final int launcher=0x7f030001;
public static final int main=0x7f030002;
}
public static final class string {
public static final int app_grid_show=0x7f060002;
/** 说明字符串
*/
public static final int app_launcher=0x7f060000;
public static final int app_name=0x7f060001;
public static final int btn_cancel=0x7f060008;
public static final int btn_ok=0x7f060007;
public static final int car_id=0x7f060005;
public static final int car_license_num=0x7f060004;
public static final int car_license_type=0x7f060003;
public static final int check_code=0x7f060006;
public static final int notice_car_id=0x7f06000f;
public static final int notice_car_num=0x7f06000e;
public static final int notice_check_code=0x7f060010;
public static final int tip_car_id=0x7f06000c;
public static final int tip_car_num=0x7f06000b;
public static final int tip_check_code=0x7f06000d;
/** 提示类
*/
public static final int tip_lanucher=0x7f060009;
public static final int tip_spinner=0x7f06000a;
}
}
| [
"bluestomez@8d0e2b01-6282-6274-ba5d-974b8f8e99e7"
] | bluestomez@8d0e2b01-6282-6274-ba5d-974b8f8e99e7 |
4a9c8c1da5ac88a241b4fb795f96540d32a5f2eb | 199d7f11bc6178a8ea240b5bf6e6e3092e50a214 | /container/openejb-core/src/main/java/org/apache/openejb/resource/jdbc/dbcp/ManagedDataSourceWithRecovery.java | ae314395cb542355d4750c68aa63d102c9fc9cb7 | [
"BSD-3-Clause",
"W3C-19980720",
"CDDL-1.0",
"Apache-2.0",
"W3C",
"MIT"
] | permissive | kdchamil/ASTomEE | 31fc4478cc58351d98a298e5849d3a5a72e7ab6e | eaad273b8def8836bb2e82aab04c067662d2f67b | refs/heads/master | 2023-01-13T07:31:53.989780 | 2014-08-07T06:52:32 | 2014-08-07T06:52:32 | 19,934,900 | 0 | 0 | Apache-2.0 | 2023-01-02T22:04:23 | 2014-05-19T08:49:01 | Java | UTF-8 | Java | false | false | 1,793 | 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.openejb.resource.jdbc.dbcp;
import org.apache.openejb.resource.TransactionManagerWrapper;
import org.apache.openejb.resource.XAResourceWrapper;
import javax.transaction.TransactionManager;
public class ManagedDataSourceWithRecovery extends BasicManagedDataSource {
private TransactionManager suppliedTransactionManager;
private final XAResourceWrapper xaResourceWrapper;
public ManagedDataSourceWithRecovery(final String name, final XAResourceWrapper xaResourceWrapper) {
super(name);
this.xaResourceWrapper = xaResourceWrapper;
}
@Override
public void setTransactionManager(TransactionManager transactionManager) {
this.suppliedTransactionManager = transactionManager;
}
protected void wrapTransactionManager() {
if (suppliedTransactionManager != null) {
super.setTransactionManager(new TransactionManagerWrapper(suppliedTransactionManager, getUrl(), xaResourceWrapper));
}
}
} | [
"kdchamil@gmail.com"
] | kdchamil@gmail.com |
fec3ffb1af0625196ebf7a99b9a833f94855d036 | 57b80eaf1ee7205c750219293f85378a5c9e02c6 | /C1908iLeThanhNghi/IASF/17-05-2021/rest-service/src/main/java/com/aptech/springrestapi/restservice/controllers/ProductController.java | 1c2b8c97e56b1aed97abcfccd71fa17ef0f6b335 | [] | no_license | nghia-lt-2809/Aptech | c7e7c5da6f9701e14f7856bb01c9a07103cf720e | 90d4fd2a7c48c002e67e0f11f18136aae79f21a2 | refs/heads/master | 2023-08-15T03:38:02.543357 | 2021-09-15T09:57:35 | 2021-09-15T09:57:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,401 | java | package com.aptech.springrestapi.restservice.controllers;
import com.aptech.springrestapi.restservice.components.ScheduledTasks;
import com.aptech.springrestapi.restservice.models.Product;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.Hashtable;
@RestController//phuc vu cho nhan request
@RequestMapping("/products")
public class ProductController {
private static final Logger log = LoggerFactory.getLogger(ProductController.class);
//routing
@GetMapping("/getAllProducts")
//cac request POST/PUT...
public Hashtable<String, Object> getAllProducts(
@RequestParam(value = "page", defaultValue = "0") Integer page,
@RequestParam(value = "limit", defaultValue = "10") Integer limit,
@RequestParam(value = "query", defaultValue = "") String query
) {
Hashtable<String, Object> dictResponse = new Hashtable<>();
dictResponse.put("code", 200);
dictResponse.put("message", "Query successful");
ArrayList<Product> fakedProducts = new ArrayList<>();
fakedProducts.add(new Product(1, "iphone 5", 2005,"This is an iphone, 5"));
fakedProducts.add(new Product(2, "iphone 6", 2006,"This is an iphone, 6"));
fakedProducts.add(new Product(3, "iphone 7", 2007,"This is an iphone, 7"));
dictResponse.put("data", fakedProducts);
return dictResponse;
}
@PostMapping("/insertProduct")
public Hashtable<String, Object> insertProduct(
@RequestParam(value = "name", defaultValue = "") String name,
@RequestParam(value = "description", defaultValue="") String description
)
{
Hashtable<String, Object> dictResponse = new Hashtable<>();
dictResponse.put("code", 200);
dictResponse.put("message", "Insert successful");
dictResponse.put("data", new Product(2, "iphone 6", 2006,"This is an iphone, 6"));
return dictResponse;
}
@PutMapping("/updateProduct")
public Hashtable<String, Object> updateProduct(
@RequestBody Hashtable<String, Object> params
// @RequestParam(value = "id", defaultValue = "0") Integer id,
// @RequestParam(value = "name", defaultValue = "") String name,
// @RequestParam(value = "description", defaultValue="") String description
)
{
log.info("id = {}, name = {}, description = {}", params.get("id"), params.get("name"), params.get("description"));
Hashtable<String, Object> dictResponse = new Hashtable<>();
dictResponse.put("code", 200);
dictResponse.put("message", "Update successful");
dictResponse.put("data", new Product(2, "iphone 6", 2006,"This is an iphone, 6"));
return dictResponse;
}
@DeleteMapping("/deleteProduct")
public Hashtable<String, Object> deleteProduct(
@RequestParam(value = "id", defaultValue = "0") Integer id
){
log.info("id = {}", id);
Hashtable<String, Object> dictResponse = new Hashtable<>();
dictResponse.put("code", 200);
dictResponse.put("message", String.format("Delete product %d successful", id));
dictResponse.put("data", new Product(2, "iphone 6", 2006,"This is an iphone, 6"));
return dictResponse;
}
//viet api upload profile/user
}
| [
"sunlight4d@gmail.com"
] | sunlight4d@gmail.com |
24dfa43ac8080261e43a518b8bc4eeac4e4334f4 | e899120f52f6c89efe81ce5ee824586197453b16 | /app/src/main/java/com/netease/nim/uikit/business/session/activity/VoiceTrans.java | bf27fd17cf83ce6f75923f26c47b9cfb9fc1c7c8 | [] | no_license | h616016784/similarwx | 50a756693d1342b68e42e47df5b550169179ce33 | 2b0178060c0fadaefbdf7e1e79fdc10e2fe3e8d6 | refs/heads/master | 2021-04-06T01:47:57.116237 | 2019-01-15T05:45:17 | 2019-01-15T05:45:17 | 125,173,875 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,875 | java | package com.netease.nim.uikit.business.session.activity;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.inputmethod.InputMethodManager;
import android.widget.ProgressBar;
import android.widget.TextView;
import com.android.similarwx.R;
import com.netease.nim.uikit.common.util.log.LogUtil;
import com.netease.nimlib.sdk.AbortableFuture;
import com.netease.nimlib.sdk.NIMClient;
import com.netease.nimlib.sdk.RequestCallback;
import com.netease.nimlib.sdk.msg.MsgService;
import com.netease.nimlib.sdk.msg.attachment.AudioAttachment;
import com.netease.nimlib.sdk.msg.model.IMMessage;
/**
* Created by hzxuwen on 2015/7/9.
*/
public class VoiceTrans {
private static final String TAG = VoiceTrans.class.getSimpleName();
private final Activity baseActivity;
// view
private View textLayout;
private TextView voiceTransText;
private View cancelBtn;
private ProgressBar refreshingIndicator;
private View failIcon;
private AbortableFuture<String> callFuture;
public VoiceTrans(Activity baseActivity) {
this.baseActivity = baseActivity;
findViews();
setListener();
}
private void hideKeyBoard() {
InputMethodManager imm = (InputMethodManager) baseActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
if (baseActivity.getCurrentFocus() != null) {
imm.hideSoftInputFromWindow(baseActivity.getCurrentFocus().getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
}
}
private void findViews() {
textLayout = baseActivity.findViewById(R.id.voice_trans_layout);
if (textLayout == null) {
LayoutInflater layoutInflater = LayoutInflater.from(baseActivity);
textLayout = layoutInflater.inflate(R.layout.nim_voice_trans_layout, null);
ViewGroup.LayoutParams layoutParams = new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT);
baseActivity.addContentView(textLayout, layoutParams);
}
voiceTransText = (TextView) textLayout.findViewById(R.id.voice_trans_text);
cancelBtn = textLayout.findViewById(R.id.cancel_btn);
refreshingIndicator = (ProgressBar) textLayout.findViewById(R.id.refreshing_indicator);
failIcon = textLayout.findViewById(R.id.trans_fail_icon);
}
private void setListener() {
cancelBtn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
hide();
}
});
textLayout.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
hide();
}
});
}
public void hide() {
if (callFuture != null) {
callFuture.abort();
}
voiceTransText.scrollTo(0, 0);
textLayout.setVisibility(View.GONE);
}
public void show() {
hideKeyBoard();
textLayout.setVisibility(View.VISIBLE);
voiceTransText.setText("正在转换");
}
public boolean isShow() {
return textLayout.getVisibility() == View.VISIBLE;
}
public void voiceToText(IMMessage msg) {
AudioAttachment attachment = (AudioAttachment) msg.getAttachment();
String voiceUrl = attachment.getUrl();
String path = attachment.getPath();
refreshStartUI();
callFuture = NIMClient.getService(MsgService.class).transVoiceToText(voiceUrl, path, attachment.getDuration());
callFuture.setCallback(new RequestCallback<String>() {
@Override
public void onSuccess(String param) {
voiceTransText.setText(param);
updateUI();
}
@Override
public void onFailed(int code) {
LogUtil.e(TAG, "voice to text failed, code=" + code);
voiceTransText.setText(R.string.trans_voice_failed);
failIcon.setVisibility(View.VISIBLE);
updateUI();
}
@Override
public void onException(Throwable exception) {
LogUtil.e(TAG, "voice to text throw exception, e=" + exception.getMessage());
voiceTransText.setText("参数错误");
failIcon.setVisibility(View.VISIBLE);
updateUI();
}
});
show();
}
private void refreshStartUI() {
failIcon.setVisibility(View.GONE);
cancelBtn.setVisibility(View.VISIBLE);
refreshingIndicator.setVisibility(View.VISIBLE);
}
private void updateUI() {
refreshingIndicator.setVisibility(View.GONE);
cancelBtn.setVisibility(View.GONE);
}
}
| [
"123456"
] | 123456 |
810f4275b2411f7ae4bc705a7eb799b6bec306c7 | cee6d0534a4b4fda056cacd1738fc7c22223ef06 | /src/main/java/by/distributionnetwork/config/LocaleConfiguration.java | c0d394e65a93f374c1215b8de05913107ea382c4 | [] | no_license | Topolev/DistributionNetwork_2017_05_31 | 54c0fac9ba8dbdd916dfec27b8348c60d7751840 | a083f2bf9a64e7bbfe10ad2ea254c04c35f1d7a2 | refs/heads/master | 2021-01-23T01:40:32.544847 | 2017-05-31T15:52:36 | 2017-05-31T15:52:42 | 92,882,438 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,396 | java | package by.distributionnetwork.config;
import io.github.jhipster.config.locale.AngularCookieLocaleResolver;
import org.springframework.context.EnvironmentAware;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
@Configuration
public class LocaleConfiguration extends WebMvcConfigurerAdapter implements EnvironmentAware {
@Override
public void setEnvironment(Environment environment) {
// unused
}
@Bean(name = "localeResolver")
public LocaleResolver localeResolver() {
AngularCookieLocaleResolver cookieLocaleResolver = new AngularCookieLocaleResolver();
cookieLocaleResolver.setCookieName("NG_TRANSLATE_LANG_KEY");
return cookieLocaleResolver;
}
@Override
public void addInterceptors(InterceptorRegistry registry) {
LocaleChangeInterceptor localeChangeInterceptor = new LocaleChangeInterceptor();
localeChangeInterceptor.setParamName("language");
registry.addInterceptor(localeChangeInterceptor);
}
}
| [
"i.topolev.vladimir@gmail.com"
] | i.topolev.vladimir@gmail.com |
d819067627d01574ef87b9dd97dd2d7ce70c8bba | 99491debb70866677edc01d9af1bfaadac914978 | /src/main/java/com/id/wasta/data/repository/jpa/TIdLandingAddInformationJpaRepository.java | a2606cf7e0c2ebc892cadaba101f30d4c120ecdb | [] | no_license | srnu/wasta | a9dbf4772d6584aacb952b12a4d0e6842d8fa77c | c55498cd42b8114ee0bb9342c9905868632e9ddc | refs/heads/master | 2022-12-12T06:54:57.769288 | 2020-09-13T09:41:53 | 2020-09-13T09:41:53 | 295,119,733 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,503 | java | package com.id.wasta.data.repository.jpa;
import java.util.Date;
import java.util.List;
import javax.transaction.Transactional;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.data.repository.query.Param;
import com.id.wasta.bean.LandingInfoBean;
import com.id.wasta.bean.jpa.TIdLandingAddInformationEntity;
/**
* Repository : TIdLandingAddInformation.
*/
public interface TIdLandingAddInformationJpaRepository extends PagingAndSortingRepository<TIdLandingAddInformationEntity, Long> {
@Query(value ="Select count(*) from t_id_landing_add_information WHERE ld_type_change!='Deleted' and FIND_IN_SET (:loggedPinKey, ld_access_info) and ld_key not in (select ll_ld_key from t_id_landing_add_information_link WHERE ll_pin_key=:loggedPinKey)", nativeQuery=true)
Long getAddInformationDetsilsCount(@Param("loggedPinKey") Long loggedPinKey);
@Query("Select new com.id.wasta.bean.LandingInfoBean(e.ldKey,e.ldUserName,e.ldUserPinKey,e.ldContactName,e.ldContactPinKey,e.ldCompany,e.ldIndustry,e.ldCountry,e.ldBoxName,e.ldFieldName,e.ldLatestUpdate,e.ldUpdateKey,e.ldReadFlag,e.lockKey,e.profileKey,e.createdOn, 1 ) from TIdLandingAddInformationEntity e "
+ "where e.ldTypeChange!='Deleted' and e.ldAccessInfo like CONCAT(',%',:loggedPinKey,',%') and e.ldKey in (select ee.llLdKey from TIdLandingAddInformationLinkEntity ee where ee.llPinKey=:loggedPinKey)")
List<LandingInfoBean> getAddInformationDetsils(@Param("loggedPinKey") Long loggedPinKey);
@Query("Select new com.id.wasta.bean.LandingInfoBean(e.ldKey,e.ldUserName,e.ldUserPinKey,e.ldContactName,e.ldContactPinKey,e.ldCompany,e.ldIndustry,e.ldCountry,e.ldBoxName,e.ldFieldName,e.ldLatestUpdate,e.ldUpdateKey,e.ldReadFlag,e.lockKey,e.profileKey,e.createdOn, 0 ) from TIdLandingAddInformationEntity e "
+ "where e.ldTypeChange!='Deleted' and e.ldAccessInfo like CONCAT(',%',:loggedPinKey,',%') and e.ldKey not in (select ee.llLdKey from TIdLandingAddInformationLinkEntity ee where ee.llPinKey=:loggedPinKey)")
List<LandingInfoBean> getAddInformationDetsilsNotIn(@Param("loggedPinKey") Long loggedPinKey);
List<TIdLandingAddInformationEntity> findByLdContactPinKey(Long pinKey);
@Query(value ="Select count(*) from t_id_landing_add_information WHERE created_on >=:logoutDate and ld_contact_pin_key in (:toPinKey) and FIND_IN_SET (:loggedPinKey, ld_access_info) and ld_key not in (select ll_ld_key from t_id_landing_add_information_link WHERE ll_pin_key=:loggedPinKey)", nativeQuery=true)
Long getAddInformationDetsilsCount(@Param("logoutDate") Date logoutDate, @Param("toPinKey") List<Long> toPinKey, @Param("loggedPinKey") Long loggedPinKey);
@Query("Select new com.id.wasta.bean.LandingInfoBean(e.ldKey,e.ldUserName,e.ldUserPinKey,e.ldContactName,e.ldContactPinKey,e.ldCompany,e.ldIndustry,e.ldCountry,e.ldBoxName,e.ldFieldName,e.ldLatestUpdate,e.ldUpdateKey,e.ldReadFlag,e.lockKey,e.profileKey,e.createdOn, 1 ) from TIdLandingAddInformationEntity e "
+ "where e.createdOn >= :logoutDate and e.ldContactPinKey in (:toPinKey) and e.ldAccessInfo like CONCAT('%,',:loggedPinKey,',%') and e.ldKey in (select ee.llLdKey from TIdLandingAddInformationLinkEntity ee where ee.llPinKey=:loggedPinKey)")
List<LandingInfoBean> getAddInformationDetsils(@Param("logoutDate") Date logoutDate, @Param("toPinKey") List<Long> toPinKey, @Param("loggedPinKey") Long loggedPinKey);
@Query("Select new com.id.wasta.bean.LandingInfoBean(e.ldKey,e.ldUserName,e.ldUserPinKey,e.ldContactName,e.ldContactPinKey,e.ldCompany,e.ldIndustry,e.ldCountry,e.ldBoxName,e.ldFieldName,e.ldLatestUpdate,e.ldUpdateKey,e.ldReadFlag,e.lockKey,e.profileKey,e.createdOn, 0 ) from TIdLandingAddInformationEntity e "
+ "where e.createdOn >= :logoutDate and e.ldContactPinKey in (:toPinKey) and e.ldAccessInfo like CONCAT('%,',:loggedPinKey,',%') and e.ldKey not in (select ee.llLdKey from TIdLandingAddInformationLinkEntity ee where ee.llPinKey=:loggedPinKey)")
List<LandingInfoBean> getAddInformationDetsilsNotIn(@Param("logoutDate") Date logoutDate, @Param("toPinKey") List<Long> toPinKey, @Param("loggedPinKey") Long loggedPinKey);
@Modifying
@Transactional
@Query("update TIdLandingAddInformationEntity e set e.ldAuditLatestUpdate = ?1 where e.ldUpdateKey = ?2 and e.ldTypeChange in ('Created','Added')")
int updateLatestUpdate(String ldAuditLatestUpdate, Long ldUpdateKey);
}
| [
"venkatrao@infodynamic.in"
] | venkatrao@infodynamic.in |
dda8625aede31f40ad9ea7b7dde4da606a0bf334 | 559b72223a137ed58c565d9e907a7db089fb2726 | /hbase-client/src/main/java/org/apache/hadoop/hbase/quotas/SpaceQuotaSnapshotView.java | 4bc47b9cddd3d026bfdfb87b9fba8f8548a1cd23 | [
"CC-BY-3.0",
"Apache-2.0",
"BSD-3-Clause",
"LicenseRef-scancode-protobuf",
"MIT",
"BSD-2-Clause"
] | permissive | arshadmohammad/hbase | 8ae309a66a0efee24fe2e6285a916a56b8dacbf3 | 9c8c9e7fbf8005ea89fa9b13d6d063b9f0240443 | refs/heads/master | 2022-05-13T03:39:12.159691 | 2022-05-01T14:15:04 | 2022-05-01T14:15:09 | 247,534,116 | 0 | 2 | Apache-2.0 | 2020-03-15T19:12:17 | 2020-03-15T19:12:16 | null | UTF-8 | Java | false | false | 2,080 | 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.hadoop.hbase.quotas;
import java.util.Optional;
import org.apache.yetus.audience.InterfaceAudience;
/**
* A point-in-time view of a space quota on a table, read only.
*/
@InterfaceAudience.Public
public interface SpaceQuotaSnapshotView {
/**
* Encapsulates the state of a quota on a table. The quota may or may not be in violation. If the
* quota is not in violation, the violation may not be presented. If the quota is in violation,
* there is guaranteed to be presented.
*/
@InterfaceAudience.Public
interface SpaceQuotaStatusView {
/**
* Returns the violation policy, which may not be presented. It is guaranteed to be presented if
* {@link #isInViolation()} is {@code true}, but may not be presented otherwise.
*/
Optional<SpaceViolationPolicy> getPolicy();
/**
* @return {@code true} if the quota is being violated, {@code false} otherwise.
*/
boolean isInViolation();
}
/**
* Returns the status of the quota.
*/
SpaceQuotaStatusView getQuotaStatus();
/**
* Returns the current usage, in bytes, of the target (e.g. table, namespace).
*/
long getUsage();
/**
* Returns the limit, in bytes, of the target (e.g. table, namespace).
*/
long getLimit();
}
| [
"zhangduo@apache.org"
] | zhangduo@apache.org |
c78890dbebaf7ad6945d06ee787a33c97dfd945c | d3c305ac3c6a6a14305add8b1407f98bdf608487 | /ggglib/src/main/java/com/gigigo/ggglib/device/providers/HandsetProvider.java | 1696f4ab6bdf7df881e162b80ceebd6b69c8231c | [
"Apache-2.0"
] | permissive | GigigoGreenLabs/gggUtilsSuite | e6cdc3691568b44348a8f3dfdb702065efb06a2c | 82400da007012b0a5d49ea81e21ca1a3b6586081 | refs/heads/master | 2021-01-12T16:33:44.927882 | 2017-11-30T12:27:50 | 2017-11-30T12:27:50 | 69,975,128 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,451 | java | /*
* Created by Gigigo Android Team
*
* Copyright (C) 2016 Gigigo Mobile Services SL
*
* 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.gigigo.ggglib.device.providers;
import android.os.Build;
@Deprecated
public class HandsetProvider {
public String provideHandset() {
return deviceName();
}
public String deviceName() {
String manufacturer = Build.MANUFACTURER;
String model = Build.MODEL;
if (model.startsWith(manufacturer)) {
return capitalize(model);
} else {
return capitalize(manufacturer) + " " + model;
}
}
private String capitalize(String s) {
if (s == null || s.length() == 0) {
return "";
}
char first = s.charAt(0);
if (Character.isUpperCase(first)) {
return s;
} else {
return Character.toUpperCase(first) + s.substring(1);
}
}
}
| [
"nuborisar@gmail.com"
] | nuborisar@gmail.com |
98fdc4a512f1fd6249ca33ad89013b37cbf63b3c | 3e84ff247d97d8360e65b3e20d62a4b944a6ea62 | /base/src/test/java/org/picketlink/test/authorization/AnnotationBasedAuthorizationTestCase.java | 01fb8e6b6bfb47996b705f75564a694b762b2bf2 | [] | no_license | mposolda/picketlink-tests | c30c518794835187be75e12f7fc5308078f0d7f0 | 8d51a1c11effb8bcc27518661876f07ee4bdce6a | refs/heads/master | 2021-01-16T20:59:41.583887 | 2014-07-23T22:07:24 | 2014-07-23T22:07:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,828 | java | /*
* JBoss, Home of Professional Open Source.
* Copyright 2012, Red Hat, Inc., and individual contributors
* as indicated by the @author tags. See the copyright.txt file in the
* distribution for a full listing of individual contributors.
*
* This is free software; you can redistribute it and/or modify it
* under the terms of the GNU Lesser General Public License as
* published by the Free Software Foundation; either version 2.1 of
* the License, or (at your option) any later version.
*
* This software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.picketlink.test.authorization;
import org.apache.deltaspike.security.api.authorization.AccessDeniedException;
import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.picketlink.idm.credential.Password;
import org.picketlink.idm.model.basic.BasicModel;
import org.picketlink.idm.model.basic.Group;
import org.picketlink.idm.model.basic.Role;
import org.picketlink.idm.model.basic.User;
import javax.inject.Inject;
import static org.junit.Assert.fail;
import static org.picketlink.idm.model.basic.BasicModel.addToGroup;
import static org.picketlink.idm.model.basic.BasicModel.grantGroupRole;
import static org.picketlink.idm.model.basic.BasicModel.grantRole;
/**
* <p>
* Perform some authentication tests using the {@link org.picketlink.authentication.internal.IdmAuthenticator}, which is the default {@link java.net.Authenticator}.
* </p>
*
* @author Pedro Igor
*
*/
@RunWith(Arquillian.class)
public class AnnotationBasedAuthorizationTestCase extends AbstractAuthorizationTestCase {
@Inject
protected AnnotationProtectedBean protectedBean;
@Deployment
public static WebArchive deploy() {
return create(AnnotationBasedAuthorizationTestCase.class, AnnotationProtectedBean.class);
}
@Before
public void onSetup() throws Exception {
User john = BasicModel.getUser(this.identityManager, USER_NAME);
if (john == null) {
john = new User(USER_NAME);
this.identityManager.add(john);
this.identityManager.updateCredential(john, new Password(USER_PASSWORD));
Role tester = new Role("Tester");
this.identityManager.add(tester);
Group qaGroup = new Group("QA");
this.identityManager.add(qaGroup);
grantRole(relationshipManager, john, tester);
addToGroup(relationshipManager, john, qaGroup);
grantGroupRole(relationshipManager, john, tester, qaGroup);
this.permissionManager.grantPermission(john, "profile", "read");
this.userTransaction.commit();
}
}
@Test
public void testSuccessfulInvocationFromAuthenticatedUser() throws Exception {
performAuthentication();
this.protectedBean.protectedFromUnauthenticatedUsers();
}
@Test
public void testSuccessfulInvocationWithPermission() throws Exception {
performAuthentication();
this.protectedBean.protectedWithResourcePermission();
}
@Test
public void testSuccessfulInvocationWithRequiredRole() throws Exception {
performAuthentication();
this.protectedBean.protectedWithRequiredRole();
}
@Test
public void testSuccessfulInvocationWithRequiredGroup() throws Exception {
performAuthentication();
this.protectedBean.protectedWithRequiredGroup();
}
@Test
public void testSuccessfulInvocationWithRequiredRoleAndGroup() throws Exception {
performAuthentication();
this.protectedBean.protectedWithRequiredMemberAndRole();
}
@Test
public void testSuccessfulInvocationWithRequiredPartitionName() throws Exception {
performAuthentication();
this.protectedBean.protectedWithRequiredPartitionName();
}
@Test
public void testSuccessfulInvocationWithRequiredPartitionType() throws Exception {
performAuthentication();
this.protectedBean.protectedWithRequiredPartitionType();
}
@Test
public void testSuccessfulInvocationWithRequiredPartitionNameAndType() throws Exception {
performAuthentication();
this.protectedBean.protectedWithRequiredPartitionTypeAndName();
}
@Test
public void failInvocationFromUnAuthenticatedUser() throws Exception {
try {
this.protectedBean.protectedFromUnauthenticatedUsers();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
@Test
public void failInvocationFromUnAuthenticatedUserPermission() throws Exception {
try {
this.protectedBean.protectedWithResourceWithoutPermission();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
@Test
public void failInvocationWithInvalidRole() throws Exception {
try {
performAuthentication();
this.protectedBean.protectedWithRequiredInvalidRole();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
@Test
public void failInvocationWithInvalidGroup() throws Exception {
try {
performAuthentication();
this.protectedBean.protectedWithRequiredInvalidGroup();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
@Test
public void failInvocationWithRequiredGroupAndInvalidRole() throws Exception {
try {
performAuthentication();
this.protectedBean.protectedWithRequiredMemberAndInvalidRole();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
@Test
public void failInvocationWithInvalidPartitionName() throws Exception {
try {
performAuthentication();
this.protectedBean.protectedWithInvalidPartitionName();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
@Test
public void failInvocationWithInvalidPartitionType() throws Exception {
try {
performAuthentication();
this.protectedBean.protectedWithInvalidPartitionType();
fail();
} catch (Exception e) {
if (!AccessDeniedException.class.isInstance(e) && !AccessDeniedException.class.isInstance(e.getCause())) {
fail();
}
}
}
} | [
"pigor.craveiro@gmail.com"
] | pigor.craveiro@gmail.com |
52d7c8ddcfb16a004eda197927d0f1316da128c5 | 1209e2c279b54a6d9e95e717e5e7ead08ec07419 | /openapi-generator-utils/treepots/treepots-openapigen-java-okhttp-gson/src/main/java/fr/jmini/openapi/openapitools/okhttpgson/api/IpsumApi.java | efa82ad538f734adf04fbe37b8485adbdff94d9c | [
"Apache-2.0"
] | permissive | chunyenHuang/openapi-experiments | d4f01395781c59161988ad60a446bf6c69ce82eb | b1b78580da62189337708dfd3fb758700dacfddb | refs/heads/master | 2020-07-21T10:19:47.658969 | 2019-08-29T15:41:29 | 2019-08-29T15:41:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,142 | java | /*
* OpenAPI Tree Pots
* Example spec
*
* The version of the OpenAPI document: 1.0.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
package fr.jmini.openapi.openapitools.okhttpgson.api;
import fr.jmini.openapi.openapitools.okhttpgson.ApiCallback;
import fr.jmini.openapi.openapitools.okhttpgson.ApiClient;
import fr.jmini.openapi.openapitools.okhttpgson.ApiException;
import fr.jmini.openapi.openapitools.okhttpgson.ApiResponse;
import fr.jmini.openapi.openapitools.okhttpgson.Configuration;
import fr.jmini.openapi.openapitools.okhttpgson.Pair;
import fr.jmini.openapi.openapitools.okhttpgson.ProgressRequestBody;
import fr.jmini.openapi.openapitools.okhttpgson.ProgressResponseBody;
import com.google.gson.reflect.TypeToken;
import java.io.IOException;
import fr.jmini.openapi.openapitools.okhttpgson.model.ErrorModel;
import fr.jmini.openapi.openapitools.okhttpgson.model.SomeObject;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class IpsumApi {
private ApiClient localVarApiClient;
public IpsumApi() {
this(Configuration.getDefaultApiClient());
}
public IpsumApi(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
public ApiClient getApiClient() {
return localVarApiClient;
}
public void setApiClient(ApiClient apiClient) {
this.localVarApiClient = apiClient;
}
/**
* Build call for op199
* @param _callback Callback for upload/download progress
* @return Call to execute
* @throws ApiException If fail to serialize the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> a pet to be returned </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call op199Call(final ApiCallback _callback) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/ipsum/issue199";
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
final String[] localVarAccepts = {
"application/json"
};
final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts);
if (localVarAccept != null) {
localVarHeaderParams.put("Accept", localVarAccept);
}
final String[] localVarContentTypes = {
};
final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes);
localVarHeaderParams.put("Content-Type", localVarContentType);
String[] localVarAuthNames = new String[] { };
return localVarApiClient.buildCall(localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarFormParams, localVarAuthNames, _callback);
}
@SuppressWarnings("rawtypes")
private okhttp3.Call op199ValidateBeforeCall(final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = op199Call(_callback);
return localVarCall;
}
/**
*
*
* @return SomeObject
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> a pet to be returned </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public SomeObject op199() throws ApiException {
ApiResponse<SomeObject> localVarResp = op199WithHttpInfo();
return localVarResp.getData();
}
/**
*
*
* @return ApiResponse<SomeObject>
* @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> a pet to be returned </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public ApiResponse<SomeObject> op199WithHttpInfo() throws ApiException {
okhttp3.Call localVarCall = op199ValidateBeforeCall(null);
Type localVarReturnType = new TypeToken<SomeObject>(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
/**
* (asynchronously)
*
* @param _callback The callback to be executed when the API call finishes
* @return The request call
* @throws ApiException If fail to process the API call, e.g. serializing the request body object
* @http.response.details
<table summary="Response Details" border="1">
<tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
<tr><td> 200 </td><td> a pet to be returned </td><td> - </td></tr>
<tr><td> 0 </td><td> Unexpected error </td><td> - </td></tr>
</table>
*/
public okhttp3.Call op199Async(final ApiCallback<SomeObject> _callback) throws ApiException {
okhttp3.Call localVarCall = op199ValidateBeforeCall(_callback);
Type localVarReturnType = new TypeToken<SomeObject>(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
}
| [
"dev@jmini.fr"
] | dev@jmini.fr |
45f776280aa431647c21e7484f1247302fcc527f | 5f6f1f63ef1034c0431d418e32e8e6ab7451f062 | /SilVM/src/main/java/org/reldb/ldi/sili/values/ValueInteger.java | 074a70b3b36b02265c8e9da80b85a1c2483a467a | [
"Apache-2.0"
] | permissive | DaveVoorhis/LDI | 99ecc41680c8d0951f9c8b22684ad74fe02e0c1d | 7ec280206adef98590b468a183e19e43b7c794b7 | refs/heads/master | 2022-10-20T22:28:25.886973 | 2022-10-09T22:01:13 | 2022-10-09T22:01:13 | 78,937,423 | 1 | 8 | null | null | null | null | UTF-8 | Java | false | false | 1,780 | java | package org.reldb.ldi.sili.values;
public class ValueInteger extends ValueAbstract {
private static final ValueInteger _zero = new ValueInteger(0);
private long internalValue;
/* Methods used by XML serialization and nothing else. */
public ValueInteger() {
}
public long getValue() {
return internalValue;
}
public void setValue(long v) {
internalValue = v;
}
/* Public methods from here on down. */
public static ValueInteger getZero() {
return _zero;
}
public ValueInteger(long b) {
internalValue = b;
}
public String getTypeName() {
return "INTEGER";
}
/** Convert this to a primitive boolean. */
public boolean booleanValue() {
return internalValue != 0;
}
/** Convert this to a primitive long. */
public long longValue() {
return internalValue;
}
/** Convert this to a primitive double. */
public double doubleValue() {
return (double)internalValue;
}
/** Convert this to a primitive String. */
public String stringValue() {
return "" + internalValue;
}
public int compareTo(Value v) {
if (internalValue == v.longValue())
return 0;
else if (internalValue > v.longValue())
return 1;
else
return -1;
}
public Value add(Value v) {
return new ValueInteger(internalValue + v.longValue());
}
public Value subtract(Value v) {
return new ValueInteger(internalValue - v.longValue());
}
public Value mult(Value v) {
return new ValueInteger(internalValue * v.longValue());
}
public Value div(Value v) {
return new ValueInteger(internalValue / v.longValue());
}
public Value unary_plus() {
return new ValueInteger(internalValue);
}
public Value unary_minus() {
return new ValueInteger(-internalValue);
}
public String toString() {
return "" + internalValue;
}
}
| [
"dave@armchair.mb.ca"
] | dave@armchair.mb.ca |
90a73913f1badb9b7dd625c670a59660b073d486 | 1294552da428420f5106c1f705e67ceb44b44058 | /think/src/thinkInJava/zyq09/Mouths.java | 6ba56a560ac2d1d2420a4a229fd8458ff9a146f9 | [] | no_license | xiaodupi-zyq/javaStudy | e0137f4017dfa185b17df16b3ef76fb710c5b2e6 | 3a906107968b736bc39c2a16e93e20a322e3f7e2 | refs/heads/master | 2021-06-23T03:20:00.184844 | 2021-03-13T13:15:14 | 2021-03-13T13:15:14 | 198,929,279 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 230 | java | package thinkInJava.zyq09;
public interface Mouths {
int JANUARY = 1,FEBRUARY =2;
}
class Test917{
public static void main(String[] args){
System.out.println(Mouths.JANUARY);
// Mouths.JANUARY = 3;
}
}
| [
"741883796@qq.com"
] | 741883796@qq.com |
94f37ba9b0c3700a2ca14203fbeff7768077c125 | 0613bb6cf1c71b575419651fc20330edb9f916d2 | /CheatBreaker/src/main/java/net/minecraft/world/gen/structure/StructureStart.java | c227b7d2012744e5f11c293ddd3348f6852684b6 | [] | no_license | Decencies/CheatBreaker | 544fdae14e61c6e0b1f5c28d8c865e2bbd5169c2 | 0cf7154272c8884eee1e4b4c7c262590d9712d68 | refs/heads/master | 2023-09-04T04:45:16.790965 | 2023-03-17T09:51:10 | 2023-03-17T09:51:10 | 343,514,192 | 98 | 38 | null | 2023-08-21T03:54:20 | 2021-03-01T18:18:19 | Java | UTF-8 | Java | false | false | 5,278 | java | package net.minecraft.world.gen.structure;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Random;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.world.World;
public abstract class StructureStart
{
/** List of all StructureComponents that are part of this structure */
protected LinkedList components = new LinkedList();
protected StructureBoundingBox boundingBox;
private int field_143024_c;
private int field_143023_d;
public StructureStart() {}
public StructureStart(int p_i43002_1_, int p_i43002_2_)
{
this.field_143024_c = p_i43002_1_;
this.field_143023_d = p_i43002_2_;
}
public StructureBoundingBox getBoundingBox()
{
return this.boundingBox;
}
public LinkedList getComponents()
{
return this.components;
}
/**
* Keeps iterating Structure Pieces and spawning them until the checks tell it to stop
*/
public void generateStructure(World p_75068_1_, Random p_75068_2_, StructureBoundingBox p_75068_3_)
{
Iterator var4 = this.components.iterator();
while (var4.hasNext())
{
StructureComponent var5 = (StructureComponent)var4.next();
if (var5.getBoundingBox().intersectsWith(p_75068_3_) && !var5.addComponentParts(p_75068_1_, p_75068_2_, p_75068_3_))
{
var4.remove();
}
}
}
/**
* Calculates total bounding box based on components' bounding boxes and saves it to boundingBox
*/
protected void updateBoundingBox()
{
this.boundingBox = StructureBoundingBox.getNewBoundingBox();
Iterator var1 = this.components.iterator();
while (var1.hasNext())
{
StructureComponent var2 = (StructureComponent)var1.next();
this.boundingBox.expandTo(var2.getBoundingBox());
}
}
public NBTTagCompound func_143021_a(int p_143021_1_, int p_143021_2_)
{
NBTTagCompound var3 = new NBTTagCompound();
var3.setString("id", MapGenStructureIO.func_143033_a(this));
var3.setInteger("ChunkX", p_143021_1_);
var3.setInteger("ChunkZ", p_143021_2_);
var3.setTag("BB", this.boundingBox.func_151535_h());
NBTTagList var4 = new NBTTagList();
Iterator var5 = this.components.iterator();
while (var5.hasNext())
{
StructureComponent var6 = (StructureComponent)var5.next();
var4.appendTag(var6.func_143010_b());
}
var3.setTag("Children", var4);
this.func_143022_a(var3);
return var3;
}
public void func_143022_a(NBTTagCompound p_143022_1_) {}
public void func_143020_a(World p_143020_1_, NBTTagCompound p_143020_2_)
{
this.field_143024_c = p_143020_2_.getInteger("ChunkX");
this.field_143023_d = p_143020_2_.getInteger("ChunkZ");
if (p_143020_2_.hasKey("BB"))
{
this.boundingBox = new StructureBoundingBox(p_143020_2_.getIntArray("BB"));
}
NBTTagList var3 = p_143020_2_.getTagList("Children", 10);
for (int var4 = 0; var4 < var3.tagCount(); ++var4)
{
this.components.add(MapGenStructureIO.func_143032_b(var3.getCompoundTagAt(var4), p_143020_1_));
}
this.func_143017_b(p_143020_2_);
}
public void func_143017_b(NBTTagCompound p_143017_1_) {}
/**
* offsets the structure Bounding Boxes up to a certain height, typically 63 - 10
*/
protected void markAvailableHeight(World p_75067_1_, Random p_75067_2_, int p_75067_3_)
{
int var4 = 63 - p_75067_3_;
int var5 = this.boundingBox.getYSize() + 1;
if (var5 < var4)
{
var5 += p_75067_2_.nextInt(var4 - var5);
}
int var6 = var5 - this.boundingBox.maxY;
this.boundingBox.offset(0, var6, 0);
Iterator var7 = this.components.iterator();
while (var7.hasNext())
{
StructureComponent var8 = (StructureComponent)var7.next();
var8.getBoundingBox().offset(0, var6, 0);
}
}
protected void setRandomHeight(World p_75070_1_, Random p_75070_2_, int p_75070_3_, int p_75070_4_)
{
int var5 = p_75070_4_ - p_75070_3_ + 1 - this.boundingBox.getYSize();
boolean var6 = true;
int var10;
if (var5 > 1)
{
var10 = p_75070_3_ + p_75070_2_.nextInt(var5);
}
else
{
var10 = p_75070_3_;
}
int var7 = var10 - this.boundingBox.minY;
this.boundingBox.offset(0, var7, 0);
Iterator var8 = this.components.iterator();
while (var8.hasNext())
{
StructureComponent var9 = (StructureComponent)var8.next();
var9.getBoundingBox().offset(0, var7, 0);
}
}
/**
* currently only defined for Villages, returns true if Village has more than 2 non-road components
*/
public boolean isSizeableStructure()
{
return true;
}
public int func_143019_e()
{
return this.field_143024_c;
}
public int func_143018_f()
{
return this.field_143023_d;
}
}
| [
"66835910+Decencies@users.noreply.github.com"
] | 66835910+Decencies@users.noreply.github.com |
31ec384ea548815c0738302057114a2dfeaae6ce | 1db07f5643b062a6f4642428aa5caf307b07f3f3 | /drools.indepth.root/kie-server-performance/src/main/java/org/jackzeng/autobean/Bean293.java | 851f0617869d5e4a91aca545c74d2e850b265d03 | [] | no_license | tracyzhu2014/JavaHub | b6d6c4e95bd1e6ca3849d989e9cd2c1aa53416fb | 4b66e2a6ee9f8d3bb433490f259d534ccce67a97 | refs/heads/master | 2023-05-07T22:23:03.545452 | 2020-12-18T01:57:44 | 2020-12-18T01:57:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,900 | java | package org.jackzeng.autobean;
public class Bean293 {
private String field294;
private double field295;
private boolean field296;
private int fild297;
public String getField294() {
return field294;
}
public void setField294(String field294) {
this.field294 = field294;
}
public double getField295() {
return field295;
}
public void setField295(double field295) {
this.field295 = field295;
}
public boolean isField296() {
return field296;
}
public void setField296(boolean field296) {
this.field296 = field296;
}
public int getFild297() {
return fild297;
}
public void setFild297(int fild297) {
this.fild297 = fild297;
}} | [
"zengxijin@qq.com"
] | zengxijin@qq.com |
4f5f3dccebed7a3bdf8d980439c0b04f78f7fc00 | a636258c60406f8db850d695b064836eaf75338b | /modules/com.redcarpet.production/src/com/redcarpet/production/ad_process/RCPR_PreventiveOrderMaintenance.java | c73feeacd810364c4fffaf164ba1f79b636806fe | [] | no_license | Afford-Solutions/openbravo-payroll | ed08af5a581fa41455f4e9b233cb182d787d5064 | 026fee4fe79b1f621959670fdd9ae6dec33d263e | refs/heads/master | 2022-03-10T20:43:13.162216 | 2019-11-07T18:31:05 | 2019-11-07T18:31:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,397 | java | package com.redcarpet.production.ad_process;
import com.redcarpet.production.data.RCPR_Machine_ElectricalMaintenance;
import com.redcarpet.production.data.RCPR_Machine_Mechanical_Maintenance;
import com.redcarpet.production.data.RCPR_PreventiveMaintenanceOrder;
import com.redcarpet.production.data.RCPR_Task;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import javax.servlet.ServletException;
import org.apache.commons.lang.StringUtils;
import org.openbravo.dal.service.OBDal;
import org.openbravo.erpCommon.utility.OBError;
import org.openbravo.scheduling.ProcessBundle;
import org.openbravo.service.db.DalBaseProcess;
import org.openbravo.service.db.DalConnectionProvider;
/**
*
* @author S.A. Mateen
*/
public class RCPR_PreventiveOrderMaintenance extends DalBaseProcess {
@Override
protected void doExecute(ProcessBundle bundle) throws Exception {
String recordId = bundle.getParams().get("Rcpr_Preventivemaintenance_ID").toString();
RCPR_PreventiveMaintenanceOrder task = OBDal.getInstance().get(RCPR_PreventiveMaintenanceOrder.class, recordId);
for (RCPR_Task line : task.getRCPRTaskList()) {
String strMachineId = line.getMachine().getId();
String strMaintenanceTask = line.getMaintenanaceTask().getId();
boolean isExtension = line.isExtension();
int noOfDays = line.getNoOfDays().intValue();
String department = line.getDepartment();
if (isExtension) {
String strLastPmDoneDate = getLastPmDoneDate(strMachineId, strMaintenanceTask, department);
String strNxtPMDoneDate = sumNoOfDaysNextPmDone(strLastPmDoneDate, noOfDays);
if (StringUtils.equalsIgnoreCase("Electrical", line.getDepartment())) {
RCPRPreventiveOrderMaintenanceData.updateElectrical(new DalConnectionProvider(), strNxtPMDoneDate, strMachineId, strMaintenanceTask);
} else {
RCPRPreventiveOrderMaintenanceData.updateMechanical(new DalConnectionProvider(), strNxtPMDoneDate, strMachineId, strMaintenanceTask);
}
} else {
String fromDate = getFormattedDate(line.getPreventiveMaintenanceOrder().getCreationDate());
String endDate = getSumLastDateWithFrequency(fromDate, strMachineId, strMaintenanceTask, department);
if (StringUtils.equalsIgnoreCase("Electrical", line.getDepartment())) {
RCPRPreventiveOrderMaintenanceData.updateElectrical2(new DalConnectionProvider(), fromDate, endDate, strMachineId, strMaintenanceTask);
} else {
RCPRPreventiveOrderMaintenanceData.updateMechanical2(new DalConnectionProvider(), fromDate, endDate, strMachineId, strMaintenanceTask);
}
}
//line.setProcess(true);
}
task.setProcess(true);
OBError err = new OBError();
err.setType("Success");
err.setTitle("Success");
err.setMessage("Process Completed Successfully");
bundle.setResult(err);
}
private String getLastPmDoneDate(String strMachineId, String strMaintenanceTask, String department) throws ServletException {
if (StringUtils.equalsIgnoreCase("Electrical", department)) {
return RCPRPreventiveOrderMaintenanceData.getElectricalLastDate(new DalConnectionProvider(), strMachineId, strMaintenanceTask);
} else {
return RCPRPreventiveOrderMaintenanceData.getMechanicalLastDate(new DalConnectionProvider(), strMachineId, strMaintenanceTask);
}
}
private String getSumLastDateWithFrequency(String fromDate, String strMachineId, String strMaintenanceTask, String department) throws ServletException, ParseException {
if (StringUtils.equalsIgnoreCase("Electrical", department)) {
// fire querey to RCPR_Machine_EMaintenance
String id = RCPRPreventiveOrderMaintenanceData.getElectricalMaintenanceId(new DalConnectionProvider(), strMachineId, strMaintenanceTask);
RCPR_Machine_ElectricalMaintenance maintenance = OBDal.getInstance().get(RCPR_Machine_ElectricalMaintenance.class, id);
return sumNoOfDaysNextPmDone(fromDate, maintenance.getFrequency().intValue());
} else {
// fire querey to RCPR_Machine_MMaintenance
String id = RCPRPreventiveOrderMaintenanceData.getMechanicalMaintenanceId(new DalConnectionProvider(), strMachineId, strMaintenanceTask);
RCPR_Machine_Mechanical_Maintenance maintenance = OBDal.getInstance().get(RCPR_Machine_Mechanical_Maintenance.class, id);
return sumNoOfDaysNextPmDone(fromDate, maintenance.getFrequency().intValue());
}
}
private String sumNoOfDaysNextPmDone(String nextPMDoneDate, int noOfDays) throws ParseException {
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Date date = df.parse(nextPMDoneDate);
Calendar cal = Calendar.getInstance();
cal.setTime(date);
cal.add(Calendar.DAY_OF_MONTH, (noOfDays));
return df.format(new Date(cal.getTimeInMillis()));
}
private String getFormattedDate(Date creationDate) {
return new SimpleDateFormat("yyyy-MM-dd").format(creationDate).toString();
}
}
| [
"rcss@ubuntu-server.administrator"
] | rcss@ubuntu-server.administrator |
085c7da2016f941db3dccc87114b2b98a7b99e7f | 13200e547eec0d67ff9da9204c72ab26a93f393d | /src/com/google/android/apps/nexuslauncher/DynamicDrawableFactory.java | 68ea0848b3b4d0525e60fe9105baab6a8bfc53bf | [] | no_license | emtee40/DecompiledPixelLauncher | d72d107eaafb42896aa903b9f0f34f5f09f5a15c | fb954b108a7bf3377da5c28fd9a2f22e1b6990ea | refs/heads/master | 2020-04-03T03:18:06.239632 | 2018-01-19T08:49:36 | 2018-01-19T08:49:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 929 | java | //
// Decompiled by Procyon v0.5.30
//
package com.google.android.apps.nexuslauncher;
import android.os.Process;
import com.android.launcher3.FastBitmapDrawable;
import com.android.launcher3.ItemInfo;
import android.graphics.Bitmap;
import android.content.Context;
import com.google.android.apps.nexuslauncher.a.c;
import com.android.launcher3.graphics.DrawableFactory;
public class DynamicDrawableFactory extends DrawableFactory
{
private final c gN;
public DynamicDrawableFactory(final Context context) {
this.gN = new c(context);
}
public FastBitmapDrawable newIcon(final Bitmap bitmap, final ItemInfo itemInfo) {
if (itemInfo != null && itemInfo.itemType == 0 && c.cj.equals((Object)itemInfo.getTargetComponent()) && itemInfo.user.equals((Object)Process.myUserHandle())) {
return this.gN.bN(bitmap);
}
return super.newIcon(bitmap, itemInfo);
}
}
| [
"azaidi@live.nl"
] | azaidi@live.nl |
29cbfdf2d99a44f19a7d1c0d90e505d9582cd09f | 4a10dc8955f9d4479b783d37155c73634f069a79 | /app/src/main/java/com/itislevel/lyl/widget/videorecord/shortvideo/editor/utils/TCEditerUtil.java | d2c7d83d43dbb9178031eb7235b0b77cfe2d0529 | [] | no_license | hyb1234hi/yby1 | 41f2eb123d96f8a55728b11aeaf42271e782cc08 | 5f106784715ee616ea6bb0e93a5ed214ad5b1352 | refs/heads/master | 2020-06-19T10:58:08.674182 | 2018-07-11T11:22:21 | 2018-07-11T11:22:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,045 | java | package com.itislevel.lyl.widget.videorecord.shortvideo.editor.utils;
import android.os.Environment;
import com.itislevel.lyl.utils.TCConstants;
import java.io.File;
import java.text.SimpleDateFormat;
import java.util.Date;
/**
* Created by yuejiaoli on 2017/10/11.
*/
public class TCEditerUtil {
/**
* 生成编辑后输出视频路径
*
* @return
*/
public static String generateVideoPath() {
String outputPath = Environment.getExternalStorageDirectory() + File.separator + TCConstants.DEFAULT_MEDIA_PACK_FOLDER;
File outputFolder = new File(outputPath);
if (!outputFolder.exists()) {
outputFolder.mkdirs();
}
String current = String.valueOf(System.currentTimeMillis() / 1000);
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd_HHmmss");
String time = sdf.format(new Date(Long.valueOf(current + "000")));
String saveFileName = String.format("TXVideo_%s.mp4", time);
return outputFolder + "/" + saveFileName;
}
}
| [
"1363826037@qq.com"
] | 1363826037@qq.com |
1ddcf539918be29d7e3dc0b4a8bdff1885c94016 | a97f1874385d4562adff3800ed617229e2e7b43b | /service-module/form-service/src/main/java/com/liansen/form/resource/FormByteArrayResource.java | aeaa6ba850dadb56d45072d61ffa8759f4d913c0 | [] | no_license | chendingying/liasen-workFlow | 1cb6420a350e79166ea607e561d8e1b16c1499a2 | c25eddd9d716340e4111c652bd6bdbaa0d9c3edc | refs/heads/master | 2020-04-02T08:26:27.142789 | 2018-11-27T07:14:32 | 2018-11-27T07:14:32 | 154,244,786 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,456 | java | package com.liansen.form.resource;
import com.liansen.common.resource.BaseResource;
import com.liansen.form.constant.ErrorConstant;
import com.liansen.form.domain.ByteArray;
import com.liansen.form.repository.ByteArrayRepository;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseStatus;
import org.springframework.web.bind.annotation.RestController;
/**
* @author cdy
* @create 2018/9/12
*/
@Api(description = "表单二进制接口")
@RestController
public class FormByteArrayResource extends BaseResource {
@Autowired
ByteArrayRepository byteArrayRepository;
private ByteArray getFormByteArrayFromRequest(Integer id) {
ByteArray byteArray = byteArrayRepository.findOne(id);
if (byteArray == null) {
exceptionFactory.throwObjectNotFound(ErrorConstant.FORM_TABLE_NOT_FOUND);
}
return byteArray;
}
@ApiOperation("根据表单Id查看表单二进制文件")
@GetMapping(value = "/form-byteArray/{id}")
@ResponseStatus(value = HttpStatus.OK)
public ByteArray getFormDefinition(@PathVariable Integer id) {
return getFormByteArrayFromRequest(id);
}
}
| [
"chen@dingying.com"
] | chen@dingying.com |
22fc157fd66cb73e73a6ddb33fe17bc501eda0c6 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/31/31_8bb5fda2094b297a1196651a8d362cae6727e008/RPCActivityType/31_8bb5fda2094b297a1196651a8d362cae6727e008_RPCActivityType_t.java | d6ed5825fa758a347920d07ad51bd741ceba1b6d | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,703 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2008-12, Red Hat Middleware LLC, and others contributors as indicated
* by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
* This copyrighted material is made available to anyone wishing to use,
* modify, copy, or redistribute it subject to the terms and conditions
* of the GNU Lesser General Public License, v. 2.1.
* This program is distributed in the hope that it will be useful, but WITHOUT A
* 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,
* v.2.1 along with this distribution; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*/
package org.savara.bam.activity.model.soa;
import java.io.IOException;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import org.savara.bam.activity.model.ActivityType;
/**
* This activity type represents a RPC activity.
*
*/
public abstract class RPCActivityType extends ActivityType implements java.io.Externalizable {
private static final int VERSION = 1;
private String _serviceType=null;
private String _operation=null;
private String _fault=null;
private String _messageType=null;
private String _content=null;
private String _messageId=null;
/**
* The default constructor.
*/
public RPCActivityType() {
}
/**
* The copy constructor.
*
* @param rpc The RPC activity to copy
*/
public RPCActivityType(RPCActivityType rpc) {
_serviceType = rpc._serviceType;
_operation = rpc._operation;
_fault = rpc._fault;
_messageType = rpc._messageType;
_content = rpc._content;
_messageId = rpc._messageId;
}
/**
* This method sets the service type.
*
* @param serviceType The service type
*/
public void setServiceType(String serviceType) {
_serviceType = serviceType;
}
/**
* This method gets the service type.
*
* @return The service type
*/
public String getServiceType() {
return (_serviceType);
}
/**
* This method sets the operation.
*
* @param operation The operation
*/
public void setOperation(String operation) {
_operation = operation;
}
/**
* This method gets the operation.
*
* @return The operation
*/
public String getOperation() {
return (_operation);
}
/**
* This method sets the fault.
*
* @param fault The fault
*/
public void setFault(String fault) {
_fault = fault;
}
/**
* This method gets the fault.
*
* @return The fault
*/
public String getFault() {
return (_fault);
}
/**
* This method sets the message type.
*
* @param mtype The message type
*/
public void setMessageType(String mtype) {
_messageType = mtype;
}
/**
* This method gets the message type.
*
* @return The message type
*/
public String getMessageType() {
return (_messageType);
}
/**
* This method sets the content.
*
* @param content The content
*/
public void setContent(String content) {
_content = content;
}
/**
* This method gets the content.
*
* @return The content
*/
public String getContent() {
return (_content);
}
/**
* This method sets the message id.
*
* @param messageId The message id
*/
public void setMessageId(String messageId) {
_messageId = messageId;
}
/**
* This method gets the message id.
*
* @return The message id
*/
public String getMessageId() {
return (_messageId);
}
/**
* {@inheritDoc}
*/
public String toString() {
return (getClass().getSimpleName()+":"
+" serviceType="+_serviceType
+" operation="+_operation
+" fault="+_fault
+" messageType="+_messageType
+" content="+_content
+" messageId="+_messageId);
}
/**
* {@inheritDoc}
*/
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeInt(VERSION);
out.writeObject(_serviceType);
out.writeObject(_operation);
out.writeObject(_fault);
out.writeObject(_messageType);
out.writeObject(_content);
out.writeObject(_messageId);
}
/**
* {@inheritDoc}
*/
public void readExternal(ObjectInput in) throws IOException,
ClassNotFoundException {
super.readExternal(in);
in.readInt(); // Consume version, as not required for now
_serviceType = (String)in.readObject();
_operation = (String)in.readObject();
_fault = (String)in.readObject();
_messageType = (String)in.readObject();
_content = (String)in.readObject();
_messageId = (String)in.readObject();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
02275fecbbabc2edcb281a65208ef7d4cefa8454 | c1444a67b451aacb7d06f3a753a01620ce9a296f | /common/pixelmon/battles/attacks/statusEffects/Flying.java | 5b537332c011f9266ad1e57012b0d002567c2671 | [] | no_license | patteje479/Pixelmon | 34725bf8913a337e820e89f7d4e86ff783021d52 | c75be461796a644b2ddd4b43c85f45c77be37325 | refs/heads/master | 2021-01-16T18:17:44.444335 | 2012-11-11T02:24:39 | 2012-11-11T02:24:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 767 | java | package pixelmon.battles.attacks.statusEffects;
import java.util.ArrayList;
import pixelmon.battles.attacks.Attack;
import pixelmon.entities.pixelmon.EntityPixelmon;
public class Flying extends StatusEffectBase {
int turnCount;
public Flying() {
super(StatusEffectType.Flying, false, false, true);
}
@Override
public void ApplyEffect(EntityPixelmon user, EntityPixelmon target, ArrayList<String> attackList) {
turnCount=0;
}
@Override
public boolean stopsSwitching() {
return true;
}
@Override
public boolean stopsIncomingAttack(EntityPixelmon user, EntityPixelmon target, Attack a) {
if (!a.attackName.equalsIgnoreCase("Smack Down"))
return true;
return false;
}
@Override
public boolean stopsStatusChange() {
return true;
}
}
| [
"malc.geddes@gmail.com"
] | malc.geddes@gmail.com |
35b4181341bc47ca5ace1b8bde0fd62617c5f784 | 7fa9c6b0fa1d0726ae1cda0199716c811a1ea01b | /Crawler/data/Cattle.java | 36885cfaf6a481840e98f8c8c43d3c5ad6808415 | [] | no_license | NayrozD/DD2476-Project | b0ca75799793d8ced8d4d3ba3c43c79bb84a72c0 | 94dfb3c0a470527b069e2e0fd9ee375787ee5532 | refs/heads/master | 2023-03-18T04:04:59.111664 | 2021-03-10T15:03:07 | 2021-03-10T15:03:07 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 457 | java | 2
https://raw.githubusercontent.com/wangIQD/GoF23/master/GOF23/DesignPattern/src/com/wz/creational/factorymethod/Cattle.java
package com.wz.creational.factorymethod;
/**
* @author 隔壁老王
* @create 2020-04-27 17:17
* @bilibili https://space.bilibili.com/320299990
* @description
*/
//具体产品实现:牛
public class Cattle implements Animal {
@Override
public void show() {
System.out.println("牛在畜牛厂中");
}
} | [
"veronika.cucorova@gmail.com"
] | veronika.cucorova@gmail.com |
2fb6358b0927233829361c253628e4e3ddc8c2da | b0a83731bf1e524cce9bdeaa23ac995a5d1d03bb | /src/main/java/com/github/batkinson/jxlsform/common/XLSForm.java | 0e0dadc5d373cd2aea54ea9cab5719b29a1de05b | [] | no_license | batkinson/jxlsform | ac878f4e43f8a9fa22d89ca83e0bf8352bbb44c3 | 20ed5dffd340fb1f112e0dc33c72eac0d3f241f7 | refs/heads/master | 2020-03-25T08:26:18.214662 | 2018-09-24T18:20:15 | 2018-09-24T18:20:15 | 143,612,328 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,503 | java | package com.github.batkinson.jxlsform.common;
import com.github.batkinson.jxlsform.api.XLSFormException;
import java.util.Optional;
class XLSForm implements com.github.batkinson.jxlsform.api.XLSForm {
private final com.github.batkinson.jxlsform.api.Workbook workbook;
private final Survey survey;
private final Choices choices;
private final Settings settings;
public XLSForm(com.github.batkinson.jxlsform.api.Workbook workbook) {
if (workbook == null) {
throw new XLSFormException("workbook is required");
}
this.workbook = workbook;
survey = new Survey(this,
workbook.getSheet(SURVEY)
.orElseThrow(() -> new XLSFormException("survey sheet is required")));
choices = new Choices(this,
workbook.getSheet(CHOICES)
.orElseThrow(() -> new XLSFormException("choices sheet is required")));
settings = workbook.getSheet(SETTINGS)
.map(sheet -> new Settings(this, sheet))
.orElse(null);
}
@Override
public com.github.batkinson.jxlsform.api.Workbook getWorkbook() {
return workbook;
}
@Override
public Survey getSurvey() {
return survey;
}
@Override
public Choices getChoices() {
return choices;
}
@Override
public Optional<com.github.batkinson.jxlsform.api.Settings> getSettings() {
return Optional.ofNullable(settings);
}
}
| [
"brent.atkinson@gmail.com"
] | brent.atkinson@gmail.com |
aefa9299e6698ba3bc1007064b9b72fb4cb90728 | 47857280bf75b5dd1fdb136ec8c4e28452692a48 | /src/main/java/slimeknights/tconstruct/smeltery/block/BlockFaucet.java | fdfe8b0eb619a144ce4fad455b9a953edb52a55e | [
"CC-BY-3.0",
"CC0-1.0",
"MIT",
"LicenseRef-scancode-public-domain"
] | permissive | Drebelak/TinkersConstruct | a1bfd6506989f787a7b012a3b278f4003bc71085 | d420aed7a4141c469d901868f5f1e068004fab11 | refs/heads/master | 2021-01-18T02:57:13.240263 | 2016-03-14T18:22:45 | 2016-03-14T18:22:45 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,840 | java | package slimeknights.tconstruct.smeltery.block;
import com.google.common.base.Predicate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockContainer;
import net.minecraft.block.material.Material;
import net.minecraft.block.properties.PropertyDirection;
import net.minecraft.block.state.BlockState;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.BlockPos;
import net.minecraft.util.EnumFacing;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
import javax.annotation.Nullable;
import slimeknights.tconstruct.library.TinkerRegistry;
import slimeknights.tconstruct.smeltery.tileentity.TileFaucet;
public class BlockFaucet extends BlockContainer {
// Facing == input, can be any side except bottom, because down always is output direction
public static final PropertyDirection FACING = PropertyDirection.create("facing", new Predicate<EnumFacing>() {
@Override
public boolean apply(@Nullable EnumFacing input) {
return input != EnumFacing.DOWN;
}
});
public BlockFaucet() {
super(Material.rock);
setCreativeTab(TinkerRegistry.tabSmeltery);
setHardness(3F);
setResistance(20F);
setStepSound(soundTypeMetal);
}
@Override
protected BlockState createBlockState() {
return new BlockState(this, FACING);
}
/**
* Convert the given metadata into a BlockState for this Block
*/
public IBlockState getStateFromMeta(int meta) {
if(meta >= EnumFacing.values().length) {
meta = 1;
}
EnumFacing face = EnumFacing.values()[meta];
if(face == EnumFacing.DOWN) {
face = EnumFacing.UP;
}
return this.getDefaultState().withProperty(FACING, face);
}
/**
* Convert the BlockState into the correct metadata value
*/
public int getMetaFromState(IBlockState state) {
return state.getValue(FACING).ordinal();
}
@Override
public boolean onBlockActivated(World worldIn, BlockPos pos, IBlockState state, EntityPlayer playerIn, EnumFacing side, float hitX, float hitY, float hitZ) {
if(playerIn.isSneaking()) {
return false;
}
TileEntity te = worldIn.getTileEntity(pos);
if(te instanceof TileFaucet) {
((TileFaucet) te).activate();
return true;
}
return super.onBlockActivated(worldIn, pos, state, playerIn, side, hitX, hitY, hitZ);
}
/* Redstone */
@Override
public boolean canConnectRedstone(IBlockAccess world, BlockPos pos, EnumFacing side) {
return true;
}
@Override
public void onNeighborBlockChange(World worldIn, BlockPos pos, IBlockState state, Block neighborBlock) {
if(worldIn.isRemote) {
return;
}
TileEntity te = worldIn.getTileEntity(pos);
if(te instanceof TileFaucet) {
((TileFaucet) te).handleRedstone(worldIn.isBlockPowered(pos));
}
}
/* Bounds */
@Override
public void setBlockBoundsBasedOnState(IBlockAccess worldIn, BlockPos pos) {
EnumFacing facing = worldIn.getBlockState(pos).getValue(FACING);
float xMin = 0.25F;
float xMax = 0.75F;
float zMin = 0.25F;
float zMax = 0.75F;
float yMin = 0.25F;
float yMax = 0.625F;
switch(facing) {
case UP:
yMin = 0.625F;
yMax = 1.0F;
break;
case SOUTH:
zMin = 0.625F;
zMax = 1.0F;
break;
case NORTH:
zMax = 0.375F;
zMin = 0F;
break;
case EAST:
xMin = 0.625F;
xMax = 1.0F;
break;
case WEST:
xMax = 0.375F;
xMin = 0F;
break;
}
this.setBlockBounds(xMin, yMin, zMin, xMax, yMax, zMax);
}
@Override
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) {
float xMin = 0.25F;
float xMax = 0.75F;
float zMin = 0.25F;
float zMax = 0.75F;
float yMin = 0.25F;
float yMax = 0.625F;
switch(state.getValue(FACING)) {
case UP:
yMin = 0.625F;
yMax = 1.0F;
break;
case SOUTH:
zMin = 0.625F;
zMax = 1.0F;
break;
case NORTH:
zMax = 0.375F;
zMin = 0F;
break;
case EAST:
xMin = 0.625F;
xMax = 1.0F;
break;
case WEST:
xMax = 0.375F;
xMin = 0F;
break;
}
return AxisAlignedBB.fromBounds(pos.getX() + xMin, pos.getY() + yMin, pos.getZ() + zMin,
pos.getX() + xMax, pos.getY() + yMax, pos.getZ() + zMax);
}
@Override
@SideOnly(Side.CLIENT)
public int getRenderType() {
return 3;
}
@SideOnly(Side.CLIENT)
public boolean shouldSideBeRendered(IBlockAccess worldIn, BlockPos pos, EnumFacing side) {
return true;
}
public boolean isFullCube() {
return false;
}
/**
* Used to determine ambient occlusion and culling when rebuilding chunks for render
*/
public boolean isOpaqueCube() {
return false;
}
@Override
public TileEntity createNewTileEntity(World worldIn, int meta) {
return new TileFaucet();
}
/**
* Called by ItemBlocks just before a block is actually set in the world, to allow for adjustments to the
* IBlockstate
*/
public IBlockState onBlockPlaced(World worldIn, BlockPos pos, EnumFacing facing, float hitX, float hitY, float hitZ, int meta, EntityLivingBase placer) {
EnumFacing enumfacing = facing.getOpposite();
if(enumfacing == EnumFacing.DOWN) {
enumfacing = placer.getHorizontalFacing().getOpposite();
}
return this.getDefaultState().withProperty(FACING, enumfacing);
}
}
| [
"bernhard.bonigl@gmail.com"
] | bernhard.bonigl@gmail.com |
cf2c9abec3bfbf5752f2c7b99640a956850f3d5a | b532f2ccaba302f4e81a559ffbafaf8d2650b703 | /app/src/main/java/com/codingwithmitch/daggerpractice/network/main/MainApi.java | fff76028893d27f7fef406e11e1b01a6cbb16d4b | [] | no_license | hardikpansuria/Dagger-Examples | 2a2fb118788e6ca73b16f730a09716d7184cbb47 | 85cc86965c97a20ebabb03cee4a0933d17ed9dfd | refs/heads/master | 2020-05-15T12:07:49.835825 | 2019-04-11T02:50:25 | 2019-04-11T02:50:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 467 | java | package com.codingwithmitch.daggerpractice.network.main;
import com.codingwithmitch.daggerpractice.models.Post;
import com.codingwithmitch.daggerpractice.models.User;
import java.util.List;
import io.reactivex.Flowable;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
public interface MainApi {
// /posts?userId=1/
@GET("posts")
Flowable<List<Post>> getPostsFromUser(
@Query("userId") int id
);
}
| [
"mitch@tabian.ca"
] | mitch@tabian.ca |
0f0d4e62e493d07d00bca6962527026d0e9f3e15 | 539046c412b2ddf3bfe18dabf1b9f6a54b80b9ea | /src/main/java/com/ltq/jamep/repository/PhysicalDatacenterRepository.java | 52ac182c09b6afdab658eed9c7b82dc2a9797ebb | [] | no_license | nubicula/LTQProvisioner | be41f1717b0f73e4f1f554236f9a2dc2b2200447 | d91f107637842fe157c76552218cb994b51a2c65 | refs/heads/master | 2020-03-22T05:25:37.985929 | 2018-07-04T08:43:23 | 2018-07-04T08:43:23 | 139,564,790 | 0 | 0 | null | 2018-07-04T08:43:24 | 2018-07-03T10:08:09 | Java | UTF-8 | Java | false | false | 394 | java | package com.ltq.jamep.repository;
import com.ltq.jamep.domain.PhysicalDatacenter;
import org.springframework.data.jpa.repository.*;
import org.springframework.stereotype.Repository;
/**
* Spring Data repository for the PhysicalDatacenter entity.
*/
@SuppressWarnings("unused")
@Repository
public interface PhysicalDatacenterRepository extends JpaRepository<PhysicalDatacenter, Long> {
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
04d025086f916aec296f08bdf586da1cccebfb50 | 180e78725121de49801e34de358c32cf7148b0a2 | /dataset/protocol1/yauaa/learning/6359/DefaultANTLRErrorListener.java | 699b6fd1afd8ac12ac8687ca821ed500119d97ea | [] | 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 | 1,699 | java | /*
* Yet Another UserAgent Analyzer
* Copyright (C) 2013-2018 Niels Basjes
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package nl.basjes.parse.useragent.utils;
import org.antlr.v4.runtime.ANTLRErrorListener;
import org.antlr.v4.runtime
.Parser;
import org.antlr.v4.runtime.atn.ATNConfigSet;
import org.antlr.v4.runtime.dfa.DFA;
import java.util.BitSet;
public interface DefaultANTLRErrorListener extends ANTLRErrorListener {
@Override
default void reportAmbiguity(
Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
boolean exact,
BitSet ambigAlts,
ATNConfigSet configs) {
// Ignore this always.
}
@Override
default void reportAttemptingFullContext(
Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
BitSet conflictingAlts,
ATNConfigSet configs) {
// Ignore this always.
}
@Override
default void reportContextSensitivity(
Parser recognizer,
DFA dfa,
int startIndex,
int stopIndex,
int prediction,
ATNConfigSet configs) {
// Ignore this always.
}
}
| [
"bloriot97@gmail.com"
] | bloriot97@gmail.com |
a7099b658953457c19a4fb8025baeed0363b9576 | 13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3 | /crash-reproduction-ws/results/TIME-5b-2-21-Single_Objective_GGA-WeightedSum/org/joda/time/Period_ESTest_scaffolding.java | e16755a9b7db37c334b94308c8faf64e27d3b6f7 | [
"MIT",
"CC-BY-4.0"
] | permissive | STAMP-project/Botsing-basic-block-coverage-application | 6c1095c6be945adc0be2b63bbec44f0014972793 | 80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da | refs/heads/master | 2022-07-28T23:05:55.253779 | 2022-04-20T13:54:11 | 2022-04-20T13:54:11 | 285,771,370 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,456 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Jan 18 06:26:44 UTC 2020
*/
package org.joda.time;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class Period_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.joda.time.Period";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(Period_ESTest_scaffolding.class.getClassLoader() ,
"org.joda.time.DateTimeZone",
"org.joda.time.tz.DateTimeZoneBuilder$Recurrence",
"org.joda.time.DateTimeUtils$MillisProvider",
"org.joda.time.chrono.GJYearOfEraDateTimeField",
"org.joda.time.Seconds",
"org.joda.time.field.RemainderDateTimeField",
"org.joda.time.TestTimeOfDay_Basics$MockInstant",
"org.joda.time.JodaTimePermission",
"org.joda.time.chrono.BasicWeekOfWeekyearDateTimeField",
"org.joda.time.DateTimeFieldType",
"org.joda.time.DateTimeFieldType$StandardDateTimeFieldType",
"org.joda.time.ReadableInterval",
"org.joda.time.chrono.BasicChronology$HalfdayField",
"org.joda.time.chrono.LimitChronology$LimitDateTimeField",
"org.joda.time.tz.DateTimeZoneBuilder$PrecalculatedZone",
"org.joda.time.chrono.BasicChronology$YearInfo",
"org.joda.time.field.UnsupportedDurationField",
"org.joda.time.base.AbstractDateTime",
"org.joda.time.field.SkipUndoDateTimeField",
"org.joda.time.chrono.ISOChronology",
"org.joda.time.field.DelegatedDateTimeField",
"org.joda.time.base.BaseLocal",
"org.joda.time.chrono.BasicChronology",
"org.joda.time.chrono.BasicYearDateTimeField",
"org.joda.time.field.DividedDateTimeField",
"org.joda.time.TestTimeOfDay_Basics",
"org.joda.time.chrono.ZonedChronology",
"org.joda.time.field.BaseDateTimeField",
"org.joda.time.field.ZeroIsMaxDateTimeField",
"org.joda.time.tz.CachedDateTimeZone$Info",
"org.joda.time.Duration",
"org.joda.time.PeriodType",
"org.joda.time.format.PeriodFormatter",
"org.joda.time.field.MillisDurationField",
"org.joda.time.chrono.GJChronology",
"org.joda.time.base.AbstractInstant",
"org.joda.time.chrono.BasicFixedMonthChronology",
"org.joda.time.tz.DateTimeZoneBuilder",
"org.joda.time.field.UnsupportedDateTimeField",
"org.joda.time.field.ScaledDurationField",
"org.joda.time.chrono.ISOYearOfEraDateTimeField",
"org.joda.time.ReadWritablePeriod",
"org.joda.time.field.PreciseDurationDateTimeField",
"org.joda.time.MutablePeriod",
"org.joda.time.base.BasePeriod$1",
"org.joda.time.tz.FixedDateTimeZone",
"org.joda.time.tz.CachedDateTimeZone",
"org.joda.time.field.PreciseDateTimeField",
"org.joda.time.chrono.LimitChronology$LimitException",
"org.joda.time.ReadableDateTime",
"org.joda.time.base.BaseDuration",
"org.joda.time.field.DecoratedDateTimeField",
"org.joda.time.chrono.GJChronology$CutoverField",
"org.joda.time.field.OffsetDateTimeField",
"org.joda.time.chrono.GJMonthOfYearDateTimeField",
"org.joda.time.chrono.BasicWeekyearDateTimeField",
"org.joda.time.Days",
"org.joda.time.DateTimeField",
"org.joda.time.field.FieldUtils",
"org.joda.time.chrono.BasicSingleEraDateTimeField",
"org.joda.time.field.SkipDateTimeField",
"org.joda.time.chrono.LimitChronology",
"org.joda.time.base.AbstractPeriod",
"org.joda.time.ReadableInstant",
"org.joda.time.DateTimeUtils$SystemMillisProvider",
"org.joda.time.chrono.GJDayOfWeekDateTimeField",
"org.joda.time.base.BaseSingleFieldPeriod",
"org.joda.time.IllegalInstantException",
"org.joda.time.IllegalFieldValueException",
"org.joda.time.tz.DefaultNameProvider",
"org.joda.time.tz.Provider",
"org.joda.time.field.ImpreciseDateTimeField$LinkedDurationField",
"org.joda.time.ReadablePeriod",
"org.joda.time.chrono.ZonedChronology$ZonedDateTimeField",
"org.joda.time.chrono.GregorianChronology",
"org.joda.time.chrono.AssembledChronology$Fields",
"org.joda.time.DurationFieldType",
"org.joda.time.tz.NameProvider",
"org.joda.time.chrono.GJChronology$LinkedDurationField",
"org.joda.time.Minutes",
"org.joda.time.chrono.BasicMonthOfYearDateTimeField",
"org.joda.time.base.AbstractPartial",
"org.joda.time.DateTimeUtils",
"org.joda.time.base.BaseDateTime",
"org.joda.time.base.AbstractDuration",
"org.joda.time.Hours",
"org.joda.time.base.BasePeriod",
"org.joda.time.field.DecoratedDurationField",
"org.joda.time.tz.DateTimeZoneBuilder$DSTZone",
"org.joda.time.chrono.AssembledChronology",
"org.joda.time.tz.ZoneInfoProvider",
"org.joda.time.chrono.GJEraDateTimeField",
"org.joda.time.DateTimeZone$1",
"org.joda.time.chrono.BaseChronology",
"org.joda.time.chrono.JulianChronology",
"org.joda.time.field.ImpreciseDateTimeField",
"org.joda.time.chrono.CopticChronology",
"org.joda.time.field.PreciseDurationField",
"org.joda.time.Period",
"org.joda.time.tz.DateTimeZoneBuilder$OfYear",
"org.joda.time.ReadableDuration",
"org.joda.time.chrono.BasicGJChronology",
"org.joda.time.DurationField",
"org.joda.time.Weeks",
"org.joda.time.Chronology",
"org.joda.time.DateTime",
"org.joda.time.LocalDate",
"org.joda.time.MockPartial",
"org.joda.time.chrono.BasicDayOfMonthDateTimeField",
"org.joda.time.chrono.ZonedChronology$ZonedDurationField",
"org.joda.time.Instant",
"org.joda.time.ReadablePartial",
"org.joda.time.chrono.LimitChronology$LimitDurationField",
"org.joda.time.DurationFieldType$StandardDurationFieldType",
"org.joda.time.chrono.BasicDayOfYearDateTimeField",
"org.joda.time.chrono.GJChronology$ImpreciseCutoverField",
"org.joda.time.field.BaseDurationField",
"org.joda.time.chrono.BuddhistChronology"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
de22d20e2d9fbd5458e4b95b673484181828e817 | d8a56f6e10c32f5c644bba969b12f9cf330caadd | /tims/src/java/com/hashthrims/clients/web/vaadin/views/employeelists/demographics/views/MaritalStatusViewPage.java | 350208d6bb3d1ad9129b077325cd38563dd43900 | [] | no_license | jackba/tims | c2589bcaa3998e51972cde2cec23f0661091c108 | 0ecb2bbafef59c1c6921ca09a1ceeb7358730853 | refs/heads/master | 2021-01-10T20:19:02.709255 | 2013-03-22T09:39:49 | 2013-03-22T09:39:49 | 33,372,881 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,886 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.hashthrims.clients.web.vaadin.views.employeelists.demographics.views;
import com.hashthrims.clients.web.vaadin.HashThrimsMain;
import com.hashthrims.clients.web.vaadin.data.ClientDataService;
import com.hashthrims.clients.web.vaadin.views.employeelists.EmployeeListMenuView;
import com.hashthrims.clients.web.vaadin.views.employeelists.demographics.forms.MaritalStatusForm;
import com.hashthrims.clients.web.vaadin.views.employeelists.demographics.model.MaritalStatusBean;
import com.hashthrims.clients.web.vaadin.views.employeelists.demographics.table.MaritalStatusTable;
import com.hashthrims.domain.employeelist.MaritalStatusList;
import com.hashthrims.infrastructure.factories.EmployeeFactory;
import com.vaadin.data.Item;
import com.vaadin.data.Property;
import com.vaadin.data.Property.ValueChangeEvent;
import com.vaadin.data.Property.ValueChangeListener;
import com.vaadin.data.util.BeanItem;
import com.vaadin.ui.Alignment;
import com.vaadin.ui.Button;
import com.vaadin.ui.Button.ClickEvent;
import com.vaadin.ui.Button.ClickListener;
import com.vaadin.ui.Form;
import com.vaadin.ui.VerticalLayout;
/**
*
* @author boniface
*/
public class MaritalStatusViewPage extends VerticalLayout implements
ClickListener, ValueChangeListener {
private HashThrimsMain main;
private Form form;
private MaritalStatusForm cf;
private ClientDataService data = new ClientDataService();
private MaritalStatusTable table;
public MaritalStatusViewPage(HashThrimsMain app) {
main = app;
setSizeFull();
cf = new MaritalStatusForm();
form = cf.createMaritalStatusFrom();
// Add Listeners
cf.getSave().addListener((ClickListener) this);
cf.getEdit().addListener((ClickListener) this);
cf.getCancel().addListener((ClickListener) this);
cf.getDelete().addListener((ClickListener) this);
cf.getUpdate().addListener((ClickListener) this);
MaritalStatusBean bean = new MaritalStatusBean();
BeanItem item = new BeanItem(bean);
form.setItemDataSource(item);
form.setVisibleItemProperties(cf.orderList());
addComponent(form);
setComponentAlignment(form, Alignment.TOP_CENTER);
table = new MaritalStatusTable(main);
table.addListener((ValueChangeListener) this);
addComponent(table);
}
@Override
public void valueChange(ValueChangeEvent event) {
Property property = event.getProperty();
if (property == table) {
Item record = table.getItem(table.getValue());
MaritalStatusBean maritalStatus = new MaritalStatusBean();
maritalStatus.setStatus(record.getItemProperty("Marital Status").toString());
maritalStatus.setMaritalStatusId(new Long(table.getValue().toString()));
if (maritalStatus != form.getItemDataSource()) {
BeanItem item = new BeanItem(maritalStatus);
form.setItemDataSource(item);
// BUG enabling this Disables form.setVisibleItemProperties(cf.orderList());
form.setReadOnly(true);
//Buttons Behaviou
cf.getSave().setVisible(false);
cf.getEdit().setVisible(true);
cf.getCancel().setVisible(true);
cf.getDelete().setVisible(true);
cf.getUpdate().setVisible(false);
}
}
}
@Override
public void buttonClick(ClickEvent event) {
final Button source = event.getButton();
if (source == cf.getSave()) {
saveNewMaritalStatus(form);
EmployeeListMenuView.demoSate = "MARITAL STATUS";
main.mainView.setSecondComponent(new EmployeeListMenuView(main, EmployeeListMenuView.demoSate));
} else if (source == cf.getEdit()) {
form.setReadOnly(false);
cf.getSave().setVisible(false);
cf.getEdit().setVisible(false);
cf.getCancel().setVisible(true);
cf.getDelete().setVisible(false);
cf.getUpdate().setVisible(true);
} else if (source == cf.getCancel()) {
main.mainView.setSecondComponent(new EmployeeListMenuView(main, EmployeeListMenuView.demoSate));
} else if (source == cf.getUpdate()) {
saveEditedMaritalStatus(form);
main.mainView.setSecondComponent(new EmployeeListMenuView(main, EmployeeListMenuView.demoSate));
} else if (source == cf.getDelete()) {
deleteMaritalStatus(form);
main.mainView.setSecondComponent(new EmployeeListMenuView(main, EmployeeListMenuView.demoSate));
}
}
public void saveNewMaritalStatus(Form form) {
EmployeeFactory factory = data.getEmployeeFactory();
String status = form.getField("status").getValue().toString();
MaritalStatusList m = factory.createMaritalStatusList(status);
data.getMaritalStatusListService().persist(m);
}
public void saveEditedMaritalStatus(Form form) {
EmployeeFactory factory = data.getEmployeeFactory();
String status = form.getField("status").getValue().toString();
Long maritalStatusId = Long.parseLong(form.getField("maritalStatusId").getValue().toString());
MaritalStatusList c = factory.updatedMaritalStatusList(status, maritalStatusId);
data.getMaritalStatusListService().merge(c);
}
public void deleteMaritalStatus(Form form) {
EmployeeFactory factory = data.getEmployeeFactory();
Long maritalStatusId = Long.parseLong(form.getField("maritalStatusId").getValue().toString());
MaritalStatusList c = factory.loadMaritalStatusList(maritalStatusId);
data.getMaritalStatusListService().remove(c);
}
}
| [
"boniface.kabaso@gmail.com@8b2e65b4-2dce-a24f-2858-670329bbfff1"
] | boniface.kabaso@gmail.com@8b2e65b4-2dce-a24f-2858-670329bbfff1 |
9c26415eccfdfb72ae5d7dbc93b38c5b4a2a1c79 | fb4e73b936ed10af52e7e971b7a0a39a805a86a9 | /src/main/java/com/angkorteam/fintech/pages/client/client/ClientUndoTransferPage.java | 171c10eaf3f20c64d6639c36f25453235e42c172 | [
"Apache-2.0"
] | permissive | Nkengnji/fintech | c82b67eea16d4fcc3d8aa6beb99b0fa6b943077d | 84131d2fdf1d9e8dd55f5d22c65da45009b11859 | refs/heads/master | 2023-04-30T16:41:59.851714 | 2018-06-06T14:03:38 | 2018-06-06T14:03:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,361 | java | package com.angkorteam.fintech.pages.client.client;
import java.util.List;
import java.util.Map;
import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.wicket.markup.html.form.TextArea;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.model.IModel;
import org.apache.wicket.model.Model;
import org.apache.wicket.model.PropertyModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import com.angkorteam.fintech.Page;
import com.angkorteam.fintech.Session;
import com.angkorteam.fintech.ddl.MClient;
import com.angkorteam.fintech.dto.Function;
import com.angkorteam.fintech.dto.builder.client.client.ClientUndoTransferBuilder;
import com.angkorteam.fintech.helper.ClientHelper;
import com.angkorteam.fintech.layout.Size;
import com.angkorteam.fintech.layout.UIBlock;
import com.angkorteam.fintech.layout.UIContainer;
import com.angkorteam.fintech.layout.UIRow;
import com.angkorteam.framework.SpringBean;
import com.angkorteam.framework.jdbc.SelectQuery;
import com.angkorteam.framework.models.PageBreadcrumb;
import com.angkorteam.framework.spring.JdbcNamed;
import com.angkorteam.framework.wicket.markup.html.form.Button;
import com.angkorteam.framework.wicket.markup.html.form.Form;
import com.google.common.collect.Lists;
import io.github.openunirest.http.JsonNode;
@AuthorizeInstantiation(Function.ALL_FUNCTION)
public class ClientUndoTransferPage extends Page {
protected String clientId;
protected String clientDisplayName;
protected Form<Void> form;
protected Button saveButton;
protected BookmarkablePageLink<Void> closeLink;
protected UIRow row1;
protected UIBlock noteBlock;
protected UIContainer noteIContainer;
protected String noteValue;
protected TextArea<String> noteField;
protected UIBlock row1Block1;
@Override
protected void initComponent() {
PageParameters parameters = new PageParameters();
parameters.add("clientId", this.clientId);
this.form = new Form<>("form");
add(this.form);
this.saveButton = new Button("saveButton");
this.saveButton.setOnSubmit(this::saveButtonSubmit);
this.form.add(this.saveButton);
this.closeLink = new BookmarkablePageLink<>("closeLink", ClientPreviewPage.class, parameters);
this.form.add(this.closeLink);
this.row1 = UIRow.newUIRow("row1", this.form);
this.noteBlock = this.row1.newUIBlock("noteBlock", Size.Six_6);
this.noteIContainer = this.noteBlock.newUIContainer("noteIContainer");
this.noteField = new TextArea<>("noteField", new PropertyModel<>(this, "noteValue"));
this.noteIContainer.add(this.noteField);
this.noteIContainer.newFeedback("noteFeedback", this.noteField);
this.row1Block1 = this.row1.newUIBlock("row1Block1", Size.Six_6);
}
@Override
protected void configureMetaData() {
this.noteField.setLabel(Model.of("Note"));
}
@Override
protected void initData() {
this.clientId = getPageParameters().get("clientId").toString();
JdbcNamed named = SpringBean.getBean(JdbcNamed.class);
SelectQuery selectQuery = null;
selectQuery = new SelectQuery(MClient.NAME);
selectQuery.addField(MClient.Field.DISPLAY_NAME);
selectQuery.addWhere(MClient.Field.ID + " = :" + MClient.Field.ID, this.clientId);
Map<String, Object> clientObject = named.queryForMap(selectQuery.toSQL(), selectQuery.getParam());
this.clientDisplayName = (String) clientObject.get("display_name");
}
@Override
public IModel<List<PageBreadcrumb>> buildPageBreadcrumb() {
List<PageBreadcrumb> BREADCRUMB = Lists.newArrayList();
{
PageBreadcrumb breadcrumb = new PageBreadcrumb();
breadcrumb.setLabel("Clients");
BREADCRUMB.add(breadcrumb);
}
{
PageBreadcrumb breadcrumb = new PageBreadcrumb();
breadcrumb.setLabel("Clients");
breadcrumb.setPage(ClientBrowsePage.class);
BREADCRUMB.add(breadcrumb);
}
{
PageParameters parameters = new PageParameters();
PageBreadcrumb breadcrumb = new PageBreadcrumb();
parameters.add("clientId", this.clientId);
breadcrumb.setLabel(this.clientDisplayName);
breadcrumb.setPage(ClientPreviewPage.class);
breadcrumb.setParameters(parameters);
BREADCRUMB.add(breadcrumb);
}
{
PageBreadcrumb breadcrumb = new PageBreadcrumb();
breadcrumb.setLabel("Undo Transfer");
BREADCRUMB.add(breadcrumb);
}
return Model.ofList(BREADCRUMB);
}
protected void saveButtonSubmit(Button button) {
ClientUndoTransferBuilder builder = new ClientUndoTransferBuilder();
builder.withId(this.clientId);
builder.withNote(this.noteValue);
JsonNode node = ClientHelper.undoTransferClient((Session) getSession(), builder.build());
if (reportError(node)) {
return;
}
PageParameters parameters = new PageParameters();
parameters.add("clientId", this.clientId);
setResponsePage(ClientPreviewPage.class, parameters);
}
}
| [
"pkayjava@gmail.com"
] | pkayjava@gmail.com |
95e58962eaace5a4917ce11e304802f14d5e3264 | b9861a0fc815b77551d81010fa890ef44e9ba1cc | /common/src/main/java/test/JunitTest/BaseDAOTEST.java | 5638e3266e67ae9ec2432ebc50b784c357ceb2e7 | [] | no_license | happyjianguo/hwp | 6dbc5223bb19534ac9d61b3eae8009038be4e1aa | 6bf80e34f3363f48af039e92931fbf3c22daae50 | refs/heads/master | 2022-12-01T01:57:04.680195 | 2020-08-09T00:20:00 | 2020-08-09T00:20:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 871 | java | package test.JunitTest;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
*
*/
public class BaseDAOTEST {
ClassPathXmlApplicationContext context = null;
// 初始化系统环境
public BaseDAOTEST() {
context = new ClassPathXmlApplicationContext(new String[]{"classpath:config/spring/applicationContext*.xml"});
// obj = context.getBean("sqlSessionFactoryBean");
System.out.println(context);
}
public static void main(String[] args) {
BaseDAOTEST test = new BaseDAOTEST();
// ProductFundService
// productfundservice=(ProductFundService)test.getBean("ProductFundService");
// System.out.println(productfundservice);
// sys
}
// 返回需要的bean
public Object getBean(String beanName) {
return context.getBean(beanName);
}
}
| [
"weiliejun@163.com"
] | weiliejun@163.com |
f103c7c87a7f0a9c2835e4bef20c5863024e885c | fa1408365e2e3f372aa61e7d1e5ea5afcd652199 | /src/testcases/CWE191_Integer_Underflow/s03/CWE191_Integer_Underflow__long_rand_multiply_66b.java | 9a4dfbfcfbc71a85031ef6f0992b6bd62a4937a5 | [] | no_license | bqcuong/Juliet-Test-Case | 31e9c89c27bf54a07b7ba547eddd029287b2e191 | e770f1c3969be76fdba5d7760e036f9ba060957d | refs/heads/master | 2020-07-17T14:51:49.610703 | 2019-09-03T16:22:58 | 2019-09-03T16:22:58 | 206,039,578 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 2,299 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE191_Integer_Underflow__long_rand_multiply_66b.java
Label Definition File: CWE191_Integer_Underflow.label.xml
Template File: sources-sinks-66b.tmpl.java
*/
/*
* @description
* CWE: 191 Integer Underflow
* BadSource: rand Set data to result of rand()
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: multiply
* GoodSink: Ensure there will not be an underflow before multiplying data by 2
* BadSink : If data is negative, multiply by 2, which can cause an underflow
* Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package
*
* */
package testcases.CWE191_Integer_Underflow.s03;
import testcasesupport.*;
public class CWE191_Integer_Underflow__long_rand_multiply_66b
{
public void badSink(long dataArray[] ) throws Throwable
{
long data = dataArray[2];
if(data < 0) /* ensure we won't have an overflow */
{
/* POTENTIAL FLAW: if (data * 2) < Long.MIN_VALUE, this will underflow */
long result = (long)(data * 2);
IO.writeLine("result: " + result);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(long dataArray[] ) throws Throwable
{
long data = dataArray[2];
if(data < 0) /* ensure we won't have an overflow */
{
/* POTENTIAL FLAW: if (data * 2) < Long.MIN_VALUE, this will underflow */
long result = (long)(data * 2);
IO.writeLine("result: " + result);
}
}
/* goodB2G() - use badsource and goodsink */
public void goodB2GSink(long dataArray[] ) throws Throwable
{
long data = dataArray[2];
if(data < 0) /* ensure we won't have an overflow */
{
/* FIX: Add a check to prevent an underflow from occurring */
if (data > (Long.MIN_VALUE/2))
{
long result = (long)(data * 2);
IO.writeLine("result: " + result);
}
else
{
IO.writeLine("data value is too small to perform multiplication.");
}
}
}
}
| [
"bqcuong2212@gmail.com"
] | bqcuong2212@gmail.com |
4febce39a8dbb083b752f997df0f610b7bd40554 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/9/9_4ad083a848aa2438b50ed9deb9cec8c4a3f94b45/MoveMetaModule/9_4ad083a848aa2438b50ed9deb9cec8c4a3f94b45_MoveMetaModule_s.java | a85b9bae3978b56f19166b91a45f1d435494ceeb | [] | 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,085 | java | /*
* This file is part of the DITA Open Toolkit project hosted on
* Sourceforge.net. See the accompanying license.txt file for
* applicable licenses.
*/
/*
* (c) Copyright IBM Corp. 2004, 2005 All Rights Reserved.
*/
package org.dita.dost.module;
import static org.dita.dost.util.Constants.*;
import java.io.File;
import java.io.IOException;
import java.util.Hashtable;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.Set;
import org.w3c.dom.Element;
import org.dita.dost.exception.DITAOTException;
import org.dita.dost.log.DITAOTLogger;
import org.dita.dost.log.MessageUtils;
import org.dita.dost.pipeline.AbstractPipelineInput;
import org.dita.dost.pipeline.AbstractPipelineOutput;
import org.dita.dost.reader.MapMetaReader;
import org.dita.dost.util.FileUtils;
import org.dita.dost.util.Job;
import org.dita.dost.writer.DitaMapMetaWriter;
import org.dita.dost.writer.DitaMetaWriter;
/**
* MoveMetaModule implement the move index step in preprocess. It reads the index
* information from ditamap file and move these information to different
* corresponding dita topic file.
*
* @author Zhang, Yuan Peng
*/
final class MoveMetaModule implements AbstractPipelineModule {
private final ContentImpl content;
private DITAOTLogger logger;
/**
* Default constructor of MoveMetaModule class.
*/
public MoveMetaModule() {
super();
content = new ContentImpl();
}
public void setLogger(final DITAOTLogger logger) {
this.logger = logger;
}
/**
* Entry point of MoveMetaModule.
*
* @param input Input parameters and resources.
* @return null
* @throws DITAOTException exception
*/
public AbstractPipelineOutput execute(final AbstractPipelineInput input) throws DITAOTException {
if (logger == null) {
throw new IllegalStateException("Logger not set");
}
final File tempDir = new File(input.getAttribute(ANT_INVOKER_PARAM_TEMPDIR));
if (!tempDir.isAbsolute()) {
throw new IllegalArgumentException("Temporary directory " + tempDir + " must be absolute");
}
Job job = null;
try{
job = new Job(tempDir);
} catch (final IOException e) {
throw new DITAOTException(e);
}
final MapMetaReader metaReader = new MapMetaReader();
metaReader.setLogger(logger);
final Set<String> fullditamaplist = job.getSet(FULL_DITAMAP_LIST);
for (String mapFile: fullditamaplist) {
mapFile = new File(tempDir, mapFile).getAbsolutePath();
logger.logInfo("Reading " + mapFile);
//FIXME: this reader gets the parent path of input file
metaReader.read(mapFile);
final File oldMap = new File(mapFile);
final File newMap = new File(mapFile+".temp");
if (newMap.exists()) {
if (!oldMap.delete()) {
final Properties p = new Properties();
p.put("%1", oldMap.getPath());
p.put("%2", newMap.getAbsolutePath()+".chunk");
logger.logError(MessageUtils.getMessage("DOTJ009E", p).toString());
}
if (!newMap.renameTo(oldMap)) {
final Properties p = new Properties();
p.put("%1", oldMap.getPath());
p.put("%2", newMap.getAbsolutePath()+".chunk");
logger.logError(MessageUtils.getMessage("DOTJ009E", p).toString());
}
}
}
final Map<String, Hashtable<String, Element>> mapSet = metaReader.getMapping();;
//process map first
final DitaMapMetaWriter mapInserter = new DitaMapMetaWriter();
mapInserter.setLogger(logger);
for (final Entry<String, Hashtable<String, Element>> entry: mapSet.entrySet()) {
String targetFileName = entry.getKey();
targetFileName = targetFileName.indexOf(SHARP) != -1
? targetFileName.substring(0, targetFileName.indexOf(SHARP))
: targetFileName;
if (targetFileName.endsWith(FILE_EXTENSION_DITAMAP )) {
content.setValue(entry.getValue());
mapInserter.setContent(content);
if (FileUtils.fileExists(entry.getKey())) {
logger.logInfo("Processing " + entry.getKey());
mapInserter.write(entry.getKey());
} else {
logger.logError("File " + entry.getKey() + " does not exist");
}
}
}
//process topic
final DitaMetaWriter topicInserter = new DitaMetaWriter();
topicInserter.setLogger(logger);
for (final Map.Entry<String, Hashtable<String, Element>> entry: mapSet.entrySet()) {
String targetFileName = entry.getKey();
targetFileName = targetFileName.indexOf(SHARP) != -1
? targetFileName.substring(0, targetFileName.indexOf(SHARP))
: targetFileName;
if (targetFileName.endsWith(FILE_EXTENSION_DITA) || targetFileName.endsWith(FILE_EXTENSION_XML)) {
content.setValue(entry.getValue());
topicInserter.setContent(content);
if (FileUtils.fileExists(entry.getKey())) {
logger.logInfo("Processing " + entry.getKey());
topicInserter.write(entry.getKey());
} else {
logger.logError("File " + entry.getKey() + " does not exist");
}
}
}
return null;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
64a98573f43f03a7d5524b119da4976e5b58f1d2 | 871d4dad5345945adcb8dd2637c68eed279d4ae6 | /lib/src/main/java/org/scorpion/calc/montecarlo/PathGenerator.java | a35776d943481fca560e2dc672431a0ad69bdf87 | [] | no_license | ScorpionQuant/Scorpio | e03523d67ca9bf5ff4d8aa9b3fd834a753b0fd25 | cc80e080dc45d2aadc0a3fed20cc11cebc67b92e | refs/heads/master | 2021-09-13T17:15:37.418590 | 2017-10-28T15:48:04 | 2017-10-28T17:04:09 | 105,622,441 | 1 | 7 | null | 2018-04-29T02:03:55 | 2017-10-03T06:53:53 | Java | UTF-8 | Java | false | false | 153 | java | package org.scorpion.calc.montecarlo;
import java.util.List;
public interface PathGenerator {
void generateOneBrownianPath(List<Double> path);
}
| [
"shohokh@gmail.com"
] | shohokh@gmail.com |
23057584007f29cb0bf6bc9ac5929fb4f8f0269e | 812da3490c5e9d5f486c3c864e9a2e069e4d6685 | /src/main/java/io/github/antalpeti/primefaces/showcase/view/misc/CaptchaView.java | f8bbc3d6b7d51c6136a74b6623f1efbbf4f9da72 | [] | no_license | charlyborwn/primefaces-showcase | d4853390849411aecb9fe8780545f0c3591aba38 | bc8b3f432dce88e88931b6668a36ad7d77256142 | refs/heads/master | 2021-01-16T00:28:52.790372 | 2017-01-09T22:39:30 | 2017-01-09T22:39:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 448 | java | package io.github.antalpeti.primefaces.showcase.view.misc;
import javax.faces.application.FacesMessage;
import javax.faces.bean.ManagedBean;
import javax.faces.context.FacesContext;
@ManagedBean(name = "miscCaptchaView")
public class CaptchaView {
public void submit() {
FacesMessage msg = new FacesMessage(FacesMessage.SEVERITY_INFO, "Correct", "Correct");
FacesContext.getCurrentInstance().addMessage(null, msg);
}
}
| [
"antalpeti@users.noreply.github.com"
] | antalpeti@users.noreply.github.com |
75e600c30f6df25d377c93446329c1f3573ed8ca | c43cfbfe0b7cdd6fd7db897a90c445592f2938ed | /dist/gameserver/data/scripts/quests/_10312_AbandonedGodsCreature.java | fdbf8f22a1e7f1fab2d9fc86f735a04eff302e52 | [] | no_license | baxadur/ertheia | 8485d4393d5090f9490175a6e2b843acfc4abdf4 | 0134e99e46dd30d3cf7a1dab4da7d90ef86dfd28 | refs/heads/master | 2020-12-05T13:39:47.747168 | 2014-12-22T05:08:11 | 2014-12-22T05:08:11 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,603 | java | package quests;
import l2s.gameserver.model.Player;
import l2s.gameserver.model.instances.NpcInstance;
import l2s.gameserver.model.quest.Quest;
import l2s.gameserver.model.quest.QuestState;
import l2s.gameserver.scripts.ScriptFile;
public class _10312_AbandonedGodsCreature extends Quest implements ScriptFile
{
public static final String A_LIST = "a_list";
//npc
private static final int GOFINA = 33031;
@Override
public void onLoad()
{}
@Override
public void onReload()
{}
@Override
public void onShutdown()
{}
public _10312_AbandonedGodsCreature()
{
super(true);
addStartNpc(GOFINA);
addTalkId(GOFINA);
addLevelCheck(90);
addQuestCompletedCheck(_10310_CreationOfTwistedSpiral.class);
addKillNpcWithLog(1, A_LIST, 1, 25866);
}
@Override
public String onEvent(String event, QuestState st, NpcInstance npc)
{
Player player = st.getPlayer();
String htmltext = event;
if(event.equalsIgnoreCase("33031-5.htm"))
{
st.setCond(1);
st.setState(STARTED);
st.playSound(SOUND_ACCEPT);
}
if(event.startsWith("give"))
{
st.addExpAndSp(46847289, 20739487);
st.playSound(SOUND_FINISH);
st.exitCurrentQuest(false);
if(event.equalsIgnoreCase("givegiants"))
{
st.giveItems(19305, 1);
st.giveItems(19306, 1);
st.giveItems(19307, 1);
st.giveItems(19308, 1);
return "33031-9.htm";
}
if(event.equalsIgnoreCase("givescrolls"))
{
st.giveItems(17527, 2);
return "33031-10.htm";
}
if(event.equalsIgnoreCase("givesacks"))
{
st.giveItems(34861, 2);
return "33031-11.htm";
}
}
return event;
}
@Override
public String onTalk(NpcInstance npc, QuestState st)
{
Player player = st.getPlayer();
int npcId = npc.getNpcId();
int state = st.getState();
int cond = st.getCond();
if(state == COMPLETED)
return "33031-comp.htm";
if(st.getPlayer().getLevel() < 90)
return "33031-lvl.htm";
QuestState qs = st.getPlayer().getQuestState(_10310_CreationOfTwistedSpiral.class);
if(qs == null || !qs.isCompleted())
return "33031-lvl.htm";
if(npcId == GOFINA)
{
if(cond == 0)
return "33031.htm";
else if(cond == 1)
return "33031-6.htm";
else if(cond == 2)
return "33031-8.htm";
}
return "noquest";
}
@Override
public String onKill(NpcInstance npc, QuestState qs)
{
if(qs.getCond() != 1)
return null;
if(updateKill(npc, qs))
{
qs.unset(A_LIST);
qs.setCond(2);
}
return null;
}
} | [
"namlehong@gmail.com"
] | namlehong@gmail.com |
215483e419fce320741b2e1cf912517247ea700d | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a171/A171471.java | fe1175049ffb8498bc51aec0190cf3742745c2c9 | [] | 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 | 486 | java | package irvine.oeis.a171;
// Generated by gen_linrec.pl - DO NOT EDIT here!
import irvine.oeis.LinearRecurrence;
/**
* A171471 <code>a(n) = 6*a(n-1)-8*a(n-2)-9</code> for <code>n > 2; a(0) = 35, a(1) = 225, a(2) = 837</code>.
* @author Georg Fischer
*/
public class A171471 extends LinearRecurrence {
/** Construct the sequence. */
public A171471() {
super(new long[] {8L, -14L, 7L}, new long[] {225L, 837L, 3213L}, new long[] {35L});
} // constructor()
} // A171471
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
cc2222372fde76a21afcbc7711c37348ed3197d3 | de446b31e18cf4b0ca602fedd96c2171ef232059 | /src/main/java/com/huawei/cloudcampus/api/model/SiteStationStatisticInfo.java | 653d8720cb7f1b4a093f6e803a9f919aa5177363 | [] | no_license | qqfbleach/cloud-campus-sdk | c2b79d194e499704b959c1f4354f9b05ff010918 | 3f0a17edd852441013696fe2ddb7997c4e248808 | refs/heads/master | 2022-11-24T01:37:07.757152 | 2020-02-18T12:08:56 | 2020-02-18T12:08:56 | 238,686,821 | 0 | 0 | null | 2022-11-16T09:23:44 | 2020-02-06T12:43:50 | Java | UTF-8 | Java | false | false | 4,319 | java | /*
* 设备基础性能数据信息查询
* · 查询设备网络速率历史数据 · 查询站点维度TopN设备或者全部设备的上行流量、下行流量 · 查询站点维度设备连接终端数历史数据 · 查询单设备连接终端数历史数据 · 查询租户维度下设备状态历史数据 · 查询基于站点的站点健康度和设备健康度 · 查询站点下TOP N SSID流量和最近在线用户数
*
* OpenAPI spec version: 1.0.1
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package com.huawei.cloudcampus.api.model;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* 站点内设备连接终端数信息。
*/
@ApiModel(description = "站点内设备连接终端数信息。")
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaSdnClientCodegen", date = "2019-12-17T15:18:47.511+08:00")
public class SiteStationStatisticInfo {
@SerializedName("timestamp")
private Long timestamp = null;
@SerializedName("user24G")
private Integer user24G = null;
@SerializedName("user5G")
private Integer user5G = null;
public SiteStationStatisticInfo timestamp(Long timestamp) {
this.timestamp = timestamp;
return this;
}
/**
* 格林威治时间。
* minimum: 0
* maximum: 2147483647
* return timestamp
**/
@ApiModelProperty(value = "格林威治时间。")
public Long getTimestamp() {
return timestamp;
}
/**
* 格林威治时间。
* minimum: 0
* maximum: 2147483647
* Param timestamp
**/
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public SiteStationStatisticInfo user24G(Integer user24G) {
this.user24G = user24G;
return this;
}
/**
* 2.4G用户数量。
* minimum: 0
* maximum: 2147483647
* return user24G
**/
@ApiModelProperty(value = "2.4G用户数量。")
public Integer getUser24G() {
return user24G;
}
/**
* 2.4G用户数量。
* minimum: 0
* maximum: 2147483647
* Param user24G
**/
public void setUser24G(Integer user24G) {
this.user24G = user24G;
}
public SiteStationStatisticInfo user5G(Integer user5G) {
this.user5G = user5G;
return this;
}
/**
* 5G用户数量。
* minimum: 0
* maximum: 2147483647
* return user5G
**/
@ApiModelProperty(value = "5G用户数量。")
public Integer getUser5G() {
return user5G;
}
/**
* 5G用户数量。
* minimum: 0
* maximum: 2147483647
* Param user5G
**/
public void setUser5G(Integer user5G) {
this.user5G = user5G;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
SiteStationStatisticInfo siteStationStatisticInfo = (SiteStationStatisticInfo) o;
return Objects.equals(this.timestamp, siteStationStatisticInfo.timestamp) &&
Objects.equals(this.user24G, siteStationStatisticInfo.user24G) &&
Objects.equals(this.user5G, siteStationStatisticInfo.user5G);
}
@Override
public int hashCode() {
return Objects.hash(timestamp, user24G, user5G);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class SiteStationStatisticInfo {\n");
sb.append(" timestamp: ").append(toIndentedString(timestamp)).append("\n");
sb.append(" user24G: ").append(toIndentedString(user24G)).append("\n");
sb.append(" user5G: ").append(toIndentedString(user5G)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"qianqifeng@hotmail.com"
] | qianqifeng@hotmail.com |
e0486de6235630a91d1183748257d9bbe5652a99 | 2905e6745a67004580aa70a3fa246aa47c0eee97 | /netscript/src/jprime/gen/ProbeSessionAlias.java | 04b1b3be98e0292da8ed4d58bb2ab7b484c058ee | [] | no_license | summonersRift/primogeni | 32cbf949f62e6442d0748258dfdff2dd63199a3b | 763cf746dcd7c9c4d3d20d328899cb96efe6da69 | refs/heads/master | 2020-12-25T00:08:58.727433 | 2015-01-30T18:13:36 | 2015-01-30T18:13:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,013 | java | /* ------------------------- */
/* ------------------------- */
/* WARNING: */
/* THIS FILE IS GENERATED! */
/* DO NOT EDIT! */
/* ------------------------- */
/* ------------------------- */
package jprime.gen;
import jprime.*;
import jprime.ModelNodeRecord;
import jprime.variable.*;
import org.python.core.PyObject;
import org.python.core.Py;
public abstract class ProbeSessionAlias extends jprime.ProtocolSession.ProtocolSessionAlias implements jprime.gen.IProbeSessionAlias {
public ProbeSessionAlias(IModelNode parent, jprime.ProbeSession.IProbeSession referencedNode) {
super(parent,(jprime.ProbeSession.IProbeSession)referencedNode);
}
public ProbeSessionAlias(ModelNodeRecord rec){ super(rec); }
public ProbeSessionAlias(PyObject[] v, String[] s){super(v,s);}
public ProbeSessionAlias(IModelNode parent){
super(parent);
}
/**
* @return the interface which this node implements
*/
public Class<?> getNodeType() {
return jprime.ProbeSession.IProbeSession.class;
}
/**
* @param used by replicas to do a deep copy of the node.
*/
public jprime.ModelNode deepCopy(jprime.ModelNode parent) {
jprime.ProbeSession.ProbeSessionAliasReplica c = new jprime.ProbeSession.ProbeSessionAliasReplica(this.getName(),(IModelNode)parent,this);
return c;
}
public static boolean isSubType(IModelNode n) {
return isSubType(n.getTypeId());
}
public static boolean isSubType(int id) {
switch(id) {
case 1101: //ProbeSessionAlias
case 1213: //ProbeSessionAliasReplica
return true;
}
return false;
}
/* (non-Javadoc)
* @see jprime.IModelNode#getTypeId()
*/
public abstract int getTypeId();
/**
* @return a list of ids of the possible type of attribute this model node type can have
*/
public java.util.ArrayList<Integer> getAttrIds() {
return jprime.gen.ProbeSession.attrIds;
}
/**
* @param kid the child to add
*/
/**
* @param visitor a generic visitor
*/
public abstract void accept(jprime.visitors.IGenericVisitor visitor);
}
| [
"obaida007@gmail.com"
] | obaida007@gmail.com |
708023b693025032b1b56cba502886d1e0045563 | 022fa8dcd2fd2068ecbcc60efc812ff1e1c77594 | /src/test/java/com/learning/jpa/JpaApplicationTests.java | 15d40fab340b40ba56db6c8a45542b074968826d | [] | no_license | Siwoo-Kim/hibernate | c95e491f3d44590d1054800a9881dae8c535f6e2 | a28123a9d63f93dcd2839c4686d64e3dcbd15ef0 | refs/heads/master | 2021-05-11T02:33:54.215864 | 2018-01-21T21:26:26 | 2018-01-21T21:26:26 | 118,367,039 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package com.learning.jpa;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest
public class JpaApplicationTests {
@Test
public void contextLoads() {
}
}
| [
"skim327@myseneca.ca"
] | skim327@myseneca.ca |
012e599bf7e830bb00858cb5cd839835a907c3ff | e16284e768aee79ca82fd70e5ac03670810270c6 | /src/main/java/br/com/objectos/comuns/base/Hashs.java | ef8b6e85324f08accf4d3ad0db4af91034ebfd6a | [
"Apache-2.0"
] | permissive | cpelissari/way-base | 63cef23dfeb091f735591899145dcb883ab8f78e | 7874d4da485621bc5bf625ecefafa0d676c71fe5 | refs/heads/master | 2020-03-29T23:57:04.774394 | 2013-07-21T15:55:01 | 2013-07-21T15:55:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,397 | java | /*
* Copyright 2011 Objectos, Fábrica de Software LTDA.
*
* 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 br.com.objectos.comuns.base;
import java.math.BigInteger;
import java.security.MessageDigest;
/**
* @author endo
*
* @version $Id$
*/
public class Hashs {
public static String withMD5(String input) {
try {
MessageDigest digest = MessageDigest.getInstance("MD5");
digest.update(input.getBytes("UTF-8"), 0, input.length());
byte[] bytes = digest.digest();
String md5sum = new BigInteger(1, bytes).toString(16);
return appendZeroIfNecessaryTo(md5sum);
} catch (Exception e) {
throw new HashException(e);
}
}
private static String appendZeroIfNecessaryTo(String checksum) {
int length = checksum.length();
if (length % 2 != 0) {
return "0" + checksum;
} else {
return checksum;
}
}
} | [
"marcio.endo@objectos.com.br"
] | marcio.endo@objectos.com.br |
41bad7f3b89aea5b5e7db0e5289a80e25483423a | fb6fd361b6b50c524b6d1a7dd890f6bad7514ba0 | /lab01/Exercicio05/src/Nota.java | 8a338f1ffd406eefa477a6bfacb325de9242299b | [] | no_license | viniciusdenovaes/Unip191LPOO_Lab | f21c820b36fcd4f1f8fcb348271321c9c2495229 | 412a5ddb03f9572587301be3c968cdb45ef74a94 | refs/heads/master | 2020-04-22T05:55:32.621871 | 2019-03-11T04:07:39 | 2019-03-11T04:07:39 | 170,172,005 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 219 | java |
public class Nota {
public double valor;
public Nota(double aValor) {
if(aValor < 0.0) {
this.valor = 0.0;
}
else if(aValor > 10.0) {
this.valor = 10.0;
}
else {
this.valor = aValor;
}
}
}
| [
"viniciusdenovaes@gmail.com"
] | viniciusdenovaes@gmail.com |
88765ae3a15cac540654a7fba7cbe86ce484fc72 | fe2d69428f8cbf270e2f0a4f043a012c9b933eba | /external-connector/external-connector-asterixdb/src/main/java/edu/uci/ics/external/connector/asterixdb/dataflow/helper/AsterixDBLSMBTreeDataflowHelper.java | 14356fe67f56c8153a6834e7a51006a0e3e39988 | [
"Apache-2.0"
] | permissive | sigmod/asterixdb-analytics | 1026ac7ea6d503a27c96b50c95ba6e0171eeaaf9 | d95713e54a689027224d9e05870f64ef4892ca2e | refs/heads/master | 2020-12-24T15:50:42.165342 | 2015-12-10T01:59:48 | 2015-12-10T01:59:48 | 37,301,838 | 0 | 2 | null | 2015-11-22T00:46:36 | 2015-06-12T04:23:40 | Java | UTF-8 | Java | false | false | 3,956 | java | /*
* Copyright 20092013 by The Regents of the University of California
* 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 from
*
* http://www.apache.org/licenses/LICENSE2.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 edu.uci.ics.external.connector.asterixdb.dataflow.helper;
import java.util.List;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
import org.apache.hyracks.api.dataflow.value.ITypeTraits;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.storage.am.common.dataflow.IIndexOperatorDescriptor;
import org.apache.hyracks.storage.am.lsm.btree.dataflow.LSMBTreeDataflowHelper;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationCallbackFactory;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMIOOperationScheduler;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMMergePolicy;
import org.apache.hyracks.storage.am.lsm.common.api.ILSMOperationTrackerProvider;
import org.apache.hyracks.storage.am.lsm.common.api.IVirtualBufferCache;
import org.apache.hyracks.storage.common.file.ILocalResourceFactory;
public class AsterixDBLSMBTreeDataflowHelper extends LSMBTreeDataflowHelper {
public AsterixDBLSMBTreeDataflowHelper(IIndexOperatorDescriptor opDesc, IHyracksTaskContext ctx, int partition,
List<IVirtualBufferCache> virtualBufferCaches, double bloomFilterFalsePositiveRate,
ILSMMergePolicy mergePolicy, ILSMOperationTrackerProvider opTrackerFactory,
ILSMIOOperationScheduler ioScheduler, ILSMIOOperationCallbackFactory ioOpCallbackFactory,
boolean needKeyDupCheck, ITypeTraits[] filterTypeTraits, IBinaryComparatorFactory[] filterCmpFactories,
int[] btreeFields, int[] filterFields, boolean durable) {
super(opDesc, ctx, partition, virtualBufferCaches, bloomFilterFalsePositiveRate, mergePolicy, opTrackerFactory,
ioScheduler, ioOpCallbackFactory, needKeyDupCheck, filterTypeTraits, filterCmpFactories, btreeFields,
filterFields, durable);
}
@Override
public void open() throws HyracksDataException {
synchronized (lcManager) {
long resourceID = getResourceID();
if (resourceID == 1) {
resourceID = addLocalResource();
}
index = lcManager.getIndex(resourceName);
if (index == null) {
index = createIndexInstance();
lcManager.register(resourceName, index);
}
lcManager.open(resourceName);
}
}
@Override
public void close() throws HyracksDataException {
synchronized (lcManager) {
// Closes the resource first.
lcManager.close(resourceName);
// Cleanup things associated with the resource.
index = lcManager.getIndex(resourceName);
if (index != null) {
// Unregister will deactivate the index.
lcManager.unregister(resourceName);
}
}
}
private long addLocalResource() throws HyracksDataException {
long resourceID = resourceIdFactory.createId();
ILocalResourceFactory localResourceFactory = opDesc.getLocalResourceFactoryProvider().getLocalResourceFactory();
localResourceRepository
.insert(localResourceFactory.createLocalResource(resourceID, file.getFile().getPath(), partition));
return resourceID;
}
}
| [
"buyingyi@gmail.com"
] | buyingyi@gmail.com |
9ad8b7fdfc1ed91e5bc2d2f1f7a53708b0e2c0f9 | 07abcad3885092aef8abe76e0d78c2296d7fcd1b | /twoFactorClient/src/ext/org/openTwoFactor/clientExt/org/apache/commons/collections/functors/NOPClosure.java | 567d4adc0eef1d42089b8cf3380ec89f68109b7a | [] | no_license | mchyzer/openTwoFactor | df3acfc07f2f385999bd081eeaf2bfc937ee8ff0 | 6a62b59d176b13a1bc51a0b60a258cef7ea1012c | refs/heads/master | 2023-08-28T19:06:16.817966 | 2023-08-14T17:30:34 | 2023-08-14T17:30:34 | 10,210,206 | 2 | 2 | null | 2021-06-04T01:00:06 | 2013-05-22T02:42:06 | JavaScript | UTF-8 | Java | false | false | 1,906 | 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.openTwoFactor.clientExt.org.apache.commons.collections.functors;
import java.io.Serializable;
import org.openTwoFactor.clientExt.org.apache.commons.collections.Closure;
/**
* Closure implementation that does nothing.
*
* @since Commons Collections 3.0
* @version $Revision: 1.1 $ $Date: 2013/06/20 06:16:03 $
*
* @author Stephen Colebourne
*/
public class NOPClosure implements Closure, Serializable {
/** Serial version UID */
private static final long serialVersionUID = 3518477308466486130L;
/** Singleton predicate instance */
public static final Closure INSTANCE = new NOPClosure();
/**
* Factory returning the singleton instance.
*
* @return the singleton instance
* @since Commons Collections 3.1
*/
public static Closure getInstance() {
return INSTANCE;
}
/**
* Constructor
*/
private NOPClosure() {
super();
}
/**
* Do nothing.
*
* @param input the input object
*/
public void execute(Object input) {
// do nothing
}
}
| [
"mchyzer@yahoo.com"
] | mchyzer@yahoo.com |
27ba81123f456c7ad600437fc1983e96d1b0b4ff | 759e4adb9c04256d00a261148c8d703067540333 | /src/main/java/pl/asie/charset/api/wires/IRedstoneEmitter.java | e253605829ec342122fa1749292a268c0a8c139f | [
"MIT"
] | permissive | DiMuRie/CharsetMC | 35f428a2e495cacb67a81f88f91f44bcbefdf0b7 | c87a019944ddf1a4804d8be700c5c633d8ac996c | refs/heads/master | 2021-01-18T12:37:08.295944 | 2015-12-29T11:17:00 | 2015-12-29T11:17:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 393 | java | package pl.asie.charset.api.wires;
import net.minecraft.util.EnumFacing;
public interface IRedstoneEmitter {
/**
* Get the signal strength of a redstone signal emitter.
* @param face The face the signal is on. Use null to get the strongest signal emitted in a given direction.
* @return The signal strength, 0-15.
*/
int getRedstoneSignal(WireFace face, EnumFacing toDirection);
}
| [
"asiekierka@gmail.com"
] | asiekierka@gmail.com |
79cbcbe816b56c362c8c9d5f5f881124b5e0c3b0 | cd3ccc969d6e31dce1a0cdc21de71899ab670a46 | /agp-7.1.0-alpha01/tools/base/common/src/main/java/com/android/io/FolderWrapper.java | f8ecb42bfc44ad4c636d612bf1daf9a9abc4e75a | [
"Apache-2.0"
] | permissive | jomof/CppBuildCacheWorkInProgress | 75e76e1bd1d8451e3ee31631e74f22e5bb15dd3c | 9e3475f6d94cb3239f27ed8f8ee81b0abde4ef51 | refs/heads/main | 2023-05-28T19:03:16.798422 | 2021-06-10T20:59:25 | 2021-06-10T20:59:25 | 374,736,765 | 0 | 1 | Apache-2.0 | 2021-06-07T21:06:53 | 2021-06-07T16:44:55 | Java | UTF-8 | Java | false | false | 1,433 | java | /*
* Copyright (C) 2008 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.android.io;
import java.io.File;
/**
* An implementation of {@link IAbstractFolder} extending {@link File}.
*/
public class FolderWrapper extends File implements IAbstractFolder {
private static final long serialVersionUID = 1L;
/**
* Creates a new File instance by converting the given pathname string into an abstract
* pathname.
* @param pathname the pathname
*
* @see File#File(String)
*/
public FolderWrapper(String pathname) {
super(pathname);
}
@Override
public IAbstractFile getFile(String name) {
return new FileWrapper(this, name);
}
@Override
public String getOsLocation() {
return getAbsolutePath();
}
@Override
public boolean exists() {
return isDirectory();
}
}
| [
"jomof@google.com"
] | jomof@google.com |
08b326f1c8cd8c3c60e8f819a4cdfc6ce8416792 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_349ad3b0e012965fbecd62490340e6fd5c4a6b5b/VisualizzaDistintaController/2_349ad3b0e012965fbecd62490340e6fd5c4a6b5b_VisualizzaDistintaController_t.java | 5a3c6ebcb829106b3cc7acb6c41a6e6404fb68ff | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 4,247 | java | package controller.ui;
import java.net.URL;
import java.util.ResourceBundle;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.ListView;
import javafx.scene.input.MouseEvent;
import modello_di_dominio.Commessa;
import modello_di_dominio.Distinta;
import modello_di_dominio.Ordine;
import modello_di_dominio.RigaDistinta;
import servizi.GestoreOrdine;
import servizi.GestoreServizi;
import servizi.Log;
import servizi.impl.GestoreServiziPrototipo;
public class VisualizzaDistintaController implements Initializable {
@FXML private ListView<String> listPezziDistinta;
@FXML private Label lbl_modulo;
@FXML private Label lbl_revisione;
@FXML private Label lbl_data;
@FXML private Label lbl_cliente;
@FXML private Label lbl_destinazione;
@FXML private Label lbl_elemstrutturale;
@FXML private Label lbl_cartellino;
@FXML private Label lbl_n_pezzi;
@FXML private Label lbl_diametro;
@FXML private Label lbl_peso;
@FXML private Label lbl_misura_taglio;
@FXML private Label lbl_codice_pezzo;
@FXML private Label lbl_fornitore;
final ObservableList<String> listaPezzi = FXCollections.observableArrayList();
public void printSelectedItem(ListView listView) {
ObservableList<Integer> list = listView.getSelectionModel().getSelectedIndices();
System.out.println("The selectedIndices property contains: " + list.size() + " element(s):");
for(int i=0; i<list.size(); i++) { System.out.println(i + ")" + list.get(i)); }
}
@Override
public void initialize(URL arg0, ResourceBundle arg1) {
GestoreServizi gsp = GestoreServiziPrototipo.getGestoreServizi();
GestoreOrdine gestoreOrdine = (GestoreOrdine) gsp.getServizio("GestoreOrdineDAO");
Log log = (Log) gsp.getServizio("LogStdout");
Ordine ordine = gestoreOrdine.getOrdine(1);
log.i(ordine.getID()+"");
//TODO: modifica a getCommessaID(id)
Commessa[] commesse = ordine.commesse.toArray();
for (int i=0; i < commesse.length; i++) {
System.out.println(commesse[i].getID()+" "+commesse[i].getDistinta());
}
Distinta distinta = commesse[0].getDistinta();
final RigaDistinta[] righeDistinta = distinta.righeDistinta.toArray();
for (int i=0; righeDistinta.length>i; i++) {
listaPezzi.add(righeDistinta[i].getIndicazione());
}
listPezziDistinta.setItems(listaPezzi);
lbl_modulo.setText("PROSSIMA ITERAZIONE");
lbl_revisione.setText("REV: "+distinta.getRevisione());
lbl_data.setText(distinta.getDataInizio().toGMTString());
lbl_cliente.setText("PROSSIMA ITERAZIONE");
lbl_destinazione.setText(ordine.getDestinazione().getVia());
lbl_elemstrutturale.setText(distinta.getElementoStrutturale());
lbl_cartellino.setText("PROSSIMA ITERAZIONE");
listPezziDistinta.setOnMouseClicked(new EventHandler<MouseEvent>() {
@Override
public void handle(MouseEvent event) {
if (listPezziDistinta.getSelectionModel().getSelectedItem()!=null) {
System.out.println("clicked on " + listPezziDistinta.getSelectionModel().getSelectedItem());
int selected = listPezziDistinta.getSelectionModel().getSelectedIndices().get(0);
//Aggiorno campi
lbl_codice_pezzo.setText(righeDistinta[selected].getPezzo().getDescrizionePezzo().getNome());
lbl_fornitore.setText(righeDistinta[selected].getPezzo().getDescrizionePezzo().getFornitore());
lbl_n_pezzi.setText(righeDistinta[selected].getPezzo().getQuantita()+"");
lbl_diametro.setText(righeDistinta[selected].getPezzo().getDescrizionePezzo().getDiametro()+"");
lbl_misura_taglio.setText("PROSSIMA ITERAZIONE");
lbl_peso.setText("PROSSIMA ITERAZIONE");
printSelectedItem(listPezziDistinta);
}
}
});
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
897ea75a0b6998df1aba8254369a9332ee4015a9 | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/LANG-9b-6-17-FEMO-WeightedSum:TestLen:CallDiversity/org/apache/commons/lang3/time/FastDateFormat_ESTest.java | f86a2c71ca193325d1ce8b94e5091d4c89e09ca2 | [] | 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 | 570 | java | /*
* This file was automatically generated by EvoSuite
* Mon Jan 20 09:20:55 GMT+00:00 2020
*/
package org.apache.commons.lang3.time;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class FastDateFormat_ESTest extends FastDateFormat_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
0f04e01c7b3b25e6162252f8f8fc2ffe07d1edca | 2efce0a208bbf13942e9e8205da44ecfc4055e58 | /day_18/src/com/atguigu/jdbc/JDBCTools.java | ba68b2c8ccc722d7d04efc36211ff1c5a73ba1ab | [] | no_license | ZanderYan-cloud/MyProject | 8226c7f64469eb98df64b3c5e05c5e96601ad71d | 11a451ae3f7bbe03e7ac710fe7c7eee2d1881fe7 | refs/heads/master | 2021-09-15T11:41:33.401772 | 2018-05-31T12:59:29 | 2018-05-31T12:59:29 | 104,723,868 | 1 | 0 | null | null | null | null | GB18030 | Java | false | false | 2,251 | java | package com.atguigu.jdbc;
import java.io.InputStream;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Properties;
/**
* 操作 JDBC 的工具类. 其中封装了一些工具方法 Version 1
*/
public class JDBCTools {
public static void release(ResultSet rs,
Statement statement, Connection conn) {
if(rs != null){
try {
rs.close();
} catch (SQLException e) {
e.printStackTrace();
}
}
if (statement != null) {
try {
statement.close();
} catch (Exception e2) {
e2.printStackTrace();
}
}
if (conn != null) {
try {
conn.close();
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
/**
* 关闭 Statement 和 Connection
* @param statement
* @param conn
*/
public static void release(Statement statement, Connection conn) {
if (statement != null) {
try {
statement.close();
} catch (Exception e2) {
e2.printStackTrace();
}
}
if (conn != null) {
try {
conn.close();
} catch (Exception e2) {
e2.printStackTrace();
}
}
}
/**
* 1. 获取连接的方法. 通过读取配置文件从数据库服务器获取一个连接.
*
* @return
* @throws Exception
*/
public static Connection getConnection() throws Exception {
// 1. 准备连接数据库的 4 个字符串.
// 1). 创建 Properties 对象
Properties properties = new Properties();
// 2). 获取 jdbc.properties 对应的输入流
InputStream in = JDBCTools.class.getClassLoader().getResourceAsStream(
"jdbc.properties");
// 3). 加载 2) 对应的输入流
properties.load(in);
// 4). 具体决定 user, password 等4 个字符串.
String user = properties.getProperty("user");
String password = properties.getProperty("password");
String jdbcUrl = properties.getProperty("jdbcUrl");
String driver = properties.getProperty("driver");
// 2. 加载数据库驱动程序(对应的 Driver 实现类中有注册驱动的静态代码块.)
Class.forName(driver);
// 3. 通过 DriverManager 的 getConnection() 方法获取数据库连接.
return DriverManager.getConnection(jdbcUrl, user, password);
}
}
| [
"913010012@qq.com"
] | 913010012@qq.com |
fb9b3b6108d576105a5c0d1b0fce328eece7bf8f | d11fb0d15b73a28742caa97e349dcfbe70d2563f | /server/iih.ci/iih.ci.ord/src/main/java/iih/ci/ord/s/bp/assi/impl/CopyContextCiEmsSrvServiceImpl.java | 9cdc277d7b8ac8b5b652e093b040a4e7be1246fe | [] | no_license | fhis/order.client | 50a363fd3e4f56d95ccc5aa288e907a0a8571031 | 56cfa7877f600a10c54fdb30306a32ffa28b8217 | refs/heads/master | 2021-08-22T20:50:59.511923 | 2017-12-01T07:10:27 | 2017-12-01T07:10:27 | 112,678,072 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,515 | java | package iih.ci.ord.s.bp.assi.impl;
import iih.ci.ord.ciorder.d.HpBeyondEnum;
import iih.ci.ord.ciorder.d.OrSrvSourceFromEnum;
import iih.ci.ord.ems.d.CiEmsSrvDTO;
import iih.ci.ord.ems.d.CiEnContextDTO;
import iih.ci.ord.pub.CiOrdAppUtils;
import iih.ci.ord.s.bp.assi.service.AbstractAssiCopy;
import xap.mw.core.data.BizException;
import xap.mw.core.data.DOStatus;
import xap.mw.coreitf.d.FBoolean;
/**
* 将当前就诊环境上下文复制到CiEmsSrvDTO
*
* @author HUMS
*
*/
public class CopyContextCiEmsSrvServiceImpl extends AbstractAssiCopy<CiEnContextDTO, CiEmsSrvDTO> {
@Override
protected void copyPropertys(CiEnContextDTO envinfo, CiEmsSrvDTO srvdto) throws BizException {
srvdto.setStatus(DOStatus.NEW);
srvdto.setId_dep_srv(envinfo.getId_dep_or());// 开立科室
srvdto.setId_ward_srv(envinfo.getId_dep_ns());// 开立病区,门诊该值为空,住院时会有值
srvdto.setId_emp_srv(envinfo.getId_emp_or());// 开立人员
srvdto.setDt_create_srv(CiOrdAppUtils.getServerDateTime());// 开立时间
srvdto.setId_hp(envinfo.getId_hp());// 主医保计划
srvdto.setEu_sourcemd(OrSrvSourceFromEnum.PHYSIAN);// 医疗单项目数据来源方式
// 医保就诊,并且都是保内诊断时为医保就诊,否则为自费(保外)
if (envinfo.getId_hp() != null && HpBeyondEnum.HPDIAG.equals(envinfo.getEu_hpbeyond())) {
srvdto.setFg_selfpay(FBoolean.FALSE);// 保内,非自费
} else {
srvdto.setFg_selfpay(FBoolean.TRUE);// 保外 、自费
}
}
}
| [
"27696830@qq.com"
] | 27696830@qq.com |
772bca1c58c2ae9c3a6b4b38f74a4cc16d11afef | c56fedd7e617014d917a5d3d18f2d3125113fee7 | /common/json-support/src/main/java/org/terracotta/json/ObjectMapperFactory.java | 2d6bfbbcbe2c4d414e4351e959255a5265a7980d | [
"Apache-2.0"
] | permissive | rahul-mittal/terracotta-platform | 373bb6740ba4a696a918666811019a472e8e2ae7 | 5a599752f483e051920be161f82eac4a862e1643 | refs/heads/master | 2021-05-01T18:32:03.028444 | 2020-07-14T19:24:00 | 2020-07-15T07:28:32 | 279,851,143 | 0 | 0 | Apache-2.0 | 2020-07-15T11:32:49 | 2020-07-15T11:32:49 | null | UTF-8 | Java | false | false | 2,887 | java | /*
* Copyright Terracotta, 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.terracotta.json;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.Module;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.SerializationFeature;
import java.util.ArrayList;
import java.util.List;
import static java.util.Arrays.asList;
import static java.util.Collections.emptyList;
/**
* Used to build an ObjectMapper in a consistent way
*
* @author Mathieu Carbou
*/
public class ObjectMapperFactory {
private final boolean pretty;
private final List<Module> modules;
public ObjectMapperFactory() {
this(emptyList(), false);
}
private ObjectMapperFactory(List<Module> modules, boolean pretty) {
this.pretty = pretty;
this.modules = new ArrayList<>(modules);
}
public ObjectMapperFactory pretty() {
return pretty(true);
}
public ObjectMapperFactory pretty(boolean pretty) {
return new ObjectMapperFactory(modules, pretty);
}
public ObjectMapperFactory withModule(Module module) {
return withModules(module);
}
public ObjectMapperFactory withModules(Module... modules) {
ObjectMapperFactory factory = new ObjectMapperFactory(this.modules, this.pretty);
factory.modules.addAll(asList(modules));
return factory;
}
public ObjectMapper create() {
ObjectMapper mapper = new ObjectMapper()
.setSerializationInclusion(JsonInclude.Include.NON_ABSENT)
.setDefaultPropertyInclusion(JsonInclude.Include.NON_ABSENT)
.enable(JsonGenerator.Feature.WRITE_BIGDECIMAL_AS_PLAIN)
.enable(MapperFeature.ACCEPT_CASE_INSENSITIVE_ENUMS)
.enable(MapperFeature.SORT_PROPERTIES_ALPHABETICALLY)
.enable(SerializationFeature.ORDER_MAP_ENTRIES_BY_KEYS)
.enable(SerializationFeature.CLOSE_CLOSEABLE)
.disable(SerializationFeature.FAIL_ON_EMPTY_BEANS)
.configure(SerializationFeature.INDENT_OUTPUT, pretty);
for (Module module : modules) {
mapper.registerModule(module);
}
return mapper;
}
@Override
public String toString() {
return "ObjectMapperFactory{" +
"pretty=" + pretty +
", modules=" + modules +
'}';
}
}
| [
"mathieu.carbou@gmail.com"
] | mathieu.carbou@gmail.com |
b13f6333327633b4eac00bb945a8bba6da1634db | 003901a6b3d30751d1ac76798007e4c6830ffb74 | /rest/src/main/java/com/epam/eco/kafkamanager/rest/config/HttpSecurityConfigurer.java | bfb3c9ed902b4ccb13aa1e42af854fa4ed3e7614 | [
"Apache-2.0"
] | permissive | octodemo/eco-kafka-manager | 45dce4ffe98366ba4784c9538709a1d98bc0c395 | a4c45edb0b2a7baff2f6ce9ac0a1ec517a1f19f6 | refs/heads/master | 2023-04-19T06:44:18.436606 | 2020-05-14T19:42:10 | 2020-05-14T19:42:10 | 264,008,635 | 0 | 0 | Apache-2.0 | 2021-04-26T20:46:19 | 2020-05-14T19:39:35 | Java | UTF-8 | Java | false | false | 1,761 | java | /*
* Copyright 2019 EPAM Systems
*
* 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.epam.eco.kafkamanager.rest.config;
import org.springframework.http.HttpMethod;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
/**
* @author Andrei_Tytsik
*/
public final class HttpSecurityConfigurer {
public static final String ADMIN_ROLE = "ECO-KM-ADMIN";
public static HttpSecurity configureAll(HttpSecurity http) throws Exception {
configureAuthorizeRequests(http);
configureCsrf(http);
return http;
}
public static HttpSecurity configureAuthorizeRequests(HttpSecurity http) throws Exception {
return http.authorizeRequests().
antMatchers("/actuator/health", "/actuator/info").permitAll().
antMatchers(HttpMethod.PUT, "/api/**").hasRole(ADMIN_ROLE).
antMatchers(HttpMethod.POST, "/api/**").hasRole(ADMIN_ROLE).
antMatchers(HttpMethod.DELETE, "/api/**").hasRole(ADMIN_ROLE).
anyRequest().authenticated().
and();
}
public static HttpSecurity configureCsrf(HttpSecurity http) throws Exception {
return http.csrf().
disable();
}
}
| [
"Andrei_Tytsik@epam.com"
] | Andrei_Tytsik@epam.com |
1ef828c6512bbc7e0ce2502ba74b1676c044e549 | 3b150be1b781b17495e43c73daab94a940ba1fef | /MainClient/src/main/java/com/fdl/overlayutil/WalkingRouteOverlay.java | 18103395782a898ab2ea8cf5af32f6e9a0e27a86 | [] | no_license | DreamFly01/SuanNiHen | e43346a86eb156e36b3eb643e176e735811c4024 | c10832fb402a011a93923d074d5755b64ccf1d93 | refs/heads/master | 2022-01-06T21:52:02.597929 | 2019-08-02T03:06:49 | 2019-08-02T03:06:49 | 195,406,683 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,387 | java | package com.fdl.overlayutil;
import android.graphics.Color;
import android.os.Bundle;
import android.util.Log;
import com.baidu.mapapi.map.BaiduMap;
import com.baidu.mapapi.map.BitmapDescriptor;
import com.baidu.mapapi.map.BitmapDescriptorFactory;
import com.baidu.mapapi.map.Marker;
import com.baidu.mapapi.map.MarkerOptions;
import com.baidu.mapapi.map.Overlay;
import com.baidu.mapapi.map.OverlayOptions;
import com.baidu.mapapi.map.Polyline;
import com.baidu.mapapi.map.PolylineOptions;
import com.baidu.mapapi.model.LatLng;
import com.baidu.mapapi.search.route.WalkingRouteLine;
import java.util.ArrayList;
import java.util.List;
/**
* 用于显示步行路线的overlay,自3.4.0版本起可实例化多个添加在地图中显示
*/
public class WalkingRouteOverlay extends OverlayManager {
private WalkingRouteLine mRouteLine = null;
public WalkingRouteOverlay(BaiduMap baiduMap) {
super(baiduMap);
}
/**
* 设置路线数据。
*
* @param line
* 路线数据
*/
public void setData(WalkingRouteLine line) {
mRouteLine = line;
}
@Override
public final List<OverlayOptions> getOverlayOptions() {
if (mRouteLine == null) {
return null;
}
List<OverlayOptions> overlayList = new ArrayList<OverlayOptions>();
if (mRouteLine.getAllStep() != null
&& mRouteLine.getAllStep().size() > 0) {
for (WalkingRouteLine.WalkingStep step : mRouteLine.getAllStep()) {
Bundle b = new Bundle();
b.putInt("index", mRouteLine.getAllStep().indexOf(step));
if (step.getEntrance() != null) {
overlayList.add((new MarkerOptions())
.position(step.getEntrance().getLocation())
.rotate((360 - step.getDirection()))
.zIndex(10)
.anchor(0.5f, 0.5f)
.extraInfo(b)
.icon(BitmapDescriptorFactory
.fromAssetWithDpi("Icon_line_node.png")));
}
// 最后路段绘制出口点
if (mRouteLine.getAllStep().indexOf(step) == (mRouteLine
.getAllStep().size() - 1) && step.getExit() != null) {
overlayList.add((new MarkerOptions())
.position(step.getExit().getLocation())
.anchor(0.5f, 0.5f)
.zIndex(10)
.icon(BitmapDescriptorFactory
.fromAssetWithDpi("Icon_line_node.png")));
}
}
}
// starting
if (mRouteLine.getStarting() != null) {
overlayList.add((new MarkerOptions())
.position(mRouteLine.getStarting().getLocation())
.icon(getStartMarker() != null ? getStartMarker() :
BitmapDescriptorFactory
.fromAssetWithDpi("Icon_start.png")).zIndex(10));
}
// terminal
if (mRouteLine.getTerminal() != null) {
overlayList
.add((new MarkerOptions())
.position(mRouteLine.getTerminal().getLocation())
.icon(getTerminalMarker() != null ? getTerminalMarker() :
BitmapDescriptorFactory
.fromAssetWithDpi("Icon_end.png"))
.zIndex(10));
}
// poly line list
if (mRouteLine.getAllStep() != null
&& mRouteLine.getAllStep().size() > 0) {
LatLng lastStepLastPoint = null;
for (WalkingRouteLine.WalkingStep step : mRouteLine.getAllStep()) {
List<LatLng> watPoints = step.getWayPoints();
if (watPoints != null) {
List<LatLng> points = new ArrayList<LatLng>();
if (lastStepLastPoint != null) {
points.add(lastStepLastPoint);
}
points.addAll(watPoints);
overlayList.add(new PolylineOptions().points(points).width(10)
.color(getLineColor() != 0 ? getLineColor() : Color.argb(178, 0, 78, 255)).zIndex(0));
lastStepLastPoint = watPoints.get(watPoints.size() - 1);
}
}
}
return overlayList;
}
/**
* 覆写此方法以改变默认起点图标
*
* @return 起点图标
*/
public BitmapDescriptor getStartMarker() {
return null;
}
public int getLineColor() {
return 0;
}
/**
* 覆写此方法以改变默认终点图标
*
* @return 终点图标
*/
public BitmapDescriptor getTerminalMarker() {
return null;
}
/**
* 处理点击事件
*
* @param i
* 被点击的step在
* {@link WalkingRouteLine#getAllStep()}
* 中的索引
* @return 是否处理了该点击事件
*/
public boolean onRouteNodeClick(int i) {
if (mRouteLine.getAllStep() != null
&& mRouteLine.getAllStep().get(i) != null) {
Log.i("baidumapsdk", "WalkingRouteOverlay onRouteNodeClick");
}
return false;
}
@Override
public final boolean onMarkerClick(Marker marker) {
for (Overlay mMarker : mOverlayList) {
if (mMarker instanceof Marker && mMarker.equals(marker)) {
if (marker.getExtraInfo() != null) {
onRouteNodeClick(marker.getExtraInfo().getInt("index"));
}
}
}
return true;
}
@Override
public boolean onPolylineClick(Polyline polyline) {
// TODO Auto-generated method stub
return false;
}
}
| [
"y290206959@163.com"
] | y290206959@163.com |
734a499df77271d42ae7e15294e471e79c0c59ef | f4fd782488b9cf6d99d4375d5718aead62b63c69 | /com/planet_ink/coffee_mud/Commands/Reply.java | 5a23f7e49b1f0e7a8cb398f0b449939f92eca7c5 | [
"Apache-2.0"
] | permissive | sfunk1x/CoffeeMud | 89a8ca1267ecb0c2ca48280e3b3930ee1484c93e | 0ac2a21c16dfe3e1637627cb6373d34615afe109 | refs/heads/master | 2021-01-18T11:20:53.213200 | 2015-09-17T19:16:30 | 2015-09-17T19:16:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,072 | java | package com.planet_ink.coffee_mud.Commands;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2004-2015 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
@SuppressWarnings({"unchecked","rawtypes"})
public class Reply extends StdCommand
{
public Reply(){}
private final String[] access=I(new String[]{"REPLY","REP","RE"});
@Override public String[] getAccessWords(){return access;}
@Override
public boolean execute(MOB mob, Vector commands, int metaFlags)
throws java.io.IOException
{
if(mob==null)
return false;
final PlayerStats pstats=mob.playerStats();
if(pstats==null)
return false;
if(pstats.getReplyToMOB()==null)
{
mob.tell(L("No one has told you anything yet!"));
return false;
}
if((pstats.getReplyToMOB().Name().indexOf('@')<0)
&&((CMLib.players().getPlayer(pstats.getReplyToMOB().Name())==null)
||(pstats.getReplyToMOB().isMonster())
||(!CMLib.flags().isInTheGame(pstats.getReplyToMOB(),true))))
{
mob.tell(L("@x1 is no longer logged in.",pstats.getReplyToMOB().Name()));
return false;
}
if(CMParms.combine(commands,1).length()==0)
{
mob.tell(L("Tell '@x1' what?",pstats.getReplyToMOB().Name()));
return false;
}
final int replyType=pstats.getReplyType();
switch(replyType)
{
case PlayerStats.REPLY_SAY:
if((pstats.getReplyToMOB().Name().indexOf('@')<0)
&&((mob.location()==null)||(!mob.location().isInhabitant(pstats.getReplyToMOB()))))
{
mob.tell(L("@x1 is no longer in the room.",pstats.getReplyToMOB().Name()));
return false;
}
CMLib.commands().postSay(mob,pstats.getReplyToMOB(),CMParms.combine(commands,1),false,false);
break;
case PlayerStats.REPLY_TELL:
{
final Session S=pstats.getReplyToMOB().session();
if(S!=null)
S.snoopSuspension(1);
CMLib.commands().postSay(mob,pstats.getReplyToMOB(),CMParms.combine(commands,1),true,true);
if(S!=null)
S.snoopSuspension(-11);
break;
}
case PlayerStats.REPLY_YELL:
{
final Command C=CMClass.getCommand("Say");
if((C!=null)&&(C.securityCheck(mob)))
{
commands.setElementAt("Yell",0);
C.execute(mob, commands,metaFlags);
}
break;
}
}
if((pstats.getReplyToMOB().session()!=null)
&&(pstats.getReplyToMOB().session().isAfk()))
mob.tell(pstats.getReplyToMOB().session().getAfkMessage());
return false;
}
@Override public double combatActionsCost(final MOB mob, final List<String> cmds){return CMProps.getCommandCombatActionCost(ID());}
@Override public double actionsCost(final MOB mob, final List<String> cmds){return CMProps.getCommandActionCost(ID());}
@Override public boolean canBeOrdered(){return false;}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
d08a5e53f18269d0a78eb0d4037c127dfa392a02 | 3ef55e152decb43bdd90e3de821ffea1a2ec8f75 | /large/module1646_public/tests/unittests/src/java/module1646_public_tests_unittests/a/IFoo0.java | 720f9e7a90d747ccd5056ac2b308cfbcdd97e743 | [
"BSD-3-Clause"
] | permissive | salesforce/bazel-ls-demo-project | 5cc6ef749d65d6626080f3a94239b6a509ef145a | 948ed278f87338edd7e40af68b8690ae4f73ebf0 | refs/heads/master | 2023-06-24T08:06:06.084651 | 2023-03-14T11:54:29 | 2023-03-14T11:54:29 | 241,489,944 | 0 | 5 | BSD-3-Clause | 2023-03-27T11:28:14 | 2020-02-18T23:30:47 | Java | UTF-8 | Java | false | false | 885 | java | package module1646_public_tests_unittests.a;
import java.nio.file.*;
import java.sql.*;
import java.util.logging.*;
/**
* Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut
* labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
* Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.
*
* @see javax.annotation.processing.Completion
* @see javax.lang.model.AnnotatedConstruct
* @see javax.management.Attribute
*/
@SuppressWarnings("all")
public interface IFoo0<O> extends java.util.concurrent.Callable<O> {
javax.naming.directory.DirContext f0 = null;
javax.net.ssl.ExtendedSSLSession f1 = null;
javax.rmi.ssl.SslRMIClientSocketFactory f2 = null;
String getName();
void setName(String s);
O get();
void set(O e);
}
| [
"gwagenknecht@salesforce.com"
] | gwagenknecht@salesforce.com |
58b6c091f0d670be82618b35d6d632c9e8c26b53 | fca29d54905a2edd7fd4db82500bba9c43701966 | /Java-DB-Fundamentals/DatabasesFrameworks-Hibernate&SpringData/02.OOPOverview/src/P05/Circle.java | d8de3ac670c2b09fd6b47b3531ce5be1863d38ce | [
"MIT"
] | permissive | yangra/SoftUni | 4046bd28e445f6cef98d2ee31179ba22892e6589 | 2fe8ac059fe398f8bf229200c5406840f026fb88 | refs/heads/master | 2021-01-13T15:16:53.303291 | 2018-04-22T18:19:58 | 2018-04-22T18:19:58 | 78,928,699 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 371 | java | package P05;
/**
* Created by Yana on 6/30/2017.
*/
public class Circle {
private int radius;
private Point center;
public Circle(int radius, Point center){
this.radius = radius;
this.center = center;
}
public int getRadius() {
return this.radius;
}
public Point getCenter() {
return this.center;
}
}
| [
"brambazluk@gmail.com"
] | brambazluk@gmail.com |
49114a0785dd314fc0a0c3bc3ed6e66aafe2edb4 | 9acb2dcaac7c7e59c982e4a7c67118e2eccab681 | /src/main/java/net/sf/l2j/gameserver/scripting/quests/Q295_DreamingOfTheSkies.java | 16d0a95795ce9f4a657dc7bd94e2ae466f80baa6 | [] | no_license | denismaster/midnight | d1356bdbb06e56d67afea2c3090fcbca5e3d6b3f | d8832e701d1ba1b8ffadab5ec8e258a34dea2340 | refs/heads/develop | 2020-03-23T03:46:56.864185 | 2018-08-26T21:29:46 | 2018-08-26T21:29:46 | 141,048,546 | 1 | 0 | null | 2018-08-26T21:29:58 | 2018-07-15T18:18:40 | HTML | UTF-8 | Java | false | false | 2,252 | java | package net.sf.l2j.gameserver.scripting.quests;
import net.sf.l2j.commons.random.Rnd;
import net.sf.l2j.gameserver.model.actor.Npc;
import net.sf.l2j.gameserver.model.actor.instance.Player;
import net.sf.l2j.gameserver.scripting.Quest;
import net.sf.l2j.gameserver.scripting.QuestState;
public class Q295_DreamingOfTheSkies extends Quest
{
private static final String qn = "Q295_DreamingOfTheSkies";
// Item
private static final int FLOATING_STONE = 1492;
// Reward
private static final int RING_OF_FIREFLY = 1509;
public Q295_DreamingOfTheSkies()
{
super(295, "Dreaming of the Skies");
setItemsIds(FLOATING_STONE);
addStartNpc(30536); // Arin
addTalkId(30536);
addKillId(20153); // Magical Weaver
}
@Override
public String onAdvEvent(String event, Npc npc, Player player)
{
String htmltext = event;
QuestState st = player.getQuestState(qn);
if (st == null)
return htmltext;
if (event.equalsIgnoreCase("30536-03.htm"))
{
st.setState(STATE_STARTED);
st.set("cond", "1");
st.playSound(QuestState.SOUND_ACCEPT);
}
return htmltext;
}
@Override
public String onTalk(Npc npc, Player player)
{
QuestState st = player.getQuestState(qn);
String htmltext = getNoQuestMsg();
if (st == null)
return htmltext;
switch (st.getState())
{
case STATE_CREATED:
htmltext = (player.getLevel() < 11) ? "30536-01.htm" : "30536-02.htm";
break;
case STATE_STARTED:
if (st.getInt("cond") == 1)
htmltext = "30536-04.htm";
else
{
st.takeItems(FLOATING_STONE, -1);
if (!st.hasQuestItems(RING_OF_FIREFLY))
{
htmltext = "30536-05.htm";
st.giveItems(RING_OF_FIREFLY, 1);
}
else
{
htmltext = "30536-06.htm";
st.rewardItems(57, 2400);
}
st.rewardExpAndSp(0, 500);
st.playSound(QuestState.SOUND_FINISH);
st.exitQuest(true);
}
break;
}
return htmltext;
}
@Override
public String onKill(Npc npc, Player player, boolean isPet)
{
QuestState st = checkPlayerCondition(player, npc, "cond", "1");
if (st == null)
return null;
if (st.dropItemsAlways(FLOATING_STONE, (Rnd.get(100) > 25) ? 1 : 2, 50))
st.set("cond", "2");
return null;
}
} | [
"denismaster@outlook.com"
] | denismaster@outlook.com |
82a3c881c3d98d04bc9f175dbd939a827283d795 | 16ca74ac57310298f6497a7dd6a8c70be9a4b231 | /src/main/java/com/mycompany/myapp/domain/Authority.java | 77a128e8c6293ae3acf0d2684bb37e7d99bc70be | [] | no_license | satishtamilan/jhipster-sample | 76013c25ff58d3a50378b7388dcba7fed015b1d7 | 57b63d521d3875965036512852695160551b4319 | refs/heads/main | 2023-02-17T23:37:55.316191 | 2021-01-20T09:52:49 | 2021-01-20T09:52:49 | 331,262,112 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,172 | java | package com.mycompany.myapp.domain;
import java.io.Serializable;
import java.util.Objects;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import org.springframework.data.annotation.Id;
import org.springframework.data.couchbase.core.mapping.Document;
/**
* An authority (a security role) used by Spring Security.
*/
@Document
public class Authority implements Serializable {
private static final long serialVersionUID = 1L;
@NotNull
@Size(max = 50)
@Id
private String name;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Authority)) {
return false;
}
return Objects.equals(name, ((Authority) o).name);
}
@Override
public int hashCode() {
return Objects.hashCode(name);
}
// prettier-ignore
@Override
public String toString() {
return "Authority{" +
"name='" + name + '\'' +
"}";
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
b6a3a6f3295cb82a611ebee8459f1eea5aee54a7 | 35ec3751c8b424e23b5d43e1a59cfb01a8143d73 | /src/main/java/com/kzsrm/model/Exchange.java | 6edc3500eeb43a8b058b7d238c4126f463d0a18f | [] | no_license | yankaics/OlaAcademy_API | d80bedf82844ea2a1d93df9e36a752f92f01d376 | 46717e6f0f87461a229c2e66fda2ff4b8c392182 | refs/heads/master | 2021-01-17T09:36:46.457519 | 2017-02-22T08:11:21 | 2017-02-22T08:11:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 796 | java | /**
* 欧拉币兑换
*/
package com.kzsrm.model;
import java.util.Date;
public class Exchange {
private int id;
private int userId;
private int objectId;
private String type; // 1 课程 2 模考
private Date createTime;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getUserId() {
return userId;
}
public void setUserId(int userId) {
this.userId = userId;
}
public int getObjectId() {
return objectId;
}
public void setObjectId(int objectId) {
this.objectId = objectId;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
}
| [
"forevertxp@gmail.com"
] | forevertxp@gmail.com |
30b9aa3323501aa1193960cfcb49a5ea7e955737 | 9df75bf8c6e9cb1dd14a760a4b39bdd3318b0ae9 | /app/src/main/java/com/fanchen/imovie/jsoup/parser/Dm5Impl.java | 139f484003bd33151c8a985191a4c4079ae1b235 | [] | no_license | wgb128/Bangumi | cc3807137625d4976978362b101893f2014b7568 | 24eeee1ffe0147a7f8c0329c4ac34b4d19294ecd | refs/heads/master | 2021-04-15T15:39:51.738655 | 2017-11-26T07:28:04 | 2017-11-26T07:28:04 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,105 | java | package com.fanchen.imovie.jsoup.parser;
import android.text.TextUtils;
import com.fanchen.imovie.entity.face.IBangumiMoreRoot;
import com.fanchen.imovie.entity.face.IHomeRoot;
import com.fanchen.imovie.entity.face.IPlayUrls;
import com.fanchen.imovie.entity.face.IVideoDetails;
import com.fanchen.imovie.entity.dm5.Dm5Details;
import com.fanchen.imovie.entity.dm5.Dm5Episode;
import com.fanchen.imovie.entity.dm5.Dm5Home;
import com.fanchen.imovie.entity.dm5.Dm5Title;
import com.fanchen.imovie.entity.dm5.Dm5PlayUrl;
import com.fanchen.imovie.entity.dm5.Dm5Video;
import com.fanchen.imovie.jsoup.IVideoMoreParser;
import com.fanchen.imovie.jsoup.node.Node;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import retrofit2.Retrofit;
/**
* Created by fanchen on 2017/10/2.
*/
public class Dm5Impl implements IVideoMoreParser {
private static final String PLAYERURL = "https://xxxooo.duapp.com/ey.php?vid=%s";
@Override
public IBangumiMoreRoot search(Retrofit retrofit, String baseUrl, String html) {
return more(retrofit, baseUrl, html);
}
@Override
public IHomeRoot home(Retrofit retrofit, String baseUrl, String html) {
Node node = new Node(html);
Dm5Home root = new Dm5Home();
try {
int count = 0;
List<Dm5Title> titles = new ArrayList<>();
List<Node> list = node.list("div.smart-box-head");
if (list != null && list.size() > 0) {
for (Node n : list) {
Dm5Title title = new Dm5Title();
title.setTitle(n.text("h2.light-title.title"));
title.setMore(true);
title.setDrawable(SEASON[count++ % SEASON.length]);
title.setUrl(n.last("div.smart-control.pull-right > a").attr("href"));
String[] split = title.getUrl().split("/");
title.setId(split.length >= 6 ? split[5] : "");
List<Dm5Video> videos = new ArrayList<>();
title.setList(videos);
titles.add(title);
for (Node sub : new Node(n.getElement().nextElementSibling()).list("div.video-item")) {
Dm5Video video = new Dm5Video();
video.setTitle(sub.text("div.item-head"));
video.setCover(sub.attr("div > div > a > img", "data-original"));
video.setId(sub.attr("div > div > a", "href", "/", 4));
video.setUrl(sub.attr("div > div > a", "href"));
video.setUpdate(sub.text("span.item-date"));
video.setAuthor(sub.text("span.item-author"));
video.setExtras(sub.text("span.rating-bar.bgcolor2.time_dur"));
videos.add(video);
}
}
root.setTitles(titles);
} else {
List<Dm5Video> videos = new ArrayList<>();
for (Node sub : node.list("div[id^=post-]")) {
Dm5Video video = new Dm5Video();
video.setTitle(sub.text("div.item-head"));
video.setCover(sub.attr("div > div > a > img", "data-original"));
video.setUrl(sub.attr("div > div > a", "href"));
video.setId(sub.attr("div > div > a", "href", "/", 4));
video.setUpdate(sub.text("span.item-date"));
video.setAuthor(sub.text("span.item-author"));
video.setExtras(sub.text("div.item-content.hidden"));
videos.add(video);
}
root.setList(videos);
}
root.setSuccess(true);
} catch (Exception e) {
e.printStackTrace();
root.setSuccess(false);
}
return root;
}
@Override
public IVideoDetails details(Retrofit retrofit, String baseUrl, String html) {
Node node = new Node(html);
Dm5Details details = new Dm5Details();
try {
details.setIntroduce(node.text("div.video-conent > div.item-content.toggled > p"));
details.setExtras(node.text("div.video-conent > div.item-tax-list"));
List<Dm5Episode> episodes = new ArrayList<>();
details.setEpisodes(episodes);
for (Node n : node.list("td > a.multilink-btn.btn.btn-sm.btn-default.bordercolor2hover.bgcolor2hover")) {
Dm5Episode episode = new Dm5Episode();
episode.setTitle(n.text());
episode.setId(n.attr("href", "/", 4));
episode.setUrl(n.attr("href"));
episodes.add(episode);
}
details.setSuccess(true);
} catch (Exception e) {
details.setSuccess(false);
e.printStackTrace();
}
return details;
}
@Override
public IBangumiMoreRoot more(Retrofit retrofit, String baseUrl, String html) {
Node node = new Node(html);
Dm5Home root = new Dm5Home();
try {
List<Dm5Video> videos = new ArrayList<>();
for (Node sub : node.list("div[id^=post-]")) {
Dm5Video video = new Dm5Video();
video.setTitle(sub.text("div.item-head"));
video.setCover(sub.attr("div > div > a > img", "data-original"));
video.setUrl(sub.attr("div > div > a", "href"));
video.setId(sub.attr("div > div > a", "href", "/", 4));
video.setExtras(sub.text("div.item-content.hidden"));
video.setUpdate(sub.text("span.item-date"));
video.setAuthor(sub.text("span.item-author"));
videos.add(video);
}
root.setList(videos);
root.setSuccess(true);
} catch (Exception e) {
root.setSuccess(false);
e.printStackTrace();
}
return root;
}
@Override
public IPlayUrls playUrl(Retrofit retrofit, String baseUrl, String html) {
Node node = new Node(html);
Dm5PlayUrl playUrl = new Dm5PlayUrl();
try {
String fUrl = node.attr("iframe", "src");
if (TextUtils.isEmpty(fUrl)) return playUrl;
int aIndexOf = fUrl.indexOf("a=");
if (aIndexOf != -1) {
Map<String, String> map = new HashMap<>();
String substring = fUrl.substring(aIndexOf + 2);
int indexOf = substring.indexOf("&");
if (indexOf != -1) {
map.put("标清", String.format(PLAYERURL, substring.substring(0, indexOf)));
} else {
map.put("标清", String.format(PLAYERURL, substring));
}
playUrl.setUrls(map);
playUrl.setSuccess(true);
}
} catch (Exception e) {
playUrl.setSuccess(false);
e.printStackTrace();
}
return playUrl;
}
}
| [
"happy1993_chen@sina.cn"
] | happy1993_chen@sina.cn |
ca1caad2d71d84a63217075c3d2d1110abb5e2e2 | 01563cf663b502102e22b73bd3ff6a16dde701d0 | /src/main/java/com/jk51/modules/wechat/controller/UserSpecificDiscountController.java | 3033805fc4de25db1f126e29a2617900b31524c0 | [] | no_license | tomzhang/springTestB | 17cc2d866723d7200302b068a30239732a9cda26 | af4bd2d5cc90d44f0b786fb115577a811d1eaac7 | refs/heads/master | 2020-05-02T04:35:50.729767 | 2018-10-24T02:24:35 | 2018-10-24T02:24:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,269 | java | package com.jk51.modules.wechat.controller;
import com.jk51.commons.dto.ReturnDto;
import com.jk51.commons.parameter.ParameterUtil;
import com.jk51.model.coupon.CouponActivity;
import com.jk51.model.promotions.sequence.SequenceParam;
import com.jk51.model.promotions.sequence.wechat.WechatSequenceResult;
import com.jk51.modules.promotions.sequence.wechat.WechatSequenceHandlerImpl;
import com.jk51.modules.promotions.sequence.wechat.WechatSequenceImpl;
import com.jk51.modules.wechat.service.UserSpecificDiscountService;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import javax.servlet.ServletContext;
import javax.servlet.http.HttpServletRequest;
import java.util.List;
import java.util.Map;
import java.util.Objects;
/**
* Created by Administrator on 2018/5/8.
*/
@RestController
@RequestMapping("userSpecificDiscount")
public class UserSpecificDiscountController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
private UserSpecificDiscountService userSpecificDiscountService;
@Autowired
private ServletContext servletContext;
//获取优惠券
@ResponseBody
@PostMapping(value = "/getCouponBySiteId")
public ReturnDto getCouponBySiteId(HttpServletRequest request) throws Exception {
Map<String,Object> requestParam = ParameterUtil.getParameterMap(request);
Object siteId = requestParam.get("siteId");
Object memberId = requestParam.get("memberId");
logger.info("获取用户专属优惠券信息");
if (Objects.isNull(siteId)) {
return ReturnDto.buildFailedReturnDto("siteId不能为空");
}
/*if (Objects.isNull(memberId)) {
return ReturnDto.buildFailedReturnDto("memberId不能为空");
}*/
Integer memberid = null;
Integer siteid = Integer.parseInt(siteId.toString());
if (!Objects.isNull(memberId))
Integer.parseInt(memberId.toString());
//获取优惠券 优惠券规则为:指定商户、库存大于0 或不限量、针对对象为商品、状态为可发放状态的
List<CouponActivity> couponActivityList = userSpecificDiscountService.getCouponBySiteId(siteid, memberid);
if (CollectionUtils.isEmpty(couponActivityList))
return ReturnDto.buildFailedReturnDto("暂无优惠券信息!");
else
if (couponActivityList.size() > 3)
return ReturnDto.buildSuccessReturnDto(couponActivityList.subList(0, 3));
else
return ReturnDto.buildSuccessReturnDto(couponActivityList);
}
/*
* 会员专属活动
**/
@RequestMapping("getExclusiveActivities")
@ResponseBody
public ReturnDto getExclusiveActivities(HttpServletRequest request) {
Map<String,Object> requestParam = ParameterUtil.getParameterMap(request);
Object siteId = requestParam.get("siteId");
Object memberId = requestParam.get("memberId");
Object promotionTypeObj = requestParam.get("promotiontype");
if (Objects.isNull(siteId)) {
return ReturnDto.buildFailedReturnDto("siteId不能为空");
}
if (Objects.isNull(promotionTypeObj)) {
return ReturnDto.buildFailedReturnDto("promotionType不能为空");
}
logger.info("会员专属活动信息");
Object pageNumObj = requestParam.get("pageNum");
Object pageSizeObj = requestParam.get("pageSize");
Integer pageNum = null;
Integer pageSize = null;
Integer siteid = Integer.parseInt(siteId.toString());
Integer memberid = null;
if (Objects.nonNull(memberId))
memberid = Integer.parseInt(memberId.toString());
Integer promotionType = Integer.parseInt(promotionTypeObj.toString());
if (!Objects.isNull(pageNumObj)) {
pageNum = Integer.parseInt(pageNumObj.toString());
}
else {
pageNum = 1;
}
if (!Objects.isNull(pageSizeObj)) {
pageSize = Integer.parseInt(pageSizeObj.toString());
}else {
if (60 == promotionType || 50 == promotionType)
pageSize = 3;
else if (10 == promotionType || 20 == promotionType || 30 == promotionType || 40 == promotionType)
pageSize = 6;
}
SequenceParam param = new SequenceParam(siteid,memberid,pageNum,pageSize,promotionType);
WechatSequenceImpl ws = new WechatSequenceImpl(servletContext,param);
try {
ws.collection();
ws.processGoods();
ws.processSequence(new WechatSequenceHandlerImpl());
ws.processTags();
WechatSequenceResult sequenceResult =(WechatSequenceResult) ws.result.get();
return ReturnDto.buildSuccessReturnDto(sequenceResult);
} catch (Exception e) {
logger.error("会员专属活动异常");
e.printStackTrace();
}
return ReturnDto.buildFailedReturnDto("暂无会员专属活动信息");
}
}
| [
"gaojie@51jk.com"
] | gaojie@51jk.com |
ba00db61e4d7cfe55169d10100a508ffb6450214 | da68446ad3fa56c5d5f9a55b4428e21e0f0ed406 | /src/main/java/mac/struct/policy_rr_limit.java | f97b7037ce78de8f9b7c18abe2c3c8f0f998e448 | [] | no_license | multi-os-engine/moe-mac-core | 90d9764ab38807cac004aed70b68ca54c5c8a79b | 0ffb7b52af9cdd75f25b33d0c4723903a521d2f7 | refs/heads/master | 2020-04-06T06:58:01.357013 | 2016-08-09T18:57:05 | 2016-08-09T18:57:05 | 65,319,982 | 4 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,447 | java | /*
Copyright 2014-2016 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package mac.struct;
import org.moe.natj.c.StructObject;
import org.moe.natj.c.ann.Structure;
import org.moe.natj.c.ann.StructureField;
import org.moe.natj.general.NatJ;
import org.moe.natj.general.Pointer;
import org.moe.natj.general.ann.Generated;
@Generated
@Structure()
public final class policy_rr_limit extends StructObject {
static {
NatJ.register();
}
private static long __natjCache;
@Generated
public policy_rr_limit() {
super(policy_rr_limit.class);
}
@Generated
protected policy_rr_limit(Pointer peer) {
super(peer);
}
@Generated
public policy_rr_limit(int max_priority) {
super(policy_rr_limit.class);
setMax_priority(max_priority);
}
@Generated
@StructureField(order = 0, isGetter = true)
public native int max_priority();
@Generated
@StructureField(order = 0, isGetter = false)
public native void setMax_priority(int value);
}
| [
"alexey.suhov@intel.com"
] | alexey.suhov@intel.com |
58e79ac5400e39c3955e3f6bb3916420e9b8266e | 6edf653a31663a54f330971a481f5750fb8f2b9c | /html-converter/html-j-converter/src/test/java/fr/jmini/asciidoctorj/converter/html/ImageImagesdirTest.java | 3d62009ffff38800a261feb2e25c6ca80a85b79e | [
"Apache-2.0"
] | permissive | ryouhei-komatsu/asciidoctorj-experiments | 989b3523e73c60aff48a73bd8e042de45fa637e8 | 80587b51828d9641777e7f22834aa301d6de0b34 | refs/heads/master | 2023-03-17T14:56:24.692087 | 2019-02-22T13:41:36 | 2019-02-22T13:41:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 709 | java | package fr.jmini.asciidoctorj.converter.html;
import java.util.Map;
import org.asciidoctor.ast.Document;
import fr.jmini.asciidoctorj.converter.html.testing.AbstractImageImagesdirTesting;
/**
* Test for {@link fr.jmini.asciidoctorj.testcases.ImageImagesdirTestCase} (mocked AST, java html backend) .
*/
public class ImageImagesdirTest extends AbstractImageImagesdirTesting {
@Override
protected Document createAstDocument(String asciiDoc, Map<String, Object> options) {
Document mock = testCase.createMock();
return mock;
}
@Override
protected String convertToHtml(Document astDocument) {
return HtmlConverterTestUtility.convertToHtml(astDocument);
}
}
| [
"dev@jmini.fr"
] | dev@jmini.fr |
7e65ca112e4294f2e13e58a2f2dc710f16c9e6db | 26baa6a4f0bde23883e93309d9ad28e2feee23d1 | /opennms-dao/src/main/java/org/opennms/netmgt/dao/hibernate/IpRouteInterfaceDaoHibernate.java | 0c67b40ceeabd86f17620fe50f6e1fae180ee038 | [] | no_license | taochong123456/opennms-1.10.12-1 | 6532544405fff3dddd96f1250775e48f2aa38f0f | 0f4c01a8e80e2144125eb189daac38a4e559421a | refs/heads/master | 2020-03-18T12:37:27.510530 | 2018-09-20T17:00:28 | 2018-09-20T17:00:28 | 134,734,970 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,524 | java | /*******************************************************************************
* This file is part of OpenNMS(R).
*
* Copyright (C) 2011-2012 The OpenNMS Group, Inc.
* OpenNMS(R) is Copyright (C) 1999-2012 The OpenNMS Group, Inc.
*
* OpenNMS(R) is a registered trademark of The OpenNMS Group, Inc.
*
* OpenNMS(R) is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published
* by the Free Software Foundation, either version 3 of the License,
* or (at your option) any later version.
*
* OpenNMS(R) is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with OpenNMS(R). If not, see:
* http://www.gnu.org/licenses/
*
* For more information contact:
* OpenNMS(R) Licensing <license@opennms.org>
* http://www.opennms.org/
* http://www.opennms.com/
*******************************************************************************/
package org.opennms.netmgt.dao.hibernate;
import java.sql.Timestamp;
import java.util.List;
import org.hibernate.criterion.Restrictions;
import org.opennms.netmgt.dao.IpRouteInterfaceDao;
import org.opennms.netmgt.model.OnmsCriteria;
import org.opennms.netmgt.model.OnmsIpRouteInterface;
public class IpRouteInterfaceDaoHibernate extends AbstractDaoHibernate<OnmsIpRouteInterface, Integer> implements IpRouteInterfaceDao {
public IpRouteInterfaceDaoHibernate() {
super(OnmsIpRouteInterface.class);
}
@Override
public void markDeletedIfNodeDeleted() {
final OnmsCriteria criteria = new OnmsCriteria(OnmsIpRouteInterface.class);
criteria.createAlias("node", "node", OnmsCriteria.LEFT_JOIN);
criteria.add(Restrictions.eq("node.type", "D"));
for (final OnmsIpRouteInterface ipRouteIface : findMatching(criteria)) {
ipRouteIface.setStatus('D');
saveOrUpdate(ipRouteIface);
}
}
@Override
public void deactivateForNodeIdIfOlderThan(final int nodeid, final Timestamp scanTime) {
final OnmsCriteria criteria = new OnmsCriteria(OnmsIpRouteInterface.class);
criteria.createAlias("node", "node", OnmsCriteria.LEFT_JOIN);
criteria.add(Restrictions.eq("node.id", nodeid));
criteria.add(Restrictions.lt("lastPollTime", scanTime));
criteria.add(Restrictions.eq("status", "A"));
for (final OnmsIpRouteInterface item : findMatching(criteria)) {
item.setStatus('N');
saveOrUpdate(item);
}
}
@Override
public void setStatusForNode(final Integer nodeid, final Character action) {
// UPDATE iprouteinterface set status = ? WHERE nodeid = ?
final OnmsCriteria criteria = new OnmsCriteria(OnmsIpRouteInterface.class);
criteria.createAlias("node", "node", OnmsCriteria.LEFT_JOIN);
criteria.add(Restrictions.eq("node.id", nodeid));
for (final OnmsIpRouteInterface item : findMatching(criteria)) {
item.setStatus(action);
saveOrUpdate(item);
}
}
@Override
public void setStatusForNodeAndIfIndex(final Integer nodeid, final Integer ifIndex, final Character action) {
// UPDATE iprouteinterface set status = ? WHERE nodeid = ? AND routeifindex = ?
final OnmsCriteria criteria = new OnmsCriteria(OnmsIpRouteInterface.class);
criteria.createAlias("node", "node", OnmsCriteria.LEFT_JOIN);
criteria.add(Restrictions.eq("node.id", nodeid));
criteria.add(Restrictions.eq("routeIfIndex", ifIndex));
for (final OnmsIpRouteInterface item : findMatching(criteria)) {
item.setStatus(action);
saveOrUpdate(item);
}
}
@Override
public OnmsIpRouteInterface findByNodeAndDest(Integer id, String routeDest) {
final OnmsCriteria criteria = new OnmsCriteria(OnmsIpRouteInterface.class);
criteria.createAlias("node", "node", OnmsCriteria.LEFT_JOIN);
criteria.add(Restrictions.eq("node.id", id));
criteria.add(Restrictions.eq("routeDest", routeDest));
final List<OnmsIpRouteInterface> objects = findMatching(criteria);
if (objects != null && objects.size() > 0) {
return objects.get(0);
}
return null;
}
}
| [
"2636757099@qq.com"
] | 2636757099@qq.com |
22f63e91cc5aaa60b24699f018d08a74af615f29 | 2bc2eadc9b0f70d6d1286ef474902466988a880f | /tags/mule-2.0.0-RC2/modules/wssecurity/src/main/java/org/mule/extras/wssecurity/config/WsSecurityNamespaceHandler.java | 72a8266c2018772a06dc1fa210aef5aa344aef1a | [] | no_license | OrgSmells/codehaus-mule-git | 085434a4b7781a5def2b9b4e37396081eaeba394 | f8584627c7acb13efdf3276396015439ea6a0721 | refs/heads/master | 2022-12-24T07:33:30.190368 | 2020-02-27T19:10:29 | 2020-02-27T19:10:29 | 243,593,543 | 0 | 0 | null | 2022-12-15T23:30:00 | 2020-02-27T18:56:48 | null | UTF-8 | Java | false | false | 1,243 | java | /*
* $Id:
* --------------------------------------------------------------------------------------
* Copyright (c) MuleSource, Inc. All rights reserved. http://www.mulesource.com
*
* The software in this package is published under the terms of the CPAL v1.0
* license, a copy of which has been included with this distribution in the
* LICENSE.txt file.
*/
package org.mule.extras.wssecurity.config;
import org.mule.config.spring.handlers.AbstractMuleNamespaceHandler;
import org.mule.config.spring.parsers.collection.ChildMapEntryDefinitionParser;
import org.mule.config.spring.parsers.generic.ChildDefinitionParser;
import org.mule.extras.wssecurity.filters.WsSecurityFilter;
/**
* Registers a Bean Definition Parser for handling WsSecurity related elements.
*/
public class WsSecurityNamespaceHandler extends AbstractMuleNamespaceHandler
{
public void init()
{
registerMuleBeanDefinitionParser("security-filter", new ChildDefinitionParser("securityFilter", WsSecurityFilter.class)).addAlias("decryptionFile", "wsDecryptionFile").addAlias("signatureFile", "wsSignatureFile");
registerBeanDefinitionParser("property", new ChildMapEntryDefinitionParser("addOutboundProperties", "key", "value"));
}
}
| [
"tcarlson@bf997673-6b11-0410-b953-e057580c5b09"
] | tcarlson@bf997673-6b11-0410-b953-e057580c5b09 |
bf7e821873827aafce3156d67f3806419265057b | c8cdff97fb4b6ce366bb6ab9adaff866b761a791 | /src/test_it_now/Scanner2.java | d26c176869f71841a3325c34eef839e69332587d | [] | no_license | SDET222/java-programmingC | 6a50c147f526f60382c8febfe68c1a1c7f2921b2 | f6098a8a3ff2412135120efde901ab3ac558c362 | refs/heads/master | 2023-06-22T00:48:25.451665 | 2021-07-26T23:51:53 | 2021-07-26T23:51:53 | 366,196,266 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 330 | java | package test_it_now;
import java.util.Scanner;
public class Scanner2 {
public static void main (String [] args) {
Scanner scan = new Scanner(System.in);
System.out.println("What day is today? :");
String dateToday = scan.next();
System.out.println("Today is: "+dateToday);
}
}
| [
"jkrogers222@gmail.com"
] | jkrogers222@gmail.com |
1faa64248201309efccf06cf86ca207d8772d536 | dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9 | /data_defect4j/preprossed_method_corpus/Math/104/org/apache/commons/math/stat/descriptive/moment/StandardDeviation_clear_119.java | fcb7da1f061169796c4f143e27fccaa5e36d8932 | [] | 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 | 941 | java |
org apach common math stat descript moment
comput sampl standard deviat standard deviat
posit squar root varianc implement wrap
link varianc instanc code bia correct isbiascorrect code properti
wrap varianc instanc expos
comput sampl standard deviat squar root
bia correct sampl varianc popul standard deviat
squar root bia correct popul varianc
link varianc inform
strong note implement strong
multipl thread access instanc concurr
thread invok code increment code
code clear code method extern
version revis date
standard deviat standarddevi abstract storeless univari statist abstractstorelessunivariatestatist
org apach common math stat descript storeless univari statist storelessunivariatestatist clear
clear
varianc clear
| [
"hvdthong@gmail.com"
] | hvdthong@gmail.com |
631f769c47697adf755f90e1d21170f9bb625a90 | 5148293c98b0a27aa223ea157441ac7fa9b5e7a3 | /Method_Scraping/xml_scraping/NicadOutputFile_t1_logging/Nicad_t1_logging157.java | 9ef7c7a05a2d78e3c7af5ae8d380c44e3e7f889b | [] | no_license | ryosuke-ku/TestCodeSeacherPlus | cfd03a2858b67a05ecf17194213b7c02c5f2caff | d002a52251f5461598c7af73925b85a05cea85c6 | refs/heads/master | 2020-05-24T01:25:27.000821 | 2019-08-17T06:23:42 | 2019-08-17T06:23:42 | 187,005,399 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 477 | java | // clone pairs:3114:90%
// 1547:logging-log4j2/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/rolling/action/Duration.java
public class Nicad_t1_logging157
{
public boolean equals(final Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof Duration)) {
return false;
}
final Duration other = (Duration) obj;
return other.seconds == this.seconds;
}
} | [
"naist1020@gmail.com"
] | naist1020@gmail.com |
143187a5947b796048395df2115d403ca22c6460 | 6ca726ba2467d5360fa4b3d7cf1d86e13461e697 | /src/main/java/android/support/p000v4/net/ConnectivityManagerCompat.java | a939f3413f6a9eaf2f97ac8aae9bc8f407923cb3 | [] | no_license | DevNebula/android_packages_app_lgcamera | 324766642d0d7debd907c5664320c5e17028fd9d | b5ed59a03a0950a31d4f35b3f1802c774de49cd6 | refs/heads/master | 2020-03-31T05:30:10.682195 | 2018-10-07T14:12:46 | 2018-10-07T14:12:46 | 151,948,692 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,443 | java | package android.support.p000v4.net;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;
import android.os.Build.VERSION;
import android.support.annotation.RestrictTo;
import android.support.annotation.RestrictTo.Scope;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
/* renamed from: android.support.v4.net.ConnectivityManagerCompat */
public final class ConnectivityManagerCompat {
private static final ConnectivityManagerCompatImpl IMPL;
public static final int RESTRICT_BACKGROUND_STATUS_DISABLED = 1;
public static final int RESTRICT_BACKGROUND_STATUS_ENABLED = 3;
public static final int RESTRICT_BACKGROUND_STATUS_WHITELISTED = 2;
/* renamed from: android.support.v4.net.ConnectivityManagerCompat$ConnectivityManagerCompatImpl */
interface ConnectivityManagerCompatImpl {
int getRestrictBackgroundStatus(ConnectivityManager connectivityManager);
boolean isActiveNetworkMetered(ConnectivityManager connectivityManager);
}
/* renamed from: android.support.v4.net.ConnectivityManagerCompat$BaseConnectivityManagerCompatImpl */
static class BaseConnectivityManagerCompatImpl implements ConnectivityManagerCompatImpl {
BaseConnectivityManagerCompatImpl() {
}
public boolean isActiveNetworkMetered(ConnectivityManager cm) {
NetworkInfo info = cm.getActiveNetworkInfo();
if (info == null) {
return true;
}
switch (info.getType()) {
case 1:
return false;
default:
return true;
}
}
public int getRestrictBackgroundStatus(ConnectivityManager cm) {
return 3;
}
}
/* renamed from: android.support.v4.net.ConnectivityManagerCompat$HoneycombMR2ConnectivityManagerCompatImpl */
static class HoneycombMR2ConnectivityManagerCompatImpl extends BaseConnectivityManagerCompatImpl {
HoneycombMR2ConnectivityManagerCompatImpl() {
}
public boolean isActiveNetworkMetered(ConnectivityManager cm) {
return ConnectivityManagerCompatHoneycombMR2.isActiveNetworkMetered(cm);
}
}
/* renamed from: android.support.v4.net.ConnectivityManagerCompat$JellyBeanConnectivityManagerCompatImpl */
static class JellyBeanConnectivityManagerCompatImpl extends HoneycombMR2ConnectivityManagerCompatImpl {
JellyBeanConnectivityManagerCompatImpl() {
}
public boolean isActiveNetworkMetered(ConnectivityManager cm) {
return ConnectivityManagerCompatJellyBean.isActiveNetworkMetered(cm);
}
}
/* renamed from: android.support.v4.net.ConnectivityManagerCompat$Api24ConnectivityManagerCompatImpl */
static class Api24ConnectivityManagerCompatImpl extends JellyBeanConnectivityManagerCompatImpl {
Api24ConnectivityManagerCompatImpl() {
}
public int getRestrictBackgroundStatus(ConnectivityManager cm) {
return ConnectivityManagerCompatApi24.getRestrictBackgroundStatus(cm);
}
}
@RestrictTo({Scope.LIBRARY_GROUP})
@Retention(RetentionPolicy.SOURCE)
/* renamed from: android.support.v4.net.ConnectivityManagerCompat$RestrictBackgroundStatus */
public @interface RestrictBackgroundStatus {
}
static {
if (VERSION.SDK_INT >= 24) {
IMPL = new Api24ConnectivityManagerCompatImpl();
} else if (VERSION.SDK_INT >= 16) {
IMPL = new JellyBeanConnectivityManagerCompatImpl();
} else if (VERSION.SDK_INT >= 13) {
IMPL = new HoneycombMR2ConnectivityManagerCompatImpl();
} else {
IMPL = new BaseConnectivityManagerCompatImpl();
}
}
public static boolean isActiveNetworkMetered(ConnectivityManager cm) {
return IMPL.isActiveNetworkMetered(cm);
}
public static NetworkInfo getNetworkInfoFromBroadcast(ConnectivityManager cm, Intent intent) {
NetworkInfo info = (NetworkInfo) intent.getParcelableExtra("networkInfo");
if (info != null) {
return cm.getNetworkInfo(info.getType());
}
return null;
}
public static int getRestrictBackgroundStatus(ConnectivityManager cm) {
return IMPL.getRestrictBackgroundStatus(cm);
}
private ConnectivityManagerCompat() {
}
}
| [
"eliminater74@gmail.com"
] | eliminater74@gmail.com |
5aaaedee1ef72beb60bc5c11039941c30cf3570b | 762e34937d5a92c7e40e015cb05a7c3aefd49474 | /core/src/main/java/dev/morphia/mapping/codec/MorphiaCollectionPropertyCodecProvider.java | e2e1d5ba1487e2d950f03aea2117cec0a7ce4e33 | [
"Apache-2.0"
] | permissive | Alex-Zhuo/morphia | bd35d5c77c7336194f089f705d6f8869da419970 | d4a1b8e69032dddee43a39b04e369855f436ca3c | refs/heads/master | 2023-09-01T13:10:26.344897 | 2021-10-14T03:55:27 | 2021-10-14T03:55:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,506 | java | package dev.morphia.mapping.codec;
import com.mongodb.lang.Nullable;
import dev.morphia.mapping.codec.pojo.TypeData;
import org.bson.codecs.Codec;
import org.bson.codecs.configuration.CodecConfigurationException;
import org.bson.codecs.pojo.PropertyCodecRegistry;
import org.bson.codecs.pojo.TypeWithTypeParameters;
import java.util.Collection;
import java.util.List;
/**
* A provider for collection types
*/
@SuppressWarnings("unchecked")
public class MorphiaCollectionPropertyCodecProvider extends MorphiaPropertyCodecProvider {
@Nullable
@Override
public <T> Codec<T> get(TypeWithTypeParameters<T> type, PropertyCodecRegistry registry) {
if (Collection.class.isAssignableFrom(type.getType())) {
final List<? extends TypeWithTypeParameters<?>> typeParameters = type.getTypeParameters();
TypeWithTypeParameters<?> valueType = getType(typeParameters, 0);
try {
return new MorphiaCollectionCodec(registry.get(valueType), type.getType());
} catch (CodecConfigurationException e) {
if (valueType.getType().equals(Object.class)) {
try {
return (Codec<T>) registry.get(TypeData.builder(Collection.class).build());
} catch (CodecConfigurationException e1) {
// Ignore and return original exception
}
}
throw e;
}
}
return null;
}
}
| [
"jlee@antwerkz.com"
] | jlee@antwerkz.com |
b475d55f7640c288752ac236d584e81e6534f269 | ec108631ecb39c9fbaa14d869fc14f9375468460 | /chapter_008/src/test/java/ru/job4j/nonblockingcache/OptimisticExceptionTest.java | 8799ca6a65f3f986dbecd2358254a70406de8e49 | [
"Apache-2.0"
] | permissive | sah-lob/job4j | 90b4aafe642c7c05a74930b0b8c62717d5591bb6 | a001f65d679fec22b1526a53909c1074c587de8f | refs/heads/master | 2022-02-18T16:18:00.775456 | 2019-08-02T16:10:29 | 2019-08-02T16:10:29 | 156,985,093 | 1 | 0 | Apache-2.0 | 2022-02-10T17:20:00 | 2018-11-10T13:44:34 | Java | UTF-8 | Java | false | false | 794 | java | package ru.job4j.nonblockingcache;
import org.junit.Assert;
import org.junit.Test;
import java.util.concurrent.atomic.AtomicReference;
import static org.hamcrest.core.Is.is;
public class OptimisticExceptionTest {
@Test
public void whenThrowException() throws InterruptedException {
AtomicReference<Exception> ex = new AtomicReference<>();
Thread thread = new Thread(
() -> {
try {
throw new RuntimeException("Throw Exception in Thread");
} catch (Exception e) {
ex.set(e);
}
}
);
thread.start();
thread.join();
Assert.assertThat(ex.get().getMessage(), is("Throw Exception in Thread"));
}
} | [
"Sah-lob@ya.ru"
] | Sah-lob@ya.ru |
fccb1ceb34fd72b225e9fb61cbbd1e88d992e54c | 13c2d3db2d49c40c74c2e6420a9cd89377f1c934 | /program_data/JavaProgramData/16/722.java | b6df59118e746ca2c1ccd72d63aab06740e21a44 | [
"MIT"
] | permissive | qiuchili/ggnn_graph_classification | c2090fefe11f8bf650e734442eb96996a54dc112 | 291ff02404555511b94a4f477c6974ebd62dcf44 | refs/heads/master | 2021-10-18T14:54:26.154367 | 2018-10-21T23:34:14 | 2018-10-21T23:34:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 417 | java | package <missing>;
public class GlobalMembers
{
public static int Main()
{
int n;
int i;
int j;
i = 0;
String a = new String(new char[9]);
char ch;
while ((ch = System.in.read()) != '\n')
{
a = tangible.StringFunctions.changeCharacter(a, i, ch);
i = i + 1;
}
i = i - 1;
while (i >= 0)
{
System.out.print(a.charAt(i));
i = i - 1;
}
System.out.print("\n");
return 0;
}
}
| [
"y.yu@open.ac.uk"
] | y.yu@open.ac.uk |
518433502afed9bde24e05f9172954ef7818c2cf | 74c4239fd6855e2a197add8ca002fb23003da34f | /springboot-autoconfigur/src/main/java/com/github/service/CalculateService.java | 3109182fd182ba25d6e793cb54bbb962bc4fc82e | [] | no_license | changsongyang/boot-cloud | 1df15b4fbb27c8964c95d6a5e760899774a4bd56 | eaf737abe6d1d2c91f7f9f1a85b041c7c4bc081c | refs/heads/master | 2022-11-02T08:29:07.307679 | 2020-06-18T10:40:06 | 2020-06-18T10:40:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 216 | java | package com.github.service;
public interface CalculateService {
/**
* 从多个整数 sum 求和
* @param values 多个整数
* @return sum 累加值
*/
Integer sum(Integer... values);
}
| [
"870439570@qq.com"
] | 870439570@qq.com |
0f0276b8ff64200d1cacaae2feed6a6bf60f8167 | ed5159d056e98d6715357d0d14a9b3f20b764f89 | /src/irvine/oeis/a298/A298035.java | ddecc4a0dde5b038caf3a8e0bda69a059c7ff80a | [] | 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 | 448 | java | package irvine.oeis.a298;
// Generated by gen_pattern.pl - DO NOT EDIT here!
import irvine.oeis.GeneratingFunctionSequence;
/**
* A298035 Coordination sequence of <code>Dual(3.12.12)</code> tiling with respect to a trivalent node.
* @author Georg Fischer
*/
public class A298035 extends GeneratingFunctionSequence {
/** Construct the sequence. */
public A298035() {
super(0, new long[] {1, 1, 16},
new long[] {1, -2, 1});
}
}
| [
"sean.irvine@realtimegenomics.com"
] | sean.irvine@realtimegenomics.com |
6ee19b39a95eaa1a1838147cc90fe1258852ed2a | 20eb62855cb3962c2d36fda4377dfd47d82eb777 | /IntroClassJava/dataset/smallest/af81ffd4bc47e4f84cbf87051d82d15af14833eaba6c57ae82fc503a67eb939f3e6552182124605c38a77a6774f41fac2cc95082320ba5e29d303277c098c4ae/000/mutations/5/smallest_af81ffd4_000.java | cd368469009ea6154e73d732c2b64499262f33e8 | [] | no_license | ozzydong/CapGen | 356746618848065cce4e253e5d3c381baa85044a | 0ba0321b6b1191443276021f1997833342f02515 | refs/heads/master | 2023-03-18T20:12:02.923428 | 2020-08-21T03:08:28 | 2020-08-21T03:08:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,238 | java | package introclassJava;
class IntObj {
public int value;
public IntObj () {
} public IntObj (int i) {
value = i;
}
}
class FloatObj {
public float value;
public FloatObj () {
} public FloatObj (float i) {
value = i;
}
}
class LongObj {
public long value;
public LongObj () {
} public LongObj (long i) {
value = i;
}
}
class DoubleObj {
public double value;
public DoubleObj () {
} public DoubleObj (double i) {
value = i;
}
}
class CharObj {
public char value;
public CharObj () {
} public CharObj (char i) {
value = i;
}
}
public class smallest_af81ffd4_000 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
smallest_af81ffd4_000 mainClass = new smallest_af81ffd4_000 ();
String output;
if (args.length > 0) {
mainClass.scanner = new java.util.Scanner (args[0]);
} else {
mainClass.scanner = new java.util.Scanner (System.in);
}
mainClass.exec ();
System.out.println (mainClass.output);
}
public void exec () throws Exception {
DoubleObj a = new DoubleObj (), b = new DoubleObj (), c =
new DoubleObj (), d = new DoubleObj (), m = new DoubleObj (), n =
new DoubleObj (), p = new DoubleObj ();
output +=
(String.format ("Please enter 4 numbers separated by spaces > "));
a.value = scanner.nextDouble ();
b.value = scanner.nextDouble ();
c.value = scanner.nextDouble ();
d.value = scanner.nextDouble ();
if (a.value > b.value) {
m.value = b.value;
} else if (a.value < b.value) {
m.value = a.value;
}
if (m.value > c.value) {
n.value = c.value;
} else if (m.value < c.value) {
n.value = m.value;
}
if (n.value > d.value) {
p.value = d.value;
} else if (n.value < d.value) {
p.value = b.value;
}
output += (String.format ("%.0f is the smallest\n", p.value));
if (true)
return;;
}
}
| [
"justinwm@163.com"
] | justinwm@163.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.