text:
package org.apache.taverna.platform.execution.impl.local;

import java.net.URI;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.IdentityHashMap;
import java.util.List;
import java.util.Map;

import org.apache.taverna.reference.ExternalReferenceSPI;
import org.apache.taverna.workflowmodel.Dataflow;
import org.apache.taverna.workflowmodel.DataflowInputPort;
import org.apache.taverna.workflowmodel.DataflowOutputPort;
import org.apache.taverna.workflowmodel.Datalink;
import org.apache.taverna.workflowmodel.EditException;
import org.apache.taverna.workflowmodel.Edits;
import org.apache.taverna.workflowmodel.EventForwardingOutputPort;
import org.apache.taverna.workflowmodel.EventHandlingInputPort;
import org.apache.taverna.workflowmodel.Merge;
import org.apache.taverna.workflowmodel.MergeInputPort;
import org.apache.taverna.workflowmodel.ProcessorInputPort;
import org.apache.taverna.workflowmodel.ProcessorOutputPort;
import org.apache.taverna.workflowmodel.processor.activity.ActivityInputPort;
import org.apache.taverna.workflowmodel.processor.activity.ActivityOutputPort;
import org.apache.taverna.workflowmodel.processor.activity.NestedDataflow;
import org.apache.taverna.workflowmodel.processor.dispatch.DispatchLayer;
import org.apache.taverna.workflowmodel.processor.dispatch.DispatchStack;
import org.apache.taverna.workflowmodel.processor.iteration.IterationStrategy;
import org.apache.taverna.workflowmodel.processor.iteration.NamedInputPortNode;
import org.apache.taverna.platform.capability.api.ActivityConfigurationException;
import org.apache.taverna.platform.capability.api.ActivityNotFoundException;
import org.apache.taverna.platform.capability.api.ActivityService;
import org.apache.taverna.platform.capability.api.DispatchLayerConfigurationException;
import org.apache.taverna.platform.capability.api.DispatchLayerNotFoundException;
import org.apache.taverna.platform.capability.api.DispatchLayerService;
import org.apache.taverna.platform.execution.api.InvalidWorkflowException;
import org.apache.taverna.scufl2.api.activity.Activity;
import org.apache.taverna.scufl2.api.common.Scufl2Tools;
import org.apache.taverna.scufl2.api.configurations.Configuration;
import org.apache.taverna.scufl2.api.container.WorkflowBundle;
import org.apache.taverna.scufl2.api.core.BlockingControlLink;
import org.apache.taverna.scufl2.api.core.ControlLink;
import org.apache.taverna.scufl2.api.core.DataLink;
import org.apache.taverna.scufl2.api.core.Processor;
import org.apache.taverna.scufl2.api.core.Workflow;
import org.apache.taverna.scufl2.api.iterationstrategy.CrossProduct;
import org.apache.taverna.scufl2.api.iterationstrategy.DotProduct;
import org.apache.taverna.scufl2.api.iterationstrategy.IterationStrategyNode;
import org.apache.taverna.scufl2.api.iterationstrategy.IterationStrategyStack;
import org.apache.taverna.scufl2.api.iterationstrategy.IterationStrategyTopNode;
import org.apache.taverna.scufl2.api.iterationstrategy.PortNode;
import org.apache.taverna.scufl2.api.port.InputActivityPort;
import org.apache.taverna.scufl2.api.port.InputProcessorPort;
import org.apache.taverna.scufl2.api.port.InputWorkflowPort;
import org.apache.taverna.scufl2.api.port.OutputActivityPort;
import org.apache.taverna.scufl2.api.port.OutputProcessorPort;
import org.apache.taverna.scufl2.api.port.OutputWorkflowPort;
import org.apache.taverna.scufl2.api.port.Port;
import org.apache.taverna.scufl2.api.port.ReceiverPort;
import org.apache.taverna.scufl2.api.port.SenderPort;
import org.apache.taverna.scufl2.api.profiles.ProcessorBinding;
import org.apache.taverna.scufl2.api.profiles.ProcessorInputPortBinding;
import org.apache.taverna.scufl2.api.profiles.ProcessorOutputPortBinding;
import org.apache.taverna.scufl2.api.profiles.Profile;

import com.fasterxml.jackson.databind.JsonNode;

/**
 * Translates a scufl2 {@link Workflow} into a {@link Dataflow}.
 *
 * @author David Withers
 */
public class WorkflowToDataflowMapper {
	private static final URI NESTED_WORKFLOW_URI = URI
			.create("http://ns.taverna.org.uk/2010/activity/nested-workflow");

	private Edits edits;
	private final Scufl2Tools scufl2Tools = new Scufl2Tools();
	private final Map<Port, EventHandlingInputPort> inputPorts;
	private final Map<Port, EventForwardingOutputPort> outputPorts;
	private final Map<Port, Merge> merges;
	private final Map<Workflow, Dataflow> workflowToDataflow;
	private final Map<Dataflow, Workflow> dataflowToWorkflow;
	private final Map<Processor, org.apache.taverna.workflowmodel.Processor> workflowToDataflowProcessors;
	private final Map<org.apache.taverna.workflowmodel.Processor, Processor> dataflowToWorkflowProcessors;
	private final Map<Activity, org.apache.taverna.workflowmodel.processor.activity.Activity<?>> workflowToDataflowActivities;
	private final Map<org.apache.taverna.workflowmodel.processor.activity.Activity<?>, Activity> dataflowToWorkflowActivities;
	@SuppressWarnings("unused")
	private final WorkflowBundle workflowBundle;
	private final Profile profile;
	private final ActivityService activityService;
	private final DispatchLayerService dispatchLayerService;

	public WorkflowToDataflowMapper(WorkflowBundle workflowBundle,
			Profile profile, Edits edits, ActivityService activityService,
			DispatchLayerService dispatchLayerService) {
		this.workflowBundle = workflowBundle;
		this.profile = profile;
		this.edits = edits;
		this.activityService = activityService;
		this.dispatchLayerService = dispatchLayerService;
		inputPorts = new IdentityHashMap<>();
		outputPorts = new IdentityHashMap<>();
		merges = new IdentityHashMap<>();
		workflowToDataflow = new IdentityHashMap<>();
		dataflowToWorkflow = new HashMap<>();
		workflowToDataflowProcessors = new IdentityHashMap<>();
		dataflowToWorkflowProcessors = new HashMap<>();
		workflowToDataflowActivities = new IdentityHashMap<>();
		dataflowToWorkflowActivities = new HashMap<>();
	}

	public Workflow getWorkflow(Dataflow dataflow) {
		return dataflowToWorkflow.get(dataflow);
	}

	public Dataflow getDataflow(Workflow workflow)
			throws InvalidWorkflowException {
		if (!workflowToDataflow.containsKey(workflow)) {
			try {
				Dataflow dataflow = createDataflow(workflow);
				workflowToDataflow.put(workflow, dataflow);
				dataflowToWorkflow.put(dataflow, workflow);
			} catch (EditException | ActivityConfigurationException
					| DispatchLayerConfigurationException
					| ActivityNotFoundException
					| DispatchLayerNotFoundException e) {
				throw new InvalidWorkflowException(e);
			}
		}
		return workflowToDataflow.get(workflow);
	}

	public Processor getWorkflowProcessor(
			org.apache.taverna.workflowmodel.Processor dataflowProcessor) {
		return dataflowToWorkflowProcessors.get(dataflowProcessor);
	}

	public org.apache.taverna.workflowmodel.Processor getDataflowProcessor(
			Processor workflowProcessor) {
		return workflowToDataflowProcessors.get(workflowProcessor);
	}

	public Activity getWorkflowActivity(
			org.apache.taverna.workflowmodel.processor.activity.Activity<?> dataflowActiviy) {
		return dataflowToWorkflowActivities.get(dataflowActiviy);
	}

	public org.apache.taverna.workflowmodel.processor.activity.Activity<?> getDataflowActivity(
			Activity workflowActivity) {
		return workflowToDataflowActivities.get(workflowActivity);
	}

	protected Dataflow createDataflow(Workflow workflow) throws EditException,
			ActivityNotFoundException, ActivityConfigurationException,
			InvalidWorkflowException, DispatchLayerNotFoundException,
			DispatchLayerConfigurationException {
		// create the dataflow
		Dataflow dataflow = edits.createDataflow();
		// set the dataflow name
		edits.getUpdateDataflowNameEdit(dataflow, workflow.getName()).doEdit();

		addInputPorts(workflow, dataflow);
		addOutputPorts(workflow, dataflow);
		addProcessors(workflow, dataflow);
		addDataLinks(workflow, dataflow);
		addControlLinks(workflow);

		return dataflow;
	}

	private void addProcessors(Workflow workflow, Dataflow dataflow)
			throws EditException, ActivityNotFoundException,
			ActivityConfigurationException, InvalidWorkflowException,
			DispatchLayerNotFoundException, DispatchLayerConfigurationException {
		for (Processor processor : workflow.getProcessors()) {
			org.apache.taverna.workflowmodel.Processor dataflowProcessor = edits
					.createProcessor(processor.getName());
			edits.getAddProcessorEdit(dataflow, dataflowProcessor).doEdit();
			// map the processor
			workflowToDataflowProcessors.put(processor, dataflowProcessor);
			dataflowToWorkflowProcessors.put(dataflowProcessor, processor);
			// add input ports
			for (InputProcessorPort inputProcessorPort : processor
					.getInputPorts()) {
				if (inputProcessorPort.getDatalinksTo().isEmpty())
					continue;
				ProcessorInputPort processorInputPort = edits
						.createProcessorInputPort(dataflowProcessor,
								inputProcessorPort.getName(),
								inputProcessorPort.getDepth());
				edits.getAddProcessorInputPortEdit(dataflowProcessor,
						processorInputPort).doEdit();
				inputPorts.put(inputProcessorPort, processorInputPort);
			}
			// add output ports
			for (OutputProcessorPort outputProcessorPort : processor
					.getOutputPorts()) {
				ProcessorOutputPort processorOutputPort = edits
						.createProcessorOutputPort(dataflowProcessor,
								outputProcessorPort.getName(),
								outputProcessorPort.getDepth(),
								outputProcessorPort.getGranularDepth());
				edits.getAddProcessorOutputPortEdit(dataflowProcessor,
						processorOutputPort).doEdit();
				outputPorts.put(outputProcessorPort, processorOutputPort);
			}

			// add dispatch stack
			addDispatchStack(processor, dataflowProcessor);

			addIterationStrategy(processor, dataflowProcessor);

			// add bound activities
			for (ProcessorBinding processorBinding : scufl2Tools
					.processorBindingsForProcessor(processor, profile))
				addActivity(processorBinding);
		}
	}

	private void addDispatchStack(Processor processor,
			org.apache.taverna.workflowmodel.Processor dataflowProcessor)
			throws DispatchLayerNotFoundException,
			DispatchLayerConfigurationException, EditException {
		DispatchStack dispatchStack = dataflowProcessor.getDispatchStack();

		JsonNode json = null;
		try {
			json = processor.getConfiguration(profile).getJson();
		} catch (IndexOutOfBoundsException e) {
			// no configuration for processor
		}

		int layer = 0;
		addDispatchLayer(
				dispatchStack,
				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Parallelize"),
				layer++, json == null ? null : json.get("parallelize"));
		addDispatchLayer(
				dispatchStack,
				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/ErrorBounce"),
				layer++, null);
		addDispatchLayer(
				dispatchStack,
				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Failover"),
				layer++, null);
		addDispatchLayer(
				dispatchStack,
				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Retry"),
				layer++, json == null ? null : json.get("retry"));
		addDispatchLayer(
				dispatchStack,
				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Stop"),
				layer++, null);
		addDispatchLayer(
				dispatchStack,
				URI.create("http://ns.taverna.org.uk/2010/scufl2/taverna/dispatchlayer/Invoke"),
				layer++, null);

	}

