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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
304acb73c91ba7467a70c69fa8cfe78f7969f8be | d7662b46a49009b4c7172625749db1d5c31c1919 | /PcmEvent/src/fr/cactuscata/pcmevent/listener/ChunkLoadListener.java | 3bbda2d3f19e6323e555da1a2bb225519f152e8f | [] | no_license | CactusCata/PcmEvent | 7fc8e4b4d280a250460235fc52966932edae8475 | fbb1a7bd4a34d9002af7e5de978350c8480812a3 | refs/heads/master | 2020-05-04T17:36:29.614096 | 2019-04-03T15:37:20 | 2019-04-03T15:37:20 | 179,318,195 | 0 | 0 | null | null | null | null | ISO-8859-2 | Java | false | false | 1,360 | java | package fr.cactuscata.pcmevent.listener;
import org.bukkit.Bukkit;
import org.bukkit.Chunk;
import org.bukkit.event.EventHandler;
import org.bukkit.event.EventPriority;
import org.bukkit.event.Listener;
import org.bukkit.event.world.ChunkLoadEvent;
import org.bukkit.plugin.Plugin;
import fr.cactuscata.pcmevent.PcmEvent;
import fr.cactuscata.pcmevent.utils.hologram.api.Hologram;
import fr.cactuscata.pcmevent.utils.hologram.objects.NamedHologramManager;
/**
* Cette classe permet d'afficher aux joueurs présents l'hologramme que chaque
* chunk contient.
*
* @author CactusCata
* @version 2.5.1
* @since 2.5.0
* @see Hologram
*/
public final class ChunkLoadListener implements Listener {
private final Plugin plugin = PcmEvent.getPlugin();
/**
* Ecouteur de l'evenement {@link ChunkLoadEvent}.
*
* @param event
* Evenement.
*/
@EventHandler(priority = EventPriority.MONITOR)
public void onChunkLoad(ChunkLoadEvent event) {
final Chunk chunk = event.getChunk();
if (chunk.isLoaded()) {
if (Bukkit.isPrimaryThread())
NamedHologramManager.onChunkLoad(chunk);
else
Bukkit.getScheduler().runTask(this.plugin, new Runnable() {
@Override
public final void run() {
NamedHologramManager.onChunkLoad(chunk);
}
});
}
}
}
| [
"adam.chareyre.1999@gmail.com"
] | adam.chareyre.1999@gmail.com |
2c34130f08116eb4a9e6754cf5da1be04e3b0038 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/13/13_f543cd38ce6b50c4480bad265d6747e25f25bfb5/ManagedSchedulesResourceTest/13_f543cd38ce6b50c4480bad265d6747e25f25bfb5_ManagedSchedulesResourceTest_s.java | 1bda50ae39d94a630698f7dd970a1b5f42a4a7f0 | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,869 | java | package edu.northwestern.bioinformatics.studycalendar.restlets;
import edu.northwestern.bioinformatics.studycalendar.core.accesscontrol.PscUserBuilder;
import edu.northwestern.bioinformatics.studycalendar.domain.Fixtures;
import edu.northwestern.bioinformatics.studycalendar.domain.ScheduledStudySegment;
import edu.northwestern.bioinformatics.studycalendar.domain.Site;
import edu.northwestern.bioinformatics.studycalendar.domain.Study;
import edu.northwestern.bioinformatics.studycalendar.domain.StudySegment;
import edu.northwestern.bioinformatics.studycalendar.domain.StudySite;
import edu.northwestern.bioinformatics.studycalendar.domain.StudySubjectAssignment;
import edu.northwestern.bioinformatics.studycalendar.security.authorization.PscRole;
import edu.northwestern.bioinformatics.studycalendar.security.authorization.PscUser;
import edu.northwestern.bioinformatics.studycalendar.service.PscUserService;
import edu.northwestern.bioinformatics.studycalendar.service.TestingTemplateService;
import edu.northwestern.bioinformatics.studycalendar.service.presenter.UserStudySubjectAssignmentRelationship;
import gov.nih.nci.cabig.ctms.lang.DateTools;
import gov.nih.nci.cabig.ctms.lang.StaticNowFactory;
import org.restlet.data.MediaType;
import org.restlet.data.Method;
import org.restlet.data.Status;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import static edu.northwestern.bioinformatics.studycalendar.core.Fixtures.*;
import static org.easymock.classextension.EasyMock.expect;
/**
* @author Rhett Sutphin
*/
public class ManagedSchedulesResourceTest extends AuthorizedResourceTestCase<ManagedSchedulesResource> {
private PscUserService pscUserService;
private PscUser jo, alice;
private StudySubjectAssignment a_nu_1;
@Override
protected void setUp() throws Exception {
super.setUp();
pscUserService = registerMockFor(PscUserService.class);
Site nu = createSite("NU", "IL036");
Study a = createBasicTemplate("A");
StudySite a_nu = createStudySite(a, nu);
a_nu.approveAmendment(a.getAmendment(), new Date());
a_nu_1 = createAssignment(a_nu, createSubject("First", "One"));
StudySegment ae0s1 = a.getPlannedCalendar().getEpochs().get(0).getStudySegments().get(0);
ScheduledStudySegment scheduledStudySegment = createScheduledStudySegment(ae0s1);
a_nu_1.getScheduledCalendar().addStudySegment(scheduledStudySegment);
jo = new PscUserBuilder("jo").
add(PscRole.STUDY_SUBJECT_CALENDAR_MANAGER).forAllSites().forAllStudies().
toUser();
alice = new PscUserBuilder("alice").
add(PscRole.STUDY_SUBJECT_CALENDAR_MANAGER).forAllSites().forAllStudies().
toUser();
setCurrentUser(alice);
UriTemplateParameters.USERNAME.putIn(request, "jo");
expect(pscUserService.getAuthorizableUser("jo")).andStubReturn(jo);
expect(pscUserService.getManagedAssignments(jo, alice)).
andStubReturn(createExpectedUssars(jo, a_nu_1));
}
@Override
protected ManagedSchedulesResource createAuthorizedResource() {
ManagedSchedulesResource res = new ManagedSchedulesResource();
res.setPscUserService(pscUserService);
res.setXmlSerializer(xmlSerializer);
res.setTemplateService(new TestingTemplateService());
StaticNowFactory nf = new StaticNowFactory();
nf.setNowTimestamp(DateTools.createTimestamp(2008, Calendar.MAY, 5));
res.setNowFactory(nf);
return res;
}
public void testAllowsGetOnly() throws Exception {
assertAllowedMethods("GET");
}
public void testAuthorizedForStudyTeams() throws Exception {
assertRolesAllowedForMethod(Method.GET,
PscRole.STUDY_SUBJECT_CALENDAR_MANAGER, PscRole.DATA_READER,
PscRole.STUDY_TEAM_ADMINISTRATOR);
}
public void testRenderXml() throws Exception {
setAccept(MediaType.TEXT_XML);
expect(xmlSerializer.createDocumentString(Arrays.asList(a_nu_1))).
andReturn(MOCK_XML);
doGet();
assertResponseIsCreatedXml();
}
public void testRenderICS() throws Exception {
setAccept(MediaType.TEXT_CALENDAR);
doGet();
assertResponseStatus(Status.SUCCESS_OK);
assertEquals("Wrong response type",
MediaType.TEXT_CALENDAR, response.getEntity().getMediaType());
}
public void testRenderJSON() throws Exception {
setAccept(MediaType.APPLICATION_JSON);
doGet();
assertResponseStatus(Status.SUCCESS_OK);
assertEquals("Wrong response type",
MediaType.APPLICATION_JSON, response.getEntity().getMediaType());
}
public void test404IfNoAssignments() throws Exception {
expectManagedAssignments(jo, alice);
doGet();
assertResponseStatus(Status.CLIENT_ERROR_NOT_FOUND);
}
private void expectManagedAssignments(PscUser manager, PscUser viewer, StudySubjectAssignment... assignments) {
expect(pscUserService.getManagedAssignments(manager, viewer)).
andReturn(createExpectedUssars(viewer, assignments));
}
private List<UserStudySubjectAssignmentRelationship> createExpectedUssars(
PscUser viewer, StudySubjectAssignment... assignments
) {
List<UserStudySubjectAssignmentRelationship> expected =
new ArrayList<UserStudySubjectAssignmentRelationship>();
for (StudySubjectAssignment assignment : assignments) {
expected.add(new UserStudySubjectAssignmentRelationship(viewer, assignment));
}
return expected;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
ebe01af73b342daea5cc199af550d853041e0ccc | 0031716e70b380c4564a9ba506df3c01673e4dc5 | /app/src/main/java/com/douban/book/reader/fragment/SubscriptionHistoryFragment_.java | 18cc57f860a68788407bd3da230d833994da3e59 | [] | no_license | sridhar191986/DouBanYueDu | fc08c583f4ef53bb293f967de2a2772eb5b55719 | fd126db0e3ed684f27a498eda7eaedb06e6c396c | refs/heads/master | 2020-09-07T14:32:40.823864 | 2016-02-18T10:22:58 | 2016-02-18T10:22:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,182 | java | package com.douban.book.reader.fragment;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.AdapterView;
import android.widget.AdapterView.OnItemClickListener;
import com.douban.book.reader.R;
import com.douban.book.reader.entity.WorksSubscription;
import com.douban.book.reader.manager.SubscriptionManager_;
import org.androidannotations.api.builder.FragmentBuilder;
import org.androidannotations.api.view.HasViews;
import org.androidannotations.api.view.OnViewChangedListener;
import org.androidannotations.api.view.OnViewChangedNotifier;
public final class SubscriptionHistoryFragment_ extends SubscriptionHistoryFragment implements HasViews, OnViewChangedListener {
private View contentView_;
private final OnViewChangedNotifier onViewChangedNotifier_;
public static class FragmentBuilder_ extends FragmentBuilder<FragmentBuilder_, SubscriptionHistoryFragment> {
public SubscriptionHistoryFragment build() {
SubscriptionHistoryFragment_ fragment_ = new SubscriptionHistoryFragment_();
fragment_.setArguments(this.args);
return fragment_;
}
}
public SubscriptionHistoryFragment_() {
this.onViewChangedNotifier_ = new OnViewChangedNotifier();
}
public void onCreate(Bundle savedInstanceState) {
OnViewChangedNotifier previousNotifier = OnViewChangedNotifier.replaceNotifier(this.onViewChangedNotifier_);
init_(savedInstanceState);
super.onCreate(savedInstanceState);
OnViewChangedNotifier.replaceNotifier(previousNotifier);
}
public View findViewById(int id) {
if (this.contentView_ == null) {
return null;
}
return this.contentView_.findViewById(id);
}
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
this.contentView_ = super.onCreateView(inflater, container, savedInstanceState);
return this.contentView_;
}
public void onDestroyView() {
super.onDestroyView();
this.contentView_ = null;
}
private void init_(Bundle savedInstanceState) {
OnViewChangedNotifier.registerOnViewChangedListener(this);
this.mSubscriptionManager = SubscriptionManager_.getInstance_(getActivity());
}
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
this.onViewChangedNotifier_.notifyViewChanged(this);
}
public static FragmentBuilder_ builder() {
return new FragmentBuilder_();
}
public void onViewChanged(HasViews hasViews) {
AdapterView<?> view_list = (AdapterView) hasViews.findViewById(R.id.list);
if (view_list != null) {
view_list.setOnItemClickListener(new OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
SubscriptionHistoryFragment_.this.onListItemClicked((WorksSubscription) parent.getAdapter().getItem(position));
}
});
}
}
}
| [
"blankeeee@gmail.com"
] | blankeeee@gmail.com |
f1a8d5ef87c58fc1c7c5b026aa29709f8751d5c9 | 9ccf99159f3bbd0789a0de9e518955f33ff05efd | /easycode-common/src/main/java/com/easycodebox/common/zookeeper/curator/CuratorNode.java | bc2eadcdfe12321bcbb78ef654c30791cc67cf79 | [
"Apache-2.0"
] | permissive | swyl/easycode | 71aa824cd82e0a08eabe0da6e3f1961778b0e12d | 1d514796668d96ed1ec71203f7c4e4098e284641 | refs/heads/master | 2021-01-23T22:31:10.777845 | 2017-03-09T09:24:43 | 2017-03-09T09:24:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,274 | java | package com.easycodebox.common.zookeeper.curator;
import org.apache.commons.lang.StringUtils;
import org.apache.curator.framework.CuratorFramework;
import org.apache.curator.framework.api.CuratorWatcher;
import org.apache.curator.framework.api.GetDataBuilder;
import org.apache.zookeeper.data.Stat;
import org.springframework.beans.factory.InitializingBean;
import com.easycodebox.common.log.slf4j.Logger;
import com.easycodebox.common.log.slf4j.LoggerFactory;
import com.easycodebox.common.validate.Assert;
import com.easycodebox.common.zookeeper.ZkDeserializer;
import com.easycodebox.common.zookeeper.ZkNodeNameMaker;
import com.easycodebox.common.zookeeper.ZkSerializer;
/**
* zookeeper相关操作
* @author WangXiaoJin
*
*/
public class CuratorNode<T> implements InitializingBean {
private final Logger log = LoggerFactory.getLogger(getClass());
/**
* 打印load和store的数据
*/
private boolean debug = false;
private CuratorFramework client;
private boolean watchBool;
private CuratorWatcher watchObj;
private Stat stat;
private String nodeName;
private ZkNodeNameMaker maker;
private ZkDeserializer<T> deserializer;
private ZkSerializer serializer;
private int version = -1;
@Override
public void afterPropertiesSet() throws Exception {
Assert.notNull(client, "'client' can't be null.");
if (nodeName == null && maker == null)
throw new IllegalArgumentException("'nodeName' and 'maker' at least one has value.");
}
/**
* 获取指定节点数据
* @return
* @throws Exception
*/
public Object load() throws Exception {
String name = StringUtils.isBlank(nodeName) ? maker.make() : nodeName;
if (name == null) return null;
byte[] data;
GetDataBuilder builder = client.getData();
if (watchObj != null) {
builder.usingWatcher(watchObj);
}else if (watchBool) {
builder.watched();
}
data = builder.storingStatIn(stat).forPath(name);
if(debug) {
log.info("ZooKeeper get data. path: {0} --- data: {1}", name, data == null ? null : new String(data));
}
if(deserializer != null) {
return deserializer.deserialize(data);
}
return data;
}
/**
* 存储数据
* @return
* @throws Exception
*/
public void store(Object data) throws Exception {
String name = StringUtils.isBlank(nodeName) ? maker.make() : nodeName;
if (name == null) return;
byte[] bytes = null;
if (data != null && serializer != null && serializer.support(data.getClass())) {
bytes = serializer.serialize(data);
}else if(data != null) {
bytes = data.toString().getBytes();
}
client.setData().withVersion(version).forPath(name, bytes);
if(debug) {
log.info("ZooKeeper set data. path: {0} --- data: {1}", name, bytes == null ? null : new String(bytes));
}
}
public CuratorFramework getClient() {
return client;
}
public void setClient(CuratorFramework client) {
this.client = client;
}
public boolean isWatchBool() {
return watchBool;
}
public void setWatchBool(boolean watchBool) {
this.watchBool = watchBool;
}
public CuratorWatcher getWatchObj() {
return watchObj;
}
public void setWatchObj(CuratorWatcher watchObj) {
this.watchObj = watchObj;
}
public Stat getStat() {
return stat;
}
public void setStat(Stat stat) {
this.stat = stat;
}
public String getNodeName() {
return nodeName;
}
public void setNodeName(String nodeName) {
this.nodeName = nodeName;
}
public ZkNodeNameMaker getMaker() {
return maker;
}
public void setMaker(ZkNodeNameMaker maker) {
this.maker = maker;
}
public ZkDeserializer<T> getDeserializer() {
return deserializer;
}
public void setDeserializer(ZkDeserializer<T> deserializer) {
this.deserializer = deserializer;
}
public ZkSerializer getSerializer() {
return serializer;
}
public void setSerializer(ZkSerializer serializer) {
this.serializer = serializer;
}
public int getVersion() {
return version;
}
public void setVersion(int version) {
this.version = version;
}
public boolean isDebug() {
return debug;
}
public void setDebug(boolean debug) {
this.debug = debug;
}
}
| [
"381954728@qq.com"
] | 381954728@qq.com |
9ecc74b2404512604b70c5e1bcf8e14dc6551f38 | 6e4331de3349b594ed842ee763013b34aec97286 | /CoronaGoBackendApp/src/main/java/com/coronago/tasks/util/TasksConfiguration.java | 9f2a6fb0056b7b34983214bfa58065d1ae23673e | [
"Apache-2.0"
] | permissive | VanenburgSoftware/CoronaGo | 2c927cec76aa5e4b85d5e0b024c593d798040026 | bcaf717f293864006103de32ddac52371c911166 | refs/heads/master | 2022-07-02T12:48:14.201362 | 2020-04-08T06:08:52 | 2020-04-08T06:08:52 | 252,699,233 | 0 | 1 | Apache-2.0 | 2022-06-03T02:16:39 | 2020-04-03T10:20:56 | TypeScript | UTF-8 | Java | false | false | 1,623 | java | package com.coronago.tasks.util;
import java.io.InputStream;
import java.util.HashMap;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
import com.coronago.misc.exception.TasksExecutorConstructionException;
import com.coronago.misc.exception.TasksExecutorNotDefinedException;
import com.eva.base.util.JsonUtil;
import com.fasterxml.jackson.core.type.TypeReference;
public class TasksConfiguration {
public static final Map<String, String> TASKS_EXECUTOR_MAP = new HashMap<String, String>();
private static final Logger log = Logger.getLogger(TasksConfiguration.class.getName());
public static TasksExecutor getExecutorClassByType(String taskType) {
String executorClass = TASKS_EXECUTOR_MAP.get(taskType);
if (executorClass == null) throw new TasksExecutorNotDefinedException(taskType);
TasksExecutor executor = null;
try {
executor = (TasksExecutor) Class.forName(executorClass).newInstance();
} catch (Exception e) {
log.log(Level.SEVERE, "Error while creating Instance for " + executorClass, e);
throw new TasksExecutorConstructionException(executorClass, taskType);
}
return executor;
}
public static void initializeTasksConfigurations(String configFile) throws Exception {
InputStream inStream = TasksConfiguration.class.getResourceAsStream("/" + configFile);
Map<String, String> tasksExecutors = JsonUtil.fromStream(inStream, new TypeReference<Map<String, String>>() {});
TASKS_EXECUTOR_MAP.putAll(tasksExecutors);
inStream.close();
}
public static void clearTasksConfigurations() throws Exception {
TASKS_EXECUTOR_MAP.clear();
}
}
| [
"vvinsu@vanenburgsoftware.com"
] | vvinsu@vanenburgsoftware.com |
ceeb3f9a9d9ba579bfd3349106cdc6d5a85d7d51 | d432d922a0c7ca88f0b2f22ea217f00e03e8d735 | /src/com/facebook/buck/apple/CodeSignIdentityStore.java | 9a148375c0bc2f91ffb7628ecb82296ec97cddea | [
"Apache-2.0"
] | permissive | Bostonncity/buck | 6b0f3bad2643a03ec36b9817c716afc13d65045c | 73b04f44e4004ddbecf9b8e6210c56f2d7a9714d | refs/heads/master | 2020-04-06T03:50:26.228683 | 2015-12-17T22:24:47 | 2015-12-17T22:28:16 | 48,203,367 | 2 | 0 | null | 2015-12-17T23:15:45 | 2015-12-17T23:15:45 | null | UTF-8 | Java | false | false | 5,619 | java | /*
* Copyright 2014-present Facebook, 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.facebook.buck.apple;
import com.facebook.buck.log.Logger;
import com.facebook.buck.rules.RuleKeyAppendable;
import com.facebook.buck.rules.RuleKeyBuilder;
import com.facebook.buck.util.ProcessExecutor;
import com.facebook.buck.util.ProcessExecutorParams;
import com.google.common.base.Function;
import com.google.common.base.Optional;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
import com.google.common.collect.ImmutableList;
import com.google.common.hash.HashCode;
import java.io.IOException;
import java.util.EnumSet;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* A collection of code sign identities.
*/
public class CodeSignIdentityStore implements RuleKeyAppendable {
private static final Logger LOG = Logger.get(CodeSignIdentityStore.class);
private static final Pattern CODE_SIGN_IDENTITY_PATTERN =
Pattern.compile("([A-F0-9]{40}) \"(iPhone.*)\"");
private final Supplier<ImmutableList<CodeSignIdentity>> identitiesSupplier;
private CodeSignIdentityStore(Supplier<ImmutableList<CodeSignIdentity>> identitiesSupplier) {
this.identitiesSupplier = identitiesSupplier;
}
/**
* Get all the identities in the store.
*/
public ImmutableList<CodeSignIdentity> getIdentities() {
return identitiesSupplier.get();
}
@Override
public RuleKeyBuilder appendToRuleKey(RuleKeyBuilder builder) {
return builder.setReflectively("CodeSignIdentityStore", getIdentities());
}
/**
* Construct a store by asking the system keychain for all stored code sign identities.
*
* The loading process is deferred till first access.
*/
public static CodeSignIdentityStore fromSystem(final ProcessExecutor processExecutor) {
return new CodeSignIdentityStore(Suppliers.memoize(
new Supplier<ImmutableList<CodeSignIdentity>>() {
@Override
public ImmutableList<CodeSignIdentity> get() {
ProcessExecutorParams processExecutorParams =
ProcessExecutorParams.builder()
.setCommand(
ImmutableList.of(
"security", "find-identity",
"-v", "-p", "codesigning"))
.build();
// Specify that stdout is expected, or else output may be wrapped in Ansi escape chars.
Set<ProcessExecutor.Option> options =
EnumSet.of(ProcessExecutor.Option.EXPECTING_STD_OUT);
ProcessExecutor.Result result;
try {
result = processExecutor.launchAndExecute(
processExecutorParams,
options,
/* stdin */ Optional.<String>absent(),
/* timeOutMs */ Optional.<Long>absent(),
/* timeOutHandler */ Optional.<Function<Process, Void>>absent());
} catch (InterruptedException | IOException e) {
LOG.warn("Could not execute security, continuing without codesign identity.");
return ImmutableList.of();
}
if (result.getExitCode() != 0) {
throw new RuntimeException(
"security -v -p codesigning failed: " + result.getStderr());
}
Matcher matcher = CODE_SIGN_IDENTITY_PATTERN.matcher(result.getStdout().get());
ImmutableList.Builder<CodeSignIdentity> builder = ImmutableList.builder();
while (matcher.find()) {
Optional<HashCode> fingerprint = CodeSignIdentity.toFingerprint(matcher.group(1));
if (!fingerprint.isPresent()) {
// security should always output a valid fingerprint string.
LOG.warn("Code sign identity fingerprint is invalid, ignored: " + matcher.group(1));
break;
}
String subjectCommonName = matcher.group(2);
CodeSignIdentity identity = CodeSignIdentity.builder()
.setFingerprint(fingerprint)
.setSubjectCommonName(subjectCommonName)
.build();
builder.add(identity);
LOG.debug("Found code signing identity: " + identity.toString());
}
ImmutableList<CodeSignIdentity> allValidIdentities = builder.build();
if (allValidIdentities.isEmpty()) {
LOG.warn("No valid code signing identities found. Device build/install won't work.");
} else if (allValidIdentities.size() > 1) {
LOG.info(
"Multiple valid identity found. This could potentially cause the wrong one to" +
" be used unless explicitly specified via CODE_SIGN_IDENTITY.");
}
return allValidIdentities;
}
}));
}
public static CodeSignIdentityStore fromIdentities(Iterable<CodeSignIdentity> identities) {
return new CodeSignIdentityStore(Suppliers.ofInstance(ImmutableList.copyOf(identities)));
}
}
| [
"sdwilsh@fb.com"
] | sdwilsh@fb.com |
2364fdafce47e8a86d403377438aa1f7da4536e3 | 0fcbe95db7eca212e867247d7c69ed730f3e2e4a | /1steBachelor/OGPROG/Prog2-master/src/prog2/tracker/TimeSlotDialogTesterCompanion.java | 89b1322d2094c8febd371e425c12add3bfbaf2c8 | [] | no_license | JeeVeeVee/univ | 440e87792b7b468f5a276f93ffbb2a8f3e7d28b4 | 4e58637cabc47123da16e97b5761bd19ddaa4454 | refs/heads/master | 2021-01-03T23:39:07.037521 | 2020-04-26T07:45:42 | 2020-04-26T07:45:42 | 240,284,065 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,058 | java | /* TimeSlotDialogTesterCompanion.java
* ============================================================
* Copyright (C) 2012-2013 Universiteit Gent
*
* Bijlage bij het vak 'Programmeren 2'.
*
* Auteur: Kris Coolsaet
*/
package prog2.tracker;
import javafx.scene.control.Label;
import java.time.LocalDateTime;
/**
* Partnerklasse van {@code TimeSlotDialogTester.fxml}
*/
public class TimeSlotDialogTesterCompanion {
public Label result;
private TimeSlotDialog dialog;
public void initialize () {
dialog = new TimeSlotDialog ();
LocalDateTime dateTime = LocalDateTime.now();
dialog.setTimeSlot(new TimeSlot(
dateTime.minusHours(50),
dateTime,
"Testing dialog"
));
}
public void showDialog () {
dialog.showAndWait();
TimeSlot ts = dialog.getTimeSlot();
if (ts == null) {
result.setText("<canceled>");
} else {
result.setText (ts.toString());
}
}
}
| [
"jules.vervaeke@ugent.be"
] | jules.vervaeke@ugent.be |
62aed0764103599125d9455c5e4cd2ab8a565e64 | fb5bfb5b4cf7a118cb858490953e69517d8060a4 | /src/ch21/ex33/codeb/EndSentinel.java | 22ff2cffb504a01eee74afd27e1bb0f55a2fd0ae | [] | no_license | v777779/jbook | 573dd1e4e3847ed51c9b6b66d2b098bf8eb58af5 | 09fc56a27e9aed797327f01ea955bdf1815d0d54 | refs/heads/master | 2021-09-19T08:14:16.299382 | 2018-07-25T14:03:12 | 2018-07-25T14:03:12 | 86,017,001 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 638 | java | package ch21.ex33.codeb;
import java.util.concurrent.ExecutorService;
/**
* Vadim Voronov
* Created: 08-May-17.
* email: vadim.v.voronov@gmail.com
*/
public class EndSentinel extends DelayedTask {
private ExecutorService exec;
public EndSentinel(int delta, ExecutorService exec) {
super(delta);
this.exec = exec;
}
@Override
public void run() {
for (DelayedTask delayedTask : sequence) {
System.out.print(delayedTask.summary() + " ");
}
System.out.println();
System.out.println(this + " calling shutdownNow()");
exec.shutdownNow();
}
}
| [
"vadim.v.voronov@gmail.com"
] | vadim.v.voronov@gmail.com |
ce7ade7f7c107301cfad1e24e1bffe0102a6114e | 0cc6e6c16bf427ca9afba6b835d1eb406702e8c8 | /Core/java/com/l2jserver/gameserver/model/actor/instance/L2FortCommanderInstance.java | 5324214e658504374533d05fdd90ae2567045922 | [] | no_license | Kryspo/blaion | a19087d1533d763d977d4dcc8235a2d1a61890b8 | 7e34627b01f30aacc290b87e1ad69e81b9e9cc33 | refs/heads/master | 2020-03-21T15:01:15.618199 | 2018-06-28T07:35:50 | 2018-06-28T07:35:50 | 138,689,668 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,864 | java | /*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.l2jserver.gameserver.model.actor.instance;
import com.l2jserver.Config;
import com.l2jserver.gameserver.ThreadPoolManager;
import com.l2jserver.gameserver.ai.CtrlIntention;
import com.l2jserver.gameserver.instancemanager.FortSiegeManager;
import com.l2jserver.gameserver.instancemanager.FortSiegeManager.SiegeSpawn;
import com.l2jserver.gameserver.model.L2CharPosition;
import com.l2jserver.gameserver.model.L2Skill;
import com.l2jserver.gameserver.model.L2Spawn;
import com.l2jserver.gameserver.model.actor.L2Character;
import com.l2jserver.gameserver.model.actor.L2Summon;
import com.l2jserver.gameserver.network.serverpackets.CreatureSay;
import com.l2jserver.gameserver.templates.chars.L2NpcTemplate;
import javolution.util.FastList;
public class L2FortCommanderInstance extends L2DefenderInstance
{
private boolean _canTalk;
public L2FortCommanderInstance(int objectId, L2NpcTemplate template)
{
super(objectId, template);
setInstanceType(InstanceType.L2FortCommanderInstance);
_canTalk = true;
}
/**
* Return True if a siege is in progress and the L2Character attacker isn't a Defender.<BR>
* <BR>
* @param attacker The L2Character that the L2CommanderInstance try to attack
*/
@Override
public boolean isAutoAttackable(L2Character attacker)
{
if ((attacker == null) || !(attacker instanceof L2PcInstance))
{
return false;
}
boolean isFort = ((getFort() != null) && (getFort().getFortId() > 0) && getFort().getSiege().getIsInProgress() && !getFort().getSiege().checkIsDefender(((L2PcInstance) attacker).getClan()));
// Attackable during siege by all except defenders
return (isFort);
}
@Override
public void addDamageHate(L2Character attacker, int damage, int aggro)
{
if (attacker == null)
{
return;
}
if (!(attacker instanceof L2FortCommanderInstance))
{
super.addDamageHate(attacker, damage, aggro);
}
}
@Override
public boolean doDie(L2Character killer)
{
if (!super.doDie(killer))
{
return false;
}
if (getFort().getSiege().getIsInProgress())
{
getFort().getSiege().killedCommander(this);
}
return true;
}
/**
* This method forces guard to return to home location previously set
*/
@Override
public void returnHome()
{
if (!isInsideRadius(getSpawn().getLocx(), getSpawn().getLocy(), 200, false))
{
if (Config.DEBUG)
{
_log.info(getObjectId() + ": moving home");
}
setisReturningToSpawnPoint(true);
clearAggroList();
if (hasAI())
{
getAI().setIntention(CtrlIntention.AI_INTENTION_MOVE_TO, new L2CharPosition(getSpawn().getLocx(), getSpawn().getLocy(), getSpawn().getLocz(), 0));
}
}
}
@Override
public final void addDamage(L2Character attacker, int damage, L2Skill skill)
{
L2Spawn spawn = getSpawn();
if ((spawn != null) && canTalk())
{
FastList<SiegeSpawn> commanders = FortSiegeManager.getInstance().getCommanderSpawnList(getFort().getFortId());
for (SiegeSpawn spawn2 : commanders)
{
if (spawn2.getNpcId() == spawn.getNpcId())
{
String text = "";
switch (spawn2.getId())
{
case 1:
text = "Attacking the enemy's reinforcements is necesary. Time to Die!";
break;
case 2:
if (attacker instanceof L2Summon)
{
attacker = ((L2Summon) attacker).getOwner();
}
text = "Everyone, concentrate your attacks on " + attacker.getName() + "! Show the enemy your resolve!";
break;
case 3:
text = "Spirit of Fire, unleash your power! Burn the enemy!!";
break;
}
if (!text.isEmpty())
{
broadcastPacket(new CreatureSay(getObjectId(), 1, getName(), text));
setCanTalk(false);
ThreadPoolManager.getInstance().scheduleGeneral(new ScheduleTalkTask(), 10000);
}
}
}
}
super.addDamage(attacker, damage, skill);
}
private class ScheduleTalkTask implements Runnable
{
public ScheduleTalkTask()
{
}
@Override
public void run()
{
setCanTalk(true);
}
}
void setCanTalk(boolean val)
{
_canTalk = val;
}
private boolean canTalk()
{
return _canTalk;
}
@Override
public boolean hasRandomAnimation()
{
return false;
}
}
| [
"cristianleon48@gmail.com"
] | cristianleon48@gmail.com |
3d859dedc4419da3912ae1bd79b42a9eddda8c3b | 000e9ddd9b77e93ccb8f1e38c1822951bba84fa9 | /java/classes2/com/xiaomi/push/service/u.java | 439f794c0c50d7dc2a388abd65802866a2566705 | [
"Apache-2.0"
] | permissive | Paladin1412/house | 2bb7d591990c58bd7e8a9bf933481eb46901b3ed | b9e63db1a4975b614c422fed3b5b33ee57ea23fd | refs/heads/master | 2021-09-17T03:37:48.576781 | 2018-06-27T12:39:38 | 2018-06-27T12:41:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 751 | java | package com.xiaomi.push.service;
import com.xiaomi.channel.commonutils.logger.b;
import com.xiaomi.smack.l;
import com.xiaomi.xmpush.thrift.ab;
final class u
extends XMPushService.h
{
u(int paramInt, XMPushService paramXMPushService, ab paramab)
{
super(paramInt);
}
public void a()
{
try
{
ab localab = s.a(this.b, this.c);
aa.a(this.b, localab);
return;
}
catch (l locall)
{
b.a(locall);
this.b.a(10, locall);
}
}
public String b()
{
return "send ack message for message.";
}
}
/* Location: /Users/gaoht/Downloads/zirom/classes2-dex2jar.jar!/com/xiaomi/push/service/u.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"ght163988@autonavi.com"
] | ght163988@autonavi.com |
82aebe498fd3f33b9bb680035d0e0ceb84e5e522 | 82219108453a06896a58a004aad9bdd920eee2ec | /deskshare/applet/src/main/java/org/bigbluebutton/deskshare/client/net/BlockMessage.java | 1a95654fa37e6d34973b2d094d15646a392ab123 | [] | no_license | neerajcse/bigbluebutton | 307eac8380cb6c228c3d1bfb2e7223fcb2f3c40f | fc772ee318ee57024d0f624a2cce54d75d24f3e0 | refs/heads/master | 2020-12-24T13:28:05.041631 | 2010-07-10T23:03:59 | 2010-07-10T23:03:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 345 | java | package org.bigbluebutton.deskshare.client.net;
public class BlockMessage implements Message {
private int position;
public BlockMessage(int position) {
this.position = position;
}
@Override
public MessageType getMessageType() {
return MessageType.BLOCK;
}
public int getPosition() {
return position;
}
}
| [
"ritzalam@gmail.com"
] | ritzalam@gmail.com |
53ccd320d8ff784f3c98f421937d009a473dc030 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/11/11_5d42b183230d2ff74b18e37058eaea3213343ac0/TopicPublisher/11_5d42b183230d2ff74b18e37058eaea3213343ac0_TopicPublisher_s.java | 8d19432e00937042ca6c1e2cf1ee27d423e2b0fc | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 2,966 | java | package jms;
import javax.jms.Connection;
import javax.jms.DeliveryMode;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
import javax.jms.MessageProducer;
import javax.jms.Queue;
import javax.jms.QueueConnection;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.jms.Topic;
import org.apache.activemq.ActiveMQConnectionFactory;
import util.StockExchange;
import util.StockQuote;
public class TopicPublisher {
private Connection connection;
private Session session;
private MessageProducer publisher;
private String url;
private Topic topic;
private ActiveMQConnectionFactory factory;
private StockExchange exchange;
private Queue requestsQueue;
private MessageConsumer requestConsumer;
public TopicPublisher(String url, StockExchange exchange) {
this.exchange = exchange;
if(url == null){
this.url = "tcp://localhost:61616";
}else{
this.url = url;
}
init();
}
public void init(){
factory = new ActiveMQConnectionFactory(url);
try {
connection = factory.createConnection();
session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
requestsQueue = session.createQueue("requests");
requestConsumer = session.createConsumer(requestsQueue);
requestConsumer.setMessageListener(new MessageListener() {
@Override
public void onMessage(Message arg0) {
handleRequestMessage(arg0);
}
});
connection.start();
} catch (JMSException e) {
e.printStackTrace();
}
}
private void handleRequestMessage(Message msg) {
System.out.println("request message received!");
try {
String stockName = msg.getStringProperty("stockName");
Destination replyDest = msg.getJMSReplyTo();
QueueConnection qConnection = factory.createQueueConnection();
QueueSession qSession = qConnection.createQueueSession(false,
Session.AUTO_ACKNOWLEDGE);
MessageProducer mp = qSession.createProducer(replyDest);
mp.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
mp.send(qSession.createObjectMessage(exchange
.getCurrentQuote(stockName)));
} catch (JMSException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
public void publishObjectMessage(StockQuote quote){
try {
topic = session.createTopic("dax."+quote.getName());
publisher = session.createProducer(topic);
publisher.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
publisher.send(session.createObjectMessage(quote));
} catch (JMSException e) {
e.printStackTrace();
}
}
public void close(){
try {
connection.stop();
connection.close();
} catch (JMSException e) {
e.printStackTrace();
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
7959f267bb06617ec766692dd99836081bc8c344 | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project98/src/test/java/org/gradle/test/performance98_5/Test98_420.java | e5793fbff9932966078dc3ad1e84165dbe803c12 | [] | 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 | 292 | java | package org.gradle.test.performance98_5;
import static org.junit.Assert.*;
public class Test98_420 {
private final Production98_420 production = new Production98_420("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
80ad3260389903ec017a5e619f085de931f642b4 | 39bb67d27c696a47e82ced53bb77a8cce9b87d7f | /src/design_mode/state/able_interface/Stationable.java | 63eb41591d950eae64e51c20fd3c761c156c1770 | [] | no_license | Automannn/designMode | 1976a3b64c105c089cb847de9774f98180e7357a | a5d2516f1c583afabacac6b617eb14091ddfa6f4 | refs/heads/master | 2020-03-30T12:27:54.029735 | 2018-10-02T09:11:41 | 2018-10-02T09:12:20 | 151,225,471 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 187 | java | package design_mode.state.able_interface;
/**
* @author automannn@163.com
* @time 2018/9/18 0:11
*/
public interface Stationable {
boolean stateChanged();
void stateDo();
}
| [
"Automannn@163.com"
] | Automannn@163.com |
c6809f5cb5e9597b7a2325e7edaaa183313a7bf8 | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /gameshield-20180305/src/main/java/com/aliyun/gameshield20180305/models/DescribeGroupSimpleListResponseBody.java | 0f2a6153d46003d8e943a252a5b680ffedae6715 | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 3,994 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.gameshield20180305.models;
import com.aliyun.tea.*;
public class DescribeGroupSimpleListResponseBody extends TeaModel {
@NameInMap("RequestId")
public String requestId;
@NameInMap("GroupList")
public java.util.List<DescribeGroupSimpleListResponseBodyGroupList> groupList;
@NameInMap("Total")
public Long total;
@NameInMap("PromptInfo")
public java.util.Map<String, ?> promptInfo;
public static DescribeGroupSimpleListResponseBody build(java.util.Map<String, ?> map) throws Exception {
DescribeGroupSimpleListResponseBody self = new DescribeGroupSimpleListResponseBody();
return TeaModel.build(map, self);
}
public DescribeGroupSimpleListResponseBody setRequestId(String requestId) {
this.requestId = requestId;
return this;
}
public String getRequestId() {
return this.requestId;
}
public DescribeGroupSimpleListResponseBody setGroupList(java.util.List<DescribeGroupSimpleListResponseBodyGroupList> groupList) {
this.groupList = groupList;
return this;
}
public java.util.List<DescribeGroupSimpleListResponseBodyGroupList> getGroupList() {
return this.groupList;
}
public DescribeGroupSimpleListResponseBody setTotal(Long total) {
this.total = total;
return this;
}
public Long getTotal() {
return this.total;
}
public DescribeGroupSimpleListResponseBody setPromptInfo(java.util.Map<String, ?> promptInfo) {
this.promptInfo = promptInfo;
return this;
}
public java.util.Map<String, ?> getPromptInfo() {
return this.promptInfo;
}
public static class DescribeGroupSimpleListResponseBodyGroupList extends TeaModel {
@NameInMap("IsDnsEnabled")
public Boolean isDnsEnabled;
@NameInMap("GroupId")
public String groupId;
@NameInMap("GroupName")
public String groupName;
@NameInMap("AppId")
public String appId;
@NameInMap("BizId")
public String bizId;
@NameInMap("IsDisabled")
public Boolean isDisabled;
public static DescribeGroupSimpleListResponseBodyGroupList build(java.util.Map<String, ?> map) throws Exception {
DescribeGroupSimpleListResponseBodyGroupList self = new DescribeGroupSimpleListResponseBodyGroupList();
return TeaModel.build(map, self);
}
public DescribeGroupSimpleListResponseBodyGroupList setIsDnsEnabled(Boolean isDnsEnabled) {
this.isDnsEnabled = isDnsEnabled;
return this;
}
public Boolean getIsDnsEnabled() {
return this.isDnsEnabled;
}
public DescribeGroupSimpleListResponseBodyGroupList setGroupId(String groupId) {
this.groupId = groupId;
return this;
}
public String getGroupId() {
return this.groupId;
}
public DescribeGroupSimpleListResponseBodyGroupList setGroupName(String groupName) {
this.groupName = groupName;
return this;
}
public String getGroupName() {
return this.groupName;
}
public DescribeGroupSimpleListResponseBodyGroupList setAppId(String appId) {
this.appId = appId;
return this;
}
public String getAppId() {
return this.appId;
}
public DescribeGroupSimpleListResponseBodyGroupList setBizId(String bizId) {
this.bizId = bizId;
return this;
}
public String getBizId() {
return this.bizId;
}
public DescribeGroupSimpleListResponseBodyGroupList setIsDisabled(Boolean isDisabled) {
this.isDisabled = isDisabled;
return this;
}
public Boolean getIsDisabled() {
return this.isDisabled;
}
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
117eb6fd0838a271fdf4de2f2cdbd9db53da056d | c986f7402e4c94513442de4dc5cc429744ba6d5b | /libraries/MVPFramework/src/main/java/com/shen/mvpframework/view/AbstractFragment.java | 0a35f28ff704204e0a0ada23895d1b3deb6d71d7 | [] | no_license | hehuahaishen/MVPFrameworkTest | 9ee863c551bd16e703466e9cb9e949221eca914d | 16629fd7401663ddb1ed7d81c6de61b78a1aad07 | refs/heads/master | 2020-03-10T01:09:44.006282 | 2018-05-04T07:53:58 | 2018-05-04T07:53:58 | 129,102,208 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,421 | java | package com.shen.mvpframework.view;
import android.app.Activity;
import android.app.ActivityManager;
import android.content.Context;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.KeyEvent;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Toast;
import com.shen.mvpframework.factory.PresenterMvpFactory;
import com.shen.mvpframework.factory.PresenterMvpFactoryImpl;
import com.shen.mvpframework.presenter.BaseMvpPresenter;
import com.shen.mvpframework.proxy.BaseMvpProxy;
import com.shen.mvpframework.proxy.PresenterProxyInterface;
import java.util.List;
/**
* 继承Fragment的MvpFragment基类
*/
public abstract class AbstractFragment<V extends BaseMvpView, P extends BaseMvpPresenter<V>>
extends Fragment implements PresenterProxyInterface<V, P> {
public abstract int getContentLayout();
public abstract void initView(View view);
public abstract void initListener();
public abstract void initData();
/** 调用onSaveInstanceState时存入Bundle的key */
private static final String PRESENTER_SAVE_KEY = "presenter_save_key";
/** 创建被代理对象,传入默认Presenter的工厂 */
private BaseMvpProxy<V, P> mProxy = new BaseMvpProxy<>(PresenterMvpFactoryImpl.<V, P>createFactory(getClass()));
public Context mContext;
public Activity mActivity;
public Toast mToast;
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if(savedInstanceState != null){
mProxy.onRestoreInstanceState(savedInstanceState);
}
}
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
View view = inflater.inflate(getContentLayout(), container, false);
mContext = getContext();
mActivity = getActivity();
initView(view);
initListener();
initData();
view.setFocusable(true); //这个和下面的这个命令必须要设置了,才能监听back事件。
view.setFocusableInTouchMode(true);
view.setOnKeyListener(mKeyListener);
return view;
}
@Override
public void onResume() {
super.onResume();
mProxy.onResume((V) this);
}
@Override
public void onDestroy() {
super.onDestroy();
mProxy.onDestroy();
}
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBundle(PRESENTER_SAVE_KEY, mProxy.onSaveInstanceState());
}
/*-------------------- implements PresenterProxyInterface start ---------------------*/
/**
* 可以实现自己PresenterMvpFactory工厂
*
* @param presenterFactory PresenterFactory类型
*/
@Override
public void setPresenterFactory(PresenterMvpFactory<V, P> presenterFactory) {
mProxy.setPresenterFactory(presenterFactory);
}
/**
* 获取创建Presenter的工厂
*
* @return PresenterMvpFactory类型
*/
@Override
public PresenterMvpFactory<V, P> getPresenterFactory() {
return mProxy.getPresenterFactory();
}
/**
* 获取Presenter
* @return P
*/
@Override
public P getMvpPresenter() {
return mProxy.getMvpPresenter();
}
/*-------------------- implements PresenterProxyInterface end ---------------------*/
/**
* 如果 Toast对象存在"正在显示" <br>
* 就"不等其显示完"再"显示另一个Toast" <br>
* 直接修改"toast内部文本" <br>
*
* @param text 待显示的文字
*/
public void showToast(String text) {
// 判断程序是否在前台运行 如果程序是在后台运行 不显示toast
if (!isTopActivity()) {
return;
}
if (mToast != null) {
mToast.setText(text);
} else {
mToast = Toast.makeText(mContext, text, Toast.LENGTH_SHORT);
}
//mToast.setGravity(Gravity.CENTER, 0, 0); // 这里显示在中间 -- 可以去掉,就是默认位置
mToast.show(); // 显示toast信息
}
/**
* 程序是否正在前台运行
*
* @return
*/
public boolean isTopActivity() {
/*
* System.out.println("**********************top packageName:" +
* getInstance().getPackageName());
*/
ActivityManager activityManager = (ActivityManager) mActivity.getApplication().getSystemService(Context.ACTIVITY_SERVICE);
List<ActivityManager.RunningTaskInfo> tasksInfo = activityManager.getRunningTasks(1);
if (tasksInfo.size() > 0) {
/*
* System.out.println("*********************curr packageName:" +
* tasksInfo.get(0).topActivity.getPackageName());
*/
// 应用程序位于堆栈的顶层
if (mActivity.getApplication().getPackageName().equals(tasksInfo.get(0).topActivity.getPackageName())) {
return true;
}
}
return false;
}
private View.OnKeyListener mKeyListener = new View.OnKeyListener() {
@Override
public boolean onKey(View view, int i, KeyEvent keyEvent) {
return false;
}
};
}
| [
"987775154@qq.com"
] | 987775154@qq.com |
a46b3d2760b12bb1e8bb2cad1c20ddc6017bf8fd | ce37a813ca624b0628316f472bed0d9244b6a8d4 | /emily-spring-boot-common/src/main/java/com/emily/infrastructure/common/helper/StringHelper.java | c709ac41290afcde8c258036ccf83d2fc199d25d | [] | no_license | ntlcn/spring-parent | 1723f50873f2b05c4876361226f2fb5a01d1e32e | 95b4f37ca6998a0833a52084b0c99262fb91321b | refs/heads/master | 2023-08-18T11:11:36.805562 | 2021-09-30T08:04:20 | 2021-09-30T08:04:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,246 | java | package com.emily.infrastructure.common.helper;
import org.apache.commons.lang3.StringUtils;
import java.text.MessageFormat;
/**
* @program: spring-parent
* @description: 字符串帮助类
* @author: Emily
* @create: 2021/08/19
*/
public class StringHelper {
/**
* 首字母转小写
*
* @param str
* @return
*/
public static String toLowerFirstCase(String str) {
if (StringUtils.isEmpty(str) || Character.isLowerCase(str.charAt(0))) {
return str;
}
return MessageFormat.format("{0}{1}", Character.toLowerCase(str.charAt(0)), str.substring(1));
}
/**
* 首字母转大写
*
* @param str
* @return
*/
public static String toUpperFirstCase(String str) {
if (StringUtils.isEmpty(str) || Character.isUpperCase(str.charAt(0))) {
return str;
}
return MessageFormat.format("{0}{1}", Character.toUpperCase(str.charAt(0)), str.substring(1));
}
/**
* 获取首个字符串
* @param str
* @return
*/
public static String firstString(String str){
if(StringUtils.isEmpty(str)){
return str;
}
return String.valueOf(str.charAt(0));
}
}
| [
"mingyang@eastmoney.com"
] | mingyang@eastmoney.com |
87871d2326b69c1d4df45a920e39d4d8d334832f | 75c4712ae3f946db0c9196ee8307748231487e4b | /src/main/java/com/alipay/api/domain/ClientInfo.java | c4a7f27af837cb88ef43b62902de11d0bd39ed6a | [
"Apache-2.0"
] | permissive | yuanbaoMarvin/alipay-sdk-java-all | 70a72a969f464d79c79d09af8b6b01fa177ac1be | 25f3003d820dbd0b73739d8e32a6093468d9ed92 | refs/heads/master | 2023-06-03T16:54:25.138471 | 2021-06-25T14:48:21 | 2021-06-25T14:48:21 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,339 | java | package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 客户端信息
*
* @author auto create
* @since 1.0, 2018-11-29 20:18:37
*/
public class ClientInfo extends AlipayObject {
private static final long serialVersionUID = 7124335199793723576L;
/**
* 目前支持4个值
en:英文
zh-Hans:简体中文
zh-Hant:繁体台湾
zh-HK:繁体香港
默认值是zh-Hans
*/
@ApiField("language")
private String language;
/**
* 操作系统
目前支持
ios
android
*/
@ApiField("os")
private String os;
/**
* 客户端类型,目前支持alipay,uc
*/
@ApiField("type")
private String type;
/**
* 客户端的版本号
*/
@ApiField("version_no")
private String versionNo;
public String getLanguage() {
return this.language;
}
public void setLanguage(String language) {
this.language = language;
}
public String getOs() {
return this.os;
}
public void setOs(String os) {
this.os = os;
}
public String getType() {
return this.type;
}
public void setType(String type) {
this.type = type;
}
public String getVersionNo() {
return this.versionNo;
}
public void setVersionNo(String versionNo) {
this.versionNo = versionNo;
}
}
| [
"ben.zy@antfin.com"
] | ben.zy@antfin.com |
609649c4189b0d76d73f666bc6253b569d8cfdd2 | 7140636fbd8016710b39dfda518bf2ce19b2c7c1 | /jbpm-form-modeler-core/jbpm-form-modeler-service/jbpm-form-modeler-request-dispatcher/src/test/java/org/jbpm/formModeler/service/bb/mvc/components/handling/mocks/MyBeanHandler.java | 194b5bdd5b863f480f449b498d42d42ed280c6cb | [
"Apache-2.0"
] | permissive | repo-autkat/jbpm-form-modeler | 2a6023a610aab1cbbf13b342eccef6f37d316959 | bd957f86b8b1a810a0210c19566c5e1bf030c6e4 | refs/heads/master | 2023-04-28T14:19:11.988729 | 2017-09-22T12:33:09 | 2017-09-22T12:33:09 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,347 | java | package org.jbpm.formModeler.service.bb.mvc.components.handling.mocks;
import org.jbpm.formModeler.service.bb.mvc.components.CurrentComponentRenderer;
import org.jbpm.formModeler.service.bb.mvc.components.handling.BeanHandler;
import org.jbpm.formModeler.service.bb.mvc.controller.CommandRequest;
import org.jbpm.formModeler.service.bb.mvc.controller.CommandResponse;
import org.jbpm.formModeler.service.bb.mvc.controller.responses.DoNothingResponse;
import org.jbpm.formModeler.service.bb.mvc.controller.responses.SendStreamResponse;
import static org.mockito.Mockito.*;
public class MyBeanHandler extends BeanHandler {
protected CurrentComponentRenderer renderer;
public MyBeanHandler( CurrentComponentRenderer renderer ) {
this.renderer = renderer;
this.setEnabledForActionHandling( true );
this.setEnableDoubleClickControl( false );
this.start();
}
public CommandResponse actionWithResponse( CommandRequest request ) {
return new DoNothingResponse();
}
public void actionWithoutResponse( CommandRequest request ) {
}
public SendStreamResponse actionDownload( CommandRequest request ) {
return mock( SendStreamResponse.class );
}
@Override
protected CurrentComponentRenderer getCurrentComponentRenderer() {
return renderer;
}
}
| [
"christian.sadilek@gmail.com"
] | christian.sadilek@gmail.com |
748890ddb956b81be1c9da49e526e8dc935f8367 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_f8119560cbff6c3d6235e88c638a74acaee476fd/SetDebug/2_f8119560cbff6c3d6235e88c638a74acaee476fd_SetDebug_s.java | 7db63d45923c392554dfc242bed45bcec74b8601 | [] | 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,501 | java | /**
* Project: ANE-Google-Analytics
*
* Author: Alessandro Bianco
* Website: http://alessandrobianco.eu
* Twitter: @alebianco
* Created: 22/12/12 15.22
*
* Copyright © 2013 Alessandro Bianco
*/
package eu.alebianco.air.extensions.analytics.functions;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREObject;
import com.google.analytics.tracking.android.GoogleAnalytics;
import com.stackoverflow.util.StackTraceInfo;
import eu.alebianco.air.extensions.utils.FREUtils;
import eu.alebianco.air.extensions.utils.LogLevel;
public class SetDebug implements FREFunction {
@Override
public FREObject call(FREContext context, FREObject[] args) {
FREObject result = null;
Boolean value;
try {
value = args[0].getAsBool();
} catch (Exception e) {
FREUtils.logEvent(context, LogLevel.FATAL,
"Unable to read the 'value' parameter. [Exception:(type:%s, method:%s)].",
FREUtils.stripPackageFromClassName(e.toString()), FREUtils.stripPackageFromClassName(StackTraceInfo.getCurrentClassName()));
return FREUtils.createRuntimeException("ArgumentError", 0, "Unable to read the 'value' parameter on method '%s'.", FREUtils.stripPackageFromClassName(StackTraceInfo.getCurrentClassName()));
}
GoogleAnalytics.getInstance(context.getActivity()).setDebug(false);
return result;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
958a9669cb4f31cc3ce81ccddf1056c10341c5f4 | a840a5e110b71b728da5801f1f3e591f6128f30e | /src/main/java/com/google/security/zynamics/binnavi/Gui/_Doc.java | 56ad2ae08a0cbe3a497d1216d158fa0d38695ec5 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | tpltnt/binnavi | 0a25d2fde2c6029aeef4fcfec8eead5c8e51f4b4 | 598c361d618b2ca964d8eb319a686846ecc43314 | refs/heads/master | 2022-10-20T19:38:30.080808 | 2022-07-20T13:01:37 | 2022-07-20T13:01:37 | 107,143,332 | 0 | 0 | Apache-2.0 | 2023-08-20T11:22:53 | 2017-10-16T15:02:35 | Java | UTF-8 | Java | false | false | 751 | java | /*
Copyright 2011-2016 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.security.zynamics.binnavi.Gui;
/**
* All the windows, dialogs, and panels that you can see while using BinNavi are stored in this
* package.
*/
| [
"cblichmann@google.com"
] | cblichmann@google.com |
026927394b5e7f9d0d0aa1e5318c9f6178fc385c | 64c2971060b5eb18c2fcc85d6e6efbf43b7026ee | /src/test/java/com/cybertek/tests/day04_Basic_Locator/LinkTextAnd_PartialLinkTest.java | 029c110f5681eb1d9129b3c38e1dbda23559f78e | [] | no_license | KailibinuerAbuduaini/Summer2019EuropeTestNGProject | 37a18cade1a025cabd46e1eec30e07c9c71940ae | ab3e5abe35d967c6a790f742a0476d9f5eb88d7f | refs/heads/master | 2023-05-10T19:36:16.464072 | 2020-05-03T22:34:42 | 2020-05-03T22:34:42 | 218,853,867 | 0 | 0 | null | 2023-05-09T18:37:19 | 2019-10-31T20:18:13 | Java | UTF-8 | Java | false | false | 880 | java | package com.cybertek.tests.day04_Basic_Locator;
import com.cybertek.utilities.WebDriverFactory;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
public class LinkTextAnd_PartialLinkTest {
public static void main(String[] args) {
WebDriver driver = WebDriverFactory.getDriver("chrome");
driver.get("http://practice.cybertekschool.com/dynamic_loading");
//linkText
WebElement Link3=driver.findElement(By.linkText("Example 3: Element on page that is hidden and become" +
" visible after 5 seconds"));
Link3.click();
//linkText
WebElement home=driver.findElement(By.linkText("Home"));
home.click();
//partialLinkText
WebElement Link6=driver.findElement(By.partialLinkText("Example 6:"));
Link6.click();
}
}
| [
"myEmail@Gmail.com"
] | myEmail@Gmail.com |
ae6691340c91c6723b6c4fd5073c18edece1af65 | 3bfb7d79c7bfc30e0c40d38e554e6badfa07e4e5 | /user-infor/src/main/java/com/ahsj/userinfor/config/DataSourceConfig.java | d22328c56fbf027ed147b20cfe861fba951c7a96 | [] | no_license | AnHuiShangJue/hisprojecte | e4000f103977e99dcbb9d10bd8cad6da4d44eb26 | f7b9c769d33cf2d9491cc557dc0f6f70ad4f2310 | refs/heads/master | 2023-01-24T04:34:02.051134 | 2020-06-03T10:41:52 | 2020-06-03T10:41:52 | 210,382,667 | 1 | 1 | null | 2023-01-04T22:36:32 | 2019-09-23T14:56:20 | HTML | UTF-8 | Java | false | false | 1,453 | java | package com.ahsj.userinfor.config;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.jdbc.DataSourceBuilder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Primary;
import org.springframework.jdbc.core.JdbcTemplate;
import javax.sql.DataSource;
//@Configuration
public class DataSourceConfig {
@Bean(name = "primaryDataSource")
@Qualifier("primaryDataSource")
@ConfigurationProperties(prefix="spring.datasource.primary")
public DataSource primaryDataSource() {
return DataSourceBuilder.create().build();
}
@Bean(name = "secondaryDataSource")
@Qualifier("secondaryDataSource")
@Primary
@ConfigurationProperties(prefix="spring.datasource.secondary")
public DataSource secondaryDataSource() {
return DataSourceBuilder.create().build();
}
@Bean(name = "primaryJdbcTemplate")
public JdbcTemplate primaryJdbcTemplate(
@Qualifier("primaryDataSource") DataSource dataSource) {
return new JdbcTemplate(dataSource);
}
@Bean(name = "secondaryJdbcTemplate")
public JdbcTemplate secondaryJdbcTemplate(
@Qualifier("secondaryDataSource") DataSource dataSource) {
return new JdbcTemplate(dataSource);
}
}
| [
"18555338533@163.com"
] | 18555338533@163.com |
9bcfa5ce262b29a21ce2add4fb24f800a3268ff4 | b2b5185631ddf3f582f78065247caa8ff85919c9 | /tags/release-2.1/src/DVN-EJB/src/java/edu/harvard/iq/dvn/core/catalog/CatalogServiceLocal.java | 3f6713c3594dc8e5c651631d809edb910ae7f034 | [] | no_license | dvn/dvn-svn-import-test5 | bd606b663c8a061278b4164b9b21078667c1675e | 09ef67d666fbd8860b8c233bedf2529f39c59bbd | refs/heads/master | 2016-09-06T14:43:08.202121 | 2013-01-04T20:00:13 | 2013-01-04T20:00:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,514 | java | /*
* Dataverse Network - A web application to distribute, share and analyze quantitative data.
* Copyright (C) 2007
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program; if not, see http://www.gnu.org/licenses
* or write to the Free Software Foundation,Inc., 51 Franklin Street,
* Fifth Floor, Boston, MA 02110-1301 USA
*/
package edu.harvard.iq.dvn.core.catalog;
import ORG.oclc.oai.server.verb.NoItemsMatchException;
import edu.harvard.iq.dvn.core.study.Study;
import javax.ejb.Local;
/**
* This is the business interface for CatalogService enterprise bean.
*/
@Local
public interface CatalogServiceLocal extends java.io.Serializable {
public String [] listRecords(String from, String until, String set, String metadataPrefix) throws NoItemsMatchException;
public String getRecord(Study study, String metadataPrefix);
public Study[] listStudies(String from, String until, String set, String metadataPrefix);
}
| [
"ekraffmiller@hmdc.harvard.edu"
] | ekraffmiller@hmdc.harvard.edu |
eed81379fc301b771169f901e6ef109eda056ed7 | b1f51f8ba05ad83ecfbd80e6e7f140e70850bf01 | /ACE_ERP/src/Ehr/yac/a/yaca030/ejb/YACA030EJB.java | 5aab606fc1a452a6170ca5ce2cd9caacf928a8ff | [] | no_license | hyundaimovex-asanwas/asanwas-homepage | 27e0ba1ed7b41313069e732f3dc9df20053caddd | 75e30546f11258d8b70159cfbe8ee36b18371bd0 | refs/heads/master | 2023-06-07T03:41:10.170367 | 2021-07-01T10:23:54 | 2021-07-01T10:23:54 | 376,739,168 | 1 | 1 | null | null | null | null | UHC | Java | false | false | 1,512 | java | package Ehr.yac.a.yaca030.ejb;
import Ehr.yac.a.yaca030.wrk.YACA030WRK;
import com.shift.gef.core.exception.CException;
import com.shift.gef.enterprise.ejb.EJB;
import com.shift.gef.gauce.utility.TrBox;
import com.shift.gef.support.collection.CBox;
public class YACA030EJB extends EJB {
private CBox box = null;
private TrBox tr = null;
public YACA030EJB(CBox p_box, TrBox p_tr ) throws CException {
this.box = p_box;
this.tr = p_tr;
}
public Object process() throws CException {
/** Worker Class 객체 생성후 관련 메소드 호출 **/
YACA030WRK wrk = new YACA030WRK();
// S_MODE가 조회인 경우
if (box.get("S_MODE").equals("SHR")) {
//의료비공제내역 조회를 위한 WORK메소드 호출
wrk.YACA030_SHR(box, tr);
}
// S_MODE가 저장인 경우
else if (box.get("S_MODE").equals("SHR_FAM")) {
//의료비공제내역을 저장하기 위한 WORK메소드 호출
wrk.YACA030_SHR_FAM(box, tr);
}
// S_MODE가 저장인 경우
else if (box.get("S_MODE").equals("SAV")) {
//의료비공제내역을 저장하기 위한 WORK메소드 호출
wrk.YACA030_SAV(box, tr);
}
// S_MODE가 삭제인 경우
else if (box.get("S_MODE").equals("DEL")) {
//의료비공제내역을 삭제하기 위한 WORK메소드 호출
wrk.YACA030_DEL(box, tr);
}
else if (box.get("S_MODE").equals("ACC")) {
//기부금공제내역을 삭제하기 위한 WORK메소드 호출
wrk.YACA030_UPT_ACC(box, tr);
}
return null;
}
}
| [
"86274611+evnmoon@users.noreply.github.com"
] | 86274611+evnmoon@users.noreply.github.com |
306def85c34e80531d4cc2f78ba5c7fc4383a6e7 | c19cc78880298eae676af0e1fc510884cba40b05 | /src/sim/workload/TreeTest.java | 15637e44e22454b218f2d04b03904fd62b016f36 | [
"BSD-2-Clause"
] | permissive | bramp/p2psim | 40283349144147c8bbd43615c7776e90e271531c | b73a3576a55da19428c297e84bd4bdb3dcb32790 | refs/heads/master | 2023-05-03T16:32:06.793655 | 2013-04-18T21:15:00 | 2013-04-18T21:15:00 | 7,320,705 | 4 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,537 | java | package sim.workload;
import java.util.Iterator;
import sim.events.Events;
import sim.main.Global;
import sim.net.Host;
import sim.net.HostSet;
import sim.net.links.NormalLink;
import sim.net.overlay.tree.events.JoinEvent;
import sim.net.overlay.tree.tbcp.Node;
import sim.net.router.Router;
import sim.stats.trace.LogLevel;
import sim.stats.trace.Trace;
/**
* @author Andrew Brampton
*/
public class TreeTest {
public TreeTest() throws Exception {
}
public void init() throws Exception {
int i;
final int PEERS = 100;
HostSet hosts = new HostSet();
Router r = new Router(0);
hosts.add(r);
for (i = 1; i <= PEERS; i++) {
Node n = new Node(i);
NormalLink l = new NormalLink(r, n);
l.setDelay(Global.rand.nextInt(100)); //Make the delay a little random
hosts.add(n);
}
Router.createRoutingTables();
Iterator<Host> it = hosts.getType(Node.class).iterator();
Node n1 = (Node)it.next();
while (it.hasNext()) {
Node n = (Node) it.next();
Events.addAfterLastEvent(new JoinEvent(n, n1.getAddress()));
}
// Loops alot
i = 0;
while (Events.runNextEvent()) {
//Trace.println("Event " + i++);
i++;
}
Trace.println(LogLevel.INFO, "Simulation ended at " + Events.getTime());
// Print out tree
it = hosts.getType(Node.class).iterator();
it.next(); // Skip the first
while (it.hasNext()) {
Node n = (Node)it.next();
Trace.println(LogLevel.INFO, n.getAddress() + "-" + n.getParent());
}
}
}
| [
"me@bramp.net"
] | me@bramp.net |
e578efef2f48adf8902a775f4b045e25271aacbb | 3538406360a3ebe52f00e7b53cc06acb58b004a0 | /deegree-core/trunk/src/main/java/org/deegree/geometry/points/Points.java | 4d0c216020679362ded47ccc31380d2e07b41562 | [] | no_license | izaslavsky/incf-dai | d563e63aa7cf7147ceb5a60c2b7ade3754f502c8 | 4ba6954720974139388ac0f77040fabe28fb4752 | refs/heads/master | 2016-09-06T11:13:51.903896 | 2013-02-07T02:30:15 | 2013-02-07T02:30:15 | 32,130,589 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,779 | java | //$HeadURL: svn+ssh://mschneider@svn.wald.intevation.org/deegree/base/trunk/resources/eclipse/files_template.xml $
/*----------------------------------------------------------------------------
This file is part of deegree, http://deegree.org/
Copyright (C) 2001-2009 by:
Department of Geography, University of Bonn
and
lat/lon GmbH
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.
You should have received a copy of the GNU Lesser General Public License
along with this library; if not, write to the Free Software Foundation, Inc.,
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact information:
lat/lon GmbH
Aennchenstr. 19, 53177 Bonn
Germany
http://lat-lon.de/
Department of Geography, University of Bonn
Prof. Dr. Klaus Greve
Postfach 1147, 53001 Bonn
Germany
http://www.geographie.uni-bonn.de/deegree/
e-mail: info@deegree.org
----------------------------------------------------------------------------*/
package org.deegree.geometry.points;
import org.deegree.geometry.primitive.LineString;
import org.deegree.geometry.primitive.Point;
import com.vividsolutions.jts.geom.CoordinateSequence;
/**
* Encapsulates a sequence of {@link Point}s that each may be uniquely identifiable or not.
* <p>
* The motivation for this interface is to allow more compact and efficient representations than using lists or arrays
* of {@link Point} objects. This is essential, as geometries are usually build from many points, e.g. a detailed
* {@link LineString} may consist of tens or hundreds thousands of points.
* </p>
* <p>
* Note that this interface extends JTS <code>CoordinateSequence</code> interface, so it's possible to use it for the
* efficient construction of JTS geometries.
* </p>
*
* @author <a href="mailto:schneider@lat-lon.de">Markus Schneider</a>
* @author last edited by: $Author: schneider $
*
* @version $Revision: $, $Date: $
*/
public interface Points extends Iterable<Point>, CoordinateSequence {
/**
* Returns the coordinate dimension, i.e. the dimension of the space that the points are embedded in.
*
* @return the coordinate dimension
*/
@Override
public int getDimension();
/**
* Returns the number of represented {@link Point}s.
*
* @return the number of points
*/
@Override
public int size();
/**
* Returns the {@link Point} at the specified position.
* <p>
* NOTE: It is generally more expensive to use this method than to access a {@link Point} by iterating over this
* object, because a new {@link Point} object may have to be created (depending on the implementation).
*
* @param i
* @return the point at the specified position
*/
public Point get( int i );
/**
* Returns the first point of the sequence.
*
* @return the first point
*/
public Point getStartPoint();
/**
* Returns the last point of the sequence.
*
* @return the last point
*/
public Point getEndPoint();
/**
* Returns all coordinates of the contained {@link Point}s as an array.
* <p>
* NOTE: This method should be avoided, as it may involve expensive operations.
* </p>
*
* @return coordinates as a one-dimensional array
*/
public double[] getAsArray();
}
| [
"davlit0917@7cbae6f4-d32f-11de-a711-9fae7a67fc1c"
] | davlit0917@7cbae6f4-d32f-11de-a711-9fae7a67fc1c |
54083e71e03990162415333506fde7224ebd1246 | f0ec508f4b480d8d5399a2880e4cbb0533fc2fc1 | /com.gzedu.xlims.service/src/main/java/com/gzedu/xlims/service/graduation/GjtGraduationDefencePlanService.java | 23cdcea053c56eac57e77641a8ccadaa068f8ea6 | [] | no_license | lizm335/MyLizm | a327bd4d08a33c79e9b6ef97144d63dae7114a52 | 1bcca82395b54d431fb26817e61a294f9d7dd867 | refs/heads/master | 2020-03-11T17:25:25.687426 | 2018-04-19T03:10:28 | 2018-04-19T03:10:28 | 130,146,458 | 3 | 0 | null | null | null | null | UTF-8 | Java | false | false | 448 | java | package com.gzedu.xlims.service.graduation;
import com.gzedu.xlims.pojo.graduation.GjtGraduationDefencePlan;
/**
* 毕业专业答辩安排
* @author eenet09
*
*/
public interface GjtGraduationDefencePlanService {
public void insert(GjtGraduationDefencePlan entity);
public void update(GjtGraduationDefencePlan entity);
public GjtGraduationDefencePlan queryById(String id);
public void delete(GjtGraduationDefencePlan entity);
}
| [
"lizengming@eenet.com"
] | lizengming@eenet.com |
ba7497fdebc4e9419c66fafe5587dc649aa15a35 | af846ab7ffc148cd3207f3e65cfb2dde6d92c767 | /sparrow-hyper/sparrow-ftp-server/src/main/java/org/apache/mina/util/Transform.java | f60234655db8c6e18b7a569c5cc86c06e815e59f | [
"Apache-2.0"
] | permissive | aniu2002/myself-toolkit | aaf5f71948bb45d331b206d806de85c84bafadcc | aea640b4339ea24d7bfd32311f093560573635d3 | refs/heads/master | 2022-12-24T20:25:43.702167 | 2019-03-11T14:42:14 | 2019-03-11T14:42:14 | 99,811,298 | 1 | 0 | Apache-2.0 | 2022-12-12T21:42:45 | 2017-08-09T13:26:46 | Java | UTF-8 | Java | false | false | 5,172 | 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.mina.util;
import java.io.IOException;
import java.io.LineNumberReader;
import java.io.PrintWriter;
import java.io.StringReader;
import java.io.StringWriter;
import java.util.ArrayList;
/**
* Utility class for working with xml data
*
* Implementation is heavily based on org.apache.log4j.helpers.Transform
*
* @author <a href="http://mina.apache.org">Apache MINA Project</a>
*/
public class Transform {
private static final String CDATA_START = "<![CDATA[";
private static final String CDATA_END = "]]>";
private static final String CDATA_PSEUDO_END = "]]>";
private static final String CDATA_EMBEDED_END = CDATA_END + CDATA_PSEUDO_END + CDATA_START;
private static final int CDATA_END_LEN = CDATA_END.length();
/**
* This method takes a string which may contain HTML tags (ie,
* <b>, <table>, etc) and replaces any
* '<', '>' , '&' or '"'
* characters with respective predefined entity references.
*
* @param input The text to be converted.
* @return The input string with the special characters replaced.
* */
static public String escapeTags(final String input) {
// Check if the string is null, zero length or devoid of special characters
// if so, return what was sent in.
if(input == null
|| input.length() == 0
|| (input.indexOf('"') == -1 &&
input.indexOf('&') == -1 &&
input.indexOf('<') == -1 &&
input.indexOf('>') == -1)) {
return input;
}
StringBuilder buf = new StringBuilder(input.length() + 6);
char ch;
int len = input.length();
for(int i=0; i < len; i++) {
ch = input.charAt(i);
if (ch > '>') {
buf.append(ch);
} else if(ch == '<') {
buf.append("<");
} else if(ch == '>') {
buf.append(">");
} else if(ch == '&') {
buf.append("&");
} else if(ch == '"') {
buf.append(""");
} else {
buf.append(ch);
}
}
return buf.toString();
}
/**
* Ensures that embeded CDEnd strings (]]>) are handled properly
* within message, NDC and throwable tag text.
*
* @param buf StringBuffer holding the XML data to this point. The
* initial CDStart (<![CDATA[) and final CDEnd (]]>) of the CDATA
* section are the responsibility of the calling method.
* @param str The String that is inserted into an existing CDATA Section within buf.
* */
static public void appendEscapingCDATA(final StringBuffer buf,
final String str) {
if (str != null) {
int end = str.indexOf(CDATA_END);
if (end < 0) {
buf.append(str);
} else {
int start = 0;
while (end > -1) {
buf.append(str.substring(start, end));
buf.append(CDATA_EMBEDED_END);
start = end + CDATA_END_LEN;
if (start < str.length()) {
end = str.indexOf(CDATA_END, start);
} else {
return;
}
}
buf.append(str.substring(start));
}
}
}
/**
* convert a Throwable into an array of Strings
* @param throwable
* @return string representation of the throwable
*/
public static String[] getThrowableStrRep(Throwable throwable) {
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
throwable.printStackTrace(pw);
pw.flush();
LineNumberReader reader = new LineNumberReader(new StringReader(sw.toString()));
ArrayList<String> lines = new ArrayList<String>();
try {
String line = reader.readLine();
while(line != null) {
lines.add(line);
line = reader.readLine();
}
} catch(IOException ex) {
lines.add(ex.toString());
}
String[] rep = new String[lines.size()];
lines.toArray(rep);
return rep;
}
}
| [
"yuanzhengchu2002@163.com"
] | yuanzhengchu2002@163.com |
7263ccf104360d76366f9a0495c36154b7df1677 | 78b49c9e2f3d50c6f8e695a248018ac2bd03947a | /Simple/src/simple/Main.java | 94eb13924c5d8a07e4c7f7e2cc63a1f5d526a9c4 | [
"MIT"
] | permissive | darshanmukunda98/DlitheInternship | 2df3fb09d1af0f77d7b86a8719a63d2e9662faaf | 4fb494bbdf46a245d3302a788be06341f13bf2d5 | refs/heads/main | 2023-04-02T08:34:02.317907 | 2021-04-03T13:09:51 | 2021-04-03T13:09:51 | 354,291,248 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 320 | java | package simple;
class Main {
public static void main(String[] args) {
System.out.println("Enter two numbers");
int first = 10;
int second = 20;
System.out.println(first + " " + second);
// add two numbers
int sum = first + second;
System.out.println("The sum is: " + sum);
}
} | [
"root@localhost"
] | root@localhost |
b34f6cc6b0752d45308214c250b41ee14c7a0a64 | ce2813f714d83602ee9b3b237c7304446ae741da | /src/LINTCODE10/LINTCODE991.java | c8546d2847960b11c0d77567f5283374af18ae1e | [] | no_license | tmhbatw/LINTCODEANSWER | bc54bb40a4826b0f9aa11aead4d99978a22e1ee8 | 7db879f075cde6e1b2fce86f6a3068e59f4e9b34 | refs/heads/master | 2021-12-13T16:38:05.780408 | 2021-10-09T16:50:59 | 2021-10-09T16:50:59 | 187,010,547 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 655 | java | package LINTCODE10;
public class LINTCODE991 {
/*Description
* 起初这 n 个灯泡都是关闭状态。首先你把所有灯泡都打开。
* 然后,每隔一个灯泡关闭下一个灯泡。在第三回合,每隔两个灯泡转换下一个灯泡的状态(如果原先是关闭状态就打开,反之则关闭)。
* 对于第 i回合,每隔i - 1 个灯泡,转换下一个灯泡的状态。对于第 n 回合,只需要转换最后一个灯泡的状态。在 n 回合之后,还有多少灯泡亮着。
* */
public int bulbSwitch(int n) {
return (int)Math.sqrt(n);
// Write your code here
}
}
| [
"1060226998@qq.com"
] | 1060226998@qq.com |
d917363fc3ffadab034974ff89fb8fed6b1c378a | d2c0d0e5ade1dcfacfeaeadf95d1c5e22c6caeba | /src/main/java/com/github/vonrosen/quantlib/Argentina.java | 005e53a32b0193b571a3fcb5c7d9b630832a32ab | [] | no_license | xl5555123/Quantlib-SWIG-Java | f5e906662ab72211744921a4a42e2d8d5b270432 | dda229841f511d1f6cb6992e5361e40937517c22 | refs/heads/master | 2020-07-01T12:47:39.383347 | 2018-09-24T01:53:44 | 2018-09-24T01:53:44 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,486 | java | /* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.github.vonrosen.quantlib;
public class Argentina extends Calendar {
private transient long swigCPtr;
protected Argentina(long cPtr, boolean cMemoryOwn) {
super(QuantLibJNI.Argentina_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(Argentina obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
QuantLibJNI.delete_Argentina(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public Argentina(Argentina.Market m) {
this(QuantLibJNI.new_Argentina__SWIG_0(m.swigValue()), true);
}
public Argentina() {
this(QuantLibJNI.new_Argentina__SWIG_1(), true);
}
public final static class Market {
public final static Argentina.Market Merval = new Argentina.Market("Merval");
public final int swigValue() {
return swigValue;
}
public String toString() {
return swigName;
}
public static Market swigToEnum(int swigValue) {
if (swigValue < swigValues.length && swigValue >= 0 && swigValues[swigValue].swigValue == swigValue)
return swigValues[swigValue];
for (int i = 0; i < swigValues.length; i++)
if (swigValues[i].swigValue == swigValue)
return swigValues[i];
throw new IllegalArgumentException("No enum " + Market.class + " with value " + swigValue);
}
private Market(String swigName) {
this.swigName = swigName;
this.swigValue = swigNext++;
}
private Market(String swigName, int swigValue) {
this.swigName = swigName;
this.swigValue = swigValue;
swigNext = swigValue+1;
}
private Market(String swigName, Market swigEnum) {
this.swigName = swigName;
this.swigValue = swigEnum.swigValue;
swigNext = this.swigValue+1;
}
private static Market[] swigValues = { Merval };
private static int swigNext = 0;
private final int swigValue;
private final String swigName;
}
}
| [
"hunter.stern@fundingcircle.com"
] | hunter.stern@fundingcircle.com |
c8bc6d14616fb818bba1e67b6ebd98f98e0af976 | ccbecd673ec01d3da3afe8c07bd3a9e8a0e772fd | /portlet-api/src/main/java/javax/portlet/ActionParameters.java | a4c9a975232f6d527ce4807a45a1c20ec9bb2937 | [
"Apache-2.0",
"EPL-2.0",
"CDDL-1.0"
] | permissive | ngriffin7a/portals-pluto | 9b111b896ff9dab9268d15dc179517d8190b6b17 | daf4d3748e6d57af62075e5cdd74486b53a7a02a | refs/heads/master | 2021-01-19T03:49:06.082390 | 2019-04-28T00:17:47 | 2019-04-28T00:17:47 | 69,889,534 | 1 | 0 | Apache-2.0 | 2018-11-15T23:49:00 | 2016-10-03T16:32:49 | Java | UTF-8 | Java | false | false | 2,038 | 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.
*/
/*
* This source code implements specifications defined by the Java
* Community Process. In order to remain compliant with the specification
* DO NOT add / change / or delete method signatures!
*/
package javax.portlet;
/**
* <div class="changed_added_3_0">
* Action parameters are additional portlet parameters added to the portlet
* URL or provided by the client that extend the state information provided by
* the render parameters.
* The client can supply additional action parameters when a form is submitted, for example.
* <p>
* {@link PortletParameters} provides a description of the parameter concept.
* </div>
* @see PortletParameters
* @see MutableActionParameters
* @see ActionRequest
* @see ActionURL
* @since 3.0
*/
public interface ActionParameters extends PortletParameters
{
/**
* <div class="changed_added_3_0">
* Returns a <code>MutableActionParameters</code> object encapsulating a copy of the same
* parameters as the original object.
* Changing a mutable copy will not influence the source object.
* </div>
*
* @return Mutable clone of ActionParameters object
*/
public MutableActionParameters clone();
}
| [
"neil.griffin.scm@gmail.com"
] | neil.griffin.scm@gmail.com |
a77e63c7bb4ad12dc672f7ee46d0ff8d7b3eb56e | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/133/303/CWE197_Numeric_Truncation_Error__int_listen_tcp_to_byte_66b.java | 21b6bb186659e17a7ea814de56c736056b8d4a1c | [] | no_license | Lanhbao/Static-Testing-for-Juliet-Test-Suite | 6fd3f62713be7a084260eafa9ab221b1b9833be6 | b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68 | refs/heads/master | 2020-08-24T13:34:04.004149 | 2019-10-25T09:26:00 | 2019-10-25T09:26:00 | 216,822,684 | 0 | 1 | null | 2019-11-08T09:51:54 | 2019-10-22T13:37:13 | Java | UTF-8 | Java | false | false | 1,262 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE197_Numeric_Truncation_Error__int_listen_tcp_to_byte_66b.java
Label Definition File: CWE197_Numeric_Truncation_Error__int.label.xml
Template File: sources-sink-66b.tmpl.java
*/
/*
* @description
* CWE: 197 Numeric Truncation Error
* BadSource: listen_tcp Read data using a listening tcp connection
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: to_byte
* BadSink : Convert data to a byte
* Flow Variant: 66 Data flow: data passed in an array from one method to another in different source files in the same package
*
* */
public class CWE197_Numeric_Truncation_Error__int_listen_tcp_to_byte_66b
{
public void badSink(int dataArray[] ) throws Throwable
{
int data = dataArray[2];
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
/* goodG2B() - use goodsource and badsink */
public void goodG2BSink(int dataArray[] ) throws Throwable
{
int data = dataArray[2];
{
/* POTENTIAL FLAW: Convert data to a byte, possibly causing a truncation error */
IO.writeLine((byte)data);
}
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
9ba8aed6ef76271cbc4d9110a78f02481e69ef35 | e2f74b43886a74c1a9b99fa64af33d5f72ede8f2 | /rapidoid-gui/src/main/java/org/rapidoid/gui/var/ReqDataVar.java | 6859044448baff63c034324eff4ad3dbc5eec7fd | [
"LicenseRef-scancode-proprietary-license",
"Apache-2.0"
] | permissive | xwt-benchmarks/rapidoid | 9fd711bda90f60d612740f4bd18903f6fd96d7bc | 26a41baee15bfba77dff84834b4db0f1affe85ed | refs/heads/master | 2022-07-15T15:37:59.186832 | 2020-05-12T14:23:08 | 2020-05-12T14:23:08 | 258,783,476 | 0 | 0 | Apache-2.0 | 2020-05-12T14:23:09 | 2020-04-25T13:33:27 | null | UTF-8 | Java | false | false | 2,092 | java | /*-
* #%L
* rapidoid-gui
* %%
* Copyright (C) 2014 - 2018 Nikolche Mihajlovski and contributors
* %%
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* #L%
*/
package org.rapidoid.gui.var;
import org.rapidoid.annotation.Authors;
import org.rapidoid.annotation.Since;
import org.rapidoid.cls.Cls;
import org.rapidoid.commons.Err;
import org.rapidoid.gui.reqinfo.ReqInfo;
import org.rapidoid.u.U;
import java.util.Collection;
import java.util.List;
@Authors("Nikolche Mihajlovski")
@Since("5.3.0")
public class ReqDataVar<T> extends WidgetVar<T> {
private static final long serialVersionUID = 2761159925375675659L;
private final String localKey;
private final Class<T> type;
private final T defaultValue;
public ReqDataVar(String localKey, Class<T> type, T defaultValue) {
super(localKey);
this.localKey = localKey;
this.type = type;
this.defaultValue = defaultValue;
}
@SuppressWarnings("unchecked")
@Override
public T get() {
Object value = U.or(ReqInfo.get().data().get(localKey), null);
if (type.equals(List.class)) {
if (value == null) {
return defaultValue;
} else if (value instanceof String) {
String s = (String) value;
if (U.notEmpty(s)) {
return (T) U.list(s);
} else {
return defaultValue;
}
} else if (value instanceof Collection) {
Collection coll = (Collection) value;
return (T) U.list(coll);
} else {
throw Err.notExpected();
}
} else {
value = U.or(value, defaultValue);
return Cls.convert(value, type);
}
}
@Override
public void doSet(T value) {
}
}
| [
"nikolce.mihajlovski@gmail.com"
] | nikolce.mihajlovski@gmail.com |
e15bad299cde212998d80592461fc2f3bb46528f | c3c5955b0df4786fe915d5b3a798e763f9fc1daf | /src/com/javacodegeeks/patterns/decoratorpattern/FetaCheese.java | c220af2411bd772ac7b9e2750be3a55c242d1320 | [] | no_license | yezuoyi/javastudydemo | 51844eaf57de74ed0a89292ab7772b7c7aae23a5 | b448c7517a209c3946e81bdd351985489e63fa0f | refs/heads/master | 2020-06-07T11:39:52.372054 | 2019-06-21T10:04:38 | 2019-06-21T10:04:38 | 193,014,430 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 383 | java | package com.javacodegeeks.patterns.decoratorpattern;
public class FetaCheese extends PizzaDecorator{
private final Pizza pizza;
public FetaCheese(Pizza pizza){
this.pizza = pizza;
}
@Override
public String getDesc() {
return pizza.getDesc()+", Feta Cheese (25.88)";
}
@Override
public double getPrice() {
return pizza.getPrice()+25.88;
}
} | [
"yezuoyi@163.com"
] | yezuoyi@163.com |
100f212f54228f0386ded61c29263408e40be1b4 | db173b5180789c71b6aff3f2b87f60daf29401a1 | /geyiming/src/main/java/chapter8/Test2.java | 0e99b877a905495ea8491fc88bd791765de17985 | [] | no_license | xiaozhiliaoo/concurrency-practice | 0f584d4b3e95559e22581d9a42e32c770e3cead8 | a9b8809c7e1488fa2a4c5a981e5d12d3bfae85d0 | refs/heads/master | 2023-04-29T09:12:25.172742 | 2022-11-24T06:09:47 | 2022-11-24T06:09:47 | 248,147,420 | 5 | 4 | null | 2022-12-06T00:50:14 | 2020-03-18T05:36:40 | Java | UTF-8 | Java | false | false | 656 | java | package chapter8;
/**
* Created by lili on 2017/5/28.
*/
public class Test2 {
public static void main(String[] args) throws InterruptedException {
Point a = new Point(0,0);
Point b = new Point(1,1);
Point c = new Point(5,3);
Point d = new Point(9,8);
Point e = new Point(6,7);
Point f = new Point(3,9);
Point g = new Point(4,8);
Line aLine = new Line(a,b);
Line bLine = new Line(a,c);
Line cLine = new Line(d,e);
Line dLine = new Line(f,g);
a=null;
b=null;
c=null;
d=null;
e=null;
Thread.sleep(1000000);
}
}
| [
"lili@chainup.com"
] | lili@chainup.com |
186525291b5d3a0d97779e483fe222840fd44187 | c3d086357565983997d3d4c1c6890266e5607c97 | /data/jrdf/jrdf-0.3.4.2/org/jrdf/util/param/EmtpyStringCheckerUnitTest.java | 8a4aee430d49f7f4cf838b2e1a9c7947541880c9 | [
"MIT"
] | permissive | hrahmadi71/MultiRefactor | 39ab0f4900f27e2b021e48af590f767495f01077 | 99a15c96d045aa0b798d3d364ecb49153361a5a9 | refs/heads/master | 2022-11-25T14:27:37.678256 | 2020-07-27T02:58:13 | 2020-07-27T02:58:13 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | package org.jrdf.util.param;
import junit.framework.TestCase;
/**
* Unit test for {@link EmtpyStringChecker}.
*
* @author Tom Adams
* @version $Revision: 1.1 $
*/
public final class EmtpyStringCheckerUnitTest extends TestCase {
public void testParamAllowed() {
//checkParam(ParameterTestUtil.NULL_STRING); // assume null's are not handled by this checker
checkParam(ParameterTestUtil.EMPTY_STRING);
checkParam(ParameterTestUtil.SINGLE_SPACE);
}
private void checkParam(String param) {
assertFalse(new EmtpyStringChecker().paramAllowed(param));
}
}
| [
"40020843@eeecs.qub.ac.uk"
] | 40020843@eeecs.qub.ac.uk |
7518b32a626dc3dad21e562e6f6eecb1f1c1c472 | dab08f883616c39457ffc1fc4b7fe8ccb25ef0b4 | /src/smartcity/task/SimpleTask.java | 8b90fc779f3a0ca0ea6d6bbe79b4f201dbd2e40d | [] | no_license | Niron68/SmartCity | d86aaf900664414d3c4a43cb0857cf6e35621c51 | 0fef6fadfe859b06b5042c7f5ae1d8b4347257c5 | refs/heads/master | 2020-08-10T17:22:01.308473 | 2019-10-11T08:33:39 | 2019-10-11T08:33:39 | 214,384,902 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 205 | java | package smartcity.task;
import smartcity.building.TaskBuilding;
public class SimpleTask extends Task {
public SimpleTask(int reward, int time, TaskBuilding build) {
super(reward,time, build);
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
bc7f48ee66629a72a0102e6f9e3ae43269655cbe | 97234cc88017ee0b5898403e73ab3f5f5814cdf2 | /bitcamp-java/src/main/java/com/eomcs/corelib/ex07/Exam0110.java | 73c359fb1984ee342f1e731cf815f77e5f68b80a | [] | no_license | joeunseong/bitcamp-study | 1454ffdeb275c06be63781cff57c88a501fc57d3 | cf205293e18c7ae1c37e7a59f90a7c3b53bb2695 | refs/heads/master | 2020-09-23T12:38:53.989478 | 2020-05-29T05:52:44 | 2020-05-29T05:52:44 | 225,501,863 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,394 | java | // java.util.HashSet 클래스 사용 - 중복저장 불가 테스트
package com.eomcs.corelib.ex07;
import java.util.HashSet;
// HashSet의 특징
// 1) 값을 중복 저장하지 않는다.
// => Set은 집합을 의미한다.
// => 집합에서는 중복값을 허용하지 않는다.
// => 값의 중복 여부는 hashCode()의 리턴 값이 같고, equals()의 검사 결과가 true일 때
// 같은 값으로 취급한다.
// => 즉 중복된 값을 저장하고 싶지 않을 때 HashSet을 사용한다.
// 2) 값을 순서대로 저장하지 않는다.
// => 값 객체의 hashCode()의 리턴 값으로 저장 위치를 계산하기 때문에
// add() 한 순서대로 저장되지 않는다.
// => 그래서 값을 index를 이용하여 꺼낼 수 없다.
public class Exam0110 {
public static void main(String[] args) {
String v1 = new String("aaa");
String v2 = new String("bbb");
String v3 = new String("ccc");
String v4 = new String("ddd");
String v5 = new String("ccc");
HashSet set = new HashSet();
set.add(v1);
set.add(v2);
set.add(v3);
set.add(v4);
set.add(v5);
// v5와 v3는 다른 인스턴스이다. 하지만 두 객체에 들어있는 문자열은 같다.
// String 클래스는 인스턴스가 다르더라도 값이 같으면,
// hashCode()의 리턴 값이 같도록 오버라이딩 하였다.
// 또한 equals()의 리턴 값도 true가 되도록 오버라이딩 하였다.
// HashSet은 값의 중복을 검사할 때 인스턴스의 주소를 비교하지 않고
// hashCode()의 리턴 값과 equals()의 리턴 값으로 판단한다.
// 따라서 v5는 비록 v3와 다른 인스턴스이지만,
// hashCode()의 리턴 값이 같고 두 객체에 대해 equals()를 호출하면
// true가 리턴되기 때문에 같은 값으로 간주하여 중복 저장하지 않는다.
// 결론! v5는 추가되지 않는다.
System.out.println(v3 == v5); // false
System.out.println(v3.equals(v5)); // true
System.out.println(v3.hashCode() + "," + v5.hashCode()); // true
System.out.println("------------------");
print(set);
}
static void print(HashSet set) {
Object[] values = set.toArray();
for (Object value : values) {
System.out.print(value + ", ");
}
System.out.println();
}
}
| [
"euns29@naver.com"
] | euns29@naver.com |
8ee9797217e7a28427327951f0913859d7932b21 | bf7964769d780ad1b729be0434ac6d5108fba3d0 | /src/cert/local/org/bouncycastle/cert/CertUtils.java | a8edb7126154be77909668cc75d40606fdb28edb | [
"Apache-2.0"
] | permissive | hl4/rcscore | 4100cbf3a63a4d8c49cac68245a8c8c70cb63834 | b4e2896fe65f26defc272aa5b394aa9441bcab78 | refs/heads/master | 2021-01-20T17:26:48.029669 | 2016-04-19T13:02:39 | 2016-04-19T13:02:39 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,672 | java | package local.org.bouncycastle.cert;
import java.io.IOException;
import java.io.OutputStream;
import java.text.ParseException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import local.org.bouncycastle.asn1.ASN1Encodable;
import local.org.bouncycastle.asn1.ASN1EncodableVector;
import local.org.bouncycastle.asn1.ASN1GeneralizedTime;
import local.org.bouncycastle.asn1.ASN1ObjectIdentifier;
import local.org.bouncycastle.asn1.DERBitString;
import local.org.bouncycastle.asn1.DERNull;
import local.org.bouncycastle.asn1.DEROutputStream;
import local.org.bouncycastle.asn1.DERSequence;
import local.org.bouncycastle.asn1.x509.AlgorithmIdentifier;
import local.org.bouncycastle.asn1.x509.AttributeCertificate;
import local.org.bouncycastle.asn1.x509.AttributeCertificateInfo;
import local.org.bouncycastle.asn1.x509.Certificate;
import local.org.bouncycastle.asn1.x509.CertificateList;
import local.org.bouncycastle.asn1.x509.Extensions;
import local.org.bouncycastle.asn1.x509.ExtensionsGenerator;
import local.org.bouncycastle.asn1.x509.TBSCertList;
import local.org.bouncycastle.asn1.x509.TBSCertificate;
import local.org.bouncycastle.operator.ContentSigner;
class CertUtils
{
private static Set EMPTY_SET = Collections.unmodifiableSet(new HashSet());
private static List EMPTY_LIST = Collections.unmodifiableList(new ArrayList());
static X509CertificateHolder generateFullCert(ContentSigner signer, TBSCertificate tbsCert)
{
try
{
return new X509CertificateHolder(generateStructure(tbsCert, signer.getAlgorithmIdentifier(), generateSig(signer, tbsCert)));
}
catch (IOException e)
{
throw new IllegalStateException("cannot produce certificate signature");
}
}
static X509AttributeCertificateHolder generateFullAttrCert(ContentSigner signer, AttributeCertificateInfo attrInfo)
{
try
{
return new X509AttributeCertificateHolder(generateAttrStructure(attrInfo, signer.getAlgorithmIdentifier(), generateSig(signer, attrInfo)));
}
catch (IOException e)
{
throw new IllegalStateException("cannot produce attribute certificate signature");
}
}
static X509CRLHolder generateFullCRL(ContentSigner signer, TBSCertList tbsCertList)
{
try
{
return new X509CRLHolder(generateCRLStructure(tbsCertList, signer.getAlgorithmIdentifier(), generateSig(signer, tbsCertList)));
}
catch (IOException e)
{
throw new IllegalStateException("cannot produce certificate signature");
}
}
private static byte[] generateSig(ContentSigner signer, ASN1Encodable tbsObj)
throws IOException
{
OutputStream sOut = signer.getOutputStream();
DEROutputStream dOut = new DEROutputStream(sOut);
dOut.writeObject(tbsObj);
sOut.close();
return signer.getSignature();
}
private static Certificate generateStructure(TBSCertificate tbsCert, AlgorithmIdentifier sigAlgId, byte[] signature)
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(tbsCert);
v.add(sigAlgId);
v.add(new DERBitString(signature));
return Certificate.getInstance(new DERSequence(v));
}
private static AttributeCertificate generateAttrStructure(AttributeCertificateInfo attrInfo, AlgorithmIdentifier sigAlgId, byte[] signature)
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(attrInfo);
v.add(sigAlgId);
v.add(new DERBitString(signature));
return AttributeCertificate.getInstance(new DERSequence(v));
}
private static CertificateList generateCRLStructure(TBSCertList tbsCertList, AlgorithmIdentifier sigAlgId, byte[] signature)
{
ASN1EncodableVector v = new ASN1EncodableVector();
v.add(tbsCertList);
v.add(sigAlgId);
v.add(new DERBitString(signature));
return CertificateList.getInstance(new DERSequence(v));
}
static Set getCriticalExtensionOIDs(Extensions extensions)
{
if (extensions == null)
{
return EMPTY_SET;
}
return Collections.unmodifiableSet(new HashSet(Arrays.asList(extensions.getCriticalExtensionOIDs())));
}
static Set getNonCriticalExtensionOIDs(Extensions extensions)
{
if (extensions == null)
{
return EMPTY_SET;
}
// TODO: should probably produce a set that imposes correct ordering
return Collections.unmodifiableSet(new HashSet(Arrays.asList(extensions.getNonCriticalExtensionOIDs())));
}
static List getExtensionOIDs(Extensions extensions)
{
if (extensions == null)
{
return EMPTY_LIST;
}
return Collections.unmodifiableList(Arrays.asList(extensions.getExtensionOIDs()));
}
static void addExtension(ExtensionsGenerator extGenerator, ASN1ObjectIdentifier oid, boolean isCritical, ASN1Encodable value)
throws CertIOException
{
try
{
extGenerator.addExtension(oid, isCritical, value);
}
catch (IOException e)
{
throw new CertIOException("cannot encode extension: " + e.getMessage(), e);
}
}
static DERBitString booleanToBitString(boolean[] id)
{
byte[] bytes = new byte[(id.length + 7) / 8];
for (int i = 0; i != id.length; i++)
{
bytes[i / 8] |= (id[i]) ? (1 << ((7 - (i % 8)))) : 0;
}
int pad = id.length % 8;
if (pad == 0)
{
return new DERBitString(bytes);
}
else
{
return new DERBitString(bytes, 8 - pad);
}
}
static boolean[] bitStringToBoolean(DERBitString bitString)
{
if (bitString != null)
{
byte[] bytes = bitString.getBytes();
boolean[] boolId = new boolean[bytes.length * 8 - bitString.getPadBits()];
for (int i = 0; i != boolId.length; i++)
{
boolId[i] = (bytes[i / 8] & (0x80 >>> (i % 8))) != 0;
}
return boolId;
}
return null;
}
static Date recoverDate(ASN1GeneralizedTime time)
{
try
{
return time.getDate();
}
catch (ParseException e)
{
throw new IllegalStateException("unable to recover date: " + e.getMessage());
}
}
static boolean isAlgIdEqual(AlgorithmIdentifier id1, AlgorithmIdentifier id2)
{
if (!id1.getAlgorithm().equals(id2.getAlgorithm()))
{
return false;
}
if (id1.getParameters() == null)
{
if (id2.getParameters() != null && !id2.getParameters().equals(DERNull.INSTANCE))
{
return false;
}
return true;
}
if (id2.getParameters() == null)
{
if (id1.getParameters() != null && !id1.getParameters().equals(DERNull.INSTANCE))
{
return false;
}
return true;
}
return id1.getParameters().equals(id2.getParameters());
}
}
| [
"ah@lilizhendeMacBook.local"
] | ah@lilizhendeMacBook.local |
c4af67e5a3cdcd4658d37eb72034342c1d163f06 | df134b422960de6fb179f36ca97ab574b0f1d69f | /it/unimi/dsi/fastutil/chars/AbstractCharStack.java | 8c97ec60ae076d80de31948a20040d8082175136 | [] | 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 | 407 | java | package it.unimi.dsi.fastutil.chars;
import it.unimi.dsi.fastutil.AbstractStack;
@Deprecated
public abstract class AbstractCharStack extends AbstractStack<Character> implements CharStack {}
/* Location: C:\Users\Josep\Downloads\Decompile Minecraft\tuinity-1.16.3.jar!\i\\unimi\dsi\fastutil\chars\AbstractCharStack.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
658496ca726fd8b23294c5e79358a603f06f75e6 | 6dcab17c7dc25b5ab046b73da412b423d1185b58 | /modules/siddhi-query-api/src/main/java/org/wso2/siddhi/query/api/expression/math/Divide.java | 2ab20d1dadd63a81f76af462ccb65e1c54b2c27a | [
"Apache-2.0"
] | permissive | doubaokun/siddhi | bdafcbc48e4e68ead80f7d4c400376c8306da826 | d9a4cde9d19e2f7644d0844398c2b48919e1db61 | refs/heads/master | 2021-01-18T11:57:10.815213 | 2015-05-07T09:44:26 | 2015-05-07T09:44:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,109 | java | /*
* Copyright (c) 2005 - 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy
* of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed
* under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License.
*/
package org.wso2.siddhi.query.api.expression.math;
import org.wso2.siddhi.query.api.expression.Expression;
public class Divide extends Expression {
private Expression leftValue;
private Expression rightValue;
public Divide(Expression leftValue, Expression rightValue) {
this.leftValue = leftValue;
this.rightValue = rightValue;
}
public Expression getLeftValue() {
return leftValue;
}
public Expression getRightValue() {
return rightValue;
}
@Override
public String toString() {
return "Divide{" +
"leftValue=" + leftValue +
", rightValue=" + rightValue +
'}';
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Divide divide = (Divide) o;
if (leftValue != null ? !leftValue.equals(divide.leftValue) : divide.leftValue != null) {
return false;
}
if (rightValue != null ? !rightValue.equals(divide.rightValue) : divide.rightValue != null) {
return false;
}
return true;
}
@Override
public int hashCode() {
int result = leftValue != null ? leftValue.hashCode() : 0;
result = 31 * result + (rightValue != null ? rightValue.hashCode() : 0);
return result;
}
}
| [
"suhothayan@gmail.com"
] | suhothayan@gmail.com |
eb0ac498f402fbb3e206d63800235b2a55370983 | 6451c77ce976b7b927b6345e9dd4c586fd15b317 | /cgi_kunde2.0_shop/shop/build/hybris/bin/custom/pacoshop/pacoshopcore/src/com/cgi/pacoshop/core/service/servicebus/ServiceBusBusinessPartnerService.java | 89b11e958a70075dc1631b65c7700a123de9467a | [] | no_license | dixit-anup/maventotalproject | eefae3fbc1de085b3057edd87dcb3605f7e8750b | 2c0f5581d32dd1aa265e455a9447ab7d160cf5f1 | refs/heads/master | 2021-01-16T21:57:39.423961 | 2014-08-21T14:58:18 | 2014-08-21T14:58:18 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,151 | java | /*
* [y] hybris Platform
*
* Copyright (c) 2000-2014 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package com.cgi.pacoshop.core.service.servicebus;
import de.hybris.platform.core.model.user.UserModel;
import java.util.Map;
/**
* Servicebus businessPartnerService - uses Servicebus Client to get business partner addresses to customer.
*
* @module build
* @version 1.0v Mar 11, 2014
* @author symmetrics - a CGI Group brand <info@symmetrics.de>
* @author Alexandr Ionov <alexandr.ionov@symmetrics.de>
* @link http://www.symmetrics.de/
* @see 'https://wiki.hybris.com/'
* @copyright 2014 symmetrics - a CGI Group brand
*
*
*/
public interface ServiceBusBusinessPartnerService
{
/**
* @param userModel - customer to update
* @param userParams - userParams of the user - wsToken
*/
void updateBusinessPartners(UserModel userModel, Map<String, String> userParams);
}
| [
"dmitry.bilyk@symmetrics.de"
] | dmitry.bilyk@symmetrics.de |
f49b3280c345264c20bd5b25958817303cbba68f | 6500848c3661afda83a024f9792bc6e2e8e8a14e | /gp_JADX/com/google/android/libraries/performance/primes/dm.java | d22c8dbaa415967125b7c0f439532fd97a0c110a | [] | no_license | enaawy/gproject | fd71d3adb3784d12c52daf4eecd4b2cb5c81a032 | 91cb88559c60ac741d4418658d0416f26722e789 | refs/heads/master | 2021-09-03T03:49:37.813805 | 2018-01-05T09:35:06 | 2018-01-05T09:35:06 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 510 | java | package com.google.android.libraries.performance.primes;
public final class dm {
public static final dm f29971a = new dn().m27822a();
public final boolean f29972b;
public final boolean f29973c;
public final boolean f29974d;
public final boolean f29975e;
public final int f29976f;
dm(boolean z, boolean z2, boolean z3, boolean z4, int i) {
this.f29972b = z;
this.f29973c = z2;
this.f29974d = z3;
this.f29975e = z4;
this.f29976f = i;
}
}
| [
"genius.ron@gmail.com"
] | genius.ron@gmail.com |
d44f101baf95b889a66754d379de055d2a345eca | 3e3a5e2643e4ed8519ecfd6b66ae937f2da42939 | /designpattern/VisitorPattern_Children/src/School.java | e05d77d842efa531528cab56c4f430a53903313d | [] | no_license | neel2811/Java | a5249b19b3c3923c44f5b9528adee7a54a978be6 | fcafcf634cbf9ce849ecf43bf8e05f770cb85ac1 | refs/heads/master | 2021-10-26T03:42:57.532886 | 2017-03-24T10:25:27 | 2017-03-24T10:25:27 | 87,059,721 | 0 | 1 | null | 2017-04-03T09:50:10 | 2017-04-03T09:50:10 | null | UTF-8 | Java | false | false | 672 | java | import java.util.ArrayList;
public class School
{
static ArrayList<Child> childList;
static
{
childList = new ArrayList<Child>();
Child john = new Child("John");
Child steve = new Child("Steve");
Child rohit = new Child("Rohit");
Child sonu = new Child("Sonu");
childList.add(john);
childList.add(steve);
childList.add(rohit);
childList.add(sonu);
}
public static void doHealthCheckup()
{
ChildSpecialistDoctor childSpecialistDoctor = new ChildSpecialistDoctor("Dr.Smith");
for( Child child : childList )
{
child.accept(childSpecialistDoctor);
}
}
}
| [
"ramram_43210@yahoo.com"
] | ramram_43210@yahoo.com |
e5b91efe060ea0e23eade4070c652d2986e8257e | 964c848596ae9b663d7519d622213adb56c8190a | /src/main/java/dev/mvc/grade/GradeVO.java | 3415c570f4751140d7513712e8e0557bd98091e8 | [] | no_license | Jis2nYoon/team1 | 65b9bbcc96340d7c0f99de181e9a875c767fbe36 | e8d76d44d979549f88fb8c6d59789850c1e2031f | refs/heads/master | 2022-12-29T13:51:40.539838 | 2019-08-05T06:06:55 | 2019-08-05T06:06:55 | 200,558,730 | 0 | 0 | null | 2022-12-16T09:56:01 | 2019-08-05T01:02:13 | Java | UHC | Java | false | false | 1,366 | java | package dev.mvc.grade;
public class GradeVO {
/*평가등급 번호*/
private int gradeno;
/*매겨진 평가 수*/
private int numgrade;
/*전체 평균평점*/
private double avggrade;
/*판매자태도*/
private double manner;
/*배송속도*/
private double delivery;
/*상품품질*/
private double quality;
/*회원 번호*/
private int memberno;
public int getGradeno() {
return gradeno;
}
public void setGradeno(int gradeno) {
this.gradeno = gradeno;
}
public int getNumgrade() {
return numgrade;
}
public void setNumgrade(int numgrade) {
this.numgrade = numgrade;
}
public double getAvggrade() {
return avggrade;
}
public void setAvggrade(double avggrade) {
this.avggrade = avggrade;
}
public double getManner() {
return manner;
}
public void setManner(double manner) {
this.manner = manner;
}
public double getDelivery() {
return delivery;
}
public void setDelivery(double delivery) {
this.delivery = delivery;
}
public double getQuality() {
return quality;
}
public void setQuality(double quality) {
this.quality = quality;
}
public int getMemberno() {
return memberno;
}
public void setMemberno(int memberno) {
this.memberno = memberno;
}
}
| [
"soldesk@soldesk-PC"
] | soldesk@soldesk-PC |
07c8f826c41f4fbcfa8c629cc56ba2d7738ac9ec | 82eba08b9a7ee1bd1a5f83c3176bf3c0826a3a32 | /ZmailServer/src/java/org/zmail/cs/account/soap/SoapSignature.java | a39ead7aa5bb0541440bedfed26dd2c411e2cc9a | [
"MIT"
] | permissive | keramist/zmailserver | d01187fb6086bf3784fe180bea2e1c0854c83f3f | 762642b77c8f559a57e93c9f89b1473d6858c159 | refs/heads/master | 2021-01-21T05:56:25.642425 | 2013-10-21T11:27:05 | 2013-10-22T12:48:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,143 | java | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 VMware, Inc.
*
* The contents of this file are subject to the Zimbra Public License
* Version 1.3 ("License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.zimbra.com/license.
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied.
* ***** END LICENSE BLOCK *****
*/
package org.zmail.cs.account.soap;
import org.zmail.common.account.SignatureUtil;
import org.zmail.common.service.ServiceException;
import org.zmail.common.soap.AccountConstants;
import org.zmail.common.soap.Element;
import org.zmail.common.util.StringUtil;
import org.zmail.common.zclient.ZClientException;
import org.zmail.cs.account.Account;
import org.zmail.cs.account.Provisioning;
import org.zmail.cs.account.Signature;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
class SoapSignature extends Signature implements SoapEntry {
SoapSignature(Account acct, String name, String id, Map<String, Object> attrs, Provisioning prov) {
super(acct, name, id, attrs, prov);
}
SoapSignature(Account acct, Element e, Provisioning prov) throws ServiceException {
super(acct, e.getAttribute(AccountConstants.A_NAME), e.getAttribute(AccountConstants.A_ID), fromXML(e), prov);
}
public void modifyAttrs(SoapProvisioning prov, Map<String, ? extends Object> attrs, boolean checkImmutable) throws ServiceException {
}
public void reload(SoapProvisioning prov) throws ServiceException {
}
public static void toXML(Element signature, Map<String, Object> attrs) throws ServiceException {
for (Map.Entry entry : attrs.entrySet()) {
String attr = (String)entry.getKey();
String value = (String)entry.getValue();
if (attr.equals(Provisioning.A_zmailSignatureId) && !StringUtil.isNullOrEmpty(value))
signature.addAttribute(AccountConstants.A_ID, value);
else if (attr.equals(Provisioning.A_zmailSignatureName) && !StringUtil.isNullOrEmpty(value))
signature.addAttribute(AccountConstants.A_NAME, value);
else if (attr.equals(Provisioning.A_zmailPrefMailSignatureContactId) && !StringUtil.isNullOrEmpty(value))
signature.addElement(AccountConstants.E_CONTACT_ID).setText(value);
else {
String mimeType = SignatureUtil.attrNameToMimeType(attr);
if (mimeType == null)
throw ZClientException.CLIENT_ERROR("unable to determine mime type from attr " + attr, null);
signature.addElement(AccountConstants.E_CONTENT).addAttribute(AccountConstants.A_TYPE, mimeType).addText(value);
}
}
}
private static Map<String, Object> fromXML(Element signature) throws ServiceException {
List<Element> contents = signature.listElements(AccountConstants.E_CONTENT);
Map<String,Object> attrs = new HashMap<String, Object>();
attrs.put(Provisioning.A_zmailSignatureId, signature.getAttribute(AccountConstants.A_ID));
attrs.put(Provisioning.A_zmailSignatureName, signature.getAttribute(AccountConstants.A_NAME));
Element eContactId = signature.getOptionalElement(AccountConstants.E_CONTACT_ID);
if (eContactId != null)
attrs.put(Provisioning.A_zmailPrefMailSignatureContactId, eContactId.getText());
for (Element eContent : contents) {
String type = eContent.getAttribute(AccountConstants.A_TYPE);
String attr = SignatureUtil.mimeTypeToAttrName(type);
if (attr != null) {
attrs.put(attr, eContent.getText());
}
}
return attrs;
}
public Account getAccount() throws ServiceException {
throw ServiceException.INVALID_REQUEST("unsupported, use getAccount(Provisioning)", null);
}
}
| [
"bourgerie.quentin@gmail.com"
] | bourgerie.quentin@gmail.com |
0c4446ab09c4b481dc2ba74115b2b1262f7fc21f | 23f42b163c0a58ad61c38498befa1219f53a2c10 | /src/main/java/weldstartup/a/AppScopedBean0730.java | 39aa1340c0449899622470f10d40d20891b261fd | [] | no_license | 99sono/wls-jsf-2-2-12-jersey-weldstartup-bottleneck | 9637d2f14a1053159c6fc3c5898a91057a65db9d | b81697634cceca79f1b9a999002a1a02c70b8648 | refs/heads/master | 2021-05-15T17:54:39.040635 | 2017-10-24T07:27:23 | 2017-10-24T07:27:23 | 107,673,776 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,630 | java | package weldstartup.a;
import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;
import javax.annotation.Resource;
import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.spi.BeanManager;
import javax.inject.Inject;
import javax.transaction.TransactionSynchronizationRegistry;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import weldstartup.nondynamicclasses.AppScopedNonDynamicBean;
import weldstartup.nondynamicclasses.DependentScopedNonDynamicBean;
import weldstartup.nondynamicclasses.RequestScopedNonDynamicBean;
/**
* A dynamically created CDI bean meant to demonstrate meant to demonstrate that the WeldStartup performance on weblogic
* is really under-performing.
*
*/
@ApplicationScoped
// appScopedName will be turned into a name like AppScopedBean0001
public class AppScopedBean0730 {
private static final Logger LOGGER = LoggerFactory.getLogger(AppScopedBean0730.class);
@Inject
AppScopedNonDynamicBean appScopedNonDynamicBean;
@Inject
DependentScopedNonDynamicBean rependentScopedNonDynamicBean;
@Inject
RequestScopedNonDynamicBean requestScopedNonDynamicBean;
@Inject
BeanManager beanManager;
@Resource
TransactionSynchronizationRegistry tsr;
@PostConstruct
public void postConstruct() {
LOGGER.info("Post construct method invoked. AppScopedBean0730");
}
@PreDestroy
public void preDestroy() {
LOGGER.info("Pre-destroy method invoked. AppScopedBean0730");
}
public void dummyLogic() {
LOGGER.info("Dummy logic invoked. AppScopedBean0730");
}
}
| [
"99sono@users.noreply.github.com"
] | 99sono@users.noreply.github.com |
07865842209abd0885ea77d7610273a430e3c2b1 | d38afb4d31e0574dd2086fc84e5d664aecc77f5c | /com/planet_ink/coffee_mud/Abilities/Fighter/Fighter_ViciousBlow.java | d7ca447df12eb2438f536a7f5bba54bcb38b9cd1 | [
"Apache-2.0"
] | permissive | Dboykey/CoffeeMud | c4775fc6ec9e910ff7ff8523c04567a580a9529e | 844704805d3de26a16b83bd07552d6ae82391208 | refs/heads/master | 2022-04-16T07:07:22.004847 | 2020-04-06T17:55:33 | 2020-04-06T17:55:33 | 255,074,559 | 0 | 1 | Apache-2.0 | 2020-04-12T12:10:07 | 2020-04-12T12:10:06 | null | UTF-8 | Java | false | false | 2,695 | java | package com.planet_ink.coffee_mud.Abilities.Fighter;
import com.planet_ink.coffee_mud.core.interfaces.*;
import com.planet_ink.coffee_mud.core.*;
import com.planet_ink.coffee_mud.core.collections.*;
import com.planet_ink.coffee_mud.Abilities.interfaces.*;
import com.planet_ink.coffee_mud.Areas.interfaces.*;
import com.planet_ink.coffee_mud.Behaviors.interfaces.*;
import com.planet_ink.coffee_mud.CharClasses.interfaces.*;
import com.planet_ink.coffee_mud.Commands.interfaces.*;
import com.planet_ink.coffee_mud.Common.interfaces.*;
import com.planet_ink.coffee_mud.Exits.interfaces.*;
import com.planet_ink.coffee_mud.Items.interfaces.*;
import com.planet_ink.coffee_mud.Libraries.interfaces.*;
import com.planet_ink.coffee_mud.Locales.interfaces.*;
import com.planet_ink.coffee_mud.MOBS.interfaces.*;
import com.planet_ink.coffee_mud.Races.interfaces.*;
import java.util.*;
/*
Copyright 2016-2020 Bo Zimmerman
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
public class Fighter_ViciousBlow extends FighterSkill
{
@Override
public String ID()
{
return "Fighter_ViciousBlow";
}
private final static String localizedName = CMLib.lang().L("Vicious Blow");
@Override
public String name()
{
return localizedName;
}
@Override
public String displayText()
{
return "";
}
@Override
public int abstractQuality()
{
return Ability.QUALITY_BENEFICIAL_SELF;
}
@Override
protected int canAffectCode()
{
return Ability.CAN_MOBS;
}
@Override
protected int canTargetCode()
{
return 0;
}
@Override
public boolean isAutoInvoked()
{
return true;
}
@Override
public boolean canBeUninvoked()
{
return false;
}
@Override
public int classificationCode()
{
return Ability.ACODE_SKILL | Ability.DOMAIN_ANATOMY;
}
@Override
public void affectCharStats(final MOB affectedMob, final CharStats affectableStats)
{
super.affectCharStats(affectedMob, affectableStats);
affectableStats.setStat(CharStats.STAT_CRIT_DAMAGE_PCT_WEAPON, affectableStats.getStat(CharStats.STAT_CRIT_DAMAGE_PCT_WEAPON)+50+(5*super.getXLEVELLevel(affectedMob)));
}
}
| [
"bo@zimmers.net"
] | bo@zimmers.net |
823390b3f86ca6aa6f3aefddc1cddf79f949df1e | 31db60fe49ef7d31f3fc29221a69b97c19c59bb3 | /src/main/resources/oracle-db/kv-18.1.19/src/oracle/kv/impl/api/avro/GenericBinding.java | 650dfe9e2ab6e6d18aed1474ac71684741b6fa00 | [
"Apache-2.0",
"Zlib",
"MIT",
"CC0-1.0",
"FSFAP",
"BSD-3-Clause"
] | permissive | joelnewcom/embeddedOracleKv | d39cc4db1aa26962d7a1c721b87aa55a23124c3e | 138d23c66ae91d8e367b5456e4c5ab85dc47fcdc | refs/heads/master | 2021-06-25T20:24:13.850335 | 2019-06-02T19:43:27 | 2019-06-02T19:43:27 | 134,009,219 | 0 | 0 | Apache-2.0 | 2020-10-13T01:06:34 | 2018-05-18T22:19:51 | Java | UTF-8 | Java | false | false | 7,067 | java | /*-
* Copyright (C) 2011, 2018 Oracle and/or its affiliates. All rights reserved.
*
* This file was distributed by Oracle as part of a version of Oracle NoSQL
* Database made available at:
*
* http://www.oracle.com/technetwork/database/database-technologies/nosqldb/downloads/index.html
*
* Please see the LICENSE file included in the top-level directory of the
* appropriate version of Oracle NoSQL Database for a copy of the license and
* additional information.
*/
package oracle.kv.impl.api.avro;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.avro.AvroRuntimeException;
import org.apache.avro.Schema;
import org.apache.avro.generic.GenericDatumReader;
import org.apache.avro.generic.GenericDatumWriter;
import org.apache.avro.generic.GenericFixed;
import org.apache.avro.generic.GenericRecord;
import org.apache.avro.io.Decoder;
import org.apache.avro.io.DecoderFactory;
import org.apache.avro.io.Encoder;
import org.apache.avro.io.EncoderFactory;
import oracle.kv.Value;
import oracle.kv.avro.GenericAvroBinding;
import oracle.kv.avro.RawAvroBinding;
import oracle.kv.avro.RawRecord;
import oracle.kv.avro.SchemaNotAllowedException;
import oracle.kv.avro.UndefinedSchemaException;
/**
* Provides a straightforward mapping from the built-in Avro generic classes to
* our generic binding API.
*/
@SuppressWarnings("deprecation")
class GenericBinding implements GenericAvroBinding {
/**
* A raw binding is used for packaging and unpackaging the Avro raw data
* bytes and their associated writer schema.
*/
private final RawAvroBinding rawBinding;
/**
* The allowed schemas as used to throw SchemaNotAllowedException when an
* attempt is made to use this binding with a different schema, and is also
* used to determine the reader schema.
*/
private final Map<String, Schema> allowedSchemas;
GenericBinding(AvroCatalogImpl catalog, Map<String, Schema> allowedSchemas)
throws UndefinedSchemaException {
this.rawBinding = catalog.getRawBinding();
this.allowedSchemas = new HashMap<String, Schema>(allowedSchemas);
/* May throw UndefinedSchemaException. */
catalog.checkDefinedSchemas(allowedSchemas);
}
/**
* Straightforward deserialization to GenericRecord using RawBinding,
* BinaryDecoder and GenericDatumReader.
*/
@Override
public GenericRecord toObject(Value value)
throws SchemaNotAllowedException, IllegalArgumentException {
final RawRecord raw = rawBinding.toObject(value);
final Schema writerSchema = raw.getSchema();
/* May throw SchemaNotAllowedException. */
final Schema readerSchema =
AvroCatalogImpl.checkToObjectSchema(writerSchema, allowedSchemas);
final GenericDatumReader<GenericRecord> reader =
new GenericDatumReader<GenericRecord>(writerSchema, readerSchema);
final Decoder decoder =
DecoderFactory.get().binaryDecoder(raw.getRawData(), null);
try {
return reader.read(null, decoder);
} catch (Exception e) {
throw new IllegalArgumentException
("Unable to deserialize GenericRecord", e);
}
}
/**
* Straightforward serialization of GenericRecord using RawBinding,
* BinaryEncoder and GenericWriter (our subclass of GenericDatumWriter).
*/
@Override
public Value toValue(GenericRecord object)
throws SchemaNotAllowedException, UndefinedSchemaException,
IllegalArgumentException {
final Schema writerSchema = object.getSchema();
/* May throw SchemaNotAllowedException. */
AvroCatalogImpl.checkToValueSchema(writerSchema, allowedSchemas);
final ByteArrayOutputStream out = new ByteArrayOutputStream();
final GenericWriter writer = new GenericWriter(writerSchema);
final Encoder encoder = EncoderFactory.get().binaryEncoder(out, null);
try {
writer.write(object, encoder);
encoder.flush();
} catch (Exception e) {
throw new IllegalArgumentException
("Unable to serialize GenericRecord", e);
}
final RawRecord raw = new RawRecord(out.toByteArray(), writerSchema);
/* May throw UndefinedSchemaException. */
return rawBinding.toValue(raw);
}
/**
* Subclass of GenericDatumWriter to implement special rules for certain
* data types.
*/
static class GenericWriter extends GenericDatumWriter<GenericRecord> {
GenericWriter(Schema writerSchema) {
super(writerSchema);
}
/**
* Called to serialize the Avro 'fixed' type. Uses the
* GenericBinding.writeFixed utility method to perform validation.
*/
@Override
protected void writeFixed(Schema schema, Object datum, Encoder out)
throws IOException {
final byte[] bytes = ((GenericFixed) datum).bytes();
GenericBinding.writeFixed(schema, bytes, out);
}
/**
* We override the primary write method to validate 'int' values.
*/
@Override
protected void write(Schema schema, Object datum, Encoder out)
throws IOException {
switch (schema.getType()) {
case INT:
GenericBinding.writeInt(datum, out);
break;
default:
super.write(schema, datum, out);
break;
}
}
}
/**
* Utility method for writing the 'int' data type, for all bindings.
* <p>
* By default in the superclass, an 'int' datum may be any Number subclass
* and the value is silently truncated if it exceeds 32-bits. Here we cast
* the datum to Integer, which throws an exception for other types. This
* behavior is consistent with other scalar types (long, float, etc) and is
* the same as the behavior for the 'int' type in Avro 1.5.
*/
static void writeInt(Object datum, Encoder out)
throws IOException, AvroRuntimeException {
out.writeInt((Integer)datum);
}
/**
* Utility method for writing the 'fixed' data type, for all bindings.
*
* @throws AvroRuntimeException if the schema-defined size for a 'fixed'
* field is not equal to the size of the byte array in the object field
* being deserialized.
*/
static void writeFixed(Schema schema, byte[] bytes, Encoder out)
throws IOException, AvroRuntimeException {
final int sizeInSchema = schema.getFixedSize();
if (sizeInSchema != bytes.length) {
throw new AvroRuntimeException
("Schema for 'fixed' type: " + schema.getName() +
" has length: " + sizeInSchema +
" but byte array has length: " + bytes.length);
}
out.writeFixed(bytes, 0, sizeInSchema);
}
}
| [
"joel.neukom@gmx.ch"
] | joel.neukom@gmx.ch |
baced2a7b52a12a6c8495f4f3059b908aefca62e | 9c2b23a2d6da1e762400ae963c1f787c3121eb89 | /core/com.hundsun.ares.studio.jres.metadata.ui/src/com/hundsun/ares/studio/jres/metadata/internal/refactoring/RenameTypeDefaultValueRefactoringContribution.java | 14ea15a0885e2d9f08f44abcac9ab4266127b7d8 | [
"MIT"
] | permissive | zhuyf03516/ares-studio | 5d67757283a52e51100666c9ce35227a63656f0e | 5648b0f606cb061d06c39ac25b7b206f3307882f | refs/heads/master | 2021-01-11T11:31:51.436304 | 2016-08-11T10:56:31 | 2016-08-11T10:56:31 | 65,444,199 | 0 | 0 | null | 2016-08-11T06:24:33 | 2016-08-11T06:24:32 | null | GB18030 | Java | false | false | 1,237 | java | /**
* 源程序名称:RenameTypeDefaultValueRefactoringContribution.java
* 软件著作权:恒生电子股份有限公司 版权所有
* 系统名称:JRES Studio
* 模块名称:com.hundsun.ares.studio.jres.metadata.ui
* 功能说明:元数据用户编辑和UI展现相关功能
* 相关文档:
* 作者:
*/
package com.hundsun.ares.studio.jres.metadata.internal.refactoring;
import java.util.Map;
import org.eclipse.ltk.core.refactoring.RefactoringContribution;
import org.eclipse.ltk.core.refactoring.RefactoringDescriptor;
/**
* @author gongyf
*
*/
public class RenameTypeDefaultValueRefactoringContribution extends
RefactoringContribution {
/**
*
*/
public RenameTypeDefaultValueRefactoringContribution() {
// TODO Auto-generated constructor stub
}
/* (non-Javadoc)
* @see org.eclipse.ltk.core.refactoring.RefactoringContribution#createDescriptor(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Map, int)
*/
@Override
public RefactoringDescriptor createDescriptor(String id, String project,
String description, String comment, Map arguments, int flags)
throws IllegalArgumentException {
// TODO Auto-generated method stub
return null;
}
}
| [
"zhuyf@hundsun.com"
] | zhuyf@hundsun.com |
44c5e58d9e2e9d17e186b53e10b35ab15e80c6e9 | fe2ef5d33ed920aef5fc5bdd50daf5e69aa00ed4 | /struts2/src/base/zyf/tools/auto/create/list/ListJspMeta.java | 86d954cf44280f65ac351815d23bc9845c338095 | [] | no_license | sensui74/legacy-project | 4502d094edbf8964f6bb9805be88f869bae8e588 | ff8156ae963a5c61575ff34612c908c4ccfc219b | refs/heads/master | 2020-03-17T06:28:16.650878 | 2016-01-08T03:46:00 | 2016-01-08T03:46:00 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 3,461 | java | /**
*
* 制作时间:Oct 31, 200711:18:08 AM
* 文件名:ListJspMeta.java
* 制作者:zhaoyf
*
*/
package base.zyf.tools.auto.create.list;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.text.MessageFormat;
import base.zyf.tools.FileUtil;
/**
* @author zhaoyf
*
*/
public class ListJspMeta {
private String absPath;
private String fileName;
/**
* 查询链接{0}
*/
private String queryLink="";
/**
* 删除链接{1}
*/
private String removeLink="";
/**
* 全部删除链接{2}
*/
private String removeAllLink="";
/**
* 查询页的引用地址{3}
*/
private String searchJspfInclude="";
/**
* 翻页链接{4}
*/
private String pageLink="";
/**
* 列表页汉语名
*/
private String listName="";
public String getQueryLink() {
return queryLink;
}
public void setQueryLink(String queryLink) {
this.queryLink = queryLink;
}
public String getRemoveLink() {
return removeLink;
}
public void setRemoveLink(String removeLink) {
this.removeLink = removeLink;
}
public String getRemoveAllLink() {
return removeAllLink;
}
public void setRemoveAllLink(String removeAllLink) {
this.removeAllLink = removeAllLink;
}
public String getSearchJspfInclude() {
return searchJspfInclude;
}
public void setSearchJspfInclude(String searchJspfInclude) {
this.searchJspfInclude = searchJspfInclude;
}
public String getPageLink() {
return pageLink;
}
public void setPageLink(String pageLink) {
this.pageLink = pageLink;
}
private String getJs()
{
StringBuffer js=new StringBuffer();
BufferedReader br=FileUtil.getFileReader(this.getClass().getResourceAsStream("list.js-"));
String temp;
try {
while((temp=br.readLine())!=null)
{
//temp="'"+temp;
//System.out.println(temp);
js.append(MessageFormat.format(temp,new Object[]{queryLink,removeLink,removeAllLink,searchJspfInclude,pageLink,"'"}));
js.append("\r\n");
}
br.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
try {
br.close();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
}
return js.toString();
}
public void createFiles(String realPath)
{
String path=realPath+this.getAbsPath()+this.getFileName();
BufferedReader br=FileUtil.getFileReader(this.getClass().getResourceAsStream("list.jsp"));
PrintWriter pw=FileUtil.getFileWriter(path);
String js=this.getJs();
String temp;
try {
while((temp=br.readLine())!=null)
{
pw.println(MessageFormat.format(temp,new Object[]{queryLink,removeLink,removeAllLink,searchJspfInclude,pageLink,"'",js,listName}));
}
br.close();
pw.close();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
try {
br.close();
} catch (IOException e1) {
// TODO Auto-generated catch block
e1.printStackTrace();
}
pw.close();
FileUtil.removeFile(path);
}
}
public String getAbsPath() {
return absPath;
}
public void setAbsPath(String absPath) {
this.absPath = absPath;
}
public String getFileName() {
return fileName;
}
public void setFileName(String fileName) {
this.fileName = fileName;
}
public String getListName() {
return listName;
}
public void setListName(String listName) {
this.listName = listName;
}
}
| [
"wow_fei@163.com"
] | wow_fei@163.com |
ed017f6c777dc48a827105519d2b4a8cfa81db3e | a1826c2ed9c12cfc395fb1a14c1a2e1f097155cb | /ververica-20220718/src/main/java/com/aliyun/ververica20220718/models/GenerateResourcePlanWithFlinkConfAsyncRequest.java | 9c03da446baaae6154785d18838eff5db133c94f | [
"Apache-2.0"
] | permissive | aliyun/alibabacloud-java-sdk | 83a6036a33c7278bca6f1bafccb0180940d58b0b | 008923f156adf2e4f4785a0419f60640273854ec | refs/heads/master | 2023-09-01T04:10:33.640756 | 2023-09-01T02:40:45 | 2023-09-01T02:40:45 | 288,968,318 | 40 | 45 | null | 2023-06-13T02:47:13 | 2020-08-20T09:51:08 | Java | UTF-8 | Java | false | false | 787 | java | // This file is auto-generated, don't edit it. Thanks.
package com.aliyun.ververica20220718.models;
import com.aliyun.tea.*;
public class GenerateResourcePlanWithFlinkConfAsyncRequest extends TeaModel {
@NameInMap("body")
public java.util.Map<String, ?> body;
public static GenerateResourcePlanWithFlinkConfAsyncRequest build(java.util.Map<String, ?> map) throws Exception {
GenerateResourcePlanWithFlinkConfAsyncRequest self = new GenerateResourcePlanWithFlinkConfAsyncRequest();
return TeaModel.build(map, self);
}
public GenerateResourcePlanWithFlinkConfAsyncRequest setBody(java.util.Map<String, ?> body) {
this.body = body;
return this;
}
public java.util.Map<String, ?> getBody() {
return this.body;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
a60ace910d6d5065903026a98be892375e054132 | 7bcad743d9cab60443eebc1866a11471edf89874 | /src/main/java/com/rueggerllc/avro/Active.java | 98a01b8ba8d42a919629eafe5adbe0b5a268b1de | [] | no_license | rueggerc/avro1 | d30ca9386dc4a17b89a2a7d445b28f6f006084bd | 1b2695b55d6db016c610954c873672b8bf1e0516 | refs/heads/master | 2020-04-17T12:27:44.125927 | 2019-01-19T23:14:53 | 2019-01-19T23:14:53 | 166,580,020 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 505 | java | /**
* Autogenerated by Avro
*
* DO NOT EDIT DIRECTLY
*/
package com.rueggerllc.avro;
@SuppressWarnings("all")
@org.apache.avro.specific.AvroGenerated
public enum Active {
ROCK, PAPER, SCISSORS ;
public static final org.apache.avro.Schema SCHEMA$ = new org.apache.avro.Schema.Parser().parse("{\"type\":\"enum\",\"name\":\"Active\",\"namespace\":\"com.rueggerllc.avro\",\"symbols\":[\"ROCK\",\"PAPER\",\"SCISSORS\"]}");
public static org.apache.avro.Schema getClassSchema() { return SCHEMA$; }
}
| [
"chris.ruegger@gmail.com"
] | chris.ruegger@gmail.com |
62c51962e4071fb77f14a90a1f82e62551ca130f | cb4fa3ce3e7c8b7ad724003f4e18868c05102dac | /src/main/java/org/example/reponse/AddressRP.java | b22adcc5fcf87ac8645720c877c4d63bfd7d1639 | [] | no_license | solitarysp/NotNullAndColumnNullableHibernateDemo | 1f8c1d207fd6e9b456b65b2037ce878c6af96689 | 58fe80d3c49457e4efe7ef815409b97d9c1ea02f | refs/heads/master | 2023-01-13T06:42:32.646364 | 2020-11-23T07:49:36 | 2020-11-23T07:49:36 | 315,237,535 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 299 | java | package org.example.reponse;
import org.example.entity.AddressEntity;
import org.example.reponse.dto.UsersDtoRp;
import java.util.List;
public class AddressRP extends ResponseBase<List<AddressEntity>> {
@Override
public Integer getStatus() {
return super.getStatus();
}
}
| [
"lethanh9398@gmail.com"
] | lethanh9398@gmail.com |
90eda771460765b9e59c86e0a2d52808acb15ee0 | cfa7d9ef4015cbab56388835842d8e27ba9aeb45 | /modules/com/ail/pageflow.jar/com/ail/pageflow/PageContainer.java | a30ab20b678674f4a8047533d79d5b2c2d85a168 | [] | no_license | sangnguyensoftware/openunderwriter | 678ff8cfe83f781a03b9cd62313e3d6594e74556 | 380cfa83e135084d29cd0b29d1ed4780cdb62408 | refs/heads/master | 2020-03-21T09:24:40.328042 | 2018-06-26T00:13:27 | 2018-06-26T00:13:27 | 138,398,507 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,129 | java | /* Copyright Applied Industrial Logic Limited 2006. All rights Reserved */
/*
* This program is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software
* Foundation; either version 2 of the License, or (at your option) any later
* version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program; if not, write to the Free Software Foundation, Inc., 51
* Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
package com.ail.pageflow;
import java.util.Collection;
import java.util.List;
import com.ail.core.BaseException;
import com.ail.core.Type;
import com.ail.pageflow.util.OrderedList;
/**
* An abstract UI element which provides support for any concrete page element which itself contains other page
* elements.
*/
public abstract class PageContainer extends PageElement {
private static final long serialVersionUID = 297215265083279666L;
/** List of elements contained. */
private List<PageElement> pageElement;
public PageContainer() {
super();
pageElement = new OrderedList<>();
}
/**
* Get the list of elements contained.
* @return List of elements.
*/
public List<PageElement> getPageElement() {
return pageElement;
}
/**
* Set the list of page elements contained.
* @param pageElement list of elements
*/
public void setPageElement(List<PageElement> pageElement) {
this.pageElement=pageElement;
}
/**
* Get the list of elements as a collection (this is provided to support Castor).
* @return Collection of elements.
*/
public Collection<PageElement> getPageElementCollection() {
return pageElement;
}
/**
* @see #getPageElementCollection()
* @param pageElements Collection of elements
*/
public void setPageElementCollection(Collection<PageElement> pageElements) {
this.pageElement = new OrderedList<>(pageElements);
}
@Override
public void onStartProcessAction(Type model) {
Type localModel = (Type)fetchBoundObject(model, model);
for (PageElement e : pageElement) {
e.onStartProcessAction(localModel);
}
}
@Override
public Type applyRequestValues(Type model) {
Type localModel = (Type)fetchBoundObject(model, model);
for (PageElement e : pageElement) {
localModel=e.applyRequestValues(localModel);
}
return model;
}
@Override
public boolean processValidations(Type model) {
Type localModel = (Type)fetchBoundObject(model, model);
// If our condition isn't met, validate nothing.
if (!conditionIsMet(localModel)) {
return false;
}
boolean result = false;
for (PageElement e : getPageElement()) {
result |= e.processValidations(localModel);
}
return result;
}
@Override
public Type processActions(Type model) throws BaseException {
Type localModel = (Type)fetchBoundObject(model, model);
// If our condition isn't met, validate nothing.
if (!conditionIsMet(localModel)) {
return model;
}
for (PageElement e : getPageElement()) {
model=e.processActions(localModel);
}
if (PageFlowContext.getPageFlow().isAdvancingPage()) {
for(Action a: getAction()) {
localModel=a.executeAction(localModel, ActionType.ON_PAGE_EXIT);
}
}
return model;
}
@Override
public void applyElementId(String basedId) {
int idx = 0;
for (PageElement e : pageElement) {
e.applyElementId(basedId + ID_SEPARATOR + (idx++));
}
super.applyElementId(basedId);
}
}
| [
"40519615+sangnguyensoftware@users.noreply.github.com"
] | 40519615+sangnguyensoftware@users.noreply.github.com |
ae9974ebac0d1a6e288eacf57e1c71a373e25762 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/10/10_1a56b96976e4043d2aaee8a76d27c605c4a0985e/AuthenticationManager/10_1a56b96976e4043d2aaee8a76d27c605c4a0985e_AuthenticationManager_s.java | 7080ab0950b1644ae7d237dad323df671888b4cd | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 3,815 | java | package com.mymed.controller.core.manager.authentication;
import java.io.UnsupportedEncodingException;
import java.util.Map;
import com.mymed.controller.core.exception.IOBackEndException;
import com.mymed.controller.core.exception.InternalBackEndException;
import com.mymed.controller.core.manager.AbstractManager;
import com.mymed.controller.core.manager.profile.ProfileManager;
import com.mymed.controller.core.manager.storage.StorageManager;
import com.mymed.model.data.session.MAuthenticationBean;
import com.mymed.model.data.user.MUserBean;
/**
* The manager for the authentication bean
*
* @author lvanni
* @author Milo Casagrande
*
*/
public class AuthenticationManager extends AbstractManager implements IAuthenticationManager {
private static final String LOGIN_COLUMN = "login";
private static final String ENCODING = "UTF8";
public AuthenticationManager() throws InternalBackEndException {
this(new StorageManager());
}
public AuthenticationManager(final StorageManager storageManager) throws InternalBackEndException {
super(storageManager);
}
/**
* @throws IOBackEndException
* @see IAuthenticationManager#create(MUserBean, MAuthenticationBean)
*/
@Override
public MUserBean create(final MUserBean user, final MAuthenticationBean authentication)
throws InternalBackEndException, IOBackEndException {
final ProfileManager profileManager = new ProfileManager(storageManager);
profileManager.create(user);
try {
read(authentication.getLogin(), authentication.getPassword());
} catch (final IOBackEndException e) {
if (e.getStatus() == 404) { // only if the user does not exist
storageManager.insertSlice(CF_AUTHENTICATION, LOGIN_COLUMN, authentication.getAttributeToMap());
try {
final Map<String, byte[]> authMap = authentication.getAttributeToMap();
storageManager.insertSlice(CF_AUTHENTICATION, new String(authMap.get(LOGIN_COLUMN), ENCODING),
authMap);
} catch (final UnsupportedEncodingException ex) {
throw new InternalBackEndException(ex.getMessage());
}
return user;
}
}
throw new IOBackEndException("The login already exist!", 409);
}
/**
* @see IAuthenticationManager#read(String, String)
*/
@Override
public MUserBean read(final String login, final String password) throws InternalBackEndException,
IOBackEndException {
final Map<byte[], byte[]> args = storageManager.selectAll(CF_AUTHENTICATION, login);
final MAuthenticationBean authentication = (MAuthenticationBean) introspection(new MAuthenticationBean(), args);
if (authentication.getLogin().equals("")) {
throw new IOBackEndException("the login does not exist!", 404);
} else if (!authentication.getPassword().equals(password)) {
throw new IOBackEndException("Wrong password", 403);
}
return new ProfileManager(storageManager).read(authentication.getUser());
}
/**
* @throws IOBackEndException
* @see IAuthenticationManager#update(MAuthenticationBean)
*/
@Override
public void update(final String id, final MAuthenticationBean authentication) throws InternalBackEndException,
IOBackEndException {
// Remove the old Authentication (the login/key can be changed)
storageManager.removeAll(CF_AUTHENTICATION, id);
// Insert the new Authentication
storageManager.insertSlice(CF_AUTHENTICATION, LOGIN_COLUMN, authentication.getAttributeToMap());
try {
final Map<String, byte[]> authMap = authentication.getAttributeToMap();
storageManager.insertSlice(CF_AUTHENTICATION, new String(authMap.get(LOGIN_COLUMN), ENCODING), authMap);
} catch (final UnsupportedEncodingException ex) {
throw new InternalBackEndException(ex.getMessage());
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
18cf6bac7c32ec3fbfc7511e7ab5d155b39f3227 | 5e3c7a857ba1c063e81a4203b32e7fdc7c3fa479 | /test/org/springframework/aop/config/TopLevelAopTagTests.java | f9d6f66e565cf33ba64d9eb5eb983fe0331137fc | [] | no_license | vsmysee/spring2.0 | 34f42220dfa68f78817449bf8b37b91e9a153655 | 7e2aef9127df31b4c4a05186a219293a29d374d1 | refs/heads/main | 2023-07-13T05:06:13.526029 | 2021-08-28T14:38:16 | 2021-08-28T14:38:16 | 343,822,474 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,428 | java | /*
* Copyright 2002-2006 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.aop.config;
import junit.framework.TestCase;
import org.springframework.beans.factory.support.DefaultListableBeanFactory;
import org.springframework.beans.factory.xml.XmlBeanDefinitionReader;
import org.springframework.core.io.ClassPathResource;
/**
* Tests that the <aop:config/> element can be used as a top level element.
*
* @author Rob Harrop
*/
public final class TopLevelAopTagTests extends TestCase {
public void testParse() throws Exception {
DefaultListableBeanFactory beanFactory = new DefaultListableBeanFactory();
XmlBeanDefinitionReader reader = new XmlBeanDefinitionReader(beanFactory);
reader.loadBeanDefinitions(new ClassPathResource("topLevelAop.xml", getClass()));
assertTrue(beanFactory.containsBeanDefinition("testPointcut"));
}
}
| [
"vsmysee@gmail.com"
] | vsmysee@gmail.com |
9c4f2730e05f0948a02a9e3e1af62c2222228a8e | cfe621e8c36e6ac5053a2c4f7129a13ea9f9f66b | /apps_final/names.of.allah/apk/com/google/android/gms/games/internal/api/LeaderboardsImpl$LoadScoresImpl$1.java | f5b3f5a3eddf52ba619494a2efd498b04150da87 | [] | no_license | linux86/AndoirdSecurity | 3165de73b37f53070cd6b435e180a2cb58d6f672 | 1e72a3c1f7a72ea9cd12048d9874a8651e0aede7 | refs/heads/master | 2021-01-11T01:20:58.986651 | 2016-04-05T17:14:26 | 2016-04-05T17:14:26 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,007 | java | package com.google.android.gms.games.internal.api;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.data.DataHolder;
import com.google.android.gms.games.leaderboard.Leaderboard;
import com.google.android.gms.games.leaderboard.LeaderboardScoreBuffer;
import com.google.android.gms.games.leaderboard.Leaderboards.LoadScoresResult;
class LeaderboardsImpl$LoadScoresImpl$1
implements Leaderboards.LoadScoresResult
{
LeaderboardsImpl$LoadScoresImpl$1(LeaderboardsImpl.LoadScoresImpl paramLoadScoresImpl, Status paramStatus) {}
public Leaderboard getLeaderboard()
{
return null;
}
public LeaderboardScoreBuffer getScores()
{
return new LeaderboardScoreBuffer(DataHolder.af(14));
}
public Status getStatus()
{
return yG;
}
public void release() {}
}
/* Location:
* Qualified Name: com.google.android.gms.games.internal.api.LeaderboardsImpl.LoadScoresImpl.1
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"i@xuzhao.net"
] | i@xuzhao.net |
faeb52491a49680c98f1b9456528f7a8246a784d | 10256bd339fc6a5af7b3f0b1e19e5e402b4e9a02 | /src/main/java/org/jab/microservices/MySumResponse.java | 215593af0b7256ee5195e0f6bda9143c8dab6316 | [] | no_license | my-calculator-poc/My-Calculator-PACT-API | 1b424f041ced5cd8c84a203402652919983c8a70 | 323e9b4eb3e0903c91cb4371105a5393119a4efa | refs/heads/master | 2020-07-04T02:57:26.791977 | 2019-08-20T18:43:07 | 2019-08-20T18:43:07 | 202,131,774 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 225 | java | package org.jab.microservices;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@Data
@NoArgsConstructor
@AllArgsConstructor
public class MySumResponse {
private Integer result;
}
| [
"bren@juanantonio.info"
] | bren@juanantonio.info |
6a0d866715d38b0e25c2d9fb25367162f7f37379 | 79ad64833f328397b1093779ef37bba5424de6ba | /app/src/main/java/vn/com/vnpt/vinaphone/vnptsoftware/vnptoffice/view/treeview/MyNodeViewPersonSendXemDBFactory.java | 578ba912995decb7eeb936a140a84b4f63e9f24a | [] | no_license | nguyenkiemhieu1/VNPT_01 | 75a047485b009b992ce8530acef4c18098a517c8 | 630612ff55049e6a68fa0aa0fb20f2d932f0b565 | refs/heads/master | 2023-02-01T00:40:09.029586 | 2020-12-18T08:27:30 | 2020-12-18T08:27:30 | 322,534,445 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 742 | java | package vn.com.vnpt.vinaphone.vnptsoftware.vnptoffice.view.treeview;
import android.view.View;
import me.texy.treeview.base.BaseNodeViewBinder;
import me.texy.treeview.base.BaseNodeViewFactory;
public class MyNodeViewPersonSendXemDBFactory extends BaseNodeViewFactory {
@Override
public BaseNodeViewBinder getNodeViewBinder(View view, int level) {
switch (level) {
case 0:
return new FirstLevelNodeViewBinder(view,true);
case 1:
return new SecondLevelNodeViewBinder(view,true);
case 2:
return new ThirdLevelNodeViewBinder(view,true);
default:
return new ThirdLevelNodeViewBinder(view,true);
}
}
}
| [
"hieunguyen18021999@gmail.com"
] | hieunguyen18021999@gmail.com |
25bbfb1dc95a8d7abff88588a622ac9aa4b103d4 | bb75c538d2c50be2a36b34fef662519890425c15 | /spring-ws-soapaction-header/src/main/java/com/codenotfound/ws/client/TicketAgentClient.java | f7e29871948501376450dcb9b5f6c6825eee7575 | [
"MIT"
] | permissive | likewei1981/spring-ws | f302a172e2ef97c8ba410000bb82c9197bafcab0 | 1bab577938bae7d23a94a5f159c7cc5996374161 | refs/heads/master | 2021-01-25T01:21:03.133217 | 2017-05-02T14:00:35 | 2017-05-02T14:00:35 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,220 | java | package com.codenotfound.ws.client;
import java.math.BigInteger;
import java.util.List;
import javax.xml.bind.JAXBElement;
import org.example.ticketagent.ObjectFactory;
import org.example.ticketagent.TFlightsResponse;
import org.example.ticketagent.TListFlights;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.ws.client.core.WebServiceTemplate;
import org.springframework.ws.soap.client.core.SoapActionCallback;
@Component
public class TicketAgentClient {
@Autowired
private WebServiceTemplate webServiceTemplate;
@SuppressWarnings("unchecked")
public List<BigInteger> listFlights() {
ObjectFactory factory = new ObjectFactory();
TListFlights tListFlights = factory.createTListFlights();
JAXBElement<TListFlights> request = factory.createListFlightsRequest(tListFlights);
// use SoapActionCallback to add the SOAPAction
JAXBElement<TFlightsResponse> response =
(JAXBElement<TFlightsResponse>) webServiceTemplate.marshalSendAndReceive(request,
new SoapActionCallback("http://example.com/TicketAgent/listFlights"));
return response.getValue().getFlightNumber();
}
}
| [
"codenotfound.com@gmail.com"
] | codenotfound.com@gmail.com |
843db6ad1b2714a3df0f9c84fe0d2d893c3531e6 | 6a6a54776b6fecd8c35d6474d23a05be0bc1100e | /.history/ADSList_20210930081258.java | 158a656b4c53a0d175cd5741fce9ff8226afd1ff | [] | no_license | Tuns0704/DataStructures-and-Algorithms | 6793cc03956da47452c7f20742c79c31ef76fc36 | 655aa977f83f15778bc4007edbcd216dd94af789 | refs/heads/master | 2023-08-28T16:47:51.986001 | 2021-11-04T05:39:25 | 2021-11-04T05:39:25 | 424,480,787 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,594 | java | import java.util.ArrayList;
public class ADSList<E> implements ArrayList<E>{
private static final int DEFAULT_CAPACITY = 4;
private Object[] element;
private int size = 0;
public ADSList(){
this.element = new Object[DEFAULT_CAPACITY];
}
public boolean add(E element){
if(this.size == this.elements.length){
this.elements = grow();
}
this.elements[this.size++] = element;
return true;
}
public boolean add(int index, E element) {
checkIndex(index);
if (this.size == this.elements.length) {
this.elements = grow();
}
E lastElement = this.getElement(this.size - 1);
for (int i = this.size -1; i > index; i--) {
this.elements[i] = this.elements[i-1];
}
this.elements[this.size] = lastElement;
this.elements[index] = element;
this.size++;
return true;
}
public E get(int index) {
checkIndex(index);
return this.getElement(index);
}
private getElement(int index) {
try{
return this.elements[index];
}catch(Exception e){
return null;
}
}
public E set(int index, E element) {
checkIndex(index);
E.oldElement = this.getElement(index);
this.elements[index] = element;
return oldElement;
}
public E remove(int index) {
this.checkIndex(index);
E.element = this.getElement(index);
this.elements[index] = null;
this.size--;
shift(index);
ensureCapacity();
return element;
}
private void shift(int index) {
for (int i = index; i < this.size; i++) {
element[i] = element[i + 1];
}
}
private Object[] grow(){
return Arrays.copyOf(this.elements, this.elements.length * 2);
}
private Object[] shrink() {
return Arrays.copyOf(this.elements, this.elements.length / 2);
}
private void ensureCapacity() {
if (this.size < this.elements.length / 3) {
this.elements = shrink();
}
}
private void checkIndex(int index){
if (index < 0 || index >= this.size) {
throw new IndexOutOfBoundsException(String.format("Index out of bounds: %d for size: %d", index, this.size));
}
}
public int size() {
return size;
}
public boolean isEmpty() {
if (size>0) return false;
else return true;
}
public boolean contains(Object o) {
if(o!=null){
for(Object element : elements) {
if(o.equals(element)){
return true;
}
}
}else{
for(Object element : elements){
if(element== null) {
return true;
}
}
}
return false;
}
public int indexOf(Object o) {
if
}
}
| [
"tuanmoitap@gmail.com"
] | tuanmoitap@gmail.com |
0e342e9ffd664f5b03b2f9705288b5b72ed4665d | 181faa1e6fed3b6c38539ce689a46699f52c31d6 | /app/src/main/java/p000/C1063sZ.java | 4d84c71adebc31c449218771d947adc6c09af073 | [] | no_license | Adam713/apcontint | 7a209ea6134c391264fec2e30745462bf6a52cfd | 0e14e708f487b4c3f6fd4727f500d41c5a414ab3 | refs/heads/master | 2022-11-29T22:26:00.021628 | 2020-08-12T03:46:03 | 2020-08-12T03:46:03 | 286,909,097 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,936 | java | package p000;
/* renamed from: sZ */
public final class C1063sZ extends C0080DY {
/* renamed from: a */
public int f3759a;
/* renamed from: b */
public int f3760b;
/* renamed from: c */
public int f3761c;
/* renamed from: d */
public int f3762d;
/* renamed from: a */
public void mo30a(jda jda) {
jda.writeInt(this.f3759a);
jda.writeInt(this.f3760b);
jda.writeInt(this.f3761c);
jda.writeInt(this.f3762d);
}
public Object clone() {
C1063sZ sZVar = new C1063sZ();
sZVar.f3759a = this.f3759a;
sZVar.f3760b = this.f3760b;
sZVar.f3761c = this.f3761c;
sZVar.f3762d = this.f3762d;
return sZVar;
}
/* renamed from: e */
public short mo34e() {
return 4098;
}
/* renamed from: g */
public int mo36g() {
return 16;
}
/* renamed from: h */
public int mo5103h() {
return this.f3762d;
}
/* renamed from: i */
public int mo5104i() {
return this.f3761c;
}
/* renamed from: j */
public int mo5105j() {
return this.f3759a;
}
/* renamed from: k */
public int mo5106k() {
return this.f3760b;
}
public String toString() {
StringBuffer stringBuffer = new StringBuffer();
stringBuffer.append("[CHART]\n");
stringBuffer.append(" .x = ");
stringBuffer.append(mo5105j());
stringBuffer.append(10);
stringBuffer.append(" .y = ");
stringBuffer.append(mo5106k());
stringBuffer.append(10);
stringBuffer.append(" .width = ");
stringBuffer.append(mo5104i());
stringBuffer.append(10);
stringBuffer.append(" .height= ");
stringBuffer.append(mo5103h());
stringBuffer.append(10);
stringBuffer.append("[/CHART]\n");
return stringBuffer.toString();
}
}
| [
"Adamalwan55@gmail.com"
] | Adamalwan55@gmail.com |
0389f3a46b9cb588a98556e27daeb668a5290f22 | e408cfc15e6be24ec094de8303e02b2c60cdc1c5 | /lib/src/main/java/com/d/lib/slidelayout/SlideManager.java | 78eb21c4f56d93364712d711a045c50be893ba48 | [
"Apache-2.0"
] | permissive | iostyle/SlideLayout | f0397485859adedf4bece8818ffdaacef74fd2e3 | 4e50199707910815713a5532c43c86ef093be02d | refs/heads/master | 2022-12-18T05:57:47.932267 | 2020-09-29T10:20:50 | 2020-09-29T10:20:50 | 299,577,520 | 0 | 0 | Apache-2.0 | 2020-09-29T10:06:43 | 2020-09-29T10:06:42 | null | UTF-8 | Java | false | false | 963 | java | package com.d.lib.slidelayout;
import java.util.ArrayList;
import java.util.List;
/**
* Manager for Slide List
* Created by D on 2017/5/30.
*/
public class SlideManager {
private List<SlideLayout> mSlides;
public SlideManager() {
mSlides = new ArrayList<>();
}
public void onChange(SlideLayout layout, boolean isOpen) {
if (isOpen) {
mSlides.add(layout);
} else {
mSlides.remove(layout);
}
}
public boolean closeAll(SlideLayout layout) {
boolean ret = false;
if (mSlides.size() <= 0) {
return false;
}
for (int i = 0; i < mSlides.size(); i++) {
SlideLayout slide = mSlides.get(i);
if (slide != null && slide != layout) {
slide.close();
mSlides.remove(slide); // Unnecessary
ret = true;
i--;
}
}
return ret;
}
}
| [
"s90789@outlook.com"
] | s90789@outlook.com |
ac57f44b5c936a82fafe57446b90df228e541574 | 4a2279b654cee33f29cfe68c698c192fce1c88c0 | /hibeans/src/main/java/com/hisense/hibeans/bot/model/BotDeviceInfo.java | 64804fb3e688d5be614023b83b0fb395cc92d836 | [] | no_license | liudunjian/HiASK | 6d546f6dc212feeea836752bddcb76f9a8d93740 | 0ec8115b5eba1b72e0f8af808336128350e3d5b3 | refs/heads/master | 2020-04-02T09:20:02.110147 | 2018-11-01T02:28:09 | 2018-11-01T02:28:09 | 154,287,933 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,376 | java | package com.hisense.hibeans.bot.model;
/**
* Created by liudunjian on 2018/4/12.
*/
public class BotDeviceInfo {
public String deviceId;
public String imei;
public String androidId;
public String phoneNum;
public String subscriberId;
public String simSerialNum;
public String simCountryIso;
public String simOperator;
public String simOperatorName;
public String networkCountryIso;
public String networkOperator;
public String networkOperatorName;
public int networkType;
public int phoneType;
public String cpuInfo;
public String buildRelease;
public int buildSdk;
public String buildBrand;
public String buildModel;
public String buildId;
public String buildDisplay;
public String buildProduct;
public String buildManufacturer;
public String buildDevice;
public String buildHardware;
public String buildBoard;
public String wifiAddress;
public String wifiIpAddress;
public float displayDensity;
public int displayDensityDpi;
public float displayXDpi;
public float displayYDpi;
public float displayScaledDensity;
public String packageName;
public String versionName;
public int versionCode;
public String applicationName;
public int targetSdkVersion;
public int minSdkVersion;
public BotDeviceInfo() {
}
}
| [
"liudunjian@hisense.com"
] | liudunjian@hisense.com |
798168a4ffb61b08645e1dad7bcb0bcba18e5a09 | 95e944448000c08dd3d6915abb468767c9f29d3c | /sources/com/p280ss/android/ugc/aweme/lineargradient/C32417a.java | e86ba36dc2adb5c73977eb58c02f27b89df9fe51 | [] | no_license | xrealm/tiktok-src | 261b1faaf7b39d64bb7cb4106dc1a35963bd6868 | 90f305b5f981d39cfb313d75ab231326c9fca597 | refs/heads/master | 2022-11-12T06:43:07.401661 | 2020-07-04T20:21:12 | 2020-07-04T20:21:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 755 | java | package com.p280ss.android.ugc.aweme.lineargradient;
import com.facebook.react.ReactPackage;
import com.facebook.react.bridge.NativeModule;
import com.facebook.react.bridge.ReactApplicationContext;
import com.facebook.react.uimanager.ViewManager;
import java.util.Collections;
import java.util.List;
/* renamed from: com.ss.android.ugc.aweme.lineargradient.a */
public final class C32417a implements ReactPackage {
public final List<NativeModule> createNativeModules(ReactApplicationContext reactApplicationContext) {
return Collections.emptyList();
}
public final List<ViewManager> createViewManagers(ReactApplicationContext reactApplicationContext) {
return Collections.singletonList(new LinearGradientManager());
}
}
| [
"65450641+Xyzdesk@users.noreply.github.com"
] | 65450641+Xyzdesk@users.noreply.github.com |
35d1bffe431374a58ac4e46fd065adf262e4b54d | 27c0a2be45e24e4d047330e2112f47c11cc0ccad | /CausticCore/src/main/java/com/teotigraphix/caustic/internal/effect/AutowahEffect.java | fe4d6f4c5eeedf9a30ea54604e986074bf7ddbf9 | [] | no_license | zhaozw/CausticSDK | d9cbc462755fcafdfcd3a34cb99c1ac14116df9d | 6b53ae5e37c39c28ebd864b9ddc749030b6ce5dc | refs/heads/master | 2021-01-16T00:35:40.605584 | 2013-07-10T13:48:05 | 2013-07-10T13:48:05 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,921 | java | ////////////////////////////////////////////////////////////////////////////////
// Copyright 2012 Michael Schmalle - Teoti Graphix, LLC
//
// 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
//
// Author: Michael Schmalle, Principal Architect
// mschmalle at teotigraphix dot com
////////////////////////////////////////////////////////////////////////////////
package com.teotigraphix.caustic.internal.effect;
import com.teotigraphix.caustic.core.IMemento;
import com.teotigraphix.caustic.device.IDevice;
import com.teotigraphix.caustic.effect.IAutowahEffect;
/**
* Default implementation of the {@link IAutowahEffect} API.
*
* @author Michael Schmalle
* @copyright Teoti Graphix, LLC
* @since 1.0
*/
public class AutowahEffect extends Effect implements IAutowahEffect {
//--------------------------------------------------------------------------
//
// IAutowahEffect API :: Properties
//
//--------------------------------------------------------------------------
//----------------------------------
// cutoff
//----------------------------------
private float mCutoff = 2.23f;
@Override
public float getCutoff() {
return mCutoff;
}
public float getCutoff(boolean restore) {
return get(CONTROL_CUTOFF);
}
@Override
public void setCutoff(float value) {
if (value == mCutoff)
return;
if (value < 0.5f || value > 4.0f)
throw newRangeException(CONTROL_CUTOFF, "0.5..4.0", value);
mCutoff = value;
set(CONTROL_CUTOFF, mCutoff);
}
//----------------------------------
// depth
//----------------------------------
private float mDepth = 1f;
@Override
public float getDepth() {
return mDepth;
}
public float getDepth(boolean restore) {
return get(CONTROL_DEPTH);
}
@Override
public void setDepth(float value) {
if (value == mDepth)
return;
if (value < 0f || value > 1f)
throw newRangeException(CONTROL_DEPTH, "0..1", value);
mDepth = value;
set(CONTROL_DEPTH, mDepth);
}
//----------------------------------
// resonance
//----------------------------------
private float mResonance = 0.5f;
@Override
public float getResonance() {
return mResonance;
}
public float getResonance(boolean restore) {
return get(CONTROL_RESONANCE);
}
@Override
public void setResonance(float value) {
if (value == mResonance)
return;
if (value < 0f || value > 1f)
throw newRangeException(CONTROL_RESONANCE, "0..1", value);
mResonance = value;
set(CONTROL_RESONANCE, mResonance);
}
//----------------------------------
// speed
//----------------------------------
private float mSpeed = 0.4f;
@Override
public float getSpeed() {
return mSpeed;
}
public float getSpeed(boolean restore) {
return get(CONTROL_SPEED);
}
@Override
public void setSpeed(float value) {
if (value == mSpeed)
return;
if (value < 0f || value > 0.5f)
throw newRangeException(CONTROL_SPEED, "0..0.5", value);
mSpeed = value;
set(CONTROL_SPEED, mSpeed);
}
//----------------------------------
// wet
//----------------------------------
private float mWet = 1f;
@Override
public float getWet() {
return mWet;
}
public float getWet(boolean restore) {
return get(CONTROL_WET);
}
@Override
public void setWet(float value) {
if (value == mWet)
return;
if (value < 0f || value > 1f)
throw newRangeException(CONTROL_WET, "0..1", value);
mWet = value;
set(CONTROL_WET, mWet);
}
//--------------------------------------------------------------------------
//
// Constructor
//
//--------------------------------------------------------------------------
public AutowahEffect(int index, IDevice device) {
super(index, device);
setType(EffectType.AUTOWAH);
}
//--------------------------------------------------------------------------
//
// IPersistable API :: Methods
//
//--------------------------------------------------------------------------
@Override
public void copy(IMemento memento) {
memento.putFloat(EffectConstants.ATT_CUTOFF, getCutoff());
memento.putFloat(EffectConstants.ATT_DEPTH, getDepth());
memento.putFloat(EffectConstants.ATT_RESONANCE, getResonance());
memento.putFloat(EffectConstants.ATT_SPEED, getSpeed());
memento.putFloat(EffectConstants.ATT_WET, getWet());
}
@Override
public void paste(IMemento memento) {
setCutoff(memento.getFloat(EffectConstants.ATT_CUTOFF));
setDepth(memento.getFloat(EffectConstants.ATT_DEPTH));
setResonance(memento.getFloat(EffectConstants.ATT_RESONANCE));
setSpeed(memento.getFloat(EffectConstants.ATT_SPEED));
setWet(memento.getFloat(EffectConstants.ATT_WET));
}
@Override
public void restore() {
setCutoff(getCutoff(true));
setDepth(getDepth(true));
setResonance(getResonance(true));
setSpeed(getSpeed(true));
setWet(getWet(true));
}
}
| [
"mschmalle@teotigraphix.com"
] | mschmalle@teotigraphix.com |
af194dd8105cf1c427e10cced25ca72268b6967f | 47761f5843a42ec5ce4b0e4a5ab23579e8c44959 | /src/main/java/com/geniisys/giac/dao/GIACGeneralDisbReportDAO.java | 63c5abc410ba8df34121e198a95de5f4822f0885 | [] | no_license | jabautista/GeniisysSCA | df6171c27594638193949df1a65c679444d51b9f | 6dc1b21386453240f0632f37f00344df07f6bedd | refs/heads/development | 2021-01-19T20:54:11.936774 | 2017-04-20T02:05:41 | 2017-04-20T02:05:41 | 88,571,440 | 2 | 0 | null | 2017-08-02T01:48:59 | 2017-04-18T02:18:03 | PLSQL | UTF-8 | Java | false | false | 2,988 | java | package com.geniisys.giac.dao;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;
public interface GIACGeneralDisbReportDAO {
public String getGIACS273InitialFundCd() throws SQLException;
public String validateGIACS273DocCd(Map<String, Object> params) throws SQLException;
String getGiacs512CutOffDate(String extractYear) throws SQLException;
String validateGiacs512BeforeExtract(Map<String, Object> params) throws SQLException;
String validateGiacs512BeforePrint(Map<String, Object> params) throws SQLException;
Map<String, Object> cpcExtractPremComm(Map<String, Object> params) throws SQLException;
Map<String, Object> cpcExtractOsDtl(Map<String, Object> params) throws SQLException;
Map<String, Object> cpcExtractLossPaid(Map<String, Object> params) throws SQLException;
//GIACS149
String giacs149WhenNewFormInstance(String vUpdate) throws SQLException;
Integer countTaggedVouchers (String intmNo) throws SQLException;
Map<String, Object> computeGIACS149Totals(Map<String, Object> params) throws SQLException;
String updateCommVoucherAmount(Map<String, Object> params) throws SQLException;
List<Map<String, Object>> updateCommVoucherPrintTag(Map<String, Object> params) throws SQLException;
Map<String, Object> getCvPrefGIACS149(Map<String, Object> params) throws SQLException;
Map<String, Object> checkCvSeqGIACS149(Map<String, Object> params) throws SQLException;
String updateVatGIACS149(Map<String, Object> params) throws SQLException;
Map<String, Object> populateCvSeqGIACS149(Map<String, Object> params) throws SQLException;
List<Map<String, Object>> gpcvGetGIACS149(Integer intmNo) throws SQLException;
void updateGpcvGIACS169(Map<String, Object> params) throws SQLException;
void delWorkflowRec(Map<String, Object> params) throws SQLException;
void gpcvRestore(Map<String, Object> params) throws SQLException;
String updateUnprintedVoucher(Map<String, Object> params) throws SQLException;
String updateDocSeqGIACS149(Map<String, Object> params) throws SQLException;
String getGiacs190SlTypeCd() throws SQLException;
//GIACS158
String checkViewRecords (Map<String, Object> params) throws SQLException;
void invalidateBankFile (Map<String, Object> params) throws SQLException;
void processViewRecords (Map<String, Object> params) throws SQLException;
String generateBankFile (Map<String, Object> params) throws SQLException;
Map<String, Object> getDetailsTotalViaRecords (Map<String, Object> params) throws SQLException;
Map<String, Object> getDetailsTotalViaBankFiles (Map<String, Object> params) throws SQLException;
List<Map<String, Object>> getSummaryForBank(Map<String, Object> params) throws SQLException;
String getCompanyCode() throws SQLException;
void updateFileName (Map<String, Object> params) throws SQLException;
Map<String, Object> getTotalViaBankFile (Map<String, Object> params) throws SQLException;
Map<String, Object> getTotalViaRecords (Map<String, Object> params) throws SQLException;
}
| [
"jeromecris.bautista@gmail.com"
] | jeromecris.bautista@gmail.com |
ec0893f77ae4e39cdc5762b06024009d22cf0573 | aa92822433a9c58ee297a805ab7772bdddd222e4 | /core/src/main/java/org/apache/syncope/core/persistence/dao/impl/AbstractContentDealer.java | 33c36d141cad3ce9122e17ae7eea23b6c9f66458 | [
"Apache-2.0"
] | permissive | denissignoretto/syncope | 62a5ca165bc62f9e794def1806c16294f624f775 | e5dae625fcf702e3034ceb0c007f392ca5379e17 | refs/heads/master | 2021-01-17T06:35:16.648339 | 2014-07-07T11:12:14 | 2014-07-07T11:12:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,507 | 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.syncope.core.persistence.dao.impl;
import java.io.IOException;
import java.util.Properties;
import javax.sql.DataSource;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.support.PropertiesLoaderUtils;
import org.springframework.dao.DataAccessException;
import org.springframework.jdbc.core.JdbcTemplate;
public abstract class AbstractContentDealer {
protected static final Logger LOG = LoggerFactory.getLogger(AbstractContentDealer.class);
protected static final String ROOT_ELEMENT = "dataset";
public static final String PERSISTENCE_PROPERTIES = "/persistence.properties";
private static final String VIEWS_XML = "/views.xml";
private static final String INDEXES_XML = "/indexes.xml";
protected static String dbSchema;
protected static Properties views;
protected static Properties indexes;
@Autowired
protected DataSource dataSource;
static {
try {
Properties persistence = PropertiesLoaderUtils.loadProperties(
new ClassPathResource(PERSISTENCE_PROPERTIES));
dbSchema = persistence.getProperty("database.schema");
views = PropertiesLoaderUtils.loadProperties(new ClassPathResource(VIEWS_XML));
indexes = PropertiesLoaderUtils.loadProperties(new ClassPathResource(INDEXES_XML));
} catch (IOException e) {
LOG.error("Could not read one or more properties files", e);
}
}
protected void createIndexes() {
LOG.debug("Creating indexes");
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
for (String idx : indexes.stringPropertyNames()) {
LOG.debug("Creating index {}", indexes.get(idx).toString());
try {
jdbcTemplate.execute(indexes.get(idx).toString());
} catch (DataAccessException e) {
LOG.error("Could not create index ", e);
}
}
LOG.debug("Indexes created");
}
protected void createViews() {
LOG.debug("Creating views");
JdbcTemplate jdbcTemplate = new JdbcTemplate(dataSource);
for (String idx : views.stringPropertyNames()) {
LOG.debug("Creating view {}", views.get(idx).toString());
try {
jdbcTemplate.execute(views.get(idx).toString().replaceAll("\\n", " "));
} catch (DataAccessException e) {
LOG.error("Could not create view ", e);
}
}
LOG.debug("Ciews created");
}
}
| [
"ilgrosso@apache.org"
] | ilgrosso@apache.org |
584ac2934c5bb2f451e319dc969f90f43431b4ff | 99da73f27c54bac8d8a563544e4952183911e8fb | /core/src/main/java/com/github/edgar615/direwolves/core/definition/EventbusEndpoint.java | a2a959291c6b105bbadb808eb6f9904fa938487d | [
"Apache-2.0"
] | permissive | learningtcc/direwolves | 4e65adfd0068a2cb712aff9e92e7fb932290a495 | c313259111cce07ef82cf19febd8202fb64b89b6 | refs/heads/master | 2021-05-14T18:38:12.963750 | 2017-12-25T15:17:55 | 2017-12-25T15:17:55 | 116,080,618 | 1 | 0 | null | 2018-01-03T02:22:04 | 2018-01-03T02:22:04 | null | UTF-8 | Java | false | false | 1,889 | java | package com.github.edgar615.direwolves.core.definition;
import com.google.common.collect.Multimap;
/**
* Eventbus的Endpoint.
*
* @author Edgar Date 2017/3/8
*/
public interface EventbusEndpoint extends Endpoint {
String TYPE = "eventbus";
String PUB_SUB = "pub-sub";
String POINT_POINT = "point-point";
String REQ_RESP = "req-resp";
String action();
/**
* @return 事件地址
*/
String address();
/**
* @return 消息头.
*/
Multimap<String, String> headers();
/**
* 策略
*
* @return 三种策略:pub-sub、point-point、req-resp
*/
String policy();
/**
* 创建Req-Resp类型的Endpoint
*
* @param name 名称
* @param address 事件地址
* @param header 请求头
* @return
*/
static EventbusEndpoint reqResp(String name, String address, String action,
Multimap<String, String> header) {
return new EventbusEndpointImpl(name, address, EventbusEndpoint.REQ_RESP, action, header);
}
/**
* 创建广播类型的Endpoint
*
* @param name 名称
* @param address 事件地址
* @param header 请求头
* @return
*/
static EventbusEndpoint publish(String name, String address, String action,
Multimap<String, String> header) {
return new EventbusEndpointImpl(name, address, EventbusEndpoint.PUB_SUB, action, header);
}
/**
* 创建点对点类型的Endpoint
*
* @param name 名称
* @param address 事件地址
* @param header 请求头
* @return
*/
static EventbusEndpoint pointToPoint(String name, String address, String action,
Multimap<String, String> header) {
return new EventbusEndpointImpl(name, address, EventbusEndpoint.POINT_POINT, action, header);
}
default String type() {
return TYPE;
}
}
| [
"edgar615@gmail.com"
] | edgar615@gmail.com |
cd9a872889aaf61fddfc1add21073b4a6f6ccb7f | 54f352a242a8ad6ff5516703e91da61e08d9a9e6 | /Source Codes/AtCoder/arc040/C/2742792.java | 45dbdbb9e6050c156cc8f4158554e34dc92f1f9e | [] | no_license | Kawser-nerd/CLCDSA | 5cbd8a4c3f65173e4e8e0d7ed845574c4770c3eb | aee32551795763b54acb26856ab239370cac4e75 | refs/heads/master | 2022-02-09T11:08:56.588303 | 2022-01-26T18:53:40 | 2022-01-26T18:53:40 | 211,783,197 | 23 | 9 | null | null | null | null | UTF-8 | Java | false | false | 3,898 | java | import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.security.KeyStore;
import java.util.*;
import java.io.*;
import java.util.function.*;
import java.util.stream.Collectors.*;
import java.util.stream.IntStream;
import java.util.stream.Stream;
import java.util.Map.Entry;
public class Main {
public static void main(String[] args) { new Main().stream(); }
final IO io = new IO();
final PrintWriter out = new PrintWriter(System.out);
final int INF = Integer.MAX_VALUE/2;
void stream(){ solve(); out.flush(); }
/// ********** ?? ********** ///
void solve() {
int N = io.Int();
char[][] S = new char[N][];
for(int i=0;i<N;++i) S[i]=io.String().toCharArray();
int cost = 0;
int bottomLeftEdgeX = INF;
int r=INF, c=INF;
for(int i = N - 1; i >= 0; --i){
bottomLeftEdgeX = INF;
for(int j = 0; j < N; ++j){
if(S[i][j] == '.'){
bottomLeftEdgeX = Math.min(bottomLeftEdgeX, j);
}
}
if(bottomLeftEdgeX!=INF){
cost++;
for(int j = bottomLeftEdgeX; j < N; ++j){
S[i][j] = 'o';
}
if(i != 0){
for(int j = 0; j <= bottomLeftEdgeX; ++j){
S[i-1][j] = 'o';
}
}
}
}
out.println(cost);
}
/// ********** __ ********** ///
void FOR(int a, int b, Consumer<Integer>act) { for(int i = a; i < b; ++i) act.accept(i); }
void REP(int a, Consumer<Integer>act) { FOR(0, a, act); }
}
/// ********** ??? ********** ///
/// ********** ___ ********** ///
class IO{
private final InputStream in = System.in;
private final byte[] buffer = new byte[1<<12];
private int ptr = 0, buffLen = 0;
private boolean hasNextByte () {
if(ptr < buffLen) return true;
ptr = 0;
try{ buffLen = in.read(buffer); } catch (IOException e){ e.printStackTrace(); }
return buffLen > 0;
}
private int readByte () { return hasNextByte()? buffer[ptr++] : -1; }
private boolean isPrintableChar (int c) { return 33 <= c && c <= 126; } //ASCII
private void skipUnprintable () { while (hasNextByte() && !isPrintableChar(buffer[ptr])) ptr++; }
private boolean hasNext () { skipUnprintable(); return hasNextByte();}
private String next () {
if(!hasNext()) throw new NoSuchElementException();
StringBuilder sb = new StringBuilder();
int b = readByte();
while (isPrintableChar(b)){ sb.appendCodePoint(b); b = readByte(); }
return sb.toString();
}
public String String () { return next(); }
public char Char () { return next().charAt(0);}
public int Int () { return Integer.parseInt(next());}
public long Long () { return Long.parseLong(next());}
public double Double () { return Double.parseDouble(next());}
public String[] StringArr (final int n) { final String[] arr = new String[n]; for(int i = 0; i < n; ++i) arr[i] = String(); return arr; }
public char [] CharArr (final int n) { final char [] arr = new char [n]; for(int i = 0; i < n; ++i) arr[i] = Char (); return arr; }
public int [] IntArr (final int n) { final int [] arr = new int [n]; for(int i = 0; i < n; ++i) arr[i] = Int (); return arr; }
public long [] LongArr (final int n) { final long [] arr = new long [n]; for(int i = 0; i < n; ++i) arr[i] = Long (); return arr; }
public double[] DoubleArr (final int n) { final double[] arr = new double[n]; for(int i = 0; i < n; ++i) arr[i] = Double(); return arr; }
} | [
"kwnafi@yahoo.com"
] | kwnafi@yahoo.com |
b83dbfc69d2cb90a7cb6f3eff4f95ae93ef160ad | cf7278e9f104cbbbfaef4ec5ffac86e60a02e727 | /src/main/java/ar/gob/gcba/dgisis/mapa360/client/UserFeignClientInterceptor.java | f61b2791b2e70bd35dbcfdeca7278595906e7073 | [] | no_license | scarabetta/mapa360 | 019a8319b2bc243731b7f1c447e901e85822879d | a1b4252edecccfefcf8227cb92dce8c4cff7ec99 | refs/heads/master | 2020-03-12T07:43:35.824417 | 2018-04-21T21:09:16 | 2018-04-21T21:09:16 | 130,512,243 | 0 | 0 | null | 2023-04-27T12:08:59 | 2018-04-21T21:09:14 | Java | UTF-8 | Java | false | false | 1,244 | java | package ar.gob.gcba.dgisis.mapa360.client;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.context.SecurityContext;
import org.springframework.security.core.context.SecurityContextHolder;
import org.springframework.security.oauth2.provider.authentication.OAuth2AuthenticationDetails;
import org.springframework.stereotype.Component;
import feign.RequestInterceptor;
import feign.RequestTemplate;
@Component
public class UserFeignClientInterceptor implements RequestInterceptor{
private static final String AUTHORIZATION_HEADER = "Authorization";
private static final String BEARER_TOKEN_TYPE = "Bearer";
@Override
public void apply(RequestTemplate template) {
SecurityContext securityContext = SecurityContextHolder.getContext();
Authentication authentication = securityContext.getAuthentication();
if (authentication != null && authentication.getDetails() instanceof OAuth2AuthenticationDetails) {
OAuth2AuthenticationDetails details = (OAuth2AuthenticationDetails) authentication.getDetails();
template.header(AUTHORIZATION_HEADER, String.format("%s %s", BEARER_TOKEN_TYPE, details.getTokenValue()));
}
}
}
| [
"jhipster-bot@users.noreply.github.com"
] | jhipster-bot@users.noreply.github.com |
20785aa89d8a5cb74293078c3855323b13f72fb5 | f8d31528e4dca2a6340b434bffd5ba6a2cacafcd | /jdk7src/src/main/java/org/omg/PortableServer/Current.java | 44df0887f8ee243383eaf96d0afd17c39c5f1e7a | [] | no_license | uptonking/jdksrc | 1871ad9c312845f6873d741db2f13837f046232d | d628a733240986c59d96185acef84283e1b5aff5 | refs/heads/master | 2021-09-15T00:10:18.103059 | 2018-03-03T12:31:24 | 2018-03-03T12:31:24 | 109,384,307 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,284 | java | package org.omg.PortableServer;
/**
* org/omg/PortableServer/Current.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from ../../../../src/share/classes/org/omg/PortableServer/poa.idl
* Monday, February 13, 2017 3:20:12 PM UTC
*/
/**
* The PortableServer::Current interface, derived from
* CORBA::Current, provides method implementations with
* access to the identity of the object on which the
* method was invoked. The Current interface is provided
* to support servants that implement multiple objects,
* but can be used within the context of POA-dispatched
* method invocations on any servant. To provide location
* transparency, ORBs are required to support use of
* Current in the context of both locally and remotely
* invoked operations. An instance of Current can be
* obtained by the application by issuing the
* CORBA::ORB::resolve_initial_references("POACurrent")
* operation. Thereafter, it can be used within the
* context of a method dispatched by the POA to obtain
* the POA and ObjectId that identify the object on
* which that operation was invoked.
*/
public interface Current extends CurrentOperations, org.omg.CORBA.Current, org.omg.CORBA.portable.IDLEntity
{
} // interface Current
| [
"jinyaoo86@gmail.com"
] | jinyaoo86@gmail.com |
ad4444c41f1c11fed745641f6bc7b97a08d2e804 | 908019e70ee5d5082818949080ec42ef24ff9230 | /bdap-engine/src/main/java/etl/telecom/NanpaCode.java | 2cdde2a2e89ed65ca09dd7f6703c3e1d578d264e | [] | no_license | harssion/log.analysis | 0806ea3249889b6a3372e5c796b81447669a6a26 | 58f2ef4e9fe450d17df36287bf601f77d9b54218 | refs/heads/master | 2020-12-24T05:47:21.595131 | 2016-11-09T18:59:22 | 2016-11-09T18:59:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,115 | java | package etl.telecom;
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.HashSet;
import java.util.Set;
//log4j2
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class NanpaCode {
public static final Logger logger = LogManager.getLogger(NanpaCode.class);
private static final String nanpa_file ="allutlzd.txt";
private static Set<String> ccSet = new HashSet<String>();
public NanpaCode(){
init(nanpa_file);
}
public void init(String fileName){
BufferedReader br=null;
String line;
try {
br = new BufferedReader(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream(fileName)));
while ((line = br.readLine()) != null) {
if (!line.startsWith("#")){
String[] vals = line.split("\t");
ccSet.add(vals[1]);
}
}
}catch (Exception e){
logger.error("", e);
}finally{
try {
br.close();
}catch(Exception e){
logger.error("", e);
}
}
}
public boolean hasNanpa(String code){
return ccSet.contains(code);
}
}
| [
"phillipchengyi@gmail.com"
] | phillipchengyi@gmail.com |
a60344d6d62983851452df3f5718e5a7b2a4f2ac | 5b2c309c903625b14991568c442eb3a889762c71 | /classes/com/sleepycat/b/i/e/az.java | e89f689f6cabcdeb8ea56d9162e2f3d7a2588a14 | [] | no_license | iidioter/xueqiu | c71eb4bcc53480770b9abe20c180da693b2d7946 | a7d8d7dfbaf9e603f72890cf861ed494099f5a80 | refs/heads/master | 2020-12-14T23:55:07.246659 | 2016-10-08T08:56:27 | 2016-10-08T08:56:27 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,829 | java | package com.sleepycat.b.i.e;
import com.sleepycat.b.aa;
import com.sleepycat.b.c.ad;
import com.sleepycat.b.g.a.m;
import com.sleepycat.b.g.ae;
import com.sleepycat.b.g.af;
import com.sleepycat.b.g.am;
import com.sleepycat.b.g.u;
import com.sleepycat.b.h.a;
import com.sleepycat.b.i.i.f;
import com.sleepycat.b.n.ah;
import com.sleepycat.b.p.aq;
import com.sleepycat.b.p.au;
import com.sleepycat.b.p.w;
import java.nio.ByteBuffer;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
public class az
extends bb
{
boolean a;
final Logger b;
private final m x = af.t.b();
private final m y = af.q.b();
private final q z;
static
{
if (!az.class.desiredAssertionStatus()) {}
for (boolean bool = true;; bool = false)
{
c = bool;
return;
}
}
public az(ad paramad, f paramf, long paramLong1, int paramInt, au paramau, long paramLong2, q paramq)
{
super(paramad, paramf, false, paramLong1, paramInt, paramLong2);
if (paramau.a(au.a)) {
throw aa.c("ReplicaSyncupReader start can't be NULL_VLSN");
}
this.o = paramLong1;
if ((!c) && (this.o == -1L)) {
throw new AssertionError();
}
this.e.w.a();
this.g.a(this.o);
this.l = this.g.c;
this.m = this.g.c;
this.t = paramau;
this.z = paramq;
this.b = w.a(getClass());
}
protected final void a(long paramLong)
{
ba localba = new ba(this.g.a, paramLong, this.t);
w.c(this.b, this.e, localba.getMessage());
throw localba;
}
protected final boolean a()
{
if (this.b.isLoggable(Level.FINEST)) {
w.e(this.b, this.e, " isTargetEntry " + this.k);
}
this.v += 1L;
if (this.k.i) {}
byte b1;
do
{
return false;
b1 = this.k.b;
if (g())
{
if (!this.a) {
break;
}
if (af.d(b1)) {
return true;
}
this.t = this.k.e.e();
}
} while (!af.t.c(b1));
return true;
return true;
}
protected final boolean a(ByteBuffer paramByteBuffer)
{
if (this.b.isLoggable(Level.FINEST)) {
w.e(this.b, this.e, " syncup reader saw " + this.k);
}
byte b1 = this.k.b;
if (af.t.c(b1))
{
this.x.a(this.e, this.k, paramByteBuffer);
if (this.b.isLoggable(Level.FINEST)) {
w.e(this.b, this.e, " syncup reader read " + this.k + this.x);
}
if (((a)this.x.h()).m) {
this.z.b = true;
}
return false;
}
Object localObject1 = paramByteBuffer.slice();
((ByteBuffer)localObject1).limit(this.k.d);
this.u = new s(this.e, this.k, (ByteBuffer)localObject1);
if (af.q.c(b1))
{
this.y.a(this.e, this.k, paramByteBuffer);
Object localObject2 = (ah)this.y.h();
paramByteBuffer = this.z;
localObject1 = ((ah)localObject2).e();
long l1 = ((ah)localObject2).d();
localObject2 = this.k.e;
long l2 = c();
paramByteBuffer.h += 1;
if (paramByteBuffer.f != null) {
paramByteBuffer.g = paramByteBuffer.f;
}
paramByteBuffer.f = new r((aq)localObject1, l1, (au)localObject2, l2);
if (paramByteBuffer.h <= paramByteBuffer.e) {
paramByteBuffer.d.add(paramByteBuffer.f);
}
if (this.b.isLoggable(Level.FINEST)) {
w.e(this.b, this.e, "syncup reader read " + this.k + this.y);
}
}
while (this.a)
{
return true;
paramByteBuffer.position(paramByteBuffer.position() + this.k.d);
}
int i = this.k.e.b(this.t);
if (i < 0) {
throw aa.c("want to read " + this.t + " but reader at " + this.k.e);
}
return i == 0;
}
}
/* Location: E:\apk\xueqiu2\classes-dex2jar.jar!\com\sleepycat\b\i\e\az.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1776098770@qq.com"
] | 1776098770@qq.com |
3efd14a8dde4d9255d81f2a544c0cc30c628ff56 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_5025.java | d370c7ac6fec2bddd6c72f020c057367951b84d9 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 467 | java | private void notifyDownloadStateChange(DownloadState downloadState){
onDownloadStateChanged(downloadState);
if (foregroundNotificationUpdater != null) {
if (downloadState.state == DownloadState.STATE_DOWNLOADING || downloadState.state == DownloadState.STATE_REMOVING || downloadState.state == DownloadState.STATE_RESTARTING) {
foregroundNotificationUpdater.startPeriodicUpdates();
}
else {
foregroundNotificationUpdater.update();
}
}
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
ca2e52b7f0722291d34555d112f9348f591a9e2e | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Jsoup-92/org.jsoup.parser.ParseSettings/default/2/org/jsoup/parser/ParseSettings_ESTest_scaffolding.java | 95d6dd90b8dd025434bd3f21fd94449a9d33f2db | [
"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 | 7,025 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Fri Jul 30 07:52:53 GMT 2021
*/
package org.jsoup.parser;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
@EvoSuiteClassExclude
public class ParseSettings_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "org.jsoup.parser.ParseSettings";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/experiment");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(ParseSettings_ESTest_scaffolding.class.getClassLoader() ,
"org.jsoup.internal.StringUtil",
"org.jsoup.select.NodeVisitor",
"org.jsoup.nodes.Document$QuirksMode",
"org.jsoup.nodes.Attributes",
"org.jsoup.select.Evaluator$IndexLessThan",
"org.jsoup.nodes.TextNode",
"org.jsoup.select.Evaluator$AttributeWithValue",
"org.jsoup.select.Evaluator$AttributeWithValueStarting",
"org.jsoup.select.Evaluator$AttributeWithValueNot",
"org.jsoup.nodes.Entities$EscapeMode",
"org.jsoup.select.Evaluator$IndexGreaterThan",
"org.jsoup.nodes.BooleanAttribute",
"org.jsoup.nodes.LeafNode",
"org.jsoup.select.Evaluator$IndexEvaluator",
"org.jsoup.select.Evaluator$AttributeWithValueMatching",
"org.jsoup.select.Evaluator$Matches",
"org.jsoup.SerializationException",
"org.jsoup.nodes.Document$OutputSettings",
"org.jsoup.select.Evaluator$AttributeWithValueEnding",
"org.jsoup.select.Evaluator$ContainsText",
"org.jsoup.nodes.EntitiesData",
"org.jsoup.nodes.Element",
"org.jsoup.select.Evaluator",
"org.jsoup.select.Evaluator$Id",
"org.jsoup.internal.Normalizer",
"org.jsoup.select.Evaluator$Class",
"org.jsoup.select.Evaluator$IndexEquals",
"org.jsoup.UncheckedIOException",
"org.jsoup.helper.Validate",
"org.jsoup.parser.ParseSettings",
"org.jsoup.select.Evaluator$AttributeKeyPair",
"org.jsoup.select.Evaluator$MatchesOwn",
"org.jsoup.nodes.XmlDeclaration",
"org.jsoup.parser.Tag",
"org.jsoup.nodes.Node",
"org.jsoup.select.Evaluator$Attribute",
"org.jsoup.nodes.Attribute",
"org.jsoup.parser.CharacterReader",
"org.jsoup.nodes.Document",
"org.jsoup.select.Evaluator$AttributeStarting",
"org.jsoup.select.Evaluator$Tag",
"org.jsoup.select.Evaluator$ContainsOwnText",
"org.jsoup.nodes.Entities",
"org.jsoup.select.Evaluator$AttributeWithValueContaining",
"org.jsoup.nodes.Document$OutputSettings$Syntax",
"org.jsoup.select.Evaluator$AllElements"
);
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(ParseSettings_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"org.jsoup.parser.ParseSettings",
"org.jsoup.nodes.Attributes",
"org.jsoup.internal.StringUtil",
"org.jsoup.nodes.Node",
"org.jsoup.nodes.Element",
"org.jsoup.nodes.Document",
"org.jsoup.internal.Normalizer",
"org.jsoup.helper.Validate",
"org.jsoup.parser.Tag",
"org.jsoup.nodes.Document$OutputSettings",
"org.jsoup.nodes.EntitiesData",
"org.jsoup.nodes.Document$OutputSettings$Syntax",
"org.jsoup.nodes.Entities",
"org.jsoup.parser.CharacterReader",
"org.jsoup.nodes.Entities$EscapeMode",
"org.jsoup.nodes.Document$QuirksMode",
"org.jsoup.nodes.Attributes$1",
"org.jsoup.nodes.Attribute",
"org.jsoup.parser.Parser",
"org.jsoup.parser.Tokeniser",
"org.jsoup.parser.ParseErrorList",
"org.jsoup.parser.TokeniserState",
"org.jsoup.parser.Token",
"org.jsoup.parser.Token$Tag",
"org.jsoup.parser.Token$StartTag",
"org.jsoup.parser.Token$TokenType",
"org.jsoup.parser.Token$EndTag",
"org.jsoup.parser.Token$Character",
"org.jsoup.parser.Token$Doctype",
"org.jsoup.parser.Token$Comment",
"org.jsoup.nodes.Attributes$Dataset",
"org.jsoup.nodes.Entities$CoreCharset",
"org.jsoup.nodes.Entities$1",
"org.jsoup.nodes.BooleanAttribute"
);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
d1916c42fae718904602d27f0e61d4ed4cafe6da | ae5eb1a38b4d22c82dfd67c86db73592094edc4b | /project194/src/main/java/org/gradle/test/performance/largejavamultiproject/project194/p971/Production19433.java | 4f4d044ded9e138b980cf88ae7f6ec1799852d2c | [] | no_license | big-guy/largeJavaMultiProject | 405cc7f55301e1fd87cee5878a165ec5d4a071aa | 1cd6a3f9c59e9b13dffa35ad27d911114f253c33 | refs/heads/main | 2023-03-17T10:59:53.226128 | 2021-03-04T01:01:39 | 2021-03-04T01:01:39 | 344,307,977 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,970 | java | package org.gradle.test.performance.largejavamultiproject.project194.p971;
public class Production19433 {
private Production19430 property0;
public Production19430 getProperty0() {
return property0;
}
public void setProperty0(Production19430 value) {
property0 = value;
}
private Production19431 property1;
public Production19431 getProperty1() {
return property1;
}
public void setProperty1(Production19431 value) {
property1 = value;
}
private Production19432 property2;
public Production19432 getProperty2() {
return property2;
}
public void setProperty2(Production19432 value) {
property2 = value;
}
private String property3;
public String getProperty3() {
return property3;
}
public void setProperty3(String value) {
property3 = value;
}
private String property4;
public String getProperty4() {
return property4;
}
public void setProperty4(String value) {
property4 = value;
}
private String property5;
public String getProperty5() {
return property5;
}
public void setProperty5(String value) {
property5 = value;
}
private String property6;
public String getProperty6() {
return property6;
}
public void setProperty6(String value) {
property6 = value;
}
private String property7;
public String getProperty7() {
return property7;
}
public void setProperty7(String value) {
property7 = value;
}
private String property8;
public String getProperty8() {
return property8;
}
public void setProperty8(String value) {
property8 = value;
}
private String property9;
public String getProperty9() {
return property9;
}
public void setProperty9(String value) {
property9 = value;
}
} | [
"sterling.greene@gmail.com"
] | sterling.greene@gmail.com |
8d565b2f340e63fe33c01088eb54ec6936e7bf17 | bb85a06d3fff8631f5dca31a55831cd48f747f1f | /src/main/business/com/goisan/logistics/dormmanage/bean/DormManage.java | d2e224134e59b161d68d32a544157674a939545f | [] | no_license | lqj12267488/Gemini | 01e2328600d0dfcb25d1880e82c30f6c36d72bc9 | e1677dc1006a146e60929f02dba0213f21c97485 | refs/heads/master | 2022-12-23T10:55:38.115096 | 2019-12-05T01:51:26 | 2019-12-05T01:51:26 | 229,698,706 | 0 | 0 | null | 2022-12-16T11:36:09 | 2019-12-23T07:20:16 | Java | UTF-8 | Java | false | false | 4,307 | java | package com.goisan.logistics.dormmanage.bean;
import com.goisan.system.bean.BaseBean;
/**
* Created by Administrator on 2017/9/25.
*/
public class DormManage extends BaseBean {
private String dormName;
private String dormitoryId;
private String studentName;
private String studentId;
private String teacherName;
private String teacherId;
private String departmentsName;
private String deparmentsId;
private String majorCodeName;
private String majorCodeId;
private String className;
private String classId;
private String problemTime;
private String startTime;
private String endTime;
private String buildingName;
private String manageId;
private String remark;
private String buildingId;
private String dormManageType;
public String getStartTime() {
return startTime;
}
public void setStartTime(String startTime) {
this.startTime = startTime;
}
public String getEndTime() {
return endTime;
}
public void setEndTime(String endTime) {
this.endTime = endTime;
}
public String getDormManageType() {
return dormManageType;
}
public void setDormManageType(String dormManageType) {
this.dormManageType = dormManageType;
}
public String getBuildingId() {
return buildingId;
}
public void setBuildingId(String buildingId) {
this.buildingId = buildingId;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getManageId() {
return manageId;
}
public void setManageId(String manageId) {
this.manageId = manageId;
}
public String getDormitoryId() {
return dormitoryId;
}
public void setDormitoryId(String dormitoryId) {
this.dormitoryId = dormitoryId;
}
public String getBuildingName() {
return buildingName;
}
public void setBuildingName(String buildingName) {
this.buildingName = buildingName;
}
public String getDormName() {
return dormName;
}
public void setDormName(String dormName) {
this.dormName = dormName;
}
public String getDormId() {
return dormitoryId;
}
public void setDormId(String dormitoryId) {
this.dormitoryId = dormitoryId;
}
public String getStudentName() {
return studentName;
}
public void setStudentName(String studentName) {
this.studentName = studentName;
}
public String getStudentId() {
return studentId;
}
public void setStudentId(String studentId) {
this.studentId = studentId;
}
public String getTeacherName() {
return teacherName;
}
public void setTeacherName(String teacherName) {
this.teacherName = teacherName;
}
public String getTeacherId() {
return teacherId;
}
public void setTeacherId(String teacherId) {
this.teacherId = teacherId;
}
public String getDepartmentsName() {
return departmentsName;
}
public void setDepartmentsName(String departmentsName) {
this.departmentsName = departmentsName;
}
public String getDeparmentsId() {
return deparmentsId;
}
public void setDeparmentsId(String deparmentsId) {
this.deparmentsId = deparmentsId;
}
public String getMajorCodeName() {
return majorCodeName;
}
public void setMajorCodeName(String majorCodeName) {
this.majorCodeName = majorCodeName;
}
public String getMajorCodeId() {
return majorCodeId;
}
public void setMajorCodeId(String majorCodeId) {
this.majorCodeId = majorCodeId;
}
public String getClassName() {
return className;
}
public void setClassName(String className) {
this.className = className;
}
public String getClassId() {
return classId;
}
public void setClassId(String classId) {
this.classId = classId;
}
public String getProblemTime() {
return problemTime;
}
public void setProblemTime(String problemTime) {
this.problemTime = problemTime;
}
}
| [
"1240414272"
] | 1240414272 |
d78ba44172b431c25f872a0ce3cfc315538894ff | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/22/22_d09b1cae37bf8ae039a23f7ca7507e91d1633884/Main/22_d09b1cae37bf8ae039a23f7ca7507e91d1633884_Main_t.java | 1bb7a4edec23ad6369c18dc76fe898a02247b4bc | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 5,374 | java | package com.batesmaster;
import java.io.File;
import java.io.IOException;
import static java.util.Arrays.*;
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
/**
* main program class.
* @author Mark Manoukian
* @author Gregory Pruden
* @version 0.1
*
*/
public class Main {
static OptionParser cmdline;
static OptionSpec<Integer> seed;
static OptionSpec<Integer> xoff;
static OptionSpec<Integer> yoff;
/**
* command line interface
*/
public static void main(String[] args)
{
//print header
header();
//create command line interface
cmdlines();
//parse command line
OptionSet options = null;
try
{
options = cmdline.parse(args);
}
catch (joptsimple.OptionException ex)
{
usage(ex.getMessage());
System.exit(1);
}
//check for usage request
if (options.has("help")||options.has("?"))
{
usage("Visit http://batesmaster.com for more info!\n",0);
System.exit(0);
}
//check input file
if (!options.has("inpdf") || !options.hasArgument("inpdf"))
{
//require input file
usage("Invalid arguments. An input file is required.");
System.exit(1);
}
//create instance of bater class
batesStamper bater = new batesStamper();
//set properties
//set input file
bater.setInputFileName(options.valuesOf("inpdf").toString().substring(1, options.valuesOf("inpdf").toString().length()-1 ));
if (! new File(bater.inputFileName).exists())
{
//check that the input file exists
usage("Input file does not exist.");
System.exit(1);
}
//set output file
if (options.has("pdfout"))
{
bater.setOutputFileName(options.valuesOf("pdfout").toString().substring(1, options.valuesOf("pdfout").toString().length()-1 ));
}
//check that the output file doesn't exist
if (new File(bater.outputFileName).exists() && !options.has("overwrite") )
{
usage("Output file exists. Please enter a different output file.");
System.exit(1);
}
else
{
File outfile = new File(bater.outputFileName);
if (outfile.exists() && options.has("overwrite"))
outfile.delete();
}
//set seed
if (options.has(seed))
bater.setSeed(seed.value(options));
//set offsets
if (options.has(xoff))
bater.setOffsetx(xoff.value(options));
if (options.has(yoff))
bater.setOffsety(yoff.value(options));
//set format
if (options.has("format"))
bater.setFormat((String)options.valueOf("format"));
//stamp away
if (bater.ProcessDoc())
{
System.out.println("Document successfully mastered.");
//done
System.exit(0);
}
else
{
System.out.println("problems occured document may not be mastered.");
//done
System.exit(0);
}
}
private static void usage(String string, int i) {
if (i==0)
{
// just print without error
System.out.println(string);
}
usage();
}
/**
* print the usage statement
* @param err add an optional error.
*/
public static void usage(String err)
{
System.out.println("Error: "+err);
usage();
}
/**
* print the usage statement.
*/
public static void usage()
{
System.out.println("usage:");
try {
cmdline.printHelpOn(System.out);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
System.exit(1);
}
}
/**
* print the header statement.
*/
public static void header()
{
System.out.println("batesmaster - pdf bates stamper");
System.out.println("--------------------------------------------------------");
System.out.println("batesmaster is Open Source software licensed under GPLv3");
System.out.println("so far written by Mark Manoukian and Gregory Pruden");
System.out.println("");
}
/**
* setup the command line options
*/
public static void cmdlines()
{
//define all program options for command line interface
cmdline = new OptionParser();
cmdline.acceptsAll(asList("overwrite"),"output file name for bates stamped pdf");
cmdline.acceptsAll(asList("help", "?"),"output file name for bates stamped pdf");
seed = cmdline.acceptsAll(asList("seed","startnum"),"set begining bates number, default: 1").withRequiredArg().ofType( Integer.class ).describedAs("new number");
xoff = cmdline.acceptsAll(asList("xoffset"),"offset location from left of page, default: 10").withRequiredArg().ofType( Integer.class ).describedAs("offset in pixels");
yoff = cmdline.acceptsAll(asList("yoffset"),"offset location from bottom of page, default: 10").withRequiredArg().ofType( Integer.class ).describedAs("offset in pixels");
cmdline.acceptsAll(asList("format"),"advanced java style format string for bastes number, default: %05d ").withRequiredArg().ofType( String.class ).describedAs("format string");
cmdline.acceptsAll(asList("inpdf"),"REQUIRED pdf file to add bates stamps").withRequiredArg().ofType( String.class ).describedAs("file name");
cmdline.acceptsAll(asList("pdfout"),"output file name for bates stamped pdf").withRequiredArg().ofType( String.class ).describedAs("file name");
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
015d45903de2e4e2868370d74b5e26f25a673a44 | 52b923ac7775c62f1622976516922cbfd1093d71 | /aws-java-sdk-codepipeline/src/main/java/com/amazonaws/service/codepipeline/model/StageDeclaration.java | 806fc13b26ada679309dcdfa79272a011f7684fa | [
"Apache-2.0",
"JSON"
] | permissive | jobinmarygeorge/aws-sdk-java | ea46c70ee89e2eb0ea43c5b3d81bf6449e48db6e | ca64992cf428932800e086a627e42a32b76095a1 | refs/heads/master | 2020-05-29T11:53:45.146416 | 2015-07-09T16:34:29 | 2015-07-09T16:34:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,777 | java | /*
* Copyright 2010-2015 Amazon.com, Inc. or its affiliates. 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.
* A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file 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.amazonaws.service.codepipeline.model;
import java.io.Serializable;
/**
* <p>
* Represents information about a stage and its definition.
* </p>
*/
public class StageDeclaration implements Serializable, Cloneable {
/**
* <p>
* The name of the stage.
* </p>
*/
private String name;
/**
* <p>
* The gates included in a stage.
* </p>
*/
private java.util.List<BlockerDeclaration> blockers;
/**
* <p>
* The actions included in a stage.
* </p>
*/
private java.util.List<ActionDeclaration> actions;
/**
* <p>
* The name of the stage.
* </p>
*
* @param name
* The name of the stage.
*/
public void setName(String name) {
this.name = name;
}
/**
* <p>
* The name of the stage.
* </p>
*
* @return The name of the stage.
*/
public String getName() {
return this.name;
}
/**
* <p>
* The name of the stage.
* </p>
*
* @param name
* The name of the stage.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public StageDeclaration withName(String name) {
setName(name);
return this;
}
/**
* <p>
* The gates included in a stage.
* </p>
*
* @return The gates included in a stage.
*/
public java.util.List<BlockerDeclaration> getBlockers() {
return blockers;
}
/**
* <p>
* The gates included in a stage.
* </p>
*
* @param blockers
* The gates included in a stage.
*/
public void setBlockers(java.util.Collection<BlockerDeclaration> blockers) {
if (blockers == null) {
this.blockers = null;
return;
}
this.blockers = new java.util.ArrayList<BlockerDeclaration>(blockers);
}
/**
* <p>
* The gates included in a stage.
* </p>
*
* @param blockers
* The gates included in a stage.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public StageDeclaration withBlockers(BlockerDeclaration... blockers) {
if (this.blockers == null) {
setBlockers(new java.util.ArrayList<BlockerDeclaration>(
blockers.length));
}
for (BlockerDeclaration ele : blockers) {
this.blockers.add(ele);
}
return this;
}
/**
* <p>
* The gates included in a stage.
* </p>
*
* @param blockers
* The gates included in a stage.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public StageDeclaration withBlockers(
java.util.Collection<BlockerDeclaration> blockers) {
setBlockers(blockers);
return this;
}
/**
* <p>
* The actions included in a stage.
* </p>
*
* @return The actions included in a stage.
*/
public java.util.List<ActionDeclaration> getActions() {
return actions;
}
/**
* <p>
* The actions included in a stage.
* </p>
*
* @param actions
* The actions included in a stage.
*/
public void setActions(java.util.Collection<ActionDeclaration> actions) {
if (actions == null) {
this.actions = null;
return;
}
this.actions = new java.util.ArrayList<ActionDeclaration>(actions);
}
/**
* <p>
* The actions included in a stage.
* </p>
*
* @param actions
* The actions included in a stage.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public StageDeclaration withActions(ActionDeclaration... actions) {
if (this.actions == null) {
setActions(new java.util.ArrayList<ActionDeclaration>(
actions.length));
}
for (ActionDeclaration ele : actions) {
this.actions.add(ele);
}
return this;
}
/**
* <p>
* The actions included in a stage.
* </p>
*
* @param actions
* The actions included in a stage.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public StageDeclaration withActions(
java.util.Collection<ActionDeclaration> actions) {
setActions(actions);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getName() != null)
sb.append("Name: " + getName() + ",");
if (getBlockers() != null)
sb.append("Blockers: " + getBlockers() + ",");
if (getActions() != null)
sb.append("Actions: " + getActions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof StageDeclaration == false)
return false;
StageDeclaration other = (StageDeclaration) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null
&& other.getName().equals(this.getName()) == false)
return false;
if (other.getBlockers() == null ^ this.getBlockers() == null)
return false;
if (other.getBlockers() != null
&& other.getBlockers().equals(this.getBlockers()) == false)
return false;
if (other.getActions() == null ^ this.getActions() == null)
return false;
if (other.getActions() != null
&& other.getActions().equals(this.getActions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode
+ ((getBlockers() == null) ? 0 : getBlockers().hashCode());
hashCode = prime * hashCode
+ ((getActions() == null) ? 0 : getActions().hashCode());
return hashCode;
}
@Override
public StageDeclaration clone() {
try {
return (StageDeclaration) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
} | [
"aws@amazon.com"
] | aws@amazon.com |
21912c802d4b8fc196d0692792fc54e81fe53c3f | 9eaf39b550a4859cb41ce30ace635e366d4c311d | /src/main/java/org/docksidestage/remote/fortress/wx/routing/restlike/lmlike/index/RemoteWxRoutingRestlikeLmlikeReturn.java | 99f2763211224bdb16b8067bf5d9193e406e1f87 | [
"Apache-2.0"
] | permissive | dbflute-example/dbflute-example-with-remoteapi-gen | 22590ea920dbb14ffc03f1ee7b315d323d9640df | 59ec12d82fb3b00399c4fb061dc9a1713f4a769a | refs/heads/develop | 2023-06-25T20:51:20.126779 | 2023-06-10T11:36:55 | 2023-06-10T11:36:55 | 230,874,598 | 1 | 0 | Apache-2.0 | 2023-06-10T11:36:56 | 2019-12-30T08:04:22 | Java | UTF-8 | Java | false | false | 1,332 | java | /*
* Copyright 2017-2021 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
* either express or implied. See the License for the specific language
* governing permissions and limitations under the License.
*/
package org.docksidestage.remote.fortress.wx.routing.restlike.lmlike.index;
import org.lastaflute.core.util.Lato;
/**
* The bean class as return for remote API of GET /wx/routing/restlike/lmlike/{memberStatus}.
* @author FreeGen
*/
public class RemoteWxRoutingRestlikeLmlikeReturn extends org.docksidestage.bizfw.remoteapi.AbstractListGetReturn {
/** The property of method. (NullAllowed) */
public String method;
/** The property of first. (NullAllowed) */
public java.util.Map<String, Object> first;
/** The property of second. (NullAllowed) */
public java.util.Map<String, Object> second;
@Override
public String toString() {
return Lato.string(this);
}
}
| [
"p1us3inus2er0@gmail.com"
] | p1us3inus2er0@gmail.com |
ca020f02f4f0f434d1d4e1421909a2f4daa7906b | 6240a87133481874e293b36a93fdb64ca1f2106c | /taobao/src/com/taobao/api/request/SimbaAdgroupCampcatmatchsGetRequest.java | 0ddb651c775e62f26e87b0107d22289841f6cc53 | [] | no_license | mrzeng/comments-monitor | 596ba8822d70f8debb630f40b548f62d0ad48bd4 | 1451ec9c14829c7dc29a2297a6f3d6c4e490dc13 | refs/heads/master | 2021-01-15T08:58:05.997787 | 2013-07-17T16:29:23 | 2013-07-17T16:29:23 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,624 | java | package com.taobao.api.request;
import com.taobao.api.internal.util.RequestCheckUtils;
import java.util.Map;
import com.taobao.api.TaobaoRequest;
import com.taobao.api.internal.util.TaobaoHashMap;
import com.taobao.api.response.SimbaAdgroupCampcatmatchsGetResponse;
import com.taobao.api.ApiRuleException;
/**
* TOP API: taobao.simba.adgroup.campcatmatchs.get request
*
* @author auto create
* @since 1.0, 2013-06-13 12:33:20
*/
public class SimbaAdgroupCampcatmatchsGetRequest implements TaobaoRequest<SimbaAdgroupCampcatmatchsGetResponse> {
private TaobaoHashMap udfParams; // add user-defined text parameters
private Long timestamp;
/**
* 推广计划Id
*/
private Long campaignId;
/**
* 主人昵称
*/
private String nick;
/**
* 页码,从1开始
*/
private Long pageNo;
/**
* 页尺寸,最大200
*/
private Long pageSize;
public void setCampaignId(Long campaignId) {
this.campaignId = campaignId;
}
public Long getCampaignId() {
return this.campaignId;
}
public void setNick(String nick) {
this.nick = nick;
}
public String getNick() {
return this.nick;
}
public void setPageNo(Long pageNo) {
this.pageNo = pageNo;
}
public Long getPageNo() {
return this.pageNo;
}
public void setPageSize(Long pageSize) {
this.pageSize = pageSize;
}
public Long getPageSize() {
return this.pageSize;
}
private Map<String,String> headerMap=new TaobaoHashMap();
public Long getTimestamp() {
return this.timestamp;
}
public void setTimestamp(Long timestamp) {
this.timestamp = timestamp;
}
public String getApiMethodName() {
return "taobao.simba.adgroup.campcatmatchs.get";
}
public Map<String, String> getTextParams() {
TaobaoHashMap txtParams = new TaobaoHashMap();
txtParams.put("campaign_id", this.campaignId);
txtParams.put("nick", this.nick);
txtParams.put("page_no", this.pageNo);
txtParams.put("page_size", this.pageSize);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}
public void putOtherTextParam(String key, String value) {
if(this.udfParams == null) {
this.udfParams = new TaobaoHashMap();
}
this.udfParams.put(key, value);
}
public Class<SimbaAdgroupCampcatmatchsGetResponse> getResponseClass() {
return SimbaAdgroupCampcatmatchsGetResponse.class;
}
public void check() throws ApiRuleException {
RequestCheckUtils.checkNotEmpty(campaignId,"campaignId");
}
public Map<String,String> getHeaderMap() {
return headerMap;
}
}
| [
"qujian@gionee.com"
] | qujian@gionee.com |
890aafea58f9b721e36e6785c2c2850bf2430ca3 | 0917a6cefcc3c3d6766080e58e83cd027522d0a8 | /src/main/java/leetcode/DesignLinkedList.java | 115e3cfb7364398c2cf859fd764a8ac4107b5d56 | [] | no_license | lyk4411/untitled1_intellij | 19bb583c8e631c4fab5826573fe30a61dff9d2d4 | 7a3e9ff784faa03c04a40cfdc0ba53af3344bb09 | refs/heads/master | 2022-12-22T13:58:32.218291 | 2020-01-22T08:58:04 | 2020-01-22T08:58:04 | 62,300,156 | 0 | 0 | null | 2022-12-16T03:16:30 | 2016-06-30T09:56:05 | Java | UTF-8 | Java | false | false | 1,447 | java | package leetcode;
/**
* Created by lyk on 2018-7-16.
* Package name: leetcode
* Porject name: untitled1
*/
public class DesignLinkedList {
final Node head = new Node(0), tail = new Node(0);
int len;
public DesignLinkedList() { head.next = tail;}
public int get(int i) {
if (i >= len) return -1;
Node node = findPrev(i);
return node.next.val;
}
public void addAtHead(int val) { addAtIndex(0, val);}
public void addAtTail(int val) { addAtIndex(len, val);}
public void addAtIndex(int i, int val) {
if (i > len) return;
Node prev = findPrev(i), next = prev.next;
prev.next = new Node(val);
prev.next.next = next;
len++;
}
public void deleteAtIndex(int i) {
if (i >= len) return;
Node prev = findPrev(i);
prev.next = prev.next.next;
len--;
}
Node findPrev(int i) {
Node node = head;
while (i-- > 0)
node = node.next;
return node;
}
class Node {
int val;
Node next;
Node(int val) {
this.val = val;
}
}
public static void main(String[] args) {
DesignLinkedList dll = new DesignLinkedList();
dll.addAtHead(1);
dll.addAtTail(3);
dll.addAtIndex(1, 2);
System.out.println(dll.get(1));
dll.deleteAtIndex(1);
System.out.println(dll.get(1));
}
}
| [
"moneyflying_2006@hotmail.com"
] | moneyflying_2006@hotmail.com |
0e56a387dd4c71678eec4b998f9e8d644d28fd5e | a2b699456c94eed6cc54bf8366d1fab91781aeca | /tianyan/tianyan-upms/tianyan-upms-biz/src/main/java/com/colourfulchina/tianyan/admin/service/SysRoleMenuService.java | ca1ec3cf9d8b354f9d5894db1124e365752c22d3 | [] | no_license | elephant5/old-code | 8a35aa17163e87f506c6f12da032b1978b0c4ec3 | bfb27297d5fcb6aaea8eac5a4032eba7d01cc7ee | refs/heads/master | 2023-01-24T12:25:53.549609 | 2020-12-04T01:50:15 | 2020-12-04T01:50:15 | 318,364,156 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 489 | java |
package com.colourfulchina.tianyan.admin.service;
import com.baomidou.mybatisplus.service.IService;
import com.colourfulchina.tianyan.admin.api.entity.SysRoleMenu;
/**
* <p>
* 角色菜单表 服务类
* </p>
*/
public interface SysRoleMenuService extends IService<SysRoleMenu> {
/**
* 更新角色菜单
*
* @param role
* @param roleId 角色
* @param menuIds 菜单列表
* @return
*/
Boolean insertRoleMenus(String role, Integer roleId, Integer[] menuIds);
}
| [
"ryan.wu@colourchina.com"
] | ryan.wu@colourchina.com |
fd70875da34c6dd83d7cc0e403cbbd7bedda2408 | 5ed7bb1199e72d1ce4e538080f3527c9315cc347 | /src/main/jbake/assets/docs/scribble/modules/core/src/main/java/org/scribble/del/global/GWrapDel.java | 340b98f65723af46f90c6f8a0c38065d7f6ca88c | [
"Apache-2.0"
] | permissive | scribble/scribble.github.io | e269a884f3b6ff877a79911f7f604ecabb265c22 | 7c8647be9784e9d1bab0ac4e7286b5122c24358c | refs/heads/pages | 2021-01-25T10:22:13.481828 | 2018-01-14T19:29:49 | 2018-01-14T19:29:49 | 3,661,659 | 5 | 2 | Apache-2.0 | 2018-01-14T19:29:50 | 2012-03-08T16:12:55 | Java | UTF-8 | Java | false | false | 2,419 | java | package org.scribble.del.global;
import org.scribble.ast.ScribNode;
import org.scribble.ast.global.GWrap;
import org.scribble.ast.local.LNode;
import org.scribble.del.ConnectionActionDel;
import org.scribble.main.ScribbleException;
import org.scribble.sesstype.name.Role;
import org.scribble.visit.context.Projector;
import org.scribble.visit.wf.NameDisambiguator;
import org.scribble.visit.wf.WFChoiceChecker;
import org.scribble.visit.wf.env.WFChoiceEnv;
// FIXME: make WrapDel (cf., G/LMessageTransferDel)
public class GWrapDel extends ConnectionActionDel implements GSimpleInteractionNodeDel
{
public GWrapDel()
{
}
@Override
public ScribNode leaveDisambiguation(ScribNode parent, ScribNode child, NameDisambiguator disamb, ScribNode visited) throws ScribbleException
{
GWrap gw = (GWrap) visited;
/*Role src = gw.src.toName();
Role dest = gw.dest.toName();*/
return gw;
}
@Override
public GWrap leaveInlinedWFChoiceCheck(ScribNode parent, ScribNode child, WFChoiceChecker checker, ScribNode visited) throws ScribbleException
{
GWrap gw = (GWrap) visited;
Role src = gw.src.toName();
Role dest = gw.dest.toName();
if (!checker.peekEnv().isEnabled(src))
{
throw new ScribbleException(gw.src.getSource(), "Role not enabled: " + src);
}
if (!checker.peekEnv().isEnabled(dest))
{
throw new ScribbleException(gw.dest.getSource(), "Role not enabled: " + dest);
}
//Message msg = gw.msg.toMessage(); // Unit message
if (src.equals(dest))
{
throw new ScribbleException(gw.getSource(), "[TODO] Self connections not supported: " + gw);
}
WFChoiceEnv env = checker.popEnv();
if (!env.isConnected(src, dest))
{
throw new ScribbleException(gw.getSource(), "Roles not (necessarily) connected: " + src + ", " + dest);
}
//env = env.addMessage(src, dest, msg);
/*env = env
.connect(src, dest)
.addMessage(src, dest, new MessageSig(Op.EMPTY_OPERATOR, Payload.EMPTY_PAYLOAD));*/
checker.pushEnv(env);
return gw;
}
@Override
public ScribNode leaveProjection(ScribNode parent, ScribNode child, Projector proj, ScribNode visited) throws ScribbleException //throws ScribbleException
{
GWrap gw = (GWrap) visited;
Role self = proj.peekSelf();
LNode projection = gw.project(self);
proj.pushEnv(proj.popEnv().setProjection(projection));
return (GWrap) GSimpleInteractionNodeDel.super.leaveProjection(parent, child, proj, gw);
}
}
| [
"raymond.hu@imperial.ac.uk"
] | raymond.hu@imperial.ac.uk |
820d046b497547aad3aeddefb72debcbe171bb0e | b6f05e13fe7040ab59deaddab23bc4e0c2b525a4 | /fiji-mapreduce/fiji-mapreduce/src/test/java/com/moz/fiji/mapreduce/testlib/IntegrationTestTableMapper.java | fa75d237dbc29ef93f0c82db8088b53d5567c03c | [
"Apache-2.0"
] | permissive | seomoz/fiji | a621b6d6db3a7731414f6ea7d2bc6fc5ee2d59ec | bed3b7d20770ab2c490b55f278cb4397937f61b6 | refs/heads/master | 2021-01-18T08:56:48.848846 | 2016-07-19T20:30:17 | 2016-07-19T20:30:17 | 53,540,389 | 1 | 0 | null | 2016-07-06T20:52:33 | 2016-03-09T23:47:08 | HTML | UTF-8 | Java | false | false | 7,614 | java | /**
* (c) Copyright 2013 WibiData, Inc.
*
* See the NOTICE file distributed with this work for additional
* information regarding copyright ownership.
*
* 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.moz.fiji.mapreduce.testlib;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.util.Collection;
import java.util.Map;
import java.util.Random;
import com.google.common.base.Preconditions;
import com.google.common.collect.Maps;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hbase.util.Bytes;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.moz.fiji.mapreduce.HFileLoader;
import com.moz.fiji.mapreduce.FijiMRTestLayouts;
import com.moz.fiji.mapreduce.FijiMapReduceJob;
import com.moz.fiji.mapreduce.gather.FijiGatherJobBuilder;
import com.moz.fiji.mapreduce.output.MapReduceJobOutputs;
import com.moz.fiji.schema.Fiji;
import com.moz.fiji.schema.FijiDataRequest;
import com.moz.fiji.schema.FijiDataRequestBuilder;
import com.moz.fiji.schema.FijiRowData;
import com.moz.fiji.schema.FijiRowScanner;
import com.moz.fiji.schema.FijiTable;
import com.moz.fiji.schema.FijiTableReader;
import com.moz.fiji.schema.FijiTableWriter;
import com.moz.fiji.schema.testutil.AbstractFijiIntegrationTest;
/** Tests bulk-importers. */
public class IntegrationTestTableMapper extends AbstractFijiIntegrationTest {
private static final Logger LOG = LoggerFactory.getLogger(IntegrationTestTableMapper.class);
private Configuration mConf = null;
private FileSystem mFS = null;
private Fiji mFiji = null;
private FijiTable mInputTable = null;
private FijiTable mOutputTable = null;
/**
* Generates a random HDFS path.
*
* @param prefix Prefix for the random file name.
* @return a random HDFS path.
* @throws Exception on error.
*/
private Path makeRandomPath(String prefix) throws Exception {
Preconditions.checkNotNull(mFS);
final Path base = new Path(FileSystem.getDefaultUri(mConf));
final Random random = new Random(System.nanoTime());
return new Path(base, String.format("/%s-%s", prefix, random.nextLong()));
}
/**
* Reads a table into a map from Fiji row keys to FijiRowData.
*
* @param table Fiji table to read from.
* @param kdr Fiji data request.
* @return a map of the rows.
* @throws Exception on error.
*/
private static Map<String, FijiRowData> toRowMap(FijiTable table, FijiDataRequest kdr)
throws Exception {
final FijiTableReader reader = table.openTableReader();
try {
final FijiRowScanner scanner = reader.getScanner(kdr);
try {
final Map<String, FijiRowData> rows = Maps.newHashMap();
for (FijiRowData row : scanner) {
rows.put(Bytes.toString((byte[]) row.getEntityId().getComponentByIndex(0)), row);
}
return rows;
} finally {
scanner.close();
}
} finally {
reader.close();
}
}
private void populateInputTable() throws Exception {
final FijiTable table = mInputTable;
final FijiTableWriter writer = table.openTableWriter();
writer.put(table.getEntityId("1"), "info", "first_name", "Marsellus");
writer.put(table.getEntityId("1"), "info", "last_name", "Wallace");
writer.put(table.getEntityId("1"), "info", "zip_code", 94110);
writer.put(table.getEntityId("2"), "info", "first_name", "Vincent");
writer.put(table.getEntityId("2"), "info", "last_name", "Vega");
writer.put(table.getEntityId("2"), "info", "zip_code", 94110);
writer.put(table.getEntityId("3"), "info", "first_name", "Jules");
writer.put(table.getEntityId("3"), "info", "last_name", "Winnfield");
writer.put(table.getEntityId("3"), "info", "zip_code", 93221);
writer.close();
}
@Before
public final void setupIntegrationTestTableMapper() throws Exception {
mConf = getConf();
mFS = FileSystem.get(mConf);
mFiji = Fiji.Factory.open(getFijiURI(), mConf);
final String inputTableName = "input";
final String outputTableName = "output";
mFiji.createTable(FijiMRTestLayouts.getTestLayout(inputTableName));
mFiji.createTable(FijiMRTestLayouts.getTestLayout(outputTableName));
mInputTable = mFiji.openTable(inputTableName);
mOutputTable = mFiji.openTable(outputTableName);
populateInputTable();
}
@After
public final void teardownIntegrationTestTableMapper() throws Exception {
mInputTable.release();
mOutputTable.release();
mFiji.release();
// NOTE: fs should get closed here, but doesn't because of a bug with FileSystem that
// causes it to close other thread's filesystem objects. For more information
// see: https://issues.apache.org/jira/browse/HADOOP-7973
mInputTable = null;
mOutputTable = null;
mFiji = null;
mFS = null;
mConf = null;
}
@Test
public void testSimpleTableMapperDirect() throws Exception {
final FijiMapReduceJob mrjob = FijiGatherJobBuilder.create()
.withConf(mConf)
.withGatherer(SimpleTableMapperAsGatherer.class)
.withInputTable(mInputTable.getURI())
.withOutput(MapReduceJobOutputs.newDirectFijiTableMapReduceJobOutput(mOutputTable.getURI()))
.build();
assertTrue(mrjob.run());
validateOutputTable();
}
@Test
public void testSimpleTableMapperHFiles() throws Exception {
final Path hfileDirPath = this.makeRandomPath("hfile-output");
try {
final FijiMapReduceJob mrjob = FijiGatherJobBuilder.create()
.withConf(mConf)
.withGatherer(SimpleTableMapperAsGatherer.class)
.withInputTable(mInputTable.getURI())
.withOutput(MapReduceJobOutputs.newHFileMapReduceJobOutput(
mOutputTable.getURI(), hfileDirPath, 1))
.build();
assertTrue(mrjob.run());
final HFileLoader loader = HFileLoader.create(mConf);
// There is only one reducer, hence one HFile shard:
final Path hfilePath = new Path(hfileDirPath, "part-r-00000.hfile");
loader.load(hfilePath, mOutputTable);
validateOutputTable();
} finally {
mFS.delete(hfileDirPath, true);
}
}
private void validateOutputTable() throws Exception {
final FijiDataRequestBuilder okdrb = FijiDataRequest.builder();
okdrb.newColumnsDef().withMaxVersions(3).addFamily("primitives");
final FijiDataRequest okdr = okdrb.build();
final Map<String, FijiRowData> rows = toRowMap(mOutputTable, okdr);
assertEquals(2, rows.size());
final Collection<CharSequence> peopleIn94110 =
rows.get("94110").<CharSequence>getValues("primitives", "string").values();
assertEquals(2, peopleIn94110.size());
final Collection<CharSequence> peopleIn93221 =
rows.get("93221").<CharSequence>getValues("primitives", "string").values();
assertEquals(1, peopleIn93221.size());
assertEquals("Jules Winnfield", peopleIn93221.iterator().next().toString());
}
}
| [
"vagrant@mozlinks"
] | vagrant@mozlinks |
351e74807efad64fe245f17a8829e31407ce7d3a | 0f2c2bb3730d9fde7fefb1b71161a7e4700d9e38 | /src/main/java/com/hacker/oa/bean/PageResult.java | c4901406d3b01bd79476cf289b470023b8acc11b | [] | no_license | fuLinHu/oa | 24f207be9113f2fe224b66788952aa03cef779a3 | 73eec76eebc26b9ba7e11f4ea0bba6f54b8fc0f0 | refs/heads/master | 2020-03-22T09:32:41.977753 | 2018-07-18T16:44:46 | 2018-07-18T16:44:46 | 139,844,279 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 556 | java | package com.hacker.oa.bean;
import java.util.List;
public class PageResult<T> {
private long total;
private List<T> imageList;
public PageResult(T t,long total,List<T> imageList){
this.imageList=imageList;
this.total=total;
}
public long getTotal() {
return total;
}
public void setTotal(long total) {
this.total = total;
}
public List<T> getImageList() {
return imageList;
}
public void setImageList(List<T> imageList) {
this.imageList = imageList;
}
}
| [
"1205668006@qq.com"
] | 1205668006@qq.com |
95fdb748ac2dc6dad1551c8279f56a40e9b8bfc2 | 78f7fd54a94c334ec56f27451688858662e1495e | /partyanalyst-service/trunk/src/main/java/com/itgrids/partyanalyst/dao/IHouseSessionDAO.java | 462c5fb5bcbaa9856f67b9692cb28785fcd14fd7 | [] | no_license | hymanath/PA | 2e8f2ef9e1d3ed99df496761a7b72ec50d25e7ef | d166bf434601f0fbe45af02064c94954f6326fd7 | refs/heads/master | 2021-09-12T09:06:37.814523 | 2018-04-13T20:13:59 | 2018-04-13T20:13:59 | 129,496,146 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 285 | java | package com.itgrids.partyanalyst.dao;
import java.util.List;
import org.appfuse.dao.GenericDao;
import com.itgrids.partyanalyst.model.HouseSession;
public interface IHouseSessionDAO extends GenericDao<HouseSession, Long>{
public List<Object[]> getAllSessions();
}
| [
"itgrids@b17b186f-d863-de11-8533-00e0815b4126"
] | itgrids@b17b186f-d863-de11-8533-00e0815b4126 |
613145b99b656628c72e06414335224f45d9409f | 4f3b596b097f24db9f1045fe4266d6a72279ff5b | /np-base/src/main/java/cn/northpark/utils/ConfigLoadUtils.java | 648921c6cbd9782da6c5e2c7905f2f59fdd852d5 | [] | no_license | liuhouer/np | d936e0b236147f92a61d75a542a3fdd3770c3648 | d3222378fa9bffd86df3b5e0ff271bbc10808441 | refs/heads/master | 2023-08-09T05:25:17.887390 | 2023-08-03T00:53:50 | 2023-08-03T00:53:50 | 60,523,762 | 6 | 1 | null | 2023-02-22T07:10:23 | 2016-06-06T11:47:29 | Java | UTF-8 | Java | false | false | 724 | java | package cn.northpark.utils;
import org.yaml.snakeyaml.Yaml;
import java.util.Map;
/**
* @author bruce
* @see HttpFilterConfig httpFilterConfig = ConfigLoadUtils.loadYmal("httpfilter", HttpFilterConfig.class, "application.yml");
* 加载配置文件的工具类
*/
public class ConfigLoadUtils {
/**
* @param configName 从yml读取的属性名字
* @param clazz 需要返回的实体
* @param file 读取的配置文件地址
* @return
*/
public static <T> T loadYmal(String configName , Class<T> clazz , String file){
Map map = new Yaml().loadAs(ConfigLoadUtils.class.getResourceAsStream(file),Map.class);
return JsonUtil.json2object(JsonUtil.object2json(map.get(configName)), clazz);
}
}
| [
"654714226@qq.com"
] | 654714226@qq.com |
54cb577a10ea9f2aa1d06a58ff5c5b31044c25c7 | aac6f8a92d14b6c12656879ca660155a9ffc3f03 | /src/main/java/me/badbones69/wheelchan/commands/ClearCommand.java | d4ebd9a1639781e6f9999f645a190f821651525d | [] | no_license | badbones69/Wheel-Chan | f93b2417e898cf0699d9869d5bd479dd8dd8d8dc | 101ad5e5d8a24c42668fdcb7882ec47a6ecddf7c | refs/heads/master | 2023-07-03T01:22:42.424717 | 2021-08-04T04:10:49 | 2021-08-04T04:10:49 | 273,140,703 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 909 | java | package me.badbones69.wheelchan.commands;
import me.badbones69.wheelchan.api.WheelChan;
import me.badbones69.wheelchan.api.enums.Messages;
import me.badbones69.wheelchan.api.objects.Server;
import net.dv8tion.jda.api.EmbedBuilder;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.events.message.MessageReceivedEvent;
public class ClearCommand {
private static WheelChan wheelChan = WheelChan.getInstance();
public static void runCommand(MessageReceivedEvent e, Server server) {
Guild guild = e.getGuild();
EmbedBuilder embed;
if (server.isSensei(e.getAuthor(), e.getGuild())) {
wheelChan.clearAllSenpais();
embed = Messages.CLEAR_SENPAIS.getMessage(guild);
} else {
embed = Messages.NO_PERMISSION.getMessage(guild);
}
e.getChannel().sendMessage(embed.build()).complete();
}
} | [
"joewojcik14@gmail.com"
] | joewojcik14@gmail.com |
b6ac971742d584ba525472603d6f6778559b6196 | 73b5d880fa06943c20ff0a9aee9d0c1d1eeebe10 | /broken/FS/tools/Comm.java | 795ba1701ded7edd79c16037776858af987673c7 | [] | no_license | x3ro/tinyos-legacy | 101d19f9e639f5a9d59d3edd4ed04b1f53221e63 | cdc0e7ba1cac505fcace33b974b2e0aca1ccc56a | refs/heads/master | 2021-01-16T19:20:21.744228 | 2015-06-30T20:23:05 | 2015-06-30T20:23:05 | 38,358,728 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,773 | java | package tools;
import net.tinyos.message.*;
import java.io.*;
import java.util.Date;
class Comm implements MessageListener {
MoteIF intf;
Comm() {
try {
intf = new MoteIF("localhost", 9000, 0x7d);
intf.registerListener(new FSReplyMsg(), this);
}
catch (Exception e) {
fail("couldn't contact serial forwarder");
}
}
void start() {
intf.start();
}
protected FSReplyMsg reply;
synchronized FSReplyMsg send(FSOpMsg m) {
try {
intf.send(MoteIF.TOS_BCAST_ADDR, m);
wait();
}
catch (IOException e) {
fail("couldn't send message");
}
catch (InterruptedException e) {
fail("interrupted!?");
}
return reply;
}
synchronized public void messageReceived(int to, Message m) {
reply = (FSReplyMsg)m;
notify();
}
static void fail(String s) {
System.err.println(s);
System.exit(2);
}
static String fsErrors[] = {
"ok",
"no more files",
"no space",
"bad data",
"file open",
"not found",
"bad crc",
"hardware problem"
};
static String remErrors[] = {
"unknown command",
"bad command arguments",
"file system request failed"
};
static String fsErrorString(FSReplyMsg m) {
int error = m.get_result();
String msg;
if (error < fsErrors.length)
return fsErrors[error];
else if (error >= 0x80 && error - 0x80 < remErrors.length)
return remErrors[error - 0x80];
else
return "unknown error " + error;
}
static void fsError(FSReplyMsg m) {
System.err.println("error: " + fsErrorString(m));
}
static void check(FSReplyMsg m) {
if (m.get_result() != FS.FS_OK) {
fsError(m);
System.exit(1);
}
}
FSReplyMsg checkedSend(FSOpMsg m) {
FSReplyMsg reply = send(m);
check(reply);
return reply;
}
}
| [
"lucas@x3ro.de"
] | lucas@x3ro.de |
193db089c3c0e9c5ed38d74ccd934d18c4136ce4 | 6be39fc2c882d0b9269f1530e0650fd3717df493 | /weixin反编译/sources/com/tencent/mm/plugin/remittance/bankcard/model/a.java | 54d0c9d8ddb53be7f37ca09deb50dc1ccf5fcb76 | [] | no_license | sir-deng/res | f1819af90b366e8326bf23d1b2f1074dfe33848f | 3cf9b044e1f4744350e5e89648d27247c9dc9877 | refs/heads/master | 2022-06-11T21:54:36.725180 | 2020-05-07T06:03:23 | 2020-05-07T06:03:23 | 155,177,067 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,924 | java | package com.tencent.mm.plugin.remittance.bankcard.model;
import com.tencent.mm.platformtools.SpellMap;
import com.tencent.mm.sdk.platformtools.bi;
import com.tencent.mm.sdk.platformtools.x;
import java.math.BigDecimal;
public final class a {
public static long dT(String str, String str2) {
try {
return new BigDecimal(bi.getDouble(str.trim(), 0.0d) == 0.0d ? "0" : str.trim()).divide(new BigDecimal(str2.trim()), 0, 4).longValue();
} catch (Throwable e) {
x.printErrStackTrace("MicroMsg.BankRemitUtil", e, "", new Object[0]);
return 0;
}
}
public static double dU(String str, String str2) {
try {
return new BigDecimal(bi.getDouble(str.trim(), 0.0d) == 0.0d ? "0" : str.trim()).divide(new BigDecimal(str2.trim()), 2, 4).doubleValue();
} catch (Throwable e) {
x.printErrStackTrace("MicroMsg.BankRemitUtil", e, "", new Object[0]);
return 0.0d;
}
}
public static double dV(String str, String str2) {
try {
double d = bi.getDouble(str, 0.0d);
double d2 = bi.getDouble(str2, 0.0d);
if (d == 0.0d) {
str = "0";
}
BigDecimal bigDecimal = new BigDecimal(str);
if (d2 == 0.0d) {
str2 = "0";
}
return bigDecimal.multiply(new BigDecimal(str2)).doubleValue();
} catch (Throwable e) {
x.printErrStackTrace("MicroMsg.BankRemitUtil", e, "", new Object[0]);
return 0.0d;
}
}
public static double vM(int i) {
return dU(String.valueOf(i), "100");
}
public static char IS(String str) {
String g = SpellMap.g(str.charAt(0));
x.d("MicroMsg.BankRemitUtil", "pinyin: %s", g);
if (bi.oN(g)) {
return '#';
}
return g.toUpperCase().charAt(0);
}
}
| [
"denghailong@vargo.com.cn"
] | denghailong@vargo.com.cn |
a67f5f5d1ae1e9e597061bd85a11a00098082125 | 0584ea7eee881f6898a9a940a7b776e4e24b601b | /imagepipeline-base/src/main/java/com/facebook/cache/common/HasDebugData.java | 8f98d9a28001ba7e70b4c0f637c7c66f8f9d88d5 | [
"MIT"
] | permissive | isabella232/fresco-1 | fd7f590cd172577402014b8a00126791b4c406a3 | 30612d81c2eea971d93f8d10aa50d35b49866d4a | refs/heads/master | 2023-04-11T08:20:02.193937 | 2021-04-18T09:46:07 | 2021-04-18T09:47:00 | 359,403,902 | 2 | 0 | MIT | 2021-04-19T09:50:20 | 2021-04-19T09:35:19 | null | UTF-8 | Java | false | false | 383 | java | // (c) Facebook, Inc. and its affiliates. Confidential and proprietary.
package com.facebook.cache.common;
import com.facebook.infer.annotation.Nullsafe;
import javax.annotation.Nullable;
@Nullsafe(Nullsafe.Mode.STRICT)
public interface HasDebugData {
/** Return a string describing this object and to be used for debugging or logging */
@Nullable
String getDebugData();
}
| [
"facebook-github-bot@users.noreply.github.com"
] | facebook-github-bot@users.noreply.github.com |
e0b9543829ef49f605e90892879be3f4ccf5d925 | 5ec06dab1409d790496ce082dacb321392b32fe9 | /clients/java-inflector/generated/src/gen/java/org/openapitools/model/ComAdobeGraniteRestImplServletDefaultGETServletProperties.java | ca15910a4f3aab5bdf3afedc34f378e4c1e80bd8 | [
"Apache-2.0"
] | permissive | shinesolutions/swagger-aem-osgi | e9d2385f44bee70e5bbdc0d577e99a9f2525266f | c2f6e076971d2592c1cbd3f70695c679e807396b | refs/heads/master | 2022-10-29T13:07:40.422092 | 2021-04-09T07:46:03 | 2021-04-09T07:46:03 | 190,217,155 | 3 | 3 | Apache-2.0 | 2022-10-05T03:26:20 | 2019-06-04T14:23:28 | null | UTF-8 | Java | false | false | 3,109 | java | package org.openapitools.model;
import java.util.Objects;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.openapitools.model.ConfigNodePropertyBoolean;
import org.openapitools.model.ConfigNodePropertyInteger;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaInflectorServerCodegen", date = "2019-08-05T00:53:46.291Z[GMT]")
public class ComAdobeGraniteRestImplServletDefaultGETServletProperties {
@JsonProperty("default.limit")
private ConfigNodePropertyInteger defaultLimit = null;
@JsonProperty("use.absolute.uri")
private ConfigNodePropertyBoolean useAbsoluteUri = null;
/**
**/
public ComAdobeGraniteRestImplServletDefaultGETServletProperties defaultLimit(ConfigNodePropertyInteger defaultLimit) {
this.defaultLimit = defaultLimit;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("default.limit")
public ConfigNodePropertyInteger getDefaultLimit() {
return defaultLimit;
}
public void setDefaultLimit(ConfigNodePropertyInteger defaultLimit) {
this.defaultLimit = defaultLimit;
}
/**
**/
public ComAdobeGraniteRestImplServletDefaultGETServletProperties useAbsoluteUri(ConfigNodePropertyBoolean useAbsoluteUri) {
this.useAbsoluteUri = useAbsoluteUri;
return this;
}
@ApiModelProperty(value = "")
@JsonProperty("use.absolute.uri")
public ConfigNodePropertyBoolean getUseAbsoluteUri() {
return useAbsoluteUri;
}
public void setUseAbsoluteUri(ConfigNodePropertyBoolean useAbsoluteUri) {
this.useAbsoluteUri = useAbsoluteUri;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
ComAdobeGraniteRestImplServletDefaultGETServletProperties comAdobeGraniteRestImplServletDefaultGETServletProperties = (ComAdobeGraniteRestImplServletDefaultGETServletProperties) o;
return Objects.equals(defaultLimit, comAdobeGraniteRestImplServletDefaultGETServletProperties.defaultLimit) &&
Objects.equals(useAbsoluteUri, comAdobeGraniteRestImplServletDefaultGETServletProperties.useAbsoluteUri);
}
@Override
public int hashCode() {
return Objects.hash(defaultLimit, useAbsoluteUri);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class ComAdobeGraniteRestImplServletDefaultGETServletProperties {\n");
sb.append(" defaultLimit: ").append(toIndentedString(defaultLimit)).append("\n");
sb.append(" useAbsoluteUri: ").append(toIndentedString(useAbsoluteUri)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"cliffano@gmail.com"
] | cliffano@gmail.com |
122cdf4671cc0e1fd2863207344b0affbc07d539 | 4ee19ab77bc7efa5e8550aae9563e8b0cdc660ca | /src/main/java/com/github/jengo/threaddp/ThreadPerMessage/A7_7b/Blackhole.java | 8698e8b7c989e37b3dd5256aee14a3414fe866eb | [
"Zlib"
] | permissive | jengowong/threaddp | c87cd4b290fd7dc3781dcc036133604b440dae32 | 12ad3578a47857278e6216a1f7d8d8687a9a0a3b | refs/heads/master | 2022-12-25T11:10:38.104577 | 2020-07-10T07:13:01 | 2020-07-10T07:13:01 | 262,043,546 | 0 | 0 | null | 2020-10-13T21:49:01 | 2020-05-07T12:25:29 | Java | UTF-8 | Java | false | false | 1,209 | java | package com.github.jengo.threaddp.ThreadPerMessage.A7_7b;
public class Blackhole {
public static void enter(Object obj) {
System.out.println("Step 1");
magic(obj);
System.out.println("Step 2");
synchronized (obj) {
System.out.println("Step 3 (never reached here)"); // 不会执行到这里
}
}
public static void magic(final Object obj) {
// 线程thread获取obj的锁之后,一直等待自身终止
Thread thread = new Thread() {
public void run() {
synchronized (obj) { // 在此处获取obj的锁
synchronized (this) {
this.notifyAll(); // 通知已经获取了obj的锁
}
try {
this.join(); // 一直等待
} catch (InterruptedException e) {
}
}
}
};
synchronized (thread) {
thread.start(); // 启动线程
try {
thread.wait(); // 等待新的线程获取obj的锁
} catch (InterruptedException e) {
}
}
}
}
| [
"wangzhenguo02@meituan.com"
] | wangzhenguo02@meituan.com |
339b13dcb1f89c59ecd35c25688390997ad0e8ac | cee07e9b756aad102d8689b7f0db92d611ed5ab5 | /src_6/org/benf/cfr/tests/ReturnTest1.java | fcd11c427f1322019a8cf97e96af57719f867633 | [
"MIT"
] | permissive | leibnitz27/cfr_tests | b85ab71940ae13fbea6948a8cc168b71f811abfd | b3aa4312e3dc0716708673b90cc0a8399e5f83e2 | refs/heads/master | 2022-09-04T02:45:26.282511 | 2022-08-11T06:14:39 | 2022-08-11T06:14:39 | 184,790,061 | 11 | 5 | MIT | 2022-02-24T07:07:46 | 2019-05-03T16:49:01 | Java | UTF-8 | Java | false | false | 479 | java | package org.benf.cfr.tests;
/*
*
jdk
boolean is1(int);
Code:
0: iload_1
1: iconst_1
2: if_icmpne 9
5: iconst_1
6: goto 10
9: iconst_0
10: ireturn
ecj
boolean is1(int);
Code:
0: iload_1
1: iconst_1
2: if_icmpne 7
5: iconst_1
6: ireturn
7: iconst_0
8: ireturn
*/
public class ReturnTest1 {
boolean is1(int x) {
return x == 1;
}
}
| [
"lee@benf.org"
] | lee@benf.org |
3f925acc13b7111f4e1f1afe28a1c2ec8931e804 | 2c42f84bc6d645ad86449ef287d292638c9e356a | /src/main/java/com/how2java/tmall/pojo/Category.java | 7d4932d3ad036e53fd3b4c7171205877116864fa | [] | no_license | yezijian1677/tmall_ssm | 42bf561fce2c460361e1eb5f1af94e7c41341a99 | 8b1560c3725b5ffbd1229fe0d100715209732fb0 | refs/heads/master | 2022-12-21T02:41:51.381662 | 2019-07-11T15:54:02 | 2019-07-11T15:54:02 | 195,373,292 | 0 | 0 | null | 2022-12-16T05:00:54 | 2019-07-05T08:42:20 | Java | UTF-8 | Java | false | false | 964 | java |
package com.how2java.tmall.pojo;
import java.util.List;
public class Category {
private Integer id;
private String name;
/*如下是非数据库字段*/
private List<Product> products;
private List<List<Product>> productsByRow;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public List<Product> getProducts() {
return products;
}
public void setProducts(List<Product> products) {
this.products = products;
}
public List<List<Product>> getProductsByRow() {
return productsByRow;
}
public void setProductsByRow(List<List<Product>> productsByRow) {
this.productsByRow = productsByRow;
}
}
| [
"1677390657@qq.com"
] | 1677390657@qq.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.