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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ca2b27cba631cabb9386f4414b55c6fcd041e678
|
3d15ffdc5eb64ba23c086fb38a1d3ed841df36fa
|
/core/src/test/java/com/google/errorprone/bugpatterns/testdata/EqualsIncompatibleTypeNegativeCases.java
|
eb85295462598ff8f8ef89bf164c134d3eb9eb51
|
[
"Apache-2.0"
] |
permissive
|
hudawei996/error-prone
|
8b769ad64ddfe0cf1f63f47d16693a636b75e3a9
|
2005567fdcfa590332a5e199cd5ba02ae1358709
|
refs/heads/master
| 2022-07-01T17:09:50.044795
| 2017-02-18T18:54:18
| 2017-02-18T23:25:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,652
|
java
|
/*
* Copyright 2015 Google Inc. 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.google.errorprone.bugpatterns.testdata;
/**
* @author avenet@google.com (Arnaud J. Venet)
*/
public class EqualsIncompatibleTypeNegativeCases {
class A {
public boolean equals(Object o) {
if (o instanceof A) {
return true;
}
return false;
}
}
class B1 extends A {}
class B2 extends A {}
class B3 extends B2 {}
void checkEqualsAB1B2B3(A a, B1 b1, B2 b2, B3 b3) {
a.equals(a);
a.equals(b1);
a.equals(b2);
a.equals(b3);
a.equals(null);
b1.equals(a);
b1.equals(b1);
b1.equals(b2);
b1.equals(b3);
b1.equals(null);
b2.equals(a);
b2.equals(b1);
b2.equals(b2);
b2.equals(b3);
b2.equals(null);
b3.equals(a);
b3.equals(b1);
b3.equals(b2);
b3.equals(b3);
b3.equals(null);
}
void checks(Object o, boolean[] bools, boolean bool) {
o.equals(bool);
o.equals(bools[0]);
}
void checkStaticEquals(A a, B1 b1, B2 b2, B3 b3) {
java.util.Objects.equals(a, a);
java.util.Objects.equals(a, b1);
java.util.Objects.equals(a, b2);
java.util.Objects.equals(a, b3);
java.util.Objects.equals(a, null);
java.util.Objects.equals(b1, b3);
java.util.Objects.equals(b2, b3);
java.util.Objects.equals(b3, b3);
java.util.Objects.equals(null, b3);
}
void checkGuavaStaticEquals(A a, B1 b1, B2 b2, B3 b3) {
com.google.common.base.Objects.equal(a, a);
com.google.common.base.Objects.equal(a, b1);
com.google.common.base.Objects.equal(a, b2);
com.google.common.base.Objects.equal(a, b3);
com.google.common.base.Objects.equal(a, null);
com.google.common.base.Objects.equal(b1, b3);
com.google.common.base.Objects.equal(b2, b3);
com.google.common.base.Objects.equal(b3, b3);
com.google.common.base.Objects.equal(null, b3);
}
class C {}
abstract class C1 extends C { public abstract boolean equals(Object o); }
abstract class C2 extends C1 {}
abstract class C3 extends C1 {}
void checkEqualsC1C2C3(C1 c1, C2 c2, C3 c3) {
c1.equals(c1);
c1.equals(c2);
c1.equals(c3);
c1.equals(null);
c2.equals(c1);
c2.equals(c2);
c2.equals(c3);
c2.equals(null);
c3.equals(c1);
c3.equals(c2);
c3.equals(c3);
c3.equals(null);
}
interface I {
public boolean equals(Object o);
}
class E1 implements I {}
class E2 implements I {}
class E3 extends E2 {}
void checkEqualsIE1E2E3(I e, E1 e1, E2 e2, E3 e3) {
e.equals(e);
e.equals(e1);
e.equals(e2);
e.equals(e3);
e.equals(null);
e1.equals(e);
e1.equals(e1);
e1.equals(e2);
e1.equals(e3);
e1.equals(null);
e2.equals(e);
e2.equals(e1);
e2.equals(e2);
e2.equals(e3);
e2.equals(null);
e3.equals(e);
e3.equals(e1);
e3.equals(e2);
e3.equals(e3);
e3.equals(null);
}
interface J {}
class F1 implements J {}
abstract class F2 { public abstract boolean equals(J o); }
void checkOtherEquals(F1 f1, F2 f2) {
f2.equals(f1);
}
}
|
[
"cushon@google.com"
] |
cushon@google.com
|
23647ac13ef1091fd28c0d0b3cb70eaec269f758
|
7948afb1af34de7a773f7f97357e1b1904263420
|
/notification-core/src/main/java/fr/sii/notification/core/service/EverySupportingNotificationService.java
|
5a5e2499f20ee7ee907703778b302b8fb929d53d
|
[] |
no_license
|
wei20024/notification-module
|
4a229323b2ea971eafa8e538995940a12fa428f9
|
2399cfb5b148a3a16ff2ae9d94e23c49503adeaa
|
refs/heads/master
| 2021-01-18T16:11:51.594740
| 2015-05-28T17:03:27
| 2015-05-28T17:03:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,286
|
java
|
package fr.sii.notification.core.service;
import java.util.Arrays;
import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import fr.sii.notification.core.exception.MessageNotSentException;
import fr.sii.notification.core.exception.NotificationException;
import fr.sii.notification.core.message.Message;
import fr.sii.notification.core.sender.ConditionalSender;
/**
* Implementation that will ask each sender if it is able to handle the message.
* If the sender can, then the service asks the sender to really send the
* message.
*
* If several senders can handle the message, then each sender that is able to
* handle it will be used.
*
* @author Aurélien Baudet
* @see ConditionalSender
*/
public class EverySupportingNotificationService implements NotificationService {
private static final Logger LOG = LoggerFactory.getLogger(EverySupportingNotificationService.class);
/**
* The list of senders used to handle messages
*/
private List<ConditionalSender> senders;
/**
* Initialize the service with none, one or several sender implementations.
* The registration order has no consequence.
*
* @param senders
* the senders to register
*/
public EverySupportingNotificationService(ConditionalSender... senders) {
this(Arrays.asList(senders));
}
/**
* Initialize the service with the provided sender implementations. The
* registration order has no consequence.
*
* @param senders
* the senders to register
*/
public EverySupportingNotificationService(List<ConditionalSender> senders) {
super();
this.senders = senders;
}
/**
* Sends the message. The message can be anything with any content and that
* must be delivered to something or someone.
*
* Ask each sender if it is able to handle the message. Each sender that
* can't handle the message is skipped. Each sender that is able to handle
* it will be called in order to really send the message.
*
* @param message
* the message to send
* @throws NotificationException
* when the message couldn't be sent
* @throws MessageNotSentException
* when no sender could handle the message
*/
@Override
public void send(Message message) throws NotificationException {
LOG.info("Sending message...");
LOG.debug("{}", message);
LOG.debug("Find senders that is able to send the message {}", message);
boolean sent = false;
for (ConditionalSender sender : senders) {
if (sender.supports(message)) {
LOG.debug("Sending message {} using sender {}...", message, sender);
sender.send(message);
LOG.debug("Message {} sent using sender {}", message, sender);
sent = true;
} else {
LOG.debug("Sender {} can't handle the message {}", sender, message);
}
}
if(sent) {
LOG.info("Message sent");
LOG.debug("{}", message);
} else {
throw new MessageNotSentException("No sender available to send the message", message);
}
}
/**
* Register a new sender. The sender is added at the end.
*
* @param sender
* the sender to register
* @return this instance for fluent use
*/
public EverySupportingNotificationService addSender(ConditionalSender sender) {
senders.add(sender);
return this;
}
}
|
[
"abaudet@sii.fr"
] |
abaudet@sii.fr
|
c21c4575099a210c933787a373ed35da7ab08f3b
|
bf504150a4e0442fe3112dc8b89588b35f27d484
|
/src/test/java/com/feisystems/bham/domain/reference/TelecomUseCodeIntegrationTest.java
|
500e167be8bf81bfe20c01e96415f4df703b5793
|
[] |
no_license
|
utishrajk/cds-2016
|
5bebac15e24e8c4525c97eafe9868a5f4d9b4789
|
d02d00be4d9243036cb50fd3fe5eccb33c24048f
|
refs/heads/master
| 2021-01-10T02:04:22.279835
| 2015-12-31T20:31:36
| 2015-12-31T20:31:36
| 48,861,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,488
|
java
|
package com.feisystems.bham.domain.reference;
import com.feisystems.bham.service.reference.TelecomUseCodeService;
import java.util.Iterator;
import java.util.List;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Configurable;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.transaction.annotation.Transactional;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = "classpath*:/META-INF/spring/applicationContext*.xml")
@Transactional
@Configurable
public class TelecomUseCodeIntegrationTest {
@Test
public void testMarkerMethod() {
}
@Autowired
TelecomUseCodeDataOnDemand dod;
@Autowired
TelecomUseCodeService telecomUseCodeService;
@Autowired
TelecomUseCodeRepository telecomUseCodeRepository;
@Test
public void testCountAllTelecomUseCodes() {
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", dod.getRandomTelecomUseCode());
long count = telecomUseCodeService.countAllTelecomUseCodes();
Assert.assertTrue("Counter for 'TelecomUseCode' incorrectly reported there were no entries", count > 0);
}
@Test
public void testFindTelecomUseCode() {
TelecomUseCode obj = dod.getRandomTelecomUseCode();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", obj);
Long id = obj.getId();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to provide an identifier", id);
obj = telecomUseCodeService.findTelecomUseCode(id);
Assert.assertNotNull("Find method for 'TelecomUseCode' illegally returned null for id '" + id + "'", obj);
Assert.assertEquals("Find method for 'TelecomUseCode' returned the incorrect identifier", id, obj.getId());
}
@Test
public void testFindAllTelecomUseCodes() {
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", dod.getRandomTelecomUseCode());
long count = telecomUseCodeService.countAllTelecomUseCodes();
Assert.assertTrue("Too expensive to perform a find all test for 'TelecomUseCode', as there are " + count + " entries; set the findAllMaximum to exceed this value or set findAll=false on the integration test annotation to disable the test", count < 250);
List<TelecomUseCode> result = telecomUseCodeService.findAllTelecomUseCodes();
Assert.assertNotNull("Find all method for 'TelecomUseCode' illegally returned null", result);
Assert.assertTrue("Find all method for 'TelecomUseCode' failed to return any data", result.size() > 0);
}
@Test
public void testFindTelecomUseCodeEntries() {
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", dod.getRandomTelecomUseCode());
long count = telecomUseCodeService.countAllTelecomUseCodes();
if (count > 20) count = 20;
int firstResult = 0;
int maxResults = (int) count;
List<TelecomUseCode> result = telecomUseCodeService.findTelecomUseCodeEntries(firstResult, maxResults);
Assert.assertNotNull("Find entries method for 'TelecomUseCode' illegally returned null", result);
Assert.assertEquals("Find entries method for 'TelecomUseCode' returned an incorrect number of entries", count, result.size());
}
@Test
public void testFlush() {
TelecomUseCode obj = dod.getRandomTelecomUseCode();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", obj);
Long id = obj.getId();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to provide an identifier", id);
obj = telecomUseCodeService.findTelecomUseCode(id);
Assert.assertNotNull("Find method for 'TelecomUseCode' illegally returned null for id '" + id + "'", obj);
boolean modified = dod.modifyTelecomUseCode(obj);
Integer currentVersion = obj.getVersion();
telecomUseCodeRepository.flush();
Assert.assertTrue("Version for 'TelecomUseCode' failed to increment on flush directive", (currentVersion != null && obj.getVersion() > currentVersion) || !modified);
}
@Test
public void testUpdateTelecomUseCodeUpdate() {
TelecomUseCode obj = dod.getRandomTelecomUseCode();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", obj);
Long id = obj.getId();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to provide an identifier", id);
obj = telecomUseCodeService.findTelecomUseCode(id);
boolean modified = dod.modifyTelecomUseCode(obj);
Integer currentVersion = obj.getVersion();
TelecomUseCode merged = (TelecomUseCode)telecomUseCodeService.updateTelecomUseCode(obj);
telecomUseCodeRepository.flush();
Assert.assertEquals("Identifier of merged object not the same as identifier of original object", merged.getId(), id);
Assert.assertTrue("Version for 'TelecomUseCode' failed to increment on merge and flush directive", (currentVersion != null && obj.getVersion() > currentVersion) || !modified);
}
@Test
public void testSaveTelecomUseCode() {
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", dod.getRandomTelecomUseCode());
TelecomUseCode obj = dod.getNewTransientTelecomUseCode(Integer.MAX_VALUE);
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to provide a new transient entity", obj);
Assert.assertNull("Expected 'TelecomUseCode' identifier to be null", obj.getId());
try {
telecomUseCodeService.saveTelecomUseCode(obj);
} catch (final ConstraintViolationException e) {
final StringBuilder msg = new StringBuilder();
for (Iterator<ConstraintViolation<?>> iter = e.getConstraintViolations().iterator(); iter.hasNext();) {
final ConstraintViolation<?> cv = iter.next();
msg.append("[").append(cv.getRootBean().getClass().getName()).append(".").append(cv.getPropertyPath()).append(": ").append(cv.getMessage()).append(" (invalid value = ").append(cv.getInvalidValue()).append(")").append("]");
}
throw new IllegalStateException(msg.toString(), e);
}
telecomUseCodeRepository.flush();
Assert.assertNotNull("Expected 'TelecomUseCode' identifier to no longer be null", obj.getId());
}
@Test
public void testDeleteTelecomUseCode() {
TelecomUseCode obj = dod.getRandomTelecomUseCode();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to initialize correctly", obj);
Long id = obj.getId();
Assert.assertNotNull("Data on demand for 'TelecomUseCode' failed to provide an identifier", id);
obj = telecomUseCodeService.findTelecomUseCode(id);
telecomUseCodeService.deleteTelecomUseCode(obj);
telecomUseCodeRepository.flush();
Assert.assertNull("Failed to remove 'TelecomUseCode' with identifier '" + id + "'", telecomUseCodeService.findTelecomUseCode(id));
}
}
|
[
"utish.raj@gmail.com"
] |
utish.raj@gmail.com
|
fee4717c61f75680124eb8af88f5b443e5363fa2
|
c774d25f74d7128b247ae2c1569fd5046c41bce8
|
/org.tolven.deploy.jboss6/tpf/source/org/tolven/deploy/jboss6/JBoss6Deploy.java
|
74b1418e2f5abc0432f6861fb2f123c6cefc2ed5
|
[] |
no_license
|
dubrsl/tolven
|
f42744237333447a5dd8348ae991bb5ffcb5a2d3
|
0e292799b42ae7364050749705eff79952c1b5d3
|
refs/heads/master
| 2021-01-01T18:38:36.978913
| 2011-11-11T14:40:13
| 2011-11-11T14:40:13
| 40,418,393
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 8,080
|
java
|
/*
* Copyright (C) 2009 Tolven Inc
* This library is free software; you can redistribute it and/or modify it under the terms of
* the GNU Lesser General Public License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
* See the GNU Lesser General Public License for more details.
*
* Contact: info@tolvenhealth.com
*
* @author Joseph Isaac
* @version $Id: JBoss6Deploy.java 1604 2011-07-08 00:49:30Z joe.isaac $
*/
package org.tolven.deploy.jboss6;
import java.io.File;
import java.util.Collection;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.GnuParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.io.FileUtils;
import org.apache.log4j.Logger;
import org.tolven.plugin.TolvenCommandPlugin;
import org.tolven.security.hash.TolvenMessageDigest;
/**
* This plugin deploys the JBoss configuration files.
*
* @author Joseph Isaac
*
*/
public class JBoss6Deploy extends TolvenCommandPlugin {
public static final String ATTRIBUTE_DEPLOY_DIR = "deployDir";
public static final String CMD_LINE_EAR_PLUGINS_OPTION = "earPlugins";
public static final String CMD_LINE_RAR_PLUGINS_OPTION = "rarPlugins";
public static final String CMD_LINE_CONFIG_OPTION = "config";
public static final String MESSAGE_DIGEST_ALGORITHM = "md5";
private Logger logger = Logger.getLogger(JBoss6Deploy.class);
@Override
protected void doStart() throws Exception {
logger.debug("*** start ***");
}
@Override
public void execute(String[] args) throws Exception {
logger.debug("*** execute ***");
CommandLine commandLine = getCommandLine(args);
String appserverHomeDirname = (String) evaluate("#{globalProperty['appserver.home']}", getDescriptor());
File appserverHomeDir = new File(appserverHomeDirname);
if (!appserverHomeDir.exists()) {
throw new RuntimeException("appserver home does not exist at: " + appserverHomeDir.getPath());
}
boolean deployConfigFiles = commandLine.hasOption(CMD_LINE_CONFIG_OPTION);
if (deployConfigFiles) {
deployConfig();
}
String earPluginIds = commandLine.getOptionValue(CMD_LINE_EAR_PLUGINS_OPTION);
if (earPluginIds != null) {
deployEarFiles(earPluginIds.split(","), appserverHomeDir);
}
String rarPluginIds = commandLine.getOptionValue(CMD_LINE_RAR_PLUGINS_OPTION);
if (rarPluginIds != null) {
deployRarFiles(rarPluginIds.split(","), appserverHomeDir);
}
}
private CommandLine getCommandLine(String[] args) {
GnuParser parser = new GnuParser();
try {
return parser.parse(getCommandOptions(), args, true);
} catch (ParseException ex) {
HelpFormatter formatter = new HelpFormatter();
formatter.printHelp(getClass().getName(), getCommandOptions());
throw new RuntimeException("Could not parse command line for: " + getClass().getName(), ex);
}
}
private Options getCommandOptions() {
Options cmdLineOptions = new Options();
Option rarPluginsOption = new Option(CMD_LINE_RAR_PLUGINS_OPTION, CMD_LINE_RAR_PLUGINS_OPTION, true, "comma-separated list of rar plugins");
cmdLineOptions.addOption(rarPluginsOption);
Option earPluginsOption = new Option(CMD_LINE_EAR_PLUGINS_OPTION, CMD_LINE_EAR_PLUGINS_OPTION, true, "comma-separated list of ear plugins");
cmdLineOptions.addOption(earPluginsOption);
Option configOption = new Option(CMD_LINE_CONFIG_OPTION, CMD_LINE_CONFIG_OPTION, false, "glassfish configuration files");
cmdLineOptions.addOption(configOption);
return cmdLineOptions;
}
protected void deployConfig() throws Exception {
String appserverHomeDirname = (String) evaluate("#{globalProperty['appserver.home']}", getDescriptor());
File appserverHomeDir = new File(appserverHomeDirname);
if (!appserverHomeDir.exists()) {
throw new RuntimeException("appserver home does not exist at: " + appserverHomeDir.getPath());
}
File appserverStageDir = new File(getStageDir(), appserverHomeDir.getName());
if (!appserverStageDir.exists()) {
appserverStageDir.mkdirs();
}
Collection<File> stageFiles = FileUtils.listFiles(appserverStageDir, null, true);
for (File stageFile : stageFiles) {
String relativeStageFilename = stageFile.getPath().substring(appserverStageDir.getPath().length());
File deployedFile = new File(appserverHomeDir, relativeStageFilename);
if (deployedFile.exists()) {
String stageFileDigest = TolvenMessageDigest.checksum(stageFile.toURI().toURL(), MESSAGE_DIGEST_ALGORITHM);
String deployedFileDigest = TolvenMessageDigest.checksum(deployedFile.toURI().toURL(), MESSAGE_DIGEST_ALGORITHM);
if (deployedFileDigest.equals(stageFileDigest)) {
continue;
}
}
logger.info("Deploy " + stageFile.getPath() + " to " + deployedFile.getPath());
FileUtils.copyFile(stageFile, deployedFile);
}
}
protected void deployRarFiles(String[] rarPlugins, File appserverHomeDir) throws Exception {
Collection<File> filesToDeploy = null;
for (String rarPlugin : rarPlugins) {
File rarDir = new File(getStageDir(), rarPlugin);
if(!rarDir.exists()) {
throw new RuntimeException(rarDir.getPath() + " does not exist");
}
filesToDeploy = FileUtils.listFiles(rarDir, null, true);
deploy(filesToDeploy, rarDir, appserverHomeDir);
}
}
protected void deployEarFiles(String[] earPlugins, File appserverHomeDir) throws Exception {
Collection<File> filesToDeploy = null;
for (String earPlugin : earPlugins) {
File earDir = new File(getStageDir(), earPlugin);
if(!earDir.exists()) {
throw new RuntimeException(earDir.getPath() + " does not exist");
}
filesToDeploy = FileUtils.listFiles(earDir, null, true);
deploy(filesToDeploy, earDir, appserverHomeDir);
}
}
protected void deploy(Collection<File> filesToDeploy, File sourceDir, File appserverHomeDir) throws Exception {
String relativeDeployDirPath = getDescriptor().getAttribute(ATTRIBUTE_DEPLOY_DIR).getValue();
File deployDir = new File(appserverHomeDir, relativeDeployDirPath);
for (File stageFile : filesToDeploy) {
String relativeStageFilename = stageFile.getPath().substring(1 + sourceDir.getPath().length());
File deployedFile = new File(deployDir, relativeStageFilename);
if (deployedFile.exists()) {
String stageFileDigest = TolvenMessageDigest.checksum(stageFile.toURI().toURL(), MESSAGE_DIGEST_ALGORITHM);
String deployedFileDigest = TolvenMessageDigest.checksum(deployedFile.toURI().toURL(), MESSAGE_DIGEST_ALGORITHM);
if (deployedFileDigest.equals(stageFileDigest)) {
continue;
}
}
logger.debug("Deploy " + stageFile.getPath() + " to " + deployedFile.getPath());
FileUtils.copyFile(stageFile, deployedFile);
}
}
@Override
protected void doStop() throws Exception {
logger.debug("*** stop ***");
}
}
|
[
"chrislomonico@21cf0891-b729-4dbf-aa24-92c9934df42b"
] |
chrislomonico@21cf0891-b729-4dbf-aa24-92c9934df42b
|
d824ad8644e9705ebc4e096d288f6e47a4b01140
|
02177ede205030088301b89947a52c8e9e124d1f
|
/modules/objectracking/src/main/java/boofcv/metrics/object/EvaluateResultsTldData.java
|
1d87252fcc2e2b1686103881bd336e7ecd6cc941
|
[] |
no_license
|
lessthanoptimal/ValidationBoof
|
75fde079479868d1d3f9e759ac03c1e73e9049e1
|
098b7db9a2e3c32aaa295a1f3a0184d7905083af
|
refs/heads/SNAPSHOT
| 2023-09-06T03:17:19.612779
| 2023-08-15T01:25:05
| 2023-08-15T01:25:05
| 5,861,549
| 14
| 12
| null | 2022-12-24T18:24:16
| 2012-09-18T19:13:27
|
Java
|
UTF-8
|
Java
| false
| false
| 3,402
|
java
|
package boofcv.metrics.object;
import boofcv.common.BoofRegressionConstants;
import boofcv.regression.ObjectTrackingRegression;
import georegression.struct.shapes.Rectangle2D_F64;
import java.io.*;
/**
* @author Peter Abeles
*/
public class EvaluateResultsTldData {
public static boolean formatLatex = false;
public void evaluate(String dataName, String inputFile , PrintStream out ) throws IOException {
System.out.println("Processing "+dataName);
String path = "data/track_rect/TLD/"+dataName;
Rectangle2D_F64 expected = new Rectangle2D_F64();
Rectangle2D_F64 found = new Rectangle2D_F64();
BufferedReader readerTruth = new BufferedReader(new FileReader(path+"/gt.txt"));
BufferedReader readerRect;
try {
readerRect = new BufferedReader(new FileReader(inputFile));
} catch( IOException e ) {
throw new RuntimeException("TLD. Can't find file. Skipping. "+inputFile);
}
TldResults stats = new TldResults();
FooResults statsFoo = new FooResults();
int imageNum = 0;
while( true ) {
String truth = readerTruth.readLine();
if( truth == null)
break;
String foundString = readerRect.readLine();
if( foundString == null) {
System.err.println("Partial results file");
return;
}
UtilTldData.parseRect(truth,expected);
UtilTldData.parseRect(foundString,found);
UtilTldData.updateStatistics(expected,found,stats);
UtilTldData.updateStatistics(expected,found,statsFoo);
System.out.println(imageNum+" "+found.p0.x);
imageNum++;
}
double averageOverlap = statsFoo.totalOverlap/statsFoo.truePositive;
if( formatLatex ) {
if( dataName.contains("_")) {
String a[] = dataName.split("_");
dataName = a[0] +"\\_"+ a[1];
}
out.println("\\hline");
out.printf("%s & %5.2f & %d & %d & %d & %d & %5.2f\\\\\n", dataName, UtilTldData.computeFMeasure(stats), stats.truePositives,
stats.trueNegatives, stats.falsePositives, stats.falseNegatives, averageOverlap);
} else {
out.printf("%s %5.3f %04d %04d %04d %04d %5.3f\n", dataName, UtilTldData.computeFMeasure(stats), stats.truePositives,
stats.trueNegatives, stats.falsePositives, stats.falseNegatives, averageOverlap);
}
System.out.println();
}
public static void process( String path , String library , File trackingOutputDir) throws IOException {
EvaluateResultsTldData evaluator = new EvaluateResultsTldData();
System.out.println("------------ "+library+" ------------------");
PrintStream out = new PrintStream(new File(path,"ACC_TldData_"+library+".txt"));
BoofRegressionConstants.printGenerator(out,ObjectTrackingRegression.class);
if( formatLatex ) {
out.println("\\begin{tabular}{|l|c|c|c|c|c|c|}");
out.println("\\hline");
out.println("\\multicolumn{7}{|c|}{TLD Data} \\\\");
out.println("\\hline");
out.println("Scenario & F & TP & TN & FP & FN & Overlap \\\\");
} else {
out.println("# F TP TN FP FN Overlap");
}
for( String dataset : GenerateDetectionsTldData.videos ){
String inputFile = new File(trackingOutputDir,library+"_"+dataset+".txt").getPath();
evaluator.evaluate(dataset, inputFile, out);
}
if( formatLatex ) {
out.println("\\hline");
out.println("\\end{tabular}");
}
}
public static void main(String[] args) throws IOException {
formatLatex = true;
// process("./","BoofCV-Comaniciu");
process("./","BoofCV-SparseFlow", new File("."));
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
af2f5de034d2629ca2cae99bec24b183a5472756
|
3f6059749e1f50bec9a39987cd38e7c6aa307bbb
|
/bd_storm/stormApi-myStorm/src/main/java/com/ty/study/mystorm/simple/MyStorm.java
|
d7e07357c35d56161b37aba8bdbd55231b71b719
|
[] |
no_license
|
tyyx1228/study_all
|
7cc7f011322d4b01d14241294034e8a3d72d4e31
|
f8f808805e52cc9bd47e6105cfb8c60b743d3245
|
refs/heads/master
| 2020-03-21T04:40:23.489780
| 2018-07-31T06:57:20
| 2018-07-31T06:57:20
| 138,121,691
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,551
|
java
|
package com.ty.study.mystorm.simple;
import java.util.HashMap;
import java.util.Map;
import java.util.Random;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
/**
* Describe: 请补充类描述
* Author: maoxiangyi
* Domain: www.itcast.cn
* Data: 2015/12/30.
*/
public class MyStorm {
private Random random = new Random();
//接受spout发出数据--队列1
private BlockingQueue sentenceQueue = new ArrayBlockingQueue(50000);
//接受bolt1发出的数据--队列2
private BlockingQueue wordQueue = new ArrayBlockingQueue(50000);
// 用来保存最后计算的结果key=单词,value=单词个数
Map<String, Integer> counters = new HashMap<String, Integer>();
//用来发送句子
public void nextTuple() {
String[] sentences = new String[]{"the cow jumped over the moon",
"an apple a day keeps the doctor away",
"four score and seven years ago",
"snow white and the seven dwarfs", "i am at two with nature"};
String sentence = sentences[random.nextInt(sentences.length)];
try {
sentenceQueue.put(sentence);
System.out.println("send sentence:" + sentence);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
//用来切割句子 bolt2-->execute--split
public void split(String sentence) {
System.out.println("resv sentence" + sentence);
String[] words = sentence.split(" ");
for (String word : words) {
word = word.trim();
if (!word.isEmpty()) {
word = word.toLowerCase();
wordQueue.add(word);
// Collector.emit()
System.out.println("split word:" + word);
}
}
}
//用来计算单词 bolt3-->execute
public void wordcounter(String word) {
if (!counters.containsKey(word)) {
counters.put(word, 1);
} else {
Integer c = counters.get(word) + 1;
counters.put(word, c);
}
System.out.println("print map:" + counters);
}
public static void main(String[] args) {
//线程池
ExecutorService executorService = Executors.newFixedThreadPool(10);
MyStorm myStorm = new MyStorm();
//发射句子到sentenceQuequ
executorService.submit(new MySpout(myStorm));
//接受一个句子,并将句子切割
executorService.submit(new MyBoltSplit(myStorm));
//接受一个单词,并进行据算
executorService.submit(new MyBoltWordCount(myStorm));
}
public BlockingQueue getSentenceQueue() {
return sentenceQueue;
}
public void setSentenceQueue(BlockingQueue sentenceQueue) {
this.sentenceQueue = sentenceQueue;
}
public BlockingQueue getWordQueue() {
return wordQueue;
}
public void setWordQueue(BlockingQueue wordQueue) {
this.wordQueue = wordQueue;
}
}
class MySpout extends Thread {
private MyStorm myStorm;
public MySpout(MyStorm myStorm) {
this.myStorm = myStorm;
}
@Override
public void run() {
//storm框架在循环调用spout的netxTuple方法
while (true) {
myStorm.nextTuple();
try {
this.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
}
}
class MyBoltWordCount extends Thread {
private MyStorm myStorm;
@Override
public void run() {
while (true) {
try {
String word = (String) myStorm.getWordQueue().take();
myStorm.wordcounter(word);
} catch (Exception e) {
System.out.println(e);
}
}
}
public MyBoltWordCount(MyStorm myStorm) {
this.myStorm = myStorm;
}
}
class MyBoltSplit extends Thread {
private MyStorm myStorm;
@Override
public void run() {
while (true) {
try {
String sentence = (String) myStorm.getSentenceQueue().take();
myStorm.split(sentence);
// SplitBolt.executet(tuple);
} catch (Exception e) {
System.out.println(e);
}
}
}
public MyBoltSplit(MyStorm myStorm) {
this.myStorm = myStorm;
}
}
|
[
"347616185@qq.com"
] |
347616185@qq.com
|
28d24d1fbdc4fcf8cd74d8c329c7ef229c047fd8
|
fb9506d58c1dc3410a60308066cecc28fdcd360e
|
/OntologyUpdate/src/com/hp/hpl/jena/sparql/function/library/strSubstring.java
|
3ed73d55c0589b578b2fa820a769d399a5f4f425
|
[
"Apache-2.0",
"BSD-3-Clause"
] |
permissive
|
utalo/ontologyUpdate
|
37cab2bf8c89f5d2c29d1036169363a9c901969e
|
96b8bcd880930a9d19363d2a80eac65496663b1b
|
refs/heads/master
| 2020-06-14T04:03:28.902754
| 2019-07-02T16:45:53
| 2019-07-02T16:45:53
| 194,888,725
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,068
|
java
|
/*
* (c) Copyright 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
* All rights reserved.
* [See end of file]
*/
package com.hp.hpl.jena.sparql.function.library;
import java.util.List;
import com.hp.hpl.jena.query.QueryBuildException;
import com.hp.hpl.jena.sparql.expr.ExprEvalException;
import com.hp.hpl.jena.sparql.expr.ExprList;
import com.hp.hpl.jena.sparql.expr.NodeValue;
import com.hp.hpl.jena.sparql.expr.nodevalue.XSDFuncOp;
import com.hp.hpl.jena.sparql.function.FunctionBase;
import com.hp.hpl.jena.sparql.util.Utils;
/** substring(string, start[, length]) - F&O style*/
public class strSubstring extends FunctionBase
{
public strSubstring() { super() ; }
//@Override
public void checkBuild(String uri, ExprList args)
{
if ( args.size() != 2 && args.size() != 3 )
throw new QueryBuildException("Function '"+Utils.className(this)+"' takes two or three arguments") ;
}
//@Override
public NodeValue exec(List args)
{
if ( args.size() > 3 )
throw new ExprEvalException("substring: Wrong number of arguments: "+
args.size()+" : [wanted 2 or 3]") ;
NodeValue v1 = (NodeValue)args.get(0) ;
NodeValue v2 = (NodeValue)args.get(1) ;
NodeValue v3 = null ;
if ( args.size() == 3 )
{
v3 = (NodeValue)args.get(2) ;
return XSDFuncOp.substring(v1, v2, v3) ;
}
return XSDFuncOp.substring(v1, v2) ;
}
}
/*
* (c) Copyright 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. The name of the author may not be used to endorse or promote products
* derived from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``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 AUTHOR 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.
*/
|
[
"uta.loesch@gmx.de"
] |
uta.loesch@gmx.de
|
537719623eb884cecce7665e038162c051ddca5b
|
9464654695d549b2a93099bf9d8b1d8f76352936
|
/src/main/java/network/wego/web/rest/EthAccountResource.java
|
ab6920ca3d2a35901291263fe10a5250140e3e8d
|
[] |
no_license
|
BulkSecurityGeneratorProject/wego
|
0eaf94389c53c02c828bed32282e1813e6d1a80d
|
cf20c968106228453dbe21a1e66bf7fa2ace85ab
|
refs/heads/master
| 2022-12-18T19:52:32.772049
| 2017-09-24T03:19:19
| 2017-09-24T03:19:19
| 296,538,883
| 0
| 0
| null | 2020-09-18T06:54:32
| 2020-09-18T06:54:31
| null |
UTF-8
|
Java
| false
| false
| 5,196
|
java
|
package network.wego.web.rest;
import com.codahale.metrics.annotation.Timed;
import network.wego.domain.EthAccount;
import network.wego.service.EthAccountService;
import network.wego.web.rest.util.HeaderUtil;
import network.wego.web.rest.util.PaginationUtil;
import io.swagger.annotations.ApiParam;
import io.github.jhipster.web.util.ResponseUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Optional;
/**
* REST controller for managing EthAccount.
*/
@RestController
@RequestMapping("/api")
public class EthAccountResource {
private final Logger log = LoggerFactory.getLogger(EthAccountResource.class);
private static final String ENTITY_NAME = "ethAccount";
private final EthAccountService ethAccountService;
public EthAccountResource(EthAccountService ethAccountService) {
this.ethAccountService = ethAccountService;
}
/**
* POST /eth-accounts : Create a new ethAccount.
*
* @param ethAccount the ethAccount to create
* @return the ResponseEntity with status 201 (Created) and with body the new ethAccount, or with status 400 (Bad Request) if the ethAccount has already an ID
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PostMapping("/eth-accounts")
@Timed
public ResponseEntity<EthAccount> createEthAccount(@RequestBody EthAccount ethAccount) throws URISyntaxException {
log.debug("REST request to save EthAccount : {}", ethAccount);
if (ethAccount.getId() != null) {
return ResponseEntity.badRequest().headers(HeaderUtil.createFailureAlert(ENTITY_NAME, "idexists", "A new ethAccount cannot already have an ID")).body(null);
}
EthAccount result = ethAccountService.save(ethAccount);
return ResponseEntity.created(new URI("/api/eth-accounts/" + result.getId()))
.headers(HeaderUtil.createEntityCreationAlert(ENTITY_NAME, result.getId().toString()))
.body(result);
}
/**
* PUT /eth-accounts : Updates an existing ethAccount.
*
* @param ethAccount the ethAccount to update
* @return the ResponseEntity with status 200 (OK) and with body the updated ethAccount,
* or with status 400 (Bad Request) if the ethAccount is not valid,
* or with status 500 (Internal Server Error) if the ethAccount couldn't be updated
* @throws URISyntaxException if the Location URI syntax is incorrect
*/
@PutMapping("/eth-accounts")
@Timed
public ResponseEntity<EthAccount> updateEthAccount(@RequestBody EthAccount ethAccount) throws URISyntaxException {
log.debug("REST request to update EthAccount : {}", ethAccount);
if (ethAccount.getId() == null) {
return createEthAccount(ethAccount);
}
EthAccount result = ethAccountService.save(ethAccount);
return ResponseEntity.ok()
.headers(HeaderUtil.createEntityUpdateAlert(ENTITY_NAME, ethAccount.getId().toString()))
.body(result);
}
/**
* GET /eth-accounts : get all the ethAccounts.
*
* @param pageable the pagination information
* @return the ResponseEntity with status 200 (OK) and the list of ethAccounts in body
*/
@GetMapping("/eth-accounts")
@Timed
public ResponseEntity<List<EthAccount>> getAllEthAccounts(@ApiParam Pageable pageable) {
log.debug("REST request to get a page of EthAccounts");
Page<EthAccount> page = ethAccountService.findAll(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/api/eth-accounts");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
/**
* GET /eth-accounts/:id : get the "id" ethAccount.
*
* @param id the id of the ethAccount to retrieve
* @return the ResponseEntity with status 200 (OK) and with body the ethAccount, or with status 404 (Not Found)
*/
@GetMapping("/eth-accounts/{id}")
@Timed
public ResponseEntity<EthAccount> getEthAccount(@PathVariable Long id) {
log.debug("REST request to get EthAccount : {}", id);
EthAccount ethAccount = ethAccountService.findOne(id);
return ResponseUtil.wrapOrNotFound(Optional.ofNullable(ethAccount));
}
/**
* DELETE /eth-accounts/:id : delete the "id" ethAccount.
*
* @param id the id of the ethAccount to delete
* @return the ResponseEntity with status 200 (OK)
*/
@DeleteMapping("/eth-accounts/{id}")
@Timed
public ResponseEntity<Void> deleteEthAccount(@PathVariable Long id) {
log.debug("REST request to delete EthAccount : {}", id);
ethAccountService.delete(id);
return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();
}
}
|
[
"email"
] |
email
|
7165582435132ef3a7791739383db5c3f5ceeb1a
|
377e5e05fb9c6c8ed90ad9980565c00605f2542b
|
/.gitignore/bin/ext-accelerator/acceleratorservices/src/de/hybris/platform/acceleratorservices/payment/strategies/impl/AbstractPaymentResponseInterpretationStrategy.java
|
d817a2ef035c1eafed1ddd871c32c302e3305312
|
[] |
no_license
|
automaticinfotech/HybrisProject
|
c22b13db7863e1e80ccc29774f43e5c32e41e519
|
fc12e2890c569e45b97974d2f20a8cbe92b6d97f
|
refs/heads/master
| 2021-07-20T18:41:04.727081
| 2017-10-30T13:24:11
| 2017-10-30T13:24:11
| 108,957,448
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,653
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 SAP SE or an SAP affiliate company.
* All rights reserved.
*
* This software is the confidential and proprietary information of SAP
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with SAP.
*/
package de.hybris.platform.acceleratorservices.payment.strategies.impl;
import de.hybris.platform.acceleratorservices.payment.strategies.PaymentResponseInterpretationStrategy;
import de.hybris.platform.acceleratorservices.payment.data.PaymentErrorField;
import java.util.Map;
/**
*
*/
public abstract class AbstractPaymentResponseInterpretationStrategy implements PaymentResponseInterpretationStrategy
{
protected void parseMissingFields(final Map<String, String> parameters, final Map<String, PaymentErrorField> errors)
{
for (final Map.Entry<String, String> paramEntry : parameters.entrySet())
{
if (paramEntry.getKey().startsWith("MissingField"))
{
getOrCreatePaymentErrorField(errors, paramEntry.getValue()).setMissing(true);
}
if (paramEntry.getKey().startsWith("InvalidField"))
{
getOrCreatePaymentErrorField(errors, paramEntry.getValue()).setInvalid(true);
}
}
}
protected PaymentErrorField getOrCreatePaymentErrorField(final Map<String, PaymentErrorField> errors, final String fieldName)
{
if (errors.containsKey(fieldName))
{
return errors.get(fieldName);
}
final PaymentErrorField result = new PaymentErrorField();
result.setName(fieldName);
errors.put(fieldName, result);
return result;
}
}
|
[
"santosh.kshirsagar@automaticinfotech.com"
] |
santosh.kshirsagar@automaticinfotech.com
|
8e54c47f6382f0e59d5d2a61d577adadfe5bafe9
|
183732491ccf0693b044163c3eb9a0e657fcce94
|
/phloc-commons/src/test/java/com/phloc/commons/aggregate/AggregatorUseAllTest.java
|
8c2c65b5063fd7b3f20dcda21eeedb85e534019f
|
[] |
no_license
|
phlocbg/phloc-commons
|
9b0d6699af33d67ee832c14e0594c97cef44c05d
|
6f86abe9c4bb9f9f94fe53fc5ba149356f88a154
|
refs/heads/master
| 2023-04-23T22:25:52.355734
| 2023-03-31T18:09:10
| 2023-03-31T18:09:10
| 41,243,446
| 0
| 0
| null | 2022-07-01T22:17:52
| 2015-08-23T09:19:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,849
|
java
|
/**
* Copyright (C) 2006-2015 phloc systems
* http://www.phloc.com
* office[at]phloc[dot]com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.phloc.commons.aggregate;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import java.util.List;
import org.junit.Test;
import com.phloc.commons.collections.ContainerHelper;
/**
* Test class for class {@link AggregatorUseAll}.
*
* @author Philip Helger
*/
public final class AggregatorUseAllTest
{
@Test
public void testAll ()
{
final AggregatorUseAll <String> a1 = new AggregatorUseAll <String> ();
final AggregatorUseAll <String> a2 = new AggregatorUseAll <String> ();
assertEquals (a1, a1);
assertEquals (a1, a2);
assertFalse (a1.equals (null));
assertFalse (a1.equals ("any other"));
assertEquals (a1.hashCode (), a1.hashCode ());
assertEquals (a1.hashCode (), a2.hashCode ());
assertFalse (a1.hashCode () == 0);
assertFalse (a1.hashCode () == "any other".hashCode ());
assertNotNull (a1.toString ());
assertFalse (a1.toString ().equals (a2.toString ()));
final List <String> l = ContainerHelper.newList ("a", null, "b", "", "c");
assertEquals (l, a1.aggregate (l));
assertEquals (l, a2.aggregate (l));
}
}
|
[
"bg@phloc.com"
] |
bg@phloc.com
|
1143f318fc749bc21939f31b3cb0128230b5a9bc
|
1790f987d310b7ddb897a4cbad5b812828efbf02
|
/app/src/main/java/cadillac/example/com/cadillac/view/MyGridView.java
|
e30edd3d9c7085074a0d29d03af54003b31fa94f
|
[] |
no_license
|
sunshaochi/Cadillacsecond4.0
|
d65f168e98ff72c8cfaf8b5e4d6073d839ddf161
|
d34d453ae7a6b8abbf903763c7a9804ae0e02e64
|
refs/heads/master
| 2020-03-17T16:59:24.568009
| 2018-05-17T06:45:32
| 2018-05-17T06:45:32
| 133,769,802
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 657
|
java
|
package cadillac.example.com.cadillac.view;
import android.content.Context;
import android.util.AttributeSet;
import android.widget.GridView;
/**
* Created by wangbin on 16/2/15.
*/
public class MyGridView extends GridView {
public MyGridView(Context context) {
super(context);
}
public MyGridView(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int expandSpec = MeasureSpec.makeMeasureSpec(Integer.MAX_VALUE >> 2, MeasureSpec.AT_MOST);
super.onMeasure(widthMeasureSpec, expandSpec);
}
}
|
[
"673132032@qq.com"
] |
673132032@qq.com
|
487475feb1668f025b66de1242b9ac17a832c658
|
faf825ce4412a786aba44c9ced5f673d446fcd3c
|
/1.7.10/src/main/java/stevekung/mods/moreplanets/moons/koentus/worldgen/village/ComponentKoentusVillageTorch.java
|
7cbe4fa980c639f6d945ac474c69910f865cb980
|
[] |
no_license
|
AugiteSoul/MorePlanets
|
87022c06706c3194bde6926039ee7f28acf4983f
|
dd1941d7d520cb372db41abee67d865bd5125f87
|
refs/heads/master
| 2021-08-15T12:23:01.538212
| 2017-11-16T16:00:34
| 2017-11-16T16:00:34
| 111,147,939
| 0
| 0
| null | 2017-11-17T20:32:07
| 2017-11-17T20:32:06
| null |
UTF-8
|
Java
| false
| false
| 3,906
|
java
|
/*******************************************************************************
* Copyright 2015 SteveKunG - More Planets Mod
*
* This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International Public License.
* To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
******************************************************************************/
package stevekung.mods.moreplanets.moons.koentus.worldgen.village;
import java.util.List;
import java.util.Random;
import net.minecraft.init.Blocks;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraft.world.gen.structure.StructureBoundingBox;
import net.minecraft.world.gen.structure.StructureComponent;
import stevekung.mods.moreplanets.moons.koentus.blocks.KoentusBlocks;
import stevekung.mods.moreplanets.planets.diona.blocks.DionaBlocks;
public class ComponentKoentusVillageTorch extends ComponentKoentusVillage
{
private int averageGroundLevel = -1;
public ComponentKoentusVillageTorch()
{
}
public ComponentKoentusVillageTorch(ComponentKoentusVillageStartPiece par1ComponentVillageStartPiece, int par2, Random par3Random, StructureBoundingBox par4StructureBoundingBox, int par5)
{
super(par1ComponentVillageStartPiece, par2);
this.coordBaseMode = par5;
this.boundingBox = par4StructureBoundingBox;
}
@Override
protected void func_143012_a(NBTTagCompound nbt)
{
super.func_143012_a(nbt);
nbt.setInteger("AvgGroundLevel", this.averageGroundLevel);
}
@Override
protected void func_143011_b(NBTTagCompound nbt)
{
super.func_143011_b(nbt);
this.averageGroundLevel = nbt.getInteger("AvgGroundLevel");
}
@SuppressWarnings("rawtypes")
public static StructureBoundingBox func_74904_a(ComponentKoentusVillageStartPiece par0ComponentVillageStartPiece, List par1List, Random par2Random, int par3, int par4, int par5, int par6)
{
final StructureBoundingBox var7 = StructureBoundingBox.getComponentToAddBoundingBox(par3, par4, par5, 0, 0, 0, 3, 4, 2, par6);
return StructureComponent.findIntersecting(par1List, var7) != null ? null : var7;
}
@Override
public boolean addComponentParts(World par1World, Random par2Random, StructureBoundingBox par3StructureBoundingBox)
{
if (this.averageGroundLevel < 0)
{
this.averageGroundLevel = this.getAverageGroundLevel(par1World, par3StructureBoundingBox);
if (this.averageGroundLevel < 0)
{
return true;
}
this.boundingBox.offset(0, this.averageGroundLevel - this.boundingBox.maxY + 4 - 1, 0);
}
this.fillWithBlocks(par1World, par3StructureBoundingBox, 0, 0, 0, 2, 3, 1, Blocks.air, Blocks.air, false);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.crystal_segment, 0, 1, 0, 0, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.crystal_segment, 0, 1, 1, 0, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.crystal_segment, 0, 1, 2, 0, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, DionaBlocks.diona_block, 13, 1, 3, 0, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.white_crystal_torch, 0, 0, 3, 0, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.white_crystal_torch, 0, 1, 3, 1, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.white_crystal_torch, 0, 2, 3, 0, par3StructureBoundingBox);
this.placeBlockAtCurrentPosition(par1World, KoentusBlocks.white_crystal_torch, 0, 1, 3, -1, par3StructureBoundingBox);
return true;
}
}
|
[
"mccommander_minecraft@hotmail.com"
] |
mccommander_minecraft@hotmail.com
|
2d5e1f24ea49d22b2e40ab0af87b5fdf45981520
|
d704ec43f7a5a296b91f5de0023def92f013dcda
|
/core/src/test/java/org/elasticsearch/action/index/IndexRequestTests.java
|
fa4d4270aefd8715172bef737cfeb862b808af5c
|
[
"Apache-2.0",
"LicenseRef-scancode-public-domain",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
diegopacheco/elassandra
|
e4ede3085416750d4a71bcdf1ae7b77786b6cc36
|
d7f85d1768d5ca8e7928d640609dd5a777b2523c
|
refs/heads/master
| 2021-01-12T08:24:05.935475
| 2016-12-15T06:53:09
| 2016-12-15T06:53:09
| 76,563,249
| 0
| 1
|
Apache-2.0
| 2023-03-20T11:53:08
| 2016-12-15T13:46:19
|
Java
|
UTF-8
|
Java
| false
| false
| 4,823
|
java
|
/*
* Licensed to Elasticsearch under one or more contributor
* license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright
* ownership. Elasticsearch 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.elasticsearch.action.index;
import org.elasticsearch.Version;
import org.elasticsearch.action.ActionRequestValidationException;
import org.elasticsearch.common.io.stream.BytesStreamOutput;
import org.elasticsearch.common.io.stream.StreamInput;
import org.elasticsearch.common.unit.TimeValue;
import org.elasticsearch.test.ESTestCase;
import org.elasticsearch.test.VersionUtils;
import org.junit.Test;
import static org.hamcrest.Matchers.*;
/**
*/
public class IndexRequestTests extends ESTestCase {
@Test
public void testIndexRequestOpTypeFromString() throws Exception {
String create = "create";
String index = "index";
String createUpper = "CREATE";
String indexUpper = "INDEX";
assertThat(IndexRequest.OpType.fromString(create), equalTo(IndexRequest.OpType.CREATE));
assertThat(IndexRequest.OpType.fromString(index), equalTo(IndexRequest.OpType.INDEX));
assertThat(IndexRequest.OpType.fromString(createUpper), equalTo(IndexRequest.OpType.CREATE));
assertThat(IndexRequest.OpType.fromString(indexUpper), equalTo(IndexRequest.OpType.INDEX));
}
@Test(expected= IllegalArgumentException.class)
public void testReadBogusString(){
String foobar = "foobar";
IndexRequest.OpType.fromString(foobar);
}
public void testSetTTLAsTimeValue() {
IndexRequest indexRequest = new IndexRequest();
TimeValue ttl = TimeValue.parseTimeValue(randomTimeValue(), null, "ttl");
indexRequest.ttl(ttl);
assertThat(indexRequest.ttl(), equalTo(ttl));
}
public void testSetTTLAsString() {
IndexRequest indexRequest = new IndexRequest();
String ttlAsString = randomTimeValue();
TimeValue ttl = TimeValue.parseTimeValue(ttlAsString, null, "ttl");
indexRequest.ttl(ttlAsString);
assertThat(indexRequest.ttl(), equalTo(ttl));
}
public void testSetTTLAsLong() {
IndexRequest indexRequest = new IndexRequest();
String ttlAsString = randomTimeValue();
TimeValue ttl = TimeValue.parseTimeValue(ttlAsString, null, "ttl");
indexRequest.ttl(ttl.millis());
assertThat(indexRequest.ttl(), equalTo(ttl));
}
public void testValidateTTL() {
IndexRequest indexRequest = new IndexRequest("index", "type");
if (randomBoolean()) {
indexRequest.ttl(randomIntBetween(Integer.MIN_VALUE, -1));
} else {
if (randomBoolean()) {
indexRequest.ttl(new TimeValue(randomIntBetween(Integer.MIN_VALUE, -1)));
} else {
indexRequest.ttl(randomIntBetween(Integer.MIN_VALUE, -1) + "ms");
}
}
ActionRequestValidationException validate = indexRequest.validate();
assertThat(validate, notNullValue());
assertThat(validate.getMessage(), containsString("ttl must not be negative"));
}
public void testTTLSerialization() throws Exception {
IndexRequest indexRequest = new IndexRequest("index", "type");
TimeValue expectedTTL = null;
if (randomBoolean()) {
String randomTimeValue = randomTimeValue();
expectedTTL = TimeValue.parseTimeValue(randomTimeValue, null, "ttl");
if (randomBoolean()) {
indexRequest.ttl(randomTimeValue);
} else {
if (randomBoolean()) {
indexRequest.ttl(expectedTTL);
} else {
indexRequest.ttl(expectedTTL.millis());
}
}
}
Version version = VersionUtils.randomVersion(random());
BytesStreamOutput out = new BytesStreamOutput();
out.setVersion(version);
indexRequest.writeTo(out);
StreamInput in = StreamInput.wrap(out.bytes());
in.setVersion(version);
IndexRequest newIndexRequest = new IndexRequest();
newIndexRequest.readFrom(in);
assertThat(newIndexRequest.ttl(), equalTo(expectedTTL));
}
}
|
[
"vroyer@vroyer.org"
] |
vroyer@vroyer.org
|
10dc5cc374f292fbdd60010e0e6404f4006513c3
|
0af8b92686a58eb0b64e319b22411432aca7a8f3
|
/single-large-project/src/test/java/org/gradle/test/performancenull_15/Testnull_1463.java
|
e25fb90a55de46d2ada23810838ba89649ae6906
|
[] |
no_license
|
gradle/performance-comparisons
|
b0d38db37c326e0ce271abebdb3c91769b860799
|
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
|
refs/heads/master
| 2023-08-14T19:24:39.164276
| 2022-11-24T05:18:33
| 2022-11-24T05:18:33
| 80,121,268
| 17
| 15
| null | 2022-09-30T08:04:35
| 2017-01-26T14:25:33
| null |
UTF-8
|
Java
| false
| false
| 304
|
java
|
package org.gradle.test.performancenull_15;
import static org.junit.Assert.*;
public class Testnull_1463 {
private final Productionnull_1463 production = new Productionnull_1463("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
}
|
[
"cedric.champeau@gmail.com"
] |
cedric.champeau@gmail.com
|
ce28cc18aefeaedf07e90232978edec7fdea5b45
|
13f937f75987ad2185c51ca4b1cd013d3e647e1e
|
/DMI/Dynamic Multi-dimension Identification/DMIVerification/src/main/java/com/pay/cloud/pay/escrow/mi/pangu/request/YbdjxxReq.java
|
d9ddb08f8230cfa8c145b970005b7226b7d03bd8
|
[] |
no_license
|
hwlsniper/DMI
|
30644374b35b2ed8bb297634311a71d0f1b0eb91
|
b6ac5f1eac635485bb4db14437aa3444e582be84
|
refs/heads/master
| 2020-03-19T16:44:33.828781
| 2018-05-22T05:38:52
| 2018-05-22T05:38:52
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 246
|
java
|
package com.pay.cloud.pay.escrow.mi.pangu.request;
public class YbdjxxReq extends BaseReq {
private String zymzh;
public String getZymzh() {
return zymzh;
}
public void setZymzh(String zymzh) {
this.zymzh = zymzh;
}
}
|
[
"33211781+thekeygithub@users.noreply.github.com"
] |
33211781+thekeygithub@users.noreply.github.com
|
86b4ea3340fd06fc8f779de749bf4301ba5408fe
|
d1696d362bdbb05fa4ea236f50e1b6fe66cf2922
|
/src/quiz06/MainClass.java
|
9bcf8b85238521f001b0af067846a7f698c3bf55
|
[] |
no_license
|
HaejinYoon/Quiz
|
532c2d414a3f0e0cf617b9af81e712efff858970
|
9d4fbc1e14dbee0e35be882fe4a57d8d1fb17ad9
|
refs/heads/master
| 2023-07-28T22:29:03.587614
| 2021-09-02T00:41:35
| 2021-09-02T00:41:35
| 401,640,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 484
|
java
|
package quiz06;
import java.util.Arrays;
public class MainClass {
public static void main(String[] args) {
int a[] = {1,2,3,4,5};
char b[] = {'가', '나', '다', '라', '마'};
String c[] = {"a","p","p","l","e"};
ArrayPrint ap = new ArrayPrint();
System.out.println("Arrays.toString: " + Arrays.toString(a));
System.out.println("ArrayPrint: "+ap.Print(a));
System.out.println("ArrayPrint: "+ap.Print(b));
System.out.println("ArrayPrint: "+ap.Print(c));
}
}
|
[
"hjyoomp@gmail.com"
] |
hjyoomp@gmail.com
|
0071d7c6620ee48de3f4fd7702ce1a18af8ea916
|
ba1dffd90fdef88917fa605ef063d9514df8efd3
|
/org.archstudio.xadl3.hints/src/org/archstudio/xadl3/hints_3_0/impl/HintImpl.java
|
3c67935241cc14e277ce945affff90717dc496d2
|
[] |
no_license
|
Kobe771/ArchStudio
|
045599782744f1f2013907a15c4e290c9a6cae6e
|
df4281954c15945fc3234aba7f7bd183a33027a2
|
refs/heads/master
| 2021-01-15T16:29:40.797719
| 2013-08-16T16:09:19
| 2013-08-16T16:09:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,338
|
java
|
/**
*/
package org.archstudio.xadl3.hints_3_0.impl;
import org.archstudio.xadl3.hints_3_0.Hint;
import org.archstudio.xadl3.hints_3_0.Hints_3_0Package;
import org.archstudio.xadl3.hints_3_0.Value;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc --> An implementation of the model object '<em><b>Hint</b></em>'. <!-- end-user-doc -->
* <p>
* The following features are implemented:
* <ul>
* <li>{@link org.archstudio.xadl3.hints_3_0.impl.HintImpl#getValue <em>Value</em>}</li>
* <li>{@link org.archstudio.xadl3.hints_3_0.impl.HintImpl#getHint <em>Hint</em>}</li>
* <li>{@link org.archstudio.xadl3.hints_3_0.impl.HintImpl#getName <em>Name</em>}</li>
* </ul>
* </p>
*
* @generated
*/
public class HintImpl extends MinimalEObjectImpl.Container implements Hint {
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' containment reference. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @see #getValue()
* @generated
* @ordered
*/
protected Value value;
/**
* The default value of the '{@link #getHint() <em>Hint</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @see #getHint()
* @generated
* @ordered
*/
protected static final String HINT_EDEFAULT = null;
/**
* The cached value of the '{@link #getHint() <em>Hint</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @see #getHint()
* @generated
* @ordered
*/
protected String hint = HINT_EDEFAULT;
/**
* The default value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @see #getName()
* @generated
* @ordered
*/
protected static final String NAME_EDEFAULT = null;
/**
* The cached value of the '{@link #getName() <em>Name</em>}' attribute. <!-- begin-user-doc --> <!-- end-user-doc
* -->
*
* @see #getName()
* @generated
* @ordered
*/
protected String name = NAME_EDEFAULT;
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
protected HintImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
protected EClass eStaticClass() {
return Hints_3_0Package.Literals.HINT;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public Value getValue() {
return value;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
public NotificationChain basicSetValue(Value newValue, NotificationChain msgs) {
Value oldValue = value;
value = newValue;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET,
Hints_3_0Package.HINT__VALUE, oldValue, newValue);
if (msgs == null) {
msgs = notification;
}
else {
msgs.add(notification);
}
}
return msgs;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setValue(Value newValue) {
if (newValue != value) {
NotificationChain msgs = null;
if (value != null) {
msgs = ((InternalEObject) value).eInverseRemove(this, EOPPOSITE_FEATURE_BASE
- Hints_3_0Package.HINT__VALUE, null, msgs);
}
if (newValue != null) {
msgs = ((InternalEObject) newValue).eInverseAdd(this, EOPPOSITE_FEATURE_BASE
- Hints_3_0Package.HINT__VALUE, null, msgs);
}
msgs = basicSetValue(newValue, msgs);
if (msgs != null) {
msgs.dispatch();
}
}
else if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, Hints_3_0Package.HINT__VALUE, newValue, newValue));
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getHint() {
return hint;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setHint(String newHint) {
String oldHint = hint;
hint = newHint;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, Hints_3_0Package.HINT__HINT, oldHint, hint));
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public String getName() {
return name;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void setName(String newName) {
String oldName = name;
name = newName;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, Hints_3_0Package.HINT__NAME, oldName, name));
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case Hints_3_0Package.HINT__VALUE:
return basicSetValue(null, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case Hints_3_0Package.HINT__VALUE:
return getValue();
case Hints_3_0Package.HINT__HINT:
return getHint();
case Hints_3_0Package.HINT__NAME:
return getName();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case Hints_3_0Package.HINT__VALUE:
setValue((Value) newValue);
return;
case Hints_3_0Package.HINT__HINT:
setHint((String) newValue);
return;
case Hints_3_0Package.HINT__NAME:
setName((String) newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case Hints_3_0Package.HINT__VALUE:
setValue((Value) null);
return;
case Hints_3_0Package.HINT__HINT:
setHint(HINT_EDEFAULT);
return;
case Hints_3_0Package.HINT__NAME:
setName(NAME_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case Hints_3_0Package.HINT__VALUE:
return value != null;
case Hints_3_0Package.HINT__HINT:
return HINT_EDEFAULT == null ? hint != null : !HINT_EDEFAULT.equals(hint);
case Hints_3_0Package.HINT__NAME:
return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) {
return super.toString();
}
StringBuffer result = new StringBuffer(super.toString());
result.append(" (hint: ");
result.append(hint);
result.append(", name: ");
result.append(name);
result.append(')');
return result.toString();
}
} //HintImpl
|
[
"sahendrickson@gmail.com"
] |
sahendrickson@gmail.com
|
1209767e1396b622265bba308f41e95682dd3d78
|
8af1164bac943cef64e41bae312223c3c0e38114
|
/results-java/antlr--antlr4/172851245e15143ebff604c206077962cc1727a4/after/SymbolSpace.java
|
e51ada8dc7734d320c8cecef3ff98d923774158b
|
[] |
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
| 542
|
java
|
package org.antlr.v4.tool;
/** Grammars, rules, and alternatives all have symbols visible to
* actions. To evaluate attr exprs, ask action for its space
* then ask space to resolve. If not found in one space we look
* at parent. Alt's parent is rule; rule's parent is grammar.
*/
public interface SymbolSpace {
public SymbolSpace getParent();
public boolean resolves(String x, ActionAST node);
public boolean resolves(String x, String y, ActionAST node);
public boolean resolveToRuleRef(String x, ActionAST node);
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
94a3fd51c94932a5c52e4d6de3016aa0b58b9913
|
cfaa50032bd5308d5e1cbd8ec34a290da6b325bb
|
/demo10-bbs-comment-module/server/src/main/java/com/chain/project/common/domain/Result.java
|
0c010b499c348401e066eb381be46f38061d4ff5
|
[
"MIT"
] |
permissive
|
ChainGit/funny-demos
|
7e9ca80ca1f75bdce8d777e45562f2a7e525a963
|
2bfb0a8eb74c3d9e862c613d70d2fb1a75837c7f
|
refs/heads/master
| 2021-09-13T02:49:42.034319
| 2018-04-24T03:25:55
| 2018-04-24T03:25:55
| 114,379,220
| 3
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,386
|
java
|
package com.chain.project.common.domain;
import com.chain.project.common.exception.ErrorDetail;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* 返回的结果
* <p>
* 链式编程法,方便级联赋值
*/
public class Result {
// private static final String DEFAULT_LANGUAGE="EN";
private static final String DEFAULT_LANGUAGE = "CN";
private static final String SUCCESS_EN = "success";
private static final String FAILURE_EN = "failure";
private static final String ERROR_EN = "error";
private static final String EMPTY_DATA_EN = "empty data";
private static final String SUCCESS_CN = "成功";
private static final String FAILURE_CN = "失败";
private static final String ERROR_CN = "错误";
private static final String EMPTY_DATA_CN = "数据为空";
public static String SUCCESS;
public static String FAILURE;
public static String ERROR;
public static String EMPTY_DATA;
static {
switch (DEFAULT_LANGUAGE) {
case "CN":
SUCCESS = SUCCESS_CN;
FAILURE = FAILURE_CN;
ERROR = ERROR_CN;
EMPTY_DATA = EMPTY_DATA_CN;
break;
default:
SUCCESS = SUCCESS_EN;
FAILURE = FAILURE_EN;
ERROR = ERROR_EN;
EMPTY_DATA = EMPTY_DATA_EN;
break;
}
}
private Logger logger = LoggerFactory.getLogger(Result.class);
private boolean success = false;
private String msg = "";
private Object data = null;
/**
* 对于spring的json转换结果是否需要加密的标识,默认为true即加密
*/
private Boolean encrypt = true;
private String[] ignore;
public Result() {
}
public Result(boolean success, String msg, String[] ignore) {
super();
this.success = success;
this.msg = msg;
this.ignore = ignore;
}
public static Result fail() {
Result result = new Result();
result.setSuccess(false);
result.setMsg(FAILURE);
return result;
}
public static Result fail(String[] ignore) {
Result result = fail();
result.setIgnore(ignore);
return result;
}
public static Result fail(String msg) {
Result result = fail();
result.setMsg(msg);
return result;
}
public static Result fail(String msg, String[] ignore) {
Result result = fail();
result.setMsg(msg);
result.setIgnore(ignore);
return result;
}
public static Result fail(Object data, String msg) {
Result result = fail();
result.setData(data);
result.setMsg(msg);
return result;
}
public static Result fail(Object data, String msg, String[] ignore) {
Result result = fail();
result.setData(data);
result.setMsg(msg);
result.setIgnore(ignore);
return result;
}
public static Result fail(ErrorDetail error) {
Result result = fail();
result.setData(error);
return result;
}
// 容易与fail(String msg)混淆
// public static Result fail(Object data) {
// Result result = fail();
// result.setData(data);
// return result;
// }
public static Result ok() {
Result result = new Result();
result.setSuccess(true);
result.setMsg(SUCCESS);
return result;
}
public static Result ok(String[] ignore) {
Result result = ok();
result.setIgnore(ignore);
return result;
}
public static Result ok(String msg) {
Result result = ok();
result.setMsg(msg);
return result;
}
public static Result ok(String msg, String[] ignore) {
Result result = ok();
result.setMsg(msg);
result.setIgnore(ignore);
return result;
}
public static Result ok(Object data, String msg) {
Result result = ok();
result.setData(data);
result.setMsg(msg);
return result;
}
public static Result ok(Object data, String msg, String[] ignore) {
Result result = ok();
result.setData(data);
result.setMsg(msg);
result.setIgnore(ignore);
return result;
}
// 容易与ok(String msg)混淆
// public static Result ok(Object data) {
// Result result = ok();
// result.setData(data);
// return result;
// }
public Object getData() {
return data;
}
public Result setData(Object data) {
this.data = data;
return this;
}
public String getMsg() {
return msg;
}
public Result setMsg(String msg) {
this.msg = msg;
return this;
}
public boolean isSuccess() {
return success;
}
public Result setSuccess(boolean success) {
this.success = success;
return this;
}
public String[] getIgnore() {
return ignore;
}
public Result setIgnore(String[] ignore) {
this.ignore = ignore;
return this;
}
public Boolean isEncrypt() {
return encrypt;
}
public Result setEncrypt(Boolean encrypt) {
this.encrypt = encrypt;
return this;
}
}
|
[
"chainz@foxmail.com"
] |
chainz@foxmail.com
|
a6706e00f731b5d1a6a6daee78016799a7d89d65
|
527e6c527236f7a1f49800667a9331dc52c7eefa
|
/src/main/java/it/csi/siac/siacbilapp/frontend/ui/util/threadlocal/DateFormatMapThreadLocal.java
|
906f98b21edcd9197fe8cd5f8a0e7e829ad39ebb
|
[] |
no_license
|
unica-open/siacbilapp
|
4953a8519a839c997798c3d39e220f61c0bce2b6
|
bf2bf7d5609fe32cee2409057b811e5a6fa47a76
|
refs/heads/master
| 2021-01-06T14:57:26.105285
| 2020-03-03T17:01:19
| 2020-03-03T17:01:19
| 241,366,496
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 522
|
java
|
/*
*SPDX-FileCopyrightText: Copyright 2020 | CSI Piemonte
*SPDX-License-Identifier: EUPL-1.2
*/
package it.csi.siac.siacbilapp.frontend.ui.util.threadlocal;
import java.text.DateFormat;
import java.util.HashMap;
import java.util.Map;
/**
* Thread local per una mappa di date format
* @author Marchino Alessandro
*
*/
public class DateFormatMapThreadLocal extends ThreadLocal<Map<String, DateFormat>> {
@Override
protected Map<String, DateFormat> initialValue() {
return new HashMap<String, DateFormat>();
}
}
|
[
"michele.perdono@csi.it"
] |
michele.perdono@csi.it
|
73dbcfdaf968f85980f30c111965308325a49c69
|
8fbcd08723eb42abd923bd80ab021858d16ce9c3
|
/src/com/gagan/springdemo/CustomerController.java
|
de071d5a45064c61e5b1405624a2dfa5fc14d6bc
|
[] |
no_license
|
Gagandeep39/spring-mvc-formtag-demo
|
9a904b9b209ed84514648d1eec234933a7799d1a
|
c29cea83d1f3abb8e1f58193b498cf720d6d3a20
|
refs/heads/master
| 2022-04-16T01:57:55.626726
| 2020-04-11T19:56:40
| 2020-04-11T19:56:40
| 254,943,238
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,567
|
java
|
/**
* Gagandeep
* 8:56:27 am
* 04-Apr-2020
*/
package com.gagan.springdemo;
import javax.validation.Valid;
import org.springframework.beans.propertyeditors.StringTrimmerEditor;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
@RequestMapping("customer")
public class CustomerController {
@RequestMapping("/showForm")
public String showForm(Model model) {
// this key name will be used to refer as modelAttribute name in jsp
// Can be any name but the same mst be specified in desnation jsp page
model.addAttribute("customer", new Customer());
return "customer-form";
}
@RequestMapping("/processForm")
public String validateForm(
@Valid
@ModelAttribute("customer") Customer customer,
BindingResult bindingResult
) {
System.out.println(customer);
System.out.println(bindingResult);
if(bindingResult.hasErrors())
return "customer-form";
return "customer-confirmation";
}
// Data returned will be mapped to customer implicitly as it is an object of custoer class
// Cannot be any name
@InitBinder
public void initBinder(WebDataBinder webDataBinder) {
StringTrimmerEditor editor = new StringTrimmerEditor(true);
webDataBinder.registerCustomEditor(String.class, editor);
}
}
|
[
"singh.gagandeep3911@gmail.com"
] |
singh.gagandeep3911@gmail.com
|
279bffda5896cfe4e9d13515c341aebfeca516b8
|
ba74038a0d3a24d93e6dbd1f166530f8cb1dd641
|
/teamclock/src/java/com/fivesticks/time/todo/ToDoFilterBuilder.java
|
6205d92bdee54db337b6f638e09542ee9bc745dc
|
[] |
no_license
|
ReidCarlberg/teamclock
|
63ce1058c62c0a00d63a429bac275c4888ada79a
|
4ac078610be86cf0902a73b1ba2a697f9dcf4e3c
|
refs/heads/master
| 2016-09-05T23:46:28.600606
| 2009-09-18T07:25:37
| 2009-09-18T07:25:37
| 32,190,901
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,368
|
java
|
/*
* Created on Feb 6, 2005 by REID
*/
package com.fivesticks.time.todo;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import com.fivesticks.time.customer.Customer;
import com.fivesticks.time.customer.Project;
import com.fivesticks.time.customer.ProjectServiceDelegateFactory;
import com.fivesticks.time.systemowner.SystemOwner;
/**
* @author REID
*/
public class ToDoFilterBuilder {
/*
* Nick 2005-10-4 Added tag. --- Tag can contain markup(---). This will be
* delt with at the bottem If the tag is null or empty we ignore it.
*
* 2006-06-28 removed tag.
*/
public ToDoCriteriaParameters buildIncompleteByAssignee(String username,
String priority, String unprioritized, Boolean inSequence) {
ToDoCriteriaParameters ret = new ToDoCriteriaParameters();
ret.setTodoComplete("false");
ret.setAssignedToUser(username);
// ret.setOrderBySequenceAsc(inSequence);
ret.setUnprioritized(new Boolean(unprioritized));
ret.setPriority(priority);
// ret.setTag(tag);
return ret;
}
public ToDoCriteriaParameters buildIncompleteByAssigneeWithTags(String username,
String priority, String unprioritized, Boolean inSequence) {
ToDoCriteriaParameters ret = new ToDoCriteriaParameters();
ret.setTodoComplete("false");
ret.setAssignedToUser(username);
// ret.setOrderBySequenceAsc(inSequence);
ret.setUnprioritized(new Boolean(unprioritized));
ret.setPriority(priority);
// ret.setTag(tag);
ret.setTagIsNotNull(Boolean.TRUE);
return ret;
}
public ToDoCriteriaParameters buildAllByCustomer(SystemOwner systemOwner,
Customer fstxCustomer) throws Exception {
Collection projects = ProjectServiceDelegateFactory.factory.build(systemOwner)
.getAllForCustomer(fstxCustomer);
Collection ids = new ArrayList();
for (Iterator iter = projects.iterator(); iter.hasNext();) {
Project element = (Project) iter.next();
ids.add(element.getId());
}
ToDoCriteriaParameters ret = new ToDoCriteriaParameters();
ret.setProjectIdIn(ids);
return ret;
}
}
|
[
"reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662"
] |
reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662
|
599cfa93baa2c1dcb46d5cfbbd9178c86f90b658
|
4e911a959fd973e5c6349cdcfa7b4449130b790b
|
/DataTypesAndVariables/src/TownInfo.java
|
ff1a4dde2313d7b0948db7187edd051f27afd51a
|
[] |
no_license
|
Polina-MD80/Fundamentals-SoftUni
|
5800af634a221f989c138ea6a1f2b90cc8d991e9
|
d592e2164f8de65f1e716d1f4506b0f834fa2ab1
|
refs/heads/master
| 2023-01-29T02:52:06.971046
| 2020-12-15T11:43:59
| 2020-12-15T11:43:59
| 317,486,663
| 0
| 2
| null | 2020-12-01T21:59:17
| 2020-12-01T09:16:40
|
Java
|
UTF-8
|
Java
| false
| false
| 502
|
java
|
import java.util.Scanner;
public
class TownInfo {
public static
void main (String[] args) {
Scanner scanner = new Scanner (System.in);
String town = scanner.nextLine ();
int population = Integer.parseInt (scanner.nextLine ());
short area = Short.parseShort (scanner.nextLine ());
String sentence = String.format
("Town %s has population of %d and area %d square km.",town,population,area);
System.out.println (sentence);
}
}
|
[
"poli.paskaleva@gmail.com"
] |
poli.paskaleva@gmail.com
|
8168734ad39f70929428f435309b856830e8b5af
|
4b5351f597b8e0a817b0ba70bebc98451dce6e8a
|
/Chapter2/src/ch09/StudentTest.java
|
f086f720a23ab2629d29a58239ad72efe592d90e
|
[] |
no_license
|
xjvmdutl/chapter02
|
414a6fcf12c573686bbf6f4e7a2d3ab796e4418e
|
22a0129831093d0a6f3c522bd2cdcfa0ef5be98e
|
refs/heads/master
| 2023-05-07T10:14:09.486236
| 2021-05-30T10:28:55
| 2021-05-30T10:28:55
| 367,574,123
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 424
|
java
|
package ch09;
public class StudentTest {
public static void main(String[] args) {
Student studentLee= new Student(100,"Lee");
studentLee.setKoreaSubject("국어", 100);
studentLee.setMathSubject("수학", 99);
Student studentKim= new Student(200,"Kim");
studentKim.setKoreaSubject("국어", 50);
studentKim.setMathSubject("수학", 65);
studentLee.showScoreInfo();
studentKim.showScoreInfo();
}
}
|
[
"widn45@naver.com"
] |
widn45@naver.com
|
ebb3bdadbc3493bd8ec3f8b58c9631968ad01f55
|
cec1602d23034a8f6372c019e5770773f893a5f0
|
/sources/com/github/mikephil/charting/components/MarkerImage.java
|
d607b6ab7ad0876d97699dc22a6858ac5eae5d85
|
[] |
no_license
|
sengeiou/zeroner_app
|
77fc7daa04c652a5cacaa0cb161edd338bfe2b52
|
e95ae1d7cfbab5ca1606ec9913416dadf7d29250
|
refs/heads/master
| 2022-03-31T06:55:26.896963
| 2020-01-24T09:20:37
| 2020-01-24T09:20:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,304
|
java
|
package com.github.mikephil.charting.components;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.os.Build.VERSION;
import com.github.mikephil.charting.charts.Chart;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.highlight.Highlight;
import com.github.mikephil.charting.utils.FSize;
import com.github.mikephil.charting.utils.MPPointF;
import java.lang.ref.WeakReference;
public class MarkerImage implements IMarker {
private Context mContext;
private Drawable mDrawable;
private Rect mDrawableBoundsCache = new Rect();
private MPPointF mOffset = new MPPointF();
private MPPointF mOffset2 = new MPPointF();
private FSize mSize = new FSize();
private WeakReference<Chart> mWeakChart;
public MarkerImage(Context context, int drawableResourceId) {
this.mContext = context;
if (VERSION.SDK_INT >= 21) {
this.mDrawable = this.mContext.getResources().getDrawable(drawableResourceId, null);
} else {
this.mDrawable = this.mContext.getResources().getDrawable(drawableResourceId);
}
}
public void setOffset(MPPointF offset) {
this.mOffset = offset;
if (this.mOffset == null) {
this.mOffset = new MPPointF();
}
}
public void setOffset(float offsetX, float offsetY) {
this.mOffset.x = offsetX;
this.mOffset.y = offsetY;
}
public MPPointF getOffset() {
return this.mOffset;
}
public void setSize(FSize size) {
this.mSize = size;
if (this.mSize == null) {
this.mSize = new FSize();
}
}
public FSize getSize() {
return this.mSize;
}
public void setChartView(Chart chart) {
this.mWeakChart = new WeakReference<>(chart);
}
public Chart getChartView() {
if (this.mWeakChart == null) {
return null;
}
return (Chart) this.mWeakChart.get();
}
public MPPointF getOffsetForDrawingAtPoint(float posX, float posY) {
MPPointF offset = getOffset();
this.mOffset2.x = offset.x;
this.mOffset2.y = offset.y;
Chart chart = getChartView();
float width = this.mSize.width;
float height = this.mSize.height;
if (width == 0.0f && this.mDrawable != null) {
width = (float) this.mDrawable.getIntrinsicWidth();
}
if (height == 0.0f && this.mDrawable != null) {
height = (float) this.mDrawable.getIntrinsicHeight();
}
if (this.mOffset2.x + posX < 0.0f) {
this.mOffset2.x = -posX;
} else if (chart != null && posX + width + this.mOffset2.x > ((float) chart.getWidth())) {
this.mOffset2.x = (((float) chart.getWidth()) - posX) - width;
}
if (this.mOffset2.y + posY < 0.0f) {
this.mOffset2.y = -posY;
} else if (chart != null && posY + height + this.mOffset2.y > ((float) chart.getHeight())) {
this.mOffset2.y = (((float) chart.getHeight()) - posY) - height;
}
return this.mOffset2;
}
public void refreshContent(Entry e, Highlight highlight) {
}
public void draw(Canvas canvas, float posX, float posY) {
if (this.mDrawable != null) {
MPPointF offset = getOffsetForDrawingAtPoint(posX, posY);
float width = this.mSize.width;
float height = this.mSize.height;
if (width == 0.0f) {
width = (float) this.mDrawable.getIntrinsicWidth();
}
if (height == 0.0f) {
height = (float) this.mDrawable.getIntrinsicHeight();
}
this.mDrawable.copyBounds(this.mDrawableBoundsCache);
this.mDrawable.setBounds(this.mDrawableBoundsCache.left, this.mDrawableBoundsCache.top, this.mDrawableBoundsCache.left + ((int) width), this.mDrawableBoundsCache.top + ((int) height));
int saveId = canvas.save();
canvas.translate(offset.x + posX, offset.y + posY);
this.mDrawable.draw(canvas);
canvas.restoreToCount(saveId);
this.mDrawable.setBounds(this.mDrawableBoundsCache);
}
}
}
|
[
"johan@sellstrom.me"
] |
johan@sellstrom.me
|
7903a16122dac4f7bcfd4ebe53beb0da254d96e6
|
1661886bc7ec4e827acdd0ed7e4287758a4ccc54
|
/srv_unip_pub/src/main/java/com/sa/unip/ionicapp/ywsp/ctrlhandler/OA_RZRYCKMobEditViewEditFormHandler.java
|
1b5880493c2b9cb359e5a941ec4afc6ee12adac4
|
[
"MIT"
] |
permissive
|
zhanght86/iBizSys_unip
|
baafb4a96920e8321ac6a1b68735bef376b50946
|
a22b15ebb069c6a7432e3401bdd500a3ca37250e
|
refs/heads/master
| 2020-04-25T21:20:23.830300
| 2018-01-26T06:08:28
| 2018-01-26T06:08:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,268
|
java
|
/**
* iBizSys 5.0 机器人生产代码(不要直接修改当前代码)
* http://www.ibizsys.net
*/
package com.sa.unip.ionicapp.ywsp.ctrlhandler;
import java.util.ArrayList;
import java.util.List;
import net.ibizsys.paas.util.StringHelper;
import net.ibizsys.paas.web.WebContext;
import net.ibizsys.paas.demodel.DEModelGlobal;
import net.ibizsys.paas.demodel.IDataEntityModel;
import net.ibizsys.paas.service.IService;
import net.ibizsys.paas.service.ServiceGlobal;
import com.sa.unip.ionicapp.srv.xxtz.ctrlmodel.OA_RZRYMobMainEditFormModel;
import com.sa.unip.srv.xxtz.demodel.OA_RZRYDEModel;
import com.sa.unip.srv.xxtz.service.OA_RZRYService;
import com.sa.unip.srv.xxtz.dao.OA_RZRYDAO;
import com.sa.unip.srv.xxtz.entity.OA_RZRY;
import net.ibizsys.paas.ctrlmodel.IEditFormModel;
import net.ibizsys.paas.entity.IEntity;
import net.ibizsys.paas.sysmodel.ISystemRuntime;
import net.ibizsys.paas.ctrlhandler.IFormItemHandler;
import net.ibizsys.paas.ctrlhandler.IFormItemUpdateHandler;
public class OA_RZRYCKMobEditViewEditFormHandler extends net.ibizsys.paas.ctrlhandler.EditFormHandlerBase {
protected OA_RZRYMobMainEditFormModel editformModel = null;
public OA_RZRYCKMobEditViewEditFormHandler() {
super();
}
@Override
protected void onInit() throws Exception {
editformModel = (OA_RZRYMobMainEditFormModel)this.getViewController().getCtrlModel("form");
super.onInit();
}
@Override
protected IEditFormModel getEditFormModel() {
return this.getRealEditFormModel();
}
protected OA_RZRYMobMainEditFormModel getRealEditFormModel() {
return this.editformModel ;
}
protected OA_RZRYService getRealService() {
return (OA_RZRYService)this.getService();
}
/**
* 准备部件操作数据访问能力
* @throws Exception
*/
@Override
protected void prepareDataAccessActions()throws Exception {
super.prepareDataAccessActions();
this.registerDataAccessAction("update","UPDATE");
this.registerDataAccessAction("loaddraftfrom","CREATE");
this.registerDataAccessAction("remove","DELETE");
this.registerDataAccessAction("load","READ");
this.registerDataAccessAction("loaddraft","CREATE");
this.registerDataAccessAction("create","CREATE");
}
/**
* 准备部件成员处理对象
* @throws Exception
*/
@Override
protected void prepareCtrlItemHandlers()throws Exception {
super.prepareCtrlItemHandlers();
ISystemRuntime iSystemRuntime = (ISystemRuntime)this.getSystemModel();
}
@Override
protected IEntity getEntity(Object objKeyValue)throws Exception {
OA_RZRY entity = new OA_RZRY();
entity.set(OA_RZRY.FIELD_OA_RZRYID,objKeyValue);
this.getRealService().executeAction(OA_RZRYService.ACTION_GET,entity);
return entity;
}
@Override
protected String getGetEntityAction() {
return OA_RZRYService.ACTION_GET;
}
@Override
protected IEntity updateEntity(IEntity iEntity)throws Exception {
this.getRealService().executeAction(OA_RZRYService.ACTION_UPDATE,iEntity);
return iEntity;
}
@Override
protected IEntity getDraftEntity()throws Exception {
OA_RZRY entity = new OA_RZRY();
fillDefaultValues(entity ,false);
this.getRealService().executeAction(OA_RZRYService.ACTION_GETDRAFT,entity);
return entity;
}
@Override
protected IEntity getDraftEntityFrom(Object objKeyValue)throws Exception {
OA_RZRY entity = new OA_RZRY();
entity.set(OA_RZRY.FIELD_OA_RZRYID,objKeyValue);
this.getRealService().executeAction(OA_RZRYService.ACTION_GETDRAFTFROM,entity);
return entity;
}
@Override
protected IEntity createEntity(IEntity iEntity)throws Exception {
this.getRealService().executeAction(OA_RZRYService.ACTION_CREATE,iEntity);
return iEntity;
}
@Override
protected void removeEntity(Object objKeyValue)throws Exception {
OA_RZRY entity = new OA_RZRY();
entity.set(OA_RZRY.FIELD_OA_RZRYID,objKeyValue);
this.getRealService().executeAction(OA_RZRYService.ACTION_REMOVE,entity);
}
}
|
[
"dev@ibizsys.net"
] |
dev@ibizsys.net
|
3ceaac70a7842aba40394737a7227974633daf20
|
9dbeb36d2378b4bd57ad0aa5395b6a6da3885d16
|
/src/com/rgks/launcher3/dragndrop/BaseItemDragListener.java
|
12581cd35bfdeb094a54cca473d3af6ca133f695
|
[
"Apache-2.0"
] |
permissive
|
luoran-gaolili/Launcher3-FolderIcon
|
3bb36c1c419673d2e708f39dc665c21a9e67e5fa
|
021f8b28bd72d14444bd04ff8d5da537e1792205
|
refs/heads/master
| 2020-03-08T08:23:52.962461
| 2018-04-04T07:02:49
| 2018-04-04T07:02:49
| 128,021,230
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,378
|
java
|
/*
* Copyright (C) 2017 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.rgks.launcher3.dragndrop;
import android.content.ClipDescription;
import android.content.Intent;
import android.graphics.Point;
import android.graphics.Rect;
import android.os.Handler;
import android.os.Looper;
import android.os.Parcel;
import android.os.SystemClock;
import android.util.Log;
import android.view.DragEvent;
import android.view.View;
import com.rgks.launcher3.DeleteDropTarget;
import com.rgks.launcher3.DragSource;
import com.rgks.launcher3.DropTarget;
import com.rgks.launcher3.Launcher;
import com.rgks.launcher3.R;
import com.rgks.launcher3.folder.Folder;
import com.rgks.launcher3.widget.PendingItemDragHelper;
import java.util.UUID;
/**
* {@link DragSource} for handling drop from a different window.
*/
public abstract class BaseItemDragListener implements
View.OnDragListener, DragSource, DragOptions.PreDragCondition {
private static final String TAG = "BaseItemDragListener";
private static final String MIME_TYPE_PREFIX = "com.rgks.launcher3.drag_and_drop/";
public static final String EXTRA_PIN_ITEM_DRAG_LISTENER = "pin_item_drag_listener";
// Position of preview relative to the touch location
private final Rect mPreviewRect;
private final int mPreviewBitmapWidth;
private final int mPreviewViewWidth;
// Randomly generated id used to verify the drag event.
private final String mId;
protected Launcher mLauncher;
private DragController mDragController;
private long mDragStartTime;
public BaseItemDragListener(Rect previewRect, int previewBitmapWidth, int previewViewWidth) {
mPreviewRect = previewRect;
mPreviewBitmapWidth = previewBitmapWidth;
mPreviewViewWidth = previewViewWidth;
mId = UUID.randomUUID().toString();
}
protected BaseItemDragListener(Parcel parcel) {
mPreviewRect = Rect.CREATOR.createFromParcel(parcel);
mPreviewBitmapWidth = parcel.readInt();
mPreviewViewWidth = parcel.readInt();
mId = parcel.readString();
}
protected void writeToParcel(Parcel parcel, int i) {
mPreviewRect.writeToParcel(parcel, i);
parcel.writeInt(mPreviewBitmapWidth);
parcel.writeInt(mPreviewViewWidth);
parcel.writeString(mId);
}
public String getMimeType() {
return MIME_TYPE_PREFIX + mId;
}
public void setLauncher(Launcher launcher) {
mLauncher = launcher;
mDragController = launcher.getDragController();
}
@Override
public boolean onDrag(View view, DragEvent event) {
if (mLauncher == null || mDragController == null) {
postCleanup();
return false;
}
if (event.getAction() == DragEvent.ACTION_DRAG_STARTED) {
if (onDragStart(event)) {
return true;
} else {
postCleanup();
return false;
}
}
return mDragController.onDragEvent(mDragStartTime, event);
}
protected boolean onDragStart(DragEvent event) {
ClipDescription desc = event.getClipDescription();
if (desc == null || !desc.hasMimeType(getMimeType())) {
Log.e(TAG, "Someone started a dragAndDrop before us.");
return false;
}
Point downPos = new Point((int) event.getX(), (int) event.getY());
DragOptions options = new DragOptions();
options.systemDndStartPoint = downPos;
options.preDragCondition = this;
// We use drag event position as the screenPos for the preview image. Since mPreviewRect
// already includes the view position relative to the drag event on the source window,
// and the absolute position (position relative to the screen) of drag event is same
// across windows, using drag position here give a good estimate for relative position
// to source window.
createDragHelper().startDrag(new Rect(mPreviewRect),
mPreviewBitmapWidth, mPreviewViewWidth, downPos, this, options);
mDragStartTime = SystemClock.uptimeMillis();
return true;
}
protected abstract PendingItemDragHelper createDragHelper();
@Override
public boolean shouldStartDrag(double distanceDragged) {
// Stay in pre-drag mode, if workspace is locked.
return !mLauncher.isWorkspaceLocked();
}
@Override
public void onPreDragStart(DropTarget.DragObject dragObject) {
// The predrag starts when the workspace is not yet loaded. In some cases we set
// the dragLayer alpha to 0 to have a nice fade-in animation. But that will prevent the
// dragView from being visible. Instead just skip the fade-in animation here.
mLauncher.getDragLayer().setAlpha(1);
dragObject.dragView.setColor(
mLauncher.getResources().getColor(R.color.delete_target_hover_tint));
}
@Override
public void onPreDragEnd(DropTarget.DragObject dragObject, boolean dragStarted) {
if (dragStarted) {
dragObject.dragView.setColor(0);
}
}
@Override
public boolean supportsAppInfoDropTarget() {
return false;
}
@Override
public boolean supportsDeleteDropTarget() {
return false;
}
@Override
public float getIntrinsicIconScaleFactor() {
return 1f;
}
@Override
public void onDropCompleted(View target, DropTarget.DragObject d, boolean isFlingToDelete,
boolean success) {
if (isFlingToDelete || !success || (target != mLauncher.getWorkspace() &&
!(target instanceof DeleteDropTarget) && !(target instanceof Folder))) {
// Exit spring loaded mode if we have not successfully dropped or have not handled the
// drop in Workspace
mLauncher.exitSpringLoadedDragModeDelayed(true,
Launcher.EXIT_SPRINGLOADED_MODE_SHORT_TIMEOUT, null);
}
if (!success) {
d.deferDragViewCleanupPostAnimation = false;
}
postCleanup();
}
private void postCleanup() {
if (mLauncher != null) {
// Remove any drag params from the launcher intent since the drag operation is complete.
Intent newIntent = new Intent(mLauncher.getIntent());
newIntent.removeExtra(EXTRA_PIN_ITEM_DRAG_LISTENER);
mLauncher.setIntent(newIntent);
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
removeListener();
}
});
}
public void removeListener() {
if (mLauncher != null) {
mLauncher.getDragLayer().setOnDragListener(null);
}
}
}
|
[
"1466746723@qq.com"
] |
1466746723@qq.com
|
c7ba6bc590c9110d9a97db7e0a7bc5b9c24a9bf9
|
76267ceb9ebf94c353215c98121439eab6e2f39f
|
/src/com/example/scrollview/Eb_Page4.java
|
5e073919a4d4fbfe91548fab96d7fe4b5e2e1dde
|
[
"MIT"
] |
permissive
|
MobileSeoul/2016seoul-70
|
75ba9d0052fab3458746820b38b3f092aef0bea7
|
aa347bf3109bf7624970607c278b95d0deca55fa
|
refs/heads/master
| 2021-07-04T09:18:31.194742
| 2017-09-27T03:48:06
| 2017-09-27T03:48:06
| 104,969,150
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,529
|
java
|
package com.example.scrollview;
import android.app.ActionBar;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;
public class Eb_Page4 extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.e_page4);
final ActionBar actionBar = getActionBar();
actionBar.setCustomView(R.layout.actionbar_custom_view_home);
actionBar.setDisplayShowTitleEnabled(false);
actionBar.setDisplayShowCustomEnabled(true);
actionBar.setDisplayUseLogoEnabled(false);
actionBar.setDisplayShowHomeEnabled(false);
TextView tv1 = (TextView) findViewById(R.id.textView1);
TextView tv2 = (TextView) findViewById(R.id.textView2);
TextView tv3 = (TextView) findViewById(R.id.textBtn);
tv1.setTypeface(Typeface.createFromAsset(getAssets(),
"cherryblossom.ttf"));
tv2.setTypeface(Typeface.createFromAsset(getAssets(),
"cherryblossom.ttf"));
tv3.setTypeface(Typeface.createFromAsset(getAssets(),
"cherryblossom.ttf"));
}
public void callBtn(View v) {
Intent myIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("tel:011-9014-1018"));
startActivity(myIntent);
}
public void textBtn(View v) {
Intent myIntent = new Intent(Intent.ACTION_VIEW,
Uri.parse("http://seongsu.sdfac.or.kr/"));
startActivity(myIntent);
}
}
|
[
"mobile@seoul.go.kr"
] |
mobile@seoul.go.kr
|
3ca28c3bd17ba15caa483c25aff687ec5a248a83
|
354ade2c776c767b51c0282ea3e8e3f6b1ed0157
|
/Bee/src/com/linkstec/bee/UI/spective/basic/logic/node/BLoopNode.java
|
e305e6bdacc655781803214bbb5f8c18412e1ae1
|
[] |
no_license
|
pan1394/SqlParser
|
b4286083b9a2b58fa922ab785cc83eab54c51c61
|
ec0d81ab35e2ce18ed9ad4238640e39a2c4d165c
|
refs/heads/master
| 2022-07-14T13:59:15.612534
| 2019-08-23T07:34:14
| 2019-08-23T07:34:14
| 178,761,865
| 0
| 0
| null | 2022-06-21T01:43:32
| 2019-04-01T01:12:23
|
Java
|
UTF-8
|
Java
| false
| false
| 1,747
|
java
|
package com.linkstec.bee.UI.spective.basic.logic.node;
import java.awt.Color;
import java.awt.FontMetrics;
import java.awt.Graphics;
import java.awt.Image;
import java.awt.Rectangle;
import com.linkstec.bee.UI.BeeConstants;
import com.linkstec.bee.core.codec.basic.BasicGenUtils;
import com.linkstec.bee.core.fw.basic.BLoopLogic;
import com.linkstec.bee.core.fw.basic.ILogicCell;
import com.linkstec.bee.core.fw.basic.ILoopCell;
import com.mxgraph.view.mxCellState;
public class BLoopNode extends BLogicNode implements ILoopCell {
/**
*
*/
private static final long serialVersionUID = -6600303244803236280L;
public BLoopNode(BLoopLogic logic) {
super(logic);
logic.getPath().setCell(this);
this.setStyle("strokeWidth=0.5;strokeColor=gray;fillColor=F0F8FF;");
this.getGeometry().setWidth(300);
}
public Object getValue() {
return null;
}
@Override
public boolean isValidDropTarget(Object[] cells) {
return true;
}
@Override
public boolean isDropTarget(BNode source) {
return true;
}
@Override
public void paint(Graphics g, mxCellState state, double scale) {
Rectangle rect = state.getRectangle();
g.setColor(Color.BLACK);
FontMetrics mericts = g.getFontMetrics();
int height = mericts.getHeight();
Image img = BeeConstants.P_LOOP_ICON.getImage();
g.drawImage(img, rect.x + height / 3, rect.y + 10, height, height, null);
g.drawString(logic.getDesc(), (int) (rect.x + height * 1.5), rect.y + mericts.getAscent() + 10);
height = (int) (height * 1.6);
g.drawLine(rect.x, rect.y + height, rect.x + rect.width, rect.y + height);
}
@Override
public ILogicCell getStart() {
return BasicGenUtils.getStart(this);
}
}
|
[
"pan1394@126.com"
] |
pan1394@126.com
|
3fefc6339d9c6dd5f48c69c17d69f79d09600ae5
|
5616c6d85cce13e6a2362865a09ea39dee00ac89
|
/com/sun/corba/se/spi/activation/LocatorPackage/ServerLocationHolder.java
|
7991b9593918b321daf016d61cb8a199278bcd79
|
[] |
no_license
|
Wyc92/jdkLearn
|
b44bf61b3036ae39a2eb1f2f8964c8175f5f22a0
|
3f532e3e9f5a4cfdf311546d33e1d31388e9d63f
|
refs/heads/master
| 2023-03-04T01:38:22.371356
| 2021-01-11T05:34:06
| 2021-01-11T05:34:06
| 337,035,082
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,210
|
java
|
package com.sun.corba.se.spi.activation.LocatorPackage;
/**
* com/sun/corba/se/spi/activation/LocatorPackage/ServerLocationHolder.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /scratch/jenkins/workspace/8-2-build-linux-amd64/jdk8u271/605/corba/src/share/classes/com/sun/corba/se/spi/activation/activation.idl
* Wednesday, September 16, 2020 5:02:54 PM GMT
*/
public final class ServerLocationHolder implements org.omg.CORBA.portable.Streamable
{
public com.sun.corba.se.spi.activation.LocatorPackage.ServerLocation value = null;
public ServerLocationHolder ()
{
}
public ServerLocationHolder (com.sun.corba.se.spi.activation.LocatorPackage.ServerLocation initialValue)
{
value = initialValue;
}
public void _read (org.omg.CORBA.portable.InputStream i)
{
value = com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationHelper.read (i);
}
public void _write (org.omg.CORBA.portable.OutputStream o)
{
com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationHelper.write (o, value);
}
public org.omg.CORBA.TypeCode _type ()
{
return com.sun.corba.se.spi.activation.LocatorPackage.ServerLocationHelper.type ();
}
}
|
[
"1092317465@qq.com"
] |
1092317465@qq.com
|
56095f9cb599f6966aa6d247b0d60ee388e2c571
|
97e53ae25f4b93cbb2c1027f981c0dd438f3002a
|
/mvc04/src/com/bit/controller/ListController.java
|
ce8464ebeaf7c022606d3bfad8f03dab52718550
|
[] |
no_license
|
bit01class/web2019
|
c059726f4d333a6ce165899447bb834a429eb2f6
|
f32ebfef002508c17a82d05613af899a0486b465
|
refs/heads/master
| 2020-05-25T03:34:25.672373
| 2019-06-28T03:10:33
| 2019-06-28T03:10:33
| 187,605,395
| 1
| 11
| null | 2019-06-16T13:31:44
| 2019-05-20T09:02:14
|
HTML
|
UTF-8
|
Java
| false
| false
| 856
|
java
|
package com.bit.controller;
import java.io.IOException;
import javax.naming.Context;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.bit.model.Guest02Dao;
public class ListController extends HttpServlet {
// /bbs/list.bit
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
System.out.println("listController...");
//model
Guest02Dao dao=new Guest02Dao();
req.setAttribute("list", dao.getList());
//view
RequestDispatcher rd = req.getRequestDispatcher("../list.jsp");
rd.forward(req, resp);
}
}
|
[
"bit01class@gmail.com"
] |
bit01class@gmail.com
|
2d6d53fc5302070743cd2bacf6001a226db54d80
|
e23af2c4d54c00ba76537551afe361567f394d63
|
/YiYuanSVN/app/src/main/java/com/iask/yiyuanlegou1/home/main/product/ProductClassifyListAdapter.java
|
0d8bfc29619a799dd24512a49b85428bc1ff2615
|
[] |
no_license
|
00zhengfu00/prj
|
fc0fda2be28a9507afcce753077f305363d66c5c
|
29fae890a3a6941ece6c0ab21e5a98b5395727fa
|
refs/heads/master
| 2020-04-20T10:07:31.986565
| 2018-03-23T08:27:01
| 2018-03-23T08:27:01
| 168,782,201
| 1
| 0
| null | 2019-02-02T01:37:13
| 2019-02-02T01:37:13
| null |
UTF-8
|
Java
| false
| false
| 2,017
|
java
|
package com.iask.yiyuanlegou1.home.main.product;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import com.iask.yiyuanlegou1.R;
import com.iask.yiyuanlegou1.log.AndroidLogger;
import com.iask.yiyuanlegou1.log.Logger;
import com.iask.yiyuanlegou1.network.respose.product.ProductClassifyListBean;
import com.makeramen.roundedimageview.RoundedImageView;
import java.util.List;
public class ProductClassifyListAdapter extends BaseAdapter {
private List<ProductClassifyListBean> data;
private Context context;
private Logger logger = AndroidLogger.getLogger(getClass().getSimpleName());
public ProductClassifyListAdapter(List<ProductClassifyListBean> data, Context context) {
this.data = data;
this.context = context;
}
@Override
public int getCount() {
return data.size();
}
@Override
public Object getItem(int position) {
return data.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
ViewHolder holder = null;
if (null == convertView) {
holder = new ViewHolder();
convertView = LayoutInflater.from(context).inflate(
R.layout.listview_product_classify_item, parent, false);
holder.tvTitle = (TextView) convertView.findViewById(R.id.tv_classify_name);
holder.ivHead = (RoundedImageView) convertView
.findViewById(R.id.iv_classify_icon);
convertView.setTag(holder);
} else {
holder = (ViewHolder) convertView.getTag();
}
ProductClassifyListBean bean = data.get(position);
return convertView;
}
class ViewHolder {
TextView tvTitle;
RoundedImageView ivHead;
}
}
|
[
"869981597@qq.com"
] |
869981597@qq.com
|
07c5288e7e8dc6d04e01196f81c2a9c81377d5e3
|
c48c06040273ff89cb8a107ac0ceda1f50affbaa
|
/src/de/eternity/support/tiled/TiledAnimation.java
|
982785507e913694e4b743f25e9c8019b4ead2a8
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
The127/Eternity
|
6b919457ef5555da8d125c3c21587714de47d0c3
|
98d66947d28fbf14404af7a20261636c41db23be
|
refs/heads/master
| 2020-12-25T15:28:39.584095
| 2016-09-07T09:54:26
| 2016-09-07T09:54:26
| 58,313,370
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 300
|
java
|
/**
* Copyright (c) 2016 Julian Sven Baehr
*
* See the file license.txt for copying permission.
*/
package de.eternity.support.tiled;
/**
* A wrapper class for tiled editor json export file support.
* @author Julian Sven Baehr
*/
public class TiledAnimation {
int duration;
int tileid;
}
|
[
"julian.baehr@googlemail.com"
] |
julian.baehr@googlemail.com
|
9ab81d521fbe466415e1625260b25b63372c6303
|
1f2693e57a8f6300993aee9caa847d576f009431
|
/testleo/myfaces-skins2/shared-impl/src/main/java/org/apache/myfaces/trinidadinternal/util/LRUCache.java
|
f758a44a167d800d2b21579930d066afd961a080
|
[
"LicenseRef-scancode-generic-cla",
"Apache-2.0"
] |
permissive
|
mr-sobol/myfaces-csi
|
ad80ed1daadab75d449ef9990a461d9c06d8c731
|
c142b20012dda9c096e1384a46915171bf504eb8
|
refs/heads/master
| 2021-01-10T06:11:13.345702
| 2009-01-05T09:46:26
| 2009-01-05T09:46:26
| 43,557,323
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,697
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
package org.apache.myfaces.trinidadinternal.util;
import java.util.LinkedHashMap;
import java.util.Map;
import org.apache.myfaces.trinidad.logging.SkinLogger;
/**
* A VERY simple LRU cache.
* <p>
*/
public class LRUCache<K, V> extends LinkedHashMap<K, V>
{
public LRUCache(int maxSize)
{
super(16, 0.75f, true /*prioritize by access order*/);
_maxSize = maxSize;
}
protected void removing(K key)
{
}
@Override
protected boolean removeEldestEntry(Map.Entry<K, V> eldest)
{
if (size() > _maxSize)
{
K key = eldest.getKey();
removing(key);
_LOG.finer("Discarding cached value for key {0}", key);
return true;
}
return false;
}
private final int _maxSize;
private static final SkinLogger _LOG = SkinLogger.createSkinLogger(LRUCache.class);
private static final long serialVersionUID = 1L;
}
|
[
"lu4242@ea1d4837-9632-0410-a0b9-156113df8070"
] |
lu4242@ea1d4837-9632-0410-a0b9-156113df8070
|
5526558934e22286d2b9f7a33fd78ba7780eeeac
|
d523206fce46708a6fe7b2fa90e81377ab7b6024
|
/android/support/v4/view/ViewCompatICS.java
|
5872c1299e7b81df3b957fd4c5c86fb898c5d9ed
|
[] |
no_license
|
BlitzModder/BlitzJava
|
0ee94cc069dc4b7371d1399ff5575471bdc88aac
|
6c6d71d2847dfd5f9f4f7c716cd820aeb7e45f2c
|
refs/heads/master
| 2021-06-11T15:04:05.571324
| 2017-02-04T16:04:55
| 2017-02-04T16:04:55
| 77,459,517
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,675
|
java
|
package android.support.v4.view;
import android.support.annotation.Nullable;
import android.view.View;
import android.view.View.AccessibilityDelegate;
import android.view.accessibility.AccessibilityEvent;
import android.view.accessibility.AccessibilityNodeInfo;
class ViewCompatICS
{
public static boolean canScrollHorizontally(View paramView, int paramInt)
{
return paramView.canScrollHorizontally(paramInt);
}
public static boolean canScrollVertically(View paramView, int paramInt)
{
return paramView.canScrollVertically(paramInt);
}
public static void onInitializeAccessibilityEvent(View paramView, AccessibilityEvent paramAccessibilityEvent)
{
paramView.onInitializeAccessibilityEvent(paramAccessibilityEvent);
}
public static void onInitializeAccessibilityNodeInfo(View paramView, Object paramObject)
{
paramView.onInitializeAccessibilityNodeInfo((AccessibilityNodeInfo)paramObject);
}
public static void onPopulateAccessibilityEvent(View paramView, AccessibilityEvent paramAccessibilityEvent)
{
paramView.onPopulateAccessibilityEvent(paramAccessibilityEvent);
}
public static void setAccessibilityDelegate(View paramView, @Nullable Object paramObject)
{
paramView.setAccessibilityDelegate((View.AccessibilityDelegate)paramObject);
}
public static void setFitsSystemWindows(View paramView, boolean paramBoolean)
{
paramView.setFitsSystemWindows(paramBoolean);
}
}
/* Location: /Users/subdiox/Downloads/dex2jar-2.0/net.wargaming.wot.blitz-dex2jar.jar!/android/support/v4/view/ViewCompatICS.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"subdiox@gmail.com"
] |
subdiox@gmail.com
|
9bf49429a61813279991dd2d8ebdeb9327887458
|
5015204edaf4185f366f0caf7fb5cb2789a23e78
|
/src/no/systema/tror/model/jsonjackson/codes/JsonTrorSignatureCodeRecord.java
|
3b17174659c60c21d9d88fbba6bacefa9e7ebdf9
|
[] |
no_license
|
SystemaAS/espedsgtror
|
ad7cfe69097c5afb78d38fc5e4d22f1a89cbc07b
|
063c7959e447c2a886be128472a6e04895db0b21
|
refs/heads/master
| 2021-06-07T03:14:15.765002
| 2021-05-09T16:20:22
| 2021-05-09T16:20:22
| 129,088,698
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 887
|
java
|
/**
*
*/
package no.systema.tror.model.jsonjackson.codes;
/**
* @author oscardelatorre
* @date Aug 21, 2017
*
*/
public class JsonTrorSignatureCodeRecord {
private String kosfsi = null;
public void setKosfsi(String value){ this.kosfsi = value;}
public String getKosfsi(){ return this.kosfsi; }
private String kosfst = null;
public void setKosfst(String value){ this.kosfst = value;}
public String getKosfst(){ return this.kosfst; }
private String kosfun = null;
public void setKosfun(String value){ this.kosfun = value;}
public String getKosfun(){ return this.kosfun; }
private String kosfnv = null;
public void setKosfnv(String value){ this.kosfnv = value;}
public String getKosfnv(){ return this.kosfnv; }
private String kosfxx = null;
public void setKosfxx(String value){ this.kosfxx = value;}
public String getKosfxx(){ return this.kosfxx; }
}
|
[
"oscar@systema.no"
] |
oscar@systema.no
|
3e0f5bf5f090fa136b1c53f2e1954ba340e13bc7
|
27f6a988ec638a1db9a59cf271f24bf8f77b9056
|
/Code-Hunt-data/users/User039/Sector2-Level1/attempt005-20140920-005951.java
|
895a2b29f22557ed0ba557d835e1ae44da961b97
|
[] |
no_license
|
liiabutler/Refazer
|
38eaf72ed876b4cfc5f39153956775f2123eed7f
|
991d15e05701a0a8582a41bf4cfb857bf6ef47c3
|
refs/heads/master
| 2021-07-22T06:44:46.453717
| 2017-10-31T01:43:42
| 2017-10-31T01:43:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 160
|
java
|
public class Program {
public static int Puzzle(int[] a) {
int sum=0;
for (int i=0;i<a.length;i++)
sum+=a[i];
return Math.round(sum/a.length);
}
}
|
[
"liiabiia@yahoo.com"
] |
liiabiia@yahoo.com
|
d3827942233b84221ec9a87dcb2bcb39fa28eebb
|
b2b67c94ea1e1a5df4148965e4b9d86f476de297
|
/repo/repo-common/src/main/java/com/evolveum/midpoint/repo/common/expression/ConfigurableValuePolicySupplier.java
|
af0f1f1c3567f9e9bfc9155bf061cd7ca30427a7
|
[
"EUPL-1.2",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-proprietary-license",
"CDDL-1.0",
"GPL-1.0-or-later",
"MPL-2.0",
"EPL-1.0",
"MIT",
"Apache-2.0"
] |
permissive
|
martin-lizner/midpoint
|
475af71fd307fcd8ec17faed0bd65f02ba13ce49
|
db111337b0b62dd0bd3de21839d7e316b4527bff
|
refs/heads/master
| 2021-12-04T17:29:58.082578
| 2021-07-23T05:00:53
| 2021-07-23T05:00:53
| 161,333,785
| 0
| 0
|
Apache-2.0
| 2018-12-11T12:55:59
| 2018-12-11T12:55:59
| null |
UTF-8
|
Java
| false
| false
| 1,013
|
java
|
/*
* Copyright (c) 2010-2017 Evolveum and contributors
*
* This work is dual-licensed under the Apache License 2.0
* and European Union Public License. See LICENSE file for details.
*/
package com.evolveum.midpoint.repo.common.expression;
import com.evolveum.midpoint.prism.ItemDefinition;
import com.evolveum.midpoint.prism.path.ItemPath;
/**
* Provides value policy when needed (e.g. in generate expression evaluator).
* Accepts setting of path and definition for the item for which the value policy will be obtained.
*/
public interface ConfigurableValuePolicySupplier extends ValuePolicySupplier {
/**
* Sets the definition of the item for which value policy will be provided.
*/
default void setOutputDefinition(ItemDefinition outputDefinition) { }
/**
* Sets the path of the item for which value policy will be provided.
* (Actually this seems to be quite unused.)
*/
@SuppressWarnings("unused")
default void setOutputPath(ItemPath outputPath) { }
}
|
[
"mederly@evolveum.com"
] |
mederly@evolveum.com
|
621ce504b993f80533dab186b47c4915a149a934
|
bd415d33cb62d583f673a2616aaed4db9e181862
|
/ProyectosCajaRegistrador/CRJPAVentassrc/src/main/java/com/grid/ventas/cr/crjpaventassrc/HisvcprPK.java
|
8213948144c25f790439bc016c43ee0e1d81b2a6
|
[
"Apache-2.0"
] |
permissive
|
macor003/desarrollosAndroid
|
05f88ae6da0cc812b343eb62d2520b2a5033e2d4
|
0b8ebe0da371c002e533898626712c1cd68ddfc6
|
refs/heads/master
| 2020-04-21T18:13:13.394252
| 2018-11-22T13:54:26
| 2018-11-22T13:54:26
| 169,761,275
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,332
|
java
|
/*
* To change this license header, choose License Headers in Project Properties. To change
* this template file, choose Tools | Templates and open the template in the editor.
*/
package com.grid.ventas.cr.crjpaventassrc;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
/**
*
* @author eve0017909
*/
@Embeddable
public class HisvcprPK implements Serializable {
@Basic(optional = false)
@Column(name = "TIENHCPR")
private String tienhcpr;
@Basic(optional = false)
@Column(name = "CDADHCPR")
private int cdadhcpr;
@Basic(optional = false)
@Column(name = "TIPDHCPR")
private String tipdhcpr;
@Basic(optional = false)
@Column(name = "NORCHCPR")
private int norchcpr;
@Basic(optional = false)
@Column(name = "FECPHCPR")
@Temporal(TemporalType.DATE)
private Date fecphcpr;
@Basic(optional = false)
@Column(name = "HORAHCPR")
@Temporal(TemporalType.TIME)
private Date horahcpr;
public HisvcprPK() {
}
public HisvcprPK(String tienhcpr, int cdadhcpr, String tipdhcpr, int norchcpr, Date fecphcpr, Date horahcpr) {
this.tienhcpr = tienhcpr;
this.cdadhcpr = cdadhcpr;
this.tipdhcpr = tipdhcpr;
this.norchcpr = norchcpr;
this.fecphcpr = fecphcpr;
this.horahcpr = horahcpr;
}
public String getTienhcpr() {
return tienhcpr;
}
public void setTienhcpr(String tienhcpr) {
this.tienhcpr = tienhcpr;
}
public int getCdadhcpr() {
return cdadhcpr;
}
public void setCdadhcpr(int cdadhcpr) {
this.cdadhcpr = cdadhcpr;
}
public String getTipdhcpr() {
return tipdhcpr;
}
public void setTipdhcpr(String tipdhcpr) {
this.tipdhcpr = tipdhcpr;
}
public int getNorchcpr() {
return norchcpr;
}
public void setNorchcpr(int norchcpr) {
this.norchcpr = norchcpr;
}
public Date getFecphcpr() {
return fecphcpr;
}
public void setFecphcpr(Date fecphcpr) {
this.fecphcpr = fecphcpr;
}
public Date getHorahcpr() {
return horahcpr;
}
public void setHorahcpr(Date horahcpr) {
this.horahcpr = horahcpr;
}
@Override
public int hashCode() {
int hash = 0;
hash += (tienhcpr != null ? tienhcpr.hashCode() : 0);
hash += (int) cdadhcpr;
hash += (tipdhcpr != null ? tipdhcpr.hashCode() : 0);
hash += (int) norchcpr;
hash += (fecphcpr != null ? fecphcpr.hashCode() : 0);
hash += (horahcpr != null ? horahcpr.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof HisvcprPK)) {
return false;
}
HisvcprPK other = (HisvcprPK) object;
if ((this.tienhcpr == null && other.tienhcpr != null)
|| (this.tienhcpr != null && !this.tienhcpr.equals(other.tienhcpr))) {
return false;
}
if (this.cdadhcpr != other.cdadhcpr) {
return false;
}
if ((this.tipdhcpr == null && other.tipdhcpr != null)
|| (this.tipdhcpr != null && !this.tipdhcpr.equals(other.tipdhcpr))) {
return false;
}
if (this.norchcpr != other.norchcpr) {
return false;
}
if ((this.fecphcpr == null && other.fecphcpr != null)
|| (this.fecphcpr != null && !this.fecphcpr.equals(other.fecphcpr))) {
return false;
}
if ((this.horahcpr == null && other.horahcpr != null)
|| (this.horahcpr != null && !this.horahcpr.equals(other.horahcpr))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.grid.ventas.cr.crjpaventassrc.HisvcprPK[ tienhcpr=" + tienhcpr + ", cdadhcpr=" + cdadhcpr
+ ", tipdhcpr=" + tipdhcpr + ", norchcpr=" + norchcpr + ", fecphcpr=" + fecphcpr + ", horahcpr="
+ horahcpr + " ]";
}
}
|
[
"mortega@intelix.biz"
] |
mortega@intelix.biz
|
31ded2510f7c20d4c7207873a96d5817dfecb0d5
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/3/3_a11aa46edfe0daccfa005895d1883ee09cb66918/MyRMTable/3_a11aa46edfe0daccfa005895d1883ee09cb66918_MyRMTable_t.java
|
b869e7a46dd6e3fef46fd7a7d560a0a456542848
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 6,367
|
java
|
// MyResearchManager - LICENSE AGPLv3 - 2012
// MyRMTable - LICENSE GPLv3
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.net.URL;
import java.net.URLConnection;
import java.util.Scanner;
public class MyRMTable {
static String hostname = "";
static String key = "";
static String filename = "";
static int monitorTime = -1; // time in seconds
static boolean automaticRowNumber = true;
static int row = 0;
public static String remote(String text)
{
String r = "";
try {
URL url = new URL(text);
URLConnection conn = url.openConnection();
// fake request coming from browser
conn.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13 (.NET CLR 3.5.30729)");
BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream(), "UTF-8"));
r = in.readLine();
in.close();
} catch (Exception e) {
//e.printStackTrace();
}
return r;
}
public static void main(String[] args) throws IOException, InterruptedException {
int parameters = args.length/2;
for(int i=0; i<parameters; i++)
if((2*i+1)<args.length)
{
if(args[2*i].equals("--host"))
hostname = args[2*i+1];
if(args[2*i].equals("--key"))
key = args[2*i+1];
if(args[2*i].equals("--file"))
filename = args[2*i+1];
if(args[2*i].equals("--monitor"))
monitorTime = Integer.parseInt(args[2*i+1]);
}
if(hostname.equals("") || key.equals("") || filename.equals(""))
{
System.out.println("Usage: MyRMTable [--monitor timelimit] --file table.txt --host http://website/myrm/ --key bb631e6b8f17c8c658f42706be558550");
System.out.println("found "+args.length+" arguments");
System.out.println("file=\""+filename+"\"");
System.out.println("key=\""+key+"\"");
System.out.println("host=\""+hostname+"\"");
System.out.println("monitor=\""+monitorTime+"\"");
System.out.println("Missing arguments... aborting!");
return;
}
BufferedWriter log = new BufferedWriter(new FileWriter("myrm-updater.log"));
int errors = 0;
System.out.println("=======================================================");
System.out.println("MyResearchManager Dynamic Table updater 0.1 - 2012 AGPL");
System.out.println("=======================================================");
log.write("MyResearchManager Dynamic Table updater 0.1 - 2012 AGPL\n");
System.out.println("hostname: " + hostname);
log.write("hostname: " + hostname+'\n');
String version = remote(hostname+"version.php");
System.out.println("version (remote): "+version);
log.write("version (remote): "+version+'\n');
System.out.println("key: " + key);
log.write("key: " + key+'\n');
System.out.println("filename: " + filename);
log.write("filename: " + filename+'\n');
System.out.println("-------------------------------------------------------");
System.out.println("automatic row numbering = " + automaticRowNumber);
log.write("automatic row numbering = " + automaticRowNumber+'\n');
System.out.println("=======================================================");
row = 1;
if(monitorTime<=0) // no monitor
{
errors += sendFile(log);
errors += lockTable(log);
}
if(monitorTime>0) // monitoring file (time in seconds)
while(true)
{
errors += sendFile(log);
System.out.println("Waiting for more "+monitorTime+" seconds...");
Thread.sleep(monitorTime*1000); // 'monitorTime' seconds
}
System.out.println("=======================");
System.out.println("Finished with "+errors+" errors!");
System.out.println("=======================");
log.write("Finished with "+errors+" errors!\n");
log.close();
}
public static int sendFile(BufferedWriter log) throws IOException {
int errors = 0;
Scanner table = new Scanner(new File(filename));
int drop_row = row-1;
while((drop_row>0) && (table.hasNextLine()))
{
System.out.println("ignoring line: "+table.nextLine());
drop_row--;
}
while(table.hasNextLine())
{
String line = table.nextLine();
Scanner scanLine = new Scanner(line);
String url = hostname+"dtableinsert.php?key="+key;
if(!automaticRowNumber)
url += "&row="+row;
int col = 1;
while(scanLine.hasNext())
{
String v = scanLine.next();
url = url + "&c"+col+"="+v;
col++;
}
for(int i=1; i<=3; i++)
{
System.out.print("row "+(automaticRowNumber?"auto":row)+" : ("+i+") Connecting to: "+url+" ...");
String r = remote(url);
if(r.equals("OK"))
{
System.out.println("OK!");
log.write("row "+(automaticRowNumber?"auto":row)+" : ("+i+") Connecting to: "+url+" ...OK!\n");
break;
}
else
{
System.out.println("failed! (with message: '"+r+"')");
log.write("row "+(automaticRowNumber?"auto":row)+" : ("+i+") Connecting to: "+url+" ...failed! (with message: '"+r+"')\n");
if(i==3)
{
errors++;
System.out.println("ERROR: FAILED 3 TIMES!");
log.write("ERROR: FAILED 3 TIMES!\n");
}
}
}
if(errors>0)
return errors; // do not jump to next line until the current one is done!
row++;
}
return errors;
}
public static int lockTable(BufferedWriter log) throws IOException {
int errors = 0;
String url = hostname+"dtablelock.php?key="+key;
for(int i=1; i<=3; i++)
{
System.out.print("lock: ("+i+") Connecting to: "+url+" ...");
String r = remote(url);
if(r.equals("OK"))
{
System.out.println("OK!");
log.write("lock: ("+i+") Connecting to: "+url+" ...OK!\n");
break;
}
else
{
System.out.println("failed! (with message: '"+r+"')");
log.write("lock: ("+i+") Connecting to: "+url+" ...failed! (with message: '"+r+"')\n");
if(i==3)
{
errors++;
System.out.println("ERROR: FAILED 3 TIMES!");
log.write("ERROR: FAILED 3 TIMES!\n");
}
}
}
return errors;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
07d381302a96d44ab98804708cb1de6301696991
|
42de90de47edff1b3d89d85d65e05b1adfe15689
|
/AAT/OBOPS/webaqua/src/main/java/de/aqua/web/utils/EncryptUtil.java
|
334dfbfc6b1f538cbc2c016b0d97aa1806fa628f
|
[] |
no_license
|
ahalester/IRM_CI_F2F_2018
|
f9549b519a75d589a352a87c4c509c2eb03d5a12
|
61921c2ce9f8e08abf1477eaa87c259c2255d1a2
|
refs/heads/master
| 2021-07-21T09:50:31.159107
| 2019-11-21T18:22:25
| 2019-11-21T18:22:25
| 223,235,940
| 0
| 0
| null | 2020-10-13T17:39:11
| 2019-11-21T18:14:49
|
Java
|
UTF-8
|
Java
| false
| false
| 3,008
|
java
|
package de.aqua.web.utils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sun.misc.BASE64Decoder;
import sun.misc.BASE64Encoder;
import javax.crypto.*;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.PBEParameterSpec;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
@SuppressWarnings("unused")
public class EncryptUtil {
private static Logger LOG = LoggerFactory.getLogger(EncryptUtil.class);
private static final char[] PASSWORD = "enfldsgbnlsngdlksdsgm".toCharArray();
private static final byte[] SALT = {(byte) 0xde, (byte) 0x33, (byte) 0x10, (byte) 0x12, (byte) 0xde, (byte) 0x33,
(byte) 0x10, (byte) 0x12,};
public static String encrypt(String property) {
Cipher pbeCipher;
String encoded = "";
try {
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(PASSWORD));
pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
pbeCipher.init(Cipher.ENCRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
encoded = base64Encode(pbeCipher.doFinal(property.getBytes("UTF-8")));
} catch (NoSuchAlgorithmException | InvalidKeySpecException
| NoSuchPaddingException | InvalidKeyException
| InvalidAlgorithmParameterException | UnsupportedEncodingException
| IllegalBlockSizeException | BadPaddingException e) {
LOG.error("Unhandled encryption exception!");
}
return encoded;
}
private static String base64Encode(byte[] bytes) {
return new BASE64Encoder().encode(bytes);
}
public static String decrypt(String property) {
String decoded = "";
try {
SecretKeyFactory keyFactory = SecretKeyFactory.getInstance("PBEWithMD5AndDES");
SecretKey key = keyFactory.generateSecret(new PBEKeySpec(PASSWORD));
Cipher pbeCipher = Cipher.getInstance("PBEWithMD5AndDES");
pbeCipher.init(Cipher.DECRYPT_MODE, key, new PBEParameterSpec(SALT, 20));
decoded = new String(pbeCipher.doFinal(base64Decode(property)), "UTF-8");
} catch (NoSuchAlgorithmException | InvalidKeySpecException | NoSuchPaddingException
| InvalidKeyException | InvalidAlgorithmParameterException
| IllegalBlockSizeException | BadPaddingException | IOException e) {
LOG.error("Unhandled decryption exception!");
}
return decoded;
}
private static byte[] base64Decode(String property) throws IOException {
return new BASE64Decoder().decodeBuffer(property);
}
public void encryptDecrypt() {
System.out.println(encrypt(""));
}
}
|
[
"ahale@anhydrite.cv.nrao.edu"
] |
ahale@anhydrite.cv.nrao.edu
|
28aa0be4c70af119585fbe267fcb7cb21f16e0fa
|
ba09be3c156d47dbb0298ff2d49b693a4d0ad07f
|
/src/com/sgepit/frame/sysman/hbm/SgccIniUnit.java
|
485812837121310bf4215ad411883fb0722ee346
|
[] |
no_license
|
newlethe/myProject
|
835d001abc86cd2e8be825da73d5421f8d31620f
|
ff2a30e9c58a751fa78ac7722e2936b3c9a02d20
|
refs/heads/master
| 2021-01-21T04:53:53.244374
| 2016-06-07T04:11:36
| 2016-06-07T04:19:11
| 47,071,697
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,653
|
java
|
package com.sgepit.frame.sysman.hbm;
/**
* SgccIniUnit entity.
*
* @author MyEclipse Persistence Tools
*/
public class SgccIniUnit implements java.io.Serializable {
// Fields
private String id;
private String unitid;
private String unitname;
private String upunit;
private String remark;
private String unitTypeId;
private Integer viewOrderNum;
private String appUrl;
private String deptTypeId;
private String curUnitFlag;
private String upCsUnitid;
private String downCsUnitid;
private String exchangeUnitid;
private String attachUnitid;
private Integer leaf;
private String startYear;
private String endYear;
private String state;
/*
* 是否股份公司
*/
private String jointStock;
// Constructors
/** default constructor */
public SgccIniUnit() {
}
/** minimal constructor */
public SgccIniUnit(String unitname) {
this.unitname = unitname;
}
/** full constructor */
public SgccIniUnit(String unitname, String upunit, String remark,
String unitTypeId, Integer viewOrderNum, String appUrl,
String deptTypeId, String curUnitFlag, String upCsUnitid,
String downCsUnitid, String exchangeUnitid, String attachUnitid) {
this.unitname = unitname;
this.upunit = upunit;
this.remark = remark;
this.unitTypeId = unitTypeId;
this.viewOrderNum = viewOrderNum;
this.appUrl = appUrl;
this.deptTypeId = deptTypeId;
this.curUnitFlag = curUnitFlag;
this.upCsUnitid = upCsUnitid;
this.downCsUnitid = downCsUnitid;
this.exchangeUnitid = exchangeUnitid;
this.attachUnitid = attachUnitid;
}
// Property accessors
public String getUnitid() {
return this.unitid;
}
public void setUnitid(String unitid) {
this.unitid = unitid;
}
public String getUnitname() {
return this.unitname;
}
public void setUnitname(String unitname) {
this.unitname = unitname;
}
public String getUpunit() {
return this.upunit;
}
public void setUpunit(String upunit) {
this.upunit = upunit;
}
public String getRemark() {
return this.remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getUnitTypeId() {
return this.unitTypeId;
}
public void setUnitTypeId(String unitTypeId) {
this.unitTypeId = unitTypeId;
}
public Integer getViewOrderNum() {
return this.viewOrderNum;
}
public void setViewOrderNum(Integer viewOrderNum) {
this.viewOrderNum = viewOrderNum;
}
public String getAppUrl() {
return this.appUrl;
}
public void setAppUrl(String appUrl) {
this.appUrl = appUrl;
}
public String getDeptTypeId() {
return this.deptTypeId;
}
public void setDeptTypeId(String deptTypeId) {
this.deptTypeId = deptTypeId;
}
public String getCurUnitFlag() {
return this.curUnitFlag;
}
public void setCurUnitFlag(String curUnitFlag) {
this.curUnitFlag = curUnitFlag;
}
public String getUpCsUnitid() {
return this.upCsUnitid;
}
public void setUpCsUnitid(String upCsUnitid) {
this.upCsUnitid = upCsUnitid;
}
public String getDownCsUnitid() {
return this.downCsUnitid;
}
public void setDownCsUnitid(String downCsUnitid) {
this.downCsUnitid = downCsUnitid;
}
public String getExchangeUnitid() {
return this.exchangeUnitid;
}
public void setExchangeUnitid(String exchangeUnitid) {
this.exchangeUnitid = exchangeUnitid;
}
public String getAttachUnitid() {
return this.attachUnitid;
}
public void setAttachUnitid(String attachUnitid) {
this.attachUnitid = attachUnitid;
}
public Integer getLeaf() {
return leaf;
}
public void setLeaf(Integer leaf) {
this.leaf = leaf;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
/**
* @return the startYear
*/
public String getStartYear() {
return startYear;
}
/**
* @param startYear the startYear to set
*/
public void setStartYear(String startYear) {
this.startYear = startYear;
}
/**
* @return the endYear
*/
public String getEndYear() {
return endYear;
}
/**
* @param endYear the endYear to set
*/
public void setEndYear(String endYear) {
this.endYear = endYear;
}
/**
* @return the state
*/
public String getState() {
return state;
}
/**
* @param state the state to set
*/
public void setState(String state) {
this.state = state;
}
public String getJointStock() {
return jointStock;
}
public void setJointStock(String jointStock) {
this.jointStock = jointStock;
}
}
|
[
"newlethe@qq.com"
] |
newlethe@qq.com
|
e41f17541ea0ab2385adb0211a8b503420493059
|
42e94aa09fe8d979f77449e08c67fa7175a3e6eb
|
/src/net/apf.java
|
0e42e0def20f9030a36fd95e1f35bc344053c67d
|
[
"Unlicense"
] |
permissive
|
HausemasterIssue/novoline
|
6fa90b89d5ebf6b7ae8f1d1404a80a057593ea91
|
9146c4add3aa518d9aa40560158e50be1b076cf0
|
refs/heads/main
| 2023-09-05T00:20:17.943347
| 2021-11-26T02:35:25
| 2021-11-26T02:35:25
| 432,312,803
| 1
| 0
|
Unlicense
| 2021-11-26T22:12:46
| 2021-11-26T22:12:45
| null |
UTF-8
|
Java
| false
| false
| 167
|
java
|
package net;
import net.lH;
import viaversion.viaversion.api.protocol.Protocol;
public class apf {
public static void a(Protocol var0) {
lH.a(var0);
}
}
|
[
"91408199+jeremypelletier@users.noreply.github.com"
] |
91408199+jeremypelletier@users.noreply.github.com
|
47b56a280907fca40f58fc15c1877253380c4281
|
f8e300aa04370f8836393455b8a10da6ca1837e5
|
/CounselorAPP/app/src/main/java/com/cesaas/android/counselor/order/ordermange/OrderMangerActivity.java
|
bb386c44f188d70b6dd1eb574c5169ee7254c95a
|
[] |
no_license
|
FlyBiao/CounselorAPP
|
d36f56ee1d5989c279167064442d9ea3e0c3a3ae
|
b724c1457d7544844ea8b4f6f5a9205021c33ae3
|
refs/heads/master
| 2020-03-22T21:30:14.904322
| 2018-07-12T12:21:37
| 2018-07-12T12:21:37
| 140,691,614
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,302
|
java
|
package com.cesaas.android.counselor.order.ordermange;
import java.util.ArrayList;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentStatePagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.view.ViewPager.OnPageChangeListener;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.cesaas.android.counselor.order.BasesActivity;
import com.cesaas.android.counselor.order.R;
import com.cesaas.android.counselor.order.fragment.ReceiveOrderFragment;
import com.cesaas.android.counselor.order.fragment.SendOrderFragment;
import com.cesaas.android.counselor.order.utils.Skip;
import com.nineoldandroids.view.ViewPropertyAnimator;
/**
* 订单管理页面
* @author FGB
*
*/
public class OrderMangerActivity extends BasesActivity{
private ArrayList<Fragment> fragments;
private ViewPager viewPager;
private LinearLayout ll_order_manger_back;
private TextView tab_receive_order;
private TextView tab_ongoing_order;
private TextView tv_order_manger_title;
private int line_width;
private View line;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_order_manger_layout);
initView();
initDatas();
}
public void initView(){
ll_order_manger_back=(LinearLayout) findViewById(R.id.ll_order_manger_back);
tab_receive_order=(TextView) findViewById(R.id.tab_receive_order);
tab_ongoing_order=(TextView) findViewById(R.id.tab_ongoing_order);
tv_order_manger_title=(TextView) findViewById(R.id.tv_order_manger_title);
viewPager=(ViewPager) findViewById(R.id.order_manger_viewPager);
line=findViewById(R.id.order_manger_line);
initTextViewAnimator();
//返回店铺页面
ll_order_manger_back.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Skip.mBack(mActivity);
}
});
}
/**
* 初始化TextView动画
*/
public void initTextViewAnimator(){
ViewPropertyAnimator.animate(tab_receive_order).scaleX(1.1f).setDuration(0);
ViewPropertyAnimator.animate(tab_receive_order).scaleY(1.1f).setDuration(0);
ViewPropertyAnimator.animate(tab_ongoing_order).scaleX(1.1f).setDuration(0);
ViewPropertyAnimator.animate(tab_ongoing_order).scaleY(1.1f).setDuration(0);
}
@SuppressWarnings("deprecation")
public void initDatas(){
fragments = new ArrayList<Fragment>();
fragments.add(new ReceiveOrderFragment());
fragments.add(new SendOrderFragment());
line_width = mActivity.getWindowManager().getDefaultDisplay().getWidth()
/ fragments.size();
line.getLayoutParams().width = line_width;
line.requestLayout();
viewPager.setAdapter(new FragmentStatePagerAdapter(
getSupportFragmentManager()) {
@Override
public int getCount() {
return fragments.size();
}
@Override
public Fragment getItem(int arg0) {
return fragments.get(arg0);
}
});
viewPager.setOnPageChangeListener(new OnPageChangeListener() {
@Override
public void onPageSelected(int arg0) {
changeState(arg0);
}
@Override
public void onPageScrolled(int arg0, float arg1, int arg2) {
float tagerX = arg0 * line_width + arg2 / fragments.size();
ViewPropertyAnimator.animate(line).translationX(tagerX)
.setDuration(0);
}
@Override
public void onPageScrollStateChanged(int arg0) {
}
});
tab_ongoing_order.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
viewPager.setCurrentItem(1);
//initData();
}
});
tab_receive_order.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View arg0) {
viewPager.setCurrentItem(0);
}
});
}
/* 根据传入的值来改变状态 */
private void changeState(int arg0) {
if (arg0 == 0) {//出去
tab_receive_order.setTextColor(getResources().getColor(R.color.color_title_bar));
tab_ongoing_order.setTextColor(getResources().getColor(R.color.black));
} else {//进来
tab_ongoing_order.setTextColor(getResources().getColor(R.color.color_title_bar));
tab_receive_order.setTextColor(getResources().getColor(R.color.black));
}
}
}
|
[
"fengguangbiao@163.com"
] |
fengguangbiao@163.com
|
6f29d2f1f124cc79ce89b36e56074a707e5faa76
|
d60e287543a95a20350c2caeabafbec517cabe75
|
/LACCPlus/Hadoop/1291_1.java
|
bc77df76adf3fddcaba47910af7c93ccf7c4edc9
|
[
"MIT"
] |
permissive
|
sgholamian/log-aware-clone-detection
|
242067df2db6fd056f8d917cfbc143615c558b2c
|
9993cb081c420413c231d1807bfff342c39aa69a
|
refs/heads/main
| 2023-07-20T09:32:19.757643
| 2021-08-27T15:02:50
| 2021-08-27T15:02:50
| 337,837,827
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 858
|
java
|
//,temp,TestMRJobClient.java,480,501,temp,TestMRJobClient.java,386,407
//,3
public class xxx {
protected void testSubmittedJobList(Configuration conf) throws Exception {
Job job = runJobInBackGround(conf);
ByteArrayOutputStream out = new ByteArrayOutputStream();
String line;
int counter = 0;
// only submitted
int exitCode =
runTool(conf, createJobClient(), new String[] { "-list" }, out);
assertEquals("Exit code", 0, exitCode);
BufferedReader br =
new BufferedReader(new InputStreamReader(new ByteArrayInputStream(
out.toByteArray())));
counter = 0;
while ((line = br.readLine()) != null) {
LOG.info("line = " + line);
if (line.contains(job.getJobID().toString())) {
counter++;
}
}
// all jobs submitted! no current
assertEquals(1, counter);
}
};
|
[
"sgholami@uwaterloo.ca"
] |
sgholami@uwaterloo.ca
|
d1bb89781a92a7107c156296cbfa380684350531
|
3c483e32e28e21721e9c007e725f827348d04850
|
/eclipse/src/duro/io/WritableTree.java
|
78068f667dac70d5fd6607721d019b87d3df1ced
|
[
"MIT",
"BSD-3-Clause"
] |
permissive
|
jakobehmsen/duro
|
755d27c5459a0a8ec2ff2536dec029f9adc7dc95
|
2ff58ff60f80246d6c63fa3598026a6e65eb61b6
|
refs/heads/master
| 2020-05-31T11:57:06.241633
| 2014-11-02T16:49:27
| 2014-11-02T16:49:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 134
|
java
|
package duro.io;
import java.io.IOException;
public interface WritableTree {
void writeTo(TreeWriter writer) throws IOException;
}
|
[
"jakobehmsen.github@gmail.com"
] |
jakobehmsen.github@gmail.com
|
12543d95636dbcb003f611909d18bc6e6f159d9c
|
6925337bc74e9f80527859651b9771cf33bc7d99
|
/input/code-fracz-645/sources/Class00000278Better.java
|
3a9fc0071d3a8e7888738688ffe97d46baab8805
|
[] |
no_license
|
fracz/code-quality-tensorflow
|
a58bb043aa0a6438d7813b0398d12c998d70ab49
|
50dac5459faf44f1b7fa8321692a8c7c44f0d23c
|
refs/heads/master
| 2018-11-14T15:28:03.838106
| 2018-09-07T11:09:28
| 2018-09-07T11:09:28
| 110,887,549
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 151
|
java
|
// original filename: 00026540.txt
// after
public class Class00000278Better {
@Override
public Selectable links() {
return xpath("//a/@href");
}
}
|
[
"fraczwojciech@gmail.com"
] |
fraczwojciech@gmail.com
|
3df175f6cc4dff4d76bfad1d19fd85b091b8f70d
|
0f77c5ec508d6e8b558f726980067d1058e350d7
|
/1_39_120042/com/ankamagames/wakfu/client/core/game/interactiveElement/itemizable/EquipableDummyItemizableInfo.java
|
b5a45237e0e121efdffaab1adcab6789bc1f84cc
|
[] |
no_license
|
nightwolf93/Wakxy-Core-Decompiled
|
aa589ebb92197bf48e6576026648956f93b8bf7f
|
2967f8f8fba89018f63b36e3978fc62908aa4d4d
|
refs/heads/master
| 2016-09-05T11:07:45.145928
| 2014-12-30T16:21:30
| 2014-12-30T16:21:30
| 29,250,176
| 5
| 5
| null | 2015-01-14T15:17:02
| 2015-01-14T15:17:02
| null |
UTF-8
|
Java
| false
| false
| 1,792
|
java
|
package com.ankamagames.wakfu.client.core.game.interactiveElement.itemizable;
import com.ankamagames.wakfu.client.core.game.interactiveElement.*;
import com.ankamagames.wakfu.common.game.personalSpace.impl.*;
import com.ankamagames.wakfu.common.game.personalSpace.room.content.*;
import com.ankamagames.baseImpl.common.clientAndServer.game.interactiveElement.*;
import java.util.*;
import com.ankamagames.wakfu.common.game.personalSpace.*;
import com.ankamagames.wakfu.common.rawData.*;
public final class EquipableDummyItemizableInfo extends BasicItemizableInfo<EquipableDummy>
{
public EquipableDummyItemizableInfo(final EquipableDummy linkedElement) {
super(linkedElement);
}
@Override
protected void unserializePersistantData(final AbstractRawPersistantData specificData) {
if (specificData.getVirtualId() == 2) {
final RawPersistantEquipableDummy data = (RawPersistantEquipableDummy)specificData;
final int previousPackId = ((EquipableDummy)this.m_linkedElement).getItemAttachedRefId();
((EquipableDummy)this.m_linkedElement).setItemAttachedRefId(data.content.setPackId);
((EquipableDummy)this.m_linkedElement).createItem(previousPackId, ((EquipableDummy)this.m_linkedElement).getItemAttachedRefId(), data.content.item);
}
}
@Override
public boolean canBeRepacked() {
return ((EquipableDummy)this.m_linkedElement).getItemAttachedRefId() == -1;
}
@Override
public GemType[] getAllowedInRooms() {
return new GemType[] { GemType.GEM_ID_DECORATION, GemType.GEM_ID_CRAFT, GemType.GEM_ID_MERCHANT, GemType.GEM_ID_RESOURCES };
}
@Override
public RoomContentType getContentType() {
return RoomContentType.DECORATION;
}
}
|
[
"totomakers@hotmail.fr"
] |
totomakers@hotmail.fr
|
5e14b6f0d0133796b342067e4e2c37b8911d8504
|
d15fdfeba13a53b4b1fe519d6d84f4b45a49b1c1
|
/matisse/src/main/java/com/zpj/matisse/ui/fragment/AlbumFragment.java
|
4f7d9c69bc9f3ae93203be2822b77953d09464ec
|
[] |
no_license
|
Topkill/sjly
|
f51b819b04a4d9e8f55c0ab35dafd01769e295ca
|
fa2130f1f702603eb47175a3f271d0b85bee9caf
|
refs/heads/master
| 2022-09-24T07:33:02.492699
| 2020-06-02T13:33:32
| 2020-06-02T13:33:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,811
|
java
|
/*
* Copyright 2017 Zhihu Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.zpj.matisse.ui.fragment;
import android.database.Cursor;
import android.graphics.Color;
import android.graphics.drawable.ColorDrawable;
import android.graphics.drawable.Drawable;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.widget.GridLayoutManager;
import android.view.View;
import com.felix.atoast.library.AToast;
import com.zpj.fragmentation.anim.DefaultHorizontalAnimator;
import com.zpj.fragmentation.anim.FragmentAnimator;
import com.zpj.matisse.R;
import com.zpj.matisse.event.UpdateTitleEvent;
import com.zpj.matisse.entity.Album;
import com.zpj.matisse.entity.SelectionSpec;
import com.zpj.matisse.model.AlbumManager;
import com.zpj.fragmentation.BaseFragment;
import com.zpj.matisse.ui.widget.MediaGridInset;
import com.zpj.matisse.utils.UIUtils;
import com.zpj.recyclerview.EasyRecyclerLayout;
import org.greenrobot.eventbus.EventBus;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
/**
* Main Activity to display albums and media content (images/videos) in each album
* and also support media selecting operations.
*/
public class AlbumFragment extends BaseFragment implements
AlbumManager.AlbumCallbacks {
private final AlbumManager mAlbumManager = new AlbumManager();
private final List<Album> albumList = new ArrayList<>();
private EasyRecyclerLayout<Album> recyclerLayout;
@Override
protected int getLayoutId() {
return R.layout.fragment_album;
}
@Override
protected void initView(View view, @Nullable Bundle savedInstanceState) {
Drawable placeholder = new ColorDrawable(getResources().getColor(R.color.zhihu_album_dropdown_thumbnail_placeholder));
recyclerLayout = view.findViewById(R.id.recycler_layout);
int spanCount;
SelectionSpec mSpec = SelectionSpec.getInstance();
if (mSpec.gridExpectedSize > 0) {
spanCount = UIUtils.spanCount(context, mSpec.gridExpectedSize);
} else {
spanCount = mSpec.spanCount;
}
// int spacing = getResources().getDimensionPixelSize(R.dimen.media_grid_spacing);
// recyclerLayout.getEasyRecyclerView().getRecyclerView().addItemDecoration(new MediaGridInset(spanCount, spacing, false));
recyclerLayout.setItemRes(R.layout.item_album_grid)
.setData(albumList)
.setEnableLoadMore(false)
.setEnableSwipeRefresh(false)
.setLayoutManager(new GridLayoutManager(getContext(), spanCount))
.onBindViewHolder((holder, list, position, payloads) -> {
Album album = list.get(position);
holder.getItemView().setBackgroundColor(Color.TRANSPARENT);
holder.getTextView(R.id.tv_title).setText(album.getDisplayName(context));
holder.getTextView(R.id.tv_count).setText("共" + album.getCount() + "张图片");
// do not need to load animated Gif
SelectionSpec.getInstance().imageEngine.loadThumbnail(
context,
getResources().getDimensionPixelSize(R.dimen.media_grid_size),
placeholder,
holder.getImageView(R.id.album_cover),
Uri.fromFile(new File(album.getCoverPath()))
);
})
.onItemClick((holder, view1, album) -> {
if (album.isAll() && SelectionSpec.getInstance().capture) {
album.addCaptureCount();
}
onAlbumSelected(album);
})
.build();
recyclerLayout.getEasyRecyclerView().getRecyclerView().setHasFixedSize(true);
recyclerLayout.showLoading();
postDelayed(mAlbumManager::loadAlbums, 250);
mAlbumManager.onCreate(_mActivity, this);
mAlbumManager.onRestoreInstanceState(savedInstanceState);
}
@Override
public FragmentAnimator onCreateFragmentAnimator() {
return new DefaultHorizontalAnimator();
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
mAlbumManager.onSaveInstanceState(outState);
}
@Override
public void onDestroy() {
super.onDestroy();
mAlbumManager.onDestroy();
}
@Override
public void onAlbumLoad(final Cursor cursor) {
cursor.moveToFirst();
do {
albumList.add(Album.valueOf(cursor));
} while (cursor.moveToNext());
recyclerLayout.notifyDataSetChanged();
}
@Override
public void onAlbumReset() {
albumList.clear();
recyclerLayout.notifyDataSetChanged();
}
private void onAlbumSelected(Album album) {
if (album.isAll() && album.isEmpty()) {
recyclerLayout.showEmpty();
} else {
recyclerLayout.showContent();
start(MediaSelectionFragment.newInstance(album));
EventBus.getDefault().post(new UpdateTitleEvent(album.getDisplayName(context)));
}
}
}
|
[
"37832345+Z-P-J@users.noreply.github.com"
] |
37832345+Z-P-J@users.noreply.github.com
|
d4e985e5b7c1291b961077b5528c6a8fb2806859
|
7d06746157e0bffb315d7836232cd1f41351831e
|
/src/main/java/com/github/pikasan/PikasanClassVisitor.java
|
a7ea4c4f245fe68485b832ed54df1bf22ebefa27
|
[] |
no_license
|
tamadalab/pikasan
|
9ef4a649f1c639f39f9ffa7a5dc6a69a8e2bee5a
|
35b4a0965d2b0433d17cb8dc6989f396385331db
|
refs/heads/master
| 2021-06-08T20:27:37.575564
| 2016-12-02T04:57:25
| 2016-12-02T04:57:25
| 75,349,839
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,157
|
java
|
package com.github.pikasan;
import java.util.ArrayList;
import java.util.List;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.Opcodes;
public class PikasanClassVisitor extends ClassVisitor {
private List<Result> list = new ArrayList<>();
private String className;
public PikasanClassVisitor() {
super(Opcodes.ASM5);
}
public Result[] results(){
return list.toArray(new Result[list.size()]);
}
@Override
public void visit(int version, int access, String name, String signature,
String superName, String[] interfaces){
this.className = name;
super.visit(version, access, name, signature, superName, interfaces);
}
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature,
String[] exceptions){
Result result = new Result(className + "##" + name + "," + desc);
list.add(result);
MethodVisitor visitor = super.visitMethod(access, name, desc, signature, exceptions);
return new PikasanMethodVisitor(result, visitor);
}
}
|
[
"tamada@users.noreply.github.com"
] |
tamada@users.noreply.github.com
|
519cc761b68c50305321f14a3edebaf9e07066cf
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/plugin/finder/live/plugin/r$$ExternalSyntheticLambda0.java
|
289dd5873136a7dd84462fcfba758b7bb35b2bbc
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 475
|
java
|
package com.tencent.mm.plugin.finder.live.plugin;
import android.view.View;
import android.view.View.OnClickListener;
public final class r$$ExternalSyntheticLambda0
implements View.OnClickListener
{
public final void onClick(View arg1) {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.plugin.finder.live.plugin.r..ExternalSyntheticLambda0
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
3e04dd547977832a1bfdcf9fec04c50d5345a35e
|
b2d0c62d3482e564f4a601ab44c082f26283cf87
|
/app/src/main/java/com/pvirtech/pzpolice/ui/activity/business/community/InvestigationWorkActivity.java
|
afa642593b6a0fb36ee340d23a43269123582cc0
|
[] |
no_license
|
moushao/PZPolice
|
95385516002fafe197e1e470a1ddb10a16025afa
|
7e7d5a94c6c1f5915eb7fe6134965f408ac5d18c
|
refs/heads/master
| 2021-05-12T13:41:51.713377
| 2018-01-10T09:26:46
| 2018-01-10T09:26:46
| 116,936,613
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,044
|
java
|
package com.pvirtech.pzpolice.ui.activity.business.community;
import android.os.Bundle;
import android.support.v7.widget.DividerItemDecoration;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
import android.support.v7.widget.Toolbar;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;
import com.dd.CircularProgressButton;
import com.example.sublimepickerlibrary.datepicker.SelectedDate;
import com.example.sublimepickerlibrary.recurrencepicker.SublimeRecurrencePicker;
import com.pvirtech.pzpolice.R;
import com.pvirtech.pzpolice.entity.InvestigationWorkPointEntity;
import com.pvirtech.pzpolice.third.SublimePickerFragment;
import com.pvirtech.pzpolice.third.SublimePickerFragmentUtils;
import com.pvirtech.pzpolice.ui.adapter.InvestigationWorkPointAdapter;
import com.pvirtech.pzpolice.ui.base.BaseActivity;
import com.pvirtech.pzpolice.utils.TimeUtil;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
/**
* 业务考核-基础工作-经侦工作
*/
public class InvestigationWorkActivity extends BaseActivity {
InvestigationWorkPointAdapter investigationWorkPointAdapter;
@BindView(R.id.tv_investigation_work_case_type)
TextView tvInvestigationWorkCaseType;
@BindView(R.id.tv_investigation_work_time)
TextView tvInvestigationWorkTime;
@BindView(R.id.ll_investigation_work_time)
LinearLayout llInvestigationWorkTime;
@BindView(R.id.tv_investigation_work_chose_name)
TextView tvInvestigationWorkChoseName;
@BindView(R.id.tv_investigation_work_place)
TextView tvInvestigationWorkPlace;
@BindView(R.id.tv_investigation_work_work_content)
TextView tvInvestigationWorkWorkContent;
@BindView(R.id.tv_investigation_work_montant)
TextView tvInvestigationWorkMontant;
@BindView(R.id.tv_investigation_work_police)
TextView tvInvestigationWorkPolice;
@BindView(R.id.tv_investigation_work_co_police)
TextView tvInvestigationWorkCoPolice;
@BindView(R.id.tv_investigation_work_auxiliary_police)
TextView tvInvestigationWorkAuxiliaryPolice;
@BindView(R.id.tv_investigation_work_point)
TextView tvInvestigationWorkPoint;
@BindView(R.id.investigation_work_recyclerview)
RecyclerView investigationWorkRecyclerview;
@BindView(R.id.tv_investigation_work_upload_attachments)
TextView tvInvestigationWorkUploadAttachments;
@BindView(R.id.bt_investigation_work_submit)
CircularProgressButton btInvestigationWorkSubmit;
@BindView(R.id.toolbar)
Toolbar toolbar;
private List<InvestigationWorkPointEntity> mDataLists = new ArrayList<>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_investigation_work);
ButterKnife.bind(this);
initTitleView("经侦工作");
mContext = InvestigationWorkActivity.this;
TAG = "InvestigationWorkActivity";
// initsSecurityCase();
initsInvestigationWorkPoint();
// securityCaseAdapter = new SecurityCaseAdapter(mContext, mDataLists1, new SecurityCaseAdapter.OnRecyclerViewListener() {
// @Override
// public void onItemClick(int position) {
// for (SecurityCaseEntity SecurityCaseEntity :
// mDataLists1) {
// SecurityCaseEntity.setChecked(false);
// }
// mDataLists1.get(position).setChecked(true);
// securityCaseAdapter.notifyDataSetChanged();
// }
//
// @Override
// public boolean onItemLongClick(int position) {
// return false;
// }
// });
// securityCaseRecycleview.setAdapter(securityCaseAdapter);
// securityCaseRecycleview.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL));
// securityCaseRecycleview.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.HORIZONTAL));
// securityCaseRecycleview.setLayoutManager(new GridLayoutManager(mContext, 3));
investigationWorkPointAdapter = new InvestigationWorkPointAdapter(mContext, mDataLists, new InvestigationWorkPointAdapter.OnRecyclerViewListener() {
@Override
public void onItemClick(int position) {
for (InvestigationWorkPointEntity InvestigationWorkPointEntity :
mDataLists) {
InvestigationWorkPointEntity.setChecked(false);
}
mDataLists.get(position).setChecked(true);
investigationWorkPointAdapter.notifyDataSetChanged();
}
@Override
public boolean onItemLongClick(int position) {
return false;
}
});
investigationWorkRecyclerview.setAdapter(investigationWorkPointAdapter);
investigationWorkRecyclerview.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.VERTICAL));
investigationWorkRecyclerview.addItemDecoration(new DividerItemDecoration(mContext, DividerItemDecoration.HORIZONTAL));
investigationWorkRecyclerview.setLayoutManager(new GridLayoutManager(mContext, 1));
tvInvestigationWorkTime.setText(TimeUtil.getYMD());
}
SublimePickerFragmentUtils sublimePickerFragmentUtils = new SublimePickerFragmentUtils();
@OnClick({R.id.ll_investigation_work_time})
public void onViewClicked(View view) {
switch (view.getId()) {
case R.id.ll_investigation_work_time:
sublimePickerFragmentUtils.show(false, true, false, getSupportFragmentManager(), new SublimePickerFragment.Callback() {
@Override
public void onCancelled() {
System.out.println("");
}
@Override
public void onDateTimeRecurrenceSet(SelectedDate selectedDate, int hourOfDay, int minute, SublimeRecurrencePicker
.RecurrenceOption recurrenceOption, String recurrenceRule) {
Date date = selectedDate.getFirstDate().getTime();
String startTime = TimeUtil.getDateToYMD(date);
tvInvestigationWorkTime.setText(startTime);
}
});
break;
}
}
private void initsInvestigationWorkPoint() {
InvestigationWorkPointEntity police1 = new InvestigationWorkPointEntity("李警官", "10分");
mDataLists.add(police1);
InvestigationWorkPointEntity police2 = new InvestigationWorkPointEntity("王警官", "10分");
mDataLists.add(police2);
InvestigationWorkPointEntity police3 = new InvestigationWorkPointEntity("张警官", "10分");
mDataLists.add(police3);
}
}
|
[
"moushao1990@gmail.com"
] |
moushao1990@gmail.com
|
c7f187c0648f7789315f4558e89b2f9ebc5a0c3c
|
54d8452243ea6c9a6dc951ae8b41840f5dac350c
|
/jOOQ/src/main/java/org/jooq/ConstraintForeignKeyReferencesStep13.java
|
37296e53bfc7b29395d21aa092e531578178cfed
|
[
"Apache-2.0"
] |
permissive
|
zhaiyongding/jOOQ
|
61eb14b9945a168f8540c2aacb384764ee59f289
|
c83a779484bb1556c3daa20b153439f79b494d6f
|
refs/heads/master
| 2021-01-23T01:17:44.485788
| 2017-03-22T15:40:36
| 2017-03-22T15:40:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,142
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* Other licenses:
* -----------------------------------------------------------------------------
* Commercial licenses for this work are available. These replace the above
* ASL 2.0 and offer limited warranties, support, maintenance, and commercial
* database integrations.
*
* For more information, please visit: http://www.jooq.org/licenses
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package org.jooq;
import javax.annotation.Generated;
/**
* The step in the {@link Constraint} construction DSL API that allows for
* matching a <code>FOREIGN KEY</code> clause with a <code>REFERENCES</code>
* clause.
*
* @author Lukas Eder
*/
@Generated("This class was generated using jOOQ-tools")
public interface ConstraintForeignKeyReferencesStep13<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13> {
/**
* Add a <code>REFERENCES</code> clause to the <code>CONSTRAINT</code>.
*/
@Support
ConstraintForeignKeyOnStep references(String table, String field1, String field2, String field3, String field4, String field5, String field6, String field7, String field8, String field9, String field10, String field11, String field12, String field13);
/**
* Add a <code>REFERENCES</code> clause to the <code>CONSTRAINT</code>.
*/
@Support
ConstraintForeignKeyOnStep references(Table<?> table, Field<T1> field1, Field<T2> field2, Field<T3> field3, Field<T4> field4, Field<T5> field5, Field<T6> field6, Field<T7> field7, Field<T8> field8, Field<T9> field9, Field<T10> field10, Field<T11> field11, Field<T12> field12, Field<T13> field13);
}
|
[
"lukas.eder@gmail.com"
] |
lukas.eder@gmail.com
|
94fa71abd4678a9498cc618665a526ff5f94760c
|
589db07be2a39b1e51e8e8a0a2cd15645c97f3fe
|
/cache-redis/src/main/java/cn/alan/service/DeptService.java
|
16b693f466de566bf84bd6e52ff245c0501f5c8d
|
[] |
no_license
|
ronggh/SprintBootDemo
|
285798fa8125edb7dda9151b34612524746ed463
|
a32e7f7fad2ec557a2340a746327ebac4647e936
|
refs/heads/master
| 2023-02-28T00:32:08.307360
| 2021-01-28T09:05:34
| 2021-01-28T09:05:34
| 282,127,402
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,918
|
java
|
package cn.alan.service;
import cn.alan.entity.Department;
import cn.alan.mapper.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.Cache;
import org.springframework.cache.annotation.CacheConfig;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.data.redis.cache.RedisCacheManager;
import org.springframework.stereotype.Service;
@Service
@CacheConfig(cacheNames = "dept")
public class DeptService {
@Autowired
private DepartmentMapper departmentMapper;
@Autowired
private RedisCacheManager redisCacheManager;
/**
* 缓存的数据能存入redis;
* 第二次从缓存中查询就不能反序列化回来;
* 可以通过注解方式或代码方式
*
* @param id
* @return
*/
@Cacheable(keyGenerator = "keyGenerator")
public Department getDeptById(Integer id) {
System.out.println("查询部门" + id);
Department department = departmentMapper.getDeptById(id);
return department;
}
/**
* 代码方式
*
* @param id
* @return
*/
// 使用缓存管理器得到缓存,进行api调用
public Department getDeptById2(Integer id) {
System.out.println("查询部门" + id);
Department department = null ;
// 先从缓存中查,
Cache deptCache = redisCacheManager.getCache("dept");
String key = "dept:"+id;
department = deptCache.get(key,Department.class);
System.out.println(department);
// 如果没有,则查数据库,并将结果放到缓存中
if (null == department) {
System.out.println("没有命中缓存...从数据库中查询数据...");
department = departmentMapper.getDeptById(id);
deptCache.put(key, department);
}
return department;
}
}
|
[
"ronggh@sina.cn"
] |
ronggh@sina.cn
|
c8055bdcbaee0c597ae98666ff7789848895445e
|
eb70c1b311c82a282fd744eb89b983a26a939ea0
|
/src/main/java/com/arjjs/ccm/tool/EntityTools.java
|
98f57b986d3ac2ae7542cbe7ae97dafe24c05062
|
[] |
no_license
|
arjccm/arjccm_std
|
dbf0e11fbc536cc3222628d2e96d03b319adacd3
|
10c58d5db58fbfa95d4f8ba6b6490276ad464486
|
refs/heads/master
| 2022-12-23T16:56:49.462938
| 2021-02-03T07:51:11
| 2021-02-03T07:51:11
| 239,068,652
| 2
| 4
| null | 2022-12-16T15:24:51
| 2020-02-08T04:25:37
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 1,745
|
java
|
package com.arjjs.ccm.tool;
import com.arjjs.ccm.modules.ccm.pop.entity.CcmPeople;
import org.junit.Test;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* 实体类工具包
*
* @author: li jiupeng
* @create: 2019-07-03 11:32
*/
public class EntityTools {
/**
* 是否为空
*
* @return boolean
*/
public static boolean isEmpty(Object object){
Class<?> clas=object.getClass();
Method [] methods=clas.getMethods();
for (int i = 0; i <methods.length; i++) {
String name=methods[i].getName();
if(name.indexOf("get")!=-1 ) {
try {
String getName=name.substring(3,name.length());
String variable=getName.substring(0,1).toLowerCase()+getName.substring(1,getName.length());
if(clas.getDeclaredField(variable)!=null){
System.out.print(variable+"-"+name+"-");
Object obj=methods[i].invoke(object);
if(obj!=null && obj!="" && !obj.toString().equals("0") && !obj.toString().equals("true") && !obj.toString().equals("null")){
return false;
}
}
} catch (NoSuchFieldException e) {
// e.printStackTrace();
}catch (IllegalAccessException e) {
e.printStackTrace();
} catch (InvocationTargetException e) {
e.printStackTrace();
}
}
}
return true;
}
}
|
[
"pymxb1991@163.com"
] |
pymxb1991@163.com
|
24aff5c6300d3db6bcef323894cbf28ad105aaa1
|
3b34ec3651055b290f99ebb43a7db0169022c924
|
/DS4P/consent2share/domain/src/main/java/gov/samhsa/consent2share/domain/reference/ConsentDirectiveTypeCodeRepository.java
|
35d7fb95a6c5f44630d96c11976624f027b85940
|
[
"BSD-3-Clause"
] |
permissive
|
pmaingi/Consent2Share
|
f9f35e19d124cd40275ef6c43953773f0a3e6f25
|
00344812cd95fdc75a9a711d35f92f1d35f10273
|
refs/heads/master
| 2021-01-11T01:20:55.231460
| 2016-09-29T16:58:40
| 2016-09-29T16:58:40
| 70,718,518
| 1
| 0
| null | 2016-10-12T16:21:33
| 2016-10-12T16:21:33
| null |
UTF-8
|
Java
| false
| false
| 2,221
|
java
|
/*******************************************************************************
* Open Behavioral Health Information Technology Architecture (OBHITA.org)
*
* 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 the <organization> 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 <COPYRIGHT HOLDER> 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 gov.samhsa.consent2share.domain.reference;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;
/**
* The Interface ConsentDirectiveTypeCodeRepository.
*/
@Repository
public interface ConsentDirectiveTypeCodeRepository extends JpaSpecificationExecutor<ConsentDirectiveTypeCode>, JpaRepository<ConsentDirectiveTypeCode, Long> {
}
|
[
"tao.lin@feisystems.com"
] |
tao.lin@feisystems.com
|
cc58e068ee4bec7601ae76e5e0d8ff49404a2ee6
|
e88e53e58bc9fa74631b52c0621295340f4ac7f1
|
/core/src/main/java/org/femtoframework/coin/spec/VariableResolver.java
|
6d227506edde62abb1b1088c216055756dfa3fdd
|
[
"Apache-2.0"
] |
permissive
|
femtoframework/femto-coin
|
ce3190c2e208e24ef4ee66cafd3720d9714690a8
|
bc4ce9f9bd2209bc94afbf754297b30b9fac8c2f
|
refs/heads/master
| 2022-12-24T15:54:46.533004
| 2019-11-25T03:21:22
| 2019-11-25T03:21:22
| 161,975,134
| 0
| 0
|
Apache-2.0
| 2022-12-14T20:37:05
| 2018-12-16T06:42:34
|
Java
|
UTF-8
|
Java
| false
| false
| 463
|
java
|
package org.femtoframework.coin.spec;
import org.femtoframework.coin.Component;
/**
* Variable Resolver
*
* @author Sheldon Shao
* @version 1.0
*/
public interface VariableResolver {
/**
* Resolve variable by spec
*
* @param <T> Convert it to type
* @param var VariableSpec
* @param expectedType
* @param component
* @return
*/
<T> T resolve(VariableSpec var, Class<T> expectedType, Component component);
}
|
[
"shaoxt@gmail.com"
] |
shaoxt@gmail.com
|
624df014c853f6664c50874f9ef8508cfcebf991
|
3f5577dcc04b882e9fcdc73dc1846bd7f1c3a367
|
/twister2/examples/src/java/edu/iu/dsc/tws/examples/basic/comms/BaseAllReduceCommunication.java
|
43d11d3d04e2455f9a1f1e73c550101be7d54fcb
|
[
"Apache-2.0"
] |
permissive
|
twister2/twister2
|
0e1e967d3752fcc25b38226f355f5e4dde742168
|
c6ab9a5563a9e43d3fd1a16e5337da4edae71224
|
refs/heads/master
| 2020-03-24T08:12:41.481151
| 2018-07-27T15:24:33
| 2018-07-27T15:24:33
| 142,587,382
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,304
|
java
|
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package edu.iu.dsc.tws.examples.basic.comms;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import edu.iu.dsc.tws.api.JobConfig;
import edu.iu.dsc.tws.api.Twister2Submitter;
import edu.iu.dsc.tws.api.basic.job.BasicJob;
import edu.iu.dsc.tws.common.config.Config;
import edu.iu.dsc.tws.comms.api.DataFlowOperation;
import edu.iu.dsc.tws.comms.api.MessageType;
import edu.iu.dsc.tws.comms.api.ReduceFunction;
import edu.iu.dsc.tws.comms.api.ReduceReceiver;
import edu.iu.dsc.tws.comms.core.TWSCommunication;
import edu.iu.dsc.tws.comms.core.TWSNetwork;
import edu.iu.dsc.tws.comms.core.TaskPlan;
import edu.iu.dsc.tws.examples.IntData;
import edu.iu.dsc.tws.examples.Utils;
import edu.iu.dsc.tws.rsched.core.ResourceAllocator;
import edu.iu.dsc.tws.rsched.core.SchedulerContext;
import edu.iu.dsc.tws.rsched.spi.container.IContainer;
import edu.iu.dsc.tws.rsched.spi.resource.ResourceContainer;
import edu.iu.dsc.tws.rsched.spi.resource.ResourcePlan;
public class BaseAllReduceCommunication implements IContainer {
private static final Logger LOG = Logger.getLogger(BaseAllReduceCommunication.class.getName());
private DataFlowOperation allReduce;
private ResourcePlan resourcePlan;
private int id;
private Config config;
private static final int NO_OF_TASKS = 16;
private int noOfTasksPerExecutor = 2;
private enum Status {
INIT,
MAP_FINISHED,
LOAD_RECEIVE_FINISHED,
}
private Status status;
@Override
public void init(Config cfg, int containerId, ResourcePlan plan) {
LOG.log(Level.INFO, "Starting the example with container id: " + plan.getThisId());
this.config = cfg;
this.resourcePlan = plan;
this.id = containerId;
this.status = Status.INIT;
this.noOfTasksPerExecutor = NO_OF_TASKS / plan.noOfContainers();
// lets create the task plan
TaskPlan taskPlan = Utils.createReduceTaskPlan(cfg, plan, NO_OF_TASKS);
//first get the communication config file
TWSNetwork network = new TWSNetwork(cfg, taskPlan);
TWSCommunication channel = network.getDataFlowTWSCommunication();
Set<Integer> sources = new HashSet<>();
for (int i = 0; i < NO_OF_TASKS / 2; i++) {
sources.add(i);
}
Set<Integer> destinations = new HashSet<>();
for (int i = 0; i < NO_OF_TASKS / 2; i++) {
destinations.add(NO_OF_TASKS / 2 + i);
}
int dest = NO_OF_TASKS;
Map<String, Object> newCfg = new HashMap<>();
LOG.info("Setting up reduce dataflow operation");
try {
// this method calls the init method
// I think this is wrong
allReduce = channel.allReduce(newCfg, MessageType.OBJECT, 0, 1, sources,
destinations, dest, new IndentityFunction(), new FinalReduceReceive(), true);
if (id == 0 || id == 1) {
for (int i = 0; i < noOfTasksPerExecutor; i++) {
// the map thread where data is produced
LOG.info(String.format("%d Starting %d", id, i + id * noOfTasksPerExecutor));
Thread mapThread = new Thread(new MapWorker(i + id * noOfTasksPerExecutor));
mapThread.start();
}
}
// we need to progress the communication
while (true) {
try {
// progress the channel
channel.progress();
// we should progress the communication directive
allReduce.progress();
Thread.yield();
} catch (Throwable t) {
t.printStackTrace();
}
}
} catch (Throwable t) {
t.printStackTrace();
}
}
/**
* We are running the map in a separate thread
*/
private class MapWorker implements Runnable {
private int task = 0;
MapWorker(int task) {
this.task = task;
}
@Override
public void run() {
try {
LOG.log(Level.INFO, "Starting map worker: " + id);
IntData data = generateData();
for (int i = 0; i < 10000; i++) {
// lets generate a message
while (!allReduce.send(task, data, 0)) {
// lets wait a litte and try again
try {
Thread.sleep(1);
} catch (InterruptedException e) {
e.printStackTrace();
}
}
if (i % 1000 == 0) {
LOG.info(String.format("%d sent %d", id, i));
}
Thread.yield();
}
LOG.info(String.format("%d Done sending", id));
status = Status.MAP_FINISHED;
} catch (Throwable t) {
t.printStackTrace();
}
}
}
private class IndentityFunction implements ReduceFunction {
private int count = 0;
@Override
public void init(Config cfg, DataFlowOperation op, Map<Integer, List<Integer>> expectedIds) {
}
@Override
public Object reduce(Object t1, Object t2) {
count++;
if (count % 100 == 0) {
LOG.info(String.format("%d Count %d", id, count));
}
return t1;
}
}
private class FinalReduceReceive implements ReduceReceiver {
private int count = 0;
public void init(Config cfg, DataFlowOperation op, Map<Integer, List<Integer>> expectedIds) {
for (Map.Entry<Integer, List<Integer>> e : expectedIds.entrySet()) {
LOG.info(String.format("%d Final Task %d receives from %s",
id, e.getKey(), e.getValue().toString()));
}
}
@Override
public boolean receive(int target, Object object) {
count++;
if (count % 100 == 0) {
LOG.info("Message received for last target: "
+ target + " count: " + count);
}
return true;
}
}
/**
* Generate data with an integer array
*
* @return IntData
*/
private IntData generateData() {
int s = 64000;
int[] d = new int[s];
for (int i = 0; i < s; i++) {
d[i] = i;
}
return new IntData(d);
}
public static void main(String[] args) {
// first load the configurations from command line and config files
Config config = ResourceAllocator.loadConfig(new HashMap<>());
// build JobConfig
HashMap<String, Object> configurations = new HashMap<>();
configurations.put(SchedulerContext.THREADS_PER_WORKER, 8);
// build JobConfig
JobConfig jobConfig = new JobConfig();
jobConfig.putAll(configurations);
// build the job
BasicJob basicJob = BasicJob.newBuilder()
.setName("basic-all-reduce")
.setContainerClass(BaseAllReduceCommunication.class.getName())
.setRequestResource(new ResourceContainer(2, 1024), 4)
.setConfig(jobConfig)
.build();
// now submit the job
Twister2Submitter.submitContainerJob(basicJob, config);
}
}
|
[
"vibhatha@gmail.com"
] |
vibhatha@gmail.com
|
5e35cdf534ea1d2ec0d6bde4cc466fb28ee212d7
|
b3143b62fbc869674392b3f536b1876af0b2611f
|
/jsf-worker-parent/jsf-worker-dao/src/main/java/com/ipd/jsf/worker/domain/JsfAlarmStatistics.java
|
c8bbb7ac17d24a5c9abdcf46c2c554c015d0b125
|
[
"Apache-2.0"
] |
permissive
|
Mr-L7/jsf-core
|
6630b407caf9110906c005b2682d154da37d4bfd
|
90c8673b48ec5fd9349e4ef5ae3b214389a47f65
|
refs/heads/master
| 2020-03-18T23:26:17.617172
| 2017-12-14T05:52:55
| 2017-12-14T05:52:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,955
|
java
|
/**
* Copyright 2004-2048 .
*
* 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.ipd.jsf.worker.domain;
import java.io.Serializable;
public class JsfAlarmStatistics implements Serializable {
private Integer id;//数据库中的自增ID,无用
private String alarmDate;//报警时间
private int alarmType;//报警类型
private String alarmIp;//报警的ip地址
private String alarmInterface;//报警的接口名字
private int alarmCount;//报警数量
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getAlarmDate() {
return alarmDate;
}
public void setAlarmDate(String alarmDate) {
this.alarmDate = alarmDate;
}
//public String getStatistics() {return statistics;}
//public void setStatistics(String statistics) {this.statistics = statistics;}
public int getAlarmType() {
return alarmType;
}
public void setAlarmType(int alarmType) {
this.alarmType = alarmType;
}
public int getAlarmCount() {
return alarmCount;
}
public void setAlarmCount(int alarmCount) {
this.alarmCount = alarmCount;
}
public String getAlarmIp() {
return alarmIp;
}
public void setAlarmIp(String alarmIp) {
this.alarmIp = alarmIp;
}
public String getAlarmInterface() {
return alarmInterface;
}
public void setAlarmInterface(String alarmInterface) {
this.alarmInterface = alarmInterface;
}
public int hashCode() {
int hc = 13;
hc = hc * 31 + (this.id == null ? 0 : this.id.hashCode());
hc = hc * 31 + (this.alarmDate == null ? 0 : this.alarmDate.hashCode());
//hc = hc * 31 + (this.statistics == null ? 0 : this.statistics.hashCode());
hc = hc * 31 + (this.alarmType*31);
hc = hc * 31 + (this.alarmCount*31);
return hc;
}
public boolean equals(Object obj) {
if (!(obj instanceof JsfAlarmStatistics)) {
return false;
}
if (this == obj) {
return true;
}
JsfAlarmStatistics other = (JsfAlarmStatistics) obj;
if (!this.id.equals(other.getId())) {
return false;
}
if (this.alarmDate == null && other.alarmDate != null ||
(this.alarmDate != null && other.alarmDate == null) ||
(this.alarmDate != other.alarmDate && !this.alarmDate.equals(other.alarmDate))) {
return false;
}
/*
if (this.statistics == null && other.statistics != null ||
(this.statistics != null && other.statistics == null) ||
(this.statistics != other.statistics && !this.statistics.equals(other.statistics))) {
return false;
}
*/
if (this.alarmType != other.alarmType){
return false;
}
if (this.alarmCount != other.alarmCount) {
return false;
}
return true;
}
@Override
public String toString() {
return "JsfAlarmStatistics{" +
"id=" + id +
", alarmDate='" + alarmDate + '\'' +
", alarmType=" + alarmType +
", alarmIp=" + alarmIp +
", alarmInterface=" + alarmInterface +
", alarmCount=" + alarmCount +
'}';
}
}
|
[
"yangzhiwei@jd.com"
] |
yangzhiwei@jd.com
|
0967188ecc73abc357e55f70ab568cec536f1a9b
|
421f0a75a6b62c5af62f89595be61f406328113b
|
/generated_tests/no_seeding/2_a4j-net.kencochrane.a4j.beans.CustomerReview-1.0-5/net/kencochrane/a4j/beans/CustomerReview_ESTest_scaffolding.java
|
2c2bbf845665adce33b5b1581d7c1e11cdb0c1c4
|
[] |
no_license
|
tigerqiu712/evosuite-model-seeding-empirical-evaluation
|
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
|
11a920b8213d9855082d3946233731c843baf7bc
|
refs/heads/master
| 2020-12-23T21:04:12.152289
| 2019-10-30T08:02:29
| 2019-10-30T08:02:29
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Oct 28 17:56:40 GMT 2019
*/
package net.kencochrane.a4j.beans;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class CustomerReview_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pderakhshanfar@bsr01.win.tue.nl"
] |
pderakhshanfar@bsr01.win.tue.nl
|
7f643a2e17e1eaa685c52cdc843978fe753b61a4
|
6ee92ecc85ba29f13769329bc5a90acea6ef594f
|
/bizcore/WEB-INF/retailscm_core_src/com/doublechaintech/retailscm/consumerorderpaymentgroup/ConsumerOrderPaymentGroupManager.java
|
97484c44138bf595cb00236524ede1ee39da9bcc
|
[] |
no_license
|
doublechaintech/scm-biz-suite
|
b82628bdf182630bca20ce50277c41f4a60e7a08
|
52db94d58b9bd52230a948e4692525ac78b047c7
|
refs/heads/master
| 2023-08-16T12:16:26.133012
| 2023-05-26T03:20:08
| 2023-05-26T03:20:08
| 162,171,043
| 1,387
| 500
| null | 2023-07-08T00:08:42
| 2018-12-17T18:07:12
|
Java
|
UTF-8
|
Java
| false
| false
| 2,863
|
java
|
package com.doublechaintech.retailscm.consumerorderpaymentgroup;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Map;
import java.util.List;
import com.terapico.caf.DateTime;
import com.terapico.caf.Images;
import com.doublechaintech.retailscm.RetailscmUserContext;
import com.doublechaintech.retailscm.BaseEntity;
import com.doublechaintech.retailscm.BaseManager;
import com.doublechaintech.retailscm.SmartList;
public interface ConsumerOrderPaymentGroupManager extends BaseManager {
List<ConsumerOrderPaymentGroup> searchConsumerOrderPaymentGroupList(
RetailscmUserContext ctx, ConsumerOrderPaymentGroupRequest pRequest);
ConsumerOrderPaymentGroup searchConsumerOrderPaymentGroup(
RetailscmUserContext ctx, ConsumerOrderPaymentGroupRequest pRequest);
public ConsumerOrderPaymentGroup createConsumerOrderPaymentGroup(
RetailscmUserContext userContext, String name, String bizOrderId, String cardNumber)
throws Exception;
public ConsumerOrderPaymentGroup updateConsumerOrderPaymentGroup(
RetailscmUserContext userContext,
String consumerOrderPaymentGroupId,
int consumerOrderPaymentGroupVersion,
String property,
String newValueExpr,
String[] tokensExpr)
throws Exception;
public ConsumerOrderPaymentGroup loadConsumerOrderPaymentGroup(
RetailscmUserContext userContext, String consumerOrderPaymentGroupId, String[] tokensExpr)
throws Exception;
public void sendAllItems(RetailscmUserContext ctx) throws Exception;
public ConsumerOrderPaymentGroup internalSaveConsumerOrderPaymentGroup(
RetailscmUserContext userContext, ConsumerOrderPaymentGroup consumerOrderPaymentGroup)
throws Exception;
public ConsumerOrderPaymentGroup internalSaveConsumerOrderPaymentGroup(
RetailscmUserContext userContext,
ConsumerOrderPaymentGroup consumerOrderPaymentGroup,
Map<String, Object> option)
throws Exception;
public ConsumerOrderPaymentGroup transferToAnotherBizOrder(
RetailscmUserContext userContext,
String consumerOrderPaymentGroupId,
String anotherBizOrderId)
throws Exception;
public void onNewInstanceCreated(
RetailscmUserContext userContext, ConsumerOrderPaymentGroup newCreated) throws Exception;
public default void onUpdated(
RetailscmUserContext userContext,
ConsumerOrderPaymentGroup updated,
Object actor,
String methodName)
throws Exception {};
/*======================================================DATA MAINTENANCE===========================================================*/
public Object listByBizOrder(RetailscmUserContext userContext, String bizOrderId)
throws Exception;
public Object listPageByBizOrder(
RetailscmUserContext userContext, String bizOrderId, int start, int count) throws Exception;
}
|
[
"zhangxilai@doublechaintech.com"
] |
zhangxilai@doublechaintech.com
|
730d5bc7188eff5bdb942cd9a9f5fb578441de07
|
df134b422960de6fb179f36ca97ab574b0f1d69f
|
/net/minecraft/server/v1_16_R2/DataConverterUUIDBase.java
|
a120b851c99243817ed4cb5396ee24fcc0d1091c
|
[] |
no_license
|
TheShermanTanker/NMS-1.16.3
|
bbbdb9417009be4987872717e761fb064468bbb2
|
d3e64b4493d3e45970ec5ec66e1b9714a71856cc
|
refs/heads/master
| 2022-12-29T15:32:24.411347
| 2020-10-08T11:56:16
| 2020-10-08T11:56:16
| 302,324,687
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,836
|
java
|
/* */ package net.minecraft.server.v1_16_R2;
/* */
/* */ import com.mojang.datafixers.DSL;
/* */ import com.mojang.datafixers.DataFix;
/* */ import com.mojang.datafixers.Typed;
/* */ import com.mojang.datafixers.schemas.Schema;
/* */ import com.mojang.datafixers.types.Type;
/* */ import com.mojang.serialization.Dynamic;
/* */ import java.util.Arrays;
/* */ import java.util.Optional;
/* */ import java.util.UUID;
/* */ import java.util.function.Function;
/* */ import org.apache.logging.log4j.LogManager;
/* */ import org.apache.logging.log4j.Logger;
/* */
/* */
/* */ public abstract class DataConverterUUIDBase
/* */ extends DataFix
/* */ {
/* 20 */ protected static final Logger LOGGER = LogManager.getLogger();
/* */ protected DSL.TypeReference b;
/* */
/* */ public DataConverterUUIDBase(Schema var0, DSL.TypeReference var1) {
/* 24 */ super(var0, false);
/* 25 */ this.b = var1;
/* */ }
/* */
/* */ protected Typed<?> a(Typed<?> var0, String var1, Function<Dynamic<?>, Dynamic<?>> var2) {
/* 29 */ Type<?> var3 = getInputSchema().getChoiceType(this.b, var1);
/* 30 */ Type<?> var4 = getOutputSchema().getChoiceType(this.b, var1);
/* 31 */ return var0.updateTyped(DSL.namedChoice(var1, var3), var4, var1 -> var1.update(DSL.remainderFinder(), var0));
/* */ }
/* */
/* */ protected static Optional<Dynamic<?>> a(Dynamic<?> var0, String var1, String var2) {
/* 35 */ return a(var0, var1).map(var3 -> var0.remove(var1).set(var2, var3));
/* */ }
/* */
/* */
/* */
/* */ protected static Optional<Dynamic<?>> b(Dynamic<?> var0, String var1, String var2) {
/* 41 */ return var0.get(var1).result().flatMap(DataConverterUUIDBase::a).map(var3 -> var0.remove(var1).set(var2, var3));
/* */ }
/* */
/* */
/* */
/* */ protected static Optional<Dynamic<?>> c(Dynamic<?> var0, String var1, String var2) {
/* 47 */ String var3 = var1 + "Most";
/* 48 */ String var4 = var1 + "Least";
/* 49 */ return d(var0, var3, var4).map(var4 -> var0.remove(var1).remove(var2).set(var3, var4));
/* */ }
/* */
/* */
/* */
/* */ protected static Optional<Dynamic<?>> a(Dynamic<?> var0, String var1) {
/* 55 */ return var0.get(var1).result().flatMap(var1 -> {
/* */ String var2 = var1.asString(null);
/* */ if (var2 != null) {
/* */ try {
/* */ UUID var3 = UUID.fromString(var2);
/* */ return a(var0, var3.getMostSignificantBits(), var3.getLeastSignificantBits());
/* 61 */ } catch (IllegalArgumentException illegalArgumentException) {}
/* */ }
/* */ return Optional.empty();
/* */ });
/* */ }
/* */
/* */
/* */
/* */ protected static Optional<Dynamic<?>> a(Dynamic<?> var0) {
/* 70 */ return d(var0, "M", "L");
/* */ }
/* */
/* */ protected static Optional<Dynamic<?>> d(Dynamic<?> var0, String var1, String var2) {
/* 74 */ long var3 = var0.get(var1).asLong(0L);
/* 75 */ long var5 = var0.get(var2).asLong(0L);
/* 76 */ if (var3 == 0L || var5 == 0L) {
/* 77 */ return Optional.empty();
/* */ }
/* 79 */ return a(var0, var3, var5);
/* */ }
/* */
/* */ protected static Optional<Dynamic<?>> a(Dynamic<?> var0, long var1, long var3) {
/* 83 */ return Optional.of(var0.createIntList(Arrays.stream(new int[] { (int)(var1 >> 32L), (int)var1, (int)(var3 >> 32L), (int)var3 })));
/* */ }
/* */ }
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\net\minecraft\server\v1_16_R2\DataConverterUUIDBase.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/
|
[
"tanksherman27@gmail.com"
] |
tanksherman27@gmail.com
|
d57dad4169b140c8da774c18639f12fd0be6dafc
|
7b0e0015cad07fce81803cb8f7ccf0feeee62ec4
|
/src/main/java/com/dw/suppercms/infrastructure/config/TestConfig.java
|
fe094645b18607f39349201fb5558d888272b74d
|
[] |
no_license
|
shenqidekobe/supercms
|
ecb191c5537355a4de8a45f978932d8007fab9a6
|
0bb6afcb7a1bd2cada454ae29de2f54553436da7
|
refs/heads/master
| 2021-01-24T20:54:05.369022
| 2018-02-28T09:54:33
| 2018-02-28T09:54:33
| 123,263,266
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 408
|
java
|
package com.dw.suppercms.infrastructure.config;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.ContextHierarchy;
import com.dw.framework.core.config.CoreTestConfig;
@ContextHierarchy({ @ContextConfiguration(classes = AppConfig.class),
@ContextConfiguration(classes = WebConfig.class) })
public abstract class TestConfig extends CoreTestConfig {
}
|
[
"liuyuan_kobe@163.com"
] |
liuyuan_kobe@163.com
|
ef58b9effd24d0958d844a816e350cb57668427c
|
e26a8434566b1de6ea6cbed56a49fdb2abcba88b
|
/model-tsin-types/src/generated/java/com/prowidesoftware/swift/model/mx/dic/OriginalRequestInformation1.java
|
7f5c10585d4aa479ca2154ddc48a9b67e2caf7bd
|
[
"Apache-2.0"
] |
permissive
|
adilkangerey/prowide-iso20022
|
6476c9eb8fafc1b1c18c330f606b5aca7b8b0368
|
3bbbd6804eb9dc4e1440680e5f9f7a1726df5a61
|
refs/heads/master
| 2023-09-05T21:41:47.480238
| 2021-10-03T20:15:26
| 2021-10-03T20:15:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,114
|
java
|
package com.prowidesoftware.swift.model.mx.dic;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.datatype.XMLGregorianCalendar;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* Set of characteristics that unambiguously identify the original global invoice financing request.
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "OriginalRequestInformation1", propOrder = {
"id",
"creDtTm",
"fincgRqstr",
"intrmyAgt",
"frstAgt",
"vldtnStsInf",
"cxlStsInf"
})
public class OriginalRequestInformation1 {
@XmlElement(name = "Id", required = true)
protected String id;
@XmlElement(name = "CreDtTm", required = true)
@XmlSchemaType(name = "dateTime")
protected XMLGregorianCalendar creDtTm;
@XmlElement(name = "FincgRqstr")
protected PartyIdentificationAndAccount6 fincgRqstr;
@XmlElement(name = "IntrmyAgt")
protected FinancialInstitutionIdentification6 intrmyAgt;
@XmlElement(name = "FrstAgt")
protected FinancialInstitutionIdentification6 frstAgt;
@XmlElement(name = "VldtnStsInf", required = true)
protected ValidationStatusInformation1 vldtnStsInf;
@XmlElement(name = "CxlStsInf")
protected CancellationStatusInformation1 cxlStsInf;
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public OriginalRequestInformation1 setId(String value) {
this.id = value;
return this;
}
/**
* Gets the value of the creDtTm property.
*
* @return
* possible object is
* {@link XMLGregorianCalendar }
*
*/
public XMLGregorianCalendar getCreDtTm() {
return creDtTm;
}
/**
* Sets the value of the creDtTm property.
*
* @param value
* allowed object is
* {@link XMLGregorianCalendar }
*
*/
public OriginalRequestInformation1 setCreDtTm(XMLGregorianCalendar value) {
this.creDtTm = value;
return this;
}
/**
* Gets the value of the fincgRqstr property.
*
* @return
* possible object is
* {@link PartyIdentificationAndAccount6 }
*
*/
public PartyIdentificationAndAccount6 getFincgRqstr() {
return fincgRqstr;
}
/**
* Sets the value of the fincgRqstr property.
*
* @param value
* allowed object is
* {@link PartyIdentificationAndAccount6 }
*
*/
public OriginalRequestInformation1 setFincgRqstr(PartyIdentificationAndAccount6 value) {
this.fincgRqstr = value;
return this;
}
/**
* Gets the value of the intrmyAgt property.
*
* @return
* possible object is
* {@link FinancialInstitutionIdentification6 }
*
*/
public FinancialInstitutionIdentification6 getIntrmyAgt() {
return intrmyAgt;
}
/**
* Sets the value of the intrmyAgt property.
*
* @param value
* allowed object is
* {@link FinancialInstitutionIdentification6 }
*
*/
public OriginalRequestInformation1 setIntrmyAgt(FinancialInstitutionIdentification6 value) {
this.intrmyAgt = value;
return this;
}
/**
* Gets the value of the frstAgt property.
*
* @return
* possible object is
* {@link FinancialInstitutionIdentification6 }
*
*/
public FinancialInstitutionIdentification6 getFrstAgt() {
return frstAgt;
}
/**
* Sets the value of the frstAgt property.
*
* @param value
* allowed object is
* {@link FinancialInstitutionIdentification6 }
*
*/
public OriginalRequestInformation1 setFrstAgt(FinancialInstitutionIdentification6 value) {
this.frstAgt = value;
return this;
}
/**
* Gets the value of the vldtnStsInf property.
*
* @return
* possible object is
* {@link ValidationStatusInformation1 }
*
*/
public ValidationStatusInformation1 getVldtnStsInf() {
return vldtnStsInf;
}
/**
* Sets the value of the vldtnStsInf property.
*
* @param value
* allowed object is
* {@link ValidationStatusInformation1 }
*
*/
public OriginalRequestInformation1 setVldtnStsInf(ValidationStatusInformation1 value) {
this.vldtnStsInf = value;
return this;
}
/**
* Gets the value of the cxlStsInf property.
*
* @return
* possible object is
* {@link CancellationStatusInformation1 }
*
*/
public CancellationStatusInformation1 getCxlStsInf() {
return cxlStsInf;
}
/**
* Sets the value of the cxlStsInf property.
*
* @param value
* allowed object is
* {@link CancellationStatusInformation1 }
*
*/
public OriginalRequestInformation1 setCxlStsInf(CancellationStatusInformation1 value) {
this.cxlStsInf = value;
return this;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
@Override
public boolean equals(Object that) {
return EqualsBuilder.reflectionEquals(this, that);
}
@Override
public int hashCode() {
return HashCodeBuilder.reflectionHashCode(this);
}
}
|
[
"sebastian@prowidesoftware.com"
] |
sebastian@prowidesoftware.com
|
c3a0eeb2bde70c92602c358ae790a52bb78d42e9
|
bd1f3decd59ade0efcc8980eff6f97203311abf9
|
/src/main/java/com/areatecnica/sigf/entities/ControlAsistencia.java
|
1aaa9a0b018f0895b8569e5909cbb8f018c697fc
|
[] |
no_license
|
ianfranco/nanduapp
|
f4318755d859f57f50b94f0b67f02797a91634e6
|
330682a8666d0d30ac332caabe75eefee822f2d4
|
refs/heads/master
| 2021-03-24T12:48:03.761910
| 2018-01-08T16:58:06
| 2018-01-08T16:58:06
| 112,971,478
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,134
|
java
|
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.areatecnica.sigf.entities;
import com.areatecnica.sigf.audit.AuditListener;
import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement;
/**
*
* @author ianfr
*/
@Entity
@Table(name = "control_asistencia", catalog = "sigf_v3", schema = "")
@EntityListeners({AuditListener.class})
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "ControlAsistencia.findAll", query = "SELECT c FROM ControlAsistencia c")
, @NamedQuery(name = "ControlAsistencia.findByControlAsistenciaId", query = "SELECT c FROM ControlAsistencia c WHERE c.controlAsistenciaId = :controlAsistenciaId")
, @NamedQuery(name = "ControlAsistencia.findByControlAsistenciaHorarioSalida", query = "SELECT c FROM ControlAsistencia c WHERE c.controlAsistenciaHorarioSalida = :controlAsistenciaHorarioSalida")
, @NamedQuery(name = "ControlAsistencia.findByControlAsistenciaHorarioEntrada", query = "SELECT c FROM ControlAsistencia c WHERE c.controlAsistenciaHorarioEntrada = :controlAsistenciaHorarioEntrada")})
public class ControlAsistencia extends BaseEntity implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "control_asistencia_id")
private Integer controlAsistenciaId;
@Column(name = "control_asistencia_horario_salida")
@Temporal(TemporalType.TIMESTAMP)
private Date controlAsistenciaHorarioSalida;
@Basic(optional = false)
@NotNull
@Column(name = "control_asistencia_horario_entrada")
@Temporal(TemporalType.TIMESTAMP)
private Date controlAsistenciaHorarioEntrada;
@JoinColumn(name = "control_asistencia_id_trabajador", referencedColumnName = "trabajador_id", nullable = false)
@ManyToOne(optional = false)
private Trabajador controlAsistenciaIdTrabajador;
public ControlAsistencia() {
}
public ControlAsistencia(Integer controlAsistenciaId) {
this.controlAsistenciaId = controlAsistenciaId;
}
public ControlAsistencia(Integer controlAsistenciaId, Date controlAsistenciaHorarioEntrada) {
this.controlAsistenciaId = controlAsistenciaId;
this.controlAsistenciaHorarioEntrada = controlAsistenciaHorarioEntrada;
}
public Integer getControlAsistenciaId() {
return controlAsistenciaId;
}
public void setControlAsistenciaId(Integer controlAsistenciaId) {
this.controlAsistenciaId = controlAsistenciaId;
}
public Date getControlAsistenciaHorarioSalida() {
return controlAsistenciaHorarioSalida;
}
public void setControlAsistenciaHorarioSalida(Date controlAsistenciaHorarioSalida) {
this.controlAsistenciaHorarioSalida = controlAsistenciaHorarioSalida;
}
public Date getControlAsistenciaHorarioEntrada() {
return controlAsistenciaHorarioEntrada;
}
public void setControlAsistenciaHorarioEntrada(Date controlAsistenciaHorarioEntrada) {
this.controlAsistenciaHorarioEntrada = controlAsistenciaHorarioEntrada;
}
public Trabajador getControlAsistenciaIdTrabajador() {
return controlAsistenciaIdTrabajador;
}
public void setControlAsistenciaIdTrabajador(Trabajador controlAsistenciaIdTrabajador) {
this.controlAsistenciaIdTrabajador = controlAsistenciaIdTrabajador;
}
@Override
public int hashCode() {
int hash = 0;
hash += (controlAsistenciaId != null ? controlAsistenciaId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are not set
if (!(object instanceof ControlAsistencia)) {
return false;
}
ControlAsistencia other = (ControlAsistencia) object;
if ((this.controlAsistenciaId == null && other.controlAsistenciaId != null) || (this.controlAsistenciaId != null && !this.controlAsistenciaId.equals(other.controlAsistenciaId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "com.areatecnica.sigf.entities.ControlAsistencia[ controlAsistenciaId=" + controlAsistenciaId + " ]";
}
}
|
[
"ianfr@DESKTOP-6NFGECR"
] |
ianfr@DESKTOP-6NFGECR
|
acd257673a98e8b9de22e2cfda3cb5290450baec
|
a793d0ec2ac7f77da121f63738e43a54e171dbf8
|
/spring_day02_1_ioc_xml/src/main/java/com/itheima/dao/impl/AccountServiceImpl.java
|
17f0561271140059229a2f3ce18bd221fef809c8
|
[] |
no_license
|
Jasonpyt/project_335
|
c60f22da50ca18a7ffd8155c4bc640ec1367fe2d
|
160d5eb9145a94efd53ca48e2d6bed80d1780de3
|
refs/heads/master
| 2020-04-30T14:33:51.701190
| 2019-03-21T07:44:08
| 2019-03-21T07:44:08
| 176,894,447
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,046
|
java
|
package com.itheima.dao.impl;
import com.itheima.dao.AccountDao;
import com.itheima.domain.Account;
import com.itheima.service.AccountService;
import java.util.List;
/**
* @author 黑马程序员
* @Company http://www.ithiema.com
* @Version 1.0
*/
public class AccountServiceImpl implements AccountService {
AccountDao accountDao ;
public void setAccountDao(AccountDao accountDao) {
this.accountDao = accountDao;
}
@Override
public List<Account> findAll() {
return accountDao.findAll();
}
@Override
public Account findById(Integer id) {
return accountDao.findById(id);
}
@Override
public void save(Account account) {
accountDao.save(account);
}
@Override
public void update(Account account) {
accountDao.update(account);
}
@Override
public void delById(Integer id) {
accountDao.delById(id);
}
@Override
public List<Account> findByName(String name) {
return accountDao.findByName(name);
}
}
|
[
"346785150@qq.com"
] |
346785150@qq.com
|
3daf5a6f182c15f316651cf0d53b41a528410f46
|
69005ab4c8cc5d88d7996d47ac8def0b28730b95
|
/android-medium/app/src/main/java/test/perf/MyPerfClass_2527.java
|
52a5dcf3f8b06f73f95f6e958af60acf42da11bf
|
[] |
no_license
|
sakerbuild/performance-comparisons
|
ed603c9ffa0d34983a7da74f7b2b731dc3350d7e
|
78cd8d7896c4b0255ec77304762471e6cab95411
|
refs/heads/master
| 2020-12-02T19:14:57.865537
| 2020-05-11T14:09:40
| 2020-05-11T14:09:40
| 231,092,201
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 803
|
java
|
package test.perf;
public class MyPerfClass_2527{
private final String property;
public MyPerfClass_2527(String param) {
this.property = param;
}
public String getProperty() {
return property;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((property == null) ? 0 : property.hashCode());
return result;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
MyPerfClass_2527 other = (MyPerfClass_2527) obj;
if (property == null) {
if (other.property != null)
return false;
} else if (!property.equals(other.property))
return false;
return true;
}
}
|
[
"10866741+Sipkab@users.noreply.github.com"
] |
10866741+Sipkab@users.noreply.github.com
|
215e07df9de8b97e8c37060acc2e18950d95ce9f
|
570719e4818bd8bdb7771cd749def0515dc063d5
|
/watch/src/main/java/ch/rasc/watch/Encrypt.java
|
d1327ed740186992ca04a3b7925c752ea3e3a40a
|
[] |
no_license
|
nabihAbuabid/playground
|
5659fc43f26e2c21c0eb292659f13e01b4245649
|
412b63cf6df172bd9b9d1a49e7b3f89a1bf4eb1e
|
refs/heads/master
| 2020-12-13T23:29:02.281212
| 2015-06-20T07:20:17
| 2015-06-20T07:20:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,541
|
java
|
package ch.rasc.watch;
import java.io.IOException;
import java.io.OutputStream;
import java.nio.channels.Channels;
import java.nio.channels.FileChannel;
import java.nio.channels.WritableByteChannel;
import java.nio.charset.StandardCharsets;
import java.nio.file.CopyOption;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.nio.file.StandardOpenOption;
import java.security.AlgorithmParameters;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import java.security.spec.InvalidKeySpecException;
import java.security.spec.InvalidParameterSpecException;
import java.security.spec.KeySpec;
import java.util.ArrayList;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import javax.crypto.Cipher;
import javax.crypto.CipherOutputStream;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.SecretKeyFactory;
import javax.crypto.spec.IvParameterSpec;
import javax.crypto.spec.PBEKeySpec;
import javax.crypto.spec.SecretKeySpec;
import org.jooq.lambda.Unchecked;
public class Encrypt {
public static void main(String[] args) throws IOException, NoSuchAlgorithmException,
InvalidKeySpecException, NoSuchPaddingException, InvalidKeyException,
InvalidParameterSpecException {
if (args.length == 3) {
Path tmpFile = Files.createTempFile("encrypt", "zip");
tmpFile.toFile().deleteOnExit();
Path inputDirectory = Paths.get(args[0]);
try (ZipOutputStream zos = new ZipOutputStream(Files.newOutputStream(tmpFile));
WritableByteChannel out = Channels.newChannel(zos)) {
zos.setLevel(9);
Files.walk(inputDirectory)
.filter(file -> !Files.isDirectory(file))
.peek(System.out::println)
.forEach(
Unchecked.consumer(file -> {
String name = inputDirectory.getParent()
.relativize(file).toString();
name = name.replace('\\', '/');
zos.putNextEntry(new ZipEntry(name));
try (FileChannel in = FileChannel.open(file,
StandardOpenOption.READ)) {
in.transferTo(0, in.size(), out);
}
}));
}
// encrypt from tmpFile to encFile
String password = args[2];
Path outputFile = Paths.get(args[1]);
Path encTmpFile = Files.createTempFile("encrypt", "zip.enc");
encTmpFile.toFile().deleteOnExit();
SecretKey key = createSecretKey(password, outputFile.getFileName().toString());
Cipher cipher = Cipher.getInstance("AES/CBC/PKCS5Padding");
cipher.init(Cipher.ENCRYPT_MODE, key);
AlgorithmParameters params = cipher.getParameters();
byte[] iv = params.getParameterSpec(IvParameterSpec.class).getIV();
try (FileChannel in = FileChannel.open(tmpFile, StandardOpenOption.READ);
OutputStream fos = Files.newOutputStream(encTmpFile);
CipherOutputStream cos = new CipherOutputStream(fos, cipher);
WritableByteChannel wbc = Channels.newChannel(cos)) {
in.transferTo(0, in.size(), wbc);
}
Path encFile = Paths.get(args[1]);
if (encFile.getParent() != null
&& !encFile.getParent().equals(encFile.getRoot())) {
Files.createDirectories(encFile.getParent());
}
List<CopyOption> copyOptions = new ArrayList<>();
if (encTmpFile.getRoot().equals(encFile.getRoot())) {
copyOptions.add(StandardCopyOption.ATOMIC_MOVE);
}
copyOptions.add(StandardCopyOption.REPLACE_EXISTING);
Files.move(encTmpFile, encFile,
copyOptions.toArray(new CopyOption[copyOptions.size()]));
Files.write(Paths.get(args[1] + ".iv"), iv, StandardOpenOption.CREATE,
StandardOpenOption.TRUNCATE_EXISTING);
Files.deleteIfExists(tmpFile);
Files.deleteIfExists(encTmpFile);
}
else {
System.out
.println("java ch.rasc.watch.Encrypt <directory> <encryptedZipOutputFile> <password>");
}
}
public static SecretKey createSecretKey(String password, String fileName)
throws NoSuchAlgorithmException, InvalidKeySpecException {
byte[] salt = fileName.getBytes(StandardCharsets.UTF_8);
KeySpec keySpec = new PBEKeySpec(password.toCharArray(), salt, 65536, 128);
SecretKeyFactory factory = SecretKeyFactory.getInstance("PBKDF2WithHmacSHA1");
SecretKey sk = factory.generateSecret(keySpec);
SecretKey mySymmetricKey = new SecretKeySpec(sk.getEncoded(), "AES");
return mySymmetricKey;
}
}
|
[
"ralphschaer@gmail.com"
] |
ralphschaer@gmail.com
|
3a502892998000087ea5cc9972b4a19c5c98a4cb
|
8ed9f95fd028b7d89e7276847573878e32f12674
|
/docx4j-openxml-objects/src/main/java/org/docx4j/wml/TblGrid.java
|
af74a9b24de8c02a6ee563d24b0d24893938f65d
|
[
"Apache-2.0"
] |
permissive
|
plutext/docx4j
|
a75b7502841a06f314cb31bbaa219b416f35d8a8
|
1f496eca1f70e07d8c112168857bee4c8e6b0514
|
refs/heads/VERSION_11_4_8
| 2023-06-23T10:02:08.676214
| 2023-03-11T23:02:44
| 2023-03-11T23:02:44
| 4,302,287
| 1,826
| 1,024
| null | 2023-03-11T23:02:45
| 2012-05-11T22:13:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,801
|
java
|
/*
* Copyright 2007-2013, Plutext Pty Ltd.
*
* This file is part of docx4j.
docx4j is licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
package org.docx4j.wml;
import jakarta.xml.bind.Unmarshaller;
import jakarta.xml.bind.annotation.XmlAccessType;
import jakarta.xml.bind.annotation.XmlAccessorType;
import jakarta.xml.bind.annotation.XmlRootElement;
import jakarta.xml.bind.annotation.XmlType;
/**
* <p>Java class for CT_TblGrid complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="CT_TblGrid">
* <complexContent>
* <extension base="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_TblGridBase">
* <sequence>
* <element name="tblGridChange" type="{http://schemas.openxmlformats.org/wordprocessingml/2006/main}CT_TblGridChange" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "CT_TblGrid", propOrder = {
"tblGridChange"
})
@XmlRootElement(name="tblGrid")
public class TblGrid
extends TblGridBase
{
protected CTTblGridChange tblGridChange;
/**
* Gets the value of the tblGridChange property.
*
* @return
* possible object is
* {@link CTTblGridChange }
*
*/
public CTTblGridChange getTblGridChange() {
return tblGridChange;
}
/**
* Sets the value of the tblGridChange property.
*
* @param value
* allowed object is
* {@link CTTblGridChange }
*
*/
public void setTblGridChange(CTTblGridChange value) {
this.tblGridChange = value;
}
/**
* This method is invoked by the JAXB implementation on each instance when unmarshalling completes.
*
* @param parent
* The parent object in the object tree.
* @param unmarshaller
* The unmarshaller that generated the instance.
*/
public void afterUnmarshal(Unmarshaller unmarshaller, Object parent) {
setParent(parent);
}
}
|
[
"jason@plutext.org"
] |
jason@plutext.org
|
f03c4e6fdbe85aee319f4c840e459b90a3903d6b
|
002724cfb29f5147b29e028a9b69206e50d5075d
|
/src/NoraCommon/src/main/java/org/jp/illg/dstar/reporter/model/ProxyGatewayStatusReport.java
|
07efff17cfe6f8743a2c0c51d66cab8174e19ff4
|
[
"MIT"
] |
permissive
|
ahnd38/NoraSeries
|
eabfe9ef590811814b7baf6e443b01785b0b3fb3
|
623ef2f8eb4a038ad8230491534814ecd9f6f204
|
refs/heads/master
| 2023-04-17T10:44:58.197302
| 2021-05-03T04:38:06
| 2021-05-03T04:38:06
| 309,729,704
| 0
| 3
|
MIT
| 2021-05-03T04:38:07
| 2020-11-03T15:31:20
|
Java
|
UTF-8
|
Java
| false
| false
| 1,557
|
java
|
package org.jp.illg.dstar.reporter.model;
import java.util.ArrayList;
import java.util.List;
import java.util.UUID;
import com.annimon.stream.ComparatorCompat;
import com.annimon.stream.Stream;
import com.annimon.stream.function.Function;
import lombok.AccessLevel;
import lombok.Data;
import lombok.Setter;
@Data
public class ProxyGatewayStatusReport {
@Setter(AccessLevel.PRIVATE)
private List<ProxyGatewayClientReport> clients = new ArrayList<>();
private int trustRequestRateCurrent;
private int trustRequestRateMax;
private int trustRequestRateLimit;
private int proxyPortNumber;
private int g1PortNumber;
private int trustPortNumber;
public boolean equalsProxyGatewayStatusReport(ProxyGatewayStatusReport o) {
if(
o == null
) {return false;}
List<ProxyGatewayClientReport> targetClients =
Stream.of(o.getClients())
.sorted(ComparatorCompat.comparing(new Function<ProxyGatewayClientReport, UUID>(){
@Override
public UUID apply(ProxyGatewayClientReport t) {
return t.getId();
}
}))
.toList();
List<ProxyGatewayClientReport> clients =
Stream.of(getClients())
.sorted(ComparatorCompat.comparing(new Function<ProxyGatewayClientReport, UUID>(){
@Override
public UUID apply(ProxyGatewayClientReport t) {
return t.getId();
}
}))
.toList();
if(targetClients.size() != clients.size()) {return false;}
for(int i = 0; i < targetClients.size() && i < clients.size(); i++) {
if(!targetClients.get(i).equals(clients.get(i))) {return false;}
}
return true;
}
}
|
[
"neko38ch@gmail.com"
] |
neko38ch@gmail.com
|
9ec41ab3d11b1aa9c424ca865c9697815e6dd846
|
d18af2a6333b1a868e8388f68733b3fccb0b4450
|
/java/src/com/google/android/gms/games/internal/GamesClientImpl$LoadAppContentsResultImpl.java
|
a50dfc4c74fa87d0ac12e296fa431ae2e79dc31f
|
[] |
no_license
|
showmaxAlt/showmaxAndroid
|
60576436172495709121f08bd9f157d36a077aad
|
d732f46d89acdeafea545a863c10566834ba1dec
|
refs/heads/master
| 2021-03-12T20:01:11.543987
| 2015-08-19T20:31:46
| 2015-08-19T20:31:46
| 41,050,587
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 714
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.android.gms.games.internal;
import com.google.android.gms.common.data.DataHolder;
import java.util.ArrayList;
import java.util.Arrays;
// Referenced classes of package com.google.android.gms.games.internal:
// GamesClientImpl
private static final class zzaeo extends zzaeo
implements com.google.android.gms.games.appcontent.aeo
{
private final ArrayList zzaeo;
(DataHolder adataholder[])
{
super(adataholder[0]);
zzaeo = new ArrayList(Arrays.asList(adataholder));
}
}
|
[
"invisible@example.com"
] |
invisible@example.com
|
b4dce08a790a93fbc9f2e8fc8afd90514a3fb992
|
2100f24c022d6247850a8a73d8bcb402a6f242bc
|
/app/src/main/java/com/example/checkboxlist/Adapter.java
|
bd9ebfe4f2c8634d84689c06986d3f6c9a8310df
|
[] |
no_license
|
mosayeb-masoumi/CheckBoxListAllSelected
|
f1d26ae4941af7b8e7f3b91c44ed711773d1aa4d
|
2f82c30a6611669758e798b0b2ff94f86e75f205
|
refs/heads/master
| 2020-09-25T20:28:47.112805
| 2019-12-05T11:06:30
| 2019-12-05T11:06:30
| 226,082,057
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,735
|
java
|
package com.example.checkboxlist;
import android.content.Context;
import android.support.annotation.NonNull;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.TextView;
import java.util.List;
public class Adapter extends RecyclerView.Adapter<Adapter.ViewHolder> {
List<Model> listnames;
Context context;
Boolean state;
public Adapter(List<Model> listnames, Context context, Boolean state) {
this.listnames = listnames;
this.context = context;
this.state = state;
}
@NonNull
@Override
public Adapter.ViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int i) {
View view= LayoutInflater.from(parent.getContext()).inflate(R.layout.row,parent,false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(@NonNull Adapter.ViewHolder holder, int position) {
Model model = listnames.get(position);
holder.txt_name.setText(model.getName());
if(state){ // if checkbox All clicked, set All checkboxes checked
holder.checkBox.setChecked(true);
}else{
holder.checkBox.setChecked(false);
}
}
@Override
public int getItemCount() {
return listnames.size();
}
public class ViewHolder extends RecyclerView.ViewHolder {
TextView txt_name;
CheckBox checkBox;
public ViewHolder(@NonNull View itemView) {
super(itemView);
txt_name=itemView.findViewById(R.id.txt_row);
checkBox=itemView.findViewById(R.id.chkbox_row);
}
}
}
|
[
"mosayeb.masoumi.co@gmail.com"
] |
mosayeb.masoumi.co@gmail.com
|
5d7a952dd6322478a7afd15421b1987892db0e35
|
ca030864a3a1c24be6b9d1802c2353da4ca0d441
|
/classes8.dex_source_from_JADX/com/facebook/search/results/filters/model/SearchResultPageMainFilterConverter.java
|
8ae23c4afc758085148091b43c6e5d09a41c3e50
|
[] |
no_license
|
pxson001/facebook-app
|
87aa51e29195eeaae69adeb30219547f83a5b7b1
|
640630f078980f9818049625ebc42569c67c69f7
|
refs/heads/master
| 2020-04-07T20:36:45.758523
| 2018-03-07T09:04:57
| 2018-03-07T09:04:57
| 124,208,458
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,654
|
java
|
package com.facebook.search.results.filters.model;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsInterfaces.SearchResultPageMainFilterFragment;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsInterfaces.SearchResultPageMainFilterFragment.MainFilter;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsModels.SearchResultPageFilterValueNodeFragmentModel;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsModels.SearchResultPageFilterValuesFragmentModel.FilterValuesModel;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsModels.SearchResultPageFilterValuesFragmentModel.FilterValuesModel.EdgesModel;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsModels.SearchResultPageMainFilterFragmentModel;
import com.facebook.search.results.protocol.filters.SearchResultPageFilterFragmentsModels.SearchResultPageMainFilterFragmentModel.MainFilterModel;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableList.Builder;
import javax.inject.Singleton;
@Singleton
/* compiled from: SLIDESHOW_PREVIEW_STOP */
public class SearchResultPageMainFilterConverter {
private static volatile SearchResultPageMainFilterConverter f22859a;
public static com.facebook.search.results.filters.model.SearchResultPageMainFilterConverter m26515a(@javax.annotation.Nullable com.facebook.inject.InjectorLike r5) {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.JadxRuntimeException: Can't find immediate dominator for block B:24:0x003a in {17, 19, 21, 23, 26, 28} preds:[]
at jadx.core.dex.visitors.blocksmaker.BlockProcessor.computeDominators(BlockProcessor.java:129)
at jadx.core.dex.visitors.blocksmaker.BlockProcessor.processBlocksTree(BlockProcessor.java:48)
at jadx.core.dex.visitors.blocksmaker.BlockProcessor.rerun(BlockProcessor.java:44)
at jadx.core.dex.visitors.blocksmaker.BlockFinallyExtract.visit(BlockFinallyExtract.java:57)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
at jadx.core.ProcessClass.process(ProcessClass.java:37)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:199)
*/
/*
r0 = f22859a;
if (r0 != 0) goto L_0x0031;
L_0x0004:
r1 = com.facebook.search.results.filters.model.SearchResultPageMainFilterConverter.class;
monitor-enter(r1);
r0 = f22859a; Catch:{ all -> 0x0039 }
if (r0 != 0) goto L_0x0030; Catch:{ all -> 0x0039 }
L_0x000b:
if (r5 == 0) goto L_0x0030; Catch:{ all -> 0x0039 }
L_0x000d:
r2 = com.facebook.inject.ScopeSet.a(); Catch:{ all -> 0x0039 }
r3 = r2.b(); Catch:{ all -> 0x0039 }
r0 = com.facebook.inject.SingletonScope.class; Catch:{ all -> 0x0039 }
r0 = r5.getInstance(r0); Catch:{ all -> 0x0039 }
r0 = (com.facebook.inject.SingletonScope) r0; Catch:{ all -> 0x0039 }
r4 = r0.enterScope(); Catch:{ all -> 0x0039 }
r5.getApplicationInjector(); Catch:{ all -> 0x0034 }
r0 = m26514a(); Catch:{ all -> 0x0034 }
f22859a = r0; Catch:{ all -> 0x0034 }
com.facebook.inject.SingletonScope.a(r4);
r2.c(r3);
L_0x0030:
monitor-exit(r1); Catch:{ }
L_0x0031:
r0 = f22859a;
return r0;
L_0x0034:
r0 = move-exception;
com.facebook.inject.SingletonScope.a(r4); Catch:{ all -> 0x0034 }
throw r0; Catch:{ all -> 0x0034 }
L_0x0039:
r0 = move-exception;
r2.c(r3); Catch:{ all -> 0x0039 }
throw r0; Catch:{ all -> 0x0039 }
L_0x003e:
r0 = move-exception;
monitor-exit(r1); Catch:{ all -> 0x0039 }
throw r0;
*/
throw new UnsupportedOperationException("Method not decompiled: com.facebook.search.results.filters.model.SearchResultPageMainFilterConverter.a(com.facebook.inject.InjectorLike):com.facebook.search.results.filters.model.SearchResultPageMainFilterConverter");
}
private static SearchResultPageMainFilterConverter m26514a() {
return new SearchResultPageMainFilterConverter();
}
public static ImmutableList<? extends MainFilter> m26516a(ImmutableList<? extends SearchResultPageMainFilterFragment> immutableList) {
if (immutableList == null) {
return null;
}
Builder builder = new Builder();
int size = immutableList.size();
for (int i = 0; i < size; i++) {
builder.c(m26517b(((SearchResultPageMainFilterFragmentModel) immutableList.get(i)).m10196a()));
}
return builder.b();
}
private static MainFilterModel m26517b(MainFilterModel mainFilterModel) {
boolean z = true;
int i = 0;
if (mainFilterModel.m10186c() == null) {
return mainFilterModel;
}
ImmutableList a = mainFilterModel.m10187d().m10165a();
int size = a.size();
int i2 = 0;
boolean z2 = false;
while (i2 < size) {
boolean z3;
if (((EdgesModel) a.get(i2)).m10160a().m10147a()) {
z3 = true;
} else {
z3 = z2;
}
i2++;
z2 = z3;
}
SearchResultPageFilterValueNodeFragmentModel.Builder builder = new SearchResultPageFilterValueNodeFragmentModel.Builder();
if (z2) {
z = false;
}
builder.f8695a = z;
builder.f8696b = mainFilterModel.m10186c();
builder.f8697c = "default";
SearchResultPageFilterValueNodeFragmentModel a2 = builder.m10140a();
EdgesModel.Builder builder2 = new EdgesModel.Builder();
builder2.f8702a = a2;
EdgesModel a3 = builder2.m10153a();
Builder builder3 = new Builder();
builder3.c(a3);
ImmutableList a4 = mainFilterModel.m10187d().m10165a();
i2 = a4.size();
while (i < i2) {
builder3.c(EdgesModel.m10156a((EdgesModel) a4.get(i)));
i++;
}
FilterValuesModel.Builder builder4 = new FilterValuesModel.Builder();
builder4.f8701a = builder3.b();
FilterValuesModel a5 = builder4.m10151a();
MainFilterModel.Builder a6 = MainFilterModel.Builder.m10177a(MainFilterModel.m10181a(mainFilterModel));
a6.f8710c = a5;
return a6.m10178a();
}
}
|
[
"son.pham@jmango360.com"
] |
son.pham@jmango360.com
|
1d98ef3f67815993963710f698a03af2c4e3e2cb
|
678a3d58c110afd1e9ce195d2f20b2531d45a2e0
|
/sources/com/airbnb/android/managelisting/picker/ManageListingPickerEpoxyController$$Lambda$3.java
|
15c74e72da8ce94bfdd65d381ca809f8d389f51e
|
[] |
no_license
|
jasonnth/AirCode
|
d1c37fb9ba3d8087efcdd9fa2103fb85d13735d5
|
d37db1baa493fca56f390c4205faf5c9bbe36604
|
refs/heads/master
| 2020-07-03T08:35:24.902940
| 2019-08-12T03:34:56
| 2019-08-12T03:34:56
| 201,842,970
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,047
|
java
|
package com.airbnb.android.managelisting.picker;
import android.view.View;
import android.view.View.OnClickListener;
import com.airbnb.android.core.models.ListingPickerInfo;
final /* synthetic */ class ManageListingPickerEpoxyController$$Lambda$3 implements OnClickListener {
private final ManageListingPickerEpoxyController arg$1;
private final ListingPickerInfo arg$2;
private ManageListingPickerEpoxyController$$Lambda$3(ManageListingPickerEpoxyController manageListingPickerEpoxyController, ListingPickerInfo listingPickerInfo) {
this.arg$1 = manageListingPickerEpoxyController;
this.arg$2 = listingPickerInfo;
}
public static OnClickListener lambdaFactory$(ManageListingPickerEpoxyController manageListingPickerEpoxyController, ListingPickerInfo listingPickerInfo) {
return new ManageListingPickerEpoxyController$$Lambda$3(manageListingPickerEpoxyController, listingPickerInfo);
}
public void onClick(View view) {
this.arg$1.listener.manageListing(this.arg$2.getId());
}
}
|
[
"thanhhuu2apc@gmail.com"
] |
thanhhuu2apc@gmail.com
|
01930140215330604272466c55d36895fcecdc7f
|
54c6bf3179cce122a1baaa2b070c465bc3c255b6
|
/app/src/main/java/co/ke/bsl/ui/views/widgets/CoffeeGrowerMarketingAgentListAdapter.java
|
f05fecd27569832476812e9a81f222a5e48278d3
|
[] |
no_license
|
koskcom/navigationdrawer
|
27a65d5bba315517e1fcc89c4828a1b5bfdd8926
|
275fb599c6953a30c0dac03ee01770aaa4579a04
|
refs/heads/master
| 2022-12-10T08:00:07.336464
| 2020-09-14T06:46:51
| 2020-09-14T06:46:51
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,528
|
java
|
package co.ke.bsl.ui.views.widgets;
import android.app.Activity;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;
import java.util.ArrayList;
import co.ke.bsl.R;
import co.ke.bsl.data.model.CoffeeGrowerMarketingAgent;
import co.ke.bsl.pojo.CoffeeGrowerMarketingAgentDetails;
public class CoffeeGrowerMarketingAgentListAdapter extends BaseAdapter {
Activity context;
private ArrayList<CoffeeGrowerMarketingAgentDetails> coffeeGrowerMarketingAgentDetailsArrayList;
private LayoutInflater inflater = null;
public CoffeeGrowerMarketingAgentListAdapter(Activity context, ArrayList<CoffeeGrowerMarketingAgentDetails> coffeeGrowerMarketingAgentDetailsArrayList) {
inflater= (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
this.coffeeGrowerMarketingAgentDetailsArrayList = coffeeGrowerMarketingAgentDetailsArrayList;
}
@Override
public int getCount() {
return coffeeGrowerMarketingAgentDetailsArrayList.size();
}
@Override
public Object getItem(int position) {
return coffeeGrowerMarketingAgentDetailsArrayList.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
View itemview = convertView;
itemview = (itemview == null) ? inflater.inflate(R.layout.coffee_grower_list_row, null) : itemview;
TextView textviewdocument_no = (TextView) itemview.findViewById(R.id.tv_cg_document_number);
TextView textviewdocument_date = (TextView) itemview.findViewById(R.id.tv_cg_document_date);
TextView textviewlicence_number = (TextView) itemview.findViewById(R.id.tv_cg_licence_number);
TextView textviewapplicant_name = (TextView) itemview.findViewById(R.id.tv_cg_name_of_applicant);
CoffeeGrowerMarketingAgentDetails selecteditem = coffeeGrowerMarketingAgentDetailsArrayList.get(position);
textviewdocument_no.setText("Document Number: "+ selecteditem.getDocumentNumber());
textviewdocument_date.setText("Document Date: "+ selecteditem.getDocumentDate());
textviewlicence_number.setText("Licence Number: "+ selecteditem.getLicenceNumber());
textviewapplicant_name.setText("Applicant Name: "+ selecteditem.getApplicantName());
return itemview;
}
}
|
[
"hosea.koskei@briskbusiness.co.ke"
] |
hosea.koskei@briskbusiness.co.ke
|
899fe3af6461b61e447a1800a849c65ef9c59726
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Cli-36/org.apache.commons.cli.OptionGroup/BBC-F0-opt-50/tests/16/org/apache/commons/cli/OptionGroup_ESTest.java
|
3868a2393a778d7ab17e2db19d35ca15d8fba2d0
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 5,491
|
java
|
/*
* This file was automatically generated by EvoSuite
* Wed Oct 20 23:30:24 GMT 2021
*/
package org.apache.commons.cli;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.util.Collection;
import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionGroup;
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)
public class OptionGroup_ESTest extends OptionGroup_ESTest_scaffolding {
@Test(timeout = 4000)
public void test00() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setRequired(true);
boolean boolean0 = optionGroup0.isRequired();
assertTrue(boolean0);
}
@Test(timeout = 4000)
public void test01() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("a", false, "a");
optionGroup0.setSelected(option0);
String string0 = optionGroup0.getSelected();
assertEquals("a", string0);
}
@Test(timeout = 4000)
public void test02() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("", "");
optionGroup0.setSelected(option0);
String string0 = optionGroup0.getSelected();
assertEquals("", string0);
}
@Test(timeout = 4000)
public void test03() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setRequired(true);
Option option0 = new Option("", "");
optionGroup0.addOption(option0);
assertTrue(optionGroup0.isRequired());
}
@Test(timeout = 4000)
public void test04() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
// Undeclared exception!
try {
optionGroup0.addOption((Option) null);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.apache.commons.cli.OptionGroup", e);
}
}
@Test(timeout = 4000)
public void test05() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Collection<Option> collection0 = optionGroup0.getOptions();
assertNotNull(collection0);
}
@Test(timeout = 4000)
public void test06() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("NqZED", "Poo", false, "/");
Option option1 = new Option("Poo", false, "NqZED");
OptionGroup optionGroup1 = optionGroup0.addOption(option0);
optionGroup0.addOption(option1);
String string0 = optionGroup1.toString();
assertEquals("[-Poo NqZED, -NqZED /]", string0);
}
@Test(timeout = 4000)
public void test07() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("NqZED", "Poo", false, "/");
option0.setDescription((String) null);
OptionGroup optionGroup1 = optionGroup0.addOption(option0);
String string0 = optionGroup1.toString();
assertEquals("[-NqZED]", string0);
}
@Test(timeout = 4000)
public void test08() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option((String) null, ".v,@", false, "");
optionGroup0.addOption(option0);
String string0 = optionGroup0.toString();
assertEquals("[--.v,@ ]", string0);
}
@Test(timeout = 4000)
public void test09() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("a", false, "a");
Option option1 = new Option((String) null, ".v,@", false, "");
optionGroup0.setSelected(option0);
try {
optionGroup0.setSelected(option1);
fail("Expecting exception: Exception");
} catch(Exception e) {
//
// The option '.v,@' was specified but an option from this group has already been selected: 'a'
//
verifyException("org.apache.commons.cli.OptionGroup", e);
}
}
@Test(timeout = 4000)
public void test10() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
optionGroup0.setSelected((Option) null);
assertFalse(optionGroup0.isRequired());
}
@Test(timeout = 4000)
public void test11() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Option option0 = new Option("i", "i", false, "i");
optionGroup0.setSelected(option0);
optionGroup0.setSelected(option0);
assertFalse(option0.hasArg());
}
@Test(timeout = 4000)
public void test12() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
String string0 = optionGroup0.getSelected();
assertNull(string0);
}
@Test(timeout = 4000)
public void test13() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
Collection<String> collection0 = optionGroup0.getNames();
assertNotNull(collection0);
}
@Test(timeout = 4000)
public void test14() throws Throwable {
OptionGroup optionGroup0 = new OptionGroup();
boolean boolean0 = optionGroup0.isRequired();
assertFalse(boolean0);
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
e1d4c87170515c8f9146db07fac8b147e39c0927
|
beeb82e3a71c6dc8f4d4e095a1fbf56ee689f013
|
/Interfaces and Abstraction Exercise/src/multipleImplementation/Citizen.java
|
64f8b7022f83e76d3f1a4e795196b3a829027c4e
|
[] |
no_license
|
YankoMarkov/Java-OOP-Advanced
|
491eff4d3b894586a8c534e7aee2d81ae7b38222
|
1cb61f1d4a5da360bca15357342bb0c7ab82394f
|
refs/heads/master
| 2021-04-28T17:29:05.892153
| 2018-02-17T12:32:25
| 2018-02-17T12:32:25
| 121,852,950
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 588
|
java
|
package multipleImplementation;
class Citizen implements Person, Identifiable, Birthable {
private String name;
private int age;
private String id;
private String birthdate;
public Citizen(String name, int age, String id, String birthdate) {
this.name = name;
this.age = age;
this.id = id;
this.birthdate = birthdate;
}
@Override
public String getName() {
return this.name;
}
@Override
public int getAge() {
return this.age;
}
@Override
public String birthdate() {
return this.birthdate;
}
@Override
public String id() {
return this.id;
}
}
|
[
"yanmark@gmail.com"
] |
yanmark@gmail.com
|
993f7299b1987ebb97bf513dc01c087703409d97
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_9237bab1ea6c873da395601f2a8c5a611c4b006f/AsynchronousFutureTask/6_9237bab1ea6c873da395601f2a8c5a611c4b006f_AsynchronousFutureTask_t.java
|
a3c25f224495c35e277c414f0bf8896356c0662c
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 1,372
|
java
|
package org.inigma.shared.job;
import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedList;
import java.util.concurrent.Callable;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
class AsynchronousFutureTask<V> extends FutureTask<V> {
private final Method method;
private final Object[] args;
private final AsynchronousCallback<V> callback;
public AsynchronousFutureTask(AsynchronousCallback<V> callback, final Object instance, final Method method, final Object... args) {
super(new Callable<V>() {
@Override
public V call() throws Exception {
method.setAccessible(true);
return (V) method.invoke(instance, args);
}
});
this.method = method;
this.args = args;
this.callback = callback;
}
public Collection<Object> getArguments() {
if (args == null) {
return new LinkedList<Object>();
}
return Arrays.asList(args);
}
public AsynchronousCallback<V> getCallback() {
return callback;
}
public Method getMethod() {
return method;
}
public String toString() {
return String.format("%s(%s)", getMethod(), getArguments());
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
589f6b6656ad00fafccf09632264ff91f4f95b90
|
3cfe336dc46eb9b32a4ef2b64c5d30b889797a52
|
/src/test/java/stepdefinition/All_User_Steps.java
|
d18978368755f7b5fa4f93877a1c6e41391e50f8
|
[] |
no_license
|
meetmmpatel/RestAPI_DataDriven_APP
|
2ac7990769570af5ae5031feff1481d49964a93d
|
99dc1a3f999b1343ab6af823391f20af5c0cccb0
|
refs/heads/main
| 2023-03-12T16:32:38.665666
| 2021-02-26T20:33:57
| 2021-02-26T20:33:57
| 341,341,934
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,956
|
java
|
package stepdefinition;
import cucumber.api.PendingException;
import cucumber.api.java.en.Given;
import cucumber.api.java.en.Then;
import cucumber.api.java.en.When;
import io.restassured.http.ContentType;
import main.CucumberRunner;
import static io.restassured.RestAssured.*; //given and when and them...
import io.restassured.response.Response; //for Response class
import org.json.simple.JSONObject;
import org.testng.Assert;
import static org.hamcrest.Matchers.*; // is , assertThat() and more
public class All_User_Steps extends CucumberRunner {
//API request related variables
String USER_EndPoint = "https://gorest.co.in/public-api/users";
int ID;
String headerName = "Authorization";
String headerToken = "Bearer cb61dc72753d2e6f251cac66e79e98d1a01a6c12f10038b3c93655ebca389d67";
//Rest Assured variables
Response response;
@Given("^User API is working as expected with status code (\\d+)$")
public void user_API_is_working_as_expected_with_status_code(int STATUS_CODE) {
given()
.when()
.get(USER_EndPoint)
.then()
.assertThat()
.statusCode(STATUS_CODE);
}
@When("^System request POST method with \"([^\"]*)\", \"([^\"]*)\", \"([^\"]*)\", \"([^\"]*)\"$")
public void system_request_POST_method_with(String EMAIL, String NAME, String GENDER, String STATUS) {
//Create User with Body as post request
JSONObject user = new JSONObject();
user.put("email", EMAIL);
user.put("name", NAME);
user.put("gender", GENDER);
user.put("status", STATUS);
//Making POST Request
response = given().header(headerName, headerToken).contentType(ContentType.JSON)
.body(user)
.when().post(USER_EndPoint);
//Logging POST response
response.then().log().body();
}
@When("^User API is returning (\\d+) with POST response$")
public void user_API_is_returning_with_POST_response(int STATUS_CODE) {
//Validating POST status code
response.then().body("code", is(STATUS_CODE));
ID = response.getBody().jsonPath().getInt("data.id");
}
@When("^User API is returning (\\d+) with GET by ID response and \"([^\"]*)\", \"([^\"]*)\", \"([^\"]*)\", \"" +
"([^\"]*)\"$")
public void user_API_is_returning_with_GET_by_ID_response_and(int STATUS_CODE, String EMAIL, String NAME,
String GENDER,
String STATUS) {
//Making GET with ID call to User api
response = given().header(headerName, headerToken)
.contentType(ContentType.JSON)
.when().get(USER_EndPoint + "/" + ID);
//Get the GET by ID response we are validating email, name, gender and status
String email = response.getBody().jsonPath().getString("data.email");
String name = response.getBody().jsonPath().getString("data.name");
String gender = response.getBody().jsonPath().getString("data.gender");
String status = response.getBody().jsonPath().getString("data.status");
Assert.assertEquals(STATUS_CODE, response.getBody().jsonPath().getInt("code"));
Assert.assertEquals(EMAIL, email);
Assert.assertEquals(NAME, name);
Assert.assertEquals(GENDER, gender);
Assert.assertEquals(STATUS, status);
response.prettyPrint();
}
@Then("^System will request PUT to Update user's \"([^\"]*)\", \"([^\"]*)\", \"([^\"]*)\" and \"([^\"]*)\"$")
public void systemWillRequestPUTToUpdateUserSAnd(String NAME, String GENDER, String UPDATED_EMAIL,
String UPDATED_STATUS) {
//Create User with Body as post request
JSONObject user = new JSONObject();
user.put("email", UPDATED_EMAIL);
user.put("name", NAME);
user.put("gender", GENDER);
user.put("status", UPDATED_STATUS);
//Making POST Request
response = given().header(headerName, headerToken).contentType(ContentType.JSON)
.body(user)
.when().put(USER_EndPoint);
//Logging POST response
response.then().log().body();
}
@Then("^User API is returning (\\d+) status code in response with user's \"([^\"]*)\" and \"([^\"]*)\"$")
public void user_API_is_returning_status_code_in_response_with_user_s_and(int STATUS_CODE, String UPDATED_EMAIL,
String UPDATED_STATUS) {
String email = response.getBody().jsonPath().getString("data.email");
String status = response.getBody().jsonPath().getString("data.status");
Assert.assertEquals(UPDATED_EMAIL, email);
Assert.assertEquals(UPDATED_STATUS, status);
Assert.assertEquals(STATUS_CODE, response.getBody().jsonPath().getInt("code"));
}
@Then("^Finally System will request Delete User with given ID$")
public void finally_System_will_request_Delete_User_with_given_ID() {
//Delete User with given ID
response = given()
.header(headerName, headerToken)
.and()
.when().delete(USER_EndPoint + "/" + ID);
}
@Then("^System should return (\\d+) as status code$")
public void system_should_return_as_status_code(int STATUS_CODE) {
//Validating status code with response
Assert.assertEquals(STATUS_CODE, response.getBody().jsonPath().getInt("code"));
response.prettyPrint();
}
}
|
[
"meetmmpatel@gmail.com"
] |
meetmmpatel@gmail.com
|
24f54437a6c8792542036824dc503a174ab13ce5
|
29cc0eeb342dcbfbfe056f3065fe8a6463f0223d
|
/KitchenSink/src/com/marakana/LoggerActivity.java
|
34023ec15abd7de92f4907d3f5d1c6cc1ba54c62
|
[] |
no_license
|
mgargenta/android-demos
|
ade142cc723ca666999ec8713834bc6bb7f06c68
|
f1ac09fb20a294eb24da8bc62ab182bf72eee3ca
|
refs/heads/master
| 2018-12-28T06:46:41.581952
| 2011-11-08T23:01:57
| 2011-11-08T23:01:57
| 2,101,693
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,265
|
java
|
package com.marakana;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.os.RemoteException;
import android.util.Log;
import android.widget.TextView;
public class LoggerActivity extends Activity {
static final String TAG = "LoggerActivity";
TextView textOut;
ServiceConnection connection;
ILogger logger;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.standard);
Log.d(TAG, "onCreated started: " + System.currentTimeMillis());
// Find views
((TextView) findViewById(R.id.textTitle)).setText("Logger");
textOut = (TextView) findViewById(R.id.textOut);
// Define the connection handler for this remote service
connection = new ServiceConnection() {
// Called when we get remote service connection
public void onServiceConnected(ComponentName name, IBinder binder) {
logger = ILogger.Stub.asInterface(binder);
// Use remote service
try {
long id = logger.log("LoggerActivity", "Connected to LoggerService");
textOut.setText("Logger connected and logged id: " + id);
Log.d(TAG, "onServiceConnected: " + System.currentTimeMillis());
} catch (RemoteException e) {
e.printStackTrace();
}
}
// Called when remote service drops the connection
public void onServiceDisconnected(ComponentName name) {
logger = null;
Log.d(TAG, "onServiceDisconnected: " + System.currentTimeMillis());
}
};
// Bind to the remote service
bindService(new Intent("SandiaRemoteService"), connection, BIND_AUTO_CREATE);
Log.d(TAG, "onCreated done: " + System.currentTimeMillis());
}
@Override
public void onResume() {
super.onResume();
Log.d(TAG, "onResume: " + System.currentTimeMillis());
if (logger == null)
return;
long id = -1;
try {
id = logger.log("LoggerActivity", "Logged in onResume");
} catch (RemoteException e) {
e.printStackTrace();
}
textOut.setText("Logger in onResume id: " + id);
}
}
|
[
"marko@marakana.com"
] |
marko@marakana.com
|
037d60e504c64c3c3a6ca1015e74e07efde25679
|
93ba8ba8774eead569eda9930205bc15c67dc453
|
/JavaProgramming/src/ch09/exam08/Button.java
|
5748174112a5a0fe602bb06360e5d972b2e52ddc
|
[] |
no_license
|
SmileJM/TestRepository
|
f51829c17916b5b303ecb04fa5675fab36425fd2
|
1d907100cd9b89b2ff1e4aa3932e11ed5a87c2ec
|
refs/heads/master
| 2021-01-20T00:46:08.192028
| 2017-08-25T09:06:18
| 2017-08-25T09:06:18
| 89,182,177
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 369
|
java
|
package ch09.exam08;
public class Button {
private OnClickListener onClickListener;
public void setOnClickListener(OnClickListener onClickListener) {
this.onClickListener = onClickListener;
}
public void touch() {
if(onClickListener != null) {
onClickListener.onClick();
}
}
// Nested Interface
interface OnClickListener {
void onClick();
}
}
|
[
"lovelyeu@hanmail.net"
] |
lovelyeu@hanmail.net
|
84974e12ea9daa7a465d105637a6b0f8f4258bda
|
6811fd178ae01659b5d207b59edbe32acfed45cc
|
/jira-project/jira-components/jira-api/src/main/java/com/atlassian/jira/event/notification/NotificationSchemeAddedToProjectEvent.java
|
20d2de4abe610739a45746ba53ffde739ef707b1
|
[] |
no_license
|
xiezhifeng/mysource
|
540b09a1e3c62614fca819610841ddb73b12326e
|
44f29e397a6a2da9340a79b8a3f61b3d51e331d1
|
refs/heads/master
| 2023-04-14T00:55:23.536578
| 2018-04-19T11:08:38
| 2018-04-19T11:08:38
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 573
|
java
|
package com.atlassian.jira.event.notification;
import javax.annotation.Nonnull;
import com.atlassian.annotations.Internal;
import com.atlassian.jira.event.scheme.AbstractSchemeAddedToProjectEvent;
import com.atlassian.jira.project.Project;
import com.atlassian.jira.scheme.Scheme;
/**
* @since v6.2
*/
public class NotificationSchemeAddedToProjectEvent extends AbstractSchemeAddedToProjectEvent
{
@Internal
public NotificationSchemeAddedToProjectEvent(@Nonnull final Scheme scheme, @Nonnull final Project project)
{
super(scheme, project);
}
}
|
[
"moink635@gmail.com"
] |
moink635@gmail.com
|
30e94b4e3714226aa2149b25160d900f13ca9361
|
593a6a0044f3b6189e32ba3f5e1d946f91c12632
|
/src/main/java/com/yangc/bridge/bean/TBridgeChat.java
|
c173685cc35316becc86a0fb8ecf338a2899c46d
|
[] |
no_license
|
aluozx/com.yangc.bridge
|
03b02474b8b5ea9d7185af8deda86b5df19a8dc2
|
18905a63c8357d637d575e68d9e333deaf866be5
|
refs/heads/master
| 2021-01-18T14:53:42.009432
| 2014-09-04T17:27:49
| 2014-09-04T17:27:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,052
|
java
|
package com.yangc.bridge.bean;
import com.yangc.bean.BaseBean;
public class TBridgeChat extends BaseBean {
private static final long serialVersionUID = -8248931483988118867L;
private String uuid;
private String from;
private String to;
private String data;
private Long status;
private long millisecond;
public String getUuid() {
return uuid;
}
public void setUuid(String uuid) {
this.uuid = uuid;
}
public String getFrom() {
return from;
}
public void setFrom(String from) {
this.from = from;
}
public String getTo() {
return to;
}
public void setTo(String to) {
this.to = to;
}
public String getData() {
return data;
}
public void setData(String data) {
this.data = data;
}
public Long getStatus() {
return status;
}
public void setStatus(Long status) {
this.status = status;
}
public long getMillisecond() {
return millisecond;
}
public void setMillisecond(long millisecond) {
this.millisecond = millisecond;
}
}
|
[
"yangchen_java@126.com"
] |
yangchen_java@126.com
|
83f54795e5a3cc114184f014e0c62aec6c486421
|
443928d406ef51efd35020de050decd8151dae9b
|
/asnlab-uper/src/main/java/com/hisense/hiatmp/asn/v2x/MapNode/MapNode.java
|
8a07c43b35daed25fea55e7f9dd2669ff39d9dfb
|
[
"Apache-2.0"
] |
permissive
|
zyjohn0822/asn1-uper-v2x-se
|
ad430889ca9f3d42f2c083810df2a5bc7b18ec22
|
85f9bf98a12a57a04260282a9154f1b988de8dec
|
refs/heads/master
| 2023-04-21T11:44:34.222501
| 2021-05-08T08:23:27
| 2021-05-08T08:23:27
| 365,459,042
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,212
|
java
|
/*
* Generated by ASN.1 Java Compiler (https://www.asnlab.org/)
* From ASN.1 module "MapNode"
*/
package com.hisense.hiatmp.asn.v2x.MapNode;
import org.asnlab.asndt.runtime.conv.AsnConverter;
import org.asnlab.asndt.runtime.type.AsnModule;
import org.asnlab.asndt.runtime.type.AsnType;
import java.util.Vector;
public class MapNode extends AsnModule {
public final static MapNode instance = new MapNode();
/**
* /* Creates the ASN.1 module.
* /* The ASN.1 module instance is created automatically, clients must not call.
* /* A metadata file named MapNode.meta must exist in the same package of this class.
**/
private MapNode() {
super(MapNode.class);
}
public static AsnType type(int id) {
return instance.getType(id);
}
public static Object value(int valueId, AsnConverter converter) {
return instance.getValue(valueId, converter);
}
public static Object object(int objectId, AsnConverter converter) {
return instance.getObject(objectId, converter);
}
public static Vector objectSet(int objectSetId, AsnConverter converter) {
return instance.getObjectSet(objectSetId, converter);
}
}
|
[
"31430762+zyjohn0822@users.noreply.github.com"
] |
31430762+zyjohn0822@users.noreply.github.com
|
776c2397d624f504ca3139034aaadb9f4f74e1cd
|
a36dce4b6042356475ae2e0f05475bd6aed4391b
|
/2005/webcommon/com/hps/july/basestation/formbean/RegionsLookupListForm.java
|
9dd58cf7e6a795562c541d15e920fdb2f2da0bd7
|
[] |
no_license
|
ildar66/WSAD_NRI
|
b21dbee82de5d119b0a507654d269832f19378bb
|
2a352f164c513967acf04d5e74f36167e836054f
|
refs/heads/master
| 2020-12-02T23:59:09.795209
| 2017-07-01T09:25:27
| 2017-07-01T09:25:27
| 95,954,234
| 0
| 1
| null | null | null | null |
WINDOWS-1251
|
Java
| false
| false
| 2,850
|
java
|
package com.hps.july.basestation.formbean;
import com.hps.july.cdbc.lib.*;
import com.hps.july.cdbc.objects.*;
import javax.servlet.http.*;
import com.hps.july.persistence.*;
import java.util.*;
import com.hps.july.web.util.*;
import com.hps.july.util.*;
import org.apache.struts.action.*;
import com.hps.july.constants.*;
import org.apache.struts.util.*;
import com.hps.july.basestation.valueobject.*;
import com.hps.july.jdbcpersistence.lib.*;
import com.hps.july.siteinfo.valueobject.RegionsSelector;
/**
* Форма (лукап) выбора регионов для решения ГКРЧ с множественным выбором.
*/
public class RegionsLookupListForm
extends com.hps.july.web.util.BrowseForm
{
private boolean allSuperregions;
private int superregion = 1;
private String username;
private boolean admin;
private Integer order = new Integer(4);
public RegionsLookupListForm() {
super();
}
public String getBrowseBeanName() {
return "com.hps.july.cdbc.objects.CDBCRegionsObject";
}
public Object[] getFilterParams() {
//findRegions(Boolean useSuperregions, Integer[] superregions, String username, boolean admin)
return new Object[] {
new Boolean(!allSuperregions),
new Integer(getSuperregion()),
getUsername(),
new Boolean(isAdmin())
};
}
public java.lang.String getFinderMethodName() {
return "findRegionsLookup";
}
public Boolean getIsAdmin() {
return Boolean.TRUE;
}
public Integer getOrder() {
try {
Integer o = new Integer(Integer.parseInt(super.getFinderMethodName()));
order = o;
} catch(Exception e) {
}
return order;
}
public int getState() {
return com.hps.july.basestation.APPStates.REGIONS_LOOKUP;
}
public int getSuperregion() {
return superregion;
}
public Enumeration getSuperRegions()
{
try {
SuperRegionAccessBeanTable table = new SuperRegionAccessBeanTable();
table.setSuperRegionAccessBean(
new SuperRegionAccessBean().findAllOrderByCodeAsc());
if (superregion == 0) {
if(table.numberOfRows() > 0) {
superregion = table.getSuperRegionAccessBean(0).getSupregid();
}
}
return table.rows();
} catch(Exception e) {
Vector v = new Vector();
return v.elements();
}
}
public String getUsername() {
return username;
}
public boolean isAdmin() {
return admin;
}
public boolean isAllSuperregions() {
return allSuperregions;
}
public void setAllSuperregions(boolean newAllSuperregions) {
allSuperregions = newAllSuperregions;
}
public void setRequestData(HttpServletRequest request)
{
admin = request.isUserInRole("administrator");
username = request.getRemoteUser();
}
public void setSuperregion(int newSuperregion) {
superregion = newSuperregion;
}
public void validateValues(org.apache.struts.action.ActionErrors errors)
throws Exception
{
if (!errors.empty())
throw new ValidationException();
}
}
|
[
"ildar66@inbox.ru"
] |
ildar66@inbox.ru
|
ab601a2c44350631073a062216bd5f0a8825d19c
|
d66a4cbb0bb425b3d1bef9054e421a9ac1bf784b
|
/gmsc-app/app/src/main/java/cn/gmuni/sc/module/more/express/binding/Bind.java
|
43bcf978b154b5ee0270a0230c2b70e7b6832aca
|
[] |
no_license
|
zhuxin3230213/android
|
a0300e991189ba87d3617b8e2e316b1b616b9b1c
|
21c3faf7650de9c90cfe53e9af9bf200308e4282
|
refs/heads/master
| 2020-04-13T18:18:53.258699
| 2019-01-21T03:13:53
| 2019-01-21T03:13:53
| 161,720,843
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 389
|
java
|
package cn.gmuni.sc.module.more.express.binding;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* @Author: zhuxin
* @Date: 2018/9/28 11:15
* @Description:
*/
@Target(ElementType.FIELD)
@Retention(RetentionPolicy.RUNTIME)
public @interface Bind {
int value();
}
|
[
"zhuxin_123"
] |
zhuxin_123
|
88cc4c38f7d5c5632229c06078ef44faa2833d11
|
14045a848bebb658be3518c9b4c3ece66f992c0f
|
/content-center/src/test/java/com/itmuch/contentcenter/ContentCenterApplicationTests.java
|
1b1a9b8e3fbdb7dfe92e5db08d92a2c5f65fc3aa
|
[] |
no_license
|
zhangchao6018/springcloud-alibaba-demo
|
54d8fbff816bdec5e55fe8e0e925611321e272e8
|
7e2bf8d9473e2b8088e9d96d32f554fec485fa38
|
refs/heads/master
| 2022-07-16T20:46:04.165458
| 2020-01-11T03:48:08
| 2020-01-11T03:48:08
| 231,695,650
| 1
| 0
| null | 2022-06-21T02:34:12
| 2020-01-04T02:08:44
|
Java
|
UTF-8
|
Java
| false
| false
| 238
|
java
|
/*
package com.itmuch.contentcenter;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class ContentCenterApplicationTests {
@Test
void contextLoads() {
}
}
*/
|
[
"18910146715@163.com"
] |
18910146715@163.com
|
6e36797783f3d9e98bd4b70680d659fd1b66e7bd
|
2fa04f21cbb7203b468f7598df6696a88b05a286
|
/bus-image/src/main/java/org/aoju/bus/image/plugin/FixLO2UN.java
|
97fbefb9422e9edb8d23d34ef8db2bf466156c5b
|
[
"MIT"
] |
permissive
|
jingshuai5213/bus
|
17bb475fd76592682123488608a559abec788f81
|
f3ec545617acffaf2668ea78e974a05be268cfd1
|
refs/heads/master
| 2022-11-16T00:35:46.037858
| 2020-07-02T09:35:10
| 2020-07-02T09:35:10
| 254,873,385
| 0
| 0
|
MIT
| 2020-07-02T09:35:11
| 2020-04-11T13:26:50
| null |
UTF-8
|
Java
| false
| false
| 6,655
|
java
|
/*********************************************************************************
* *
* The MIT License (MIT) *
* *
* Copyright (c) 2015-2020 aoju.org and other contributors. *
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal *
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell *
* copies of the Software, and to permit persons to whom the Software is *
* furnished to do so, subject to the following conditions: *
* *
* The above copyright notice and this permission notice shall be included in *
* all copies or substantial portions of the Software. *
* *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, *
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN *
* THE SOFTWARE. *
********************************************************************************/
package org.aoju.bus.image.plugin;
import org.aoju.bus.logger.Logger;
import java.io.IOException;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.MappedByteBuffer;
import java.nio.channels.FileChannel;
import java.nio.file.*;
import java.nio.file.attribute.BasicFileAttributes;
import java.util.EnumSet;
/**
* @author Kimi Liu
* @version 6.0.1
* @since JDK 1.8+
*/
public class FixLO2UN extends SimpleFileVisitor<Path> {
private final ByteBuffer buffer = ByteBuffer.wrap(new byte[]{0x55, 0x4e, 0, 0, 0, 0, 0, 0})
.order(ByteOrder.LITTLE_ENDIAN);
private final Path srcPath;
private final Path destPath;
private final Dest dest;
private FixLO2UN(Path srcPath, Path destPath, Dest dest) {
this.srcPath = srcPath;
this.destPath = destPath;
this.dest = dest;
}
@Override
public FileVisitResult visitFile(Path srcFile, BasicFileAttributes attrs) throws IOException {
Path dstFile = dest.dstFile(srcFile, srcPath, destPath);
Path dstDir = dstFile.getParent();
if (dstDir != null) Files.createDirectories(dstDir);
try (FileChannel ifc = (FileChannel) Files.newByteChannel(srcFile, EnumSet.of(StandardOpenOption.READ));
FileChannel ofc = (FileChannel) Files.newByteChannel(dstFile,
EnumSet.of(StandardOpenOption.WRITE, StandardOpenOption.CREATE_NEW))) {
MappedByteBuffer mbb = ifc.map(FileChannel.MapMode.READ_ONLY, 0, ifc.size());
mbb.order(ByteOrder.LITTLE_ENDIAN);
mbb.mark();
int length;
while ((length = correctLength(mbb)) > 0) {
int position = mbb.position();
Logger.info(" %d: (%02X%02X,%02X%02X) LO #%d -> UN #%d%n",
position - 6,
mbb.get(position - 5),
mbb.get(position - 6),
mbb.get(position - 3),
mbb.get(position - 4),
length & 0xfff,
length);
mbb.reset().limit(position - 2);
ofc.write(mbb);
buffer.putInt(4, length).rewind();
ofc.write(buffer);
mbb.limit(position + 2 + length).position(position + 2);
ofc.write(mbb);
mbb.limit((int) ifc.size()).mark();
}
mbb.reset();
ofc.write(mbb);
}
return FileVisitResult.CONTINUE;
}
private int correctLength(MappedByteBuffer mbb) {
int length;
while (mbb.remaining() > 8) {
if (mbb.getShort() == 0x4f4c
&& mbb.get(mbb.position() - 3) == 0
&& mbb.get(mbb.position() - 6) % 2 != 0
&& !isVRCode(mbb.getShort(mbb.position() + 6 +
(length = mbb.getShort(mbb.position()) & 0xffff))))
return correctLength(mbb, length);
}
return 0;
}
private boolean isVRCode(int code) {
switch (code) {
case 0x4541:
case 0x5341:
case 0x5441:
case 0x5343:
case 0x4144:
case 0x5344:
case 0x5444:
case 0x4446:
case 0x4c46:
case 0x5349:
case 0x4f4c:
case 0x544c:
case 0x424f:
case 0x444f:
case 0x464f:
case 0x4c4f:
case 0x574f:
case 0x4e50:
case 0x4853:
case 0x4c53:
case 0x5153:
case 0x5353:
case 0x5453:
case 0x4d54:
case 0x4355:
case 0x4955:
case 0x4c55:
case 0x4e55:
case 0x5255:
case 0x5355:
case 0x5455:
return true;
}
return false;
}
private int correctLength(MappedByteBuffer mbb, int length) {
do {
length += 0x10000;
} while (!isVRCode(mbb.getShort(mbb.position() + 6 + length)));
return length;
}
private enum Dest {
FILE,
DIRECTORY {
@Override
Path dstFile(Path srcFile, Path srcPath, Path destPath) {
return destPath.resolve(srcFile == srcPath ? srcFile.getFileName() : srcPath.relativize(srcFile));
}
};
static Dest of(Path destPath) {
return Files.isDirectory(destPath) ? DIRECTORY : FILE;
}
Path dstFile(Path srcFile, Path srcPath, Path destPath) {
return destPath;
}
}
}
|
[
"839536@qq.com"
] |
839536@qq.com
|
487c1afcd011845613caacdaaa3bce8f7fb4fed7
|
e653e0815fdd8e3bdc26b4bc28468234d3d27939
|
/jadx-core/src/main/java/jadx/core/dex/visitors/ConstInlineVisitor.java
|
0556613a538f5aab55f6c6c2ba9e5c37ded7d5e8
|
[
"BSD-3-Clause",
"LGPL-2.1-only",
"EPL-1.0",
"CC-BY-2.5",
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0",
"MIT"
] |
permissive
|
muxiaofufeng/jadx
|
58ff4249c1a8b8b4e80dc292e7a3d191ffe2fb10
|
b76c8822102ac3703514ffaf23ec057167d4be1a
|
refs/heads/master
| 2022-12-18T05:09:29.196273
| 2020-09-28T16:33:08
| 2020-09-28T18:27:48
| 299,480,867
| 1
| 0
|
Apache-2.0
| 2020-09-29T02:13:03
| 2020-09-29T02:13:03
| null |
UTF-8
|
Java
| false
| false
| 7,369
|
java
|
package jadx.core.dex.visitors;
import java.util.ArrayList;
import java.util.List;
import jadx.core.dex.attributes.AFlag;
import jadx.core.dex.info.MethodInfo;
import jadx.core.dex.instructions.BaseInvokeNode;
import jadx.core.dex.instructions.ConstStringNode;
import jadx.core.dex.instructions.IndexInsnNode;
import jadx.core.dex.instructions.InsnType;
import jadx.core.dex.instructions.InvokeNode;
import jadx.core.dex.instructions.args.ArgType;
import jadx.core.dex.instructions.args.InsnArg;
import jadx.core.dex.instructions.args.LiteralArg;
import jadx.core.dex.instructions.args.PrimitiveType;
import jadx.core.dex.instructions.args.RegisterArg;
import jadx.core.dex.instructions.args.SSAVar;
import jadx.core.dex.nodes.BlockNode;
import jadx.core.dex.nodes.FieldNode;
import jadx.core.dex.nodes.InsnNode;
import jadx.core.dex.nodes.MethodNode;
import jadx.core.dex.visitors.ssa.SSATransform;
import jadx.core.dex.visitors.typeinference.TypeInferenceVisitor;
import jadx.core.utils.InsnRemover;
import jadx.core.utils.exceptions.JadxException;
@JadxVisitor(
name = "Constants Inline",
desc = "Inline constant registers into instructions",
runAfter = {
SSATransform.class,
MarkFinallyVisitor.class
},
runBefore = TypeInferenceVisitor.class
)
public class ConstInlineVisitor extends AbstractVisitor {
@Override
public void visit(MethodNode mth) throws JadxException {
if (mth.isNoCode()) {
return;
}
process(mth);
}
public static void process(MethodNode mth) {
List<InsnNode> toRemove = new ArrayList<>();
for (BlockNode block : mth.getBasicBlocks()) {
toRemove.clear();
for (InsnNode insn : block.getInstructions()) {
checkInsn(mth, insn, toRemove);
}
InsnRemover.removeAllAndUnbind(mth, block, toRemove);
}
}
private static void checkInsn(MethodNode mth, InsnNode insn, List<InsnNode> toRemove) {
if (insn.contains(AFlag.DONT_INLINE)
|| insn.contains(AFlag.DONT_GENERATE)
|| insn.getResult() == null) {
return;
}
SSAVar sVar = insn.getResult().getSVar();
InsnArg constArg;
InsnType insnType = insn.getType();
if (insnType == InsnType.CONST || insnType == InsnType.MOVE) {
constArg = insn.getArg(0);
if (!constArg.isLiteral()) {
return;
}
long lit = ((LiteralArg) constArg).getLiteral();
if (lit == 0 && forbidNullInlines(sVar)) {
// all usages forbids inlining
return;
}
} else if (insnType == InsnType.CONST_STR) {
if (sVar.isUsedInPhi()) {
return;
}
String s = ((ConstStringNode) insn).getString();
FieldNode f = mth.getParentClass().getConstField(s);
if (f == null) {
InsnNode copy = insn.copyWithoutResult();
constArg = InsnArg.wrapArg(copy);
} else {
InsnNode constGet = new IndexInsnNode(InsnType.SGET, f.getFieldInfo(), 0);
constArg = InsnArg.wrapArg(constGet);
constArg.setType(ArgType.STRING);
}
} else if (insnType == InsnType.CONST_CLASS) {
if (sVar.isUsedInPhi()) {
return;
}
constArg = InsnArg.wrapArg(insn.copyWithoutResult());
constArg.setType(ArgType.CLASS);
} else {
return;
}
if (checkForFinallyBlock(sVar)) {
return;
}
// all check passed, run replace
replaceConst(mth, insn, constArg, toRemove);
}
private static boolean checkForFinallyBlock(SSAVar sVar) {
List<SSAVar> ssaVars = sVar.getCodeVar().getSsaVars();
if (ssaVars.size() <= 1) {
return false;
}
int countInsns = 0;
int countFinallyInsns = 0;
for (SSAVar ssaVar : ssaVars) {
for (RegisterArg reg : ssaVar.getUseList()) {
InsnNode parentInsn = reg.getParentInsn();
if (parentInsn != null) {
countInsns++;
if (parentInsn.contains(AFlag.FINALLY_INSNS)) {
countFinallyInsns++;
}
}
}
}
return countFinallyInsns != 0 && countFinallyInsns != countInsns;
}
/**
* Don't inline null object
*/
private static boolean forbidNullInlines(SSAVar sVar) {
List<RegisterArg> useList = sVar.getUseList();
if (useList.isEmpty()) {
return false;
}
int k = 0;
for (RegisterArg useArg : useList) {
InsnNode insn = useArg.getParentInsn();
if (insn == null) {
continue;
}
if (!canUseNull(insn, useArg)) {
useArg.add(AFlag.DONT_INLINE_CONST);
k++;
}
}
return k == useList.size();
}
private static boolean canUseNull(InsnNode insn, RegisterArg useArg) {
switch (insn.getType()) {
case INVOKE:
return ((InvokeNode) insn).getInstanceArg() != useArg;
case ARRAY_LENGTH:
case AGET:
case APUT:
case IGET:
case SWITCH:
case MONITOR_ENTER:
case MONITOR_EXIT:
case INSTANCE_OF:
return insn.getArg(0) != useArg;
case IPUT:
return insn.getArg(1) != useArg;
}
return true;
}
private static void replaceConst(MethodNode mth, InsnNode constInsn, InsnArg constArg, List<InsnNode> toRemove) {
SSAVar ssaVar = constInsn.getResult().getSVar();
if (ssaVar.getUseCount() == 0) {
toRemove.add(constInsn);
return;
}
List<RegisterArg> useList = new ArrayList<>(ssaVar.getUseList());
int replaceCount = 0;
for (RegisterArg arg : useList) {
if (arg.contains(AFlag.DONT_INLINE_CONST)) {
continue;
}
if (replaceArg(mth, arg, constArg, constInsn, toRemove)) {
replaceCount++;
}
}
if (replaceCount == useList.size()) {
toRemove.add(constInsn);
}
}
private static boolean replaceArg(MethodNode mth, RegisterArg arg, InsnArg constArg, InsnNode constInsn, List<InsnNode> toRemove) {
InsnNode useInsn = arg.getParentInsn();
if (useInsn == null) {
return false;
}
InsnType insnType = useInsn.getType();
if (insnType == InsnType.PHI) {
return false;
}
if (constArg.isLiteral()) {
long literal = ((LiteralArg) constArg).getLiteral();
ArgType argType = arg.getType();
if (argType == ArgType.UNKNOWN) {
argType = arg.getInitType();
}
if (argType.isObject() && literal != 0) {
argType = ArgType.NARROW_NUMBERS;
}
LiteralArg litArg = InsnArg.lit(literal, argType);
litArg.copyAttributesFrom(constArg);
if (!useInsn.replaceArg(arg, litArg)) {
return false;
}
// arg replaced, made some optimizations
FieldNode fieldNode = null;
ArgType litArgType = litArg.getType();
if (litArgType.isTypeKnown()) {
fieldNode = mth.getParentClass().getConstFieldByLiteralArg(litArg);
} else if (litArgType.contains(PrimitiveType.INT)) {
fieldNode = mth.getParentClass().getConstField((int) literal, false);
}
if (fieldNode != null) {
litArg.wrapInstruction(mth, new IndexInsnNode(InsnType.SGET, fieldNode.getFieldInfo(), 0));
} else {
if (needExplicitCast(useInsn, litArg)) {
litArg.add(AFlag.EXPLICIT_PRIMITIVE_TYPE);
}
}
} else {
if (!useInsn.replaceArg(arg, constArg.duplicate())) {
return false;
}
}
if (insnType == InsnType.RETURN) {
useInsn.setSourceLine(constInsn.getSourceLine());
}
return true;
}
private static boolean needExplicitCast(InsnNode insn, LiteralArg arg) {
if (insn instanceof BaseInvokeNode) {
BaseInvokeNode callInsn = (BaseInvokeNode) insn;
MethodInfo callMth = callInsn.getCallMth();
int offset = callInsn.getFirstArgOffset();
int argIndex = insn.getArgIndex(arg);
ArgType argType = callMth.getArgumentsTypes().get(argIndex - offset);
if (argType.isPrimitive()) {
arg.setType(argType);
return argType.equals(ArgType.BYTE);
}
}
return false;
}
}
|
[
"skylot@gmail.com"
] |
skylot@gmail.com
|
0993643ce9c17df50a453b40da81204927899e60
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/j2objc/2015/12/FunctionDeclaration.java
|
db9b0343d0573241ff7358cc052270690df12ed5
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 3,208
|
java
|
/*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.devtools.j2objc.ast;
import org.eclipse.jdt.core.dom.ITypeBinding;
import java.util.List;
/**
* Node type for a function declaration.
*/
public class FunctionDeclaration extends BodyDeclaration {
private String name = null;
private String oldName = null; // TODO(kstanger): Remove when users have migrated.
private boolean returnsRetained = false;
private final ChildLink<Type> returnType = ChildLink.create(Type.class, this);
private final ChildList<SingleVariableDeclaration> parameters =
ChildList.create(SingleVariableDeclaration.class, this);
private final ChildLink<Block> body = ChildLink.create(Block.class, this);
private final ITypeBinding declaringClass;
private String jniSignature = null;
public FunctionDeclaration(FunctionDeclaration other) {
super(other);
name = other.getName();
oldName = other.getOldName();
returnsRetained = other.returnsRetained();
returnType.copyFrom(other.getReturnType());
parameters.copyFrom(other.getParameters());
body.copyFrom(other.getBody());
declaringClass = other.declaringClass;
jniSignature = other.jniSignature;
}
public FunctionDeclaration(
String name, String oldName, ITypeBinding returnType, ITypeBinding declaringClass) {
this.name = name;
this.oldName = oldName;
this.returnType.set(Type.newType(returnType));
this.declaringClass = declaringClass;
}
@Override
public Kind getKind() {
return Kind.FUNCTION_DECLARATION;
}
public String getName() {
return name;
}
public String getOldName() {
return oldName;
}
public boolean returnsRetained() {
return returnsRetained;
}
public void setReturnsRetained(boolean value) {
returnsRetained = value;
}
public Type getReturnType() {
return returnType.get();
}
public List<SingleVariableDeclaration> getParameters() {
return parameters;
}
public Block getBody() {
return body.get();
}
public void setBody(Block newBody) {
body.set(newBody);
}
public String getJniSignature() {
return jniSignature;
}
public void setJniSignature(String s) {
this.jniSignature = s;
}
public ITypeBinding getDeclaringClass() {
return declaringClass;
}
@Override
protected void acceptInner(TreeVisitor visitor) {
if (visitor.visit(this)) {
javadoc.accept(visitor);
annotations.accept(visitor);
returnType.accept(visitor);
parameters.accept(visitor);
body.accept(visitor);
}
visitor.endVisit(this);
}
@Override
public FunctionDeclaration copy() {
return new FunctionDeclaration(this);
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
95dab49b9c67c1785920c92ae7d11fab81a69f46
|
d81b8829ebc2deea1acf4b41b39e8eda2734a952
|
/middle/multithreading/src/main/java/ru/job4j/bomberman/Board.java
|
5c613f925ee2bec48e626ce2714783fcd3b1815d
|
[
"Apache-2.0"
] |
permissive
|
DmitriyShaplov/job4j
|
6d8c4b505f0f6bd9f19d6e829370eb45492e73c7
|
46acbe6deb17ecfd00492533555f27e0df481d37
|
refs/heads/master
| 2022-12-04T14:51:37.185520
| 2021-02-01T21:41:00
| 2021-02-01T21:59:02
| 159,066,243
| 0
| 0
|
Apache-2.0
| 2022-11-16T12:25:02
| 2018-11-25T19:23:23
|
Java
|
UTF-8
|
Java
| false
| false
| 2,472
|
java
|
package ru.job4j.bomberman;
import net.jcip.annotations.GuardedBy;
import ru.job4j.bomberman.units.Hero;
import ru.job4j.bomberman.units.Unit;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReentrantLock;
/**
* @author shaplov
* @since 22.05.2019
*/
public class Board {
private final ReentrantLock[][] board;
private final Hero hero;
@GuardedBy("this")
private volatile boolean endGame = false;
private final int size;
/**
* Constructor.
* @param size board size.
*/
public Board(int size, Hero hero) {
board = new ReentrantLock[size][size];
for (int row = 0; row < size; row++) {
for (int col = 0; col < size; col++) {
board[row][col] = new ReentrantLock();
}
}
this.size = size;
this.hero = hero;
}
/**
* Moves unit from source to dest Cell.
* @param source Cell.
* @param dest Cell.
* @return success.
* @throws InterruptedException possible exception.
*/
public boolean move(Cell source, Cell dest) throws InterruptedException {
boolean result = false;
if (dest.getRow() < board.length && dest.getRow() >= 0
&& dest.getCol() < board[dest.getRow()].length && dest.getCol() >= 0) {
if (!"Hero thread".equals(Thread.currentThread().getName()) && dest.equals(hero.getCell())) {
endGame();
}
result = board[dest.getRow()][dest.getCol()].tryLock(500, TimeUnit.MILLISECONDS);
if (result) {
board[source.getRow()][source.getCol()].unlock();
} else {
System.out.println("Cell locked! " + Thread.currentThread().getName());
}
}
return result;
}
/**
* Monster catches hero.
*/
private synchronized void endGame() {
endGame = true;
System.out.println("Hero died.");
notifyAll();
}
public synchronized boolean isEndGame() throws InterruptedException {
System.out.println("Ending " + Thread.currentThread().getName());
if (!endGame) {
wait();
}
return endGame;
}
public int size() {
return size;
}
/**
* Place unit on board.
* @param unit Unit.
*/
public void placeOnBoard(Unit unit) {
board[unit.getCell().getRow()][unit.getCell().getCol()].lock();
}
}
|
[
"shaplovd@gmail.com"
] |
shaplovd@gmail.com
|
d2445f108a5e3afddee8aeaec0da889961774510
|
3a4ae9364740acb9c408c12410a235858dc97b0c
|
/src/main/java/shortener/strategy/HashMapStorageStrategy.java
|
3a05e5ae782e8f87147fc86196a571b60db1d577
|
[] |
no_license
|
s3rji/TrainingProject-Shortener
|
ff0d20f8d003e23415ee25e81818b14f1464b4cc
|
86db58a7de1ad9260bdac2fadeb235f70cd98cac
|
refs/heads/master
| 2023-08-03T08:12:34.594870
| 2021-09-11T15:35:24
| 2021-09-11T15:35:24
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 889
|
java
|
package shortener.strategy;
import java.util.HashMap;
import java.util.Map;
import java.util.Optional;
public class HashMapStorageStrategy implements StorageStrategy {
private HashMap<Long, String> data = new HashMap<>();
@Override
public boolean containsKey(Long key) {
return data.containsKey(key);
}
@Override
public boolean containsValue(String value) {
return data.containsValue(value);
}
@Override
public void put(Long key, String value) {
data.put(key, value);
}
@Override
public Long getKey(String value) {
Optional<Long> key = data.entrySet().stream().filter(pair -> pair.getValue().equals(value)).
map(Map.Entry::getKey).findFirst();
return key.orElse(null);
}
@Override
public String getValue(Long key) {
return data.get(key);
}
}
|
[
"s3rg.rov@yandex.ru"
] |
s3rg.rov@yandex.ru
|
a681125f222870c787767aa14d4e16ef0056d588
|
bd5a50a094e78e38b9f3632d60738bdcb8b94ec5
|
/spring5-mongo-recipe-app/src/main/java/guru/springframework/controller/RecipeController.java
|
b00068e9369c32b641f819e933eca0a77541bfe3
|
[] |
no_license
|
taidangit/java-masterclass
|
004172f5685ee7faf8eebd3fddb2f7f0c1973491
|
c04747c39a0651d1d48d95bfc256632d7832236e
|
refs/heads/master
| 2022-12-21T12:32:56.717139
| 2019-12-25T07:58:25
| 2019-12-25T07:58:59
| 230,059,053
| 0
| 0
| null | 2022-12-15T23:56:53
| 2019-12-25T07:11:57
|
Java
|
UTF-8
|
Java
| false
| false
| 2,355
|
java
|
package guru.springframework.controller;
import guru.springframework.command.RecipeCommand;
import guru.springframework.domain.Recipe;
import guru.springframework.service.RecipeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.*;
import javax.validation.Valid;
@Controller
@RequestMapping("/recipe")
public class RecipeController {
private RecipeService recipeService;
@Autowired
public RecipeController(RecipeService recipeService) {
this.recipeService = recipeService;
}
@GetMapping("/list")
public String findAll(Model model) {
model.addAttribute("recipes", recipeService.findAll());
return "recipe/recipes";
}
@GetMapping("/show/{id}")
public String showById(@PathVariable String id, Model model) {
Recipe recipe = recipeService.findById(id);
model.addAttribute("recipe", recipe);
return "recipe/show";
}
@GetMapping("/new")
public String newRecipe(Model model) {
model.addAttribute("recipe", new Recipe());
return "recipe/recipe-form";
}
@PostMapping("/save")
public String saveOrUpdate(@Valid @ModelAttribute("recipe") RecipeCommand recipe,
BindingResult result,
Model model) {
if (result.hasErrors()) {
return "recipe/recipe-form";
}
RecipeCommand savedRecipeCommand=recipeService.saveRecipeCommand(recipe);
return "redirect:/recipe/show/" + savedRecipeCommand.getId();
}
@GetMapping("/update/{id}")
public String updateRecipe(@PathVariable String id, Model model) {
RecipeCommand recipeCommand = recipeService.findCommandById(id);
model.addAttribute("ingredients", recipeCommand.getIngredients());
model.addAttribute("recipe", recipeCommand);
model.addAttribute("recipeId", id);
return "recipe/recipe-form";
}
@GetMapping("/delete/{id}")
public String deleteById(@PathVariable String id) {
//log.debug("Deleting id: " + id);
recipeService.deleteById(id);
return "redirect:/recipe/list";
}
}
|
[
"dangphattai92@gmail.com"
] |
dangphattai92@gmail.com
|
6fba22bde65a313649dadba36a4961cbe1c6583d
|
3c469b0f8944e70cb2ed573fd555651aae0c9ba9
|
/bitms-rpc/bitms-rpc-hander/src/main/java/com/blocain/bitms/quotation/entity/MainRtQuotationInfo.java
|
31cf4c2f882b04d51302ecf53f0b0f941a8c0347
|
[] |
no_license
|
edby/backend
|
05fe622889fa38dedc26b21c6cb39bf10cec9377
|
0b9e1799f68741f36a7797b85afd267d383b9327
|
refs/heads/master
| 2020-03-14T22:36:43.495367
| 2018-05-02T07:26:08
| 2018-05-02T07:26:08
| 131,824,956
| 3
| 5
| null | 2018-05-02T08:58:57
| 2018-05-02T08:58:57
| null |
UTF-8
|
Java
| false
| false
| 4,397
|
java
|
package com.blocain.bitms.quotation.entity;
import java.math.BigDecimal;
/**
* 行情关键信息类
*/
public class MainRtQuotationInfo implements java.io.Serializable, Comparable
{
private static final long serialVersionUID = -4900608239740805674L;
// 交易对id
private String id;
// 交易对类型
private String stockType;
// 交易对名称
private String stockName;
// 备注
private String exchangePair;
// 最新成交价
private String platPrice;
// 涨跌幅
private String range;
// 涨跌幅方向
private String upDown;
// 24小时成交量
private String volume;
// 24小时最低价
private String lowestPrice;
// 24小时最高价
private String highestPrice;
private String market;
// token 地址,用于页面跳转
private String tokencontactaddr;
public String getMarket()
{
return market;
}
public void setMarket(String market)
{
this.market = market;
}
public String getLowestPrice()
{
return lowestPrice;
}
public void setLowestPrice(String lowestPrice)
{
this.lowestPrice = lowestPrice;
}
public String getHighestPrice()
{
return highestPrice;
}
public void setHighestPrice(String highestPrice)
{
this.highestPrice = highestPrice;
}
public String getExchangePair()
{
return exchangePair;
}
public void setExchangePair(String exchangePair)
{
this.exchangePair = exchangePair;
}
public String getId()
{
return id;
}
public void setId(String id)
{
this.id = id;
}
public String getStockType()
{
return stockType;
}
public void setStockType(String stockType)
{
this.stockType = stockType;
}
public String getStockName()
{
return stockName;
}
public void setStockName(String stockName)
{
this.stockName = stockName;
}
public String getPlatPrice()
{
return platPrice;
}
public void setPlatPrice(String platPrice)
{
this.platPrice = platPrice;
}
public String getRange()
{
return range;
}
public void setRange(String range)
{
this.range = range;
}
public String getUpDown()
{
return upDown;
}
public void setUpDown(String upDown)
{
this.upDown = upDown;
}
public String getVolume()
{
return volume;
}
public void setVolume(String volume)
{
this.volume = volume;
}
public String getTokencontactaddr()
{
return tokencontactaddr;
}
public void setTokencontactaddr(String tokencontactaddr)
{
this.tokencontactaddr = tokencontactaddr;
}
@Override
public String toString()
{
return "MainRtQuotationInfo{" + "id='" + id + '\'' + ", stockType='" + stockType + '\'' + ", stockName='" + stockName + '\'' + ", exchangePair='" + exchangePair
+ '\'' + ", platPrice='" + platPrice + '\'' + ", range='" + range + '\'' + ", upDown='" + upDown + '\'' + ", volume='" + volume + '\'' + ", lowestPrice='"
+ lowestPrice + '\'' + ", highestPrice='" + highestPrice + '\'' + ", market='" + market + '\'' + ", tokencontactaddr='" + tokencontactaddr + '\'' + '}';
}
@Override
public int compareTo(Object o)
{
MainRtQuotationInfo info = (MainRtQuotationInfo) o;
BigDecimal a = new BigDecimal(this.range);
BigDecimal b = new BigDecimal(info.range);
return b.compareTo(a);
}
// public static void main(String[] args) {
// List<MainRtQuotationInfo> list = new ArrayList<MainRtQuotationInfo>();
// MainRtQuotationInfo a = new MainRtQuotationInfo();
// a.setRange("3");
// MainRtQuotationInfo b = new MainRtQuotationInfo();
// b.setRange("3");
// list.add(a);
// list.add(b);
// Collections.sort(list);
// System.out.println(list.get(0).getRange());
// }
}
|
[
"3042645110@qq.com"
] |
3042645110@qq.com
|
edf28e80ef4c2a0a2a722d9ce1971c19547aed97
|
e0e3776195773fe77b2cd8324f432b75626231b3
|
/linkedlist/src/LinkedList.java
|
e18dc4770396b770b1b6a3645ddd633d9987da4b
|
[
"Apache-2.0"
] |
permissive
|
leroniris/algorithm
|
fd778c33d06b4c8def05d57472584dbc41b5c680
|
5e3c99d651a19a6511f123aac7cf02d60ab18899
|
refs/heads/master
| 2021-01-05T11:23:44.966269
| 2020-02-22T05:45:59
| 2020-02-22T05:45:59
| 241,005,756
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,854
|
java
|
/**
* 链表
*
* @author Leron
* @version 1.0.0
* @create 2020/2/22 10:33
*/
public class LinkedList<E> {
private class Node {
public E e;
public Node next;
public Node(E e, Node next) {
this.e = e;
this.next = next;
}
public Node(E e) {
this(e, null);
}
public Node() {
this(null, null);
}
@Override
public String toString() {
return "Node{" +
"e=" + e +
", next=" + next +
'}';
}
}
private Node head; //链表头部
private int size; //链表大小
public LinkedList() {
head = null;
size = 0;
}
//获取链表中的元素个数
public int getSize() {
return this.size;
}
//返回链表是否为空
public boolean isEmpty() {
return size == 0;
}
//在链表头部插入元素
public void addFirst(E e) {
Node node = new Node(e);
node.next = head;
head = node;
// Node node = new Node(e, head);
size++;
}
//在链表中间插入元素
public void add(int index, E e) {
if (index < 0 || index > size) {
throw new IllegalArgumentException("Add failed, Illegal index");
}
if (index == 0) {
addFirst(e);
} else {
Node prev = head;
for (int i = 0; i < index - 1; i++) {
prev = prev.next;
}
Node node = new Node(e);
node.next = prev.next;
prev.next = node;
//prev.next = new Node(e, prev.next);
size++;
}
}
// 在链表末尾添加新的元素e
public void addLast(E e){
add(size, e);
}
}
|
[
"goodMorning_glb@atguigu.com"
] |
goodMorning_glb@atguigu.com
|
9cd07ee683ba1ac47fae6279b45c118c11238c22
|
9feb2d5919c61ac4dcac42ade4c86d3a33cfe21c
|
/percent-library/src/main/java/com/dysen/percent_layout/PercentFrameLayout.java
|
749d74271565af76ced06f7429294bfd51e1968f
|
[] |
no_license
|
dysen2014/CommonTest
|
a48858eb1c3c058e1f1d421d6faf954979e637e6
|
e2d414ff777de0891e21e3827208961422ecc65c
|
refs/heads/master
| 2020-03-24T16:25:36.384207
| 2018-12-29T09:35:33
| 2018-12-29T09:35:33
| 142,824,228
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,140
|
java
|
/*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.dysen.percent_layout;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.ViewGroup;
import android.widget.FrameLayout;
/**
* Subclass of {@link FrameLayout} that supports percentage based dimensions and
* margins.
*
* You can specify dimension or a margin of child by using attributes with "Percent" suffix. Follow
* this example:
*
* <pre class="prettyprint">
* <android.support.percent.PercentFrameLayout
* xmlns:android="http://schemas.android.com/apk/res/android"
* xmlns:app="http://schemas.android.com/apk/res-auto"
* android:layout_width="match_parent"
* android:layout_height="match_parent"/>
* <ImageView
* app:layout_widthPercent="50%"
* app:layout_heightPercent="50%"
* app:layout_marginTopPercent="25%"
* app:layout_marginLeftPercent="25%"/>
* </android.support.percent.PercentFrameLayout/>
* </pre>
*
* The attributes that you can use are:
* <ul>
* <li>{@code layout_widthPercent}
* <li>{@code layout_heightPercent}
* <li>{@code layout_marginPercent}
* <li>{@code layout_marginLeftPercent}
* <li>{@code layout_marginTopPercent}
* <li>{@code layout_marginRightPercent}
* <li>{@code layout_marginBottomPercent}
* <li>{@code layout_marginStartPercent}
* <li>{@code layout_marginEndPercent}
* </ul>
*
* It is not necessary to specify {@code layout_width/height} if you specify {@code
* layout_widthPercent.} However, if you want the view to be able to take up more space than what
* percentage value permits, you can add {@code layout_width/height="wrap_content"}. In that case
* if the percentage size is too small for the View's content, it will be resized using
* {@code wrap_content} rule.
*/
public class PercentFrameLayout extends FrameLayout {
private final PercentLayoutHelper mHelper = new PercentLayoutHelper(this);
public PercentFrameLayout(Context context) {
super(context);
}
public PercentFrameLayout(Context context, AttributeSet attrs) {
super(context, attrs);
}
public PercentFrameLayout(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
public LayoutParams generateLayoutParams(AttributeSet attrs) {
return new LayoutParams(getContext(), attrs);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
mHelper.adjustChildren(widthMeasureSpec, heightMeasureSpec);
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
if (mHelper.handleMeasuredStateTooSmall()) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
}
}
@Override
protected void onLayout(boolean changed, int left, int top, int right, int bottom) {
super.onLayout(changed, left, top, right, bottom);
mHelper.restoreOriginalParams();
}
public static class LayoutParams extends FrameLayout.LayoutParams
implements PercentLayoutHelper.PercentLayoutParams {
private PercentLayoutHelper.PercentLayoutInfo mPercentLayoutInfo;
public LayoutParams(Context c, AttributeSet attrs) {
super(c, attrs);
mPercentLayoutInfo = PercentLayoutHelper.getPercentLayoutInfo(c, attrs);
}
public LayoutParams(int width, int height) {
super(width, height);
}
public LayoutParams(int width, int height, int gravity) {
super(width, height, gravity);
}
public LayoutParams(ViewGroup.LayoutParams source) {
super(source);
}
public LayoutParams(MarginLayoutParams source) {
super(source);
}
public LayoutParams(FrameLayout.LayoutParams source) {
super((MarginLayoutParams) source);
gravity = source.gravity;
}
public LayoutParams(LayoutParams source) {
this((FrameLayout.LayoutParams) source);
mPercentLayoutInfo = source.mPercentLayoutInfo;
}
@Override
public PercentLayoutHelper.PercentLayoutInfo getPercentLayoutInfo() {
return mPercentLayoutInfo;
}
@Override
protected void setBaseAttributes(TypedArray a, int widthAttr, int heightAttr) {
PercentLayoutHelper.fetchWidthAndHeight(this, a, widthAttr, heightAttr);
}
}
}
|
[
"dysen@outlook.com"
] |
dysen@outlook.com
|
85bc5667491d3db750987fff46934351dfc5ba5e
|
6d570c8da948b3df0270cdc98d3a7c01af458da8
|
/itoken-web-admin/src/main/java/com/lee/itoken/web/admin/WebAdminApplication.java
|
5e2bc94f105e8e09076d7965095a75101c801043
|
[] |
no_license
|
BlueLeer/itoken-lee
|
b6490bcef922bb213f345631866fed7cdbbc7ea5
|
453e30ba38b69df4450bf6ee52c79c35ea338437
|
refs/heads/master
| 2022-06-22T02:03:55.838758
| 2020-04-13T10:06:21
| 2020-04-13T10:06:21
| 197,681,364
| 0
| 0
| null | 2022-06-21T02:27:26
| 2019-07-19T01:37:22
|
Java
|
UTF-8
|
Java
| false
| false
| 565
|
java
|
package com.lee.itoken.web.admin;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
/**
* @author lee
* @date 2019/7/24 9:13
* @description
*/
@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
public class WebAdminApplication {
public static void main(String[] args) {
SpringApplication.run(WebAdminApplication.class, args);
}
}
|
[
"251668577@qq.com"
] |
251668577@qq.com
|
143223e67f8311fdc7a1efa4dec3566b635577cb
|
b726c1543313db5abef5adaa9778f22b155af310
|
/src/main/java/com/study/service/impl/RoleResourcesServiceImpl.java
|
de92bb67ddd82a9ef7df14624dc3e721e2bb97b9
|
[] |
no_license
|
oragn-name/yt_ts
|
f682233e7957ee5a9398d5f118f57573df056429
|
6d9bb4443f6844ed5c379487b050f1b91c4f895e
|
refs/heads/master
| 2018-08-26T02:10:59.831272
| 2018-08-19T02:42:35
| 2018-08-19T02:42:35
| 120,695,905
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,060
|
java
|
package com.study.service.impl;
import com.study.mapper.UserRoleMapper;
import com.study.model.RoleResources;
import com.study.service.RoleResourcesService;
import com.study.shiro.MyShiroRealm;
import com.study.shiro.ShiroService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.StringUtils;
import tk.mybatis.mapper.entity.Example;
import javax.annotation.Resource;
import java.util.List;
@Service("roleResourcesService")
public class RoleResourcesServiceImpl extends BaseService<RoleResources> implements RoleResourcesService {
@Resource
private UserRoleMapper userRoleMapper;
/*@Resource
private ShiroService shiroService;*/
@Autowired
private MyShiroRealm myShiroRealm;
@Override
//更新权限
@Transactional(propagation= Propagation.REQUIRED,readOnly=false,rollbackFor={Exception.class})
public void addRoleResources(RoleResources roleResources) {
//删除
Example example = new Example(RoleResources.class);
Example.Criteria criteria = example.createCriteria();
criteria.andEqualTo("roleid",roleResources.getRoleid());
mapper.deleteByExample(example);
//添加
if(!StringUtils.isEmpty(roleResources.getResourcesid())){
String[] resourcesArr = roleResources.getResourcesid().split(",");
for(String resourcesId:resourcesArr ){
RoleResources r = new RoleResources();
r.setRoleid(roleResources.getRoleid());
r.setResourcesid(resourcesId);
mapper.insert(r);
}
}
List<Integer> userIds= userRoleMapper.findUserIdByRoleId(roleResources.getRoleid());
//更新当前登录的用户的权限缓存
myShiroRealm.clearUserAuthByUserId(userIds);
}
}
|
[
"519978232@qq.com"
] |
519978232@qq.com
|
3b194a7ac45c7cf645286a98b91c502469b6d3d1
|
25fdd1ddaf8efa91483f80160d7f31988a951758
|
/sesame-process/src/main/java/com/sanxing/sesame/engine/action/var/DeleteAction.java
|
2478adc7d100234fd7f5f5ea47a18ed912049e28
|
[] |
no_license
|
auxgroup-sanxing/Sesame
|
5bab1678e3ad2ce43943e156597be2321dc63652
|
acef04b3225f88f2dc420e6d9e85082d01300d1e
|
refs/heads/master
| 2016-09-06T13:17:51.239490
| 2013-10-25T09:08:51
| 2013-10-25T09:08:51
| 9,709,766
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,409
|
java
|
package com.sanxing.sesame.engine.action.var;
import java.util.List;
import org.jdom.Attribute;
import org.jdom.Content;
import org.jdom.Element;
import org.jdom.Namespace;
import com.sanxing.sesame.engine.action.AbstractAction;
import com.sanxing.sesame.engine.action.Constant;
import com.sanxing.sesame.engine.context.DataContext;
import com.sanxing.sesame.engine.context.Variable;
public class DeleteAction
extends AbstractAction
implements Constant
{
String varName;
String xpath;
@Override
public void doinit( Element config )
{
varName = config.getAttributeValue( Constant.ATTR_VAR_NAME );
xpath = config.getChildTextTrim( Constant.ELE_XPATH, config.getNamespace() );
}
@Override
public void dowork( DataContext ctx )
{
Variable toBeDeleted = ctx.getVariable( varName );
if ( xpath != null )
{
if ( xpath.equalsIgnoreCase( "xmlns" ) )
{
Element ele = (Element) toBeDeleted.get();
removeNameSpace( ele );
}
else
{
toBeDeleted = select( (Element) toBeDeleted.get(), xpath, ctx );
if ( toBeDeleted.getVarType() <= 2 )
{
( (Content) toBeDeleted.get() ).detach();
}
else if ( toBeDeleted.getVarType() == 3 )
{
( (Attribute) toBeDeleted.get() ).detach();
}
else if ( toBeDeleted.getVarType() == 5 )
{
List list = (List) toBeDeleted.get();
for ( int i = 0; i < list.size(); ++i )
{
Element ele = (Element) list.get( i );
ele.detach();
}
}
}
}
else
{
ctx.delVariable( varName );
}
}
private void removeNameSpace( Element ele )
{
Namespace ns = ele.getNamespace();
if ( ns != null )
{
ele.setNamespace( Namespace.NO_NAMESPACE );
for ( int i = 0; i < ele.getChildren().size(); ++i )
{
removeNameSpace( (Element) ele.getChildren().get( i ) );
}
}
}
}
|
[
"czzyz-21sj@163.com"
] |
czzyz-21sj@163.com
|
26b764f6cb876d1e086a1b8b77fc9a19c0d0a04d
|
2c669ccff008612f6e12054d9162597f2088442c
|
/MEVO_apkpure.com_source_from_JADX/sources/com/mevo/app/presentation/adapters/CurrentRentalsAdapter$$Lambda$3.java
|
911f87cf577e0143f3013aa41d30d8f97c013d6d
|
[] |
no_license
|
PythonicNinja/mevo
|
e97fb27f302cb3554a69b27022dada2134ff99c0
|
cab7cea9376085caead1302b93e62e0d34a75470
|
refs/heads/master
| 2020-05-02T22:32:46.764930
| 2019-03-28T23:37:51
| 2019-03-28T23:37:51
| 178,254,526
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 509
|
java
|
package com.mevo.app.presentation.adapters;
import android.view.View;
import com.inverce.mod.core.functional.IFunction;
final /* synthetic */ class CurrentRentalsAdapter$$Lambda$3 implements IFunction {
private final CurrentRentalsAdapter arg$1;
CurrentRentalsAdapter$$Lambda$3(CurrentRentalsAdapter currentRentalsAdapter) {
this.arg$1 = currentRentalsAdapter;
}
public Object apply(Object obj) {
return this.arg$1.lambda$new$106$CurrentRentalsAdapter((View) obj);
}
}
|
[
"mail@pythonic.ninja"
] |
mail@pythonic.ninja
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.