	private void addDispatchLayer(DispatchStack dispatchStack,
			URI dispatchLayerType, int layer, JsonNode json)
			throws DispatchLayerConfigurationException,
			DispatchLayerNotFoundException, EditException {
		// create the dispatch layer
		DispatchLayer<?> dispatchLayer = dispatchLayerService
				.createDispatchLayer(dispatchLayerType, json);
		// add the dispatch layer to the dispatch layer stack
		edits.getAddDispatchLayerEdit(dispatchStack, dispatchLayer, layer)
				.doEdit();
	}

	private void addIterationStrategy(Processor processor,
			org.apache.taverna.workflowmodel.Processor dataflowProcessor)
			throws EditException, InvalidWorkflowException {
		// get the iteration strategy from the processor
		org.apache.taverna.workflowmodel.processor.iteration.IterationStrategyStack dataflowIterationStrategyStack = dataflowProcessor
				.getIterationStrategy();
		// clear the iteration strategy
		edits.getClearIterationStrategyStackEdit(dataflowIterationStrategyStack)
				.doEdit();
		IterationStrategyStack iterationStrategyStack = processor
				.getIterationStrategyStack();
		for (IterationStrategyTopNode iterationStrategyTopNode : iterationStrategyStack) {
			// create iteration strategy
			IterationStrategy dataflowIterationStrategy = edits
					.createIterationStrategy();
			// add iteration strategy to the stack
			edits.getAddIterationStrategyEdit(dataflowIterationStrategyStack,
					dataflowIterationStrategy).doEdit();
			// add the node to the iteration strategy
			addIterationStrategyNode(dataflowIterationStrategy,
					dataflowIterationStrategy.getTerminalNode(),
					iterationStrategyTopNode);
		}
	}

	private void addIterationStrategyNode(
			IterationStrategy dataflowIterationStrategy,
			org.apache.taverna.workflowmodel.processor.iteration.IterationStrategyNode dataflowIterationStrategyNode,
			IterationStrategyNode iterationStrategyNode) throws EditException,
			InvalidWorkflowException {
		org.apache.taverna.workflowmodel.processor.iteration.IterationStrategyNode childDataflowIterationStrategyNode = null;
		if (iterationStrategyNode instanceof CrossProduct) {
			CrossProduct crossProduct = (CrossProduct) iterationStrategyNode;
			childDataflowIterationStrategyNode = new org.apache.taverna.workflowmodel.processor.iteration.CrossProduct();
			for (IterationStrategyNode iterationStrategyNode2 : crossProduct)
				addIterationStrategyNode(dataflowIterationStrategy,
						childDataflowIterationStrategyNode,
						iterationStrategyNode2);
		} else if (iterationStrategyNode instanceof DotProduct) {
			DotProduct dotProduct = (DotProduct) iterationStrategyNode;
			childDataflowIterationStrategyNode = new org.apache.taverna.workflowmodel.processor.iteration.DotProduct();
			for (IterationStrategyNode iterationStrategyNode2 : dotProduct)
				addIterationStrategyNode(dataflowIterationStrategy,
						childDataflowIterationStrategyNode,
						iterationStrategyNode2);
		} else if (iterationStrategyNode instanceof PortNode) {
			PortNode portNode = (PortNode) iterationStrategyNode;
			Integer desiredDepth = portNode.getDesiredDepth();
			if (desiredDepth == null)
				desiredDepth = portNode.getInputProcessorPort().getDepth();
			NamedInputPortNode namedInputPortNode = new NamedInputPortNode(
					portNode.getInputProcessorPort().getName(), desiredDepth);
			edits.getAddIterationStrategyInputNodeEdit(
					dataflowIterationStrategy, namedInputPortNode).doEdit();
			childDataflowIterationStrategyNode = namedInputPortNode;
		} else {
			throw new InvalidWorkflowException(
					"Unknown IterationStrategyNode type : "
							+ iterationStrategyNode.getClass().getName());
		}
		childDataflowIterationStrategyNode
				.setParent(dataflowIterationStrategyNode);
	}

	private void addActivity(ProcessorBinding processorBinding)
			throws EditException, ActivityNotFoundException,
			ActivityConfigurationException, InvalidWorkflowException {
		org.apache.taverna.workflowmodel.Processor processor = workflowToDataflowProcessors
				.get(processorBinding.getBoundProcessor());
		Activity scufl2Activity = processorBinding.getBoundActivity();
		URI activityType = scufl2Activity.getType();
		if (!activityService.activityExists(activityType))
			throw new ActivityNotFoundException("No activity exists for "
					+ activityType);
		Configuration configuration = scufl2Activity.getConfiguration();

		// create the activity
		org.apache.taverna.workflowmodel.processor.activity.Activity<?> activity = activityService
				.createActivity(activityType, configuration.getJson());
		// check if we have a nested workflow
		if (activityType.equals(NESTED_WORKFLOW_URI)) {
			if (activity instanceof NestedDataflow) {
				Workflow nestedWorkflow = scufl2Tools
						.nestedWorkflowForProcessor(
								processorBinding.getBoundProcessor(), profile);
				((NestedDataflow) activity)
						.setNestedDataflow(getDataflow(nestedWorkflow));
			} else
				throw new ActivityConfigurationException(
						"Activity is not an instance of NestedDataflow");
		}

		// add the activity to the processor
		edits.getAddActivityEdit(processor, activity).doEdit();

		// add input ports
		for (InputActivityPort inputActivityPort : scufl2Activity
				.getInputPorts()) {
			ActivityInputPort activityInputPort = edits
					.createActivityInputPort(
							inputActivityPort.getName(),
							inputActivityPort.getDepth(),
							false,
							new ArrayList<Class<? extends ExternalReferenceSPI>>(),
							String.class);
			edits.getAddActivityInputPortEdit(activity, activityInputPort)
					.doEdit();
		}
		// add output ports
		for (OutputActivityPort outputActivityPort : scufl2Activity
				.getOutputPorts()) {
			ActivityOutputPort activitytOutputPort = edits
					.createActivityOutputPort(outputActivityPort.getName(),
							outputActivityPort.getDepth(),
							outputActivityPort.getGranularDepth());
			edits.getAddActivityOutputPortEdit(activity, activitytOutputPort)
					.doEdit();
		}
		// map input ports
		for (ProcessorInputPortBinding portBinding : processorBinding
				.getInputPortBindings()) {
			InputProcessorPort processorPort = portBinding
					.getBoundProcessorPort();
			InputActivityPort activityPort = portBinding.getBoundActivityPort();
			edits.getAddActivityInputPortMappingEdit(activity,
					processorPort.getName(), activityPort.getName()).doEdit();
		}
		// map output ports
		for (ProcessorOutputPortBinding portBinding : processorBinding
				.getOutputPortBindings()) {
			OutputProcessorPort processorPort = portBinding
					.getBoundProcessorPort();
			OutputActivityPort activityPort = portBinding
					.getBoundActivityPort();
			edits.getAddActivityOutputPortMappingEdit(activity,
					processorPort.getName(), activityPort.getName()).doEdit();
		}
		workflowToDataflowActivities.put(scufl2Activity, activity);
		dataflowToWorkflowActivities.put(activity, scufl2Activity);
	}

	private void addDataLinks(Workflow workflow, Dataflow dataflow)
			throws EditException {
		for (DataLink dataLink : workflow.getDataLinks()) {
			ReceiverPort receiverPort = dataLink.getSendsTo();
			SenderPort senderPort = dataLink.getReceivesFrom();
			EventForwardingOutputPort source = outputPorts.get(senderPort);
			EventHandlingInputPort sink = inputPorts.get(receiverPort);
			Integer mergePosition = dataLink.getMergePosition();
			if (mergePosition != null) {
				if (!merges.containsKey(receiverPort)) {
					Merge merge = edits.createMerge(dataflow);
					edits.getAddMergeEdit(dataflow, merge).doEdit();
					merges.put(receiverPort, merge);
				}
				Merge merge = merges.get(receiverPort);
				// create merge input port
				MergeInputPort mergeInputPort = edits.createMergeInputPort(
						merge, "input" + mergePosition, sink.getDepth());
				// add it to the correct position in the merge
				@SuppressWarnings("unchecked")
				List<MergeInputPort> mergeInputPorts = (List<MergeInputPort>) merge
						.getInputPorts();
				if (mergePosition > mergeInputPorts.size())
					mergeInputPorts.add(mergeInputPort);
				else
					mergeInputPorts.add(mergePosition, mergeInputPort);
				// connect a datalink into the merge
				Datalink datalinkIn = edits.createDatalink(source,
						mergeInputPort);
				edits.getConnectDatalinkEdit(datalinkIn).doEdit();
				// check if the merge output has been connected
				EventForwardingOutputPort mergeOutputPort = merge
						.getOutputPort();
				if (mergeOutputPort.getOutgoingLinks().isEmpty()) {
					Datalink datalinkOut = edits.createDatalink(
							merge.getOutputPort(), sink);
					edits.getConnectDatalinkEdit(datalinkOut).doEdit();
				} else if (mergeOutputPort.getOutgoingLinks().size() == 1) {
					if (mergeOutputPort.getOutgoingLinks().iterator().next()
							.getSink() != sink)
						throw new EditException(
								"Cannot add a different sinkPort to a Merge that already has one defined");
				} else
					throw new EditException(
							"The merge instance cannot have more that 1 outgoing Datalink");
			} else {
				Datalink datalink = edits.createDatalink(source, sink);
				edits.getConnectDatalinkEdit(datalink).doEdit();
			}
		}
	}

	private void addControlLinks(Workflow workflow) throws EditException {
		for (ControlLink controlLink : workflow.getControlLinks()) {
			if (controlLink instanceof BlockingControlLink) {
				BlockingControlLink blockingControlLink = (BlockingControlLink) controlLink;
				Processor untilFinished = blockingControlLink
						.getUntilFinished();
				Processor block = blockingControlLink.getBlock();
				edits.getCreateConditionEdit(
						workflowToDataflowProcessors.get(untilFinished),
						workflowToDataflowProcessors.get(block)).doEdit();
			}
		}
	}

	private void addOutputPorts(Workflow workflow, Dataflow dataflow)
			throws EditException {
		for (OutputWorkflowPort outputWorkflowPort : workflow.getOutputPorts()) {
			DataflowOutputPort dataflowOutputPort = edits
					.createDataflowOutputPort(outputWorkflowPort.getName(),
							dataflow);
			edits.getAddDataflowOutputPortEdit(dataflow, dataflowOutputPort)
					.doEdit();
			inputPorts.put(outputWorkflowPort,
					dataflowOutputPort.getInternalInputPort());
		}
	}

	private void addInputPorts(Workflow workflow, Dataflow dataflow)
			throws EditException {
		for (InputWorkflowPort inputWorkflowPort : workflow.getInputPorts()) {
			DataflowInputPort dataflowInputPort = edits
					.createDataflowInputPort(inputWorkflowPort.getName(),
							inputWorkflowPort.getDepth(),
							inputWorkflowPort.getDepth(), dataflow);
			edits.getAddDataflowInputPortEdit(dataflow, dataflowInputPort)
					.doEdit();
			outputPorts.put(inputWorkflowPort,
					dataflowInputPort.getInternalOutputPort());
		}
	}
}


text:
package controller

import (
	"github.com/eaciit/efs"
	"github.com/eaciit/efs/webapp/ptgcc/helper"
	"github.com/eaciit/efs/webapp/ptgcc/model"
	"github.com/eaciit/knot/knot.v1"
	"github.com/eaciit/toolkit"
	"time"
)

type AccountController struct {
	App
}

