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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3662cd64da94027d128c1f2dc550275d02c0f996
|
d4c3659ac9ddb5e3c0010b326f3bcc7e33ce0bed
|
/ren-regression/src/main/java/com/exigen/dxp/employee/providertab/FindProviderPage.java
|
b81693a642491c73bf01c2474469403dbaf01810
|
[] |
no_license
|
NandiniDR29/regression-test
|
cbfdae60e8b462cf32485afb3df0d9504200d0e1
|
c4acbc3488195217f9d6a780130d2e5dfe01d6e5
|
refs/heads/master
| 2023-07-03T14:35:40.673146
| 2021-08-11T07:03:13
| 2021-08-11T07:03:13
| 369,527,619
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,465
|
java
|
package com.exigen.dxp.employee.providertab;
import com.exigen.dxp.DxpCommonMethods;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import java.io.IOException;
import java.util.ArrayList;
import static com.exigen.dxp.DXPBaseTest.driver;
import static com.exigen.dxp.DXPBaseTest.highLighterMethod;
public class FindProviderPage {
String parentTab;
@FindBy(xpath = "//a[text()='FIND PROVIDER']")
private WebElement findProvider;
public FindProviderPage(WebDriver driver) {
PageFactory.initElements(driver,this);
}
public void clickOnFindProvider(){
highLighterMethod(findProvider);
parentTab = driver.getWindowHandle();
findProvider.click();
}
public void verifyPageTitle() throws IOException {
ArrayList<String> tabs = new ArrayList<>(driver.getWindowHandles());
tabs.remove(parentTab);
for (String tab:tabs) {
driver.switchTo().window(tab);
String url = driver.getCurrentUrl();
if (url.contains("https://www.myrenproviders.com/")){
DxpCommonMethods.informationPrint("Navigated to : " +url);
}
else {
DxpCommonMethods.toFailScenarios(url+"not Matching");
}
driver.close();
}
driver.switchTo().window(parentTab);
}
}
|
[
"Nramachandra@previseit.com"
] |
Nramachandra@previseit.com
|
47f6755f91739679f936410a65c3eb826f97d0cb
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/model_seeding/92_jcvi-javacommon-org.jcvi.jillion.trace.sff.SffUtil-0.5-6/org/jcvi/jillion/trace/sff/SffUtil_ESTest.java
|
d2f6ca0fa3a40986beda90fb8732989a51a043d7
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 646
|
java
|
/*
* This file was automatically generated by EvoSuite
* Tue Oct 29 14:33:29 GMT 2019
*/
package org.jcvi.jillion.trace.sff;
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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true)
public class SffUtil_ESTest extends SffUtil_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
40f0bddc7c1f9fbcf159486c723b1cb249a0e61a
|
f67631102a9ace0156e09fad524ee4a61b1a6967
|
/spring-boot-quartz-demo/src/main/java/cn/raysonblog/quartz/config/druid/DruidConfig.java
|
ba6449797ad0e3abd772f45ca3b7ff6c97248d0c
|
[
"Apache-2.0"
] |
permissive
|
g-smll/spring-boot-demo-all
|
04f0d474631c80c5a411cf678bcac7066a9be7af
|
4d4c00eededecad414e2b0b0b0ff5fd88e53334e
|
refs/heads/master
| 2022-04-02T06:57:40.979814
| 2020-01-20T09:31:56
| 2020-01-20T09:31:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,363
|
java
|
package cn.raysonblog.quartz.config.druid;
import java.util.HashMap;
import java.util.Map;
import org.springframework.boot.web.servlet.FilterRegistrationBean;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.transaction.annotation.EnableTransactionManagement;
import com.alibaba.druid.pool.DruidDataSource;
import com.alibaba.druid.support.http.StatViewServlet;
import com.alibaba.druid.support.http.WebStatFilter;
import com.alibaba.druid.support.spring.stat.BeanTypeAutoProxyCreator;
import com.alibaba.druid.support.spring.stat.DruidStatInterceptor;
/**
* Druid็DataResource้
็ฝฎ็ฑป
* ๅกๆฏ่ขซSpring็ฎก็็็ฑป๏ผๅฎ็ฐๆฅๅฃ EnvironmentAware ้ๅๆนๆณ setEnvironment ๅฏไปฅๅจๅทฅ็จๅฏๅจๆถ๏ผ
* ่ทๅๅฐ็ณป็ป็ฏๅขๅ้ๅapplication้
็ฝฎๆไปถไธญ็ๅ้ใ ่ฟๆไธ็งๆนๅผๆฏ้็จๆณจ่งฃ็ๆนๅผ่ทๅ @value("${ๅ้็keyๅผ}")
* ่ทๅapplication้
็ฝฎๆไปถไธญ็ๅ้ใ ่ฟ้้็จ็ฌฌไธ็ง่ฆๆนไพฟไบ
* <p>Title: DruidConfig</p>
* <p>Description: </p>
* <p>Company: </p>
*
* @author rayson
* @version 1.0
* @date 2018-06-07 11:54
*/
@Configuration
public class DruidConfig {
@Bean
public ServletRegistrationBean druidServlet() {
ServletRegistrationBean servletRegistrationBean = new ServletRegistrationBean();
servletRegistrationBean.setServlet(new StatViewServlet());
servletRegistrationBean.addUrlMappings("/druid/*");
Map<String, String> initParameters = new HashMap<String, String>();
// initParameters.put("loginUsername", "druid");// ็จๆทๅ
// initParameters.put("loginPassword", "druid");// ๅฏ็
initParameters.put("resetEnable", "false");// ็ฆ็จHTML้กต้ขไธ็โReset Allโๅ่ฝ
initParameters.put("allow", "127.0.0.1"); // IP็ฝๅๅ (ๆฒกๆ้
็ฝฎๆ่
ไธบ็ฉบ๏ผๅๅ
่ฎธๆๆ่ฎฟ้ฎ)
// initParameters.put("deny", "192.168.20.38");// IP้ปๅๅ
// (ๅญๅจๅ
ฑๅๆถ๏ผdenyไผๅ
ไบallow)
servletRegistrationBean.setInitParameters(initParameters);
return servletRegistrationBean;
}
@Bean
public FilterRegistrationBean filterRegistrationBean() {
FilterRegistrationBean filterRegistrationBean = new FilterRegistrationBean();
filterRegistrationBean.setFilter(new WebStatFilter());
filterRegistrationBean.addUrlPatterns("/*");
filterRegistrationBean.addInitParameter("exclusions", "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*");
return filterRegistrationBean;
}
// ๆ็
งBeanIdๆฅๆฆๆช้
็ฝฎ ็จๆฅbean็็ๆง
@Bean(value = "druid-stat-interceptor")
public DruidStatInterceptor DruidStatInterceptor() {
DruidStatInterceptor druidStatInterceptor = new DruidStatInterceptor();
return druidStatInterceptor;
}
/**
* druidๆฐๆฎๅบ่ฟๆฅๆฑ ็ๆง
*/
@Bean
public BeanTypeAutoProxyCreator beanTypeAutoProxyCreator() {
BeanTypeAutoProxyCreator beanTypeAutoProxyCreator = new BeanTypeAutoProxyCreator();
beanTypeAutoProxyCreator.setTargetBeanType(DruidDataSource.class);
beanTypeAutoProxyCreator.setInterceptorNames("druid-stat-interceptor");
return beanTypeAutoProxyCreator;
}
}
|
[
"793514387@qq.com"
] |
793514387@qq.com
|
08676fda02e43500dff03456059aee18a652d49b
|
4ef431684e518b07288e8b8bdebbcfbe35f364e4
|
/elastic-tracestore/test-core/src/main/java/com/ca/apm/tests/testbed/MultipleStandAloneTestBed.java
|
73e69fff39f240990673dac2d6252d8e2173b844
|
[] |
no_license
|
Sarojkswain/APMAutomation
|
a37c59aade283b079284cb0a8d3cbbf79f3480e3
|
15659ce9a0030c2e9e5b992040e05311fff713be
|
refs/heads/master
| 2020-03-30T00:43:23.925740
| 2018-09-27T23:42:04
| 2018-09-27T23:42:04
| 150,540,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,166
|
java
|
/*
* Copyright (c) 2014 CA. All rights reserved.
*
* This software and all information contained therein is confidential and
* proprietary and shall not be duplicated, used, disclosed or disseminated in
* any way except as authorized by the applicable license agreement, without
* the express written permission of CA. All authorized reproductions must be
* marked with this language.
*
* EXCEPT AS SET FORTH IN THE APPLICABLE LICENSE AGREEMENT, TO THE EXTENT
* PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS SOFTWARE WITHOUT WARRANTY OF
* ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL CA BE
* LIABLE TO THE END USER OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE, DIRECT OR
* INDIRECT, FROM THE USE OF THIS SOFTWARE, INCLUDING WITHOUT LIMITATION, LOST
* PROFITS, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS
* EXPRESSLY ADVISED OF SUCH LOSS OR DAMAGE.
*/
package com.ca.apm.tests.testbed;
import java.util.Arrays;
import java.util.Collection;
import com.ca.apm.automation.action.flow.utility.FileCreatorFlow;
import com.ca.apm.automation.action.flow.utility.FileCreatorFlowContext;
import com.ca.apm.systemtest.fld.artifact.FLDHvrAgentLoadExtractArtifact;
import com.ca.apm.systemtest.fld.role.CLWWorkStationLoadRole;
import com.ca.apm.systemtest.fld.role.loads.HVRAgentLoadRole;
import com.ca.apm.systemtest.fld.role.loads.WurlitzerBaseRole;
import com.ca.apm.systemtest.fld.role.loads.WurlitzerLoadRole;
import com.ca.apm.tests.role.ClientDeployRole;
import com.ca.tas.artifact.ITasArtifact;
import com.ca.tas.resolver.ITasResolver;
import com.ca.tas.role.EmRole;
import com.ca.tas.role.utility.UtilityRole;
import com.ca.tas.testbed.Bitness;
import com.ca.tas.testbed.ITestbed;
import com.ca.tas.testbed.ITestbedFactory;
import com.ca.tas.testbed.ITestbedMachine;
import com.ca.tas.testbed.Testbed;
import com.ca.tas.testbed.TestbedMachine;
import com.ca.tas.tests.annotations.TestBedDefinition;
@TestBedDefinition
public class MultipleStandAloneTestBed implements ITestbedFactory {
public static final int NUM_OF_SA = 5;
private static final String SYSTEM_XML = "xml/appmap-stress/load-test/system.xml";
public static final String ADMIN_AUX_TOKEN = "f47ac10b-58cc-4372-a567-0e02b2c3d479";
private static final Collection<String> LAXNL_JAVA_OPTION = Arrays.asList(
"-Djava.awt.headless=true", "-Dmail.mime.charset=UTF-8",
"-Dorg.owasp.esapi.resources=./config/esapi", "-XX:+UseConcMarkSweepGC",
"-XX:+UseParNewGC", "-Xss512k", "-Dcom.wily.assert=false", "-showversion",
"-XX:CMSInitiatingOccupancyFraction=50", "-XX:+HeapDumpOnOutOfMemoryError", "-Xms4096m",
"-Xmx4096m", "-verbose:gc", "-Dappmap.user=admin", "-Dappmap.token=" + ADMIN_AUX_TOKEN);
@Override
public ITestbed create(ITasResolver tasResolver) {
ITestbed bed = new Testbed("Mutiple SA Environment");
// String yml = "/jarvis_data/docker-compose.yml";
// UtilityRole<?> fileCreationRole =
// UtilityRole.flow("jarvisDockerComposeCopyRole", FileCreatorFlow.class,
// new FileCreatorFlowContext.Builder().fromResource("/docker/docker-compose.yml")
// .destinationPath(yml).build());
// UtilityRole<?> executionRole =
// UtilityRole.commandFlow("startJarvisDockerRole", new RunCommandFlowContext.Builder(
// "docker-compose").args(Arrays.asList("-f", yml, "up", "-d")).build());
// fileCreationRole.before(executionRole);
// ITestbedMachine jarvisMachine =
// new TestbedMachine.LinuxBuilder("jarvisMachine").templateId("co7_500g")
// .bitness(Bitness.b64).build();
// jarvisMachine.addRole(executionRole, fileCreationRole);
// bed.addMachine(jarvisMachine);
for (int i = 0; i < NUM_OF_SA; i++) {
EmRole emRole =
new EmRole.LinuxBuilder("emRole" + i, tasResolver)
.silentInstallChosenFeatures(
Arrays.asList("Enterprise Manager", "Database", "WebView"))
.configProperty("com.ca.apm.ttstore", "es")
.configProperty("ca.apm.ttstore.elastic.url","http://130.200.67.237:9200")
// .configProperty("ca.apm.ttstore.jarvis.ingestion.url",
// "http://sc97a:8081/ingestion")
// .configProperty("ca.apm.ttstore.jarvis.es.url", "http://sc97a:9200")
// .configProperty("ca.apm.ttstore.jarvis.onboarding.url",
// "http://sc97a:8080/onboarding")
// .configProperty("introscope.tenantId", "load-tenant-" + i)
.configProperty("introscope.apmserver.teamcenter.saas", "true")
.configProperty("introscope.enterprisemanager.tess.enabled", "false")
.emLaxNlClearJavaOption(LAXNL_JAVA_OPTION).build();
ITestbedMachine emMachine =
new TestbedMachine.LinuxBuilder("emMachine" + i).templateId("co66")
.bitness(Bitness.b64).build();
emMachine.addRole(emRole);
ITestbedMachine loadMachine =
new TestbedMachine.LinuxBuilder("loadMachine" + i).templateId("w64")
.bitness(Bitness.b64).build();
// HVR Load
FLDHvrAgentLoadExtractArtifact artifactFactory =
new FLDHvrAgentLoadExtractArtifact(tasResolver);
ITasArtifact artifact = artifactFactory.createArtifact("10.3");
HVRAgentLoadRole hvrLoadRole =
new HVRAgentLoadRole.Builder("hvrRole" + i, tasResolver)
.emHost(tasResolver.getHostnameById("emRole" + i)).emPort("5001")
.cloneagents(10).cloneconnections(25).agentHost("HVRAgent").secondspertrace(1)
.addMetricsArtifact(artifact.getArtifact()).build();
loadMachine.addRole(hvrLoadRole);
// Wurlitzer Load
WurlitzerBaseRole wurlitzerBaseRole =
new WurlitzerBaseRole.Builder("wurlitzerBaseRole" + i, tasResolver).deployDir(
"wurlitzerBase").build();
loadMachine.addRole(wurlitzerBaseRole);
String xml = "3Complex-200agents-2apps-25frontends-100EJBsession";
WurlitzerLoadRole wurlitzerLoadrole =
new WurlitzerLoadRole.Builder("wurlitzerRole" + i, tasResolver).emRole(emRole)
.buildFileLocation(SYSTEM_XML).target(xml).logFile(xml + ".log")
.wurlitzerBaseRole(wurlitzerBaseRole).build();
loadMachine.addRole(wurlitzerLoadrole);
// CLW Load
CLWWorkStationLoadRole clwRole =
new CLWWorkStationLoadRole.Builder("clwRole" + i, tasResolver)
.emHost(tasResolver.getHostnameById("emRole" + i)).agentName("HVRAgent.*")
.agentName(".*ErrorStallAgent.*").build();
loadMachine.addRole(clwRole);
// client deploy role
ClientDeployRole clientDeployRole =
new ClientDeployRole.Builder("clientDeployRole" + i, tasResolver).emHost(
tasResolver.getHostnameById("emRole" + i)).build();
loadMachine.addRole(clientDeployRole);
// deploy jmeter load script role
try {
UtilityRole<?> copyRestTraceLoadRole =
UtilityRole
.flow(
"copyRestTraceLoadJmx" + i,
FileCreatorFlow.class,
new FileCreatorFlowContext.Builder()
.fromResource("/jmeter/TT_Viewer.JMX")
.destinationPath("C:/automation/deployed/jmeter/TT_Viewer.JMX")
.build());
clientDeployRole.before(copyRestTraceLoadRole);
loadMachine.addRole(copyRestTraceLoadRole);
} catch (Exception e) {}
bed.addMachine(emMachine, loadMachine);
}
return bed;
}
}
|
[
"sarojkswain@gmail.com"
] |
sarojkswain@gmail.com
|
e9d7dcecf05e06525f3b1b30cfbf0919403da2b7
|
0d768acdc41a9bb571a2f8a6357f50aca69b7274
|
/src/main/java/de/tuclausthal/submissioninterface/authfilter/authentication/verify/impl/ShibbolethVerify.java
|
c535124beaeaec563bd0c3b2a86c6aefde6b4806
|
[] |
no_license
|
csware/si
|
a176d3c77f811a10c4c2e6150df6e198eeb54a5e
|
d8f2bf1a3d4cd6b3640f72323851dffa387e6197
|
refs/heads/master
| 2023-08-18T13:04:14.349267
| 2023-08-02T18:35:21
| 2023-08-02T18:35:21
| 1,578,315
| 5
| 3
| null | 2020-12-11T10:51:30
| 2011-04-06T17:41:16
|
Java
|
UTF-8
|
Java
| false
| false
| 3,516
|
java
|
/*
* Copyright 2020-2021 Sven Strickroth <email@cs-ware.de>
*
* This file is part of the GATE.
*
* GATE is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* GATE 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 GATE. If not, see <http://www.gnu.org/licenses/>.
*/
package de.tuclausthal.submissioninterface.authfilter.authentication.verify.impl;
import java.lang.invoke.MethodHandles;
import javax.servlet.FilterConfig;
import javax.servlet.http.HttpServletRequest;
import org.hibernate.Session;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import de.tuclausthal.submissioninterface.authfilter.authentication.login.LoginData;
import de.tuclausthal.submissioninterface.authfilter.authentication.login.impl.Shibboleth;
import de.tuclausthal.submissioninterface.authfilter.authentication.verify.VerifyIf;
import de.tuclausthal.submissioninterface.authfilter.authentication.verify.VerifyResult;
import de.tuclausthal.submissioninterface.persistence.dao.DAOFactory;
import de.tuclausthal.submissioninterface.persistence.datamodel.User;
import de.tuclausthal.submissioninterface.util.Util;
/**
* Shibboleth credential verifyer
* @author Sven Strickroth
*/
public class ShibbolethVerify implements VerifyIf {
final static private Logger LOG = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
private String userAttribute;
private String matrikelNumberAttribute;
public ShibbolethVerify(FilterConfig filterConfig) {
this.userAttribute = filterConfig.getInitParameter("userAttribute");
this.matrikelNumberAttribute = filterConfig.getInitParameter("matrikelNumberAttribute");
}
@Override
public VerifyResult checkCredentials(Session session, LoginData logindata, HttpServletRequest request) {
if (request.getAttribute("Shib-Identity-Provider") == null) {
LOG.error("No Shib-Identity-Provider request attribute found.");
return null;
}
if (!logindata.getUsername().equals(Shibboleth.getAttribute(request, userAttribute))) {
LOG.error("Got mismatching username from Shibboleth and LoginIf.");
return null;
}
User user = DAOFactory.UserDAOIf(session).getUserByUsername(logindata.getUsername());
String lastName = Shibboleth.getAttribute(request, "sn");
String firstName = Shibboleth.getAttribute(request, "givenName");
String mail = Shibboleth.getAttribute(request, "mail");
VerifyResult result = null;
if (user != null) {
result = new VerifyResult(user);
user.setFirstName(firstName);
user.setLastName(lastName);
user.setEmail(mail);
} else {
result = new VerifyResult();
result.username = logindata.getUsername();
result.lastName = lastName;
result.firstName = firstName;
result.mail = mail;
if (matrikelNumberAttribute != null) {
String matrikelnumber = Shibboleth.getAttribute(request, matrikelNumberAttribute);
if (matrikelnumber != null && Util.isInteger(matrikelnumber)) {
result.matrikelNumber = Integer.parseInt(matrikelnumber);
}
}
}
if (!result.wasLoginSuccessful()) {
LOG.warn("Shibboleth login worked, but not detected as logged in, missing data?!");
}
return result;
}
}
|
[
"email@cs-ware.de"
] |
email@cs-ware.de
|
6702a05e008457296807810ff46802a9dd3877a3
|
219cbfd2b09c8989afbdcdd4198b77dd93799b1e
|
/develop/server/toolProject/gameTool/src/main/java/com/home/gameTool/app/GameAllToolsApp.java
|
041ded7f211be1841300fd004b59e36e0d811e34
|
[
"Apache-2.0"
] |
permissive
|
shineTeam7/tank
|
2c9d6e1f01ebe6803731b520ce84eea52c593d2b
|
1d37e93474bc00ca3923be08d0742849c73f1049
|
refs/heads/master
| 2022-12-02T01:35:12.116350
| 2020-08-17T12:09:01
| 2020-08-17T12:09:01
| 288,139,019
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 193
|
java
|
package com.home.gameTool.app;
import com.home.commonTool.app.AllToolsApp;
public class GameAllToolsApp
{
public static void main(String[] args)
{
AllToolsApp.main(args);
}
}
|
[
"359944951@qq.com"
] |
359944951@qq.com
|
ae43751c23534330e64ac82643493f7047eeb3cb
|
cb47a69eb202feae227358af2493efe9c35d0cf6
|
/spring-cloud/springboot-seata/seata-samples-master/seata-spring-boot-starter-samples/samples-account-service/src/main/java/io/seata/samples/integration/account/controller/TAccountController.java
|
aa4aa71cd34fa4a58e35091c892bf8e373c66d08
|
[
"Apache-2.0"
] |
permissive
|
WCry/demo
|
e4f6ee469e39e9a96e9deec2724eb89d642830b5
|
5801b12371a1beb610328a8b83a056276427817d
|
refs/heads/master
| 2023-05-28T14:42:29.175634
| 2021-06-14T14:06:43
| 2021-06-14T14:06:43
| 266,535,701
| 2
| 1
|
Apache-2.0
| 2020-10-21T01:03:55
| 2020-05-24T12:24:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,131
|
java
|
package io.seata.samples.integration.account.controller;
import io.seata.samples.integration.account.service.ITAccountService;
import io.seata.samples.integration.common.dto.AccountDTO;
import io.seata.samples.integration.common.response.ObjectResponse;
import lombok.extern.slf4j.Slf4j;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* ่ดฆๆทๆฃ้ฑ
* </p>
*
* * @author lidong
* @since 2019-09-04
*/
@RestController
@RequestMapping("/account")
@Slf4j
public class TAccountController {
@Autowired
private ITAccountService accountService;
@PostMapping("/dec_account")
ObjectResponse decreaseAccount(@RequestBody AccountDTO accountDTO) {
log.info("่ฏทๆฑ่ดฆๆทๅพฎๆๅก๏ผ{}", accountDTO.toString());
return accountService.decreaseAccount(accountDTO);
}
}
|
[
"627292959@qq.com"
] |
627292959@qq.com
|
bf9a6ba32e838eb56aeaae0fd441f43f446f6005
|
4c5bc80e39bfec777409440d6c2cb52b2e953c91
|
/Lab4-1173710107-master/src/debug/TopVotedCandidate.java
|
86332503b294530569e8d388e459880b80d50594
|
[] |
no_license
|
1173710107/SoftwareStructure
|
0cac2a79d7b5968772e1d05b34b7030f52bd1378
|
2d5157564655e87de3a2147ba53a5409be080a49
|
refs/heads/master
| 2022-09-30T10:34:44.669660
| 2020-06-04T13:22:18
| 2020-06-04T13:22:18
| 269,363,874
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,585
|
java
|
/**
* In an election, the i-th vote was cast for persons[i] at time times[i].
*
* Now, we would like to implement the following query function:
* TopVotedCandidate.q(int t) will return the number of the person that was
* leading the election at time t.
*
* Votes cast at time t will count towards our query. In the case of a tie, the
* most recent vote (among tied candidates) wins.
*
*
*
* Example 1:
*
* Input: ["TopVotedCandidate","q","q","q","q","q","q"],
* [[[0,1,1,0,0,1,0],[0,5,10,15,20,25,30]],[3],[12],[25],[15],[24],[8]]
* Output:
* [null,0,1,1,0,0,1]
*
* Explanation:
* At time 3, the votes are [0], and 0 is leading.
* At time 12, the votes are [0,1,1], and 1 is leading.
* At time 25, the votes are [0,1,1,0,0,1], and 1 is leading (as ties go to the most recent
* vote.)
* This continues for 3 more queries at time 15, 24, and 8.
*
*
* Note:
*
* 1 <= persons.length = times.length <= 5000
* 0 <= persons[i] <= persons.length
* times is a strictly increasing array with all elements in [0, 10^9].
* TopVotedCandidate.q is called at most 10000 times per test case.
* TopVotedCandidate.q(int t) is always called with t >= times[0].
*
*/
package debug;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
class TopVotedCandidate {
List<List<Vote>> A;
public TopVotedCandidate(int[] persons, int[] times) {
A = new ArrayList<List<Vote>>();
Map<Integer, Integer> count = new HashMap<Integer, Integer>();
for (int i = 0; i < persons.length; ++i) {
int p = persons[i], t = times[i];
int c = count.getOrDefault(p, 0);
c++;
count.put(p, c);
while (A.size() <= c)
A.add(new ArrayList<Vote>());
A.get(c).add(new Vote(p, t));
}
}
public int q(int t) {
int lo = 1, hi = A.size() - 1;
while (lo < hi) {
int mi = lo + (hi - lo) / 2;
if(A.get(hi).get(0).time <= t) {
lo = hi;
break;
}
if(mi == lo) {
if(A.get(hi).get(0).time == t) {
lo = hi;
}
break;
}
if (A.get(mi).get(0).time < t)
lo = mi;
else
hi = mi;
}
int i = lo;
lo = 0;
hi = A.get(i).size() - 1;
while (lo < hi) {
int mi = lo + (hi - lo) / 2;
if(A.get(i).get(hi).time <= t) {
lo = hi;
break;
}
if(mi == lo) {
if(A.get(i).get(hi).time == t) {
lo = hi;
}
break;
}
if (A.get(i).get(mi).time < t)
lo = mi;
else
hi = mi;
}
int j = Math.max(lo, 0);
return A.get(i).get(j).person;
}
}
class Vote {
int person, time;
Vote(int p, int t) {
person = p;
time = t;
}
}
|
[
"805402160@qq.com"
] |
805402160@qq.com
|
cf915efb66735b0cec16fb81d0ce135e0d21b581
|
147cec9d3d3a7842d7d747a79af5ff0e606a526a
|
/net/minecraft/command/CommandEnchant.java
|
67ff6ec032a6f58ca7398b50249093fa44218603
|
[] |
no_license
|
LXisCool1337/Async-Src
|
3f365c69a12ef61d1192d5a276473106c4c4b067
|
77ac70ec28e8d2933ea5a554c026c59023ec630d
|
refs/heads/main
| 2023-09-02T20:59:38.814117
| 2021-11-16T19:19:08
| 2021-11-16T19:19:08
| 428,784,004
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,414
|
java
|
package net.minecraft.command;
import java.util.List;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagList;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.BlockPos;
public class CommandEnchant extends CommandBase
{
public String getCommandName()
{
return "enchant";
}
public int getRequiredPermissionLevel()
{
return 2;
}
public String getCommandUsage(ICommandSender sender)
{
return "commands.enchant.usage";
}
public void processCommand(ICommandSender sender, String[] args) throws CommandException
{
if (args.length < 2)
{
throw new WrongUsageException("commands.enchant.usage", new Object[0]);
}
else
{
EntityPlayer entityplayer = getPlayer(sender, args[0]);
sender.setCommandStat(CommandResultStats.Type.AFFECTED_ITEMS, 0);
int i;
try
{
i = parseInt(args[1], 0);
}
catch (NumberInvalidException numberinvalidexception)
{
Enchantment enchantment = Enchantment.getEnchantmentByLocation(args[1]);
if (enchantment == null)
{
throw numberinvalidexception;
}
i = enchantment.effectId;
}
int j = 1;
ItemStack itemstack = entityplayer.getCurrentEquippedItem();
if (itemstack == null)
{
throw new CommandException("commands.enchant.noItem", new Object[0]);
}
else
{
Enchantment enchantment1 = Enchantment.getEnchantmentById(i);
if (enchantment1 == null)
{
throw new NumberInvalidException("commands.enchant.notFound", new Object[] {Integer.valueOf(i)});
}
else if (!enchantment1.canApply(itemstack))
{
throw new CommandException("commands.enchant.cantEnchant", new Object[0]);
}
else
{
if (args.length >= 3)
{
j = parseInt(args[2], enchantment1.getMinLevel(), enchantment1.getMaxLevel());
}
if (itemstack.hasTagCompound())
{
NBTTagList nbttaglist = itemstack.getEnchantmentTagList();
if (nbttaglist != null)
{
for (int k = 0; k < nbttaglist.tagCount(); ++k)
{
int l = nbttaglist.getCompoundTagAt(k).getShort("id");
if (Enchantment.getEnchantmentById(l) != null)
{
Enchantment enchantment2 = Enchantment.getEnchantmentById(l);
if (!enchantment2.canApplyTogether(enchantment1))
{
throw new CommandException("commands.enchant.cantCombine", new Object[] {enchantment1.getTranslatedName(j), enchantment2.getTranslatedName(nbttaglist.getCompoundTagAt(k).getShort("lvl"))});
}
}
}
}
}
itemstack.addEnchantment(enchantment1, j);
notifyOperators(sender, this, "commands.enchant.success", new Object[0]);
sender.setCommandStat(CommandResultStats.Type.AFFECTED_ITEMS, 1);
}
}
}
}
public List<String> addTabCompletionOptions(ICommandSender sender, String[] args, BlockPos pos)
{
return args.length == 1 ? getListOfStringsMatchingLastWord(args, this.getListOfPlayers()) : (args.length == 2 ? getListOfStringsMatchingLastWord(args, Enchantment.func_181077_c()) : null);
}
protected String[] getListOfPlayers()
{
return MinecraftServer.getServer().getAllUsernames();
}
public boolean isUsernameIndex(String[] args, int index)
{
return index == 0;
}
}
|
[
"77858604+LXisCool1337@users.noreply.github.com"
] |
77858604+LXisCool1337@users.noreply.github.com
|
e5e6f6ea59442e06d26a8664a8442a595b06cd6d
|
4e89d371a5f8cca3c5c7e426af1bcb7f1fc4dda3
|
/java/data_structure/Stack/Symmetry.java
|
f6087fd4a741d11c0b2f597fbd7dd56d219ca765
|
[] |
no_license
|
bodii/test-code
|
f2a99450dd3230db2633a554fddc5b8ee04afd0b
|
4103c80d6efde949a4d707283d692db9ffac4546
|
refs/heads/master
| 2023-04-27T16:37:36.685521
| 2023-03-02T08:38:43
| 2023-03-02T08:38:43
| 63,114,995
| 4
| 1
| null | 2023-04-17T08:28:35
| 2016-07-12T01:29:24
|
Go
|
UTF-8
|
Java
| false
| false
| 640
|
java
|
/**
* ้ช่ฏ็ฌฆๅทๆฏๅฆๅนณ่กกๅฏน็งฐ
*/
public class Symmetry {
private static SequenceStack ifSymmetry(String args) {
SequenceStack ts = new SequenceStack(10);
int size = args.length();
for (int i = 0; i < size; i++) {
char charset = args.charAt(i);
switch (charset) {
case '(':
case '[':
case '{':
ts.push(charset);
break;
case ')':
case ']':
case '}':
ts.pop();
break;
default:
continue;
}
}
return ts;
}
public static void main(String[] args) {
String arg = "(aa[bb{cc}])";
SequenceStack st = ifSymmetry(arg);
System.out.println("size is: " + st.size());
}
}
|
[
"1401097251@qq.com"
] |
1401097251@qq.com
|
06ea025a304ef16f5cd0cf0a8b437541a6a19808
|
3bcf1fe16c257ebe1f56dd01d56218a9133d251a
|
/android/Reader/src/main/java/com/agcy/reader/Helpers/ExpandCollapse.java
|
04baba5da7185a083b899a510943e2719685e48d
|
[] |
no_license
|
kioltk/RssReaderAndroid
|
fca362f021072d3bf662bfdf34af986e8dbc5062
|
8917a816820019aecd07c377057e40ea796d923d
|
refs/heads/master
| 2021-01-18T07:47:10.026335
| 2013-12-21T13:11:09
| 2013-12-21T13:11:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,649
|
java
|
package com.agcy.reader.Helpers;
import android.animation.Animator;
import android.animation.AnimatorListenerAdapter;
import android.animation.ValueAnimator;
import android.view.View;
import android.view.ViewGroup;
/**
* Created by kiolt_000 on 10.12.13.
*/
public class ExpandCollapse {
public static ValueAnimator createWidthAnimator(final View view, int start, int end) {
ValueAnimator animator = ValueAnimator.ofInt(start, end);
int size = ( start > end ? start : end );
animator.setDuration( size );
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
int value = (Integer) valueAnimator.getAnimatedValue();
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
layoutParams.width = value;
view.setLayoutParams(layoutParams);
}
});
return animator;
}
public static ValueAnimator createHeightAnimator(final View view, int start, int end) {
ValueAnimator animator = ValueAnimator.ofInt(start, end);
int size = ( start > end ? start : end );
animator.setDuration( size );
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator valueAnimator) {
int value = (Integer) valueAnimator.getAnimatedValue();
ViewGroup.LayoutParams layoutParams = view.getLayoutParams();
layoutParams.height = value;
view.setLayoutParams(layoutParams);
}
});
return animator;
}
public static void expandHorizontal(View view) {
view.setVisibility(View.VISIBLE);
final int widthSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
final int heightSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
view.measure(widthSpec, heightSpec);
int measuredWidth = view.getMeasuredWidth();
int height = view.getHeight();
ValueAnimator animator = createWidthAnimator(view, 0, height);
animator.start();
}
public static void expandVertical(View view) {
view.setVisibility(View.VISIBLE);
final int widthSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
final int heightSpec = View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED);
view.measure(widthSpec, heightSpec);
int measuredHeight = view.getMeasuredHeight();
ValueAnimator animator = createHeightAnimator(view, 0, measuredHeight );
animator.start();
}
public static void collapseHorizontal(final View view){
final int origWidth = view.getWidth();
ValueAnimator animator = createWidthAnimator(view, origWidth, 0);
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animator) {
view.setVisibility(View.GONE);
}
});
animator.start();
}
public static void collapseVertical(final View view) {
final int origHeight = view.getHeight();
ValueAnimator animator = createHeightAnimator(view, origHeight, 0);
animator.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator animator) {
view.setVisibility(View.GONE);
}
});
animator.start();
}
}
|
[
"kioltk@gmail.com"
] |
kioltk@gmail.com
|
a92d20a05dcdb01df74e46819d1791007ab5650e
|
b34404ddb2c04765eb099c58ad8ac614ab84adca
|
/src/com/cicro/wcm/template/velocity/impl/VelocitySerContextImp.java
|
d7013cec515e0325a19107f9054997d4afb90591
|
[] |
no_license
|
373974360/cicroCms
|
a69f46d0148f948a55c22f4a9b60792b958e5744
|
7cd9b157253811046ab9db6a3c2aa91be5eadc48
|
refs/heads/master
| 2020-12-30T07:42:35.825771
| 2020-02-07T09:52:20
| 2020-02-07T09:52:20
| 238,906,940
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,065
|
java
|
/* */ package com.cicro.wcm.template.velocity.impl;
/* */
/* */ import com.cicro.wcm.bean.zwgk.ser.SerCategoryBean;
/* */ import com.cicro.wcm.services.control.site.SiteAppRele;
/* */ import com.cicro.wcm.services.zwgk.ser.SerCategoryManager;
/* */ import com.cicro.wcm.template.velocity.VelocityContextAbstract;
/* */ import java.io.PrintStream;
/* */ import javax.servlet.http.HttpServletRequest;
/* */ import org.apache.velocity.VelocityContext;
/* */
/* */ public class VelocitySerContextImp extends VelocityContextAbstract
/* */ {
/* */ public VelocitySerContextImp(HttpServletRequest request)
/* */ {
/* 13 */ super(request);
/* */ }
/* */
/* */ public VelocitySerContextImp()
/* */ {
/* */ }
/* */
/* */ public void vcontextPut(String key, Object o)
/* */ {
/* 22 */ this.vcontext.put(key, o);
/* */ }
/* */
/* */ public void setSerTopicTemplateID(String ser_id, String temp_type)
/* */ {
/* 27 */ this.site_id = SiteAppRele.getSiteIDByAppID("ggfw");
/* 28 */ if ((ser_id != null) && (!"".equals(ser_id)))
/* */ {
/* 30 */ this.vcontext.put("ser_id", ser_id);
/* 31 */ System.out.println("setSerTopicTemplateID--------" + this.vcontext.get("ser_id"));
/* */ try {
/* 33 */ SerCategoryBean scb = SerCategoryManager.getRootSerCategoryBean(Integer.parseInt(ser_id));
/* 34 */ if ("index".equals(temp_type))
/* */ {
/* 36 */ this.template_id = scb.getTemplate_index();
/* */ }
/* 38 */ if ("list".equals(temp_type))
/* */ {
/* 40 */ this.template_id = scb.getTemplate_list();
/* */ }
/* 42 */ if ("content".equals(temp_type))
/* */ {
/* 44 */ this.template_id = scb.getTemplate_content();
/* */ }
/* */ }
/* */ catch (Exception e) {
/* 48 */ e.printStackTrace();
/* 49 */ System.out.println("setSerTopicTemplateID -- SerBean is null id:" + ser_id);
/* */ }
/* */ }
/* */ }
/* */
/* */ public void setSerInfoListTemplateID(String ser_id)
/* */ {
/* 56 */ this.site_id = SiteAppRele.getSiteIDByAppID("ggfw");
/* 57 */ if ((ser_id != null) && (!"".equals(ser_id)))
/* */ {
/* 59 */ this.vcontext.put("ser_id", ser_id);
/* 60 */ this.template_id = SerCategoryManager.getSerTemplateID("list");
/* */ }
/* */ }
/* */
/* */ public static void main(String[] args)
/* */ {
/* 66 */ VelocitySerContextImp s = new VelocitySerContextImp();
/* 67 */ s.template_id = "1122";
/* 68 */ s.site_id = "11111ddd";
/* 69 */ System.out.println(s.parseTemplate("#set($serObject=$SerData.getSerObject(\"25\"))<div>$serObject.cat_name</div>222"));
/* */ }
/* */ }
/* Location: C:\Users\Administrator\Desktop\wcm\shared\classes.zip
* Qualified Name: classes.com.cicro.wcm.template.velocity.impl.VelocitySerContextImp
* JD-Core Version: 0.6.2
*/
|
[
"373974360@qq.com"
] |
373974360@qq.com
|
d983822551cd5125d5b731c008bae84d04e80f7d
|
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
|
/examples/commons-math3/mutations/mutants-BicubicSplineInterpolator/159/org/apache/commons/math3/analysis/interpolation/BicubicSplineInterpolator.java
|
377034a50585ca0215ef8e54424339db61ecd42d
|
[
"BSD-3-Clause",
"Minpack",
"Apache-2.0"
] |
permissive
|
SmartTests/smartTest
|
b1de326998857e715dcd5075ee322482e4b34fb6
|
b30e8ec7d571e83e9f38cd003476a6842c06ef39
|
refs/heads/main
| 2023-01-03T01:27:05.262904
| 2020-10-27T20:24:48
| 2020-10-27T20:24:48
| 305,502,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,804
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math3.analysis.interpolation;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.polynomials.PolynomialSplineFunction;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.exception.NoDataException;
import org.apache.commons.math3.exception.NonMonotonicSequenceException;
import org.apache.commons.math3.exception.NumberIsTooSmallException;
import org.apache.commons.math3.util.MathArrays;
/**
* Generates a bicubic interpolating function.
*
* @version $Id$
* @since 2.2
*/
public class BicubicSplineInterpolator
implements BivariateGridInterpolator {
/**
* {@inheritDoc}
*/
public BicubicSplineInterpolatingFunction interpolate(final double[] xval,
final double[] yval,
final double[][] fval)
throws NoDataException, DimensionMismatchException,
NonMonotonicSequenceException, NumberIsTooSmallException {
if (xval.length == 0 || yval.length == 0 || fval.length == 0) {
throw new NoDataException();
}
if (xval.length != fval.length) {
throw new DimensionMismatchException(xval.length, fval.length);
}
MathArrays.checkOrder(xval);
MathArrays.checkOrder(yval);
final int xLen = xval.length;
final int yLen = yval.length;
// Samples (first index is y-coordinate, i.e. subarray variable is x)
// 0 <= i < xval.length
// 0 <= j < yval.length
// fX[j][i] = f(xval[i], yval[j])
final double[][] fX = new double[yLen][xLen];
for (int i = 0; i < xLen; i++) {
if (fval[i].length != yLen) {
throw new DimensionMismatchException(fval[i].length, yLen);
}
for (int j = 0; j < yLen; j++) {
fX[j][i] = fval[i][j];
}
}
final SplineInterpolator spInterpolator = new SplineInterpolator();
// For each line y[j] (0 <= j < yLen), construct a 1D spline with
// respect to variable x
final PolynomialSplineFunction[] ySplineX = new PolynomialSplineFunction[yLen];
for (int j = 0; j < yLen; j++) {
ySplineX[j] = spInterpolator.interpolate(xval, fX[j]);
}
// For each line x[i] (0 <= i < xLen), construct a 1D spline with
// respect to variable y generated by array fY_1[i]
final PolynomialSplineFunction[] xSplineY = new PolynomialSplineFunction[xLen];
for (int i = 0; i < xLen; i++) {
xSplineY[i] = spInterpolator.interpolate(yval, fval[i]);
}
// Partial derivatives with respect to x at the grid knots
final double[][] dFdX = new double[xLen][yLen];
for (int j = 0; j < yLen; j++) {
final UnivariateFunction f = ySplineX[j].derivative();
for (int i = 0; i < xLen; i++) {
dFdX[i][j] = f.value(xval[i]);
}
}
// Partial derivatives with respect to y at the grid knots
final double[][] dFdY = new double[xLen][yLen];
for (int i = 0; i < xLen; i++) {
final UnivariateFunction f = xSplineY[i].derivative();
for (int j = 0; j < yLen; j++) {
dFdY[i][j] = f.value(yval[j]);
}
}
// Cross partial derivatives
final double[][] d2FdXdY = new double[xLen][yLen];
for (int i = 0; i < xLen ; i++) {
final int nI = nextIndex(i, xLen);
final int pI = previousIndex(i);
for (int j = 0; j < yLen; j++) {
final int nJ = nextIndex(j, yLen);
final int pJ = previousIndex(j);
d2FdXdY[i][j] = (fval[nI][nJ] - fval[nI][pJ] -
fval[pI][nJ] + fval[pI][pJ]) /
((xval[nI] - xval[pI]) * (yval[nJ] - yval[pJ]));
}
}
// Create the interpolating splines
return new BicubicSplineInterpolatingFunction(xval, yval, fval,
dFdX, dFdY, d2FdXdY);
}
/**
* Computes the next index of an array, clipping if necessary.
* It is assumed (but not checked) that {@code i >= 0}.
*
* @param i Index.
* @param max Upper limit of the array.
* @return the next index.
*/
private int nextIndex(int i, int max) {
final int index = i + 1;
return index < max ? index : index - 1;
}
/**
* Computes the previous index of an array, clipping if necessary.
* It is assumed (but not checked) that {@code i} is smaller than the size
* of the array.
*
* @param i Index.
* @return the previous index.
*/
private int previousIndex(int i) {
final int index = i - 1;
return index >= 0 ? index : -1;
}
}
|
[
"kesina@Kesinas-MBP.lan"
] |
kesina@Kesinas-MBP.lan
|
71efaadb0eac8d037898673c323b5c4c64baa37a
|
5bfdd3e3e61e046a56f5e4714bd13e4bf0bf359d
|
/algorithm/src/boj/RecommendCandidate1713.java
|
3d1e5f4f105c70dff992984f88d23eb328ca203a
|
[
"MIT"
] |
permissive
|
Oraindrop/algorithm
|
e40b0c36a6728bc3f3599b7769d581cc3e59e9d8
|
7081464a4153c307c5ad6e92523b7d6f74fce332
|
refs/heads/master
| 2022-01-18T15:11:13.959202
| 2021-12-30T14:39:17
| 2021-12-30T14:39:17
| 146,498,419
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,511
|
java
|
package boj;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.StringTokenizer;
public class RecommendCandidate1713 {
public static void main(String[] args) throws NumberFormatException, IOException {
// TODO Auto-generated method stub
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
int size = Integer.parseInt(br.readLine());
int n = Integer.parseInt(br.readLine());
StringTokenizer st = new StringTokenizer(br.readLine());
List<Student> list = new ArrayList<>();
for(int i = 0; i < n; i++) {
int key = Integer.parseInt(st.nextToken());
int index = isContain(key, list);
if(index != -1) {
list.get(index).hit();
eatAges(list);
continue;
}
if(!isFull(size, list)) {
eatAges(list);
list.add(new Student(key));
continue;
}
removeStudent(list);
eatAges(list);
list.add(new Student(key));
}
List<Integer> answers = new ArrayList<>();
for(Student s : list) {
answers.add(s.getKey());
}
Collections.sort(answers);
for(int i = 0; i < answers.size() - 1; i++) {
System.out.print(answers.get(i) + " ");
}
System.out.println(answers.get(answers.size()-1));
}
static void eatAges(List<Student> list) {
for(Student s : list) {
s.eatAge();
}
}
static int isContain(int key, List<Student> list) {
for(int i = 0; i < list.size(); i++) {
if(list.get(i).isStudent(key)) return i;
}
return -1;
}
static boolean isFull(int maxSize, List<Student> list) {
return list.size() == maxSize;
}
static void removeStudent(List<Student> list) {
Collections.sort(list);
list.remove(list.get(0));
}
}
class Student implements Comparable<Student>{
private int key;
private int age;
private int hit;
public Student(int key) {
this.key = key;
this.age = 1;
this.hit = 1;
}
public int getKey() {
return key;
}
public boolean isStudent(int key) {
return key == this.key;
}
public void hit() {
this.hit++;
}
public void eatAge() {
this.age++;
}
@Override
public int compareTo(Student s) {
// TODO Auto-generated method stub
if(this.hit > s.hit) return 1;
if(this.hit < s.hit) return -1;
if(this.age > s.age) return -1;
if(this.age < s.age) return 1;
return 0;
}
@Override
public String toString() {
return "Student [key=" + key + ", age=" + age + ", hit=" + hit + "]";
}
}
|
[
"chltmdals115@gmail.com"
] |
chltmdals115@gmail.com
|
c070d2496c537d1b4c7f19a995389fb623a6ddb9
|
cb0e7d6493b23e870aa625eb362384a10f5ee657
|
/solutions/java/0999.java
|
3831a784d4d59b4b8f5a94e92c16c7f1d9fd7f4a
|
[] |
no_license
|
sweetpand/LeetCode-1
|
0acfa603af254a3350d457803449a91322f2d1a7
|
65f4ef26cb8b2db0b4bf8c42bfdc76421b479f94
|
refs/heads/master
| 2022-11-14T07:01:42.502172
| 2020-07-12T12:25:56
| 2020-07-12T12:25:56
| 279,088,171
| 1
| 0
| null | 2020-07-12T15:03:20
| 2020-07-12T15:03:19
| null |
UTF-8
|
Java
| false
| false
| 571
|
java
|
class Solution {
public int numRookCaptures(char[][] board) {
int ans = 0;
int i0 = 0;
int j0 = 0;
for (int i = 0; i < 8; ++i)
for (int j = 0; j < 8; ++j)
if (board[i][j] == 'R') {
i0 = i;
j0 = j;
}
for (int[] d : new int[][] { { 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 } })
for (int i = i0 + d[0], j = j0 + d[1]; 0 <= i && i < 8 && 0 <= j && j < 8; i += d[0], j += d[1]) {
if (board[i][j] == 'p')
++ans;
if (board[i][j] != '.')
break;
}
return ans;
}
}
|
[
"walkccray@gmail.com"
] |
walkccray@gmail.com
|
d518d25fb7e94544d9099d90bb274eb3283f7077
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/alibaba--druid/6277b490bdd4dfb0c444f1619d756eb841a4a34f/before/EqualTest_interval_mysql.java
|
064ac6c278ed3e9bbcb1d7521b5c173f87344aaa
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,378
|
java
|
package com.alibaba.druid.bvt.sql;
import junit.framework.TestCase;
import org.junit.Assert;
import com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlIntervalExpr;
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlExprParser;
import com.alibaba.druid.sql.parser.SQLExprParser;
public class EqualTest_interval_mysql extends TestCase {
public void test_exits() throws Exception {
String sql = "INTERVAL 3 YEAR";
String sql_c = "INTERVAL 3 MONTH";
MySqlIntervalExpr exprA, exprB, exprC;
{
SQLExprParser parser = new MySqlExprParser(sql);
exprA = (MySqlIntervalExpr) parser.expr();
}
{
SQLExprParser parser = new MySqlExprParser(sql);
exprB = (MySqlIntervalExpr) parser.expr();
}
{
SQLExprParser parser = new MySqlExprParser(sql_c);
exprC = (MySqlIntervalExpr) parser.expr();
}
Assert.assertEquals(exprA, exprB);
Assert.assertNotEquals(exprA, exprC);
Assert.assertTrue(exprA.equals(exprA));
Assert.assertFalse(exprA.equals(new Object()));
Assert.assertEquals(exprA.hashCode(), exprB.hashCode());
Assert.assertEquals(new MySqlIntervalExpr(), new MySqlIntervalExpr());
Assert.assertEquals(new MySqlIntervalExpr().hashCode(), new MySqlIntervalExpr().hashCode());
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
9c4a91f48df469af988f08d62ce475dee67b8e92
|
5b8c2dd9fcd176f5c77b959c8357402e7ce0474d
|
/lambda-core/src/main/java/com/yatop/lambda/core/enums/SystemParameterEnum.java
|
3256d668a1c29f0ff8df9ff2aa12f34bf7db226c
|
[] |
no_license
|
ruhengChen/lambda-mls
|
6cbfc5804193f68bbc98a5900d7e3fa91cf6ef00
|
2450c25c25c91bb3af1946fbf21206a6636d71d0
|
refs/heads/master
| 2020-04-20T05:45:30.853959
| 2019-02-13T02:36:57
| 2019-02-13T02:36:57
| 168,664,310
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,171
|
java
|
package com.yatop.lambda.core.enums;
public enum SystemParameterEnum {
PR_CACHE_DATA_EXPIRE_DAYS( "PR_CACHE_DATA_EXPIRE_DAYS", "้กน็ฎ็ฎก็ | ไธดๆถ็ผๅญๆฐๆฎ่กจ่ฟๆๅคฉๆฐ","21"),
WK_FLOW_MAX_NODES( "WK_FLOW_MAX_NODES", "ๅทฅไฝๆตๅผๆ | ๅทฅไฝๆตๆญฃๅธธ่็นๆๅคงๆฐ้","512"),
WK_FLOW_SCHEMA_MAX_FIELDS( "WK_FLOW_SCHEMA_MAX_FIELDS", "ๅทฅไฝๆตๅผๆ | ๅทฅไฝๆตๆฐๆฎ่กจๆๅคงๅญๆฎตๆฐ้","1024"),
WK_FLOW_MAX_GLOBAL_PARAMETERS( "WK_FLOW_MAX_GLOBAL_PARAMETERS", "ๅทฅไฝๆตๅผๆ | ๅทฅไฝๆตๆๅคงๅ
จๅฑๅๆฐๆฐ้","16"),
CF_HDFS_SITE_defaultFS( "CF_HDFS_SITE_defaultFS", "่ฎก็ฎๆกๆถ | HDFS้ป่ฎคๆไปถ็ณป็ป", "hdfs://127.0.0.1:9000"),
CF_HDFS_WORK_ROOT( "CF_HDFS_WORK_ROOT", "่ฎก็ฎๆกๆถ | HDFSๅทฅไฝๆ น็ฎๅฝ","/user/lambda_mls"),
CF_LOCAL_WORK_ROOT( "CF_LOCAL_WORK_ROOT", "่ฎก็ฎๆกๆถ | ๆฌๅฐๅทฅไฝๆ น็ฎๅฝ","/opt/lambda_mls"),
CF_JOB_FILE_DIR_NAME( "CF_JOB_FILE_DIR_NAME", "่ฎก็ฎๆกๆถ | ไฝไธๆไปถๅญๆพ็ฎๅฝๅ","proc"),
CF_DATA_FILE_DIR_NAME( "CF_DATA_FILE_DIR_NAME", "่ฎก็ฎๆกๆถ | ๆฐๆฎๆไปถๅญๆพ็ฎๅฝๅ","dw_data"),
CF_MODEL_FILE_DIR_NAME( "CF_MODEL_FILE_DIR_NAME", "่ฎก็ฎๆกๆถ | ๆจกๅๆไปถๅญๆพ็ฎๅฝๅ","mw_data"),
CF_FLOW_FILE_DIR_NAME( "CF_FLOW_FILE_DIR_NAME", "่ฎก็ฎๆกๆถ | ๅทฅไฝๆตๆไปถๅญๆพ็ฎๅฝๅ","flow_data"),
CF_LIB_FILE_DIR_NAME( "CF_LIB_FILE_DIR_NAME", "่ฎก็ฎๆกๆถ | ๅบๆไปถๅญๆพ็ฎๅฝๅ","lib"),
CF_HDFS_COMPONENT_JAR_DIR( "CF_HDFS_COMPONENT_JAR_DIR", "่ฎก็ฎๆกๆถ | hdfs scala็ปไปถjarๅ
็ฎๅฝ","/user/lambda_mls/lib/spark"),
CF_HDFS_COMPONENTT_JAR_FILE( "CF_HDFS_COMPONENTT_JAR_FILE", "่ฎก็ฎๆกๆถ | hdfs scala็ปไปถjarๅ
ๆไปถๅ","lambda-component-1.0.0.jar"),
CF_SPARK_EXECUTOR_NUMBER( "CF_SPARK_EXECUTOR_NUMBER", "่ฎก็ฎๆกๆถ | spark executorๆฐ้","2"),
CF_SPARK_EXECUTOR_CORES( "CF_SPARK_EXECUTOR_CORES", "่ฎก็ฎๆกๆถ | spark executor็บฟ็จๆฐ้","8"),
CF_SPARK_EXECUTOR_MEMORY( "CF_SPARK_EXECUTOR_MEMORY", "่ฎก็ฎๆกๆถ | spark executorๅ
ๅญๅคงๅฐ","2048"),
CF_SPARK_DRIVER_CORES( "CF_SPARK_DRIVER_CORES", "่ฎก็ฎๆกๆถ | spark driver็บฟ็จๆฐ้","8"),
CF_SPARK_DRIVER_MEMORY( "CF_SPARK_DRIVER_MEMORY", "่ฎก็ฎๆกๆถ | spark driverๅ
ๅญๅคงๅฐ","2048");
private String paramCode;
private String paramName;
private String paramDefaultValue;
public String getParamCode() {
return paramCode;
}
public String getParamName() {
return paramName;
}
public String getParamDefaultValue() {
return paramDefaultValue;
}
SystemParameterEnum(String paramCode, String paramName, String paramDefaultValue) {
this.paramCode = paramCode;
this.paramName = paramName;
this.paramDefaultValue = paramDefaultValue;
}
}
|
[
"tomlee714@126.com"
] |
tomlee714@126.com
|
b1461c50d3311942ebfc813d97023775a1520ade
|
67310b5d7500649b9d53cf62226ec2d23468413c
|
/trunk/modules/testcase-generator-intents/src/Mapping.java
|
f6c0c63e689ac273e51ef4ec6a4760b3fc4397c0
|
[] |
no_license
|
csnowleopard/guitar
|
e09cb77b2fe8b7e38d471be99b79eb7a66a5eb02
|
1fa5243fcf4de80286d26057db142b5b2357f614
|
refs/heads/master
| 2021-01-19T07:53:57.863136
| 2013-06-06T15:26:25
| 2013-06-06T15:26:25
| 10,353,457
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,680
|
java
|
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
public class Mapping {
static HashMap<String, HashSet<Intent>> temp = new HashMap<String, HashSet<Intent>>();
static HashSet<HashMap<Integer, String>> completePath = new HashSet<HashMap<Integer,String>>();
public static void main(String args[]){
Intent ia = new Intent(); ia.activity = "baba.b";
Intent ib = new Intent(); ib.activity = "caca.c";
Intent ic = new Intent(); ic.activity = "aba.a";
Intent id = new Intent(); id.activity = "aba.a";
HashSet<Intent> ha = new HashSet<Intent>(); ha.add(ia);
HashSet<Intent> hb = new HashSet<Intent>(); hb.add(ib);
HashSet<Intent> hc = new HashSet<Intent>(); hc.add(ic);
HashSet<Intent> hd = new HashSet<Intent>(); hd.add(id);
temp.put("aba.a", ha); temp.put("baba.b", hb); temp.put("caca.c", hc);
temp.put("d", hd);
for(String src: temp.keySet()){
HashMap<Integer,String> path = new HashMap<Integer,String>();
path.put(1,src);
Boolean bla = iterate(path, src);
}
for(HashMap<Integer, String> h: completePath){
for(int i = 1; i < h.size(); i++)
System.out.print(h.get(i) + " -> ");
System.out.println();
}
}
public static boolean iterate(HashMap<Integer,String> path, String curAct){
if(!temp.containsKey(curAct)){
completePath.add(path);
return true;
}
for(Intent targetIntent: temp.get(curAct)){
String act = targetIntent.activity;
if(path.values().contains(act)){
completePath.add(path);
} else {
int i = path.size()+1;
path.put(i, act);
Boolean bla = iterate(path, act);
}
}
return true;
}
}
|
[
"csnowleopard@gmail.com"
] |
csnowleopard@gmail.com
|
e35987d0a500f3e6525a2b4c4f858ec59d6e4186
|
781e2692049e87a4256320c76e82a19be257a05d
|
/assignments/java/lab02/full_src/67/DateConverter.java
|
81df66d9679a3e8fa8dba24a292ed6f4d97faa47
|
[] |
no_license
|
itsolutionscorp/AutoStyle-Clustering
|
54bde86fe6dbad35b568b38cfcb14c5ffaab51b0
|
be0e2f635a7558f56c61bc0b36c6146b01d1e6e6
|
refs/heads/master
| 2020-12-11T07:27:19.291038
| 2016-03-16T03:18:00
| 2016-03-16T03:18:42
| 59,454,921
| 4
| 0
| null | 2016-05-23T05:40:56
| 2016-05-23T05:40:56
| null |
UTF-8
|
Java
| false
| false
| 1,278
|
java
|
import java.io.*;
public class DateConverter {
// Given a day number in 2008, an integer between 1 and 366,
// as a command-line argument, prints the date in month/day format.
// Example: java DateConverter 365
// should print 12/30
// The code is missing two assignment statements.
public static void main (String[] args) {
int dayOfYear = 0;
try {
dayOfYear = Integer.parseInt (args[0]);
} catch (NumberFormatException e) {
e.printStackTrace();
}
int month, dateInMonth, daysInMonth;
month = 1;
daysInMonth = 31;
while (dayOfYear > daysInMonth) {
// *** Here is one possible place to put assignment statements.
month = month + 1;
dayOfYear = dayOfYear - daysInMonth;
if (month == 2) {
daysInMonth = 29;
} else if (month == 4 || month == 6 || month == 9 || month == 11) {
daysInMonth = 30;
} else {
daysInMonth = 31;
}
// *** Here is another possible place to put assignment statements.
}
dateInMonth = dayOfYear;
System.out.println (month + "/" + dateInMonth);
}
}
|
[
"moghadam.joseph@gmail.com"
] |
moghadam.joseph@gmail.com
|
87fac41b6322a501413e1df6fd3a5d1cc8bebbc6
|
c444c305864c67fb5bac894da4e54c186c045cbe
|
/src/leetcode/easy/no26.java
|
a51da5c6e1946f35dd9b057aeede5cc7ae69c814
|
[] |
no_license
|
AaronX123/mashibing
|
fe0beb37f473c7f73489b9beb9ba25ce3d15879b
|
31981705746fbb18b0a004ccb0cd30fcf52eaabe
|
refs/heads/master
| 2023-04-14T07:52:18.198816
| 2021-04-18T14:15:26
| 2021-04-18T14:15:26
| 299,470,690
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 858
|
java
|
package leetcode.easy;
public class no26 {
public int removeDuplicates(int[] nums) {
int count = 1;
for (int i = 0; i < nums.length; ++i) {
// ๆพๅฐๅ้ข็ฌฌไธไธชไธๅ็ไฝ็ฝฎ
int j = i + 1;
for (; j < nums.length; j++) {
if (nums[i] == nums[j]) {
continue;
}
break;
}
// ๅฐ็ฌฌไธไธชไธๅ็ไฝ็ฝฎๅ
็ด ๆพๅฐiๅ้ข๏ผ็ถๅiๅๆ็ฌฌไธไธๅไฝ็ฝฎๅ
if (count < nums.length && j < nums.length) {
nums[count] = nums[j];
i = j - 1;
count++;
}
}
return count;
}
public static void main(String[] args) {
System.out.println(new no26().removeDuplicates(new int[] {1,1,1,2,2,2,2,2,3,3,3,4}));
}
}
|
[
"739243573@qq.com"
] |
739243573@qq.com
|
0d4ef816892205c112878876daed33d040430317
|
d23a66807b2aa2b4866d0620c59cba27e4f1f756
|
/easy-core/src/main/java/net/dreamlu/easy/commons/plugin/sqlinxml/SqlInXmlPlugin.java
|
e62c6f05510466ecdfe85cc5b29a6cb961944ec8
|
[
"MIT"
] |
permissive
|
ChunMengLu/Easy4JFinal
|
0bd8e3bf65d1d0d16ca01ab716bc9774ff694a4f
|
2df6edc101af660a448ab59ceddaa9d825d6773c
|
refs/heads/master
| 2020-12-04T02:40:45.195825
| 2017-01-13T11:35:11
| 2017-01-13T11:35:11
| 66,321,954
| 5
| 0
|
MIT
| 2020-09-08T10:51:24
| 2016-08-23T01:36:34
|
Java
|
UTF-8
|
Java
| false
| false
| 3,363
|
java
|
package net.dreamlu.easy.commons.plugin.sqlinxml;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;
import com.jfinal.plugin.IPlugin;
import net.dreamlu.easy.commons.searcher.ResourceMatcherSearcher;
import net.dreamlu.easy.commons.utils.ClassUtils;
import net.dreamlu.easy.commons.utils.IOUtils;
import net.dreamlu.easy.commons.utils.XmlHelper;
/**
* ้ป่ฎคๆซๆclassPathไธ็sqls็ฎๅฝ
* ๅ็
งJFinal-ext้้ข็ๆไปถๅ
* @author L.cm
*/
public class SqlInXmlPlugin implements IPlugin {
private Map<String, String> sqlMap;
private String[] sqlPkg;
public SqlInXmlPlugin() {
this(new String[]{"sqls"});
}
public SqlInXmlPlugin(String... sqlPkg) {
this.sqlPkg = sqlPkg;
sqlMap = new HashMap<String, String>();
}
@Override
public boolean start() {
if (null == sqlPkg) {
throw new NullPointerException("sqlPkgs is null!");
}
// ๆฅๆพsql.xmlๆไปถ
Set<String> xmlSet = ResourceMatcherSearcher.getFiles(sqlPkg, "*sql.xml");
ClassLoader classLoader = ClassUtils.getClassLoader();
XmlHelper xmlHelper = null;
for (String resource : xmlSet) {
InputStream is = classLoader.getResourceAsStream(resource);
xmlHelper = XmlHelper.of(is);
parseSql(xmlHelper);
IOUtils.closeQuietly(is);
}
SqlKit.init(sqlMap);
return true;
}
/**
* ่งฃๆxml
* @param xmlHelper xml่งฃๆ
*/
private void parseSql(XmlHelper xmlHelper) {
Node mapperNode = xmlHelper.getNode("mapper");
if (null == mapperNode) return;
String namespace = xmlHelper.getString(mapperNode, "@namespace");
NodeList sqlList = xmlHelper.getNodeList(mapperNode, "sql");
for (int i = 0; i < sqlList.getLength(); i++) {
Node sqlNode = sqlList.item(i);
String id = xmlHelper.getString(sqlNode, "@id");
Node select = xmlHelper.getNode(sqlNode, "select");
Node ext = xmlHelper.getNode(sqlNode, "ext");
String sqlKey = namespace + "#" + id;
if (null == select && null == ext) {
String sql = xmlHelper.getString(sqlNode, "text()");
put(sqlKey, sql);
continue;
}
if (null != select) {
String sql = xmlHelper.getString(select, "text()");
put(sqlKey + "@select", sql);
}
if (null != ext) {
String sql = xmlHelper.getString(ext, "text()");
put(sqlKey + "@ext", sql);
}
}
}
/**
* ่ฃ
่ฝฝๅนถๅค็sql๏ผๅๅฐไธๅฟ
่ฆ็ไธๅฏ่งๅญ็ฌฆ
* @param sqlKey sqlKey
* @param sqlValue sql
*/
private void put(String sqlKey, String sqlValue) {
sqlValue = sqlValue.replaceAll("\\s+", " ").trim();
sqlMap.put(sqlKey, sqlValue);
}
@Override
public boolean stop() {
sqlMap.clear();
sqlMap = null;
sqlPkg = null;
return true;
}
}
|
[
"596392912@qq.com"
] |
596392912@qq.com
|
3a279863b5345831bdc7db128ca6f4af6a4cd0e9
|
cf5ff8e0bbd93e0d3110169bc7f89e2a2b2be60d
|
/app/src/test/java/com/thinkcoo/mobile/ApplicationStub.java
|
ebb6051885fc542580da861a9fdb396e68c27955
|
[] |
no_license
|
yaolu0311/ThinkcooRefactor-2016526
|
993c09b50719322d9d89621f2d991e4687ab81f8
|
bfe011a0650ca0c80932dc45c2e60868966afda6
|
refs/heads/master
| 2020-09-26T05:30:24.155465
| 2016-09-05T07:12:13
| 2016-09-05T07:12:13
| 67,396,724
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 162
|
java
|
package com.thinkcoo.mobile;
import android.app.Application;
/**
* Created by Robert.yao on 2016/5/12.
*/
public class ApplicationStub extends Application{
}
|
[
"yaolu0311@163.com"
] |
yaolu0311@163.com
|
ebd5e7573b4cf0db4fcceeabfa4993f90f6a080a
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/repairnator/learning/6449/ProjectInspector4Bears.java
|
92c6a9d121e6e6b0683c26145ca9c4622c51cbbe
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,111
|
java
|
package fr.inria.spirals.repairnator.process.inspectors;
import fr.inria.spirals.repairnator.BuildToBeInspected;
import fr.inria.spirals.repairnator.process.step.checkoutrepository.CheckoutBuggyBuildTestCode;
import fr.inria.spirals.repairnator.process.step.paths.ComputeClasspath;
import fr.inria.spirals.repairnator.process.step.paths.ComputeModules;
import fr.inria.spirals.repairnator.process.step.paths.ComputeSourceDir;
import fr.inria.spirals.repairnator.process.step.paths.ComputeTestDir;
import fr.inria.spirals.repairnator. process.step.push.*;
import fr.inria.spirals.repairnator.states.ScannedBuildStatus;
import fr.inria.spirals.repairnator.notifier.AbstractNotifier;
import fr.inria.spirals.repairnator.process.step.*;
import fr.inria.spirals.repairnator.process.step.checkoutrepository.CheckoutPatchedBuild;
import fr.inria.spirals.repairnator.process.step.checkoutrepository.CheckoutBuggyBuild;
import fr.inria.spirals.repairnator.process.step.checkoutrepository.CheckoutBuggyBuildSourceCode;
import fr.inria.spirals.repairnator.process.step.gatherinfo.BuildShouldFail;
import fr.inria.spirals.repairnator.process.step.gatherinfo.BuildShouldPass;
import fr.inria.spirals.repairnator.process.step.gatherinfo.GatherTestInformation;
import fr.inria.spirals.repairnator.serializer.AbstractDataSerializer;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.List;
/**
* Created by fermadeiral.
*/
public class ProjectInspector4Bears extends ProjectInspector {
private final Logger logger = LoggerFactory.getLogger(ProjectInspector4Bears.class);
private boolean bug;
private String bugType;
public ProjectInspector4Bears(BuildToBeInspected buildToBeInspected, String workspace, List<AbstractDataSerializer> serializers, List<AbstractNotifier> notifiers) {
super(buildToBeInspected, workspace, serializers, notifiers);
this.bug = false;
}
protected void initProperties() {
this.getJobStatus().getProperties().setVersion("Bears 1.0");
super.initProperties();
}
public String getRemoteBranchName() {
return this.getRepoSlug().replace('/', '-') + '-' + this.getBuggyBuild().getId() + '-' + this.getPatchedBuild().getId();
}
public void run() {
AbstractStep cloneRepo = new CloneRepository(this);
if (this.getBuildToBeInspected().getStatus() == ScannedBuildStatus.FAILING_AND_PASSING) {
cloneRepo.addNextStep(new CheckoutBuggyBuild(this, true, CheckoutBuggyBuild.class.getSimpleName()+"Candidate"))
.addNextStep(new ComputeSourceDir(this, false, true))
.addNextStep(new ComputeTestDir(this, false))
.addNextStep(new BuildProject(this, true, BuildProject.class.getSimpleName()+"BuggyBuildCandidate"))
.addNextStep(new TestProject(this, true, TestProject.class.getSimpleName()+"BuggyBuildCandidate"))
.addNextStep(new GatherTestInformation(this, true, new BuildShouldFail(), false, GatherTestInformation.class.getSimpleName()+"BuggyBuildCandidate"))
.addNextStep(new InitRepoToPush(this))
.addNextStep(new ComputeClasspath(this, false))
.addNextStep(new ComputeModules(this, false))
.addNextStep(new CheckoutPatchedBuild(this, true, CheckoutPatchedBuild.class.getSimpleName()+"Candidate"))
.addNextStep(new BuildProject(this, true, BuildProject.class.getSimpleName()+"PatchedBuildCandidate"))
.addNextStep(new TestProject(this, true, TestProject.class.getSimpleName()+"PatchedBuildCandidate"))
.addNextStep(new GatherTestInformation(this, true, new BuildShouldPass(), true, GatherTestInformation.class.getSimpleName()+"PatchedBuildCandidate"))
.addNextStep(new CommitPatch(this, CommitType.COMMIT_HUMAN_PATCH));
} else {
if (this.getBuildToBeInspected().getStatus() == ScannedBuildStatus.PASSING_AND_PASSING_WITH_TEST_CHANGES) {
cloneRepo.addNextStep(new CheckoutPatchedBuild(this, true, CheckoutPatchedBuild.class.getSimpleName()+"Candidate"))
.addNextStep(new ComputeSourceDir(this, true, true))
.addNextStep(new ComputeTestDir(this, true))
.addNextStep(new CheckoutBuggyBuildSourceCode(this, true, "CheckoutBuggyBuildCandidateSourceCode"))
.addNextStep(new BuildProject(this, true, BuildProject.class.getSimpleName()+"BuggyBuildCandidateSourceCode"))
.addNextStep(new TestProject(this, true, TestProject.class.getSimpleName()+"BuggyBuildCandidateSourceCode"))
.addNextStep(new GatherTestInformation(this, true, new BuildShouldFail(), false, GatherTestInformation.class.getSimpleName()+"BuggyBuildCandidateSourceCode"))
.addNextStep(new CheckoutBuggyBuildTestCode(this, true))
.addNextStep(new InitRepoToPush(this))
.addNextStep(new ComputeClasspath(this, false))
.addNextStep(new ComputeModules(this, false))
.addNextStep(new CheckoutBuggyBuildSourceCode(this, true, "CheckoutBuggyBuildCandidateSourceCode"))
.addNextStep(new CommitChangedTests(this))
.addNextStep(new CheckoutPatchedBuild(this, true, CheckoutPatchedBuild.class.getSimpleName()+"Candidate"))
.addNextStep(new BuildProject(this, true, BuildProject.class.getSimpleName()+"PatchedBuildCandidate"))
.addNextStep(new TestProject(this, true, TestProject.class.getSimpleName()+"PatchedBuildCandidate"))
.addNextStep(new GatherTestInformation(this, true, new BuildShouldPass(), true, GatherTestInformation.class.getSimpleName()+"PatchedBuildCandidate"))
.addNextStep(new CommitPatch(this, CommitType.COMMIT_HUMAN_PATCH));
} else {
this.logger.debug("The pair of builds " + this.getBuggyBuild().getId() + ", " +
this.getPatchedBuild().getId() + " is not interesting.");
return;
}
}
super.setFinalStep(new WritePropertyFile(this));
super.getFinalStep()
.addNextStep(new CommitProcessEnd(this))
.addNextStep(new PushProcessEnd(this));
cloneRepo.setDataSerializer(this.getSerializers());
cloneRepo.setNotifiers(this.getNotifiers());
super.printPipeline();
try {
cloneRepo.execute();
} catch (Exception e) {
this.getJobStatus().addStepError("Unknown", e.getMessage());
this.logger.debug("Exception catch while executing steps: ", e);
}
}
public boolean isBug() {
return bug;
}
public String getBugType() {
return bugType;
}
public void setBug(boolean bug, String bugType) {
this.bug = bug;
this.bugType = bugType;
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
ca718d6b90aac8fd8ca8485950cc39cda2caf4c3
|
a1f54c4fc08b70dfcde20dd3dc2e0b544850ceb9
|
/PIJ(ะญะบะบะตะปั)/src/ch_17/Unsupported.java
|
5fedffd9a8f579ac44523d392c553016d5cf72c8
|
[] |
no_license
|
smith1984/java_src_tutorial
|
175d4f69e443084f82c48ab7457dcacfae3dfb23
|
50fd98e37d675f597074a6e53a9ef34824d5fcd4
|
refs/heads/master
| 2020-04-09T03:38:38.848665
| 2018-12-01T21:57:20
| 2018-12-01T21:57:20
| 159,990,788
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,365
|
java
|
package ch_17;//: containers/Unsupported.java
// Unsupported operations in Java containers.
import java.util.*;
public class Unsupported {
static void test(String msg, List<String> list) {
System.out.println("--- " + msg + " ---");
Collection<String> c = list;
Collection<String> subList = list.subList(1,8);
// Copy of the sublist:
Collection<String> c2 = new ArrayList<String>(subList);
try { c.retainAll(c2); } catch(Exception e) {
System.out.println("retainAll(): " + e);
}
try { c.removeAll(c2); } catch(Exception e) {
System.out.println("removeAll(): " + e);
}
try { c.clear(); } catch(Exception e) {
System.out.println("clear(): " + e);
}
try { c.add("X"); } catch(Exception e) {
System.out.println("add(): " + e);
}
try { c.addAll(c2); } catch(Exception e) {
System.out.println("addAll(): " + e);
}
try { c.remove("C"); } catch(Exception e) {
System.out.println("remove(): " + e);
}
// The List.set() method modifies the value but
// doesn't change the size of the data structure:
try {
list.set(0, "X");
} catch(Exception e) {
System.out.println("List.set(): " + e);
}
}
public static void main(String[] args) {
List<String> list =
Arrays.asList("A B C D E F G H I J K L".split(" "));
test("Modifiable Copy", new ArrayList<String>(list));
test("Arrays.asList()", list);
test("unmodifiableList()",
Collections.unmodifiableList(
new ArrayList<String>(list)));
}
} /* Output:
--- Modifiable Copy ---
--- Arrays.asList() ---
retainAll(): java.lang.UnsupportedOperationException
removeAll(): java.lang.UnsupportedOperationException
clear(): java.lang.UnsupportedOperationException
add(): java.lang.UnsupportedOperationException
addAll(): java.lang.UnsupportedOperationException
remove(): java.lang.UnsupportedOperationException
--- unmodifiableList() ---
retainAll(): java.lang.UnsupportedOperationException
removeAll(): java.lang.UnsupportedOperationException
clear(): java.lang.UnsupportedOperationException
add(): java.lang.UnsupportedOperationException
addAll(): java.lang.UnsupportedOperationException
remove(): java.lang.UnsupportedOperationException
List.set(): java.lang.UnsupportedOperationException
*///:~
|
[
"smith150384@gmail.com"
] |
smith150384@gmail.com
|
7b4d4b45b69fcacf8ad981099cda1d06ac840176
|
52d75b3c0f01a4ef38bd63383973ebed669f310a
|
/app/src/main/java/com/xq/LegouShop/activity/OrderManagerActivity.java
|
c271ccc10d22f47d6259e290e02316bf6d22bf42
|
[] |
no_license
|
xumingda/LeGou
|
21d9510d2e48be40cc8785725e268f63f1855238
|
d0710ecc6e321c4361760f9b965dd925de13c4ee
|
refs/heads/master
| 2020-06-24T10:53:37.935834
| 2019-08-28T07:28:31
| 2019-08-28T07:28:31
| 198,942,958
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,958
|
java
|
package com.xq.LegouShop.activity;
import android.content.Context;
import android.content.Intent;
import android.os.Build;
import android.speech.tts.TextToSpeech;
import android.support.annotation.RequiresApi;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.view.Window;
import android.widget.Toast;
import com.xq.LegouShop.R;
import com.xq.LegouShop.base.BaseActivity;
import com.xq.LegouShop.base.ViewTabBasePager;
import com.xq.LegouShop.tabpager.PendingOrderPager;
import com.xq.LegouShop.util.UIUtils;
import com.xq.LegouShop.weiget.NoScrollViewPager;
import com.xq.LegouShop.weiget.TabSlidingIndicator;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
//่ฎขๅ็ฎก็
public class OrderManagerActivity extends BaseActivity implements View.OnClickListener, ViewPager.OnPageChangeListener {
private LayoutInflater mInflater;
private View rootView;
/**
* ๅ
ณๆณจๆ ้ขๆ็คบๅจ
*/
private TabSlidingIndicator titleIndicator;
/**
* ๅ
ณๆณจ็ๅ
ๅฎนviewpager
*/
private NoScrollViewPager vpContent;
/**
* ๅ
ณๆณจๆ ้ข
*/
private List<String> pagerTitles;
/**
* ๅญๆพๅๅบ,ๅ็,ๅๆฌขๆ๏ผๆๅๆฌข้กต้ข็้ๅ
*/
private List<ViewTabBasePager> concernBasePagerList;
private View view_back;
private int status = 0;
private boolean isMain = false;
private TextToSpeech textToSpeech = null;//ๅๅปบ่ชๅธฆ่ฏญ้ณๅฏน่ฑก
@Override
protected View initView() {
requestWindowFeature(Window.FEATURE_NO_TITLE);
rootView = View.inflate(this, R.layout.activity_order_manager, null);
if (mInflater == null) {
mInflater = (LayoutInflater) UIUtils.getContext().getSystemService(
Context.LAYOUT_INFLATER_SERVICE);
}
setContentView(rootView);
initDate();
return rootView;
}
private void initDate() {
status = getIntent().getIntExtra("status", 0);
view_back = (View) findViewById(R.id.view_back);
titleIndicator = (TabSlidingIndicator) findViewById(R.id.indicator_concern_title);
vpContent = (NoScrollViewPager) findViewById(R.id.vp);
pagerTitles = new ArrayList<String>();
pagerTitles.add("ๅพ
ไปๆฌพ");
pagerTitles.add("ๅพ
ๅ่ดง");
pagerTitles.add("ๅพ
ๆถ่ดง");
pagerTitles.add("ๅทฒๅฎๆ");
pagerTitles.add("ๅฎๅ");
concernBasePagerList = new ArrayList<ViewTabBasePager>();
PendingOrderPager pendingOrderPager = new PendingOrderPager(this,0);
PendingOrderPager pendingOrderPager1=new PendingOrderPager(this,1);
PendingOrderPager pendingOrderPager2=new PendingOrderPager(this,2);
PendingOrderPager pendingOrderPager3=new PendingOrderPager(this,3);
PendingOrderPager pendingOrderPager4=new PendingOrderPager(this,4);
concernBasePagerList.add(pendingOrderPager);
concernBasePagerList.add(pendingOrderPager1);
concernBasePagerList.add(pendingOrderPager2);
concernBasePagerList.add(pendingOrderPager3);
concernBasePagerList.add(pendingOrderPager4);
ConcernInfoPagerAdapter concerninfopageradapter = new ConcernInfoPagerAdapter();
vpContent.setAdapter(concerninfopageradapter);
titleIndicator.setViewPager(vpContent);
titleIndicator.setOnPageChangeListener(this);
// ่ฎพ็ฝฎๆ็คบๅจ็ผฉๅฐ้จๅ็ๆฏไพ
titleIndicator.setScaleRadio(0.0f);
// ่ฎพ็ฝฎindicator็้ข่ฒ
titleIndicator.setTextColor(UIUtils.getColor(R.color.text_color_black),
UIUtils.getColor(R.color.errorColor));
view_back.setOnClickListener(this);
//่ฎพ็ฝฎ่ทณ่ฝฌๅๅชไธ้กต
if (status > 0) {
isMain = true;
}
}
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
concernBasePagerList.get(position).initData();
}
@Override
public void onPageScrollStateChanged(int state) {
}
private class ConcernInfoPagerAdapter extends PagerAdapter {
@Override
public CharSequence getPageTitle(int position) {
return pagerTitles.get(position);
}
@Override
public int getCount() {
return pagerTitles.size();
}
@Override
public boolean isViewFromObject(View view, Object object) {
return view == object;
}
@Override
public Object instantiateItem(ViewGroup container, int position) {
ViewTabBasePager concernBasePager = concernBasePagerList
.get(position);
View rootView = concernBasePager.getRootView();
container.removeView(rootView);
container.addView(rootView);
return rootView;
}
@Override
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
}
@RequiresApi(api = Build.VERSION_CODES.LOLLIPOP)
@Override
public void onClick(View view) {
switch (view.getId()) {
case R.id.view_back: {
finish();
overridePendingTransition(R.anim.animprv_in, R.anim.animprv_out);
break;
}
}
}
@Override
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (event.getKeyCode() == KeyEvent.KEYCODE_BACK) {
finish();
overridePendingTransition(R.anim.animprv_in, R.anim.animprv_out);
}
return super.onKeyDown(keyCode, event);
}
}
|
[
"317335277@qq.com"
] |
317335277@qq.com
|
326145f6a4ca5e6027e6c2b459c25385a29c247d
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/15/15_c571e8a8f11c10fc9e39854d2faaa6606132d158/EditOptionPanel/15_c571e8a8f11c10fc9e39854d2faaa6606132d158_EditOptionPanel_t.java
|
7be14824ff89c5f01ff1769b3d1c5c8c7808c575
|
[] |
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
| 3,893
|
java
|
package munk.graph.gui;
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
import javax.vecmath.Color3f;
import munk.graph.function.*;
import com.graphbuilder.math.*;
@SuppressWarnings("serial")
public class EditOptionPanel extends JPanel {
private Function oldFunc;
private JComboBox comboBox;
private JSlider slider;
private ColorList colorList;
public EditOptionPanel(final ColorList colorList, Function f, final ActionListener a){
//setBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null));
GridBagLayout gridBagLayout = new GridBagLayout();
gridBagLayout.columnWidths = new int[]{5, 0, 0, 0, 5, 0};
gridBagLayout.rowHeights = new int[]{5, 0, 0, 0};
gridBagLayout.columnWeights = new double[]{1.0, 0.0, 1.0, 0.0, 1.0, Double.MIN_VALUE};
gridBagLayout.rowWeights = new double[]{1.0, 0.0, 1.0, Double.MIN_VALUE};
setLayout(gridBagLayout);
JLabel resolution = new JLabel("Resolution");
GridBagConstraints gbc_lblStepSize = new GridBagConstraints();
gbc_lblStepSize.insets = new Insets(0, 0, 5, 5);
gbc_lblStepSize.anchor = GridBagConstraints.EAST;
gbc_lblStepSize.gridx = 1;
gbc_lblStepSize.gridy = 1;
add(resolution, gbc_lblStepSize);
comboBox = new JComboBox(colorList.getIconList());
comboBox.setEnabled(false);
GridBagConstraints gbc_comboBox = new GridBagConstraints();
gbc_comboBox.insets = new Insets(0, 0, 5, 5);
gbc_comboBox.fill = GridBagConstraints.HORIZONTAL;
gbc_comboBox.gridx = 3;
gbc_comboBox.gridy = 1;
add(comboBox, gbc_comboBox);
comboBox.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
Function wrapFunction = null;
Color3f selectedColor = (Color3f) colorList.get(comboBox.getSelectedIndex());
if(comboBox.isEnabled() && !selectedColor.equals(oldFunc.getColor())){
try {
wrapFunction = new XYZFunction("y=x", (Color3f) colorList.get(comboBox.getSelectedIndex()), new float[]{-1,1,-1,1,-1,1}, (float) (0.505 - Math.log10(slider.getValue()+1)/4));
} catch (ExpressionParseException | UndefinedVariableException ex) {
ex.printStackTrace();
}
a.actionPerformed(new ActionEvent(new Function[]{oldFunc, wrapFunction},0,""));
}
}
});
slider = new JSlider();
slider.setEnabled(false);
slider.setPreferredSize(new Dimension(150,20));
GridBagConstraints gbc_slider = new GridBagConstraints();
gbc_slider.insets = new Insets(0, 0, 5, 5);
gbc_slider.gridx = 2;
gbc_slider.gridy = 1;
add(slider, gbc_slider);
slider.addMouseListener(new MouseAdapter() {
@Override
public void mouseReleased(MouseEvent arg0) {
Function wrapFunction = null;
if(slider.isEnabled() && GuiUtil.getStepsize(slider.getValue(), oldFunc.getBounds())[0] != oldFunc.getStepsize()){
try {
wrapFunction = new XYZFunction("y=x", (Color3f) colorList.get(comboBox.getSelectedIndex()), oldFunc.getBounds(), GuiUtil.getStepsize(slider.getValue(), oldFunc.getBounds())[0]);
} catch (ExpressionParseException | UndefinedVariableException e) {
e.printStackTrace();
}
a.actionPerformed(new ActionEvent(new Function[]{oldFunc, wrapFunction},1,""));
}
}
});
this.colorList = colorList;
}
public void updateFuncReference(Function f){
slider.setEnabled(true);
comboBox.setEnabled(true);
oldFunc = f;
comboBox.setSelectedIndex(colorList.indexOf(f.getColor()));
slider.setValue(GuiUtil.getSliderValue(f.getStepsize(),f.getBounds()));
}
public void updateColors(){
comboBox.setModel(new JComboBox(colorList.getIconList()).getModel());
}
public void initMode(){
slider.setEnabled(false);
comboBox.setEnabled(false);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
7b4574c438e8dc05f993e17cb99e476f6202a1a6
|
926b7007b03d1261717aeaf9fef1ba8fceb5ad12
|
/src/main/java/com/msun/thirdpartyPay/alipay/core/Verifies.java
|
24efcd4ba54592009ad9dc4c74d06f5e7069983b
|
[
"Apache-2.0"
] |
permissive
|
MSUNorg/thirdpartyPay
|
f5dee9d6ec25b975efef7c0b1ddfa4837bcd0140
|
35fa62c2aa23042f54314cebb1b918c707e3e82a
|
refs/heads/master
| 2021-01-19T14:22:25.835211
| 2017-08-04T09:12:45
| 2017-08-04T09:13:39
| 88,155,176
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,278
|
java
|
package com.msun.thirdpartyPay.alipay.core;
import static com.msun.thirdpartyPay.support.util.Preconditions.checkNotNullAndEmpty;
import java.util.Map;
import java.util.Objects;
import com.msun.thirdpartyPay.alipay.model.enums.AlipayField;
import com.msun.thirdpartyPay.alipay.model.enums.Service;
import com.msun.thirdpartyPay.support.http.Http;
import com.msun.thirdpartyPay.support.security.RSA;
/**
* ้ช่ฏ็ปไปถ
*
* @author zxc Apr 13, 2017 6:24:06 PM
*/
public class Verifies extends Component {
Verifies(Alipay alipay) {
super(alipay);
}
/**
* MD5้ช่ฏ้็ฅๅๆฐ็ญพๅๆฏๅฆๅๆณ(WEB๏ผWAP๏ผ้ๆฌพๆๅกๅจ้็ฅ)
*
* @param notifyParams ้็ฅๅๆฐ
* @return ๅๆณ่ฟๅtrue๏ผๅไนfalse
*/
public Boolean md5(Map<String, String> notifyParams) {
Map<String, String> validParams = filterSigningParams(notifyParams);
String signing = buildSignString(validParams);
String signed = md5(signing);
return Objects.equals(notifyParams.get(AlipayField.SIGN.field()), signed);
}
/**
* RSA้ช่ฏ้็ฅๅๆฐๆฏๅฆๅๆณ(ๅฆAPPๆๅกๅจ้็ฅ)
*
* @param notifyParams ้็ฅๅๆฐ
* @return ๅๆณ่ฟๅtrue๏ผๅไนfalse
*/
public Boolean rsa(Map<String, String> notifyParams) {
String expectSign = notifyParams.get(AlipayField.SIGN.field());
Map<String, String> validParams = filterSigningParams(notifyParams);
String signing = buildSignString(validParams);
checkNotNullAndEmpty(alipay.appPubKey, "app public key can't be empty before rsa verify.");
return RSA.verify(signing, expectSign, alipay.appPubKey, alipay.inputCharset);
}
/**
* ้ช่ฏๆฏไป้็ฅIDๆฏๅฆๅๆณ
*
* @param notifyId ้็ฅID๏ผๅ็ฝฎ้็ฅไธญไผๆ
* @return ๅๆณ่ฟๅtrue๏ผๅไนfalse
*/
public Boolean notifyId(String notifyId) {
String url = Alipay.GATEWAY + "&" + AlipayField.SERVICE.field() + "=" + Service.NOTIFY_VERIFY.value() + "&" + AlipayField.PARTNER.field() + "=" + alipay.merchantId + "&" + AlipayField.NOTIFY_ID.field() + "="
+ notifyId;
String resp = Http.get(url).request();
return "true".equalsIgnoreCase(resp);
}
}
|
[
"zhangxiongcai337@163.com"
] |
zhangxiongcai337@163.com
|
aa4a1acd56bfbc0d9e59bd8374aebfdc1a5af6e7
|
fee80e730c0a9d2ede2721d4441970bafaaaa646
|
/src/org/ace/insurance/life/bancassurance/proposalhistory/persistence/interfaces/IBancaassuranceProposalHistoryDAO.java
|
ead71ed25d348faf0b237224f3beb5c99b1152b4
|
[] |
no_license
|
LifeTeam-TAT/GGLI-Core
|
242360ba9a6dd7cb3841fa495f9124a327df8450
|
d000f3068b863a581775f5cd7b78b2bfd06b378f
|
refs/heads/master
| 2023-03-29T06:26:44.456523
| 2021-04-02T15:03:18
| 2021-04-02T15:03:18
| 354,049,682
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,167
|
java
|
package org.ace.insurance.life.bancassurance.proposalhistory.persistence.interfaces;
import org.ace.insurance.life.bancassurance.proposalhistory.BancaassuranceProposalHistory;
import org.ace.java.component.persistence.exception.DAOException;
public interface IBancaassuranceProposalHistoryDAO {
public BancaassuranceProposalHistory insert(BancaassuranceProposalHistory bancaassuranceProposalHistory) throws DAOException;
public void update(BancaassuranceProposalHistory bancaassuranceProposalHistory) throws DAOException;
public void delete(BancaassuranceProposalHistory bancaassuranceProposalHistory) throws DAOException;
public BancaassuranceProposalHistory findBancaassuranceProposalByLifeproposalId(String lifeProposalId) throws DAOException;;
public BancaassuranceProposalHistory findBancaassuranceProposalByMedicalproposalId(String medicalProposalId) throws DAOException;;
public BancaassuranceProposalHistory findBancaassuranceProposalByPersonTravelproposalId(String personTravelProposalId) throws DAOException;;
public BancaassuranceProposalHistory findBancaassuranceProposalByTravelproposalId(String travelProposalId) throws DAOException;;
}
|
[
"lifeteam.tat@gmail.com"
] |
lifeteam.tat@gmail.com
|
bac5c4123101c59b40e9cc668e6df562195ed4ca
|
d6de3bd8574333a697d8f9c607e95fda7d1163c1
|
/ahome-titanium/src/main/java/com/ait/toolkit/titanium/mobile/client/buffer/BufferStream.java
|
7a35da3ee607331f9ba4eecb9a8cfa2a9815f2ab
|
[] |
no_license
|
dikalo/ahome-titanium
|
c565a489778d5301a9517d3b7bf9331c0d7103e6
|
48104da303de2f8704728e199ac97e26b9a29fb2
|
refs/heads/master
| 2021-06-01T03:57:55.840203
| 2016-07-27T00:36:55
| 2016-07-27T00:36:55
| 30,990,755
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,868
|
java
|
/*
Copyright (c) 2014 Ahomรฉ Innovation Technologies. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package com.ait.toolkit.titanium.mobile.client.buffer;
import com.ait.toolkit.core.client.JsoHelper;
import com.google.gwt.core.client.JavaScriptObject;
/**
* Wrapper around Titanium.Buffer that implements the Titanium.IOstream
* interface
*
*/
public class BufferStream extends Buffer {
public BufferStream() {
jsObj = JsoHelper.createObject();
}
public BufferStream(JavaScriptObject obj) {
jsObj = obj;
}
public native void close() /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
jso.close();
}-*/;
public native boolean isReadable() /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso.isReadable();
}-*/;
public native boolean isWritable() /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso.isWritable();
}-*/;
public native double read(Buffer buffer) /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso
.read(buffer.@com.ait.toolkit.core.client.JsObject::getJsObj()());
}-*/;
public native double read(Buffer buffer, double offset) /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso.read(
buffer.@com.ait.toolkit.core.client.JsObject::getJsObj()(),
offset);
}-*/;
public native double read(Buffer buffer, double offset, double length) /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso.read(
buffer.@com.ait.toolkit.core.client.JsObject::getJsObj()(),
offset, length);
}-*/;
public native double write(Buffer buffer) /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso
.write(buffer.@com.ait.toolkit.core.client.JsObject::getJsObj()());
}-*/;
public native double write(Buffer buffer, double offset) /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso.write(
buffer.@com.ait.toolkit.core.client.JsObject::getJsObj()(),
offset);
}-*/;
public native double write(Buffer buffer, double offset, double length) /*-{
var jso = this.@com.ait.toolkit.core.client.JsObject::getJsObj()();
return jso.write(
buffer.@com.ait.toolkit.core.client.JsObject::getJsObj()(),
offset, length);
}-*/;
}
|
[
"alainekambi@alaineksmacbook.fritz.box"
] |
alainekambi@alaineksmacbook.fritz.box
|
4691e6d4ad64de30abfd14e3e07a5002c4a95d11
|
090c6984159eb340e31818420bad17f48e1a19c4
|
/0.20190418_03 libraryProject/src/com/kitri/library/member/mng/MemberMngService.java
|
10c9ca5f09cc7862cf15a8b5b05b44f88b6c8f15
|
[] |
no_license
|
TaeHeeHyeung/KitriJava_Project1Library
|
d702e0cf056090307850671050180decfa613ada
|
2ff485d2e1ffc0343a239690ab75fe7fd45f52bd
|
refs/heads/master
| 2020-06-18T11:40:00.311379
| 2019-07-22T17:17:24
| 2019-07-22T17:17:24
| 196,291,120
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,983
|
java
|
package com.kitri.library.member.mng;
import java.util.Vector;
import javax.swing.JOptionPane;
import javax.swing.JTextField;
import javax.swing.table.DefaultTableModel;
import com.kitri.library.db.*;
import com.kitri.library.file.ImageFile;
import com.kitri.library.member.add.MemberAddController;
import com.kitri.library.member.info.Memberinfo;
public class MemberMngService {
MemberController memberController;
MemberMng memberMng;
public MemberMngService(MemberController memberController) {
this.memberController = memberController;
this.memberMng = memberController.memberMng;
}
public void close() {
memberMng.dispose();
}
public void searchData() {// ์ฝค๋ณด๋ฐ์ค์ ์ผ์นํ๋ ๊ธฐ์ค์ผ๋ก ๊ฒ์ํ๊ธฐ
int gap = memberMng.comboBox.getSelectedIndex();
String[] col = { "member_id", "name", "birthday" };
String search = memberMng.tfSearch.getText();
memberMng.memberDao.select(col[gap], search);
memberMng.tableModelUpdate();
}
public void deleteRow() {
int sr = memberMng.table.getSelectedRow();// jtable์์ ์ ํํ ํ์ int์ ์ง์ด๋ฃ์ด//์ธ๋ฑ์ค๊ฐ์ ๋ฆฌํดํจ
if (sr != -1) {
// System.out.println("์ ๋ง ์ญ์ ํ์๊ฒ ์ต๋๊น?");//๋ค์ด์ผ๋ก๊ทธ๋ก ๋์ฐ๊ธฐ ํ์
Vector<MemberDto> memberlist = memberMng.memberDao.getList();
String memberid = memberlist.get(sr).getMember_id();// ์ ํํ ๋ก์ฐ์ id๋ฐ์์ค๊ธฐ
BookDao bookDao = BookDao.getInstance();
Vector<BookDto> vecList = bookDao.selectOfMem(memberid);
if (vecList.size() != 0) {
JOptionPane.showMessageDialog(memberMng, "๋น๋ฆฌ๊ณ ์๋ ๋์๊ฐ ์กด์ฌํฉ๋๋ค.", "์ ํ ์๋ฌ", JOptionPane.ERROR_MESSAGE);
return;
}
memberMng.memberDao.delete(memberid);
memberMng.tableModelUpdate();
} else {
// System.out.println("์ ํํ ํญ๋ชฉ์ด์์ต๋๋ค");//๋ค์ด์ผ๋ก๊ทธ๋ก ๋์ฐ๊ธฐ ํ์
}
}// end eleteRow
public void viewAddMember() {
memberMng.memberAdd.setVisible(true);
}// end viewAddMember
// 1. table์์ ์ ํ๋ ๊ฐ์ ์ ์ฅ
// 2. BookInfo์ ์ ๋ฌ
// 3. BookInfo์์ ์ ๋ฌ ๋ฐ์ ๊ฐ์ฒด ํํ
// 4. BookInfo ์ด๊ธฐ
// ๋์์์ธ์ ๋ณด์ด๊ธฐ
public void viewMemberInfo() {
int row = memberMng.table.getSelectedRow();
if (row != -1) {
MemberDto memDto = memberMng.memberDao.select((String) memberMng.table.getValueAt(row, 0));
//2๊ฐ์ฒด์ ๋ฌ
memberMng.memberinfo.setMemberDto(memDto);
//3ํํ
memberMng.memberinfo.setTF(memDto);
memberMng.memberinfo.setTable(memDto);
memberMng.imageFile.setImageToLabel(memberMng.memberinfo.lbImg,
memberMng.memberinfo.memberDto.getImage_path());
System.out.println("MemberMngService imagePath "+memberMng.memberinfo.memberDto.getImage_path());
//4 ์ด๊ธฐ
memberMng.memberinfo.setEditable(false);
memberMng.memberinfo.setVisible(true);
} else {
JOptionPane.showMessageDialog(memberMng, "ํ์์ ์ ํํด์ฃผ์ธ์", "๋์์ ํ", JOptionPane.ERROR_MESSAGE);
return;
}
}
}
|
[
"hth0893@naver.com"
] |
hth0893@naver.com
|
8d12508e45f93e58801532fabd80189e372e72dc
|
b0e9958c7af0af5133c3aa88be01b3b79296b425
|
/StarHydro/generated_src/app/worker/pdf/reg/ElevationRaiser_generated.java
|
8e3065b7d399d716fafa9bbf38f34b729204aaa7
|
[] |
no_license
|
starteam/starhydro_workspace
|
fb9c43375e6a0a97e3158353664744e12e622a05
|
69a4ab61a29a2ab1137f6e7db0d5de52fd054d2c
|
refs/heads/master
| 2021-01-22T22:50:12.903953
| 2013-06-24T17:23:08
| 2013-06-24T17:23:08
| 10,913,524
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 773
|
java
|
/* Generated by star.annotations.GeneratedClass, all changes will be lost */
package app.worker.pdf.reg;
public abstract class ElevationRaiser_generated extends java.lang.Object implements star.event.EventController, star.hydrology.events.regionalization.RegElevationPDFRaiser
{
private star.event.Adapter adapter;
private static final long serialVersionUID = 1L;
public ElevationRaiser_generated()
{
super();
}
public void addNotify()
{
}
public star.event.Adapter getAdapter()
{
if( adapter == null )
{
adapter = new star.event.Adapter(this);
}
return adapter;
}
public void raise_RegElevationPDFEvent()
{
(new star.hydrology.events.regionalization.RegElevationPDFEvent(this)).raise();
}
public void removeNotify()
{
}
}
|
[
"iceraj@gmail.com"
] |
iceraj@gmail.com
|
cfd39c28fcf6ff7386c333b91bb95a42bb8fde88
|
ae5eb1a38b4d22c82dfd67c86db73592094edc4b
|
/project201/src/main/java/org/gradle/test/performance/largejavamultiproject/project201/p1005/Production20111.java
|
5ab37882ff0d81215a2b0301612772f16fde94e3
|
[] |
no_license
|
big-guy/largeJavaMultiProject
|
405cc7f55301e1fd87cee5878a165ec5d4a071aa
|
1cd6a3f9c59e9b13dffa35ad27d911114f253c33
|
refs/heads/main
| 2023-03-17T10:59:53.226128
| 2021-03-04T01:01:39
| 2021-03-04T01:01:39
| 344,307,977
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,971
|
java
|
package org.gradle.test.performance.largejavamultiproject.project201.p1005;
public class Production20111 {
private Production20108 property0;
public Production20108 getProperty0() {
return property0;
}
public void setProperty0(Production20108 value) {
property0 = value;
}
private Production20109 property1;
public Production20109 getProperty1() {
return property1;
}
public void setProperty1(Production20109 value) {
property1 = value;
}
private Production20110 property2;
public Production20110 getProperty2() {
return property2;
}
public void setProperty2(Production20110 value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
}
|
[
"sterling.greene@gmail.com"
] |
sterling.greene@gmail.com
|
3745f8e64cb0f05301b0e326847efedd109f0ac6
|
b35fadf8d375525e320751e25893f6f69a04e37d
|
/leimingtech-cms/src/main/java/com/leimingtech/cms/service/activity/ActivityOptionExtServiceI.java
|
e2b84e2a8df376f19579c69a52d4b4bd964f6ec3
|
[] |
no_license
|
dockercms/cms-4.0
|
8e41fca1142e121861a86006afaf378327f1917b
|
8f390cc00848124daeb997b8c09aefa0f465572c
|
refs/heads/master
| 2021-05-19T03:38:03.644558
| 2019-12-06T02:10:27
| 2019-12-06T02:10:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,383
|
java
|
package com.leimingtech.cms.service.activity;
import java.util.Map;
import com.leimingtech.core.entity.ActivityOptionExtEntity;
/**
* @Title: interface
* @Description: ๆดปๅจๆฅๅ่กจๆฅๅฃ
* @author
* @date 2015-08-28 17:59:53
* @version V1.0
*
*/
public interface ActivityOptionExtServiceI {
/**
* ไฟๅญๆดปๅจๆฅๅ่กจ
*
* @param activityOptionExt
* @return
*/
java.lang.String save(ActivityOptionExtEntity activityOptionExt);
/**
* ๆดๆฐๆดปๅจๆฅๅ่กจ
*
* @param activityOptionExt
*/
void saveOrUpdate(ActivityOptionExtEntity activityOptionExt);
/**
* ้่ฟid่ทๅๆดปๅจๆฅๅ่กจ
*
* @param id
* ๆดปๅจๆฅๅ่กจid
* @return
*/
ActivityOptionExtEntity getEntity(java.lang.String id);
/**
* ่ทๅๅ้กตๅ็ๆดปๅจๆฅๅ่กจๆฐๆฎ้
*
* @param activityOptionExt
* @param param
* ๅญๆฎต็ปๅฐพๅซๆ"_begin"ๆ"_end"็ๆฅ่ฏขๆกไปถ๏ผๆ ๆญค็ฑปๅๆถไผ ๅnull
* @param pageSize
* ๆฏ้กต่ทๅๆฐ้
* @param pageNo
* ๅฝๅ้กต็
* @return activityOptionExtListๆดปๅจๆฅๅ่กจๆฐๆฎ้ pageCountๆป้กตๆฐ
*/
Map<String, Object> getPageList(ActivityOptionExtEntity activityOptionExt, Map param, int pageSize,
int pageNo);
/**
* ๅ ้คๆดปๅจๆฅๅ่กจ
*
* @param activityOptionExt
*/
void delete(ActivityOptionExtEntity activityOptionExt);
}
|
[
"pixiaoyong@leimingtech.com"
] |
pixiaoyong@leimingtech.com
|
59da6b6046d6fec09175b0e5ef75b8ffa50eec80
|
f4e15ee34808877459d81fd601d6be03bdfb4a9d
|
/com/sun/xml/bind/XmlAccessorFactory.java
|
4c5b3425d7033d10e7b1e8f696daee50b8af8ea3
|
[] |
no_license
|
Lianite/wurm-server-reference
|
369081debfa72f44eafc6a080002c4a3970f8385
|
e4dd8701e4af13901268cf9a9fa206fcb5196ff0
|
refs/heads/master
| 2023-07-22T16:06:23.426163
| 2020-04-07T23:15:35
| 2020-04-07T23:15:35
| 253,933,452
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 445
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package com.sun.xml.bind;
import java.lang.annotation.ElementType;
import java.lang.annotation.Target;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Retention;
import java.lang.annotation.Annotation;
@Retention(RetentionPolicy.RUNTIME)
@Target({ ElementType.TYPE, ElementType.PACKAGE })
public @interface XmlAccessorFactory {
Class<? extends AccessorFactory> value();
}
|
[
"jdraco6@gmail.com"
] |
jdraco6@gmail.com
|
8d91dae5c8f2c5be471f4db511205e03acb639ad
|
30057e353957920564ee07722427c3ff434d322f
|
/ProblemSolving/src/com/basics/backtrack/ConstructWordUsingDice.java
|
23fc42eb3839f24039c4e9caa15ee18746c52558
|
[] |
no_license
|
mmanjunath998/Problem-Solving
|
a7f4e541b150ad3d28e545b7c990d47b020c79a9
|
32f21921f05ff351a6cdc52fe72e954633d9036a
|
refs/heads/master
| 2020-09-09T15:06:46.232130
| 2019-12-04T08:04:58
| 2019-12-04T08:04:58
| 221,479,218
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,440
|
java
|
package com.basics.backtrack;
import java.util.ArrayList;
import java.util.List;
public class ConstructWordUsingDice {
public static void main(String[] args){
char[][] arrays = {
{'a','l','c','d','e','f'},
{'a','b','c','d','e','f'},
{'a','b','c','h','e','f'},
{'a','b','c','d','o','f'},
{'a','b','c','l','e','f'},};
char[] pat = {'h','e','l','l','o'};
char[][] arr2 = {{'a', 'b', 'c', 'd', 'e', 'f'},
{'a', 'b', 'c', 'd', 'e', 'f'},
{'a', 'b', 'c', 'd', 'e', 'f'},
{'a', 'b', 'c', 'd', 'e', 'f'},
{'a', 'b', 'c', 'd', 'e', 'f'}};
List<Path> results = new ArrayList<Path>();
List<Integer> visited = new ArrayList<>();
System.out.println(find(arrays, pat, results, 0, visited));
}
public static boolean find(char[][] arrays, char[] pat, List<Path> result, int seqCount, List<Integer> visited){
if(seqCount == pat.length){ //goal
System.out.println(result);
return true;
}
//choices
for(int i=0; i<arrays.length; i++){
char[] seq = arrays[i];
for(int j=0; j<seq.length; j++){
if(seq[j] == pat[seqCount] && !visited.contains(i)){ //constraints
result.add(new Path(i, j));
visited.add(i);
if(find(arrays, pat, result, seqCount+1, visited)){
return true;
}
//back track
result.remove(result.size()-1);
visited.remove(visited.size()-1);
}
}
}
return false;
}
}
|
[
"manjunath@bytemark.co"
] |
manjunath@bytemark.co
|
5b3995a1c35dc17907ef37a51b5929f6adbf007b
|
7abe8149560abf2d3daa9e8cb722d7943150e715
|
/ThirdParty/adobe-ecosign-api/src/main/java/echosign/api/clientv15/dto11/ParticipantRole.java
|
8ea2b56e709b86b3b71efc0290ee1d1d760d0455
|
[
"BSD-3-Clause"
] |
permissive
|
tnsgmddb/Consent2Share
|
6e9c264c9719494b1dee76b612e0a1fd11623529
|
7010e66f0c098f77d9b15c1bc7496c1fe9b1e408
|
refs/heads/master
| 2021-01-18T00:36:16.040783
| 2016-02-12T21:56:09
| 2016-02-12T21:56:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 987
|
java
|
package echosign.api.clientv15.dto11;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for ParticipantRole.
*
* <p>The following schema fragment specifies the expected content contained within this class.
* <p>
* <pre>
* <simpleType name="ParticipantRole">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="SENDER"/>
* <enumeration value="SIGNER"/>
* <enumeration value="CC"/>
* <enumeration value="DELEGATE"/>
* <enumeration value="SHARE"/>
* <enumeration value="OTHER"/>
* </restriction>
* </simpleType>
* </pre>
*
*/
@XmlType(name = "ParticipantRole")
@XmlEnum
public enum ParticipantRole {
SENDER,
SIGNER,
CC,
DELEGATE,
SHARE,
OTHER;
public String value() {
return name();
}
public static ParticipantRole fromValue(String v) {
return valueOf(v);
}
}
|
[
"tao.lin@feisystems.com"
] |
tao.lin@feisystems.com
|
05b0611e65832275002d07b61614066f1ec3d9af
|
02bb01cdb1ef712fd6d7ce16134eeee12793c448
|
/mumu-system/mumu-system-service/src/main/java/com/lovecws/mumu/system/service/impl/SysRolePermissionServiceImpl.java
|
674fd6d5f77a38a76baa38f8f419acf054319d97
|
[
"Apache-2.0"
] |
permissive
|
lnSmallsix/mumu
|
6eae62b98fb4e3ac85facf57173d9f69421d0674
|
1c7e609189da04412731c52bfae9788de690ff38
|
refs/heads/master
| 2021-01-14T00:09:21.960463
| 2019-03-09T02:59:38
| 2019-03-09T02:59:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,394
|
java
|
package com.lovecws.mumu.system.service.impl;
import com.lovecws.mumu.common.core.enums.PublicEnum;
import com.lovecws.mumu.system.dao.SysRolePermissionDao;
import com.lovecws.mumu.system.entity.SysRolePermission;
import com.lovecws.mumu.system.service.SysRolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import java.util.*;
@Service
@Transactional(isolation = Isolation.DEFAULT, propagation = Propagation.REQUIRED, readOnly = true)
public class SysRolePermissionServiceImpl implements SysRolePermissionService {
@Autowired
private SysRolePermissionDao rolePermissionDao;
@Override
@Transactional(readOnly = false)
public void saveRolePermission(String roleId, String permissionIds, String creator) {
// ๅ ้ค ่ง่ฒๆ้
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("roleId", roleId);
rolePermissionDao.delete(paramMap);
if (permissionIds != null && !"".equals(permissionIds)) {
String[] permissionArray = permissionIds.split(",");
List<SysRolePermission> rolePermissions = new ArrayList<SysRolePermission>();
for (String permissionId : permissionArray) {
rolePermissions.add(new SysRolePermission(PublicEnum.NORMAL.value(), creator, new Date(),
Integer.parseInt(roleId), Integer.parseInt(permissionId)));
}
// ๆทปๅ ่ง่ฒๆ้
rolePermissionDao.insert(rolePermissions);
}
}
@Override
@Transactional(readOnly = false)
public void deleteRolePermissionByMenuId(String menuId) {
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("menuId", menuId);
rolePermissionDao.delete(paramMap);
}
@Override
@Transactional(readOnly = false)
public void deleteRolePermissionByPermissionId(String permissionId) {
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("permissionId", permissionId);
rolePermissionDao.delete(paramMap);
}
@Override
@Transactional(readOnly = false)
public void deleteRolePermissionByRoleId(String roleId) {
Map<String, Object> paramMap = new HashMap<String, Object>();
paramMap.put("roleId", roleId);
rolePermissionDao.delete(paramMap);
}
}
|
[
"lovercws@gmail.com"
] |
lovercws@gmail.com
|
2dcffa6d66910777ecc1e16a9864061e9d06e4e0
|
013e83b707fe5cd48f58af61e392e3820d370c36
|
/spring-webmvc-portlet/src/main/java/org/springframework/web/portlet/handler/HandlerInterceptorAdapter.java
|
489ea97764f0fc319e28416f25342ad83f6a0a0c
|
[] |
no_license
|
yuexiaoguang/spring4
|
8376f551fefd33206adc3e04bc58d6d32a825c37
|
95ea25bbf46ee7bad48307e41dcd027f1a0c67ae
|
refs/heads/master
| 2020-05-27T20:27:54.768860
| 2019-09-02T03:39:57
| 2019-09-02T03:39:57
| 188,770,867
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,583
|
java
|
package org.springframework.web.portlet.handler;
import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.EventRequest;
import javax.portlet.EventResponse;
import javax.portlet.PortletRequest;
import javax.portlet.PortletResponse;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.ResourceRequest;
import javax.portlet.ResourceResponse;
import org.springframework.web.portlet.HandlerInterceptor;
import org.springframework.web.portlet.ModelAndView;
/**
* {@link HandlerInterceptor}ๆฅๅฃ็ๆฝ่ฑก้้
ๅจ็ฑป, ็จไบ็ฎๅpre-only/post-onlyๆฆๆชๅจ็ๅฎ็ฐ.
*/
public abstract class HandlerInterceptorAdapter implements HandlerInterceptor {
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #preHandle}.
*/
@Override
public boolean preHandleAction(ActionRequest request, ActionResponse response, Object handler)
throws Exception {
return preHandle(request, response, handler);
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #afterCompletion}.
*/
@Override
public void afterActionCompletion(
ActionRequest request, ActionResponse response, Object handler, Exception ex)
throws Exception {
afterCompletion(request, response, handler, ex);
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #preHandle}.
*/
@Override
public boolean preHandleRender(RenderRequest request, RenderResponse response, Object handler)
throws Exception {
return preHandle(request, response, handler);
}
/**
* ๆญคๅฎ็ฐไธบ็ฉบ.
*/
@Override
public void postHandleRender(
RenderRequest request, RenderResponse response, Object handler, ModelAndView modelAndView)
throws Exception {
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #afterCompletion}.
*/
@Override
public void afterRenderCompletion(
RenderRequest request, RenderResponse response, Object handler, Exception ex)
throws Exception {
afterCompletion(request, response, handler, ex);
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #preHandle}.
*/
@Override
public boolean preHandleResource(ResourceRequest request, ResourceResponse response, Object handler)
throws Exception {
return preHandle(request, response, handler);
}
/**
* ๆญคๅฎ็ฐไธบ็ฉบ.
*/
@Override
public void postHandleResource(
ResourceRequest request, ResourceResponse response, Object handler, ModelAndView modelAndView)
throws Exception {
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #afterCompletion}.
*/
@Override
public void afterResourceCompletion(
ResourceRequest request, ResourceResponse response, Object handler, Exception ex)
throws Exception {
afterCompletion(request, response, handler, ex);
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #preHandle}.
*/
@Override
public boolean preHandleEvent(EventRequest request, EventResponse response, Object handler)
throws Exception {
return preHandle(request, response, handler);
}
/**
* ๆญคๅฎ็ฐๅงๆ็ป{@link #afterCompletion}.
*/
@Override
public void afterEventCompletion(
EventRequest request, EventResponse response, Object handler, Exception ex)
throws Exception {
afterCompletion(request, response, handler, ex);
}
/**
* ๆๆ"pre*"ๆนๆณๅงๆ็้ป่ฎคๅ่ฐ.
* <p>ๆญคๅฎ็ฐๅง็ป่ฟๅ{@code true}.
*/
protected boolean preHandle(PortletRequest request, PortletResponse response, Object handler)
throws Exception {
return true;
}
/**
* ๆๆ"after*"ๆนๆณๅงๆ็้ป่ฎคๅ่ฐ.
* <p>ๆญคๅฎ็ฐไธบ็ฉบ.
*/
protected void afterCompletion(
PortletRequest request, PortletResponse response, Object handler, Exception ex)
throws Exception {
}
}
|
[
"yuexiaoguang@vortexinfo.cn"
] |
yuexiaoguang@vortexinfo.cn
|
4cc4c6ff3ea301ce1ef23d6d78ad043bd3efb0af
|
57e5df525b4eb1a8f16f637be13492eb6d069faf
|
/src/test/java/jabara/it_inoculation_questions/entity/AnswerValueTest.java
|
96f19def46d6a815a67dcda7caee5263f26d5092
|
[] |
no_license
|
jabaraster/ItInoculationQuestions
|
c900c02b0a7190472d457f3015bf2940334bca2a
|
ea133ea5123a11b3bf2fe73b6f246ee13a9fd41e
|
refs/heads/master
| 2016-09-05T11:58:05.336822
| 2013-05-13T23:29:27
| 2013-05-13T23:29:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 940
|
java
|
/**
*
*/
package jabara.it_inoculation_questions.entity;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.runners.Enclosed;
import org.junit.runner.RunWith;
/**
* @author jabaraster
*/
@RunWith(Enclosed.class)
public class AnswerValueTest {
/**
* @author jabaraster
*/
public static class OptionTextIsEmpty {
private AnswerValue sut;
/**
*
*/
@SuppressWarnings("boxing")
@Test
public void _setOptionText_int_String() {
this.sut.setOptionText(2, "option"); //$NON-NLS-1$
final int actual = this.sut.getOptionTextCount();
assertThat(actual, is(3));
}
/**
*
*/
@Before
public void setUp() {
this.sut = new AnswerValue();
}
}
}
|
[
"jabaraster@gmail.com"
] |
jabaraster@gmail.com
|
fc434cecc367c04f2f21d553aa4dc615874322cb
|
9964c437fcf91ac8a22e67122d79c9d91f790d5f
|
/optaplanner-examples/src/main/java/org/optaplanner/examples/projectjobscheduling/domain/Allocation.java
|
e0ac0fb03c59397a367562a6b7e08a4953ca8975
|
[
"Apache-2.0"
] |
permissive
|
domhanak/optaplanner
|
4178c40da4a2d1b8d80a6f622f4fab481cf73f05
|
2503d5aad808e9049060f572e0fb18e7aee88793
|
refs/heads/master
| 2021-01-15T14:42:13.014824
| 2014-01-07T17:54:42
| 2014-01-07T17:54:42
| 15,376,389
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,538
|
java
|
/*
* Copyright 2010 JBoss Inc
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.optaplanner.examples.projectjobscheduling.domain;
import java.util.List;
import com.thoughtworks.xstream.annotations.XStreamAlias;
import org.optaplanner.core.api.domain.entity.PlanningEntity;
import org.optaplanner.core.api.domain.valuerange.ValueRange;
import org.optaplanner.core.api.domain.valuerange.ValueRangeFactory;
import org.optaplanner.core.api.domain.valuerange.ValueRangeProvider;
import org.optaplanner.core.api.domain.variable.PlanningVariable;
import org.optaplanner.examples.common.domain.AbstractPersistable;
import org.optaplanner.examples.projectjobscheduling.domain.solver.DelayStrengthComparator;
import org.optaplanner.examples.projectjobscheduling.domain.solver.ExecutionModeStrengthWeightFactory;
import org.optaplanner.examples.projectjobscheduling.domain.solver.NotSourceOrSinkAllocationFilter;
import org.optaplanner.examples.projectjobscheduling.domain.solver.PredecessorsDoneDateUpdatingVariableListener;
@PlanningEntity(movableEntitySelectionFilter = NotSourceOrSinkAllocationFilter.class)
@XStreamAlias("PjsAllocation")
public class Allocation extends AbstractPersistable {
private Job job;
private Allocation sourceAllocation;
private Allocation sinkAllocation;
private List<Allocation> predecessorAllocationList;
private List<Allocation> successorAllocationList;
// Planning variables: changes during planning, between score calculations.
private ExecutionMode executionMode;
private Integer delay; // In days
// Shadow variables
private Integer predecessorsDoneDate;
public Job getJob() {
return job;
}
public void setJob(Job job) {
this.job = job;
}
public Allocation getSourceAllocation() {
return sourceAllocation;
}
public void setSourceAllocation(Allocation sourceAllocation) {
this.sourceAllocation = sourceAllocation;
}
public Allocation getSinkAllocation() {
return sinkAllocation;
}
public void setSinkAllocation(Allocation sinkAllocation) {
this.sinkAllocation = sinkAllocation;
}
public List<Allocation> getPredecessorAllocationList() {
return predecessorAllocationList;
}
public void setPredecessorAllocationList(List<Allocation> predecessorAllocationList) {
this.predecessorAllocationList = predecessorAllocationList;
}
public List<Allocation> getSuccessorAllocationList() {
return successorAllocationList;
}
public void setSuccessorAllocationList(List<Allocation> successorAllocationList) {
this.successorAllocationList = successorAllocationList;
}
@PlanningVariable(valueRangeProviderRefs = {"executionModeRange"},
strengthWeightFactoryClass = ExecutionModeStrengthWeightFactory.class,
variableListenerClasses = {PredecessorsDoneDateUpdatingVariableListener.class})
public ExecutionMode getExecutionMode() {
return executionMode;
}
public void setExecutionMode(ExecutionMode executionMode) {
this.executionMode = executionMode;
}
@PlanningVariable(valueRangeProviderRefs = {"delayRange"},
strengthComparatorClass = DelayStrengthComparator.class,
variableListenerClasses = {PredecessorsDoneDateUpdatingVariableListener.class})
public Integer getDelay() {
return delay;
}
public void setDelay(Integer delay) {
this.delay = delay;
}
public Integer getPredecessorsDoneDate() {
return predecessorsDoneDate;
}
public void setPredecessorsDoneDate(Integer predecessorsDoneDate) {
this.predecessorsDoneDate = predecessorsDoneDate;
}
// ************************************************************************
// Complex methods
// ************************************************************************
public Integer getStartDate() {
if (predecessorsDoneDate == null) {
return null;
}
return predecessorsDoneDate + (delay == null ? 0 : delay);
}
public Integer getEndDate() {
if (predecessorsDoneDate == null) {
return null;
}
return predecessorsDoneDate + (delay == null ? 0 : delay)
+ (executionMode == null ? 0 : executionMode.getDuration());
}
public Project getProject() {
return job.getProject();
}
public String getLabel() {
return "Job " + job.getId();
}
// ************************************************************************
// Ranges
// ************************************************************************
@ValueRangeProvider(id = "executionModeRange")
public List<ExecutionMode> getExecutionModeRange() {
return job.getExecutionModeList();
}
@ValueRangeProvider(id = "delayRange")
public ValueRange<Integer> getDelayRange() {
return ValueRangeFactory.createIntValueRange(0, 500);
}
}
|
[
"gds.geoffrey.de.smet@gmail.com"
] |
gds.geoffrey.de.smet@gmail.com
|
cdaad7f89d150f9eead2bd9471a23fe3fc41dd43
|
f577c99267dffb5591b7e933b57ecf94b8755724
|
/src/main/java/org/drip/specialfunction/hankel/BigH1FromBigJ.java
|
15278c6a2ca84d0974402945bcbf7ec5eb9f5cad
|
[
"Apache-2.0"
] |
permissive
|
MacroFinanceHub/DROP
|
18d59cf9fedbaf335e0feb890bcfbfe344c5dfa1
|
faa3d6469962d1420aef13863334104056d6047b
|
refs/heads/master
| 2023-03-17T07:06:26.438651
| 2021-03-14T04:59:56
| 2021-03-14T04:59:56
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,635
|
java
|
package org.drip.specialfunction.hankel;
/*
* -*- mode: java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
*/
/*!
* Copyright (C) 2020 Lakshmi Krishnamurthy
* Copyright (C) 2019 Lakshmi Krishnamurthy
*
* This file is part of DROP, an open-source library targeting analytics/risk, transaction cost analytics,
* asset liability management analytics, capital, exposure, and margin analytics, valuation adjustment
* analytics, and portfolio construction analytics within and across fixed income, credit, commodity,
* equity, FX, and structured products. It also includes auxiliary libraries for algorithm support,
* numerical analysis, numerical optimization, spline builder, model validation, statistical learning,
* and computational support.
*
* https://lakshmidrip.github.io/DROP/
*
* DROP is composed of three modules:
*
* - DROP Product Core - https://lakshmidrip.github.io/DROP-Product-Core/
* - DROP Portfolio Core - https://lakshmidrip.github.io/DROP-Portfolio-Core/
* - DROP Computational Core - https://lakshmidrip.github.io/DROP-Computational-Core/
*
* DROP Product Core implements libraries for the following:
* - Fixed Income Analytics
* - Loan Analytics
* - Transaction Cost Analytics
*
* DROP Portfolio Core implements libraries for the following:
* - Asset Allocation Analytics
* - Asset Liability Management Analytics
* - Capital Estimation Analytics
* - Exposure Analytics
* - Margin Analytics
* - XVA Analytics
*
* DROP Computational Core implements libraries for the following:
* - Algorithm Support
* - Computation Support
* - Function Analysis
* - Model Validation
* - Numerical Analysis
* - Numerical Optimizer
* - Spline Builder
* - Statistical Learning
*
* Documentation for DROP is Spread Over:
*
* - Main => https://lakshmidrip.github.io/DROP/
* - Wiki => https://github.com/lakshmiDRIP/DROP/wiki
* - GitHub => https://github.com/lakshmiDRIP/DROP
* - Repo Layout Taxonomy => https://github.com/lakshmiDRIP/DROP/blob/master/Taxonomy.md
* - Javadoc => https://lakshmidrip.github.io/DROP/Javadoc/index.html
* - Technical Specifications => https://github.com/lakshmiDRIP/DROP/tree/master/Docs/Internal
* - Release Versions => https://lakshmidrip.github.io/DROP/version.html
* - Community Credits => https://lakshmidrip.github.io/DROP/credits.html
* - Issues Catalog => https://github.com/lakshmiDRIP/DROP/issues
* - JUnit => https://lakshmidrip.github.io/DROP/junit/index.html
* - Jacoco => https://lakshmidrip.github.io/DROP/jacoco/index.html
*
* 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.
*/
/**
* <i>BigH1FromBigJ</i> implements the Estimator for the Cylindrical Hankel Function of the First Kind from
* the Bessel Function of the First Kind. The References are:
*
* <br><br>
* <ul>
* <li>
* Abramowitz, M., and I. A. Stegun (2007): <i>Handbook of Mathematics Functions</i> <b>Dover Book
* on Mathematics</b>
* </li>
* <li>
* Arfken, G. B., and H. J. Weber (2005): <i>Mathematical Methods for Physicists 6<sup>th</sup>
* Edition</i> <b>Harcourt</b> San Diego
* </li>
* <li>
* Temme N. M. (1996): <i>Special Functions: An Introduction to the Classical Functions of
* Mathematical Physics 2<sup>nd</sup> Edition</i> <b>Wiley</b> New York
* </li>
* <li>
* Watson, G. N. (1995): <i>A Treatise on the Theory of Bessel Functions</i> <b>Cambridge University
* Press</b>
* </li>
* <li>
* Wikipedia (2019): Bessel Function https://en.wikipedia.org/wiki/Bessel_function
* </li>
* </ul>
*
* <br><br>
* <ul>
* <li><b>Module </b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/ComputationalCore.md">Computational Core Module</a></li>
* <li><b>Library</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/FunctionAnalysisLibrary.md">Function Analysis Library</a></li>
* <li><b>Project</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/README.md">Special Function Implementation Analysis</a></li>
* <li><b>Package</b> = <a href = "https://github.com/lakshmiDRIP/DROP/tree/master/src/main/java/org/drip/specialfunction/hankel/README.md">Ordered Hankel Function Variant Estimators</a></li>
* </ul>
*
* @author Lakshmi Krishnamurthy
*/
public class BigH1FromBigJ extends org.drip.specialfunction.definition.HankelFirstKindEstimator
{
private org.drip.specialfunction.definition.BesselFirstKindEstimator _besselFirstKindEstimator = null;
/**
* BigH1FromBigJ Constructor
*
* @param besselFirstKindEstimator Bessel Function of the First Kind Estimator
*
* @throws java.lang.Exception Thrown if the Inputs are Invalid
*/
public BigH1FromBigJ (
final org.drip.specialfunction.definition.BesselFirstKindEstimator besselFirstKindEstimator)
throws java.lang.Exception
{
if (null == (_besselFirstKindEstimator = besselFirstKindEstimator))
{
throw new java.lang.Exception ("BigH1FromBigJ Constructor => Invalid Inputs");
}
}
/**
* Retrieve the Estimator of the Bessel Function of the First Kind
*
* @return Estimator of the Bessel Function of the First Kind
*/
public org.drip.specialfunction.definition.BesselFirstKindEstimator besselFirstKindEstimator()
{
return _besselFirstKindEstimator;
}
@Override public org.drip.function.definition.CartesianComplexNumber bigH1 (
final double alpha,
final double z)
{
try
{
return new org.drip.function.definition.CartesianComplexNumber (
_besselFirstKindEstimator.bigJ (
alpha,
z
),
(
_besselFirstKindEstimator.bigJ (
alpha,
z
) * java.lang.Math.cos (java.lang.Math.PI * alpha) -
_besselFirstKindEstimator.bigJ (
-1. * alpha,
z
)
) / java.lang.Math.sin (java.lang.Math.PI * alpha)
);
}
catch (java.lang.Exception e)
{
e.printStackTrace();
}
return null;
}
}
|
[
"lakshmimv7977@gmail.com"
] |
lakshmimv7977@gmail.com
|
aea18faf7c110b82516fb65fdbffb75c0d88aeb1
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/playstore_apps/com_idamob_tinkoff_android/source/com/google/android/gms/iid/MessengerCompat.java
|
97db8574b65da40a32ea9a44134a03a72b7372f5
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 2,063
|
java
|
package com.google.android.gms.iid;
import android.os.Build.VERSION;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Message;
import android.os.Messenger;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import android.os.RemoteException;
import com.google.android.gms.common.internal.ReflectedParcelable;
public class MessengerCompat
implements ReflectedParcelable
{
public static final Parcelable.Creator<MessengerCompat> CREATOR = new f();
private Messenger a;
private d b;
public MessengerCompat(IBinder paramIBinder)
{
if (Build.VERSION.SDK_INT >= 21)
{
this.a = new Messenger(paramIBinder);
return;
}
if (paramIBinder == null) {
paramIBinder = null;
}
for (;;)
{
this.b = paramIBinder;
return;
IInterface localIInterface = paramIBinder.queryLocalInterface("com.google.android.gms.iid.IMessengerCompat");
if ((localIInterface instanceof d)) {
paramIBinder = (d)localIInterface;
} else {
paramIBinder = new e(paramIBinder);
}
}
}
private final IBinder a()
{
if (this.a != null) {
return this.a.getBinder();
}
return this.b.asBinder();
}
public final void a(Message paramMessage)
throws RemoteException
{
if (this.a != null)
{
this.a.send(paramMessage);
return;
}
this.b.a(paramMessage);
}
public int describeContents()
{
return 0;
}
public boolean equals(Object paramObject)
{
if (paramObject == null) {
return false;
}
try
{
boolean bool = a().equals(((MessengerCompat)paramObject).a());
return bool;
}
catch (ClassCastException paramObject) {}
return false;
}
public int hashCode()
{
return a().hashCode();
}
public void writeToParcel(Parcel paramParcel, int paramInt)
{
if (this.a != null)
{
paramParcel.writeStrongBinder(this.a.getBinder());
return;
}
paramParcel.writeStrongBinder(this.b.asBinder());
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
d8e91e2142cd8f87aca4523028b0072f85200e08
|
d4bc9830700cbb5e663b9b987ba7930fee1fe0f1
|
/src/_144BinaryTreePreorderTraversal.java
|
7e3214293740c16bd741ee4e8900fc0f9be572d6
|
[] |
no_license
|
Qstar/leetcode
|
e7f76a5cb6fd21c7ab75d947bba443b034804ddd
|
435787b0543c62b2d2687849220868c042d2e38f
|
refs/heads/master
| 2021-06-03T16:55:49.729422
| 2018-03-12T11:59:47
| 2018-03-12T11:59:47
| 58,041,851
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 709
|
java
|
import common.TreeNode;
import java.util.LinkedList;
import java.util.List;
import java.util.Stack;
public class _144BinaryTreePreorderTraversal {
public List<Integer> preorderTraversal(TreeNode root) {
List<Integer> preorder = new LinkedList<>();
Stack<TreeNode> stack = new Stack<>();
TreeNode node = root;
while (node != null || !stack.empty()) {
while (node != null) {
preorder.add(node.val);
stack.push(node);
node = node.left;
}
if (stack.size() > 0) {
node = stack.pop();
node = node.right;
}
}
return preorder;
}
}
|
[
"davesla2012@hotmail.com"
] |
davesla2012@hotmail.com
|
2b29407f29ba3b1a2a17e806150419010ce33d7b
|
c3101515ddde8a6e6ddc4294a4739256d1600df0
|
/GeneralApp__2.20_1.0(1)_source_from_JADX/sources/androidx/lifecycle/livedata/core/C1035R.java
|
0b5699a72c475ffff5898f1147ee31cfaae3e5ed
|
[] |
no_license
|
Aelshazly/Carty
|
b56fdb1be58a6d12f26d51b46f435ea4a73c8168
|
d13f3a4ad80e8a7d0ed1c6a5720efb4d1ca721ee
|
refs/heads/master
| 2022-11-14T23:29:53.547694
| 2020-07-08T19:23:39
| 2020-07-08T19:23:39
| 278,175,183
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 157
|
java
|
package androidx.lifecycle.livedata.core;
/* renamed from: androidx.lifecycle.livedata.core.R */
public final class C1035R {
private C1035R() {
}
}
|
[
"aelshazly@engineer.com"
] |
aelshazly@engineer.com
|
fbc149caa951d2587dbf567943f2b25880913a6d
|
3b12549e4397258ba290c43901a6a384db613e5a
|
/siyueli-platform-member-server-service/src/main/java/com/siyueli/platform/service/member/server/mapper/customform/param/CustomFieldOptionSearchParam.java
|
ceb3c1256a848b7d1956feb137bb37aad15a5019
|
[] |
no_license
|
zhouxhhn/li-member
|
56fc91fa5e089fe3aee9e7519a1b4f4a98c539bd
|
54155482e60a364fd04d07fb39b17a39b4f95a6d
|
refs/heads/master
| 2020-04-05T10:25:31.586349
| 2018-11-09T02:25:07
| 2018-11-09T02:25:07
| 156,798,261
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 150
|
java
|
package com.siyueli.platform.service.member.server.mapper.customform.param;
import lombok.Data;
@Data
public class CustomFieldOptionSearchParam {
}
|
[
"joey.zhou@siyue.cn"
] |
joey.zhou@siyue.cn
|
c5fb6bc8322cf5afbe806d6b05d1d5476ed44da4
|
aedc11e687665885561484f55d0f366c8991a0be
|
/Major Projects/Code Base/src/Data_Structures/Structures/InDevelopment/PriorityQueues/PQNode.java
|
a6c26b5b6396053f05f3c9a7806486022e272a8b
|
[] |
no_license
|
phamvanthanh/JavaCode
|
2675a4a91fe8adfdc747099432de585117e47035
|
3bc335102b0849b4ceb669e1601683e5ce9743ab
|
refs/heads/master
| 2021-08-28T01:10:34.424558
| 2017-12-11T01:32:11
| 2017-12-11T01:32:11
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 429
|
java
|
package Data_Structures.Structures.InDevelopment.PriorityQueues;
public class PQNode<E> implements Comparable<PQNode<E>>
{
private int priority;
private E elem;
public PQNode(E elem, int p)
{
this.elem = elem;
this.priority = p;
}
@Override
public int compareTo(PQNode<E> o)
{
return priority - o.priority;
}
public E getElem()
{
return elem;
}
public int getPriority()
{
return priority;
}
}
|
[
"bryce@funtheemental.com"
] |
bryce@funtheemental.com
|
de0d948473ae3266ebb42637b66f2b57dc102245
|
9a474ca5b0649fbfd510c3c38f344d20e07cd343
|
/sports_web/sports-service/src/main/java/com/efida/sports/service/impl/GoodsServiceImpl.java
|
2c6ab1772a26977cdd6c44bb019fbf8d8fe6a84a
|
[] |
no_license
|
lqdcanty/znty
|
8c8d1468bbc7d365708c166800e1fdbef464f96b
|
f2175d9adc823e33b04444b32b526ce82e054273
|
refs/heads/master
| 2020-05-13T19:13:45.738087
| 2019-04-16T09:04:09
| 2019-04-16T09:04:09
| 181,652,152
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,487
|
java
|
package com.efida.sports.service.impl;
import java.util.List;
import java.util.Map;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import com.efida.sports.entity.Goods;
import com.efida.sports.mapper.GoodsMapper;
import com.efida.sports.service.IGoodsService;
@Service
public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements IGoodsService {
private static Logger log = LoggerFactory.getLogger(GoodsServiceImpl.class);
@Autowired
private GoodsMapper goodsMapper;
@Override
public Goods getGoodsByCode(String goodsCode) {
Wrapper<Goods> wrapper = new EntityWrapper<Goods>();
wrapper.eq("goods_code", goodsCode);
Goods goods = selectOne(wrapper);
return goods;
}
@Override
public Goods getGoodsByMatchCode(String matchCode) {
Wrapper<Goods> wrapper = new EntityWrapper<Goods>();
wrapper.eq("match_code", matchCode);
Goods goods = selectOne(wrapper);
return goods;
}
@Override
public List<Goods> selectGoods(Page<Goods> goods, Map<String, Object> params) {
return goodsMapper.selectGoods(goods, params);
}
}
|
[
"lqdcanty@163.com"
] |
lqdcanty@163.com
|
7d9675e133c9c37a39e92a9c80b8afc719c787be
|
aa65ba75852735fadd7c113d32527b257f3afb6f
|
/components/identity/org.wso2.carbon.identity.provider/src/main/java/org/wso2/carbon/identity/provider/internal/IdentityProviderServiceComponent.java
|
e7d9bf3bbc489a2418bb271f5aade4ae8d43fcef
|
[] |
no_license
|
Cloudxtreme/platform-3
|
0f2853c44604a07380de86abaad695b8744f990b
|
28e34d628dd4c5990b16604a5ec9aeb23be177ae
|
refs/heads/master
| 2021-05-29T14:40:32.621959
| 2012-12-03T12:15:43
| 2012-12-03T12:15:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,148
|
java
|
/*
* Copyright 2004,2005 The Apache Software Foundation.
*
* 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.wso2.carbon.identity.provider.internal;
import org.apache.axis2.context.ConfigurationContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.openid4java.server.ServerAssociationStore;
import org.osgi.service.component.ComponentContext;
import org.wso2.carbon.identity.core.util.IdentityUtil;
import org.wso2.carbon.identity.provider.IdentityAttributeService;
import org.wso2.carbon.identity.provider.IdentityAttributeServiceStore;
import org.wso2.carbon.identity.provider.IdentityProviderUtil;
import org.wso2.carbon.identity.provider.openid.CarbonServerAssociationStore;
import org.wso2.carbon.registry.core.service.RegistryService;
import org.wso2.carbon.user.core.UserRealm;
import org.wso2.carbon.user.core.service.RealmService;
import org.wso2.carbon.utils.ConfigurationContextService;
/**
* @scr.component name="identity.provider.component" immediate="true"
* @scr.reference name="registry.service"
* interface="org.wso2.carbon.registry.core.service.RegistryService"
* cardinality="1..1" policy="dynamic" bind="setRegistryService"
* unbind="unsetRegistryService"
* @scr.reference name="config.context.service"
* interface="org.wso2.carbon.utils.ConfigurationContextService" cardinality="1..1"
* policy="dynamic" bind="setConfigurationContextService"
* unbind="unsetConfigurationContextService"
* @scr.reference name="user.realmservice.default" interface="org.wso2.carbon.user.core.service.RealmService"
* cardinality="1..1" policy="dynamic" bind="setRealmService"
* unbind="unsetRealmService"
* @scr.reference name="identity.core.util.service"
* interface="org.wso2.carbon.identity.core.util.IdentityUtil" cardinality="1..1"
* policy="dynamic" bind="setIdentityUtil" unbind="unsetIdentityUtil"
* @scr.reference name="identity.attribute.service"
* interface="org.wso2.carbon.identity.provider.IdentityAttributeService"
* cardinality="0..n" policy="dynamic" bind="addAttributeService"
* unbind="removeAttributeService"
*/
public class IdentityProviderServiceComponent {
private static Log log = LogFactory.getLog(IdentityProviderServiceComponent.class);
private static ConfigurationContext configContext;
private static RealmService realmService;
private static RegistryService registryService;
private static ServerAssociationStore associationStore;
public static RealmService getRealmService() {
return realmService;
}
/**
*
*/
public IdentityProviderServiceComponent() {
}
/**
*
* @param ctxt
*/
protected void activate(ComponentContext ctxt) {
if (log.isDebugEnabled()) {
log.info("Identity Provider bundle is activated");
}
try {
ctxt.getBundleContext().registerService(IdentityProviderUtil.class.getName(),
new IdentityProviderUtil(), null);
associationStore = new CarbonServerAssociationStore();
} catch (Throwable e) {
log.error("Failed to initialize Identity Provider", e);
}
}
/**
*
* @param ctxt
*/
protected void deactivate(ComponentContext ctxt) {
if (log.isDebugEnabled()) {
log.info("Identity Provider bundle is deactivated");
}
}
/**
*
* @param registryService
*/
protected void setRegistryService(RegistryService registryService) {
this.registryService = registryService;
if (log.isDebugEnabled()) {
log.info("RegistryService set in Identity Provider bundle");
}
}
/**
*
* @param registryService
*/
protected void unsetRegistryService(RegistryService registryService) {
this.registryService = null;
if (log.isDebugEnabled()) {
log.info("RegistryService unset in Identity Provider bundle");
}
}
/**
*
* @param userRealmDelegating
*/
protected void unsetUserRealmDelegating(UserRealm userRealmDelegating) {
if (log.isDebugEnabled()) {
log.info("DelegatingUserRealm set in Identity Provider bundle");
}
}
/**
*
* @param userRealmDefault
*/
protected void unsetUserRealmDefault(UserRealm userRealmDefault) {
if (log.isDebugEnabled()) {
log.info("DefaultUserRealm unset in Identity Provider bundle");
}
}
/**
*
* @param realmService
*/
protected void setRealmService(RealmService realmService){
if(log.isDebugEnabled()){
log.info("ReleamService is set in Identity Provider Service Bundle");
}
this.realmService = realmService;
}
/**
*
* @param realmService
*/
protected void unsetRealmService(RealmService realmService){
if (log.isDebugEnabled()) {
log.info("ReleamService is unset in Identity Provider Service Bundle");
}
}
protected void addAttributeService(IdentityAttributeService attributeService) {
if (log.isDebugEnabled()) {
log.info("IdentityAttributeService added in Identity Provider bundle");
}
IdentityAttributeServiceStore.addAttributeService(attributeService);
}
/**
*
* @param attributeService
*/
protected void removeAttributeService(IdentityAttributeService attributeService) {
if (log.isDebugEnabled()) {
log.info("IdentityAttributeService removed in Identity Provider bundle");
IdentityAttributeServiceStore.removeAttributeService(attributeService);
}
}
/**
*
* @param contextService
*/
protected void setConfigurationContextService(ConfigurationContextService contextService) {
if (log.isDebugEnabled()) {
log.info("ConfigurationContextService set in Identity Provider bundle");
}
configContext = contextService.getServerConfigContext();
}
/**
*
* @param contextService
*/
protected void unsetConfigurationContextService(ConfigurationContextService contextService) {
if (log.isDebugEnabled()) {
log.info("ConfigurationContextService unset in Identity Provider bundle");
}
}
/**
*
* @param identityUtil
*/
protected void setIdentityUtil(IdentityUtil identityUtil) {
if (log.isDebugEnabled()) {
log.info("IdentityUtil set in Identity Provider bundle");
}
}
/**
*
* @param identityUtil
*/
protected void unsetIdentityUtil(IdentityUtil identityUtil) {
if (log.isDebugEnabled()) {
log.info("IdentityUtil unset in Identity Provider bundle");
}
}
/**
*
* @return
*/
public static ConfigurationContext getConfigContext() {
return configContext;
}
public static RegistryService getRegistryService(){
return registryService;
}
public static ServerAssociationStore getAssociationStore() {
return associationStore;
}
}
|
[
"hasini@a5903396-d722-0410-b921-86c7d4935375"
] |
hasini@a5903396-d722-0410-b921-86c7d4935375
|
e0a88e17d184942c9e4ede9dda22da54f33d6d90
|
92f10c41bad09bee05acbcb952095c31ba41c57b
|
/app/src/main/java/io/github/alula/ohmygod/MainActivity3546.java
|
3269808003ce999d67c2c6c4bac70a0a4d74a7a6
|
[] |
no_license
|
alula/10000-activities
|
bb25be9aead3d3d2ea9f9ef8d1da4c8dff1a7c62
|
f7e8de658c3684035e566788693726f250170d98
|
refs/heads/master
| 2022-07-30T05:54:54.783531
| 2022-01-29T19:53:04
| 2022-01-29T19:53:04
| 453,501,018
| 16
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 339
|
java
|
package io.github.alula.ohmygod;
import androidx.appcompat.app.AppCompatActivity;
import android.os.Bundle;
public class MainActivity3546 extends AppCompatActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
}
}
|
[
"6276139+alula@users.noreply.github.com"
] |
6276139+alula@users.noreply.github.com
|
325fdd0c51a4048c4e5180bf4eb47b75160a4fdd
|
8dcdb46fbb6a9ba9ebcd4fd827ce2670c1953069
|
/threatconnect-app/playbooks-core/src/main/java/com/threatconnect/app/playbooks/content/accumulator/KeyValueAccumulator.java
|
b764615575bb5d6bfaf1d3498eec5fd516ac05b0
|
[
"Apache-2.0"
] |
permissive
|
ThreatConnect-Inc/threatconnect-java
|
1243d812cae54724710276dab60418cd7e2e97ed
|
af1397e9e9d49c4391e321cbd627340bfd3003bc
|
refs/heads/master
| 2023-08-31T18:22:06.686473
| 2021-08-25T15:06:28
| 2021-08-25T15:06:28
| 27,193,063
| 5
| 3
|
NOASSERTION
| 2022-05-20T20:49:45
| 2014-11-26T19:38:13
|
Java
|
UTF-8
|
Java
| false
| false
| 2,039
|
java
|
package com.threatconnect.app.playbooks.content.accumulator;
import com.threatconnect.app.addons.util.config.install.StandardPlaybookType;
import com.threatconnect.app.playbooks.content.converter.KeyValueConverter;
import com.threatconnect.app.playbooks.content.entity.KeyValue;
import com.threatconnect.app.playbooks.db.DBService;
import com.threatconnect.app.playbooks.util.KeyValueUtil;
/**
* @author Greg Marut
*/
public class KeyValueAccumulator extends TypedContentAccumulator<KeyValue>
{
private final StringAccumulator stringAccumulator;
public KeyValueAccumulator(final DBService dbService)
{
super(dbService, StandardPlaybookType.KeyValue, new KeyValueConverter());
this.stringAccumulator = new StringAccumulator(dbService);
}
/**
* Reads the content while looking for embedded variables and replacing them with their resolved value.
*
* @param key the key to check to resolve any embedded variables
* @param resolveEmbeddedVariables when true, recursion is allowed when resolving variables. Therefore, if a
* variable is resolved and it contains more variables embedded in the string, the
* lookups continue until all variables have been recursively resolved or a variable
* could not be found.
* @return the content read from the database using the given key.
* @throws ContentException if there was an issue reading/writing to the database.
*/
public KeyValue readContent(final String key, final boolean resolveEmbeddedVariables)
throws ContentException
{
//read the key value object and check for variables
KeyValue result = super.readContent(key);
//ensure that embedded variables should be resolved
if (resolveEmbeddedVariables)
{
KeyValueUtil.resolveEmbeddedVariables(result, stringAccumulator);
}
return result;
}
@Override
public KeyValue readContent(final String key) throws ContentException
{
return readContent(key, true);
}
}
|
[
"gmarut@threatconnect.com"
] |
gmarut@threatconnect.com
|
b40685b3fe10a389546e71f4162bc66bdc5a60fa
|
9e08e211b4d98aeed220797031b9bf750a9fa1d2
|
/src/main/java/net/segoia/distributed/framework/TaskProcessingResponse.java
|
4afe7fe3e8e6309a1e9d3c5c717a7bdb289d647b
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
acionescu/distributed-processor
|
378366f6f16b653bdf21d89430d34cced2643783
|
35454f048a92cdb3501dfebe2ee85804a9ca2c09
|
refs/heads/master
| 2020-12-24T16:24:48.291088
| 2017-06-14T12:30:06
| 2017-06-14T12:30:06
| 1,417,589
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,377
|
java
|
/**
* distributed-processor - A distributed task processing framework
* Copyright (C) 2009 Adrian Cristian Ionescu - https://github.com/acionescu
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package net.segoia.distributed.framework;
import java.io.Serializable;
import org.jgroups.Address;
/**
* The response that contains the information obtained after a task was processed
*
* @author adi
*
*/
public class TaskProcessingResponse implements Serializable {
/**
*
*/
private static final long serialVersionUID = -3088811983234127035L;
private Long taskId;
protected Serializable result;
protected Exception exception;
private Address processingNodeAddress;
public TaskProcessingResponse(Long taskId, Serializable result) {
this.taskId = taskId;
this.result = result;
}
public TaskProcessingResponse(Long taskId, Serializable result, Address nodeAddress) {
this(taskId, result);
this.processingNodeAddress = nodeAddress;
}
public TaskProcessingResponse(Long taskId, Serializable result, Exception ex) {
this.taskId = taskId;
this.result = result;
this.exception = ex;
}
public TaskProcessingResponse(Long taskId, Serializable result, Exception ex, Address nodeAddress) {
this(taskId, result, ex);
this.processingNodeAddress = nodeAddress;
}
public TaskProcessingResponse(Long taskId) {
this.taskId = taskId;
}
public boolean isSucessful() {
return (exception == null);
}
public Long getTaskId() {
return taskId;
}
public Serializable getResult() {
return result;
}
public Exception getException() {
return exception;
}
/**
* @return the processingNodeAddress
*/
public Address getProcessingNodeAddress() {
return processingNodeAddress;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((processingNodeAddress == null) ? 0 : processingNodeAddress.hashCode());
result = prime * result + ((taskId == null) ? 0 : taskId.hashCode());
return result;
}
/*
* (non-Javadoc)
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
TaskProcessingResponse other = (TaskProcessingResponse) obj;
if (processingNodeAddress == null) {
if (other.processingNodeAddress != null)
return false;
} else if (!processingNodeAddress.equals(other.processingNodeAddress))
return false;
if (taskId == null) {
if (other.taskId != null)
return false;
} else if (!taskId.equals(other.taskId))
return false;
return true;
}
}
|
[
"adrian.ionescu.consulting@gmail.com"
] |
adrian.ionescu.consulting@gmail.com
|
6f4a5349088bd9272738f7c4535659efd08711fd
|
b74e687017636540075fd4a98f4edf2073291855
|
/graphql-maven-plugin-samples/graphql-maven-plugin-samples-StarWars-client/src/main/java/com/graphql_java_generator/mavenplugin/samples/simple/client/Queries.java
|
40e469dd07819957d53b9c0f0711b760ac95189e
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
sullis/graphql-maven-plugin-project
|
4a26292410f927304285808e69c3265965a2932d
|
de31466b3000b10ff096b107c6f99dcb4cbb5421
|
refs/heads/master
| 2020-06-28T05:06:57.290251
| 2019-07-18T11:48:43
| 2019-07-18T11:48:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,666
|
java
|
package com.graphql_java_generator.mavenplugin.samples.simple.client;
import com.generated.graphql.Character;
import com.generated.graphql.Droid;
import com.generated.graphql.Human;
import com.graphql_java_generator.client.response.GraphQLExecutionException;
import com.graphql_java_generator.client.response.GraphQLRequestPreparationException;
public interface Queries {
// First part: queries
Character heroFull() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Character heroPartial() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Character heroFriendsFriendsFriends() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Human humanFull() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Human humanPartial() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Human humanFriendsFriendsFriends() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Droid droidFull() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Droid droidPartial() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Droid droidFriendsFriendsFriends() throws GraphQLExecutionException, GraphQLRequestPreparationException;
Droid droidDoesNotExist() throws GraphQLExecutionException, GraphQLRequestPreparationException;
// Second part: mutations
Human createHuman(String name, String homePlanet)
throws GraphQLExecutionException, GraphQLRequestPreparationException;
Character addFriend(String idCharacter, String idNewFriend)
throws GraphQLExecutionException, GraphQLRequestPreparationException;
}
|
[
"etienne_sf@users.sf.net"
] |
etienne_sf@users.sf.net
|
c8a2f44ce314e666745f7065c60117f66ecb7c87
|
42e6e7f98090236e416112efafbedd26f9bdb169
|
/src/main/java/net/mrscauthd/boss_tools/procedures/RocketOverlyYMarsmainProcedure.java
|
624e2606dbd907de50de75190c034ba0f1f01264
|
[] |
no_license
|
Romaindu35/Space-Bosstools
|
77fe4ef0c416be7e2193406a953c8a6b0abcb00e
|
28ed6def84589578fecaf53c71c0df398108287f
|
refs/heads/master
| 2023-03-08T22:39:40.526151
| 2021-03-12T09:20:01
| 2021-03-12T09:20:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,881
|
java
|
package net.mrscauthd.boss_tools.procedures;
import net.mrscauthd.boss_tools.entity.RocketTier3Entity;
import net.mrscauthd.boss_tools.entity.RocketTier2Entity;
import net.mrscauthd.boss_tools.entity.RocketEntity;
import net.mrscauthd.boss_tools.BossToolsModElements;
import net.mrscauthd.boss_tools.BossToolsMod;
import net.minecraft.world.World;
import net.minecraft.world.IWorld;
import net.minecraft.util.registry.Registry;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.RegistryKey;
import net.minecraft.entity.Entity;
import java.util.Map;
@BossToolsModElements.ModElement.Tag
public class RocketOverlyYMarsmainProcedure extends BossToolsModElements.ModElement {
public RocketOverlyYMarsmainProcedure(BossToolsModElements instance) {
super(instance, 705);
}
public static boolean executeProcedure(Map<String, Object> dependencies) {
if (dependencies.get("entity") == null) {
if (!dependencies.containsKey("entity"))
BossToolsMod.LOGGER.warn("Failed to load dependency entity for procedure RocketOverlyYMarsmain!");
return false;
}
if (dependencies.get("world") == null) {
if (!dependencies.containsKey("world"))
BossToolsMod.LOGGER.warn("Failed to load dependency world for procedure RocketOverlyYMarsmain!");
return false;
}
Entity entity = (Entity) dependencies.get("entity");
IWorld world = (IWorld) dependencies.get("world");
if (((world instanceof World ? (((World) world).getDimensionKey()) : World.OVERWORLD) == (RegistryKey.getOrCreateKey(Registry.WORLD_KEY,
new ResourceLocation("boss_tools:mars"))))) {
if ((((entity.getRidingEntity()) instanceof RocketEntity.CustomEntity)
|| (((entity.getRidingEntity()) instanceof RocketTier2Entity.CustomEntity)
|| ((entity.getRidingEntity()) instanceof RocketTier3Entity.CustomEntity)))) {
return (true);
}
}
return (false);
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
9d7aea6a36f091ea5ab673167601bd42954baef3
|
80bb2019f1f8cf0db2191b34ec486faff6433b0c
|
/spring-cloud-config-server/src/test/java/org/springframework/cloud/config/server/EnvironmentControllerTests.java
|
a8d80268182377528ea37192ad8d5dca0cb2d56f
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] |
permissive
|
roykachouh/spring-cloud-config
|
f289a0c1a967bd3148dc978a6ef122f5257d54c4
|
2865804c5bac23b8ba0ebb973a882368b92b3f57
|
refs/heads/master
| 2021-01-18T02:22:57.834360
| 2015-02-24T22:14:56
| 2015-02-24T23:14:06
| 29,275,294
| 0
| 0
| null | 2015-01-15T01:46:07
| 2015-01-15T01:46:07
| null |
UTF-8
|
Java
| false
| false
| 6,043
|
java
|
/*
* Copyright 2013-2014 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.cloud.config.server;
import static org.junit.Assert.assertEquals;
import java.util.Collections;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.ExpectedException;
import org.mockito.Mockito;
import org.springframework.cloud.config.Environment;
import org.springframework.cloud.config.PropertySource;
import org.springframework.http.MediaType;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.springframework.test.web.servlet.setup.MockMvcBuilders;
/**
* @author Dave Syer
*
*/
public class EnvironmentControllerTests {
@Rule
public ExpectedException expected = ExpectedException.none();
private EnvironmentRepository repository = Mockito.mock(EnvironmentRepository.class);
private EnvironmentController controller = new EnvironmentController(repository,
new EncryptionController());
private Environment environment = new Environment("foo", "master");
@Test
public void vanillaYaml() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put("a.b.c", "d");
environment.add(new PropertySource("one", map));
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
String yaml = controller.yaml("foo", "bar").getBody();
assertEquals("a:\n b:\n c: d\n", yaml);
}
@Test
public void propertyOverrideInYaml() throws Exception {
Map<String, Object> map = new HashMap<String, Object>();
map.put("a.b.c", "d");
environment.add(new PropertySource("one", map));
environment.addFirst(new PropertySource("two", Collections.singletonMap("a.b.c", "e")));
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
String yaml = controller.yaml("foo", "bar").getBody();
assertEquals("a:\n b:\n c: e\n", yaml);
}
@Test
public void arrayInYaml() throws Exception {
Map<String, Object> map = new LinkedHashMap<String, Object>();
map.put("a.b[0]", "c");
map.put("a.b[1]", "d");
environment.add(new PropertySource("one", map));
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
String yaml = controller.yaml("foo", "bar").getBody();
assertEquals("a:\n b:\n - c\n - d\n", yaml);
}
@Test
public void mappingForEnvironment() throws Exception {
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/foo/bar")).andExpect(
MockMvcResultMatchers.status().isOk());
}
@Test
public void mappingForLabelledEnvironment() throws Exception {
Mockito.when(repository.findOne("foo", "bar", "other")).thenReturn(environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/foo/bar/other")).andExpect(
MockMvcResultMatchers.status().isOk());
}
@Test
public void mappingForYaml() throws Exception {
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/foo-bar.yml")).andExpect(
MockMvcResultMatchers.content().contentType(MediaType.TEXT_PLAIN));
}
@Test
public void mappingForLabelledYaml() throws Exception {
Mockito.when(repository.findOne("foo", "bar", "other")).thenReturn(environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/other/foo-bar.yml")).andExpect(
MockMvcResultMatchers.content().contentType(MediaType.TEXT_PLAIN));
}
@Test
public void mappingForLabelledProperties() throws Exception {
Mockito.when(repository.findOne("foo", "bar", "other")).thenReturn(environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/other/foo-bar.properties")).andExpect(
MockMvcResultMatchers.content().contentType(MediaType.TEXT_PLAIN));
}
@Test
public void mappingForProperties() throws Exception {
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/foo-bar.properties")).andExpect(
MockMvcResultMatchers.content().contentType(MediaType.TEXT_PLAIN));
}
@Test
public void mappingForLabelledYamlWithHyphen() throws Exception {
Mockito.when(repository.findOne("foo", "bar-spam", "other")).thenReturn(
environment);
MockMvc mvc = MockMvcBuilders.standaloneSetup(controller).build();
mvc.perform(MockMvcRequestBuilders.get("/other/foo-bar-spam.yml")).andExpect(
MockMvcResultMatchers.status().isBadRequest());
}
@Test
public void allowOverrideFalse() throws Exception {
controller.setOverrides(Collections.singletonMap("foo", "bar"));
Map<String, Object> map = new HashMap<String, Object>();
map.put("a.b.c", "d");
environment.add(new PropertySource("one", map));
Mockito.when(repository.findOne("foo", "bar", "master")).thenReturn(environment);
assertEquals("{foo=bar}", controller.master("foo", "bar").getPropertySources()
.get(0).getSource().toString());
}
}
|
[
"dsyer@pivotal.io"
] |
dsyer@pivotal.io
|
2f2cdad51cc7bf5ebdc9794520de74515e9c401d
|
1b5987a7e72a58e12ac36a36a60aa6add2661095
|
/code/org/processmining/analysis/hierarchicaldatavisualization/HierarchicalData.java
|
55a2e3d1cfa5bd160722ba346fc3421450e672ca
|
[] |
no_license
|
qianc62/BePT
|
f4b1da467ee52e714c9a9cc2fb33cd2c75bdb5db
|
38fb5cc5521223ba07402c7bb5909b17967cfad8
|
refs/heads/master
| 2021-07-11T16:25:25.879525
| 2020-09-22T10:50:51
| 2020-09-22T10:50:51
| 201,562,390
| 36
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 790
|
java
|
package org.processmining.analysis.hierarchicaldatavisualization;
import java.util.List;
import org.processmining.framework.models.DotFormatter;
import org.processmining.framework.models.ModelGraph;
public interface HierarchicalData extends Iterable<HierarchicalDataElement> {
DotFormatter getDotFormatter();
List<String> getAvailableNumberFormatNames();
String formatNumber(int format, double value); // the given format will be a
// valid index in the list
// returned by
// getAvailableNumberFormats
List<ModelGraph> graphsToExclude();
// These two functions should return the type of hierarchy as a string. For
// example: Ontology / Ontologies.
// The names should start with a capital letter.
String getSingularHierarchyName();
String getPluralHierarchyName();
}
|
[
"qianc62@gmail.com"
] |
qianc62@gmail.com
|
672b85ad0bbff0da4aa14ec4900ad6182e59da44
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/30/30_60dc74a0d8d0e070cf18e58af4992495d52827a6/SVGZoomAndPanHandler/30_60dc74a0d8d0e070cf18e58af4992495d52827a6_SVGZoomAndPanHandler_t.java
|
49855db37e31447019f79ee15641a366242079b9
|
[] |
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,694
|
java
|
package webboards.client.display.svg;
import org.vectomatic.dom.svg.OMSVGMatrix;
import org.vectomatic.dom.svg.OMSVGPoint;
import org.vectomatic.dom.svg.OMSVGRect;
import org.vectomatic.dom.svg.impl.SVGImageElement;
import org.vectomatic.dom.svg.impl.SVGSVGElement;
import webboards.client.display.VisualCoords;
import com.google.gwt.event.dom.client.KeyPressEvent;
import com.google.gwt.event.dom.client.KeyPressHandler;
import com.google.gwt.event.dom.client.MouseDownEvent;
import com.google.gwt.event.dom.client.MouseDownHandler;
import com.google.gwt.event.dom.client.MouseEvent;
import com.google.gwt.event.dom.client.MouseMoveEvent;
import com.google.gwt.event.dom.client.MouseMoveHandler;
import com.google.gwt.event.dom.client.MouseUpEvent;
import com.google.gwt.event.dom.client.MouseUpHandler;
import com.google.gwt.event.dom.client.MouseWheelEvent;
import com.google.gwt.event.dom.client.MouseWheelHandler;
import com.google.gwt.user.client.Window;
public class SVGZoomAndPanHandler implements MouseDownHandler, MouseUpHandler, MouseMoveHandler, MouseWheelHandler, KeyPressHandler {
private static final float KEY_ZOOM_STEP = 1.3f;
private static final boolean LOW_RES_PANNING = false;
private float minScale = 0.25f;
private final VisualCoords size;
private final VisualCoords mouse = new VisualCoords(0, 0);
private final VisualCoords offset = new VisualCoords(0, 0);
private final SVGSVGElement svg;
private float scale = 1.0f;
private boolean lowRes = false;
private boolean panning = false;
public SVGZoomAndPanHandler(SVGSVGElement svg) {
this.svg = svg;
OMSVGRect viewbox = svg.getViewBox().getBaseVal();
size = new VisualCoords((int) viewbox.getWidth(), (int) viewbox.getHeight());
minScale = Math.min(Window.getClientWidth() / viewbox.getWidth(), Window.getClientHeight() / viewbox.getHeight());
}
@Override
public void onMouseWheel(MouseWheelEvent event) {
if(event.getDeltaY() > 0) {
scale /= KEY_ZOOM_STEP;
} else {
scale *= KEY_ZOOM_STEP;
}
updateZoom();
event.preventDefault();
}
private void updateZoom() {
if (scale < minScale)
scale = minScale;
float x = mouse.x;
float y = mouse.y;
OMSVGPoint before = toUsertSpace(x, y);
OMSVGRect viewbox = svg.getViewBox().getBaseVal();
viewbox.setWidth(size.x / scale);
viewbox.setHeight(size.y / scale);
OMSVGPoint after = toUsertSpace(x, y);
float dx = before.getX() - after.getX();
float dy = before.getY() - after.getY();
viewbox.setX(viewbox.getX() + dx);
viewbox.setY(viewbox.getY() + dy);
}
private OMSVGPoint toUsertSpace(float x, float y) {
OMSVGMatrix ctm = svg.getScreenCTM();
OMSVGPoint p = svg.createSVGPoint();
p.setX(x);
p.setY(y);
p = p.matrixTransform(ctm.inverse());
return p;
}
@Override
public void onMouseMove(MouseMoveEvent e) {
if(e.getNativeButton() == 0) {
panning = false;
onMouseUp(null);
return;
}
if (panning) {
e.preventDefault();
float x = mouse.x;
float y = mouse.y;
OMSVGPoint start = toUsertSpace(x, y);
OMSVGPoint pos = toUsertSpace(e.getClientX(), e.getClientY());
if (!lowRes) {
lowRes = true;
updateImageResolution();
}
OMSVGRect viewBox = svg.getViewBox().getBaseVal();
viewBox.setX(offset.x + (start.getX() - pos.getX()));
viewBox.setY(offset.y + (start.getY() - pos.getY()));
} else {
updateMousePosition(e);
}
}
private void updateImageResolution() {
if(LOW_RES_PANNING) {
SVGImageElement boardImg = (SVGImageElement) svg.getElementById("img");
boardImg.getHref().setBaseVal(lowRes ? "board-low.jpg" : "board.jpg");
}
}
private void updateMousePosition(MouseEvent<?> e) {
mouse.x = e.getClientX();
mouse.y = e.getClientY();
OMSVGRect viewbox = svg.getViewBox().getBaseVal();
offset.x = (int) viewbox.getX();
offset.y = (int) viewbox.getY();
}
@Override
public void onMouseUp(MouseUpEvent event) {
if (panning) {
event.preventDefault();
}
panning = false;
lowRes = false;
updateImageResolution();
}
@Override
public void onMouseDown(MouseDownEvent event) {
updateMousePosition(event);
panning = true;
}
@Override
public void onKeyPress(KeyPressEvent event) {
char c = event.getCharCode();
switch (c) {
case '[':case 'q':
scale /= KEY_ZOOM_STEP;
updateZoom();
break;
case ']':case 'w':
scale *= KEY_ZOOM_STEP;
updateZoom();
break;
case '\\': case '1':
scale = 1;
updateZoom();
OMSVGRect viewBox = svg.getViewBox().getBaseVal();
viewBox.setX(0);
viewBox.setY(0);
break;
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
89ae01c565096544c90dbb95acf2f97a77e68606
|
088cad7c00db1e05ad2ab219e393864f3bf7add6
|
/classes/android/support/graphics/drawable/Animatable2Compat$AnimationCallback$1.java
|
728b64a8be0ef3b07e6addefd108b24a78f163e9
|
[] |
no_license
|
devidwfreitas/com-santander-app.7402
|
8e9f344f5132b1c602d80929f1ff892293f4495d
|
e9a92b20dc3af174f9b27ad140643b96fb78f04d
|
refs/heads/main
| 2023-05-01T09:33:58.835056
| 2021-05-18T23:54:43
| 2021-05-18T23:54:43
| 368,692,384
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 746
|
java
|
package android.support.graphics.drawable;
import android.graphics.drawable.Animatable2;
import android.graphics.drawable.Drawable;
class Animatable2Compat$AnimationCallback$1 extends Animatable2.AnimationCallback {
public void onAnimationEnd(Drawable paramDrawable) {
Animatable2Compat$AnimationCallback.this.onAnimationEnd(paramDrawable);
}
public void onAnimationStart(Drawable paramDrawable) {
Animatable2Compat$AnimationCallback.this.onAnimationStart(paramDrawable);
}
}
/* Location: C:\Users\devid\Downloads\SAST\Santander\dex2jar-2.0\classes-dex2jar.jar!\android\support\graphics\drawable\Animatable2Compat$AnimationCallback$1.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/
|
[
"devid.wfreitas@gmail.com"
] |
devid.wfreitas@gmail.com
|
f301f460025792012a522b0da796c25042c379ed
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/CHART-13b-3-1-PESA_II-WeightedSum:TestLen:CallDiversity/org/jfree/chart/block/BorderArrangement_ESTest.java
|
416466ba5cbdcefd771629af68733da01135c89f
|
[] |
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
| 568
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sun Jan 19 16:04:14 GMT+00:00 2020
*/
package org.jfree.chart.block;
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 BorderArrangement_ESTest extends BorderArrangement_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
d37e0d42e54c52b5d27082ebb7923a40e48dfa57
|
73267be654cd1fd76cf2cb9ea3a75630d9f58a41
|
/services/ec/src/main/java/com/huaweicloud/sdk/ec/v1/model/ShowEquipmentSpecificConfigRequest.java
|
02a967f76c0dfafac7b302b532bcaee2a6bb5317
|
[
"Apache-2.0"
] |
permissive
|
huaweicloud/huaweicloud-sdk-java-v3
|
51b32a451fac321a0affe2176663fed8a9cd8042
|
2f8543d0d037b35c2664298ba39a89cc9d8ed9a3
|
refs/heads/master
| 2023-08-29T06:50:15.642693
| 2023-08-24T08:34:48
| 2023-08-24T08:34:48
| 262,207,545
| 91
| 57
|
NOASSERTION
| 2023-09-08T12:24:55
| 2020-05-08T02:27:00
|
Java
|
UTF-8
|
Java
| false
| false
| 4,001
|
java
|
package com.huaweicloud.sdk.ec.v1.model;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonValue;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
/**
* Request Object
*/
public class ShowEquipmentSpecificConfigRequest {
/**
* ่ฎพๅค็ฑปๅ
*/
public static final class EquipmentTypeEnum {
/**
* Enum STANDARD for value: "standard"
*/
public static final EquipmentTypeEnum STANDARD = new EquipmentTypeEnum("standard");
private static final Map<String, EquipmentTypeEnum> STATIC_FIELDS = createStaticFields();
private static Map<String, EquipmentTypeEnum> createStaticFields() {
Map<String, EquipmentTypeEnum> map = new HashMap<>();
map.put("standard", STANDARD);
return Collections.unmodifiableMap(map);
}
private String value;
EquipmentTypeEnum(String value) {
this.value = value;
}
@JsonValue
public String getValue() {
return value;
}
@Override
public String toString() {
return String.valueOf(value);
}
@JsonCreator
public static EquipmentTypeEnum fromValue(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value)).orElse(new EquipmentTypeEnum(value));
}
public static EquipmentTypeEnum valueOf(String value) {
if (value == null) {
return null;
}
return java.util.Optional.ofNullable(STATIC_FIELDS.get(value))
.orElseThrow(() -> new IllegalArgumentException("Unexpected value '" + value + "'"));
}
@Override
public boolean equals(Object obj) {
if (obj instanceof EquipmentTypeEnum) {
return this.value.equals(((EquipmentTypeEnum) obj).value);
}
return false;
}
@Override
public int hashCode() {
return this.value.hashCode();
}
}
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonProperty(value = "equipment_type")
private EquipmentTypeEnum equipmentType;
public ShowEquipmentSpecificConfigRequest withEquipmentType(EquipmentTypeEnum equipmentType) {
this.equipmentType = equipmentType;
return this;
}
/**
* ่ฎพๅค็ฑปๅ
* @return equipmentType
*/
public EquipmentTypeEnum getEquipmentType() {
return equipmentType;
}
public void setEquipmentType(EquipmentTypeEnum equipmentType) {
this.equipmentType = equipmentType;
}
@Override
public boolean equals(java.lang.Object obj) {
if (this == obj) {
return true;
}
if (obj == null || getClass() != obj.getClass()) {
return false;
}
ShowEquipmentSpecificConfigRequest that = (ShowEquipmentSpecificConfigRequest) obj;
return Objects.equals(this.equipmentType, that.equipmentType);
}
@Override
public int hashCode() {
return Objects.hash(equipmentType);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ShowEquipmentSpecificConfigRequest {\n");
sb.append(" equipmentType: ").append(toIndentedString(equipmentType)).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 ");
}
}
|
[
"hwcloudsdk@huawei.com"
] |
hwcloudsdk@huawei.com
|
dc9d40a2ff2b658f1e2e7421e9a2c8976af8fb3b
|
473b76b1043df2f09214f8c335d4359d3a8151e0
|
/benchmark/bigclonebenchdata_partial/17965562.java
|
b8a92bc30a2852dce799857eb4645dcacbf2ea97
|
[] |
no_license
|
whatafree/JCoffee
|
08dc47f79f8369af32e755de01c52d9a8479d44c
|
fa7194635a5bd48259d325e5b0a190780a53c55f
|
refs/heads/master
| 2022-11-16T01:58:04.254688
| 2020-07-13T20:11:17
| 2020-07-13T20:11:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,595
|
java
|
class c17965562 {
public void write(File file) throws Exception {
if (isInMemory()) {
FileOutputStream fout = null;
try {
fout = new FileOutputStream(file);
fout.write(get());
} finally {
if (fout != null) {
fout.close();
}
}
} else {
File outputFile = getStoreLocation();
if (outputFile != null) {
size = outputFile.length();
if (!outputFile.renameTo(file)) {
BufferedInputStream in = null;
BufferedOutputStream out = null;
try {
in = new BufferedInputStream(new FileInputStream(outputFile));
out = new BufferedOutputStream(new FileOutputStream(file));
IOUtils.copy(in, out);
} finally {
if (in != null) {
try {
in.close();
} catch (IOException e) {
}
}
if (out != null) {
try {
out.close();
} catch (IOException e) {
}
}
}
}
} else {
throw new FileUploadException("Cannot write uploaded file to disk!");
}
}
}
}
|
[
"piyush16066@iiitd.ac.in"
] |
piyush16066@iiitd.ac.in
|
fa7ba3670bcfa48f4da895c8061ca035adb13546
|
20eb62855cb3962c2d36fda4377dfd47d82eb777
|
/IntroClassJava/dataset/median/9c9308d4cdf5bc5dfe6efc2b1a9c9bc9a44fbff73c5367c97e3be37861bbb3ba9ac7ad3ddec74dc66e34fe8f0804e46186819b4e90e8f9a59d1b82d9cf0a6218/012/mutations/87/median_9c9308d4_012.java
|
b9420279f4e1972cb10acc41876e2734f803ed85
|
[] |
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,187
|
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 median_9c9308d4_012 {
public java.util.Scanner scanner;
public String output = "";
public static void main (String[]args) throws Exception {
median_9c9308d4_012 mainClass = new median_9c9308d4_012 ();
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 n1 = new DoubleObj (), n2 = new DoubleObj (), n3 =
new DoubleObj (), median = new DoubleObj ();
output +=
(String.format ("Please enter 3 numbers separated by spaces > "));
n1.value = scanner.nextDouble ();
n2.value = scanner.nextDouble ();
n3.value = scanner.nextDouble ();
if (n1.value >= n2.value || n1.value >= n3.value) {
if (n2.value >= n3.value && n1.value >= n2.value) {
median.value = n2.value;
} else if (n2.value >= n1.value) {
median.value = n1.value;
} else {
median.value = n3.value;
}
} else if (n2.value >= n3.value) {
median.value = n3.value;
} else {
median.value = n2.value;
}
if (true) return ;
output += (String.format ("%.0f is the median\n", median.value));
if (true)
return;;
}
}
|
[
"justinwm@163.com"
] |
justinwm@163.com
|
affdbddbe9ebf9c092400991bd04a1966ad1300a
|
c0b37a664fde6a57ae61c4af635e6dea28d7905e
|
/Helpful dev stuff/AeriesMobilePortal_v1.2.0_apkpure.com_source_from_JADX/com/google/android/gms/internal/auth/zzbh.java
|
86ffa3b991068c340a54f05b3f915f7f2e933941
|
[] |
no_license
|
joshkmartinez/Grades
|
a21ce8ede1371b9a7af11c4011e965f603c43291
|
53760e47f808780d06c4fbc2f74028a2db8e2942
|
refs/heads/master
| 2023-01-30T13:23:07.129566
| 2020-12-07T18:20:46
| 2020-12-07T18:20:46
| 131,549,535
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,346
|
java
|
package com.google.android.gms.internal.auth;
import android.content.Context;
import android.os.Bundle;
import android.os.IBinder;
import android.os.IInterface;
import android.os.Looper;
import android.text.TextUtils;
import com.google.android.gms.auth.api.zzf;
import com.google.android.gms.auth.api.zzh;
import com.google.android.gms.common.GooglePlayServicesUtilLight;
import com.google.android.gms.common.api.GoogleApiClient.ConnectionCallbacks;
import com.google.android.gms.common.api.GoogleApiClient.OnConnectionFailedListener;
import com.google.android.gms.common.internal.ClientSettings;
import com.google.android.gms.common.internal.GmsClient;
public final class zzbh extends GmsClient<zzbk> {
private final Bundle zzcf;
public zzbh(Context context, Looper looper, ClientSettings clientSettings, zzh com_google_android_gms_auth_api_zzh, ConnectionCallbacks connectionCallbacks, OnConnectionFailedListener onConnectionFailedListener) {
super(context, looper, 16, clientSettings, connectionCallbacks, onConnectionFailedListener);
if (com_google_android_gms_auth_api_zzh == null) {
this.zzcf = new Bundle();
return;
}
throw new NoSuchMethodError();
}
protected final /* synthetic */ IInterface createServiceInterface(IBinder iBinder) {
if (iBinder == null) {
return null;
}
IInterface queryLocalInterface = iBinder.queryLocalInterface("com.google.android.gms.auth.api.internal.IAuthService");
return queryLocalInterface instanceof zzbk ? (zzbk) queryLocalInterface : new zzbl(iBinder);
}
protected final Bundle getGetServiceRequestExtraArgs() {
return this.zzcf;
}
public final int getMinApkVersion() {
return GooglePlayServicesUtilLight.GOOGLE_PLAY_SERVICES_VERSION_CODE;
}
protected final String getServiceDescriptor() {
return "com.google.android.gms.auth.api.internal.IAuthService";
}
protected final String getStartServiceAction() {
return "com.google.android.gms.auth.service.START";
}
public final boolean requiresSignIn() {
ClientSettings clientSettings = getClientSettings();
return (TextUtils.isEmpty(clientSettings.getAccountName()) || clientSettings.getApplicableScopes(zzf.API).isEmpty()) ? false : true;
}
}
|
[
"joshkmartinez@gmail.com"
] |
joshkmartinez@gmail.com
|
d91f26f4d9fca679f930967e4c37c1372fc1318c
|
79c5a793547b760c16a5f546151a946e394c5450
|
/src/test/java/pl/java/scalatech/stat/StatisticsTest.java
|
b5bd0e29c35d592819ff06ae9ab3911ce1f2c64b
|
[
"MIT"
] |
permissive
|
przodownikR1/hibernateKata
|
567b6eb087461d12494b674d0030216ec4f258ce
|
cf1f8b7dd1583360a1f1c8f34432bcde3ff55fdb
|
refs/heads/master
| 2016-09-13T14:30:38.903651
| 2016-05-13T19:55:57
| 2016-05-13T19:55:57
| 56,308,522
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,620
|
java
|
package pl.java.scalatech.stat;
import java.math.BigDecimal;
import org.hibernate.Query;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.hibernate.Transaction;
import org.hibernate.stat.SessionStatistics;
import org.hibernate.stat.Statistics;
import org.junit.Test;
import lombok.extern.slf4j.Slf4j;
import pl.java.scalatech.domain.Item;
import pl.java.scalatech.hibernate.service.HibernateServiceUtils;
@Slf4j
public class StatisticsTest {
private final SessionFactory sf = HibernateServiceUtils.getSessionFactory();
@Test
public void shouldGetStatistics() {
log.info("+++ show statistics");
Session session = sf.openSession();
SessionStatistics sessionStats = session.getStatistics();
Statistics stats = sf.getStatistics();
try {
Transaction tx = session.beginTransaction();
for(int i =0 ;i<10;i++){
Item item = new Item();
item.setName("fork_"+i);
item.setPrice(BigDecimal.valueOf(100+i));
session.save(item);
}
Query query = session.createQuery("FROM Item");
query.list().forEach(i -> log.info("{}", i));
tx.commit();
} catch (Exception e) {
log.error("{}", e);
} finally {
log.info("getEntityCount- {}", sessionStats.getEntityCount());
log.info("openCount- {}", stats.getSessionOpenCount());
log.info("getEntityInsertCount- {}", stats.getEntityInsertCount());
stats.logSummary();
session.close();
}
}
}
|
[
"przodownik@tlen.pl"
] |
przodownik@tlen.pl
|
e62db152d5563652b1438ea12edc1d552d11f7c6
|
a9a40b4a5c2400e64468278a5ba5468e39829bda
|
/java/test/java_algorithms_implementation/com/algorithms/data_structures/test/SuffixArrayTest.java
|
88c82185908637878b2c3d43118679926de98dd6
|
[] |
no_license
|
vuquangtin/algorithm
|
9a7607817b3aff7fb085f35a2fc4bce1d40ccda9
|
0c33212a66bdeb6513939302d85e7cda9ae445be
|
refs/heads/master
| 2022-12-20T23:43:35.508246
| 2020-09-28T07:19:22
| 2020-09-28T07:19:22
| 290,949,654
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,354
|
java
|
package com.algorithms.data_structures.test;
import com.algorithms.data_structures.SuffixArray;
import com.algorithms.data_structures.SuffixTree;
import org.junit.Test;
import java.util.ArrayList;
import java.util.Set;
import static org.junit.Assert.*;
public class SuffixArrayTest {
@Test
public void testSuffixArray(){
String string = "aasfaasdsadasdfasdasdasdasfdasfassdfas";
SuffixArray suffixArrayBuilder = new SuffixArray(string);
SuffixTree<String> suffixTree = new SuffixTree<String>(string);
Set<String> suffixSet = suffixTree.getSuffixes();
ArrayList<Integer> suffixArray = suffixArrayBuilder.getSuffixArray();
int i=0;
for(String suffix : suffixSet){
String substring = string.substring(suffixArray.get(i++));
assertTrue(suffix.equals(substring));
}
}
@Test
public void testKMRarray(){
String string = "aasfaasdsadasdfasdasdasdasfdasfassdfas";
SuffixArray suffixArrayBuilder = new SuffixArray(string);
ArrayList<Integer> suffixArray = suffixArrayBuilder.getSuffixArray();
ArrayList<Integer> KMRarray = suffixArrayBuilder.getKMRarray();
int length = string.length();
for(int i=0; i<length; i++){
assertTrue(suffixArray.get(KMRarray.get(i)) == i);
}
}
}
|
[
"tinvuquang@admicro.vn"
] |
tinvuquang@admicro.vn
|
c250883a79d239f2616e3975f19a827b6cf4fbd1
|
0fca6240a045687a771bb0e743555f1b74f69e1c
|
/WebSeivices/3.RESTful/lesson_41/FlightsRSClient_lesson41_h/src/ru/javabegin/training/flight/object/ExtPlace.java
|
6c6e9d2bce3cfa081b06d35da05a41955dc6ec62
|
[] |
no_license
|
Abergaz/JavaBeginWork-WEB
|
88fabec28f4b3275b21e1113a34cbc18c67ec5ef
|
b721f2d49ddf260acf4e43a22025959270d023ae
|
refs/heads/master
| 2022-12-08T10:49:54.358706
| 2020-03-12T13:16:57
| 2020-03-12T13:16:57
| 227,131,968
| 0
| 0
| null | 2022-11-24T07:19:43
| 2019-12-10T13:48:08
|
TSQL
|
UTF-8
|
Java
| false
| false
| 258
|
java
|
package ru.javabegin.training.flight.object;
import ru.javabegin.training.flight.rs.objects.Place;
public class ExtPlace extends Place{
@Override
public String toString() {
return seatLetter+String.valueOf(seatNumber);
}
}
|
[
"zagreba@gmail.com"
] |
zagreba@gmail.com
|
42fd39967cf36b607cc81602f0de569f4d0503a4
|
afab72f0209764c956d609873b7f2b517d67ad5f
|
/BankServicesEJB/.apt_generated/zw/co/esolutions/ewallet/bankservices/service/jaxws/GetClosingBalance.java
|
3d4850b9535ac6ed38617404e659c8868f600859
|
[] |
no_license
|
wasadmin/ewallet
|
899e66d4d03e77a8f85974d9d2cba8940cf2018a
|
e132a5e569f4bb67a83df0c3012bb341ffaaf2ed
|
refs/heads/master
| 2021-01-23T13:48:34.618617
| 2012-11-15T10:47:55
| 2012-11-15T10:47:55
| 6,703,145
| 3
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,583
|
java
|
//
// Generated By:JAX-WS RI IBM 2.1.1 in JDK 6 (JAXB RI IBM JAXB 2.1.3 in JDK 1.6)
//
package zw.co.esolutions.ewallet.bankservices.service.jaxws;
import java.util.Date;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
@XmlRootElement(name = "getClosingBalance", namespace = "http://service.bankservices.ewallet.esolutions.co.zw/")
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "getClosingBalance", namespace = "http://service.bankservices.ewallet.esolutions.co.zw/", propOrder = {
"accountId",
"closingDate"
})
public class GetClosingBalance {
@XmlElement(name = "accountId", namespace = "")
private String accountId;
@XmlElement(name = "closingDate", namespace = "")
private Date closingDate;
/**
*
* @return
* returns String
*/
public String getAccountId() {
return this.accountId;
}
/**
*
* @param accountId
* the value for the accountId property
*/
public void setAccountId(String accountId) {
this.accountId = accountId;
}
/**
*
* @return
* returns Date
*/
public Date getClosingDate() {
return this.closingDate;
}
/**
*
* @param closingDate
* the value for the closingDate property
*/
public void setClosingDate(Date closingDate) {
this.closingDate = closingDate;
}
}
|
[
"stanfordbangaba@gmail.com"
] |
stanfordbangaba@gmail.com
|
c2c706b5c23f84c0924de8f63211dcf9846f3fbb
|
09649412e12bdc15cf61607e881203735cfafa50
|
/proxies/com/microsoft/bingads/campaignmanagement/NMTOKENS.java
|
fc1a649d21ad79686210c368e901429ef5628238
|
[
"MIT"
] |
permissive
|
yosefarr/BingAds-Java-SDK
|
cec603b74a921e71c6173ce112caccdf7c1fdbc8
|
d1c333d0ba5b7e434c85a92c7a80dad0add0d634
|
refs/heads/master
| 2021-01-18T15:02:53.945816
| 2016-03-06T13:18:32
| 2016-03-06T13:18:32
| 51,738,651
| 0
| 1
| null | 2016-02-15T07:38:14
| 2016-02-15T07:38:13
| null |
UTF-8
|
Java
| false
| false
| 1,817
|
java
|
package com.microsoft.bingads.campaignmanagement;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.XmlValue;
/**
* <p>Java class for NMTOKENS simple type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <simpleType name="NMTOKENS">
* <restriction>
* <simpleType>
* <list itemType="{http://www.w3.org/2001/XMLSchema}NMTOKEN" />
* </simpleType>
* <minLength value="1"/>
* </restriction>
* </simpleType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "NMTOKENS", namespace = "http://www.w3.org/2001/XMLSchema", propOrder = {
"values"
})
public class NMTOKENS {
@XmlValue
@XmlSchemaType(name = "NMTOKENS")
protected List<NMTOKEN> values;
/**
* Gets the value of the values property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the values property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getValues().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link NMTOKEN }
*
*
*/
public List<NMTOKEN> getValues() {
if (values == null) {
values = new ArrayList<NMTOKEN>();
}
return this.values;
}
}
|
[
"bing_ads_sdk@microsoft.com"
] |
bing_ads_sdk@microsoft.com
|
5bf599efd0ccd7fb01759050e29511941c7a89bc
|
1930d97ebfc352f45b8c25ef715af406783aabe2
|
/src/main/java/com/alipay/api/response/KoubeiMarketingToolPointsUpdateResponse.java
|
43ab8de958cafafa6be13bfbe30ebaa9f28df6e8
|
[
"Apache-2.0"
] |
permissive
|
WQmmm/alipay-sdk-java-all
|
57974d199ee83518523e8d354dcdec0a9ce40a0c
|
66af9219e5ca802cff963ab86b99aadc59cc09dd
|
refs/heads/master
| 2023-06-28T03:54:17.577332
| 2021-08-02T10:05:10
| 2021-08-02T10:05:10
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 674
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.marketing.tool.points.update response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiMarketingToolPointsUpdateResponse extends AlipayResponse {
private static final long serialVersionUID = 4777951786449228542L;
/**
* ้็นๅๆดๆตๆฐดๅท
*/
@ApiField("point_log_no")
private String pointLogNo;
public void setPointLogNo(String pointLogNo) {
this.pointLogNo = pointLogNo;
}
public String getPointLogNo( ) {
return this.pointLogNo;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b7c4b9fe6be7f03b18d99daa309caeb487740d02
|
dbb5639ee0a6b9d467edef5c3dc8150523aa483f
|
/2008/Vtb24Group/ejbSource/com/vtb/ejb/SecurityActionProcessorFacadeLocalHome.java
|
fe69af1d48b360821fc4d4f80cfcbd5bca03236d
|
[] |
no_license
|
ildar66/RAD7_VTB
|
806eac9ac3b1c54e4b4444537f6fcf8cee5741b1
|
4674e5bb772ed72a726e734d733ce8d11d3623b1
|
refs/heads/master
| 2020-11-29T21:59:02.463950
| 2017-07-08T08:38:41
| 2017-07-08T08:38:41
| 96,605,429
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 388
|
java
|
package com.vtb.ejb;
/**
* Local Home interface for Enterprise Bean: SecurityActionProcessorFacade
*/
public interface SecurityActionProcessorFacadeLocalHome
extends
javax.ejb.EJBLocalHome {
/**
* Creates a default instance of Session Bean: SecurityActionProcessorFacade
*/
public com.vtb.ejb.SecurityActionProcessorFacadeLocal create()
throws javax.ejb.CreateException;
}
|
[
"ildar66@inbox.ru"
] |
ildar66@inbox.ru
|
57afa151a3c3c4203707cffe892ce2fba64d4538
|
cc2408250934f1a0bbb8edd9ac416ddaf1d7cda3
|
/src/main/java/w1/User.java
|
691ada9886d1d16686f19e12137a7e1373b1c549
|
[] |
no_license
|
MikiKru/p2_nst
|
dd8f075f59237cd29c4be6a900f36b123d694933
|
2b129c657e69c7d9dd2725e83338d557589113a9
|
refs/heads/master
| 2023-05-31T08:01:42.576360
| 2021-06-12T07:24:35
| 2021-06-12T07:24:35
| 345,043,120
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 994
|
java
|
package w1;
// ALT + Ins - generate -> konstruktor, getters and setters, toString
public class User {
private String email;
private String password;
public User(String email, String password) { // konstruktor
this.email = email; // -> nazwa jak nazwa klasy
this.password = password; // -> nie zwaca wartoลci i nie jest typu void
} // -> inicjalizuje obiekt
public String getEmail() { return email; }
public void setEmail(String email) { this.email = email; }
public String getPassword() { return password; }
public void setPassword(String password) { this.password = password; }
@Override
public String toString() { // -> napisowa reprezentacja obiektu
return "w1.User{" +
"email='" + email + '\'' +
", password='" + password + '\'' +
'}';
}
}
|
[
"michal_kruczkowski@o2.pl"
] |
michal_kruczkowski@o2.pl
|
98d53cac53a26db043f78d2f60aa407877c4415d
|
c56fedd7e617014d917a5d3d18f2d3125113fee7
|
/management/testing/sample-entity/src/main/java/org/terracotta/management/entity/sample/client/management/CacheStatisticCollectorManagementProvider.java
|
7d19d5ed4182a8a2570a189a05b4072c94a91279
|
[
"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
| 1,118
|
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.management.entity.sample.client.management;
import org.terracotta.management.model.context.Context;
import org.terracotta.management.registry.Named;
import org.terracotta.management.registry.RequiredContext;
import org.terracotta.management.registry.collect.StatisticCollectorProvider;
@RequiredContext({@Named("appName")})
class CacheStatisticCollectorManagementProvider extends StatisticCollectorProvider {
CacheStatisticCollectorManagementProvider(Context context) {
super(context);
}
}
|
[
"mathieu.carbou@gmail.com"
] |
mathieu.carbou@gmail.com
|
9ccf37e7abc526ade575094f816c8cd1371f024d
|
5f13c94194459ef7d61b9d416bfc61abdfeb536f
|
/APPLICATION/SpringSecurityWebMvcRestExample/src/main/java/com/adarsh/spring/rest/service/RoleServiceImpl.java
|
19ec9cbcaba573a5932ffbdced38949e04dafc5c
|
[] |
no_license
|
adarshkumarsingh83/spring_security
|
092cd3a7385cf2abfdf8e165ec08995de30cd835
|
8d655c1e0ae80ad3d1b1fe6a400da92af8032c08
|
refs/heads/master
| 2023-02-03T06:17:55.941921
| 2023-01-24T05:33:26
| 2023-01-24T05:33:26
| 46,787,876
| 2
| 3
| null | 2023-01-23T21:06:45
| 2015-11-24T11:37:09
|
Java
|
UTF-8
|
Java
| false
| false
| 2,298
|
java
|
/*
* Copyright (c) 2015 Espark And ยฉAdarsh Development Services @copyright All rights reserved.
*
* 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 of Espark 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 com.adarsh.spring.rest.service;
import com.adarsh.spring.rest.entity.Role;
import com.adarsh.spring.rest.resporitory.RoleDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* @author Adarsh Kumar
* @author $LastChangedBy: Adarsh Kumar$
* @version $Revision: 0001 $, $Date:: 1/1/10 0:00 AM#$
* @Espark @copyright all right reserve
*/
@Service
@Transactional
public class RoleServiceImpl implements RoleService {
@Autowired
private RoleDAO roleDAO;
public Role getRole(int id) {
return roleDAO.getRole(id);
}
}
|
[
"adarshkumarsingh83@gmail.com"
] |
adarshkumarsingh83@gmail.com
|
68b9fc3bb2395b7ed0cfe1e14cc8e33e9ad86fdc
|
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
|
/examples/commons-math3/mutations/mutants-GeometricDistribution/63/org/apache/commons/math3/distribution/GeometricDistribution.java
|
6e52ae5787484e82f2ce844dee2be97764ca7c52
|
[
"BSD-3-Clause",
"Minpack",
"Apache-2.0"
] |
permissive
|
SmartTests/smartTest
|
b1de326998857e715dcd5075ee322482e4b34fb6
|
b30e8ec7d571e83e9f38cd003476a6842c06ef39
|
refs/heads/main
| 2023-01-03T01:27:05.262904
| 2020-10-27T20:24:48
| 2020-10-27T20:24:48
| 305,502,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,527
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math3.distribution;
import org.apache.commons.math3.exception.OutOfRangeException;
import org.apache.commons.math3.exception.util.LocalizedFormats;
import org.apache.commons.math3.util.FastMath;
import org.apache.commons.math3.random.RandomGenerator;
import org.apache.commons.math3.random.Well19937c;
/**
* Implementation of the geometric distribution.
*
* @see <a href="http://en.wikipedia.org/wiki/Geometric_distribution">Geometric distribution (Wikipedia)</a>
* @see <a href="http://mathworld.wolfram.com/GeometricDistribution.html">Geometric Distribution (MathWorld)</a>
* @version $Id$
* @since 3.3
*/
public class GeometricDistribution extends AbstractIntegerDistribution {
/** Serializable version identifier. */
private static final long serialVersionUID = 20130507L;
/** The probability of success. */
private final double probabilityOfSuccess;
/**
* Create a geometric distribution with the given probability of success.
*
* @param p probability of success.
* @throws OutOfRangeException if {@code p <= 0} or {@code p > 1}.
*/
public GeometricDistribution(double p) {
this(new Well19937c(), p);
}
/**
* Creates a geometric distribution.
*
* @param rng Random number generator.
* @param p Probability of success.
* @throws OutOfRangeException if {@code p <= 0} or {@code p > 1}.
*/
public GeometricDistribution(RandomGenerator rng, double p) {
super(rng);
if (p <= 0 || p > 1) {
throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT, p, 0, 1);
}
probabilityOfSuccess = p;
}
/**
* Access the probability of success for this distribution.
*
* @return the probability of success.
*/
public double getProbabilityOfSuccess() {
return probabilityOfSuccess;
}
/** {@inheritDoc} */
public double probability(int x) {
double ret;
if (x < 0) {
ret = 0.0;
} else {
final double p = probabilityOfSuccess;
ret = FastMath.pow(1 - p, x) * p;
}
return ret;
}
/** {@inheritDoc} */
public double cumulativeProbability(int x) {
double ret;
if (x < 0) {
ret = 0.0;
} else {
final double p = probabilityOfSuccess;
ret = 1.0 * FastMath.pow(1 - p, x + 1);
}
return ret;
}
/**
* {@inheritDoc}
*
* For probability parameter {@code p}, the mean is {@code (1 - p) / p}.
*/
public double getNumericalMean() {
final double p = probabilityOfSuccess;
return (1 - p) / p;
}
/**
* {@inheritDoc}
*
* For probability parameter {@code p}, the variance is
* {@code (1 - p) / (p * p)}.
*/
public double getNumericalVariance() {
final double p = probabilityOfSuccess;
return (1 - p) / (p * p);
}
/**
* {@inheritDoc}
*
* The lower bound of the support is always 0.
*
* @return lower bound of the support (always 0)
*/
public int getSupportLowerBound() {
return 0;
}
/**
* {@inheritDoc}
*
* The upper bound of the support is infinite (which we approximate as
* {@code Integer.MAX_VALUE}).
*
* @return upper bound of the support (always Integer.MAX_VALUE)
*/
public int getSupportUpperBound() {
return Integer.MAX_VALUE;
}
/**
* {@inheritDoc}
*
* The support of this distribution is connected.
*
* @return {@code true}
*/
public boolean isSupportConnected() {
return true;
}
}
|
[
"kesina@Kesinas-MBP.lan"
] |
kesina@Kesinas-MBP.lan
|
ac3f6b088cb2837c346b8382c02eb4e7e6868bc5
|
2529417899be822a1ae13d6d33055353c4bf04d3
|
/spring-cloud/hawk-job/src/main/java/cn/cincout/distribute/hawk/job/HawkJobApplication.java
|
d14ec16e02fd6c4af8def2ef82c5b6c3fb3a8406
|
[] |
no_license
|
zhangzhaoyu/spring-cloud-parent
|
9d51e87aabb63861bf660ecc826d5abfcc9592d9
|
8f6c850d940f8b6c120112506172f191f46ece05
|
refs/heads/master
| 2020-03-23T04:40:01.649369
| 2019-02-13T03:13:30
| 2019-02-13T03:13:30
| 141,097,828
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 324
|
java
|
package cn.cincout.distribute.hawk.job;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
@SpringBootApplication
public class HawkJobApplication {
public static void main(String[] args) {
SpringApplication.run(HawkJobApplication.class, args);
}
}
|
[
"zhangzhaoyu0524@163.com"
] |
zhangzhaoyu0524@163.com
|
34f1a7e77271dd3f45f2d948f5a392cdc782fd0d
|
9219ab5adeebd481dca2621a2afda3ace0b0bb8d
|
/src/org/cz/validate/RegistrationValidator.java
|
7eb6c95c5f3fbcf07f762d76a8e748b2bb6947c4
|
[] |
no_license
|
mariuso28/UrbanParadigm-candice
|
bc7f521b61d8d520ad7621fb34b9a284ad54a459
|
a36af37d1cf3eb3960631c6640343364950273cb
|
refs/heads/master
| 2021-01-22T23:00:54.449509
| 2018-01-03T06:49:48
| 2018-01-03T06:49:48
| 92,792,663
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,251
|
java
|
package org.cz.validate;
public class RegistrationValidator
{
public static String validateFields(String email, String password, String contact, String phone)
{
String msg = "";
msg += checkEmail(email);
msg += checkField("Contact",contact);
msg += checkPhone(phone);
msg += checkPassword(password);
if (!msg.isEmpty())
return msg.substring(0,msg.length()-1);
return msg;
}
private static String checkEmail(String email)
{
String msg = checkField("Email",email);
if (msg.isEmpty())
{
EmailValidator ev = new EmailValidator();
if (!ev.validate(email))
msg += "Email,";
}
return msg;
}
private static String checkPhone(String phone)
{
String msg = checkField("Phone",phone);
if (msg.isEmpty())
{
PhoneValidator pv = new PhoneValidator();
if (!pv.validate(phone))
msg += "Phone,";
}
return msg;
}
private static String checkPassword(String password)
{
String msg = checkField("Password",password);
if (msg.isEmpty())
{
if (password.length()<8)
return "Password should be 8 chars or more - please fix";
}
return "";
}
private static String checkField(String field,String value)
{
if (value==null || value.isEmpty())
return field + ",";
return "";
}
}
|
[
"mariuso.pk@gmail.com"
] |
mariuso.pk@gmail.com
|
39f8004814157890590c4b5944e03daef2fa5716
|
0e2a1a0a4f176f08093d996fe62347c739ce9598
|
/trunk/mis/src/main/java/com/px/mis/account/dao/OutIntoWhsAdjSnglSubTabDao.java
|
7b638b81a78b97119ad540e40dd186b538fce87a
|
[] |
no_license
|
LIHUIJAVA/JOB
|
21dc3979b57d2923da9a0f6f33a9f0919b617b4d
|
3142faf6045696e8c932d1a2139bdd17a40378e7
|
refs/heads/master
| 2022-12-21T01:56:05.451002
| 2020-03-01T12:04:32
| 2020-03-01T12:04:32
| 244,107,727
| 0
| 1
| null | 2022-12-16T07:52:27
| 2020-03-01T07:42:17
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 557
|
java
|
package com.px.mis.account.dao;
import com.px.mis.account.entity.OutIntoWhsAdjSnglSubTab;
public interface OutIntoWhsAdjSnglSubTabDao {
int insertOutIntoWhsAdjSnglSubTab(OutIntoWhsAdjSnglSubTab outIntoWhsAdjSnglSubTabDoc);
/*int updateOutIntoWhsAdjSnglSubTabByOrdrNum(OutIntoWhsAdjSnglSubTab outIntoWhsAdjSnglSubTabDoc);*/
int deleteOutIntoWhsAdjSnglSubTabByFormNum(String formNum);
/*OutIntoWhsAdjSnglSubTab selectOutIntoWhsAdjSnglSubTabByOrdrNum(Integer ordrNum);
List<OutIntoWhsAdjSnglSubTab> selectOutIntoWhsAdjSnglSubTabList();*/
}
|
[
"lh"
] |
lh
|
dc453d16d9ae464942d4af9c5fb40dd96c9a5a29
|
4df05e67afcf097894f234807f71183edc2b2dfd
|
/src/test/java/fr/brouillard/oss/jgitver/cfg/Issue51Test.java
|
ef40d36b3b671cf64a8359576983bf11137b6e75
|
[
"Apache-2.0"
] |
permissive
|
jgitver/jgitver-maven-plugin
|
b679ac2caed0d71c402e054aa4cc5247eb812eb1
|
c14645a1900b47ac92c516319a987e6173e93006
|
refs/heads/master
| 2022-11-11T18:26:44.470436
| 2022-01-07T10:04:35
| 2022-02-09T07:37:13
| 57,225,462
| 160
| 56
|
NOASSERTION
| 2022-10-28T12:40:19
| 2016-04-27T15:42:22
|
Groovy
|
UTF-8
|
Java
| false
| false
| 1,819
|
java
|
/*
* Copyright (C) 2016 Matthieu Brouillard [http://oss.brouillard.fr/jgitver-maven-plugin] (matthieu@brouillard.fr)
*
* 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 fr.brouillard.oss.jgitver.cfg;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
import java.io.IOException;
import java.util.List;
import org.apache.maven.MavenExecutionException;
import org.junit.Test;
public class Issue51Test {
@Test
public void can_load_correctly_provided_configuration()
throws IOException, MavenExecutionException {
InMemoryLogger inMemoryLogger = new InMemoryLogger();
try (ResourceConfigurationProvider fromResource =
ResourceConfigurationProvider.fromResource("/config/issue-51-cfg.xml")) {
Configuration cfg =
ConfigurationLoader.loadFromRoot(
fromResource.getConfigurationDirectory(), inMemoryLogger);
assertThat(cfg, notNullValue());
List<BranchPolicy> branchPolicies = cfg.branchPolicies;
assertThat(branchPolicies.size(), is(1));
List<String> transformations = branchPolicies.get(0).transformations;
assertThat(transformations.size(), is(1));
assertThat(transformations.get(0), is("IDENTITY"));
}
}
}
|
[
"matthieu@brouillard.fr"
] |
matthieu@brouillard.fr
|
f5d600932ae4ca7829df020451abbf2b5f51da28
|
ad7f07a0cf708a736a382835ebe9eafe9addd812
|
/p2p-core/core-service/src/main/java/com/solution/p2p/core/user/service/ResourceServiceImpl.java
|
792ccb0f4aa6c079f881e21b50037d5747d7442c
|
[] |
no_license
|
zhaom/p2p-solution
|
dc6cbb393f4481b83cccf2f74ac04009627d2014
|
462222111250a2aa6f035f3f57c8f47f31b13155
|
refs/heads/master
| 2021-01-23T02:53:56.238672
| 2015-02-26T10:50:30
| 2015-02-26T10:50:30
| 30,795,861
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,196
|
java
|
package com.solution.p2p.core.user.service;
import com.solution.p2p.core.common.entity.SysResource;
import com.solution.p2p.core.common.service.BasicServiceImpl;
import com.solution.p2p.core.common.service.ResourceService;
import com.solution.p2p.core.common.utils.ServiceResult;
import com.solution.p2p.core.user.dao.SysResourceMapper;
import java.util.List;
import java.util.Set;
public class ResourceServiceImpl extends BasicServiceImpl implements ResourceService {
private SysResourceMapper sysResourceMapper;
public void setSysResourceMapper(SysResourceMapper sysResourceMapper) {
this.sysResourceMapper = sysResourceMapper;
}
@Override
public ServiceResult<SysResource> createResource(SysResource sysResource, String appKey, String sign) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public ServiceResult<SysResource> updateResource(SysResource sysResource, String appKey, String sign) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public ServiceResult<Object> deleteResource(Long aLong, String appKey, String sign) {
//To change body of implemented methods use File | Settings | File Templates.
return null;
}
@Override
public ServiceResult<SysResource> findOne(Long aLong, String appKey, String sign) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public ServiceResult<List<SysResource>> findAll(String appKey, String sign) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public ServiceResult<Set<String>> findPermissions(Set<Long> longs, String appKey, String sign) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
@Override
public ServiceResult<List<SysResource>> findMenus(Set<String> strings, String appKey, String sign) {
return null; //To change body of implemented methods use File | Settings | File Templates.
}
}
|
[
"zhaominhe@gmail.com"
] |
zhaominhe@gmail.com
|
e83a9225c50ba267e3a1504acece85b7f67f1fee
|
9371ae6ec24ad4b9914a43e64befb915d71e34f2
|
/out/target/common/obj/JAVA_LIBRARIES/android_stubs_current_intermediates/src/org/apache/http/impl/io/SocketOutputBuffer.java
|
688280aa7d2a0aa092138113a9aedce37f6ad32c
|
[] |
no_license
|
kanaida/LG-Esteem-Homeless-Kernel
|
9fac4c52993798eaf3021d9abb72a5e697464398
|
a5780f82bef7631fdb43b079e6f9ea6dbd187ac7
|
refs/heads/master
| 2020-06-09T06:14:50.214296
| 2012-02-24T04:23:01
| 2012-02-24T04:23:01
| 3,532,548
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package org.apache.http.impl.io;
public class SocketOutputBuffer
extends org.apache.http.impl.io.AbstractSessionOutputBuffer
{
public SocketOutputBuffer(java.net.Socket socket, int buffersize, org.apache.http.params.HttpParams params) throws java.io.IOException { throw new RuntimeException("Stub!"); }
}
|
[
"kanaida.bat@gmail.com"
] |
kanaida.bat@gmail.com
|
87c6bb66dc933e8c53e170b49a61e9cce34048cc
|
3aae41809d3b00b4e5aec0d00668677966388bb8
|
/archer-custom-mybatis/src/test/java/com/luo/ibatis/io/ResourcesTest.java
|
960b72f48a28f2a33e60cf4b6da27f3e8eda054f
|
[] |
no_license
|
RononoaZoro/mybatis-book
|
1e7a91d047ae3242d01af9e5ae2e76e2fcdf1a9d
|
dd701aa8dcbb83d410d6ee7e9d27375a36de1b2c
|
refs/heads/master
| 2023-05-25T09:34:13.633092
| 2021-06-11T06:11:05
| 2021-06-11T06:11:05
| 359,652,581
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,661
|
java
|
/**
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.luo.ibatis.io;
import com.luo.ibatis.BaseDataTest;
import org.junit.Test;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import java.net.URL;
import java.nio.charset.Charset;
import java.util.Properties;
import static org.junit.Assert.*;
public class ResourcesTest extends BaseDataTest {
private static final ClassLoader CLASS_LOADER = ResourcesTest.class.getClassLoader();
@Test
public void shouldGetUrlForResource() throws Exception {
URL url = ArcherResources.getResourceURL(JPETSTORE_PROPERTIES);
assertTrue(url.toString().endsWith("jpetstore/jpetstore-hsqldb.properties"));
}
@Test
public void shouldGetUrlAsProperties() throws Exception {
URL url = ArcherResources.getResourceURL(CLASS_LOADER, JPETSTORE_PROPERTIES);
Properties props = ArcherResources.getUrlAsProperties(url.toString());
assertNotNull(props.getProperty("driver"));
}
@Test
public void shouldGetResourceAsProperties() throws Exception {
Properties props = ArcherResources.getResourceAsProperties(CLASS_LOADER, JPETSTORE_PROPERTIES);
assertNotNull(props.getProperty("driver"));
}
@Test
public void shouldGetUrlAsStream() throws Exception {
URL url = ArcherResources.getResourceURL(CLASS_LOADER, JPETSTORE_PROPERTIES);
try (InputStream in = ArcherResources.getUrlAsStream(url.toString())) {
assertNotNull(in);
}
}
@Test
public void shouldGetUrlAsReader() throws Exception {
URL url = ArcherResources.getResourceURL(CLASS_LOADER, JPETSTORE_PROPERTIES);
try (Reader in = ArcherResources.getUrlAsReader(url.toString())) {
assertNotNull(in);
}
}
@Test
public void shouldGetResourceAsStream() throws Exception {
try (InputStream in = ArcherResources.getResourceAsStream(CLASS_LOADER, JPETSTORE_PROPERTIES)) {
assertNotNull(in);
}
}
@Test
public void shouldGetResourceAsReader() throws Exception {
try(Reader in = ArcherResources.getResourceAsReader(CLASS_LOADER, JPETSTORE_PROPERTIES)) {
assertNotNull(in);
}
}
@Test
public void shouldGetResourceAsFile() throws Exception {
File file = ArcherResources.getResourceAsFile(JPETSTORE_PROPERTIES);
assertTrue(file.getAbsolutePath().replace('\\', '/').endsWith("jpetstore/jpetstore-hsqldb.properties"));
}
@Test
public void shouldGetResourceAsFileWithClassloader() throws Exception {
File file = ArcherResources.getResourceAsFile(CLASS_LOADER, JPETSTORE_PROPERTIES);
assertTrue(file.getAbsolutePath().replace('\\', '/').endsWith("jpetstore/jpetstore-hsqldb.properties"));
}
@Test
public void shouldGetResourceAsPropertiesWithOutClassloader() throws Exception {
Properties file = ArcherResources.getResourceAsProperties(JPETSTORE_PROPERTIES);
assertNotNull(file);
}
@Test
public void shouldGetResourceAsPropertiesWithClassloader() throws Exception {
Properties file = ArcherResources.getResourceAsProperties(CLASS_LOADER, JPETSTORE_PROPERTIES);
assertNotNull(file);
}
@Test
public void shouldAllowDefaultClassLoaderToBeSet() {
ArcherResources.setDefaultClassLoader(this.getClass().getClassLoader());
assertEquals(this.getClass().getClassLoader(), ArcherResources.getDefaultClassLoader());
}
@Test
public void shouldAllowDefaultCharsetToBeSet() {
ArcherResources.setCharset(Charset.defaultCharset());
assertEquals(Charset.defaultCharset(), ArcherResources.getCharset());
}
@Test
public void shouldGetClassForName() throws Exception {
Class<?> clazz = ArcherResources.classForName(ResourcesTest.class.getName());
assertNotNull(clazz);
}
@Test(expected = ClassNotFoundException.class)
public void shouldNotFindThisClass() throws ClassNotFoundException {
ArcherResources.classForName("some.random.class.that.does.not.Exist");
}
@Test
public void shouldGetReader() throws IOException {
// save the value
Charset charset = ArcherResources.getCharset();
// charset
ArcherResources.setCharset(Charset.forName("US-ASCII"));
assertNotNull(ArcherResources.getResourceAsReader(JPETSTORE_PROPERTIES));
// no charset
ArcherResources.setCharset(null);
assertNotNull(ArcherResources.getResourceAsReader(JPETSTORE_PROPERTIES));
// clean up
ArcherResources.setCharset(charset);
}
@Test
public void shouldGetReaderWithClassLoader() throws IOException {
// save the value
Charset charset = ArcherResources.getCharset();
// charset
ArcherResources.setCharset(Charset.forName("US-ASCII"));
assertNotNull(ArcherResources.getResourceAsReader(getClass().getClassLoader(), JPETSTORE_PROPERTIES));
// no charset
ArcherResources.setCharset(null);
assertNotNull(ArcherResources.getResourceAsReader(getClass().getClassLoader(), JPETSTORE_PROPERTIES));
// clean up
ArcherResources.setCharset(charset);
}
@Test
public void stupidJustForCoverage() {
assertNotNull(new ArcherResources());
}
}
|
[
"luoxz@akulaku.com"
] |
luoxz@akulaku.com
|
5fb9ddc3abf68f2abe0e1bd3f11d967bc7a4448f
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/7/7_2f420f316b3ea7d80fc8e490c57b88754c1e9810/myWindow/7_2f420f316b3ea7d80fc8e490c57b88754c1e9810_myWindow_s.java
|
d6d9faeca780cbdc7c1e26d62494baf5be192c53
|
[] |
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
| 3,399
|
java
|
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.layout.FillLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import weito.Main;
import debug.Printer;
import debug.TextViewerPrinter;
public class myWindow extends ApplicationWindow {
private Action newRun;
private StyledText styledText;
/**
* Create the application window.
*/
public myWindow() {
super(null);
createActions();
addToolBar(SWT.FLAT | SWT.WRAP);
addMenuBar();
addStatusLine();
}
/**
* Create contents of the application window.
* @param parent
*/
@Override
protected Control createContents(Composite parent) {
Composite container = new Composite(parent, SWT.V_SCROLL);
container.setLayout(new FillLayout(SWT.HORIZONTAL));
{
TextViewer textViewer = new TextViewer(container, SWT.BORDER);
textViewer.setEditable(false);
styledText = textViewer.getTextWidget();
}
return container;
}
/**
* Create the actions.
*/
private void createActions() {
// Create the actions
{
newRun = new Action("Create new Run") {
@Override
public void run() {
Printer.setInstance(new TextViewerPrinter(styledText));
Main.main(null);
super.run();
}
};
}
}
/**
* Create the menu manager.
* @return the menu manager
*/
@Override
protected MenuManager createMenuManager() {
MenuManager menuManager = new MenuManager("menu");
{
MenuManager menuManager_1 = new MenuManager("File");
menuManager.add(menuManager_1);
menuManager_1.add(newRun);
}
return menuManager;
}
/**
* Create the toolbar manager.
* @return the toolbar manager
*/
@Override
protected ToolBarManager createToolBarManager(int style) {
ToolBarManager toolBarManager = new ToolBarManager(style);
toolBarManager.add(newRun);
return toolBarManager;
}
/**
* Create the status line manager.
* @return the status line manager
*/
@Override
protected StatusLineManager createStatusLineManager() {
StatusLineManager statusLineManager = new StatusLineManager();
return statusLineManager;
}
/**
* Launch the application.
* @param args
*/
public static void main(String args[]) {
try {
myWindow window = new myWindow();
window.setBlockOnOpen(true);
window.open();
Display.getCurrent().dispose();
} catch (Exception e) {
e.printStackTrace();
}
}
/**
* Configure the shell.
* @param newShell
*/
@Override
protected void configureShell(Shell newShell) {
super.configureShell(newShell);
newShell.setText("WeitoGUI");
}
/**
* Return the initial size of the window.
*/
@Override
protected Point getInitialSize() {
return new Point(450, 300);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
5a76ace73c1aff9d89dd035366af62096746e2d1
|
b86869723622e60c6389616966632e5c63277af0
|
/app/src/main/java/freestar/friends/activity/DiscussAtlasDetailActivity.java
|
973f9ac9be9f800e8222bc6e81c15a6198d769b5
|
[] |
no_license
|
AngelYHY/Friends
|
04c3ba5042629ef052a86c63c2754b7fc93675d2
|
4475cd6a995cc186d15c64fa309a257157583563
|
refs/heads/master
| 2020-05-28T03:44:46.211847
| 2017-09-15T12:59:49
| 2017-09-15T12:59:49
| 65,609,122
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,151
|
java
|
package freestar.friends.activity;
import android.content.Intent;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.widget.LinearLayoutManager;
import android.util.Log;
import android.view.View;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.listener.OnItemChildClickListener;
import java.util.List;
import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;
import cn.bmob.v3.BmobQuery;
import cn.bmob.v3.datatype.BmobPointer;
import cn.bmob.v3.exception.BmobException;
import cn.bmob.v3.listener.FindListener;
import freestar.friends.R;
import freestar.friends.adapter.DiscussAtlasDetailAdapter;
import freestar.friends.bean.Atlas;
import freestar.friends.bean.AtlasDis;
import freestar.friends.util.status_bar.BaseActivity;
import freestar.friends.widget.XRecyclerView;
/**
* ๅพ้่ฏ่ฎบ
*/
public class DiscussAtlasDetailActivity extends BaseActivity implements View.OnClickListener, SwipeRefreshLayout.OnRefreshListener, BaseQuickAdapter.RequestLoadMoreListener {
private static final int RESC = 9;
@Bind(R.id.recycler_view)
XRecyclerView mRecyclerView;
@Bind(R.id.swipeLayout)
SwipeRefreshLayout mSwipeLayout;
private Atlas atlas;
int i;
private DiscussAtlasDetailAdapter mAdapter;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.search_bar_with_padding1);
ButterKnife.bind(this);
atlas = (Atlas) getIntent().getSerializableExtra("object");
initRV();
mSwipeLayout.setOnRefreshListener(this);
onRefresh();
}
private void initRV() {
mRecyclerView.setLayoutManager(new LinearLayoutManager(this));
mRecyclerView.addOnItemTouchListener(new OnItemChildClickListener() {
@Override
public void onSimpleItemChildClick(BaseQuickAdapter adapter, View view, int i) {
AtlasDis s = (AtlasDis) adapter.getItem(i);
Intent intent;
switch (view.getId()) {
case R.id.line_reply:
intent = new Intent(DiscussAtlasDetailActivity.this, DiscussActivity.class);
intent.putExtra("object", s);
intent.putExtra("user", s.getAuthor());
Log.e("FreeStar", "SearchActivityโโโonClick:" + s.toString());
startActivityForResult(intent, RESC);
break;
case R.id.sdv_head:
intent = new Intent(DiscussAtlasDetailActivity.this, UserDataActivity.class);
intent.putExtra("user", s.getCuser());
Log.e("FreeStar", "SearchActivityโโโonClick:" + s.getCuser());
startActivity(intent);
break;
case R.id.btn_name:
intent = new Intent(DiscussAtlasDetailActivity.this, UserDataActivity.class);
intent.putExtra("user", s.getFather_user());
Log.e("FreeStar", "SearchActivityโโโonClick:" + s.getFather_user());
startActivity(intent);
break;
}
}
});
mAdapter = new DiscussAtlasDetailAdapter();
mAdapter.openLoadAnimation(1);
mAdapter.setAutoLoadMoreSize(4);
mAdapter.setOnLoadMoreListener(this, mRecyclerView);
mRecyclerView.setAdapter(mAdapter);
}
private void initData() {
BmobQuery<AtlasDis> query = new BmobQuery<>();
query.addWhereEqualTo("atlas", new BmobPointer(atlas));
query.include("cuser,comment_father_user,father_user,author");
query.setLimit(10);
query.order("-createdAt");
query.findObjects(new FindListener<AtlasDis>() {
@Override
public void done(List<AtlasDis> list, BmobException e) {
mSwipeLayout.post(new Runnable() {
@Override
public void run() {
mSwipeLayout.setRefreshing(false);
}
});
if (e == null) {
mAdapter.setNewData(list);
if (list.size() < 10) {
mAdapter.loadMoreEnd();
}
} else {
Log.e("FreeStar", "PageFragment1โโโdone:" + e.getMessage());
}
}
});
i++;
}
private void startQuery() {
Log.e("FreeStar", "SearchActivityโโโrun:");
BmobQuery<AtlasDis> query = new BmobQuery<>();
query.addWhereEqualTo("atlas", new BmobPointer(atlas));
query.include("cuser,comment_father_user,father_user");
query.order("-createdAt");
query.setSkip(10 * i); // ๅฟฝ็ฅๅ10ๆกๆฐๆฎ๏ผๅณ็ฌฌไธ้กตๆฐๆฎ็ปๆ๏ผ
query.setLimit(10);
query.findObjects(new FindListener<AtlasDis>() {
@Override
public void done(List<AtlasDis> list, BmobException e) {
if (e == null) {
if (list.size() < 10) {
mAdapter.loadMoreEnd();
} else {
mAdapter.addData(list);
mAdapter.loadMoreComplete();
}
} else {
Log.e("FreeStar", "SearchActivityโโโdone:" + e.getMessage());
}
}
});
i++;
}
@Override
public void onRefresh() {
mSwipeLayout.post(new Runnable() {
@Override
public void run() {
mSwipeLayout.setRefreshing(true);
}
});
initData();
}
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (requestCode == RESC && resultCode == RESULT_OK) {
String back = data.getStringExtra("OK");
if (back.equals("YES")) {
onRefresh();
Intent intent = new Intent();
intent.putExtra("OK", "YES");
setResult(RESULT_OK, intent);
} else if (back.equals("fresh")) {
onRefresh();
}
}
}
@OnClick({R.id.line_com, R.id.tv_search})
public void onClick(View view) {
switch (view.getId()) {
case R.id.line_com:
Intent intent = new Intent(this, DiscussActivity.class);
intent.putExtra("object", atlas);
startActivityForResult(intent, RESC);
break;
case R.id.tv_search:
finish();
break;
}
}
@OnClick(R.id.back_dongtai)
public void onClick() {
finish();
}
@Override
public void onLoadMoreRequested() {
startQuery();
}
}
|
[
"1064389584@qq.com"
] |
1064389584@qq.com
|
a3be4a112729449de2b0ee07e3493fcddcd3c703
|
dbde38010aee32c5d04e58feca47c0d30abe34f5
|
/subprojects/opennaef.application/src/main/java/voss/nms/inventory/model/RsvpLspPathHopPoolModel.java
|
4d12d85d50d2e4f31a7ce9b682dd3327312a0a4d
|
[
"Apache-2.0"
] |
permissive
|
openNaEF/openNaEF
|
c2c8d5645b499aae36d90205dbc91421f4d0bd7b
|
c88f0e17adc8d3f266787846911787f9b8aa3b0d
|
refs/heads/master
| 2020-12-30T15:41:09.806501
| 2017-05-22T22:37:24
| 2017-05-22T22:38:36
| 91,155,672
| 13
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
package voss.nms.inventory.model;
import naef.dto.mpls.RsvpLspHopSeriesDto;
import naef.dto.mpls.RsvpLspHopSeriesIdPoolDto;
import voss.core.server.util.DtoUtil;
import voss.nms.inventory.database.MPLSNMS_ATTR;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
public class RsvpLspPathHopPoolModel implements Serializable {
private static final long serialVersionUID = 1L;
private final RsvpLspHopSeriesIdPoolDto pool;
private final List<String> usedIDs = new ArrayList<String>();
public RsvpLspPathHopPoolModel(RsvpLspHopSeriesIdPoolDto pool) {
this.pool = pool;
}
public void renew() {
this.pool.renew();
this.usedIDs.clear();
for (RsvpLspHopSeriesDto dto : pool.getUsers()) {
usedIDs.add(dto.getAbsoluteName());
}
}
public String getRange() {
return pool.getConcatenatedIdRangesStr();
}
public String getUsed() {
return String.valueOf(getUsedIds());
}
public int getUsedIds() {
return usedIDs.size();
}
public String getPoolName() {
return pool.getName();
}
public String getUsage() {
return DtoUtil.getString(pool, MPLSNMS_ATTR.PURPOSE);
}
public String getStatus() {
return DtoUtil.getString(pool, MPLSNMS_ATTR.ADMIN_STATUS);
}
public String getLastEditor() {
return DtoUtil.getStringOrNull(pool, "_LastEditor");
}
public String getLastEditTime() {
return DtoUtil.getDateTime(pool, "_LastEditTime");
}
public String getVersion() {
return DtoUtil.getMvoVersionString(pool);
}
public String getNote() {
return DtoUtil.getString(pool, MPLSNMS_ATTR.NOTE);
}
}
|
[
"t.yamazaki@ttscweb.jp"
] |
t.yamazaki@ttscweb.jp
|
d758ef92e5792e30a9fca00f1894cc41a518798c
|
fa0cf934703768baac2390a0849af9c8141a94e3
|
/ltybd-baseinfo/src/main/java/com/ltybd/exception/GlobalException.java
|
4b121498f461db067de638ff0a4c31b1d8c8eb3a
|
[] |
no_license
|
NONO9527/ltybd-root
|
44c4a8bbef3d708c82772874fb14ae654ca05229
|
c8a650f3f204ff1abeecdc9178869e3a47bdde93
|
refs/heads/master
| 2021-12-30T09:23:46.933731
| 2018-02-08T01:24:14
| 2018-02-08T01:24:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,162
|
java
|
package com.ltybd.exception;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;
import com.ltybd.entity.ResponseData;
/**
* Description: ๅผๅธธๆฆๆชๅค็<br/>
* Date: 2017ๅนด7ๆ30ๆฅ ไธๅ3:24:35 <br/>
*
* @author
* @version
* @see
*/
@ControllerAdvice
public class GlobalException {
@ExceptionHandler(value = Exception.class)
@ResponseBody
public ResponseData defaultErrorHandler(Exception e,HttpServletRequest request, HttpServletResponse response) throws Exception {
ResponseData r = new ResponseData();
r.setResult("1");
r.setResPonse("่ฏทๆฑๅผๅธธ");
if (e instanceof org.springframework.web.servlet.NoHandlerFoundException) {
r.setResultMsg("ๆจ่ฏทๆฑ็ๆฅๅฃๅฐๅไธๅญๅจ,่ฏท็กฎๅฎ่ฎฟ้ฎๅฐๅๆฏๅฆๆญฃ็กฎ");
} else {
r.setResultMsg("่ฏทๆฑๅคฑ่ดฅ,่ฏทๆฃๆฅๆไผ ๅๆฐๆฏๅฆๅๆณ");
}
return r;
}
}
|
[
"shuai.hong@lantaiyuan.com"
] |
shuai.hong@lantaiyuan.com
|
f0b1471835c5c7256fac326e25838bffae212bc6
|
dfa806c8777cdea0de8bb19af7968320a9a42f66
|
/internet-finance-app/src/main/java/com/hc9/web/main/common/messagepush/ios/IOSGroupcast.java
|
b10a2a7d80fc857c11929bb1969824fbdc942116
|
[] |
no_license
|
jxcpu2008/internet-finance-qhhc
|
1ccf6923e08621ee911acfdbb69d7a630068547d
|
7f581aec6bdacc761e21d9cfadcbf2f688a59850
|
refs/heads/master
| 2021-05-16T01:30:17.477342
| 2017-10-16T02:08:57
| 2017-10-16T02:35:47
| 107,069,474
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 538
|
java
|
package com.hc9.web.main.common.messagepush.ios;
import com.alibaba.fastjson.JSONObject;
import com.hc9.web.main.common.messagepush.IOSNotification;
public class IOSGroupcast extends IOSNotification {
public IOSGroupcast(String appkey,String appMasterSecret) throws Exception {
setAppMasterSecret(appMasterSecret);
setPredefinedKeyValue("appkey", appkey);
this.setPredefinedKeyValue("type", "groupcast");
}
public void setFilter(JSONObject filter) throws Exception {
setPredefinedKeyValue("filter", filter);
}
}
|
[
"jxcpu2008@163.com"
] |
jxcpu2008@163.com
|
751491469e376cb55b24d88232c144e411174a3b
|
7ba2a260f6b1b7a5c31dabcdf11e4c0c13a142ef
|
/java/297.ไบๅๆ ็ๅบๅๅไธๅๅบๅๅ.java
|
aefa9bd577a8d75b5e4c5b1b70191cf4d6d8d7c5
|
[
"Apache-2.0"
] |
permissive
|
maoqitian/MyLeetCode
|
5c063008760e837567141d64052ae5c53e8be43a
|
8a85996352a88bb9a8a6a2712dce3eac2e1c3463
|
refs/heads/master
| 2022-01-16T23:00:30.348018
| 2022-01-05T15:42:13
| 2022-01-05T15:42:13
| 175,940,000
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,561
|
java
|
import java.util.Arrays;
import java.util.Enumeration;
import java.util.LinkedList;
/*
* @lc app=leetcode.cn id=297 lang=java
*
* [297] ไบๅๆ ็ๅบๅๅไธๅๅบๅๅ
*/
// @lc code=start
/**
* Definition for a binary tree node.
* public class TreeNode {
* int val;
* TreeNode left;
* TreeNode right;
* TreeNode(int x) { val = x; }
* }
*/
public class Codec {
//็ฎๆณ ๅๅบ้ๅไบๅๆ ๆฏไธช่็นไฝฟ็จ"," ้ๅผ๏ผ็ฉบ่็นๅไฝฟ็จ null ไปฃๆฟ
//ๅๅบๅๅ ไฝฟ็จ ้ๅๅญๅจๅฏนๅบๅญ็ฌฆไธฒๅๆขๅค ๆ ็ปๆ
private static final String spliter = ",";
private static final String NULL = "null";
// Encodes a tree to a single string.
public String serialize(TreeNode root) {
StringBuilder stringBuilder = new StringBuilder();
buildSerializeString(root,stringBuilder);
return stringBuilder.toString();
}
/**
* ๅๅบ้ๅๆผๆฅๅญ็ฌฆไธฒ ้ๅฝ
* @param root ้ๅฝๆ
* @param stringBuilder ๅญ็ฌฆไธฒๆผๆฅ
*/
void buildSerializeString(TreeNode root,StringBuilder stringBuilder){
if(root == null){
stringBuilder.append(NULL).append(spliter);
}else{
stringBuilder.append(root.val).append(spliter);
buildSerializeString(root.left, stringBuilder);
buildSerializeString(root.right, stringBuilder);
}
}
// Decodes your encoded data to tree.
public TreeNode deserialize(String data) {
LinkedList<String> linkedList = new LinkedList<>();
linkedList.addAll(Arrays.asList(data.split(spliter)));
return deserializeTree(linkedList);
}
/**
* ้ๅฝๆขๅคๆ ็ปๆ ็ปง็ปญไฝฟ็จไธญๅบ้ๅๆขๅค ้ๅๅ
่ฟๅ
ๅบ
* @param linkedList
* @return
*/
TreeNode deserializeTree(LinkedList<String> linkedList){
String val = linkedList.remove();
//้ๅฝ็ปๆๆกไปถ๏ผๅฆๆ้พ่กจ่ทๅ่็น็ญไบNULLๅ็ดๆฅ่ฟๅ null
if(NULL.equals(val)){
return null;
}else{ //ๅฆๅๆฐๅปบไธไธชๆ ่็น
//้ป่พๅค็ ่ฟๅ
ฅไธๅฑ้ๅฝ
TreeNode treeNode = new TreeNode(Integer.valueOf(val));
treeNode.left = deserializeTree(linkedList);
treeNode.right = deserializeTree(linkedList);
return treeNode;
}
//ๆฐๆฎ้ๆพ
}
}
// Your Codec object will be instantiated and called as such:
// Codec codec = new Codec();
// codec.deserialize(codec.serialize(root));
// @lc code=end
|
[
"maoqitian068@163.com"
] |
maoqitian068@163.com
|
42a63409c04e65ba0a926e00f32232f4bc5ad61a
|
3d6c20dc57a8eb1a015c5d2353a515f29525a1d6
|
/Asdvanced java swing shamim/HortonBookSolution/404140 Exercise Solutions/ch14/sol4/Person.java
|
561b7887bd6778936378a5d78af955b0f9d38230
|
[] |
no_license
|
nparvez71/NetbeanSoftware
|
b9e5c93addc2583790c69f53c650c29665e16721
|
1e18ff07914c4c4530bcfd93693d838bea8f9641
|
refs/heads/master
| 2020-03-13T19:14:53.285683
| 2018-04-29T04:34:07
| 2018-04-29T04:34:07
| 131,249,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,770
|
java
|
import java.io.Serializable;
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;
public class Person implements Comparable<Person>, Serializable {
// Constructor
public Person(String firstName, String surname) {
this.firstName = firstName;
this.surname = surname;
}
@Override
public String toString() {
return firstName + " " + surname;
}
public String getSecondName() {
return surname;
}
// Compare Person objects
public int compareTo(Person person) {
int result = surname.compareTo(person.surname);
return result == 0 ? firstName.compareTo(person.firstName):result;
}
@Override
public boolean equals(Object person) {
return compareTo((Person)person) == 0;
}
@Override
public int hashCode() {
return 7*firstName.hashCode() + 13*surname.hashCode();
}
// Read a person from the keyboard
public static Person readPerson() {
String firstName = null;
String surname = null;
try {
System.out.print("Enter first name: ");
firstName = keyboard.readLine().trim();
System.out.print("Enter surname: ");
surname = keyboard.readLine().trim();
} catch(IOException e) {
System.err.println("Error reading a name.");
e.printStackTrace();
System.exit(1);
}
return new Person(firstName,surname);
}
private static BufferedReader keyboard = new BufferedReader(new InputStreamReader(System.in));
private String firstName; // First name of person
private String surname; // Second name of person
private static final long serialVersionUID = 1002L;
}
|
[
"nparvez92@gmail.com"
] |
nparvez92@gmail.com
|
73230fe3d110f295f3bd26c9cc30666bb39287e8
|
50023378bef26739a7037fc04759663fcc66e4a8
|
/Leetcode/src/main/java/hou/forwz/Leetcode/hard/MergeIntervals.java
|
917b5b42cf4699f1d1f1b759c75fff763ed562be
|
[] |
no_license
|
houweitao/Leetcode
|
dde59bfff97daa14f4634c2e158b318ae9b47944
|
78035bf2b2d9dff4fb9c8f0d2a6d4db6114186ef
|
refs/heads/master
| 2020-05-21T17:54:35.721046
| 2016-12-20T09:11:10
| 2016-12-20T09:11:10
| 62,659,590
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,787
|
java
|
package hou.forwz.Leetcode.hard;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.LinkedList;
import java.util.List;
import hou.forwz.Leetcode.structure.Interval;
/**
* @author houweitao
* @date 2016ๅนด7ๆ11ๆฅไธๅ10:55:49
*/
public class MergeIntervals {
public static void main(String[] args) {
MergeIntervals mi = new MergeIntervals();
mi.init();
}
private void init() {
Interval a = new Interval(2, 3);
Interval b = new Interval(2, 2);
Interval c = new Interval(3, 3);
Interval d = new Interval(1, 3);
Interval e = new Interval(5, 7);
Interval f = new Interval(2, 2);
Interval g = new Interval(4, 6);
List<Interval> list = new ArrayList<>();
list.add(a);
list.add(b);
list.add(c);
list.add(d);
list.add(e);
list.add(f);
list.add(g);
System.out.println(list);
Collections.sort(list, new IntervalComparator());
System.out.println(list);
System.out.println(merge(list));
}
public List<Interval> merge(List<Interval> intervals) {
Collections.sort(intervals, new IntervalComparator());
int len = intervals.size();
if (len < 2)
return intervals;
else
return mergeList(intervals, 0, len - 1);
}
public List<Interval> merge2(List<Interval> intervals) {
if (intervals.size() <= 1)
return intervals;
// Sort by ascending starting point using an anonymous Comparator
Collections.sort(intervals, new Comparator<Interval>() {
@Override
public int compare(Interval i1, Interval i2) {
return Integer.compare(i1.start, i2.start);
}
});
List<Interval> result = new LinkedList<Interval>();
int start = intervals.get(0).start;
int end = intervals.get(0).end;
for (Interval interval : intervals) {
if (interval.start <= end) // Overlapping intervals, move the end if
// needed
end = Math.max(end, interval.end);
else { // Disjoint intervals, add the previous one and reset bounds
result.add(new Interval(start, end));
start = interval.start;
end = interval.end;
}
}
// Add the last interval
result.add(new Interval(start, end));
return result;
}
private List<Interval> mergeList(List<Interval> list, int begin, int end) {
List<Interval> ret = new ArrayList<>();
if (begin == end) {
ret.add(list.get(begin));
return ret;
} else if (begin + 1 == end) {
System.out.println(list);
Interval mer = merge(list.get(begin), list.get(end));
if (mer != null) {
ret.add(mer);
return ret;
} else {
ret.add(list.get(begin));
ret.add(list.get(end));
return ret;
}
} else {
int mid = (begin + end) / 2;
List<Interval> left = mergeList(list, begin, mid);
List<Interval> right = mergeList(list, mid + 1, end);
if (left.size() + right.size() == end - begin + 1)
return list;
if (left.size() == 0) {
return right;
} else if (right.size() == 0)
return left;
else {
ret.addAll(left);
ret.addAll(right);
if (canMerge(left.get(left.size() - 1), right.get(0))) {
return mergeList(ret, 0, ret.size() - 1);
} else
return ret;
}
}
}
boolean canMerge(Interval o1, Interval o2) {
if (o1.start > o2.end || o1.end < o2.start)
return false;
else
return true;
}
Interval merge(Interval o1, Interval o2) {
if (canMerge(o1, o2))
return new Interval(Math.min(o1.start, o2.start), Math.max(o1.end, o2.end));
else
return null;
}
class IntervalComparator implements Comparator<Interval> {
@Override
public int compare(Interval o1, Interval o2) {
if (o1.start < o2.start)
return -1;
else if (o1.start > o2.start)
return 1;
else {
if (o1.end < o2.end)
return -1;
else if (o1.end > o2.end)
return 1;
else
return 0;
}
}
}
}
|
[
"hou103880@163.com"
] |
hou103880@163.com
|
6b811e7438b5c30a3b00faeddb926c85212f6aa6
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/cmn-20200825/src/main/java/com/aliyun/cmn20200825/models/ListInspectionTaskReportsResponse.java
|
14791a609597d2762604781a18fa398d3eb89297
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,151
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.cmn20200825.models;
import com.aliyun.tea.*;
public class ListInspectionTaskReportsResponse extends TeaModel {
@NameInMap("headers")
@Validation(required = true)
public java.util.Map<String, String> headers;
@NameInMap("body")
@Validation(required = true)
public ListInspectionTaskReportsResponseBody body;
public static ListInspectionTaskReportsResponse build(java.util.Map<String, ?> map) throws Exception {
ListInspectionTaskReportsResponse self = new ListInspectionTaskReportsResponse();
return TeaModel.build(map, self);
}
public ListInspectionTaskReportsResponse setHeaders(java.util.Map<String, String> headers) {
this.headers = headers;
return this;
}
public java.util.Map<String, String> getHeaders() {
return this.headers;
}
public ListInspectionTaskReportsResponse setBody(ListInspectionTaskReportsResponseBody body) {
this.body = body;
return this;
}
public ListInspectionTaskReportsResponseBody getBody() {
return this.body;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
5bb33ec3ea7a4dffcedba5154ee91eb9078d057c
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/shardingjdbc--sharding-jdbc/6a9275fb82efd7324e5acfdbe0ec3c247dca6e96/after/SQLServerExprParser.java
|
6298df84074e935f8ecd44ba43adc6a7d94b97de
|
[] |
no_license
|
fracz/refactor-extractor
|
3ae45c97cc63f26d5cb8b92003b12f74cc9973a9
|
dd5e82bfcc376e74a99e18c2bf54c95676914272
|
refs/heads/master
| 2021-01-19T06:50:08.211003
| 2018-11-30T13:00:57
| 2018-11-30T13:00:57
| 87,353,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,214
|
java
|
/*
* Copyright 1999-2101 Alibaba Group Holding Ltd.
*
* 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.alibaba.druid.sql.dialect.sqlserver.parser;
import com.alibaba.druid.sql.context.LimitContext;
import com.alibaba.druid.sql.context.SelectSQLContext;
import com.alibaba.druid.sql.dialect.sqlserver.ast.SQLServerTop;
import com.alibaba.druid.sql.dialect.sqlserver.lexer.SQLServerKeyword;
import com.alibaba.druid.sql.dialect.sqlserver.lexer.SQLServerLexer;
import com.alibaba.druid.sql.lexer.DataType;
import com.alibaba.druid.sql.lexer.DefaultKeyword;
import com.alibaba.druid.sql.lexer.Symbol;
import com.alibaba.druid.sql.parser.ParserException;
import com.alibaba.druid.sql.parser.ParserUnsupportedException;
import com.alibaba.druid.sql.parser.SQLExprParser;
import com.dangdang.ddframe.rdb.sharding.api.rule.ShardingRule;
import java.util.List;
public class SQLServerExprParser extends SQLExprParser {
public SQLServerExprParser(final ShardingRule shardingRule, final List<Object> parameters, final String sql) {
super(shardingRule, parameters, new SQLServerLexer(sql));
getLexer().nextToken();
}
public SQLServerTop parseTop() {
// TODO
// if (getLexer().equalToken(Token.TOP)) {
// SQLServerTop top = new SQLServerTop();
// getLexer().nextToken();
//
// boolean paren = false;
// if (getLexer().equalToken(Symbol.LEFT_PAREN)) {
// paren = true;
// getLexer().nextToken();
// }
//
// top.setExpr(primary());
//
// if (paren) {
// getLexer().accept(Symbol.RIGHT_PAREN);
// }
//
// if (getLexer().equalToken(Token.PERCENT)) {
// getLexer().nextToken();
// top.setPercent(true);
// }
//
// return top;
// }
return null;
}
protected void skipOutput() {
if (getLexer().equalToken(SQLServerKeyword.OUTPUT)) {
throw new ParserUnsupportedException(SQLServerKeyword.OUTPUT);
}
}
public void parseOffset(final SelectSQLContext sqlContext) {
getLexer().nextToken();
int offset;
int offsetIndex = -1;
if (getLexer().equalToken(DataType.LITERAL_INT)) {
offset = Integer.parseInt(getLexer().getLiterals());
} else if (getLexer().equalToken(Symbol.QUESTION)) {
offsetIndex = getParametersIndex();
offset = (int) getParameters().get(offsetIndex);
setParametersIndex(offsetIndex + 1);
} else {
throw new ParserException(getLexer());
}
getLexer().nextToken();
LimitContext limitContext;
if (getLexer().skipIfEqual(DefaultKeyword.FETCH)) {
getLexer().nextToken();
int rowCount;
int rowCountIndex = -1;
getLexer().nextToken();
if (getLexer().equalToken(DataType.LITERAL_INT)) {
rowCount = Integer.parseInt(getLexer().getLiterals());
} else if (getLexer().equalToken(Symbol.QUESTION)) {
rowCountIndex = getParametersIndex();
rowCount = (int) getParameters().get(rowCountIndex);
setParametersIndex(rowCountIndex + 1);
} else {
throw new ParserException(getLexer());
}
getLexer().nextToken();
getLexer().nextToken();
limitContext = new LimitContext(offset, rowCount, offsetIndex, rowCountIndex);
} else {
limitContext = new LimitContext(offset, offsetIndex);
}
sqlContext.setLimitContext(limitContext);
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
66011bcbdb693e39b9e1c93f11ec6fe17bad38b4
|
e63363389e72c0822a171e450a41c094c0c1a49c
|
/Mate20_9_0_0/src/main/java/android/hardware/radio/V1_0/UiccSubActStatus.java
|
3ee830635a224b02da4fe1c81db6aa1333ae5a2b
|
[] |
no_license
|
solartcc/HwFrameWorkSource
|
fc23ca63bcf17865e99b607cc85d89e16ec1b177
|
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
|
refs/heads/master
| 2022-12-04T21:14:37.581438
| 2020-08-25T04:30:43
| 2020-08-25T04:30:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,136
|
java
|
package android.hardware.radio.V1_0;
import java.util.ArrayList;
public final class UiccSubActStatus {
public static final int ACTIVATE = 1;
public static final int DEACTIVATE = 0;
public static final String toString(int o) {
if (o == 0) {
return "DEACTIVATE";
}
if (o == 1) {
return "ACTIVATE";
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("0x");
stringBuilder.append(Integer.toHexString(o));
return stringBuilder.toString();
}
public static final String dumpBitfield(int o) {
ArrayList<String> list = new ArrayList();
int flipped = 0;
list.add("DEACTIVATE");
if ((o & 1) == 1) {
list.add("ACTIVATE");
flipped = 0 | 1;
}
if (o != flipped) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("0x");
stringBuilder.append(Integer.toHexString((~flipped) & o));
list.add(stringBuilder.toString());
}
return String.join(" | ", list);
}
}
|
[
"lygforbs0@gmail.com"
] |
lygforbs0@gmail.com
|
359a74fc9c050585803e654480cee2d2126ca8e4
|
52280cf6517f27bde1ad70037bc20f9aaa01d6c5
|
/src/com/drew/metadata/Tag.java
|
b83c36b99323ec021af017729bd149273fc7505d
|
[] |
no_license
|
xiangyong/JDMall
|
7730ae3395a44d03387f4d4075a1b2c8870c23be
|
5ce5a7870e87a67cad500903bc169cd266b5a2e9
|
refs/heads/master
| 2021-01-16T18:13:41.254336
| 2014-02-26T09:59:08
| 2014-02-26T09:59:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,486
|
java
|
package com.drew.metadata;
import java.io.Serializable;
public class Tag
implements Serializable
{
private final Directory _directory;
private final int _tagType;
public Tag(int paramInt, Directory paramDirectory)
{
this._tagType = paramInt;
this._directory = paramDirectory;
}
public String getDescription()
throws MetadataException
{
return this._directory.getDescription(this._tagType);
}
public String getDirectoryName()
{
return this._directory.getName();
}
public String getTagName()
{
return this._directory.getTagName(this._tagType);
}
public int getTagType()
{
return this._tagType;
}
public String getTagTypeHex()
{
for (String str = Integer.toHexString(this._tagType);; str = "0" + str) {
if (str.length() >= 4) {
return "0x" + str;
}
}
}
public String toString()
{
try
{
String str2 = getDescription();
str1 = str2;
}
catch (MetadataException localMetadataException)
{
for (;;)
{
String str1 = this._directory.getString(getTagType()) + " (unable to formulate description)";
}
}
return "[" + this._directory.getName() + "] " + getTagName() + " - " + str1;
}
}
/* Location: C:\Users\yepeng\Documents\classes-dex2jar.jar
* Qualified Name: com.drew.metadata.Tag
* JD-Core Version: 0.7.0.1
*/
|
[
"13718868826@163.com"
] |
13718868826@163.com
|
ec3fa35462c14016700dc9cbd74bdfa4388e4bf8
|
32ee2bef316b7642c5f6c3b1b70962277b8f1837
|
/src/main/java/com/zheng/weixin/service/IWeixinMenuService.java
|
8ed3b67b862a32c38d039e2a6dc5bffb06fd20ef
|
[] |
no_license
|
zl736732419/weixin-project
|
1d7a5b2e4ea8148e1cbd20b9c9074b68b8385537
|
4a23cb3386ea318b0e6e4032ed3f407efba4c8b0
|
refs/heads/master
| 2021-01-10T01:50:55.647629
| 2016-01-16T02:01:00
| 2016-01-16T02:01:00
| 49,320,633
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 757
|
java
|
package com.zheng.weixin.service;
import java.util.List;
import com.zheng.weixin.domain.WeixinMenu;
import com.zheng.weixin.dto.WeixinMenuDto;
public interface IWeixinMenuService extends IBaseService<WeixinMenu>{
/**
* ๆ นๆฎkeyๆฅๆพ่ๅ
*
* @author zhenglian
* @data 2016ๅนด1ๆ6ๆฅ ไธๅ10:44:27
* @param key
* @return
*/
public WeixinMenu findByKey(String key);
/**
* ่ทๅๅพฎไฟก่ๅๆ ๅฝข่ๅๅ่กจ
*
* @author zhenglian
* @data 2016ๅนด1ๆ6ๆฅ ไธๅ10:45:02
* @return
*/
public List<WeixinMenuDto> tree();
/**
* ๅๅธ่ชๅฎไน่ๅ
*
* @author zhenglian
* @data 2016ๅนด1ๆ9ๆฅ ไธๅ2:32:18
* @param json
* @return
*/
public String publish();
}
|
[
"736732419@qq.com"
] |
736732419@qq.com
|
e9c0bbc21c9009375ff2f80c850b3455b703af53
|
f731eea3d31426aa680953d9d9777a0eba84b153
|
/report-service/src/main/java/asia/cmg/f8/report/dto/CreditBookingSessionStatus.java
|
5ff1d08855de0a7ff400adb5ce60d060d50e4ba7
|
[] |
no_license
|
longpham041292/java-sample
|
893a53b182d8d91a4aac4b05126438efeec16cca
|
0b3ef36688eabbcf690de1b3daff57586dc010b7
|
refs/heads/main
| 2023-08-04T20:23:33.935587
| 2021-10-03T06:37:02
| 2021-10-03T06:37:02
| 412,994,810
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 621
|
java
|
package asia.cmg.f8.report.dto;
import com.fasterxml.jackson.annotation.JsonValue;
/**
* Created on 11/22/16.
*/
public enum CreditBookingSessionStatus {
BOOKED,
REJECTED,
CONFIRMED,
// Per requirement, we should remove when return to client
CANCELLED,
// Per requirement, we should remove when return to client
TRAINER_CANCELLED,
// Per requirement, we should change it to Cancelled when return to client
EU_CANCELLED,
// Per requirement, we should change it to Burned when return to client
BURNED,
COMPLETED,
DEDUCTED,
REFUNDED;
@JsonValue
public int toValue() {
return ordinal();
}
}
|
[
"longpham@leep.app"
] |
longpham@leep.app
|
9c3f5ea7fdcce05c642726ea598cdf2ec7dbe881
|
71dd5a62896d88ef3d1a8b383d6964408d7d239f
|
/javastudy/part20-collection-framework/src/Test/Test03.java
|
5c542dbdcef529139bfef23deed3a78bae0fbf40
|
[] |
no_license
|
hwangseokjin94/java_web_0224
|
42df3f57b3b50598e2ca8b12d27e20a284670ca7
|
6c9ab05ac743763db8264c42c814b79cada95458
|
refs/heads/master
| 2022-11-13T08:23:36.271978
| 2020-07-02T08:26:19
| 2020-07-02T08:26:19
| 250,546,467
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 777
|
java
|
package Test;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
/*
Test03.java
Set์ ์ด์ฉํ์ฌ ๋ก๋ ๋ฐ์๊ธฐ๋ฅผ ๊ตฌํํ์์ค.
๋น์ฒจ ๋ฒํธ 6๊ฐ๋ง ๊ตฌํํ์์ค.
*/
public class Test03 {
public static void main(String[] args) {
// 1~45 ์ฌ์ด ๋์๋ฅผ ๋ฐ์์์ผ Set์ ์ ์ฅํ๋ค.
// ๋ช๋ฒ๋๋ฆด์ง ๊ฒฐ์ ์ Set์ size()์ ํ์ธํด์ ์ฒ๋ฆฌํ๋ค.
Set<Integer> set = new HashSet<Integer>();
while(set.size()<6) {
set.add((int)(Math.random()*45)+1);
}
System.out.println(set);
//๋ฒ์ธ
int[] lotto = new int[6];
int i = 0;
Iterator<Integer> itr = set.iterator();
while(itr.hasNext()) {
lotto[i++]=itr.next();
}
System.out.println(Arrays.toString(lotto));
}
}
|
[
"vpdnsldk@gmail.com"
] |
vpdnsldk@gmail.com
|
6e4495f5c1249c15bcc55365b9b704aa6c8be620
|
08bdd164c174d24e69be25bf952322b84573f216
|
/opencores/client/foundation classes/j2sdk-1_4_2-src-scsl/hotspot/src/share/tools/MakeDeps/Macro.java
|
cef8320d398ea296ad67085a742c772a29416a4a
|
[] |
no_license
|
hagyhang/myforthprocessor
|
1861dcabcf2aeccf0ab49791f510863d97d89a77
|
210083fe71c39fa5d92f1f1acb62392a7f77aa9e
|
refs/heads/master
| 2021-05-28T01:42:50.538428
| 2014-07-17T14:14:33
| 2014-07-17T14:14:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 257
|
java
|
/*
* @(#)Macro.java 1.3 03/01/23 11:12:02
*
* Copyright 2003 Sun Microsystems, Inc. All rights reserved.
* SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
public class Macro {
public String name;
public String contents;
}
|
[
"blue@cmd.nu"
] |
blue@cmd.nu
|
ead05b178e03dcc463b4670ff78ee5f0be1343bc
|
5ded742c0b9ea92832aad98da55d3802a5b745ce
|
/src/myAmazingThings/SuperField.java
|
fbf193ab9c789e0d570bf97164ef522875868845
|
[] |
no_license
|
JungSangHyeon/2018-Enrolment-Program
|
c8740999c4470df1d282849223a194d396cd9de8
|
f110c72015f156231e9381108630ba1f74350288
|
refs/heads/master
| 2022-10-20T15:50:49.625060
| 2020-07-09T08:00:52
| 2020-07-09T08:00:52
| 278,300,842
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 4,207
|
java
|
package myAmazingThings;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
public class SuperField extends JPanel {
private static final long serialVersionUID = 1L;
int focusedHolderSize = 18;
int errorSize = 12;
int textAreaTextSize =20;
int barWidth = 100;
int barHeight = 2;
int interval = 6;
int status = 1;
int time = 20;
int cnt = 0;
int errorNum = 1;
Color normalChange = new Color(66,133,244);
Color errorChange = new Color(213,0,0);
Color basicColor = new Color(224,224,224);
Color changeColor= normalChange;
String placeHolder, errorMessage;
public void error(int num) {
if(num==1) {changeColor = normalChange;}
else {changeColor = errorChange;}
if(num==2) {status=3;}
errorNum = num;
repaint();
}
public SuperField(String placeHolderValue,String errorMessageValue, int barWidthValue) {
this.errorMessage = errorMessageValue;
this.placeHolder = placeHolderValue;
this.barWidth = barWidthValue;
this.setSize(barWidth, barHeight + textAreaTextSize + focusedHolderSize*2 + interval +errorSize);
this.setLayout(null);
}
public void Animation(Graphics g) {
g.clearRect(0, 0, this.getWidth(), this.getHeight());
g.setColor(basicColor);
g.fillRect(0, focusedHolderSize + interval * 2 + textAreaTextSize, barWidth, barHeight);// ์๋ ๋ฌด์กฐ๊ฑด ๊ทธ๋ฆผ. bar.
g.setFont(new Font(null, Font.BOLD, focusedHolderSize));
if (status == 1) {// ๋ด์ฉ์์๋ ํฌ์ปค์ค ์ป์
g.setColor(changingColor(basicColor, changeColor));
upText(g);
g.setColor(changeColor);
showBar(g);
} else if (status == 2) {// ๋ด์ฉ ์์๋ ํฌ์ปค์ค ์์
g.setColor(changingColor(changeColor, basicColor));
downText(g);
hideBar(g);
} else if (status == 3) {// ๋ด์ฉ ์์๋ ํฌ์ปค์ค ์์
g.setColor(changingColor(changeColor, basicColor));
drawPlaceHolder(g);
hideBar(g);
} else if (status == 4) {// ๋ด์ฉ ์์๋ ํฌ์ปค์ค ์ป์
g.setColor(changingColor(basicColor, changeColor));
drawPlaceHolder(g);
g.setColor(changeColor);
showBar(g);
} else if (status == 5) {// ๋ฆฌ์
g.setColor(basicColor);
g.drawString(placeHolder, 0, focusedHolderSize * 2);
g.fillRect(0, focusedHolderSize + interval * 2 + textAreaTextSize, barWidth, barHeight);
}
if (errorNum != 1) {
g.setColor(changeColor);
g.setFont(new Font(null, Font.BOLD, errorSize));
g.fillRect(0, focusedHolderSize + interval * 2 + textAreaTextSize, barWidth, barHeight);
if (errorNum == 2) {// ๋ญ ์์จ์ ์ผ์ด๋ ์๋ฌ
g.drawString(errorMessage, 0, focusedHolderSize + interval * 2 + textAreaTextSize * 2);
}
}
}
public int changevalue(int input) {return input*100/time*cnt/100; }//100์ ๊ณฑํ๊ณ ๋๋ ์ฃผ๋ ์ด์ ๋ ์๊ฐ ์์์ 0 ๋์์์ด๋ค. ๊ทธ๋ฆฌ๊ณ ํด์ฃผ๋ฉด ๋ ์ ํํด์ง.//0~๋ณธ๋ ๊ฐ. cnt๊ฐ ์ปค์ง์ ๋ฐ๋ผ.
public void upText(Graphics g) {g.drawString(placeHolder, 0, focusedHolderSize*2-changevalue(focusedHolderSize)); }
public void downText(Graphics g) {g.drawString(placeHolder, 0, focusedHolderSize+changevalue(focusedHolderSize));}
public void showBar(Graphics g) {g.fillRect(barWidth/2-barWidth/time*cnt, focusedHolderSize + interval*2 + textAreaTextSize, barWidth/time*cnt*2, barHeight);}
public void hideBar(Graphics g) {g.fillRect(0, focusedHolderSize + interval*2 + textAreaTextSize, barWidth, barHeight);}
public void drawPlaceHolder(Graphics g) {g.drawString(placeHolder, 0, focusedHolderSize);}
public Color changingColor(Color start, Color end) {//changing์ cnt์๋ฐ๋ผ ๋ณํ๋ ์์. start์์ ์์ํ end๋ก ๋ฐ๊ฟ.
return new Color(start.getRed() + changevalue(end.getRed() - start.getRed()),
start.getGreen() + changevalue(end.getGreen() - start.getGreen()),
start.getBlue() + changevalue(end.getBlue() - start.getBlue()));
}
public String makePassword(JPasswordField jPasswordField) {//char[]๋ก ๋ฆฌํด์ด ๋์ ํ์ํจ.
String reasult = "";
for(char cha : jPasswordField.getPassword()) {reasult+=cha;}
return reasult;
}
}
|
[
"solea1204@naver.com"
] |
solea1204@naver.com
|
d959f467d945b5d3f80ffa0553453a339cb07c66
|
cf113166c9c9e023bee73eee81ebc03625aff522
|
/src/org.xtuml.bp.test/src/org/xtuml/bp/test/common/CanvasEditorUtils.java
|
1b22130616c39c162568ff618144d75e96eee342
|
[
"Apache-2.0"
] |
permissive
|
xtuml/bptest
|
6edcbae9108632d7fe1b4810ab437e8f5493bf9f
|
da921608d96c7b18585a2c5a0776bab7c04b6314
|
refs/heads/master
| 2023-07-20T06:15:01.387623
| 2023-07-06T14:24:13
| 2023-07-06T14:24:13
| 77,953,801
| 1
| 33
|
Apache-2.0
| 2023-07-06T14:24:15
| 2017-01-03T21:12:24
|
Java
|
UTF-8
|
Java
| false
| false
| 6,863
|
java
|
package org.xtuml.bp.test.common;
//=====================================================================
//
//File: $RCSfile: CanvasEditorUtils.java,v $
//Version: $Revision: 1.10 $
//Modified: $Date: 2013/01/10 23:21:31 $
//
//(c) Copyright 2004-2014 by Mentor Graphics Corp. All rights reserved.
//
//=====================================================================
// Licensed under the Apache License, Version 2.0 (the "License"); you may not
// use this file except in compliance with the License. You may obtain a copy
// of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
// WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
// License for the specific language governing permissions and limitations under
// the License.
//=====================================================================
import junit.framework.TestCase;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.TreeItem;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PlatformUI;
import org.xtuml.bp.core.Ooaofooa;
import org.xtuml.bp.core.common.NonRootModelElement;
import org.xtuml.bp.core.common.PersistableModelComponent;
import org.xtuml.bp.core.ui.RenameAction;
import org.xtuml.bp.core.ui.Selection;
import org.xtuml.bp.ui.canvas.Cl_c;
import org.xtuml.bp.ui.canvas.GraphicalElement_c;
import org.xtuml.bp.ui.canvas.Model_c;
import org.xtuml.bp.ui.canvas.Ooaofgraphics;
import org.xtuml.bp.ui.canvas.Shape_c;
import org.xtuml.bp.ui.graphics.editor.GraphicalEditor;
import org.xtuml.bp.ui.graphics.editor.GraphicalEditorInput;
public class CanvasEditorUtils {
static public void delete(GraphicalEditor editor, NonRootModelElement me) {
getShape(me, true);
editor.doDelete();
}
static public void rename(String newName)
{
Object selection = Selection.getInstance().getStructuredSelection()
.getFirstElement();
String oldName = Cl_c.Getname(selection);
Runnable query = RenameAction.getRenameQuery(selection, newName,
oldName, false);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell()
.getDisplay().asyncExec(query);
}
static public void edit(GraphicalEditor editor, NonRootModelElement me) {
Shape_c shape = getShape(me, false);
edit(editor, shape);
}
static public void edit(GraphicalEditor editor) {
edit(editor,getRandomShape(editor));
}
static public void edit(GraphicalEditor editor,Shape_c shape) {
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage()
.activate(editor.getParentEditor());
TestCase.assertNotNull(shape);
editor.zoomAll();
while(PlatformUI.getWorkbench().getDisplay().readAndDispatch());
Point center = CanvasTestUtils.getShapeCenter(shape);
center = CanvasTestUtils.convertToMouseCoor(center, editor.getModel());
CanvasTestUtils.createMouseEvent(center.x, center.y, "MouseDown");
CanvasTestUtils.createMouseEvent(center.x + 20, center.y + 20,
"MouseMove");
CanvasTestUtils.createMouseEvent(center.x + 20, center.y + 20,
"MouseUp");
Point center2 = CanvasTestUtils.getShapeCenter(shape);
center2 = CanvasTestUtils.convertToMouseCoor(center2, editor.getModel());
while(Display.getCurrent().readAndDispatch());
TestCase.assertFalse("Shape not moved", center.equals(center2));
}
static public Shape_c getRandomShape(GraphicalEditor editor) {
GraphicalEditorInput input = (GraphicalEditorInput) editor.getEditorInput();
Model_c diagram = input.getInput();
// pickup a shape
return Shape_c.getOneGD_SHPOnR2(GraphicalElement_c
.getManyGD_GEsOnR1(diagram));
}
static public Shape_c getShape(NonRootModelElement me, boolean select) {
Ooaofgraphics graphicsRoot = Ooaofgraphics.getInstance(me
.getModelRoot().getId());
GraphicalElement_c ge = CanvasTestUtils.getGraphicalElement(
graphicsRoot, me);
Shape_c shape = Shape_c.getOneGD_SHPOnR2(ge);
TestCase.assertNotNull("Shape not found", shape);
if(shape != null && select){
Model_c diagram = Model_c.getOneGD_MDOnR1(ge, false);
((GraphicalEditor) UITestingUtilities.getActiveEditor()).zoomAll();
while(PlatformUI.getWorkbench().getDisplay().readAndDispatch());
Point center = CanvasTestUtils.getShapeCenter(shape);
center = CanvasTestUtils.convertToMouseCoor(center, diagram);
CanvasTestUtils.createMouseEvent(center.x, center.y, "MouseDown");
CanvasTestUtils.createMouseEvent(center.x, center.y, "MouseUp");
IStructuredSelection selection = (IStructuredSelection)Selection.getInstance().getSelection();
TestCase.assertTrue("Model Element not selected", selection.getFirstElement() == me);
}
return Shape_c.getOneGD_SHPOnR2(ge);
}
static public GraphicalEditor openEditorWithShapeOf(NonRootModelElement me) {
Ooaofgraphics graphicsRoot = Ooaofgraphics.getInstance(me
.getModelRoot().getId());
GraphicalElement_c ge = CanvasTestUtils.getGraphicalElement(
graphicsRoot, me);
if (ge != null) {
Model_c diagram = Model_c.getOneGD_MDOnR1(ge, false);
Object containingME = Cl_c.Getinstancefromooa_id((Ooaofooa) me.getModelRoot(),
diagram.getOoa_id(),diagram.getOoa_type());
CanvasTestUtils.openCanvasEditor(containingME);
IEditorPart editor = UITestingUtilities.getActiveEditor();
TestCase.assertTrue("Could not open canvas editor",
(editor instanceof GraphicalEditor));
TestCase.assertTrue("Could not open canvas editor",
((GraphicalEditorInput) ((GraphicalEditor) editor)
.getEditorInput()).getInput() == diagram);
return (GraphicalEditor)editor;
}
return null;
}
static public boolean containsShape(IEditorPart editor, NonRootModelElement me){
if(!(editor instanceof GraphicalEditor)){
return false;
}
Model_c diagram = ((GraphicalEditorInput) (editor).getEditorInput()).getInput();
GraphicalElement_c[] ges = GraphicalElement_c.getManyGD_GEsOnR1(diagram);
for (int i = 0; i < ges.length; i++) {
if(ges[i].getRepresents() == me){
return true;
}
}
return false;
}
public static GraphicalEditor openEditorWithShapeOf(PersistableModelComponent pmc) {
TreeItem item = ExplorerUtil.findRootTreeItem(pmc.getFullPath());
return openEditorWithShapeOf((NonRootModelElement) item.getData());
}
}
|
[
"cort@roxsoftware.com"
] |
cort@roxsoftware.com
|
5e0c2148a5dfe65ea51daa8a30c09149db72e16d
|
78f7fd54a94c334ec56f27451688858662e1495e
|
/partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/dto/VillageBoothElectionVO.java
|
2567ab46210d8591e7aaca488c02c1665a4255a4
|
[] |
no_license
|
hymanath/PA
|
2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef
|
d166bf434601f0fbe45af02064c94954f6326fd7
|
refs/heads/master
| 2021-09-12T09:06:37.814523
| 2018-04-13T20:13:59
| 2018-04-13T20:13:59
| 129,496,146
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,003
|
java
|
package com.itgrids.partyanalyst.dto;
import java.util.List;
public class VillageBoothElectionVO extends ResultStatus{
List<String> villageErrors;
List<String> hamletErrors;
List<String> boothErrors;
List<String> dataDuplicateErrors;
public List<String> getVillageErrors() {
return villageErrors;
}
public void setVillageErrors(List<String> villageErrors) {
this.villageErrors = villageErrors;
}
public List<String> getHamletErrors() {
return hamletErrors;
}
public void setHamletErrors(List<String> hamletErrors) {
this.hamletErrors = hamletErrors;
}
public List<String> getBoothErrors() {
return boothErrors;
}
public void setBoothErrors(List<String> boothErrors) {
this.boothErrors = boothErrors;
}
public List<String> getDataDuplicateErrors() {
return dataDuplicateErrors;
}
public void setDataDuplicateErrors(List<String> dataDuplicateErrors) {
this.dataDuplicateErrors = dataDuplicateErrors;
}
}
|
[
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] |
itgrids@b17b186f-d863-de11-8533-00e0815b4126
|
eaa143a8f09ce32bf50106ad2b98a731831c19a3
|
4c2d4f32674adf257d6f5a331709b4946307c699
|
/NeverLand/src/com/jjoe64/graphview/GraphViewDemo.java
|
b57c11ffde70cdafe07f3625ae4bb9121e1aec6e
|
[
"Apache-2.0"
] |
permissive
|
jabelai/Neverland
|
c31a70a8dfc6397534f3942cd25e770defac923d
|
eaa0976284815e8559bbf25ba59d92a93c2088b2
|
refs/heads/master
| 2020-05-16T22:54:27.030549
| 2014-09-18T16:42:52
| 2014-09-18T16:42:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,088
|
java
|
package com.jjoe64.graphview;
import android.app.Activity;
import android.os.Bundle;
import com.jjoe64.graphview.GraphView.GraphViewData;
/**
* GraphViewDemo creates some dummy data to demonstrate the GraphView component.
*
* IMPORTANT: For examples take a look at GraphView-Demos (https://github.com/jjoe64/GraphView-Demos)
*
* Copyright (C) 2011 Jonas Gehring
* Licensed under the GNU Lesser General Public License (LGPL)
* http://www.gnu.org/licenses/lgpl.html
*/
public class GraphViewDemo extends Activity {
/**
* @param savedInstanceState
*/
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
LineGraphView graphView = new LineGraphView(
this
, "GraphViewDemo"
);
graphView.addSeries(new GraphViewSeries(new GraphViewData[] {
new GraphViewData(1, 2.0d)
, new GraphViewData(2, 1.5d)
, new GraphViewData(2.5, 3.0d)
, new GraphViewData(3, 2.5d)
, new GraphViewData(4, 1.0d)
, new GraphViewData(5, 3.0d)
}));
setContentView(graphView);
}
}
|
[
"lailong.ll@alibaba-inc.com"
] |
lailong.ll@alibaba-inc.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.