func CreateAccountController(s *knot.Server) *AccountController {
	var controller = new(AccountController)
	controller.Server = s
	return controller
}

func (ac *AccountController) SaveAccount(r *knot.WebContext) interface{} {
	r.Config.OutputType = knot.OutputJson

	payload := toolkit.M{}
	if err := r.GetPayload(&payload); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}
	if err := new(efscore.Account).SaveAcc(payload); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}
	return helper.CreateResult(true, nil, "")
}

func (ac *AccountController) GetAccount(r *knot.WebContext) interface{} {
	r.Config.OutputType = knot.OutputJson
	var startdate, enddate time.Time
	payload := toolkit.M{}
	if err := r.GetPayload(&payload); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}
	val := toolkit.ToString(payload.Get("search", ""))

	keyword := toolkit.M{}.Set("key", "_id").Set("val", val)
	data, err := efscore.GetAccountList(keyword, false)
	if err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}

	if payload.Has("startdate") && payload.Has("enddate") {
		_ = toolkit.Serde(payload["startdate"], &startdate, "json")
		_ = toolkit.Serde(payload["enddate"], &enddate, "json")
	}

	if startdate.IsZero() || enddate.IsZero() {
		startdate = time.Date(2016, 1, 1, 0, 0, 0, 0, time.UTC)
		enddate = startdate.AddDate(0, 1, 0)
	}
	mdatas := make([]toolkit.M, 0, 0)
	for _, v := range data {
		mdata := toolkit.M{}
		mdata.Set("_id", v.ID).Set("title", v.Title).Set("type", v.Type).Set("group", v.Group)
		opening, in, out, balace := efs.GetOpeningInOutBalace(v.ID, v.Type, startdate.UTC(), enddate.UTC())
		mdata.Set("opening", opening).Set("in", in).Set("out", out).Set("balance", balace)
		mdatas = append(mdatas, mdata)
	}
	return helper.CreateResult(true, mdatas, "")
}

func (ac *AccountController) GetAllGroup(r *knot.WebContext) interface{} {
	r.Config.OutputType = knot.OutputJson
	var err error

	payload := toolkit.M{}
	if err := r.GetPayload(&payload); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}

	keyword := toolkit.M{}
	var data interface{}
	if payload.Has("search") {
		search, _ := toolkit.ToM(payload.Get("search"))
		keyword.Set("key", "_id")
		keyword.Set("val", toolkit.ToString(search.Get("_id", "")))
		data, err = efscore.GetAccountList(keyword, true)
		if err != nil {
			return helper.CreateResult(false, nil, err.Error())
		}
	} else {
		keyword.Set("key", "type").Set("val", 1)
		data, err = efscore.GetAccountList(keyword, false)
		if err != nil {
			return helper.CreateResult(false, nil, err.Error())
		}
	}
	return helper.CreateResult(true, data, "")
}

func (ac *AccountController) EditAccount(r *knot.WebContext) interface{} {
	r.Config.OutputType = knot.OutputJson

	data := new(efscore.Account)
	if err := r.GetPayload(&data); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}

	if err := data.GetById(); err != nil {
		return helper.CreateResult(false, "", err.Error())
	}

	return helper.CreateResult(true, data, "")
}

func (ac *AccountController) RemoveAccount(r *knot.WebContext) interface{} {
	r.Config.OutputType = knot.OutputJson

	payload := toolkit.M{}
	if err := r.GetPayload(&payload); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}
	if err := new(efscore.Account).Delete(payload); err != nil {
		return helper.CreateResult(false, nil, err.Error())
	}

	return helper.CreateResult(true, nil, "")
}

redpajama_set_name: RedPajamaGithub


text:
package com.intellij.codeInspection.wrongPackageStatement;

import com.intellij.codeHighlighting.HighlightDisplayLevel;
import com.intellij.codeInsight.daemon.JavaErrorMessages;
import com.intellij.codeInspection.*;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.util.Comparing;
import com.intellij.psi.*;
import com.intellij.psi.impl.file.PsiDirectoryFactory;
import com.intellij.psi.util.FileTypeUtils;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.ArrayList;
import java.util.List;

public class WrongPackageStatementInspection extends AbstractBaseJavaLocalInspectionTool {
  protected void addMoveToPackageFix(PsiFile file, String packName, List<? super LocalQuickFix> availableFixes) {
    MoveToPackageFix moveToPackageFix = new MoveToPackageFix(packName);
    if (moveToPackageFix.isAvailable(file)) {
      availableFixes.add(moveToPackageFix);
    }
  }

  @Override
  @Nullable
  public ProblemDescriptor[] checkFile(@NotNull PsiFile file, @NotNull InspectionManager manager, boolean isOnTheFly) {
    // does not work in tests since CodeInsightTestCase copies file into temporary location
    if (ApplicationManager.getApplication().isUnitTestMode()) return null;
    if (file instanceof PsiJavaFile) {
      if (FileTypeUtils.isInServerPageFile(file)) return null;
      PsiJavaFile javaFile = (PsiJavaFile)file;

      PsiDirectory directory = javaFile.getContainingDirectory();
      if (directory == null) return null;
      PsiPackage dirPackage = JavaDirectoryService.getInstance().getPackage(directory);
      if (dirPackage == null) return null;
      PsiPackageStatement packageStatement = javaFile.getPackageStatement();

      // highlight the first class in the file only
      PsiClass[] classes = javaFile.getClasses();
      if (classes.length == 0 && packageStatement == null) return null;

      String packageName = dirPackage.getQualifiedName();
      if (!Comparing.strEqual(packageName, "", true) && packageStatement == null) {
        String description = JavaErrorMessages.message("missing.package.statement", packageName);

        final LocalQuickFix fix =
          PsiDirectoryFactory.getInstance(file.getProject()).isValidPackageName(packageName) ? new AdjustPackageNameFix(packageName) : null;
        return new ProblemDescriptor[]{manager.createProblemDescriptor(classes[0].getNameIdentifier(), description, fix,
                                                                       ProblemHighlightType.GENERIC_ERROR_OR_WARNING, isOnTheFly)};
      }
      if (packageStatement != null) {
        final PsiJavaCodeReferenceElement packageReference = packageStatement.getPackageReference();
        PsiPackage classPackage = (PsiPackage)packageReference.resolve();
        List<LocalQuickFix> availableFixes = new ArrayList<>();
        if (classPackage == null || !Comparing.equal(dirPackage.getQualifiedName(), packageReference.getQualifiedName(), true)) {
          if (PsiDirectoryFactory.getInstance(file.getProject()).isValidPackageName(packageName)) {
            availableFixes.add(new AdjustPackageNameFix(packageName));
          }
          String packName = classPackage != null ? classPackage.getQualifiedName() : packageReference.getQualifiedName();
          addMoveToPackageFix(file, packName, availableFixes);
        }
        if (!availableFixes.isEmpty()){
          String description = JavaErrorMessages.message("package.name.file.path.mismatch",
                                                         packageReference.getQualifiedName(),
                                                         dirPackage.getQualifiedName());
          LocalQuickFix[] fixes = availableFixes.toArray(LocalQuickFix.EMPTY_ARRAY);
          ProblemDescriptor descriptor =
            manager.createProblemDescriptor(packageStatement.getPackageReference(), description, isOnTheFly,
                                            fixes, ProblemHighlightType.GENERIC_ERROR_OR_WARNING);
          return new ProblemDescriptor[]{descriptor};

        }
      }
    }
    return null;
  }

  @Override
  @NotNull
  public String getGroupDisplayName() {
    return "";
  }

  @Override
  @NotNull
  public HighlightDisplayLevel getDefaultLevel() {
    return HighlightDisplayLevel.ERROR;
  }

  @Override
  @NotNull
  public String getDisplayName() {
    return InspectionsBundle.message("wrong.package.statement");
  }

  @Override
  @NotNull
  @NonNls
  public String getShortName() {
    return "WrongPackageStatement";
  }

  @Override
  public boolean isEnabledByDefault() {
    return true;
  }
}


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated from a template.
//
//     Manual changes to this file may cause unexpected behavior in your application.
//     Manual changes to this file will be overwritten if the code is regenerated.
//
//     Produced by Entity Framework Visual Editor v3.0.0.2
//     Source:                    https://github.com/msawczyn/EFDesigner
//     Visual Studio Marketplace: https://marketplace.visualstudio.com/items?itemName=michaelsawczyn.EFDesigner
//     Documentation:             https://msawczyn.github.io/EFDesigner/
//     License (MIT):             https://github.com/msawczyn/EFDesigner/blob/master/LICENSE
// </auto-generated>
//------------------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Runtime.CompilerServices;

namespace MultiContext.Context2
{
   public partial class Entity2
   {
      partial void Init();

      /// <summary>
      /// Default constructor
      /// </summary>
      public Entity2()
      {
         Entity3 = new System.Collections.Generic.HashSet<global::MultiContext.Context2.Entity3>();

         Init();
      }

      /*************************************************************************
       * Properties
       *************************************************************************/

      /// <summary>
      /// Identity, Indexed, Required
      /// </summary>
      [Key]
      [Required]
      public int Id { get; protected set; }

      public string Property1 { get; set; }

      public string Property2 { get; set; }

      public string Property3 { get; set; }

      /*************************************************************************
       * Navigation properties
       *************************************************************************/

      public virtual ICollection<global::MultiContext.Context2.Entity3> Entity3 { get; private set; }

   }
}


text:
package org.hibernate.validator.test.internal.metadata;

import javax.validation.constraints.Min;

/**
 * @author Gunnar Morling
 */
public class IllegalCustomerRepositoryExt extends CustomerRepository {

	@Override
	public void zap(@Min(0) int i) {
	}
}


text:
<?xml version="1.0" encoding="UTF-8"?>

		<item value="false" key="WizardProjectsImportPage.STORE_NESTED_PROJECTS"/>
		<item value="false" key="WizardProjectsImportPage.STORE_COPY_PROJECT_ID"/>
		<item value="false" key="WizardProjectsImportPage.STORE_ARCHIVE_SELECTED"/>
		<list key="WizardProjectsImportPage.STORE_DIRECTORIES">
			<item value="C:\Users\aluno\Documents\Java Sabrina\jAVA2"/>
			<item value="C:\Users\aluno\Documents\Java Sabrina\jAVA2\GUI01_HelloWorld"/>
			<item value="C:\Users\aluno.ALU24037\Mateus S. Martins"/>
			<item value="C:\Users\alunomar2206\2015286\Mateus S. Martins\InfoNote_04"/>
			<item value="C:\Users\alunomar2206\2015286\Mateus S. Martins\ListaVetores"/>
		</list>
		<list key="WizardProjectsImportPage.STORE_ARCHIVES">
			<item value=""/>
		</list>

		<list key="ENABLED_TRANSFERS">
		</list>

		<item value="658" key="DIALOG_X_ORIGIN"/>
		<item value="341" key="DIALOG_Y_ORIGIN"/>

		<item value="525" key="DIALOG_WIDTH"/>
		<item value="1|Segoe UI|9.0|0|WINDOWS|1|-12|0|0|0|400|0|0|0|1|0|0|0|0|Segoe UI" key="DIALOG_FONT_NAME"/>
		<item value="579" key="DIALOG_HEIGHT"/>
		<item value="706" key="DIALOG_X_ORIGIN"/>
		<item value="142" key="DIALOG_Y_ORIGIN"/>


text:
When the `composer.json` file has changed, the new file should be checked for issues.
This task will execute [`composer validate`](https://getcomposer.org/doc/03-cli.md#validate) to make sure that everything is OK.
The configuration looks like:

```yaml
# grumphp.yml
grumphp:
    tasks:
        composer:
            file: ./composer.json
            no_check_all: false
            no_check_lock: false
            no_check_publish: false
            no_local_repository: false
            with_dependencies: false
            strict: false
```

**file**

*Default: ./composer.json*

Specifies at which location the `composer.json` file can be found.

**no_check_all**

*Default: false*

Do not emit a warning if requirements in composer.json use unbound version constraints.

**no_check_lock**

*Default: false*

Do not emit an error if composer.lock exists and is not up to date.

**no_check_publish**

*Default: false*

Do not emit an error if composer.json is unsuitable for publishing as a package on Packagist but is otherwise valid.

**no_local_repository**

*Default: false*

Do emit an error if composer.json declares local repositories (see https://getcomposer.org/doc/05-repositories.md#path).

**with_dependencies**

*Default: false*

Also validate the `composer.json` of all installed dependencies.

**strict**

*Default: false*

Return a non-zero exit code for warnings as well as errors.


text:
namespace blink {

Presentation::Presentation(LocalFrame* frame)
    : DOMWindowProperty(frame)
{
}

// static
Presentation* Presentation::create(LocalFrame* frame)
{
    ASSERT(frame);

    Presentation* presentation = new Presentation(frame);
    PresentationController* controller = PresentationController::from(*frame);
    ASSERT(controller);
    controller->setPresentation(presentation);
    return presentation;
}

DEFINE_TRACE(Presentation)
{
    visitor->trace(m_defaultRequest);
    visitor->trace(m_receiver);
    DOMWindowProperty::trace(visitor);
}

PresentationRequest* Presentation::defaultRequest() const
{
    return m_defaultRequest;
}

void Presentation::setDefaultRequest(PresentationRequest* request)
{
    m_defaultRequest = request;

    if (!frame())
        return;

    PresentationController* controller = PresentationController::from(*frame());
    if (!controller)
        return;
    controller->setDefaultRequestUrl(request ? request->url() : KURL());
}

PresentationReceiver* Presentation::receiver()
{
    // TODO(mlamouri): only return something if the Blink instance is running in
    // presentation receiver mode. The flag PresentationReceiver could be used
    // for that.
    if (!m_receiver)
        m_receiver = new PresentationReceiver(frame());
    return m_receiver;
}

} // namespace blink


text:
//CampaignBundle

/**
 * Setup the campaign view
 *
 * @param container
 */

Mautic.campaignOnLoad = function (container) {
    if (mQuery(container + ' #list-search').length) {
        Mautic.activateSearchAutocomplete('list-search', 'campaign');
    }

    if (mQuery('#CampaignEventPanel').length) {
        //update the coordinates on drop
        mQuery('#CampaignCanvas').droppable({
            drop: function (event, ui) {
                //update coordinates
                mQuery('#droppedX').val(ui.position.left);
                mQuery('#droppedY').val(ui.position.top);

                mQuery('#' + ui.draggable.attr('id')).click();
            }
        });

        //make the events draggable
        mQuery('#CampaignEventPanel .list-group-item').draggable({
            helper: 'clone',
            appendTo: '#CampaignCanvas',
            zIndex: 8000,
            scroll: false,
            cursorAt: {top: 15, left: 15},
            drag: function(event, ui) {
                if (mQuery(this).hasClass('disabled')) {
                    return false;
                }
            }
        });

        // set hover and double click functions for the event buttons
        mQuery('#CampaignCanvas .list-campaign-event, .list-campaign-source').off('.eventbuttons')
            .on('mouseover.eventbuttons', function() {
                mQuery(this).find('.campaign-event-buttons').removeClass('hide');
            })
            .on('mouseout.eventbuttons', function() {
                mQuery(this).find('.campaign-event-buttons').addClass('hide');
            })
            .on('dblclick.eventbuttons', function(event) {
                event.preventDefault();
                mQuery(this).find('.btn-edit').first().click();
            });
    }
};

/**
 * Delete the builder instance so it's regenerated when reopening the campaign event builder
 */
Mautic.campaignOnUnload = function(container) {
    delete Mautic.campaignBuilderInstance;
    delete Mautic.campaignBuilderLabels;
}

/**
 * Setup the campaign event view
 *
 * @param container
 * @param response
 */
Mautic.campaignEventOnLoad = function (container, response) {
    //new action created so append it to the form
    var domEventId = 'CampaignEvent_' + response.eventId;
    var eventId = '#' + domEventId;

    Mautic.campaignBuilderLabels[domEventId] = (response.label) ? response.label : '';
    Mautic.campaignBuilderUpdateLabel(domEventId);

    if (response.deleted) {
        Mautic.campaignBuilderInstance.remove(document.getElementById(domEventId));
    } else if (response.updateHtml) {

        mQuery(eventId + " .campaign-event-content").html(response.updateHtml);
    } else if (response.eventHtml) {
        var newHtml = response.eventHtml;

        //append content
        var x = mQuery('#droppedX').val();
        var y = mQuery('#droppedY').val();

        mQuery(newHtml).appendTo('#CampaignCanvas');

        mQuery(eventId).css({'left': x + 'px', 'top': y + 'px'});

        if (response.eventType == 'decision' || response.eventType == 'condition') {
            var theAnchor = Mautic.campaignBuilderTopAnchor;
            theAnchor[6] = 'top ' + domEventId;
            Mautic.campaignBuilderInstance.addEndpoint(domEventId, {anchor: theAnchor, uuid: domEventId + "_top"}, Mautic.campaignBuilderTopEndpoint);
            var theAnchor = Mautic.campaignBuilderYesAnchor;
            theAnchor[6] = 'yes ' + domEventId;
            Mautic.campaignBuilderInstance.addEndpoint(domEventId, {anchor: theAnchor, uuid: domEventId + "_yes"}, Mautic.campaignBuilderYesEndpoint);
            var theAnchor = Mautic.campaignBuilderNoAnchor;
            theAnchor[6] = 'no ' + domEventId;
            Mautic.campaignBuilderInstance.addEndpoint(domEventId, {anchor: theAnchor, uuid: domEventId + "_no"}, Mautic.campaignBuilderNoEndpoint);
        } else {
            var theAnchor = Mautic.campaignBuilderTopAnchor;
            theAnchor[6] = 'top ' + domEventId;
            Mautic.campaignBuilderInstance.addEndpoint(domEventId, {anchor: theAnchor, uuid: domEventId + "_top"}, Mautic.campaignBuilderTopEndpoint);
            var theAnchor = Mautic.campaignBuilderBottomAnchor;
            theAnchor[6] = 'bottom ' + domEventId;
            Mautic.campaignBuilderInstance.addEndpoint(domEventId, {anchor: theAnchor, uuid: domEventId + "_bottom"}, Mautic.campaignBuilderBottomEndpoint);
        }

        Mautic.campaignBuilderInstance.draggable(domEventId, Mautic.campaignDragOptions);

        //activate new stuff
        mQuery(eventId + " a[data-toggle='ajax']").click(function (event) {
            event.preventDefault();
            return Mautic.ajaxifyLink(this, event);
        });

        //initialize ajax'd modals
        mQuery(eventId + " a[data-toggle='ajaxmodal']").on('click.ajaxmodal', function (event) {
            event.preventDefault();

            Mautic.ajaxifyModal(this, event);
        });

        mQuery(eventId).off('.eventbuttons')
            .on('mouseover.eventbuttons', function() {
                mQuery(this).find('.campaign-event-buttons').removeClass('hide');
            })
            .on('mouseout.eventbuttons', function() {
                mQuery(this).find('.campaign-event-buttons').addClass('hide');
            })
            .on('dblclick.eventbuttons', function(event) {
                event.preventDefault();
                mQuery(this).find('.btn-edit').first().click();
            });

        //initialize tooltips
        mQuery(eventId + " *[data-toggle='tooltip']").tooltip({html: true});
    }

    Mautic.campaignBuilderInstance.repaintEverything();
};

/**
 * Setup the campaign source view
 *
 * @param container
 * @param response
 */
Mautic.campaignSourceOnLoad = function (container, response) {
    //new action created so append it to the form
    var domEventId = 'CampaignEvent_' + response.sourceType;
    var eventId = '#' + domEventId;

    if (response.deleted) {
        Mautic.campaignBuilderInstance.remove(document.getElementById(domEventId));

        mQuery('#campaignLeadSource_' + response.sourceType).removeClass('disabled');
    } else if (response.updateHtml) {

        mQuery(eventId + " .campaign-event-content").html(response.updateHtml);
    } else if (response.sourceHtml) {
        mQuery('#campaignLeadSource_' + response.sourceType).addClass('disabled');

        var newHtml = response.sourceHtml;

        //append content
        var x = mQuery('#droppedX').val();
        var y = mQuery('#droppedY').val();

        mQuery(newHtml).appendTo('#CampaignCanvas');

        mQuery(eventId).css({'left': x + 'px', 'top': y + 'px'});

        var theAnchor = Mautic.campaignBuilderLeadSourceAnchor;
        theAnchor[6] = 'leadsource ' + domEventId;
        Mautic.campaignBuilderInstance.addEndpoint(domEventId, {anchor: theAnchor, uuid: domEventId + "_leadsource"}, Mautic.campaignBuilderLeadSourceEndpoint);

        Mautic.campaignBuilderInstance.draggable(domEventId, Mautic.campaignDragOptions);

        //activate new stuff
        mQuery(eventId + " a[data-toggle='ajax']").click(function (event) {
            event.preventDefault();
            return Mautic.ajaxifyLink(this, event);
        });

        //initialize ajax'd modals
        mQuery(eventId + " a[data-toggle='ajaxmodal']").on('click.ajaxmodal', function (event) {
            event.preventDefault();

            Mautic.ajaxifyModal(this, event);
        });

        mQuery(eventId).off('.eventbuttons')
            .on('mouseover.eventbuttons', function() {
                mQuery(this).find('.campaign-event-buttons').removeClass('hide');
            })
            .on('mouseout.eventbuttons', function() {
                mQuery(this).find('.campaign-event-buttons').addClass('hide');
            })
            .on('dblclick.eventbuttons', function(event) {
                event.preventDefault();
                mQuery(this).find('.btn-edit').first().click();
            });

        //initialize tooltipslist-campaign-event
        mQuery(eventId + " *[data-toggle='tooltip']").tooltip({html: true});
    }

    Mautic.campaignBuilderInstance.repaintEverything();
};

/**
 * Update a connectors label
 *
 * @param domEventId
 */
Mautic.campaignBuilderUpdateLabel = function (domEventId) {
    var theLabel = typeof Mautic.campaignBuilderLabels[domEventId] == 'undefined' ? '' : Mautic.campaignBuilderLabels[domEventId];
    var currentConnections = Mautic.campaignBuilderInstance.select({
        target: domEventId
    });

    if (currentConnections.length > 0) {
        currentConnections.each(function(conn) {

            //remove current label
            var overlays = conn.getOverlays();
            if (overlays.length > 0) {
                for (var i = 0; i <= overlays.length; i++ ) {
                    if ( typeof overlays[i] != 'undefined' && overlays[i].type == 'Label') {
                        conn.removeOverlay(overlays[i].id);
                    }
                }
            }

            if (theLabel) {
                conn.addOverlay(["Label", {
                    label: theLabel,
                    location: 0.65,
                    cssClass: "_jsPlumb_label",
                    id: conn.sourceId + "_" + conn.targetId + "_connectionLabel"
                }]);
            }
        });
    }
};

/**
 * Change the links in the available event list when the campaign type is changed
 */
Mautic.updateCampaignEventLinks = function () {
    //find and update all the event links with the campaign type

    var campaignType = mQuery('#campaign_type .active input').val();
    if (typeof campaignType == 'undefined') {
        campaignType = 'interval';
    }

    mQuery('#campaignEventList a').each(function () {
        var href    = mQuery(this).attr('href');
        var newType = (campaignType == 'interval') ? 'date' : 'interval';

        href = href.replace('campaignType=' + campaignType, 'campaignType=' + newType);
        mQuery(this).attr('href', href);
    });
};

/**
 * Launch campaign builder modal
 */
Mautic.launchCampaignEditor = function() {
    Mautic.stopIconSpinPostEvent();
    mQuery('body').css('overflow-y', 'hidden');

    mQuery('.builder').addClass('builder-active');
    mQuery('.builder').removeClass('hide');

    if (typeof Mautic.campaignBuilderInstance == 'undefined') {
        // Store labels
        Mautic.campaignBuilderLabels = {};

        Mautic.campaignBuilderInstance = jsPlumb.getInstance({
            Container: document.querySelector("#CampaignCanvas")
        });

        // Update the labels on connection/disconnection
        Mautic.campaignBuilderInstance.bind("connection", function (info, originalEvent) {
            Mautic.campaignBuilderUpdateLabel(info.connection.targetId);

            info.targetEndpoint.setPaintStyle(
                {
                    fillStyle: info.sourceEndpoint.getPaintStyle().fillStyle
                }
            );
        });

        Mautic.campaignBuilderInstance.bind("connectionDetached", function (info, originalEvent) {
            Mautic.campaignBuilderUpdateLabel(info.connection.targetId);

            info.targetEndpoint.setPaintStyle(
                {
                    fillStyle: "#d5d4d4"
                }
            );
        });

        Mautic.campaignBuilderInstance.bind("connectionMoved", function (info, originalEvent) {
            Mautic.campaignBuilderUpdateLabel(info.connection.originalTargetId);

            info.originalTargetEndpoint.setPaintStyle(
                {
                    fillStyle: "#d5d4d4"
                }
            );

            Mautic.campaignBuilderUpdateLabel(info.connection.newTargetId);

            info.newTargetEndpoint.setPaintStyle(
                {
                    fillStyle: info.newSourceEndpoint.getPaintStyle().fillStyle
                }
            );
        });

        var overlayOptions = [["Arrow", {width: 8, length: 8, location: 0.5}]];
        var endpoint = "Dot";
        var connector = ["Bezier", {curviness: 25}];
        var connectorStyleLineWidth = 1;

        Mautic.campaignBuilderTopAnchor = [0.5, 0, 0, -1, 0, 0];
        Mautic.campaignBuilderTopEndpoint = {
            endpoint: endpoint,
            paintStyle: {
                fillStyle: "#d5d4d4"
            },
            connector: connector,
            connectorOverlays: overlayOptions,
            maxConnections: -1,
            isTarget: true,
            beforeDrop: function (params) {
                //ensure that a yes/no isn't looping back to this endpoint
                var loopbackConnections = Mautic.campaignBuilderInstance.select({
                    source: params.targetId,
                    target: params.sourceId
                });

                if (loopbackConnections.length > 0) {
                    return false;
                }

                //ensure that a top only has one connection at a time unless connected from a source
                var currentConnections = Mautic.campaignBuilderInstance.select({
                    target: params.targetId
                });

                if (!mQuery('#' + params.sourceId).hasClass('list-campaign-leadsource') && currentConnections.length > 0) {
                    return false;
                }

                if (currentConnections.length > 0) {
                    var hasNonSourceConnection = false;
                    currentConnections.each(function (conn) {
                        if (!mQuery('#' + conn.sourceId).hasClass('list-campaign-leadsource')) {
                            hasNonSourceConnection = true;
                        }
                    });

                    if (hasNonSourceConnection) {
                        return false;
                    }
                }

                //ensure that the connections are not looping back into the same event
                if (params.sourceId == params.targetId) {
                    return false;
                }

                //ensure that a action is not connecting into another action
                if (mQuery('#' + params.sourceId).hasClass('list-campaign-action') && mQuery('#' + params.targetId).hasClass('list-campaign-action')) {
                    return false;
                }

                //ensure that a decision is not connecting into another decision
                if (mQuery('#' + params.sourceId).hasClass('list-campaign-decision') && mQuery('#' + params.targetId).hasClass('list-campaign-decision')) {
                    return false;
                }

                //ensure that a condition is not connecting into action
                if (mQuery('#' + params.sourceId).hasClass('list-campaign-action') && mQuery('#' + params.targetId).hasClass('list-campaign-condition')) {
                    return false;
                }

                return true
            }
        };

        Mautic.campaignBuilderBottomAnchor = [0.5, 1, 0, 1, 0, 0];
        Mautic.campaignBuilderBottomEndpoint = {
            endpoint: endpoint,
            paintStyle: {
                fillStyle: "#d5d4d4"
            },
            connector: connector,
            connectorOverlays: overlayOptions,
            maxConnections: -1,
            isSource: true,
            connectorStyle: {
                strokeStyle: "#d5d4d4",
                lineWidth: connectorStyleLineWidth
            }
        };

        Mautic.campaignBuilderYesAnchor = [0, 1, 0, 1, 30, 0];
        Mautic.campaignBuilderYesEndpoint = {
            endpoint: endpoint,
            paintStyle: {
                fillStyle: "#00b49c"
            },
            connector: connector,
            connectorOverlays: overlayOptions,
            maxConnections: -1,
            isSource: true,
            connectorStyle: {
                strokeStyle: "#00b49c",
                lineWidth: connectorStyleLineWidth
            }
        };

        Mautic.campaignBuilderNoAnchor = [1, 1, 0, 1, -30, 0];
        Mautic.campaignBuilderNoEndpoint = {
            endpoint: endpoint,
            paintStyle: {
                fillStyle: "#f86b4f"
            },
            connector: connector,
            connectorOverlays: overlayOptions,
            maxConnections: -1,
            isSource: true,
            connectorStyle: {
                strokeStyle: "#f86b4f",
                lineWidth: connectorStyleLineWidth
            }
        };

        Mautic.campaignBuilderLeadSourceAnchor = [0.5, 1, 0, 1, 0, 0];
        Mautic.campaignBuilderLeadSourceEndpoint = {
            endpoint: endpoint,
            paintStyle: {
                fillStyle: "#fdb933"
            },
            connector: connector,
            connectorOverlays: overlayOptions,
            maxConnections: -1,
            isSource: true,
            connectorStyle: {
                strokeStyle: "#fdb933",
                lineWidth: connectorStyleLineWidth
            }
        };

        Mautic.campaignDragOptions = {
            start: function (event, ui) {
                //double clicking activates the stop function so add a catch to prevent unnecessary ajax calls
                this.startingPosition = ui.position;
            },
            stop: function (event, ui) {
                var endingPosition = ui.position;
                if (this.startingPosition.left !== endingPosition.left || this.startingPosition.top !== endingPosition.top) {

                    //update coordinates
                    mQuery('#droppedX').val(endingPosition.top);
                    mQuery('#droppedY').val(endingPosition.left);
                    var campaignId = mQuery('#campaignId').val();
                    var query = "action=campaign:updateCoordinates&campaignId=" + campaignId + "&droppedX=" + endingPosition.top + "&droppedY=" + endingPosition.left + "&eventId=" + mQuery(ui.draggable).attr('id');
                    mQuery.ajax({
                        url: mauticAjaxUrl,
                        type: "POST",
                        data: query,
                        dataType: "json",
                        error: function (request, textStatus, errorThrown) {
                            Mautic.processAjaxError(request, textStatus, errorThrown);
                        }
                    });
                }
            },
            scroll: true,
            scrollSensitivity: 100,
            scrollSpeed: 15,
            appendTo: '#CampaignCanvas',
            zIndex: 8000,
            cursorAt: {top: 15, left: 15}
        };

        Mautic.campaignBuilderInstance.setSuspendDrawing(true);

        //manually loop through each so a UUID can be set for reconnecting connections
        mQuery("#CampaignCanvas .list-campaign-event").each(function () {
            var id = mQuery(this).attr('id');
            var theAnchor = Mautic.campaignBuilderTopAnchor;
            theAnchor[6] = 'top ' + id;
            Mautic.campaignBuilderInstance.addEndpoint(id, {
                anchor: theAnchor,
                uuid: id + "_top"
            }, Mautic.campaignBuilderTopEndpoint);
        });

        mQuery("#CampaignCanvas .list-campaign-event").not('.list-campaign-decision').not('.list-campaign-condition').each(function () {
            var id = mQuery(this).attr('id');
            var theAnchor = Mautic.campaignBuilderBottomAnchor;
            theAnchor[6] = 'bottom ' + id;
            Mautic.campaignBuilderInstance.addEndpoint(id, {
                anchor: theAnchor,
                uuid: id + "_bottom"
            }, Mautic.campaignBuilderBottomEndpoint);
        });

        mQuery("#CampaignCanvas .list-campaign-decision, #CampaignCanvas .list-campaign-condition").each(function () {
            var id = mQuery(this).attr('id');
            var theAnchor = Mautic.campaignBuilderYesAnchor;
            theAnchor[6] = 'yes ' + id;
            Mautic.campaignBuilderInstance.addEndpoint(id, {
                anchor: theAnchor,
                uuid: id + "_yes"
            }, Mautic.campaignBuilderYesEndpoint);
            var theAnchor = Mautic.campaignBuilderNoAnchor;
            theAnchor[6] = 'no ' + id;
            Mautic.campaignBuilderInstance.addEndpoint(id, {
                anchor: theAnchor,
                uuid: id + "_no"
            }, Mautic.campaignBuilderNoEndpoint);
        });

        mQuery("#CampaignCanvas .list-campaign-leadsource").each(function () {
            var id = mQuery(this).attr('id');
            var theAnchor = Mautic.campaignBuilderLeadSourceAnchor;
            theAnchor[6] = 'leadsource ' + id;
            Mautic.campaignBuilderInstance.addEndpoint(id, {
                anchor: theAnchor,
                uuid: id + "_leadsource"
            }, Mautic.campaignBuilderLeadSourceEndpoint);
        });

        //enable drag and drop
        Mautic.campaignBuilderInstance.draggable(document.querySelectorAll("#CampaignCanvas .list-campaign-event"), Mautic.campaignDragOptions);
        Mautic.campaignBuilderInstance.draggable(document.querySelectorAll("#CampaignCanvas .list-campaign-source"), Mautic.campaignDragOptions);

        //activate existing connections
        Mautic.campaignBuilderReconnectEndpoints();

        Mautic.campaignBuilderInstance.setSuspendDrawing(false, true);

        mQuery('.builder-content').scroll(function() {
            Mautic.campaignBuilderInstance.repaintEverything();
        });
    } else {

        Mautic.campaignBuilderInstance.repaintEverything();
    }
};

/**
 * Enable/Disable timeframe settings if the toggle for immediate trigger is changed
 */
Mautic.campaignToggleTimeframes = function() {
    var immediateChecked = mQuery('#campaignevent_triggerMode_0').prop('checked');
    var intervalChecked  = mQuery('#campaignevent_triggerMode_1').prop('checked');
    var dateChecked      = mQuery('#campaignevent_triggerMode_2').prop('checked');

    if (mQuery('#campaignevent_triggerInterval').length) {
        if (immediateChecked) {
            mQuery('#triggerInterval').addClass('hide');
            mQuery('#triggerDate').addClass('hide');
        } else if (intervalChecked) {
            mQuery('#triggerInterval').removeClass('hide');
            mQuery('#triggerDate').addClass('hide');
        } else if (dateChecked) {
            mQuery('#triggerInterval').addClass('hide');
            mQuery('#triggerDate').removeClass('hide');
        }
    }
};

Mautic.closeCampaignBuilder = function() {
    var builderCss = {
        margin: "0",
        padding: "0",
        border: "none",
        width: "100%",
        height: "100%"
    };

    var panelHeight = (mQuery('.builder-content').css('right') == '0px') ? mQuery('.builder-panel').height() : 0,
        panelWidth = (mQuery('.builder-content').css('right') == '0px') ? 0 : mQuery('.builder-panel').width(),
        spinnerLeft = (mQuery(window).width() - panelWidth - 60) / 2,
        spinnerTop = (mQuery(window).height() - panelHeight - 60) / 2;

    var overlay     = mQuery('<div id="builder-overlay" class="modal-backdrop fade in"><div style="position: absolute; top:' + spinnerTop + 'px; left:' + spinnerLeft + 'px" class=".builder-spinner"><i class="fa fa-spinner fa-spin fa-5x"></i></div></div>').css(builderCss).appendTo('.builder-content');
    var nodes       = [];

    mQuery("#CampaignCanvas .list-campaign-event").each(function (idx, elem) {
        nodes.push({
            id:        mQuery(elem).attr('id').replace('CampaignEvent_', ''),
            positionX: parseInt(mQuery(elem).css('left'), 10),
            positionY: parseInt(mQuery(elem).css('top'), 10)
        });
    });

    mQuery("#CampaignCanvas .list-campaign-source").each(function (idx, elem) {
        nodes.push({
            id:        mQuery(elem).attr('id').replace('CampaignEvent_', ''),
            positionX: parseInt(mQuery(elem).css('left'), 10),
            positionY: parseInt(mQuery(elem).css('top'), 10)
        });
    });

    var connections = [];
    mQuery.each(Mautic.campaignBuilderInstance.getConnections(), function (idx, connection) {
        connections.push({
            sourceId:     connection.sourceId.replace('CampaignEvent_', ''),
            targetId:     connection.targetId.replace('CampaignEvent_', ''),
            anchors:      mQuery.map(connection.endpoints, function (endpoint) {
                var parts = endpoint.anchor.cssClass.split(' ');
                parts[1]  = parts[1].replace('CampaignEvent_', '');

                return {
                    'endpoint': parts[0],
                    'eventId':  parts[1]
                };
            })
        });
    });

    var chart          = {};
    chart.nodes        = nodes;
    chart.connections  = connections;
    var canvasSettings = {canvasSettings: chart};

    var campaignId     = mQuery('#campaignId').val();
    var query          = "action=campaign:updateConnections&campaignId=" + campaignId;

    mQuery('.btn-close-builder').prop('disabled', true);
    mQuery.ajax({
        url: mauticAjaxUrl + '?' + query,
        type: "POST",
        data: canvasSettings,
        dataType: "json",
        success: function (response) {
            mQuery('#builder-overlay').remove();
            mQuery('body').css('overflow-y', '');
            if (response.success) {
                mQuery('.builder').addClass('hide');
            }
            mQuery('.btn-close-builder').prop('disabled', false);
        },
        error: function (request, textStatus, errorThrown) {
            Mautic.processAjaxError(request, textStatus, errorThrown);
            mQuery('body').css('overflow-y', '');
        }
    });
};

Mautic.submitCampaignEvent = function(e) {
    e.preventDefault();

    mQuery('#campaignevent_canvasSettings_droppedX').val(mQuery('#droppedX').val());
    mQuery('#campaignevent_canvasSettings_droppedY').val(mQuery('#droppedY').val());
    mQuery('#campaignevent_canvasSettings_decisionPath').val(mQuery('#decisionPath').val());

    mQuery('form[name="campaignevent"]').submit();
};

Mautic.submitCampaignSource = function(e) {
    e.preventDefault();

    mQuery('#campaign_leadsource_droppedX').val(mQuery('#droppedX').val());
    mQuery('#campaign_leadsource_droppedY').val(mQuery('#droppedY').val());

    mQuery('form[name="campaign_leadsource"]').submit();
};


text:
using static System.Console;
using System.Globalization;

public class Program {
	public static void Main() {
		WriteLine($"{int.Parse("7302", NumberStyles.HexNumber):X}");
		WriteLine($"{int.Parse("1A3B", NumberStyles.HexNumber):X}");
	}
}

//http://pt.stackoverflow.com/q/181044/101


text:
layout: api
title: ISODay
permalink: ISODay/index.html
filename: api/ISODay.md
---


text:
using System.Collections.Generic;
using TeleBotDotNet.Http;
using TeleBotDotNet.Json;
using TeleBotDotNet.Requests.Types.Bases;

namespace TeleBotDotNet.Requests.Types
{
    public class ReplyKeyboardMarkupRequest : BaseTypeRequest
    {
        public List<List<string>> Keyboard { get; set; }
        public bool ResizeKeyboard { get; set; }
        public bool OneTimeKeyboard { get; set; }
        public bool Selective { get; set; }

        internal override void Parse(HttpData httpData, string key)
        {
            httpData.Parameters.Add(key, JsonData.Serialize(new
            {
                keyboard = Keyboard,
                resize_keyboard = ResizeKeyboard,
                one_time_keyboard = OneTimeKeyboard,
                selective = Selective
            }));
        }
    }
}


text:
package com.amazonaws.services.simplesystemsmanagement.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 *

 * Information about the source where the association execution details are stored.
 *

 *
 * @see AWS API
 *      Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OutputSource implements Serializable, Cloneable, StructuredPojo {

    /**
     *

     * The ID of the output source, for example the URL of an S3 bucket.
     *

     */
    private String outputSourceId;
    /**
     *

     * The type of source where the association execution details are stored, for example, Amazon S3.
     *

     */
    private String outputSourceType;

    /**
     *

     * The ID of the output source, for example the URL of an S3 bucket.
     *

     *
     * @param outputSourceId
     *        The ID of the output source, for example the URL of an S3 bucket.
     */

    public void setOutputSourceId(String outputSourceId) {
        this.outputSourceId = outputSourceId;
    }

    /**
     *

     * The ID of the output source, for example the URL of an S3 bucket.
     *

     *
     * @return The ID of the output source, for example the URL of an S3 bucket.
     */

    public String getOutputSourceId() {
        return this.outputSourceId;
    }

    /**
     *

     * The ID of the output source, for example the URL of an S3 bucket.
     *

     *
     * @param outputSourceId
     *        The ID of the output source, for example the URL of an S3 bucket.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OutputSource withOutputSourceId(String outputSourceId) {
        setOutputSourceId(outputSourceId);
        return this;
    }

    /**
     *

     * The type of source where the association execution details are stored, for example, Amazon S3.
     *

     *
     * @param outputSourceType
     *        The type of source where the association execution details are stored, for example, Amazon S3.
     */

    public void setOutputSourceType(String outputSourceType) {
        this.outputSourceType = outputSourceType;
    }

    /**
     *

     * The type of source where the association execution details are stored, for example, Amazon S3.
     *

     *
     * @return The type of source where the association execution details are stored, for example, Amazon S3.
     */

    public String getOutputSourceType() {
        return this.outputSourceType;
    }

    /**
     *

     * The type of source where the association execution details are stored, for example, Amazon S3.
     *

     *
     * @param outputSourceType
     *        The type of source where the association execution details are stored, for example, Amazon S3.
     * @return Returns a reference to this object so that method calls can be chained together.
     */

    public OutputSource withOutputSourceType(String outputSourceType) {
        setOutputSourceType(outputSourceType);
        return this;
    }

    /**
     * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
     * redacted from this string using a placeholder value.
     *
     * @return A string representation of this object.
     *
     * @see java.lang.Object#toString()
     */
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getOutputSourceId() != null)
            sb.append("OutputSourceId: ").append(getOutputSourceId()).append(",");
        if (getOutputSourceType() != null)
            sb.append("OutputSourceType: ").append(getOutputSourceType());
        sb.append("}");
        return sb.toString();
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;

        if (obj instanceof OutputSource == false)
            return false;
        OutputSource other = (OutputSource) obj;
        if (other.getOutputSourceId() == null ^ this.getOutputSourceId() == null)
            return false;
        if (other.getOutputSourceId() != null && other.getOutputSourceId().equals(this.getOutputSourceId()) == false)
            return false;
        if (other.getOutputSourceType() == null ^ this.getOutputSourceType() == null)
            return false;
        if (other.getOutputSourceType() != null && other.getOutputSourceType().equals(this.getOutputSourceType()) == false)
            return false;
        return true;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;

        hashCode = prime * hashCode + ((getOutputSourceId() == null) ? 0 : getOutputSourceId().hashCode());
        hashCode = prime * hashCode + ((getOutputSourceType() == null) ? 0 : getOutputSourceType().hashCode());
        return hashCode;
    }

    @Override
    public OutputSource clone() {
        try {
            return (OutputSource) super.clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
        }
    }

    @com.amazonaws.annotation.SdkInternalApi
    @Override
    public void marshall(ProtocolMarshaller protocolMarshaller) {
        com.amazonaws.services.simplesystemsmanagement.model.transform.OutputSourceMarshaller.getInstance().marshall(this, protocolMarshaller);
    }
}


text:
package org.skywalking.apm.collector.storage.dao;

import com.google.gson.JsonArray;
import org.skywalking.apm.collector.storage.base.dao.DAO;

/**
 * @author peng-yongsheng
 */
public interface IInstPerformanceUIDAO extends DAO {
    InstPerformance get(long[] timeBuckets, int instanceId);

    int getTpsMetric(int instanceId, long timeBucket);

    JsonArray getTpsMetric(int instanceId, long startTimeBucket, long endTimeBucket);

    int getRespTimeMetric(int instanceId, long timeBucket);

    JsonArray getRespTimeMetric(int instanceId, long startTimeBucket, long endTimeBucket);

    class InstPerformance {
        private final int instanceId;
        private final int calls;
        private final long costTotal;

        public InstPerformance(int instanceId, int calls, long costTotal) {
            this.instanceId = instanceId;
            this.calls = calls;
            this.costTotal = costTotal;
        }

        public int getInstanceId() {
            return instanceId;
        }

        public int getCalls() {
            return calls;
        }

        public long getCostTotal() {
            return costTotal;
        }
    }
}


text:
package org.acme;

import javax.xml.bind.annotation.XmlIDREF;

/**
 * @author Kohsuke Kawaguchi
 */
public class Foo {
    // in this bean we bind fields, just to show that we can.

    public int a;
    public String b;

    /**
     * JAXB will inject the proper bean here as configured in XML.
     */
    @XmlIDREF
    public Object c;

    public String toString() {
        return "Foo[a="+a+",b="+b+",c="+c+"]";
    }
}


text:
/*
 * This is not the original file distributed by the Apache Software Foundation
 * It has been modified by the Hipparchus project
 */
package org.hipparchus.analysis.interpolation;

import org.hipparchus.UnitTestUtils;
import org.hipparchus.analysis.UnivariateFunction;
import org.hipparchus.analysis.polynomials.PolynomialFunction;
import org.hipparchus.analysis.polynomials.PolynomialSplineFunction;
import org.hipparchus.util.FastMath;
import org.junit.Assert;
import org.junit.Test;

/**
 * Test the SplineInterpolator.
 *
 */
public class SplineInterpolatorTest extends UnivariateInterpolatorAbstractTest {

    protected UnivariateInterpolator buildDoubleInterpolator() {
        return new SplineInterpolator();
    }

    protected FieldUnivariateInterpolator buildFieldInterpolator() {
        return new SplineInterpolator();
    }

    @Test
    public void testInterpolateSin() {
        double sineCoefficientTolerance = 1e-6;
        double sineInterpolationTolerance = 0.0043;
        double x[] =
            {
                0.0,
                FastMath.PI / 6d,
                FastMath.PI / 2d,
                5d * FastMath.PI / 6d,
                FastMath.PI,
                7d * FastMath.PI / 6d,
                3d * FastMath.PI / 2d,
                11d * FastMath.PI / 6d,
                2.d * FastMath.PI };
        double y[] = { 0d, 0.5d, 1d, 0.5d, 0d, -0.5d, -1d, -0.5d, 0d };
        UnivariateInterpolator i = buildDoubleInterpolator();
        UnivariateFunction f = i.interpolate(x, y);
        verifyInterpolation(f, x, y);
        verifyConsistency((PolynomialSplineFunction) f, x);

        /* Check coefficients against values computed using R (version 1.8.1, Red Hat Linux 9)
         *
         * To replicate in R:
         *     x[1] <- 0
         *     x[2] <- pi / 6, etc, same for y[] (could use y <- scan() for y values)
         *     g <- splinefun(x, y, "natural")
         *     splinecoef <- eval(expression(z), envir = environment(g))
         *     print(splinecoef)
         */
        PolynomialFunction polynomials[] = ((PolynomialSplineFunction) f).getPolynomials();
        double target[] = {y[0], 1.002676d, 0d, -0.17415829d};
        UnitTestUtils.assertEquals(polynomials[0].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[1], 8.594367e-01, -2.735672e-01, -0.08707914};
        UnitTestUtils.assertEquals(polynomials[1].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[2], 1.471804e-17,-5.471344e-01, 0.08707914};
        UnitTestUtils.assertEquals(polynomials[2].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[3], -8.594367e-01, -2.735672e-01, 0.17415829};
        UnitTestUtils.assertEquals(polynomials[3].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[4], -1.002676, 6.548562e-17, 0.17415829};
        UnitTestUtils.assertEquals(polynomials[4].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[5], -8.594367e-01, 2.735672e-01, 0.08707914};
        UnitTestUtils.assertEquals(polynomials[5].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[6], 3.466465e-16, 5.471344e-01, -0.08707914};
        UnitTestUtils.assertEquals(polynomials[6].getCoefficients(), target, sineCoefficientTolerance);
        target = new double[]{y[7], 8.594367e-01, 2.735672e-01, -0.17415829};
        UnitTestUtils.assertEquals(polynomials[7].getCoefficients(), target, sineCoefficientTolerance);

        //Check interpolation
        Assert.assertEquals(FastMath.sqrt(2d) / 2d,f.value(FastMath.PI/4d),sineInterpolationTolerance);
        Assert.assertEquals(FastMath.sqrt(2d) / 2d,f.value(3d*FastMath.PI/4d),sineInterpolationTolerance);
    }

    /**
     * Verifies that interpolating polynomials satisfy consistency requirement:
     *    adjacent polynomials must agree through two derivatives at knot points
     */
    protected void verifyConsistency(PolynomialSplineFunction f, double x[])
        {
        PolynomialFunction polynomials[] = f.getPolynomials();
        for (int i = 1; i < x.length - 2; i++) {
            // evaluate polynomials and derivatives at x[i + 1]
            Assert.assertEquals(polynomials[i].value(x[i +1] - x[i]), polynomials[i + 1].value(0), 0.1);
            Assert.assertEquals(polynomials[i].polynomialDerivative().value(x[i +1] - x[i]),
                                polynomials[i + 1].polynomialDerivative().value(0), 0.5);
            Assert.assertEquals(polynomials[i].polynomialDerivative().polynomialDerivative().value(x[i +1] - x[i]),
                                polynomials[i + 1].polynomialDerivative().polynomialDerivative().value(0), 0.5);
        }
    }

}


text:
<TMPL_IF FORM_SETTINGS>

	<form id="configform">

		<TMPL_VAR BACKUP.BUTTON_BACKUPNOW>
		<TMPL_VAR BACKUP.BUTTON_LOGFILE>
		<input type="hidden" name="lastlog" id="lastlog" value="">

	<TMPL_VAR BACKUP.HINT_INTRODUCTION>

<TMPL_VAR BACKUP.LABEL_STORAGELOCATION>

	<TMPL_VAR STORAGES_HTML>

				<TMPL_VAR BACKUP.LABEL_ARCHIVE>
				<select name="archive" id="archive" data-mini="true">
					<option value="1"><TMPL_VAR BACKUP.LABEL_ONEBACKUP></option>
					<option value="2"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 2 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="3"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 3 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="4"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 4 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="5"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 5 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="6"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 6 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="7"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 7 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="8"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 8 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="9"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 9 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
					<option value="10"><TMPL_VAR BACKUP.LABEL_MOREBACKUPS_1> 10 <TMPL_VAR BACKUP.LABEL_MOREBACKUPS_2></option>
				</select>

<TMPL_VAR BACKUP.LABEL_SCHEDULE>

				<TMPL_VAR BACKUP.LABEL_ACTIVATE>
				<input type="checkbox" id="scheduleactive" data-role="flipswitch" data-mini="true">

				<TMPL_VAR BACKUP.LABEL_TIME>

					<fieldset id="wochentag" data-role="controlgroup" data-type="horizontal" data-mini="true">
						<input type="checkbox" name="mon" id="mon">
						<TMPL_VAR BACKUP.LABEL_MONDAY>
						<input type="checkbox" name="tue" id="tue">
						<TMPL_VAR BACKUP.LABEL_TUESDAY>
						<input type="checkbox" name="wed" id="wed">
						<TMPL_VAR BACKUP.LABEL_WEDNESDAY>
						<input type="checkbox" name="thu" id="thu">
						<TMPL_VAR BACKUP.LABEL_THURSDAY>
						<input type="checkbox" name="fre" id="fre">
						<TMPL_VAR BACKUP.LABEL_FRIDAY>
						<input type="checkbox" name="sat" id="sat">
						<TMPL_VAR BACKUP.LABEL_SATURDAY>
						<input type="checkbox" name="sun" id="sun">
						<TMPL_VAR BACKUP.LABEL_SUNDAY>
					</fieldset>

					<input type="time" data-clear-btn="false" name="timef" id="timef" value="" data-mini="true">

				<TMPL_VAR BACKUP.LABEL_REPEAT>
				<select name="repeat" id="repeat" data-mini="true">
					<option value="1"><TMPL_VAR BACKUP.LABEL_ONEWEEK></option>
					<option value="2"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 2. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
					<option value="3"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 3. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
					<option value="4"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 4. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
					<option value="5"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 5. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
					<option value="6"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 6. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
					<option value="7"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 7. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
					<option value="8"><TMPL_VAR BACKUP.LABEL_MOREWEEK_1> 8. <TMPL_VAR BACKUP.LABEL_MOREWEEK_2></option>
				</select>

		<TMPL_VAR "COMMON.BUTTON_CANCEL">
		<TMPL_VAR "COMMON.BUTTON_SAVE">

	</form>

</TMPL_IF>

<TMPL_IF FORM_LOGS>

Logfiles

		<TMPL_VAR loglist_html>

</TMPL_IF>


text:
package main

import (
	"encoding/json"
	"fmt"
	"github.com/codegangsta/cli"
	"io"
	"io/ioutil"
	"log"
	"net/http"
	"os"
	"sort"
	"strings"
	"sync"
	"unicode"
)

// VERSION injected at compile time by goxc (see https://github.com/laher/goxc/wiki/versioning#version-number-interpolation)
var VERSION = "unknown-snapshot"

var logger = log.New(os.Stderr, "", 0)

func main() {
	app(os.Args, os.Stdout)
}

func app(args []string, output io.Writer) {
	app := cli.NewApp()
	app.Name = "chtignore"
	app.Usage = "print .gitignore templates in standard output"
	app.ArgsUsage = "template"
	app.Action = printTemplates
	app.Version = VERSION
	app.Commands = []cli.Command{
		{
			Name:   "list",
			Usage:  "list available templates",
			Action: list,
		},
	}
	app.Writer = output
	app.Run(args)
}

func printTemplates(c *cli.Context) {
	args := c.Args()
	output := c.App.Writer

	if len(args) == 0 {
		cli.ShowAppHelp(c)
	}

	var wg sync.WaitGroup
	contents := make(chan string)
	for _, candidate := range args {
		wg.Add(1)
		go func(candidate string) {
			defer wg.Done()
			candidate = upperFirstChar(candidate)
			content := tryGetTemplate(candidate)

			if content != "" {
				contents <- fmt.Sprintf("# %s\n%s", candidate, content)
			}
		}(candidate)
	}
	go func() {
		wg.Wait()
		close(contents)
	}()

	for content := range contents {
		fmt.Fprintln(output, content)
	}
}

func list(c *cli.Context) {
	fmt.Fprintln(c.App.Writer, listTemplates())
}

func tryGetTemplate(template string) string {
	var resp *http.Response

	if template == "JetBrains-build" {
		resp = get("https://raw.githubusercontent.com/github/gitignore/38d6cac990a82a1f7814571634e08295086763b5/Global/JetBrains.gitignore")
	} else {
		resp = get(fmt.Sprintf("https://raw.githubusercontent.com/github/gitignore/master/%s.gitignore", template))
	}
	defer resp.Body.Close()

	if resp.StatusCode == http.StatusNotFound {
		resp = get(fmt.Sprintf("https://raw.githubusercontent.com/github/gitignore/master/Global/%s.gitignore", template))
	}

	if resp.StatusCode != http.StatusOK {
		logger.Fatal("Cannot find a template for: ", template)
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		logger.Fatal(err)
	}

	return string(body)
}

func get(url string) (resp *http.Response) {
	resp, err := http.Get(url)
	if err != nil {
		logger.Fatal(err)
	}

	return resp
}

func upperFirstChar(str string) string {
	a := []rune(str)
	firstChar := a[0]

	if unicode.IsUpper(firstChar) {
		return str
	}
	a[0] = unicode.ToUpper(firstChar)
	return string(a)
}

func listTemplates() string {
	templates := make([]string, 0)
	templates = getAndAppend(templates, "https://api.github.com/repos/github/gitignore/contents/")
	templates = getAndAppend(templates, "https://api.github.com/repos/github/gitignore/contents/Global")
	templates = append(templates, "JetBrains-build")
	sort.Strings(templates)
	return strings.Join(templates, ", ")
}

func getAndAppend(templates []string, url string) []string {
	client := &http.Client{}
	req, err := http.NewRequest("GET", url, nil)
	if err != nil {
		logger.Fatal(err)
	}
	req.Header.Add("Accept", "application/vnd.github.v3+json")

	resp, err := client.Do(req)
	if err != nil {
		logger.Fatal(err)
	}
	defer resp.Body.Close()

	if resp.StatusCode != http.StatusOK {
		logger.Fatal("Cannot list templates: ", resp.StatusCode)
	}

	body, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		logger.Fatal(err)
	}

	result := make([]gitIgnoreTemplate, 0)
	if err := json.Unmarshal(body, &result); err != nil {
		logger.Fatal(err)
	}

	for _, template := range result {
		if template.Name != "" && strings.Contains(template.Name, ".gitignore") {
			templates = append(templates, strings.Replace(template.Name, ".gitignore", "", 1))
		}
	}

	return templates
}

type gitIgnoreTemplate struct {
	Name string `json:"name"`
}


text:
namespace miniMAT {
    namespace checker {
        class Checker {
        public:
            Checker(std::shared_ptr<std::map<std::string, ast::Matrix>> vars,
                    std::shared_ptr<reporter::ErrorReporter> reporter);

            std::shared_ptr<ast::AST> check(std::shared_ptr<ast::AST> ast);

        private:
            std::shared_ptr<std::map<std::string, ast::Matrix>> vars;
            std::shared_ptr<reporter::ErrorReporter> reporter;
        };
    }
}

#endif


text:
#include <path_planning/geometry/point_2d.h>
#include <path_planning/geometry/orientation_2d.h>
#include <utils/math/random_generator.h>
#include <path_planning/occupancy/occupancy_grid_2d.h>
#include <path_planning/sensing/sensor_2d_radial.h>
#include <utils/types/types.h>

#include <vector>
#include <cmath>
#include <gtest/gtest.h>
#include <glog/logging.h>
#include <iostream>

#define VISUALIZE false

// Test that we can construct and destroy a 2D occupancy grid.
TEST(OccupancyGrid, TestOccupancyGrid2D) {
  math::RandomGenerator rng(0);

  // Create an empty occupancy grid.
  OccupancyGrid2D grid(0.0, 1.0, 0.0, 1.0, 0.005);

  // Create a bunch of points and add to the grid.
  for (size_t ii = 0; ii < 1000; ii++) {
    float x = static_cast<float>(rng.Double());
    float y = static_cast<float>(rng.Double());
    Point2D::Ptr point = Point2D::Create(x, y);
    grid.Insert(point);
  }

  if (VISUALIZE)
    grid.Visualize("Test grid.");
}

// Test behavior of 1x1 grid.
TEST(OccupancyGrid, TestOccupancyGrid2DSmall) {
  // Create an empty occupancy grid.
  OccupancyGrid2D grid(0.0, 1.0, 0.0, 1.0, 1.0);

  // Create a bunch of points in a circle and add to the grid.
  for (float theta = 0.0; theta < 2.0 * M_PI; theta += 0.01) {
    Point2D::Ptr point = Point2D::Create(0.5 + 0.2 * std::cos(theta),
                                         0.5 + 0.2 * std::sin(theta));
    grid.Insert(point);
  }

  if (VISUALIZE)
    grid.GetScene().Visualize("1x1 Scene");

  // Create a new sensor.
  Sensor2DRadial sensor(grid, 0.5);

  // Ensure sensor can see all points from the center.
  EXPECT_EQ(sensor.GetObstacleCount(Orientation2D::Create(0.5, 0.5, 0.0)),
            grid.GetTotalCount());
}

// Test that we can construct and destroy a 2D occupancy grid.
TEST(OccupancyGrid, TestSensor2DRadial) {
  // Create an empty occupancy grid.
  OccupancyGrid2D grid(0.0, 1.0, 0.0, 1.0, 0.02);

  // Create a bunch of points in a circle and add to the grid.
  for (float theta = 0.05; theta < 0.999; theta += 0.1) {
    Point2D::Ptr point = Point2D::Create(0.5 + 0.2*std::cos(2.0*M_PI * theta),
                                         0.5 + 0.2*std::sin(2.0*M_PI * theta));
    grid.Insert(point);
  }

  // Create a new sensor.
  Sensor2DRadial sensor(grid, 0.5);

  if (VISUALIZE) {
    grid.GetScene().Visualize("Test scene");
    grid.Visualize("Test grid");
    sensor.Visualize(Orientation2D::Create(0.5, 0.5, 0.0));
  }

  // Ensure sensor can see all points from the center.
  EXPECT_EQ(sensor.GetObstacleCount(Orientation2D::Create(0.5, 0.5, 0.0)),
            grid.GetTotalCount());
}

int main(int argc, char** argv) {
  std::string log_file = GENERATED_TEST_DATA_DIR + std::string("/out.log");
  google::SetLogDestination(0, log_file.c_str());
  FLAGS_logtostderr = true;
  FLAGS_minloglevel = 1;
  google::InitGoogleLogging(argv[0]);
  ::testing::InitGoogleTest(&argc, argv);
  LOG(INFO) << "Running all tests.";
  return RUN_ALL_TESTS();
}


text:
/*	$NetBSD: btreg.h,v 1.1 2000/08/20 14:28:51 pk Exp $ */

/*
 * Copyright (c) 1993
 *	The Regents of the University of California.  All rights reserved.
 *
 * This software was developed by the Computer Systems Engineering group
 * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
 * contributed to Berkeley.
 *
 * All advertising materials mentioning features or use of this software
 * must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Lawrence Berkeley Laboratory.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. All advertising materials mentioning features or use of this software
 *    must display the following acknowledgement:
 *	This product includes software developed by the University of
 *	California, Berkeley and its contributors.
 * 4. Neither the name of the University nor the names of its contributors
 *    may be used to endorse or promote products derived from this software
 *    without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 * SUCH DAMAGE.
 *
 *	@(#)btreg.h	8.2 (Berkeley) 1/21/94
 */

/*
 * Several Sun color frame buffers use some kind of Brooktree video
 * DAC (e.g., the Bt458, -- in any case, Brooktree make the only
 * decent color frame buffer chips).
 *
 * Color map control on these is a bit funky in a SPARCstation.
 * To update the color map one would normally do byte writes, but
 * the hardware takes longword writes.  Since there are three
 * registers for each color map entry (R, then G, then B), we have
 * to set color 1 with a write to address 0 (setting 0's R/G/B and
 * color 1's R) followed by a second write to address 1 (setting
 * color 1's G/B and color 2's R/G).  Software must therefore keep
 * a copy of the current map.
 *
 * The colormap address register increments automatically, so the
 * above write is done as:
 *
 *	bt->bt_addr = 0;
 *	bt->bt_cmap = R0G0B0R1;
 *	bt->bt_cmap = G1B1R2G2;
 *	...
 *
 * Yow!
 *
 * Bonus complication: on the cg6, only the top 8 bits of each 32 bit
 * register matter, even though the cg3 takes all the bits from all
 * bytes written to it.
 */
struct bt_regs {
	u_int	bt_addr;		/* map address register */
	u_int	bt_cmap;		/* colormap data register */
	u_int	bt_ctrl;		/* control register */
	u_int	bt_omap;		/* overlay (cursor) map register */
};
#define BT_INIT(bt, shift) do { /* whatever this means.. */ \
	(bt)->bt_addr = 0x06 << (shift);	/* command reg */ \
	(bt)->bt_ctrl = 0x73 << (shift);	/* overlay plane */ \
	(bt)->bt_addr = 0x04 << (shift);	/* read mask */ \
	(bt)->bt_ctrl = 0xff << (shift);	/* color planes */ \
} while(0)
#define BT_UNBLANK(bt, x, shift) do { \
	/* restore color 0 (and R of color 1) */ \
	(bt)->bt_addr = 0 << (shift); \
	(bt)->bt_cmap = (x); \
	if ((shift)) { \
		(bt)->bt_cmap = (x) << 8; \
		(bt)->bt_cmap = (x) << 16; \
	/* restore read mask */ \
	BT_INIT((bt), (shift)); \
} while(0)
#define BT_BLANK(bt, shift) do { \
	(bt)->bt_addr = 0x06 << (shift);	/* command reg */ \
	(bt)->bt_ctrl = 0x70 << (shift);	/* overlay plane */ \
	(bt)->bt_addr = 0x04 << (shift);	/* read mask */ \
	(bt)->bt_ctrl = 0x00 << (shift);	/* color planes */ \
	/* Set color 0 to black -- note that this overwrites R of color 1. */\
	(bt)->bt_addr = 0 << (shift); \
	(bt)->bt_cmap = 0 << (shift); \
	/* restore read mask */ \
	BT_INIT((bt), (shift)); \
} while(0)

/*
 * Sbus framebuffer control look like this (usually at offset 0x400000).
 */
struct fbcontrol {
	struct	bt_regs fbc_dac;
	u_char	fbc_ctrl;
	u_char	fbc_status;
	u_char	fbc_cursor_start;
	u_char	fbc_cursor_end;
	u_char	fbc_vcontrol[12];	/* 12 bytes of video timing goo */
};
/* fbc_ctrl bits: */
#define FBC_IENAB	0x80		/* Interrupt enable */
#define FBC_VENAB	0x40		/* Video enable */
#define FBC_TIMING	0x20		/* Master timing enable */
#define FBC_CURSOR	0x10		/* Cursor compare enable */
#define FBC_XTALMSK	0x0c		/* Xtal select (0,1,2,test) */
#define FBC_DIVMSK	0x03		/* Divisor (1,2,3,4) */

/* fbc_status bits: */
#define FBS_INTR	0x80		/* Interrupt pending */
#define FBS_MSENSE	0x70		/* Monitor sense mask */
#define		FBS_1024X768	0x10
#define		FBS_1152X900	0x30
#define		FBS_1280X1024	0x40
#define		FBS_1600X1280	0x50
#define FBS_ID_MASK	0x0f		/* ID mask */
#define		FBS_ID_COLOR	0x01
#define		FBS_ID_MONO	0x02
#define		FBS_ID_MONO_ECL	0x03	/* ? */


text:
require 'tilt'

module Parcels
  module Fortitude
    class WidgetEngine < Tilt::Template
      self.default_mime_type = 'text/css'

      def self.engine_initialized?
        true
      end

      def initialize_engine
        require_template_library 'fortitude'
      end

      def prepare
      end

      def evaluate(context, locals, &block)
        parcels_environment = context.environment.parcels
        widget_class = parcels_environment.widget_class_from_file(context.pathname)

        if widget_class
          widget_class._parcels_widget_class_inline_css(parcels_environment, context)
        else
          ""
        end
      end
    end
  end
end


text:
<?php
$viewClass = '\\CakeHook\\View\\HookView';
$group = 'App\Controller\PagesController';
$action = 'index';
$index = 100;
CakeHook\Action::add($group, $action, $index, function(\CakeHook\State $state) use($viewClass){
	/*@var $ctrl App\Controller\UsersController */
	$param = $state->getParam();
	$ctrl = $state->getThis();
	$ctrl->viewClass = $viewClass;

});


text:
layout: page
title: Price Air Award Ceremony
date: 2016-05-24
author: Evelyn Kerr
tags: weekly links, java
status: published
summary: Etiam lacinia felis in nunc tincidunt viverra. Mauris ultricies augue.
banner: images/banner/meeting-01.jpg
booking:
  startDate: 11/24/2019
  endDate: 11/27/2019
  ctyhocn: BHNWVHX
  groupCode: PAAC
published: true
---
Duis aliquam, nunc at convallis porttitor, justo lectus faucibus leo, vitae egestas est purus quis lorem. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse scelerisque id nisl id feugiat. Proin mollis lacinia ullamcorper. Pellentesque commodo facilisis eros eu viverra. Nullam at convallis elit. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Donec nisi turpis, dictum at ipsum ultrices, egestas hendrerit est.

1 Nullam nec nisi scelerisque, pellentesque enim vitae, fermentum tortor
1 Nullam imperdiet lacus in blandit ultrices
1 Nam rhoncus nisl gravida, imperdiet lorem nec, maximus felis
1 Nam dapibus tellus ut odio blandit condimentum.

Integer sollicitudin sapien eget metus tempus pulvinar. Aliquam iaculis lacus lacus, eu ultricies dolor tristique a. Phasellus elementum turpis pretium erat pulvinar, non accumsan risus sagittis. In at elit sit amet augue imperdiet fermentum eu in ex. Ut ligula nisi, sagittis in nisl id, malesuada tincidunt arcu. Nam eu urna nec nisi varius egestas. Nunc elementum pharetra diam, ac luctus nulla facilisis sed. Mauris odio eros, porta sit amet faucibus quis, auctor id nibh. Mauris ex lectus, maximus congue lacinia ut, euismod ac lacus. Ut ac urna at nibh vulputate rhoncus at vel ex. Sed consectetur diam sed ante fringilla, vitae laoreet lacus volutpat. In cursus nunc non magna elementum porttitor.
Fusce et ex imperdiet, volutpat ipsum vitae, ornare neque. Nunc commodo, mauris eu feugiat ullamcorper, lorem est tincidunt nunc, vitae sodales nunc orci vel lectus. Duis consectetur nec est quis tincidunt. In rhoncus turpis ac sem finibus egestas. Integer sodales blandit massa quis blandit. Suspendisse nec urna nec libero euismod faucibus quis eu erat. Nulla ut ipsum eget elit tempus malesuada. Fusce scelerisque turpis vel nisi congue cursus.