text:
package nerot;

import com.sun.syndication.feed.synd.SyndFeed;
import nerot.store.Storable;
import nerot.store.Store;
import nerot.task.HttpGetTask;
import nerot.task.Primable;
import nerot.task.RssTask;
import nerot.task.Task;
import org.quartz.JobDetail;
import org.quartz.Scheduler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.quartz.CronTriggerBean;
import org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean;
import org.springframework.scheduling.quartz.SimpleTriggerBean;

import java.util.Date;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;

/**
 * Nerot lets you to easily schedule tasks on the fly (using Quartz and Spring), calling
 * any object instance's method with any arguments you specify (class method or instance
 * method) and can cache the result for access in a separate thread with built-in RSS
 * retrieval and caching (using Rome). Scheduling supports the Quartz cron-like syntax.
 * It uses an in-memory store for quick asynchronous retrieval, but Tasks and Storing are
 * fully customizable and extensible via the API (uses interfaces, etc.).
 */
public class Nerot {

    /**
     * The Quartz job group used by Nerot.
     */
    private static final String JOB_GROUP = "Nerot";

    private static final Logger LOG = LoggerFactory.getLogger(Nerot.class);

    Store store = null;
    Scheduler scheduler = null;
    Map<String, String> jobIds = new HashMap();

    /**
     * Creates and schedules an HttpGetTask. For convenience, it uses url as the storeKey and jobId. Uses BaseTask defaults so may block thread for a defined amount of time to wait on
     * the first run validation. By defining your own HttpGetTask and using schedule(...), you will have much more control over this. This calls schedule(...) with cronSchedule.
     *
     * @param url          URL of the external resource
     * @param cronSchedule A Quartz cron schedule. essentially like unix CRON except it adds an additional prefix for seconds like "0/5 * * * * ?" for every five seconds.
     */
    public void scheduleHttpGet(String url, String cronSchedule) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        HttpGetTask task = new HttpGetTask();
        task.setStore(store);
        task.setStoreKey(url);
        task.setUrl(url);
        schedule(url, task, cronSchedule);
    }

    /**
     * Creates and schedules an HttpGetTask. For convenience, it uses url as the storeKey and jobId. Uses BaseTask defaults so may block thread for a defined amount of time to wait on
     * the first run validation. By defining your own HttpGetTask and using schedule(...), you will have much more control over this. This calls schedule(...) with an interval in milliseconds.
     *
     * @param url              URL of the external resource
     * @param intervalInMillis desired interval between task executions in milliseconds
     */
    public void scheduleHttpGet(String url, long intervalInMillis) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        HttpGetTask task = new HttpGetTask();
        task.setStore(store);
        task.setStoreKey(url);
        task.setUrl(url);
        schedule(url, task, intervalInMillis);
    }

    /**
     * Get the response body from an HTTP GET from the Store using the specified url as the key.
     * This is equivalent to calling get(url) but it casts the result as String.
     *
     * @param url URL of the external resource
     * @return the response body
     */
    public String getHttpResponseBodyFromStore(String url) {
        String result = null;
        if (store != null) {
            result = (String) store.get(url);
        }
        return result;
    }

    /**
     * Creates and schedules an RssTask. For convenience, it uses url as the storeKey and jobId. Uses BaseTask defaults so may block thread for a defined amount of time to wait on
     * the first run validation. By defining your own RssTask and using schedule(...), you will have much more control over this. This calls schedule(...) with cronSchedule.
     *
     * @param url          an RSS feed URL
     * @param cronSchedule A Quartz cron schedule. essentially like unix CRON except it adds an additional prefix for seconds like "0/5 * * * * ?" for every five seconds.
     */
    public void scheduleRss(String url, String cronSchedule) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        RssTask task = new RssTask();
        task.setStore(store);
        task.setStoreKey(url);
        task.setUrl(url);
        schedule(url, task, cronSchedule);
    }

    /**
     * Creates and schedules an RssTask. For convenience, it uses url as the storeKey and jobId. Uses BaseTask defaults so may block thread for a defined amount of time to wait on
     * the first run validation. By defining your own RssTask and using schedule(...), you will have much more control over this. This calls schedule(...) with an interval in milliseconds.
     *
     * @param url              an RSS feed URL
     * @param intervalInMillis desired interval between task executions in milliseconds
     */
    public void scheduleRss(String url, long intervalInMillis) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        RssTask task = new RssTask();
        task.setStore(store);
        task.setStoreKey(url);
        task.setUrl(url);
        schedule(url, task, intervalInMillis);
    }

    /**
     * Get a SyndFeed from the Store using the specified url as the key.
     * This is equivalent to calling get(url), casting the result as SyndFeed.
     *
     * @param url an RSS feed URL that was scheduled
     * @return the SyndFeed result of Rome RSS parsing the feed URL
     */
    public SyndFeed getRssFromStore(String url) {
        SyndFeed result = null;
        if (store != null) {
            result = (SyndFeed) store.get(url);
        }
        return result;
    }

    /**
     * Schedule any Task with a cronSchedule. If you are looking for a generic way to call any object, see the GenericTask wrapper.
     * If task implements Primable and isPrimeRunOnStart() it will spawn a thread to execute and will delay/check for first result
     * as specified via Primable. Note: there is a possibility of the prime run on start executing around the same time as the
     * first scheduled job.
     *
     * @param jobId        an arbitrary jobId that can be used to ensure that: the same job is not started twice if called twice, the schedule can be changed for that job just by calling schedule again, and the job can be cancelled without having to cancel all.
     * @param task         the Task to execute
     * @param cronSchedule A Quartz cron schedule. essentially like unix CRON except it adds an additional prefix for seconds like "0/5 * * * * ?" for every five seconds.
     */
    public void schedule(String jobId, Task task, String cronSchedule) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        checkParam("jobId", jobId);
        checkParam("task", task);
        checkParam("cronSchedule", cronSchedule);

        if (task instanceof Storable) {
            ((Storable) task).setStore(store);
        }

        if (task instanceof Primable) {
            Primable p = (Primable) task;
            if (p.isPrimeRunOnStart()) {
                executePrimeRun(p, jobId);
            }
        }

        schedule(jobId, task, "execute", cronSchedule);
    }

    /**
     * Schedule any Task with a defined interval. If you are looking for a generic way to call any object, see the GenericTask wrapper.
     * If task implements Primable and isPrimeRunOnStart() it will spawn a thread to execute and will delay/check for first result,
     * as specified via Primable, and will schedule Quartz to start with the start time defined as new Date(System.currentTimeMillis() + intervalInMillis).
     * If task isn't Primable or isPrimeRunOnStart() returns false, it will not delay the Quartz start time and will start immediately
     * with the specified interval.
     *
     * @param jobId            an arbitrary jobId that can be used to ensure that: the same job is not started twice if called twice, the schedule can be changed for that job just by calling schedule again, and the job can be cancelled without having to cancel all.
     * @param task             the Task to execute
     * @param intervalInMillis desired interval between task executions in milliseconds
     */
    public void schedule(String jobId, Task task, long intervalInMillis) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        checkParam("jobId", jobId);
        checkParam("task", task);
        checkParam("intervalInMillis", intervalInMillis);

        Date startTime = null;

        if (task instanceof Storable) {
            ((Storable) task).setStore(store);
        }

        if (task instanceof Primable) {
            Primable p = (Primable) task;
            if (p.isPrimeRunOnStart()) {
                startTime = new Date(System.currentTimeMillis() + intervalInMillis);
                executePrimeRun(p, jobId);
            }
        }

        schedule(jobId, task, "execute", intervalInMillis, startTime);
    }

    private void checkParam(String paramName, Object paramValue) throws IllegalArgumentException {
        if (paramValue == null) {
            throw new IllegalArgumentException("'" + paramName + "' cannot be null.");
        }
    }

    private void executePrimeRun(Primable p, String jobId) {
        p.primeRun();

        if (p.isPrimeRunValid()) {
            return;
        }

        for (int count = 1; count <= p.getMaxPrimeRunValidationAttempts(); count++) {
            try {
                Thread.sleep(p.getPrimeRunValidationAttemptIntervalMillis());
            }
            catch (Throwable t) {
                LOG.error("Sleep between prime run validations interrupted for job '" + jobId + "'", t);
            }

            if (p.isPrimeRunValid()) {
                LOG.info("Prime run of job '" + jobId + "' had valid result (on check " + count + " of " + p.getMaxPrimeRunValidationAttempts() + ")");
                return;
            }
        }

        LOG.info("Prime run of job '" + jobId + "' was unable to be validated. You may want to try increasing maxPrimeRunValidationAttempts (currently set to " + p.getMaxPrimeRunValidationAttempts() + ") and/or primeRunValidationAttemptIntervalMillis (currently set to " + p.getPrimeRunValidationAttemptIntervalMillis() + ").");
    }

    private String jobScheduleId(String jobId, Object obj, String method, String cronSchedule) {
        return obj.getClass().getName() + "|" + method + "|cron:" + cronSchedule;
    }

    private String jobScheduleId(String jobId, Object obj, String method, long intervalInMillis) {
        return obj.getClass().getName() + "|" + method + "|interval:" + intervalInMillis;
    }

    /**
     * Schedule any object (doesn't even have to be a Task) calling the method on it that you specify with no arguments. You
     * probably want to use the other schedule method that takes a Task and use the GenericTask wrapper instead, as it zero-to-many
     * arguments you specify as well as class or instance methods. This is just a simple way of scheduling execution of a no arg method,
     * without caring about the implementation of the method (so it doesn't have to store the result, but it could).
     *
     * @param jobId        an arbitrary jobId that can be used to ensure that: the same job is not started twice if called twice, the schedule can be changed for that job just by calling schedule again, and the job can be cancelled without having to cancel all.
     * @param obj          any object that it will call no-arg method
     * @param method       the method name to call on obj
     * @param cronSchedule A Quartz cron schedule. essentially like unix CRON except it adds an additional prefix for seconds like "0/5 * * * * ?" for every five seconds.
     */
    private void schedule(String jobId, Object obj, String method, String cronSchedule) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        String jobScheduleId = jobScheduleId(jobId, obj, method, cronSchedule);
        String existingJobScheduleId = jobIds.get(jobId);
        if (existingJobScheduleId != null && !existingJobScheduleId.equals(jobScheduleId)) {
            // change of schedule to existing job, so unschedule and schedule. This may result with slight overlap of both tasks,
            // assuming it is asynchronous.
            unschedule(jobId);
        }

        if (jobIds.get(jobId) == null) {
            MethodInvokingJobDetailFactoryBean jobDetail = new MethodInvokingJobDetailFactoryBean();
            jobDetail.setTargetObject(obj);
            jobDetail.setTargetMethod(method);
            jobDetail.setName(jobId);
            jobDetail.setGroup(JOB_GROUP);
            jobDetail.setConcurrent(false);
            jobDetail.afterPropertiesSet();

            CronTriggerBean trigger = new CronTriggerBean();
            trigger.setBeanName("nerot-ct_" + jobId);
            trigger.setJobDetail((JobDetail) jobDetail.getObject());
            trigger.setCronExpression(cronSchedule);
            trigger.afterPropertiesSet();

            jobIds.put(jobId, jobScheduleId);
            scheduler.scheduleJob((JobDetail) jobDetail.getObject(), trigger);
            LOG.info("Scheduled job '" + jobId + "' with schedule '" + cronSchedule + "'");
        }
    }

    /**
     * Schedule any object (doesn't even have to be a Task) calling the method on it that you specify with no arguments. You
     * probably want to use the other schedule method that takes a Task and use the GenericTask wrapper instead, as it zero-to-many
     * arguments you specify as well as class or instance methods. This is just a simple way of scheduling execution of a no arg method,
     * without caring about the implementation of the method (so it doesn't have to store the result, but it could).
     *
     * @param jobId            an arbitrary jobId that can be used to ensure that: the same job is not started twice if called twice, the schedule can be changed for that job just by calling schedule again, and the job can be cancelled without having to cancel all.
     * @param obj              any object that it will call no-arg method
     * @param method           the method name to call on obj
     * @param intervalInMillis desired interval between task executions in milliseconds
     * @param startTime        desired start date and time or null if start immediately
     */
    private void schedule(String jobId, Object obj, String method, long intervalInMillis, Date startTime) throws java.text.ParseException, org.quartz.SchedulerException, java.lang.ClassNotFoundException, java.lang.NoSuchMethodException {
        // startTime only called internally and we know it will vary, so we don't use it as part of the description of the job schedule,
        // otherwise might usually create multiple jobs when called with same interval at different times.
        String jobScheduleId = jobScheduleId(jobId, obj, method, intervalInMillis);
        String existingJobScheduleId = jobIds.get(jobId);
        if (existingJobScheduleId != null && !existingJobScheduleId.equals(jobScheduleId)) {
            // change of schedule to existing job, so unschedule and schedule. This may result with slight overlap of both tasks,
            // assuming it is asynchronous.
            unschedule(jobId);
        }

        if (jobIds.get(jobId) == null) {
            MethodInvokingJobDetailFactoryBean jobDetail = new MethodInvokingJobDetailFactoryBean();
            jobDetail.setTargetObject(obj);
            jobDetail.setTargetMethod(method);
            jobDetail.setName(jobId);
            jobDetail.setGroup(JOB_GROUP);
            jobDetail.setConcurrent(false);
            jobDetail.afterPropertiesSet();

            SimpleTriggerBean trigger = new SimpleTriggerBean();
            trigger.setBeanName("nerot-st_" + jobId);
            trigger.setJobDetail((JobDetail) jobDetail.getObject());
            trigger.setRepeatCount(SimpleTriggerBean.REPEAT_INDEFINITELY);
            trigger.setRepeatInterval(intervalInMillis);
            if (startTime != null) {
                trigger.setStartTime(startTime);
            }
            trigger.afterPropertiesSet();

            jobIds.put(jobId, jobScheduleId);
            scheduler.scheduleJob((JobDetail) jobDetail.getObject(), trigger);
            if (startTime != null) {
                LOG.info("Scheduled job '" + jobId + "' with interval '" + intervalInMillis + "' to start at " + startTime);
            } else {
                LOG.info("Scheduled job '" + jobId + "' with interval '" + intervalInMillis + "' to start immediately");
            }
        }
    }

    /**
     * Get an Object from the Store that was set by a Task.
     *
     * @param key the key set on the GenericTask, the url, or whatever key was used by the Task/called object as the key for the value in the Store.
     * @return result from Store for the specified key
     */
    public Object getResultFromStore(String key) {
        Object result = null;
        if (store != null) {
            result = store.get(key);
        }
        return result;
    }

    /**
     * This unschedules a task, by calling deleteJob on the Quartz scheduler.
     *
     * @param jobId the job id specified previously in a schedule method.
     */
    public void unschedule(String jobId) throws org.quartz.SchedulerException {
        LOG.info("Unscheduling job '" + jobId + "'");
        scheduler.deleteJob(jobId, JOB_GROUP);
        jobIds.put(jobId, null);
    }

    /**
     * This unschedules all tasks, using the unschedule method.
     */
    public void unscheduleAll() throws org.quartz.SchedulerException {
        for (Iterator iter = jobIds.keySet().iterator(); iter.hasNext();) {
            unschedule((String) iter.next());
        }
    }

    /**
     * Gets the Store used by Nerot's get methods. You shouldn't need to access this directly.
     *
     * @return the Store
     */
    public Store getStore() {
        return store;
    }

    /**
     * Sets the Store used by Nerot's get methods. You shouldn't need to access this directly. It is set via Spring.
     *
     * @param store the Store
     */
    public void setStore(Store store) {
        this.store = store;
    }

    /**
     * Gets the Quartz Scheduler instance. You shouldn't need to access this directly.
     *
     * @return the Scheduler
     */
    public Scheduler getScheduler() {
        return scheduler;
    }

    /**
     * Sets the Quartz Scheduler instance. You shouldn't need to access this directly. It is set via Spring.
     *
     * @param scheduler the Scheduler
     */
    public void setScheduler(Scheduler scheduler) {
        this.scheduler = scheduler;
    }
}


text:
<?php
/* Reset your password form, sends reset.php password link */
require 'db.php';
session_start();

// Check if form submitted with method="post"
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
    $email = $mysqli->escape_string($_POST['email']);
    $result = $mysqli->query("SELECT * FROM users WHERE email='$email'");

    if ( $result->num_rows == 0 ) // User doesn't exist
    {
        $_SESSION['message'] = "User with that email doesn't exist!";
        header("location: error.php");
    }
    else { // User exists (num_rows != 0)

        $user = $result->fetch_assoc(); // $user becomes array with user data

        $email = $user['email'];
        $hash = $user['hash'];
        $first_name = $user['first_name'];

        // Session message to display on success.php
        $_SESSION['message'] = "
Please check your email $email"
        . " for a confirmation link to complete your password reset!
";

        // Send registration confirmation link (reset.php)
        $to      = $email;
        $subject = 'Password Reset Link ( clevertechie.com )';
        $message_body = '
        Hello '.$first_name.',

        You have requested password reset!

        Please click this link to reset your password:

        http://localhost/login-system/reset.php?email='.$email.'&hash='.$hash;

        mail($to, $subject, $message_body);

        header("location: success.php");
  }
}
?>
<!DOCTYPE html>

  <title>Reset Your Password</title>
  <?php include 'css/css.html'; ?>

Reset Your Password

    <form action="forgot.php" method="post">

        Email Address*

      <input type="email"required autocomplete="off" name="email"/>

    <button class="button button-block"/>Reset</button>
    </form>

redpajama_set_name: RedPajamaGithub


text:
using System.Text.Json;
using Azure.Core;

namespace Azure.ResourceManager.CognitiveServices.Models
{
    public partial class CommitmentPlanProperties : IUtf8JsonSerializable
    {
        void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
        {
            writer.WriteStartObject();
            if (Optional.IsDefined(HostingModel))
            {
                writer.WritePropertyName("hostingModel");
                writer.WriteStringValue(HostingModel.Value.ToString());
            }
            if (Optional.IsDefined(PlanType))
            {
                writer.WritePropertyName("planType");
                writer.WriteStringValue(PlanType);
            }
            if (Optional.IsDefined(Current))
            {
                writer.WritePropertyName("current");
                writer.WriteObjectValue(Current);
            }
            if (Optional.IsDefined(AutoRenew))
            {
                writer.WritePropertyName("autoRenew");
                writer.WriteBooleanValue(AutoRenew.Value);
            }
            if (Optional.IsDefined(Next))
            {
                writer.WritePropertyName("next");
                writer.WriteObjectValue(Next);
            }
            writer.WriteEndObject();
        }

        internal static CommitmentPlanProperties DeserializeCommitmentPlanProperties(JsonElement element)
        {
            Optional<ServiceAccountHostingModel> hostingModel = default;
            Optional<string> planType = default;
            Optional<CommitmentPeriod> current = default;
            Optional<bool> autoRenew = default;
            Optional<CommitmentPeriod> next = default;
            Optional<CommitmentPeriod> last = default;
            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("hostingModel"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    hostingModel = new ServiceAccountHostingModel(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("planType"))
                {
                    planType = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("current"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    current = CommitmentPeriod.DeserializeCommitmentPeriod(property.Value);
                    continue;
                }
                if (property.NameEquals("autoRenew"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    autoRenew = property.Value.GetBoolean();
                    continue;
                }
                if (property.NameEquals("next"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    next = CommitmentPeriod.DeserializeCommitmentPeriod(property.Value);
                    continue;
                }
                if (property.NameEquals("last"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    last = CommitmentPeriod.DeserializeCommitmentPeriod(property.Value);
                    continue;
                }
            }
            return new CommitmentPlanProperties(Optional.ToNullable(hostingModel), planType.Value, current.Value, Optional.ToNullable(autoRenew), next.Value, last.Value);
        }
    }
}


text:
Autotest.add_discovery do
  "mms2r"
end


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Class gr.forth.ics.graph.io.Format (FlexiGraph Reference)
</TITLE>

<META NAME="date" CONTENT="2010-10-19">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Uses of Class
gr.forth.ics.graph.io.Format

Packages that use Format

gr.forth.ics.graph.io
Input/Output utilities for reading/writing graphs.

Uses of Format in gr.forth.ics.graph.io

Methods in gr.forth.ics.graph.io that return Format

static Format
Format.valueOf(java.lang.String name)

          Returns the enum constant of this type with the specified name.

static Format[]
Format.values()

          Returns an array containing the constants of this enum type, in
the order they are declared.

Methods in gr.forth.ics.graph.io with parameters of type Format

static void
GraphIO.read(Format format,
     Graph graph,
     java.io.File file)

          Reads a graph using the specified format from an input file.

static void
GraphIO.read(Format format,
     Graph graph,
     java.io.InputStream in)

          Reads a graph using the specified format from an input stream.

static void
GraphIO.read(Format format,
     Graph graph,
     Locator locator,
     java.io.File file)

          Reads a graph using the specified format from an input file.

static void
GraphIO.read(Format format,
     Graph graph,
     Locator locator,
     java.io.InputStream in)

          Reads a graph using the specified format from an input stream.

static void
GraphIO.write(Format format,
      InspectableGraph graph,
      java.io.File file)

          Writes a graph using the specified format to a target file.

static void
GraphIO.write(Format format,
      InspectableGraph graph,
      Locator locator,
      java.io.File file)

          Writes a graph using the specified format to a target file.

static void
GraphIO.write(Format format,
      InspectableGraph graph,
      java.io.OutputStream out)

          Writes a graph using the specified format to a target output stream.

      Overview
      Package
      Class
    Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
TABLE OF INTERACTIONS WITH

POTASSIUM

See also: hyperkalemia inducing medications

From the French ANSM drug interactions document of

September 2016, pp. 180-181

POTASSIUM

RxNorm: 8588

ATC: A12BA

ANGIOTENSIN II RECEPTOR ANTAGONISTS or ANGIOTENSIN RECEPTOR BLOCKERS (ARBs)

CLASS CODE:

C09CA0-001

Hyperkalemia (potentially lethal) especially when there is renal insufficiency (addition of the hyperkalemia inducing effects).

Not recommended

Avoid administering these substances together unless there is pre-existing hypokalemia.

POTASSIUM

RxNorm: 8588

ATC: A12BA

CICLOSPORIN

RxNorm: 3008

ATC:

L04AD01 S01XA18

Potentially lethal hyperkalemia, especially when there is renal insufficiency (addition of the hyperkalemia inducing effects)

Not recommended

Avoid administration of these substances together unless there is pre-existing hypokalemia.

POTASSIUM

RxNorm: 8588

ATC: A12BA

POTASSIUM SPARING DIURETICS (ALONE OR IN COMBINATION)

CLASS CODE:

C0E-004

Potentially lethal hyperkalemia, especially with patients having renal insufficiency (addition of the hyperkaliemia producing effects)

Contraindication:

-aside from hypokalemia or in case of parenteral use of the potassium salts

Not recommended:

-in case of hypokelemia or of parenteral use of potassium salts.

POTASSIUM

RxNorm: 8588

ATC: A12BA

ANGIOTENSIN CONVERTING ENZYME INHIBITORS (ACE INHIBITORS)

CLASS CODE:

C09AA

Hyperkalemia (potentially lethal) especially when there is renal insufficiency (addition of the hyperkalemia inducing effects)

Not recommended

Unless there is hypokalemia.

POTASSIUM

RxNorm: 8588

ATC: A12BA

TACROLIMUS

RxNorm: 42316

ATC:

D11AH01 L04AD02

Essentially lethal hyperkalemia, especially when there is renal insufficiency (addition of the hyperkalemia producing effects)

Not recommended

Avoid administering these substances together unless there is preexisting hypokalemia.


text:
package io.quarkus.grpc.stubs;

import java.util.function.Consumer;
import java.util.function.Function;

import org.jboss.logging.Logger;

import io.grpc.Status;
import io.grpc.StatusException;
import io.grpc.StatusRuntimeException;
import io.grpc.stub.ServerCallStreamObserver;
import io.grpc.stub.StreamObserver;
import io.smallrye.mutiny.Multi;
import io.smallrye.mutiny.Uni;
import io.smallrye.mutiny.operators.multi.processors.UnicastProcessor;
import io.smallrye.mutiny.subscription.Cancellable;

public class ServerCalls {
    private static final Logger log = Logger.getLogger(ServerCalls.class);

    private static StreamCollector streamCollector = StreamCollector.NO_OP;

    private ServerCalls() {
    }

    public static <I, O> void oneToOne(I request, StreamObserver<O> response, String compression,
            Function<I, Uni<O>> implementation) {
        trySetCompression(response, compression);
        try {
            Uni<O> uni = implementation.apply(request);
            if (uni == null) {
                log.error("gRPC service method returned null instead of Uni. " +
                        "Please change the implementation to return a Uni object, either carrying a value or a failure," +
                        " or throw StatusRuntimeException");
                response.onError(Status.fromCode(Status.Code.INTERNAL).asException());
                return;
            }
            uni.subscribe().with(
                    new Consumer<O>() {
                        @Override
                        public void accept(O item) {
                            response.onNext(item);
                            response.onCompleted();
                        }
                    },
                    new Consumer<Throwable>() {
                        @Override
                        public void accept(Throwable failure) {
                            response.onError(toStatusFailure(failure));
                        }
                    });
        } catch (Throwable throwable) {
            response.onError(toStatusFailure(throwable));
        }
    }

    public static <I, O> void oneToMany(I request, StreamObserver<O> response, String compression,
            Function<I, Multi<O>> implementation) {
        try {
            streamCollector.add(response);
            Multi<O> returnValue = implementation.apply(request);
            if (returnValue == null) {
                log.error("gRPC service method returned null instead of Multi. " +
                        "Please change the implementation to return a Multi object or throw StatusRuntimeException");
                response.onError(Status.fromCode(Status.Code.INTERNAL).asException());
                return;
            }
            handleSubscription(returnValue.subscribe().with(
                    new Consumer<O>() {
                        @Override
                        public void accept(O v) {
                            response.onNext(v);
                        }
                    },
                    new Consumer<Throwable>() {
                        @Override
                        public void accept(Throwable throwable) {
                            onError(response, throwable);
                        }
                    },
                    new Runnable() {
                        @Override
                        public void run() {
                            onCompleted(response);
                        }
                    }), response);
        } catch (Throwable throwable) {
            onError(response, toStatusFailure(throwable));
        }
    }

    public static <I, O> StreamObserver<I> manyToOne(StreamObserver<O> response,
            Function<Multi<I>, Uni<O>> implementation) {
        try {
            UnicastProcessor<I> input = UnicastProcessor.create();
            StreamObserver<I> pump = getStreamObserverFeedingProcessor(input);
            streamCollector.add(response);

            Uni<O> uni = implementation.apply(input);
            if (uni == null) {
                log.error("gRPC service method returned null instead of Uni. " +
                        "Please change the implementation to return a Uni object, either carrying a value or a failure," +
                        " or throw StatusRuntimeException");
                response.onError(Status.fromCode(Status.Code.INTERNAL).asException());
                return null;
            }
            uni.subscribe().with(
                    new Consumer<O>() {
                        @Override
                        public void accept(O item) {
                            response.onNext(item);
                            onCompleted(response);
                        }
                    },
                    new Consumer<Throwable>() {
                        @Override
                        public void accept(Throwable failure) {
                            onError(response, toStatusFailure(failure));
                        }
                    });
            return pump;
        } catch (Throwable throwable) {
            response.onError(toStatusFailure(throwable));
            return null;
        }
    }

    private static <O> void handleSubscription(Cancellable cancellable, StreamObserver<O> response) {
        if (response instanceof ServerCallStreamObserver) {
            ServerCallStreamObserver<O> serverCallResponse = (ServerCallStreamObserver<O>) response;

            Runnable cancel = new Runnable() {
                @Override
                public void run() {
                    cancellable.cancel();
                }
            };

            serverCallResponse.setOnCloseHandler(cancel);
            serverCallResponse.setOnCancelHandler(cancel);
        }
    }

    public static <I, O> StreamObserver<I> manyToMany(StreamObserver<O> response,
            Function<Multi<I>, Multi<O>> implementation) {
        try {
            streamCollector.add(response);
            UnicastProcessor<I> input = UnicastProcessor.create();
            StreamObserver<I> pump = getStreamObserverFeedingProcessor(input);
            Multi<O> multi = implementation.apply(input);
            if (multi == null) {
                log.error("gRPC service method returned null instead of Multi. " +
                        "Please change the implementation to return a Multi object or throw StatusRuntimeException");
                response.onError(Status.fromCode(Status.Code.INTERNAL).asException());
                return null;
            }
            handleSubscription(multi.subscribe().with(
                    new Consumer<O>() {
                        @Override
                        public void accept(O v) {
                            response.onNext(v);
                        }
                    },
                    new Consumer<Throwable>() {
                        @Override
                        public void accept(Throwable failure) {
                            onError(response, toStatusFailure(failure));
                        }
                    },
                    new Runnable() {
                        @Override
                        public void run() {
                            onCompleted(response);
                        }
                    }), response);

            return pump;
        } catch (Throwable throwable) {
            onError(response, toStatusFailure(throwable));
            return null;
        }
    }

    private static <O> void onCompleted(StreamObserver<O> response) {
        response.onCompleted();
        streamCollector.remove(response);
    }

    private static <O> void onError(StreamObserver<O> response, Throwable error) {
        response.onError(error);
        streamCollector.remove(response);
    }

    private static <I> StreamObserver<I> getStreamObserverFeedingProcessor(UnicastProcessor<I> input) {
        StreamObserver<I> result = new StreamObserver<I>() {
            @Override
            public void onNext(I i) {
                input.onNext(i);
            }

            @Override
            public void onError(Throwable throwable) {
                input.onError(throwable);
                streamCollector.remove(this);
            }

            @Override
            public void onCompleted() {
                input.onComplete();
                streamCollector.remove(this);
            }
        };

        streamCollector.add(result);

        return result;
    }

    private static Throwable toStatusFailure(Throwable throwable) {
        if (throwable instanceof StatusException || throwable instanceof StatusRuntimeException) {
            return throwable;
        } else {
            String desc = throwable.getClass().getName();
            if (throwable.getMessage() != null) {
                desc += " - " + throwable.getMessage();
            }
            if (throwable instanceof IllegalArgumentException) {
                return Status.INVALID_ARGUMENT.withDescription(desc).asException();
            }
            log.warn("gRPC service threw an exception other than StatusRuntimeException", throwable);
            return Status.fromThrowable(throwable)
                    .withDescription(desc)
                    .asException();
        }
    }

    private static void trySetCompression(StreamObserver<?> response, String compression) {
        if (compression != null && response instanceof ServerCallStreamObserver<?>) {
            ServerCallStreamObserver<?> serverResponse = (ServerCallStreamObserver<?>) response;
            serverResponse.setCompression(compression);
        }
    }

    // for dev mode only!
    public static void setStreamCollector(StreamCollector collector) {
        streamCollector = collector;
    }

    public static StreamCollector getStreamCollector() {
        return streamCollector;
    }
}


text:
<?php namespace JetCMS\Models;

use Eloquent;

class Gallery extends Eloquent {

	protected $table = 'gallery';

    public function images()
    {
        return $this->hasMany('App\Image');
    }

}


text:
"""Unit tests for brcd fc san lookup service."""

import mock
from oslo_concurrency import processutils as putils
from oslo_config import cfg

from cinder import exception
from cinder import ssh_utils
from cinder import test
from cinder.volume import configuration as conf
import cinder.zonemanager.drivers.brocade.brcd_fc_san_lookup_service \
    as brcd_lookup
from cinder.zonemanager.drivers.brocade import fc_zone_constants

parsed_switch_port_wwns = ['20:1a:00:05:1e:e8:e3:29',
                           '10:00:00:90:fa:34:40:f6']
switch_data = ("""
 Type Pid    COS     PortName                NodeName                 TTL(sec)
 N    011a00;    2,3;    %(port_1)s;    20:1a:00:05:1e:e8:e3:29;    na
    FC4s: FCP
    PortSymb: [26] "222222 - 1:1:1 - LPe12442"
    NodeSymb: [32] "SomeSym 7211"
    Fabric Port Name: 20:1a:00:05:1e:e8:e3:29
    Permanent Port Name: 22:22:00:22:ac:00:bc:b0
    Port Index: 0
    Share Area: No
    Device Shared in Other AD: No
    Redirect: No
    Partial: No
    LSAN: No
 N    010100;    2,3;    %(port_2)s;    20:00:00:00:af:00:00:af;     na
    FC4s: FCP
    PortSymb: [26] "333333 - 1:1:1 - LPe12442"
    NodeSymb: [32] "SomeSym 2222"
    Fabric Port Name: 10:00:00:90:fa:34:40:f6
    Permanent Port Name: 22:22:00:22:ac:00:bc:b0
    Port Index: 0
    Share Area: No
    Device Shared in Other AD: No
    Redirect: No
    Partial: No
    LSAN: No""" % {'port_1': parsed_switch_port_wwns[0],
                   'port_2': parsed_switch_port_wwns[1]})

_device_map_to_verify = {
    'BRCD_FAB_2': {
        'initiator_port_wwn_list': [parsed_switch_port_wwns[1].replace(':',
                                                                       '')],
        'target_port_wwn_list': [parsed_switch_port_wwns[0].replace(':', '')]}}

class TestBrcdFCSanLookupService(brcd_lookup.BrcdFCSanLookupService,
                                 test.TestCase):

    def setUp(self):
        super(TestBrcdFCSanLookupService, self).setUp()
        self.configuration = conf.Configuration(None)
        self.configuration.set_default('fc_fabric_names', 'BRCD_FAB_2',
                                       'fc-zone-manager')
        self.configuration.fc_fabric_names = 'BRCD_FAB_2'
        self.create_configuration()

    # override some of the functions
    def __init__(self, *args, **kwargs):
        test.TestCase.__init__(self, *args, **kwargs)

    def create_configuration(self):
        fc_fabric_opts = []
        fc_fabric_opts.append(cfg.StrOpt('fc_fabric_address',
                                         default='10.24.49.100', help=''))
        fc_fabric_opts.append(cfg.StrOpt('fc_fabric_user',
                                         default='admin', help=''))
        fc_fabric_opts.append(cfg.StrOpt('fc_fabric_password',
                                         default='password', help='',
                                         secret=True))
        fc_fabric_opts.append(cfg.PortOpt('fc_fabric_port',
                                          default=22, help=''))
        fc_fabric_opts.append(cfg.StrOpt('principal_switch_wwn',
                                         default='100000051e55a100', help=''))
        config = conf.Configuration(fc_fabric_opts, 'BRCD_FAB_2')
        self.fabric_configs = {'BRCD_FAB_2': config}

    @mock.patch.object(brcd_lookup.BrcdFCSanLookupService,
                       'get_nameserver_info')
    @mock.patch('cinder.zonemanager.drivers.brocade.brcd_fc_san_lookup_service'
                '.ssh_utils.SSHPool')
    def test_get_device_mapping_from_network(self, mock_ssh_pool,
                                             get_nameserver_info_mock):
        initiator_list = [parsed_switch_port_wwns[1]]
        target_list = [parsed_switch_port_wwns[0], '20240002ac000a40']
        get_nameserver_info_mock.return_value = parsed_switch_port_wwns
        device_map = self.get_device_mapping_from_network(
            initiator_list, target_list)
        self.assertDictMatch(_device_map_to_verify, device_map)

    @mock.patch.object(brcd_lookup.BrcdFCSanLookupService, '_get_switch_data')
    def test_get_nameserver_info(self, get_switch_data_mock):
        ns_info_list = []

        get_switch_data_mock.return_value = (switch_data)
        # get_switch_data will be called twice with the results appended
        ns_info_list_expected = (parsed_switch_port_wwns +
                                 parsed_switch_port_wwns)

        ns_info_list = self.get_nameserver_info(None)
        self.assertEqual(ns_info_list_expected, ns_info_list)

    @mock.patch.object(putils, 'ssh_execute', return_value=(switch_data, ''))
    @mock.patch.object(ssh_utils.SSHPool, 'item')
    def test__get_switch_data(self, ssh_pool_mock, ssh_execute_mock):
        actual_switch_data = self._get_switch_data(ssh_pool_mock,
                                                   fc_zone_constants.NS_SHOW)
        self.assertEqual(actual_switch_data, switch_data)
        ssh_execute_mock.side_effect = putils.ProcessExecutionError()
        self.assertRaises(exception.FCSanLookupServiceException,
                          self._get_switch_data, ssh_pool_mock,
                          fc_zone_constants.NS_SHOW)

    def test__parse_ns_output(self):
        invalid_switch_data = ' N 011a00;20:1a:00:05:1e:e8:e3:29'
        return_wwn_list = []
        return_wwn_list = self._parse_ns_output(switch_data)
        self.assertEqual(parsed_switch_port_wwns, return_wwn_list)
        self.assertRaises(exception.InvalidParameterValue,
                          self._parse_ns_output, invalid_switch_data)


text:
package git4idea.annotate;

import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vcs.VcsException;
import com.intellij.openapi.vcs.VcsKey;
import com.intellij.openapi.vcs.annotate.*;
import com.intellij.openapi.vcs.history.VcsFileRevision;
import com.intellij.openapi.vcs.history.VcsRevisionNumber;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.text.DateFormatUtil;
import git4idea.GitRevisionNumber;
import git4idea.GitVcs;
import git4idea.i18n.GitBundle;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.*;

/**
 * Git file annotation implementation
 * <p/>
 * Based on the JetBrains SVNAnnotationProvider.
 */
public class GitFileAnnotation extends FileAnnotation {
  private final static Logger LOG = Logger.getInstance("#git4idea.annotate.GitFileAnnotation");

  /**
   * annotated content
   */
  private final StringBuffer myContentBuffer = new StringBuffer();
  /**
   * The currently annotated lines
   */
  private final ArrayList<LineInfo> myLines = new ArrayList<LineInfo>();
  /**
   * The project reference
   */
  private final Project myProject;
  private final VcsRevisionNumber myBaseRevision;
  /**
   * Map from revision numbers to revisions
   */
  private final Map<VcsRevisionNumber, VcsFileRevision> myRevisionMap = new HashMap<VcsRevisionNumber, VcsFileRevision>();

  /**
   * the virtual file for which annotations are generated
   */
  private final VirtualFile myFile;

  private final LineAnnotationAspect DATE_ASPECT = new GitAnnotationAspect(GitAnnotationAspect.DATE, true) {
    public String doGetValue(LineInfo info) {
      final Date date = info.getDate();
      return date == null ? "" : DateFormatUtil.formatPrettyDate(date);
    }
  };

  private final LineAnnotationAspect REVISION_ASPECT = new GitAnnotationAspect(GitAnnotationAspect.REVISION, false) {
    @Override
    protected String doGetValue(LineInfo lineInfo) {
      final GitRevisionNumber revision = lineInfo.getRevision();
      return revision == null ? "" : String.valueOf(revision.getShortRev());
    }
  };

  private final LineAnnotationAspect AUTHOR_ASPECT = new GitAnnotationAspect(GitAnnotationAspect.AUTHOR, true) {
    @Override
    protected String doGetValue(LineInfo lineInfo) {
      final String author = lineInfo.getAuthor();
      return author == null ? "" : author;
    }
  };
  private final GitVcs myVcs;

  /**
   * A constructor
   *
   * @param project     the project of annotation provider
   * @param file        the git root
   * @param monitorFlag if false the file system will not be listened for changes (used for annotated files from the repository).
   * @param revision
   */
  public GitFileAnnotation(@NotNull final Project project, @NotNull VirtualFile file, final boolean monitorFlag, final VcsRevisionNumber revision) {
    super(project);
    myProject = project;
    myVcs = GitVcs.getInstance(myProject);
    myFile = file;
    myBaseRevision = revision == null ? (myVcs.getDiffProvider().getCurrentRevision(file)) : revision;
  }

  /**
   * Add revisions to the list (from log)
   *
   * @param revisions revisions to add
   */
  public void addLogEntries(List<VcsFileRevision> revisions) {
    for (VcsFileRevision vcsFileRevision : revisions) {
      myRevisionMap.put(vcsFileRevision.getRevisionNumber(), vcsFileRevision);
    }
  }

  /**
   * {@inheritDoc}
   */
  public void dispose() {
  }

  /**
   * {@inheritDoc}
   */
  public LineAnnotationAspect[] getAspects() {
    return new LineAnnotationAspect[]{REVISION_ASPECT, DATE_ASPECT, AUTHOR_ASPECT};
  }

  /**
   * {@inheritDoc}
   */
  public String getToolTip(final int lineNumber) {
    if (myLines.size() <= lineNumber || lineNumber < 0) {
      return "";
    }
    final LineInfo info = myLines.get(lineNumber);
    if (info == null) {
      return "";
    }
    VcsFileRevision fileRevision = myRevisionMap.get(info.getRevision());
    if (fileRevision != null) {
      return GitBundle
        .message("annotation.tool.tip", info.getRevision().asString(), info.getAuthor(), info.getDate(),
                 fileRevision.getCommitMessage());
    }
    else {
      return "";
    }
  }

  /**
   * {@inheritDoc}
   */
  public String getAnnotatedContent() {
    return myContentBuffer.toString();
  }

  /**
   * {@inheritDoc}
   */
  public List<VcsFileRevision> getRevisions() {
    final List<VcsFileRevision> result = new ArrayList<VcsFileRevision>(myRevisionMap.values());
    Collections.sort(result, new Comparator<VcsFileRevision>() {
      public int compare(final VcsFileRevision o1, final VcsFileRevision o2) {
        return -1 * o1.getRevisionNumber().compareTo(o2.getRevisionNumber());
      }
    });
    return result;
  }

  public boolean revisionsNotEmpty() {
    return ! myRevisionMap.isEmpty();
  }

  public AnnotationSourceSwitcher getAnnotationSourceSwitcher() {
    return null;
  }

  @Override
  public int getLineCount() {
    return myLines.size();
  }

  /**
   * {@inheritDoc}
   */
  public VcsRevisionNumber getLineRevisionNumber(final int lineNumber) {
    if (lineNumberCheck(lineNumber)) {
      return null;
    }
    final LineInfo lineInfo = myLines.get(lineNumber);
    return lineInfo == null ? null : lineInfo.getRevision();
  }

  private boolean lineNumberCheck(int lineNumber) {
    return myLines.size() <= lineNumber || lineNumber < 0 || myLines.get(lineNumber) == null;
  }

  @Override
  public Date getLineDate(int lineNumber) {
    if (lineNumberCheck(lineNumber)) {
      return null;
    }
    final LineInfo lineInfo = myLines.get(lineNumber);
    return lineInfo == null ? null : lineInfo.getDate();
  }

  /**
   * Get revision number for the line.
   */
  public VcsRevisionNumber originalRevision(int lineNumber) {
    return getLineRevisionNumber(lineNumber);
  }

  /**
   * Append line info
   *
   * @param date       the revision date
   * @param revision   the revision number
   * @param author     the author
   * @param line       the line content
   * @param lineNumber the line number for revision
   * @throws VcsException in case when line could not be processed
   */
  public void appendLineInfo(final Date date,
                             final GitRevisionNumber revision,
                             final String author,
                             final String line,
                             final long lineNumber) throws VcsException {
    int expectedLineNo = myLines.size() + 1;
    if (lineNumber != expectedLineNo) {
      throw new VcsException("Adding for info for line " + lineNumber + " but we are expecting it to be for " + expectedLineNo);
    }
    myLines.add(new LineInfo(date, revision, author));
    myContentBuffer.append(line);
  }

  public int getNumLines() {
    return myLines.size();
  }

  /**
   * Revision annotation aspect implementation
   */
  private abstract class GitAnnotationAspect extends LineAnnotationAspectAdapter {
    public GitAnnotationAspect(String id, boolean showByDefault) {
      super(id, showByDefault);
    }

    public String getValue(int lineNumber) {
      if (lineNumberCheck(lineNumber)) {
        return "";
      }
      else {
        return doGetValue(myLines.get(lineNumber));
      }
    }

    protected abstract String doGetValue(LineInfo lineInfo);

    @Override
    protected void showAffectedPaths(int lineNum) {
      if (lineNum >= 0 && lineNum < myLines.size()) {
        final LineInfo info = myLines.get(lineNum);
        if (info != null) {
          ShowAllAffectedGenericAction.showSubmittedFiles(myProject, info.getRevision(), myFile, GitVcs.getKey());
        }
      }
    }
  }

  /**
   * Line information
   */
  static class LineInfo {
    /**
     * date of the change
     */
    private final Date myDate;
    /**
     * revision number
     */
    private final GitRevisionNumber myRevision;
    /**
     * the author of the change
     */
    private final String myAuthor;

    /**
     * A constructor
     *
     * @param date     date of the change
     * @param revision revision number
     * @param author   the author of the change
     */
    public LineInfo(final Date date, final GitRevisionNumber revision, final String author) {
      myDate = date;
      myRevision = revision;
      myAuthor = author;
    }

    /**
     * @return the revision date
     */
    public Date getDate() {
      return myDate;
    }

    /**
     * @return the revision number
     */
    public GitRevisionNumber getRevision() {
      return myRevision;
    }

    /**
     * @return the author of the change
     */
    public String getAuthor() {
      return myAuthor;
    }
  }

  public VirtualFile getFile() {
    return myFile;
  }

  @Nullable
  @Override
  public VcsRevisionNumber getCurrentRevision() {
    return myBaseRevision;
  }

  @Override
  public VcsKey getVcsKey() {
    return GitVcs.getKey();
  }

  @Override
  public boolean isBaseRevisionChanged(VcsRevisionNumber number) {
    final VcsRevisionNumber currentCurrentRevision = myVcs.getDiffProvider().getCurrentRevision(myFile);
    return myBaseRevision != null && ! myBaseRevision.equals(currentCurrentRevision);
  }
}


text:
\section{Cli\+Menu\+Controller Class Reference}
\label{classCliMenuController}\index{Cli\+Menu\+Controller@{Cli\+Menu\+Controller}}
Inheritance diagram for Cli\+Menu\+Controller\+:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[height=2.000000cm]{classCliMenuController}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
{\bf Cli\+Menu\+Controller} ()
\item
virtual {\bf $\sim$\+Cli\+Menu\+Controller} ()
\item
void {\bf initialize} ({\bf session\+::\+Session\+\_\+\+I\+\_\+ptr} session\+\_\+\+I\+\_\+ptr, {\bf platform\+Config\+::platform\+Config\+\_\+\+I\+\_\+ptr} platform\+Config\+\_\+\+I\+\_\+ptr, {\bf alarms\+::alarm\+Interface\+\_\+ptr} alarm\+Interface\+\_\+ptr)
\end{DoxyCompactItemize}
\subsection*{Additional Inherited Members}

\subsection{Constructor \& Destructor Documentation}
\index{Cli\+Menu\+Controller@{Cli\+Menu\+Controller}!Cli\+Menu\+Controller@{Cli\+Menu\+Controller}}
\index{Cli\+Menu\+Controller@{Cli\+Menu\+Controller}!Cli\+Menu\+Controller@{Cli\+Menu\+Controller}}
\subsubsection[{Cli\+Menu\+Controller()}]{\setlength{\rightskip}{0pt plus 5cm}Cli\+Menu\+Controller\+::\+Cli\+Menu\+Controller (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classCliMenuController_adc869f4309aeaa9500282fe5964fb035}
Constructor \index{Cli\+Menu\+Controller@{Cli\+Menu\+Controller}!````~Cli\+Menu\+Controller@{$\sim$\+Cli\+Menu\+Controller}}
\index{````~Cli\+Menu\+Controller@{$\sim$\+Cli\+Menu\+Controller}!Cli\+Menu\+Controller@{Cli\+Menu\+Controller}}
\subsubsection[{$\sim$\+Cli\+Menu\+Controller()}]{\setlength{\rightskip}{0pt plus 5cm}Cli\+Menu\+Controller\+::$\sim$\+Cli\+Menu\+Controller (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classCliMenuController_ad2cceff432245129f0dac0a985340db5}
Virtual Destructor

\subsection{Member Function Documentation}
\index{Cli\+Menu\+Controller@{Cli\+Menu\+Controller}!initialize@{initialize}}
\index{initialize@{initialize}!Cli\+Menu\+Controller@{Cli\+Menu\+Controller}}
\subsubsection[{initialize(session\+::\+Session\+\_\+\+I\+\_\+ptr session\+\_\+\+I\+\_\+ptr, platform\+Config\+::platform\+Config\+\_\+\+I\+\_\+ptr platform\+Config\+\_\+\+I\+\_\+ptr, alarms\+::alarm\+Interface\+\_\+ptr alarm\+Interface\+\_\+ptr)}]{\setlength{\rightskip}{0pt plus 5cm}void Cli\+Menu\+Controller\+::initialize (
\begin{DoxyParamCaption}
\item[{{\bf session\+::\+Session\+\_\+\+I\+\_\+ptr}}]{session\+\_\+\+I\+\_\+ptr, }
\item[{{\bf platform\+Config\+::platform\+Config\+\_\+\+I\+\_\+ptr}}]{platform\+Config\+\_\+\+I\+\_\+ptr, }
\item[{{\bf alarms\+::alarm\+Interface\+\_\+ptr}}]{alarm\+Interface\+\_\+ptr}
\end{DoxyParamCaption}
)}\label{classCliMenuController_ac44c9135b019f18ce4a9a79423a3e605}
Initialize the Menu and display the Main Menu Options

References Cli\+Menu\+Alarms\+::get\+Alarm\+Inventory(), Cli\+Menu\+Platform\+Config\+::get\+Log\+Levels(), Cli\+Menu\+Alarms\+::get\+Outstanding\+Alarms(), Cli\+Menu\+State\+Actions\+::initialize(), Cli\+Menu\+Platform\+Config\+::initialize(), Cli\+Menu\+Alarms\+::initialize(), Cli\+Menu\+State\+Actions\+::send\+Lock(), Cli\+Menu\+State\+Actions\+::send\+Unlock(), and Cli\+Menu\+Platform\+Config\+::set\+Log\+Level().

Referenced by Cli\+Client\+::process\+Menu().

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item
Cli\+Menu\+Controller.\+h\item
Cli\+Menu\+Controller.\+cpp\end{DoxyCompactItemize}


text:
    <title>Package Listing</title>
    <meta http-equiv="refresh" content="5; url=/" />

Package Listing

      Please see the main page for a full package
      listing. You will be redirected automatically.


text:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
The manually added ant targets for building the Pipestone project.
 -->
<project basedir="." default="deploy" name="Pipestone-main">
	<import file="eclipse-build.xml"/>
    <property name="dist" value="../SafedoorPM-Libs/safedoorpmapi"/>
    <property name="distname" value="pipestone.jar"/>

    <target name="deploy" depends="Pipestone.build">
		<mkdir dir="${dist}"/>
		<jar destfile="${dist}/${distname}" basedir="bin1"/>
    </target>
</project>


text:
package org.exem.flamingo.agent.nn;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.hdfs.server.namenode.Namenode2Agent;
import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * AspectJ를 사용하여 NameNode의 초기화 메소드가 실행할 때 Namenode Agent를 시작하는 Aspect.
 *
 * @author Kyeong Sik, Kim
 * @since 0.1
 * @see org.apache.hadoop.hdfs.server.namenode.NameNode#initialize(Configuration)
 */
@Aspect
public class NameNodeAspectJ {

    private static final Logger LOG = LoggerFactory.getLogger(NameNodeAspectJ.class);

    /**
     * {@link org.apache.hadoop.hdfs.server.namenode.NameNode#initialize(Configuration)}에 대한 pointcut
     */
    @Pointcut("execution(* org.apache.hadoop.hdfs.server.namenode.NameNode.initialize(..))")
    public void aspectTargetMethod() {
    }

    /*
     * {@link NamenodeAspect#aspectTargetMethod()} 의 target이 완료 되었을때 method 실행
     * @param joinPoint jointpoint
     */
    @After("org.exem.flamingo.agent.nn.NameNodeAspectJ.aspectTargetMethod()")
    public void afterInit(JoinPoint joinPoint) {
        Namenode2Agent.start(joinPoint.getThis(), joinPoint.getArgs());
    }
}


text:
package org.lable.oss.dynamicconfig.core.commonsconfiguration;

import org.apache.commons.configuration.tree.ConfigurationNode;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

/**
 * Utility class that converts {@link org.apache.commons.configuration.tree.ConfigurationNode} instances to a plain
 * Java object tree.
 */
public class Objectifier {

    /**
     * Process a node in the Config tree, and store it with its parent node in an object tree.
     * <p>
     * This method recursively calls itself to walk a Config tree.
     *
     * @param parent Parent of the current node, as represented in the Config tree.
     * @return An object tree.
     */
    public static Object traverseTreeAndEmit(ConfigurationNode parent) {
        if (parent.getChildrenCount() == 0) {
            return parent.getValue();
        } else {
            Map<String, Object> map = new LinkedHashMap<>();
            for (Object o : parent.getChildren()) {
                ConfigurationNode child = (ConfigurationNode) o;
                String nodeName = child.getName();
                addToMap(map, nodeName, traverseTreeAndEmit(child));
            }
            return map;
        }
    }

    @SuppressWarnings("unchecked")
    static void addToMap(Map<String, Object> map, String nodeName, Object value) {
        if (map.containsKey(nodeName)) {
            // Trying to add an item with a key that is already used. This means we are
            // dealing with a list.
            Object existing = map.get(nodeName);
            List<Object> list;
            if (existing instanceof List) {
                // Unchecked cast, but correct.
                list = (List<Object>) existing;
            } else {
                list = new ArrayList<>();
                list.add(existing);
            }
            list.add(value);
            map.put(nodeName, list);
        } else {
            map.put(nodeName, value);
        }
    }
}


text:
angular.module('angularBootstrapNavTree', []).directive('abnTree', ['$timeout', function($timeout) {
  return {
    restrict: 'E',
    templateUrl: 'vendor/angular-bootstrap-nav-tree/abn_tree_template.html',
    scope: {
      treeData: '=',
      onSelect: '&',
      initialSelection: '='
    },
    link: function (scope, element, attrs) {
      var expand_level, for_each_branch, on_treeData_change, select_branch, selected_branch;
      if (attrs.iconExpand == null) {
        attrs.iconExpand = 'icon-plus';
      }
      if (attrs.iconCollapse == null) {
        attrs.iconCollapse = 'icon-minus';
      }
      if (attrs.iconLeaf == null) {
        attrs.iconLeaf = 'icon-chevron-right';
      }
      if (attrs.expandLevel == null) {
        attrs.expandLevel = '3';
      }
      expand_level = parseInt(attrs.expandLevel, 10);
      scope.header = attrs.header;
      if (!scope.treeData) {
        alert('no treeData defined for the tree!');
        debugger;
        return;
      }
      if (scope.treeData.length == null) {
        if (treeData.label != null) {
          scope.treeData = [treeData];
        } else {
          alert('treeData should be an array of root branches');
          debugger;
          return;
        }
      }
      for_each_branch = function(f) {
        var do_f, root_branch, _i, _len, _ref, _results;
        do_f = function(branch, level) {
          var child, _i, _len, _ref, _results;
          f(branch, level);
          if (branch.children != null) {
            _ref = branch.children;
            _results = [];
            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              child = _ref[_i];
              _results.push(do_f(child, level + 1));
            }
            return _results;
          }
        };
        _ref = scope.treeData;
        _results = [];
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          root_branch = _ref[_i];
          _results.push(do_f(root_branch, 1));
        }
        return _results;
      };
      for_each_branch(function(b, level) {
        b.level = level;
        return b.expanded = b.level < expand_level;
      });
      selected_branch = null;
      select_branch = function(branch) {
        if (branch !== selected_branch) {
          if (selected_branch != null) {
            selected_branch.selected = false;
          }
          branch.selected = true;
          selected_branch = branch;
          if (branch.onSelect != null) {
            return $timeout(function() {
              return branch.onSelect(branch);
            });
          } else {
            if (scope.onSelect != null) {
              return $timeout(function() {
                return scope.onSelect({
                  branch: branch
                });
              });
            }
          }
        }
      };
      scope.user_clicks_branch = function(branch) {
        if (branch !== selected_branch) {
          return select_branch(branch);
        }
      };
      scope.tree_rows = [];
      on_treeData_change = function() {
        var add_branch_to_list, root_branch, _i, _len, _ref, _results;
        scope.tree_rows = [];
        for_each_branch(function(branch) {
          if (branch.children) {
            if (branch.children.length > 0) {
              return branch.children = branch.children.map(function(e) {
                if (typeof e === 'string') {
                  return {
                    label: e,
                    children: []
                  };
                } else {
                  return e;
                }
              });
            }
          } else {
            return branch.children = [];
          }
        });
        for_each_branch(function(b, level) {
          if (!b.uid) {
            return b.uid = "" + Math.random();
          }
        });
        add_branch_to_list = function(level, branch, visible) {
          var child, child_visible, tree_icon, _i, _len, _ref, _results;
          if (branch.expanded == null) {
            branch.expanded = false;
          }
          if (!branch.children || branch.children.length === 0) {
            tree_icon = attrs.iconLeaf;
          } else {
            if (branch.expanded) {
              tree_icon = attrs.iconCollapse;
            } else {
              tree_icon = attrs.iconExpand;
            }
          }
          scope.tree_rows.push({
            level: level,
            branch: branch,
            label: branch.label,
            tree_icon: tree_icon,
            visible: visible
          });
          if (branch.children != null) {
            _ref = branch.children;
            _results = [];
            for (_i = 0, _len = _ref.length; _i < _len; _i++) {
              child = _ref[_i];
              child_visible = visible && branch.expanded;
              _results.push(add_branch_to_list(level + 1, child, child_visible));
            }
            return _results;
          }
        };
        _ref = scope.treeData;
        _results = [];
        for (_i = 0, _len = _ref.length; _i < _len; _i++) {
          root_branch = _ref[_i];
          _results.push(add_branch_to_list(1, root_branch, true));
        }
        return _results;
      };
      if (attrs.initialSelection != null) {
        for_each_branch(function(b) {
          if (b.label === attrs.initialSelection) {
            return select_branch(b);
          }
        });
      }
      return scope.$watch('treeData', on_treeData_change, true);
    }
  };
}]);


text:
layout: default
---

Hi, I'm
          Boyd Ebsworthy
          {{ site.data.contact.firstname }}. :)

This page has my current contact details

Website

            web

              <object id="email-icon" data="/assets/images/email-icon.svg" type="image/svg+xml"></object>

Email

Phone

(Call, Whatsapp, ...)

              <object id="call-icon" data="/assets/images/mobile-call-icon.svg" type="image/svg+xml"></object>

            <object id="vcard-icon" data="/assets/images/save-vcard-icon.svg" type="image/svg+xml"></object>

Save it to your contacts

            <object data="/assets/images/social-button/linkedin-logo-button.svg" type="image/svg+xml"></object>

            <object data="/assets/images/social-button/instagram-logo-button.svg" type="image/svg+xml"></object>

            <object data="/assets/images/social-button/twitter-logo-button.svg" type="image/svg+xml"></object>


text:
Vana Inflector
========

A common lisp library to easily pluralize and singularize English words.

This is a support package for the [Vana web framework][1], and is a port of the same from Rails' ActiveSupport module.

Installation
------------------

    > (ql:quickload 'vana-inflector)

Usage
-----------
Example Usage:

    > (use-package :vana-inflector)
    > (let ((dollars 1.7)
            (users 34)
            (purchases 1))
           (format nil "The site has ~D ~A, with a total of ~D ~A and $~D ~A"
                   users (pluralize users "user")
                   purchases (pluralize purchases "purchase")
                   dollars (pluralize dollars "dollar")))
    "The site has 34 users, with a total of 1 purchase and $1.7 dollars"

Basic Usage, `plural-of` and `singular-of`:

    > (plural-of "octopus")
    "octopi"
    > (plural-of "datum")
    "data"
    > (singular-of "children")
    "child"
    > (singular-of "cats")
    "cat"
    > (singular-of "data")
    "datum"

Basic Usage, `pluralize`:

    > (pluralize 2 "octopus")
    "octopi"
    > (pluralize 1 "octopus")
    "octopus"

You can pass in the default plural to be used. If not, the inflector is used to determine the plural.

    > (pluralize 2 "tooth" "teeth")
    "teeth"
    > (pluralize 2 "tooth")
    "tooths"

Use `irregular` to add an irregular:

    > (singular-of "feet")
    "feet"
    > (irregular "foot" "feet")
    > (singular-of "feet")
    "foot"
    > (plural-of "foot")
    "feet"

Use `uncountable` to add an uncountable:

    > (plural-of "advice")
    "advices"
    > (singular-of "advice")
    "advice"
    > (singular-of "advices")
    "advice"
    > (uncountable "advice")
    > (plural-of "advice")
    "advice"

TODO
-------
 * Expand the default lookup lists? Possible (but probably negligible) performance tradeoff for completeness
 * Add methods to transfer between CamelCase, whatJavaScriptDoes, this_underscore_style, and-lisp-style

License
---------------

Released under the MIT license, please see `LICENSE` for more details

Thanks
-------------

  - [Xach][2] - For [quicklisp][3], really made getting back into CL much easier.
  - Siebel - For [PCL][4], which has been a great reference.

  [1]: https://github.com/sgrove/vana
  [2]: http://xach.livejournal.com/
  [3]: http://www.quicklisp.org/
  [4]: http://gigamonkeys.com/book/


text:
"use strict";

const $ = require("jquery");
const chat = $("#chat");
const socket = require("../socket");
const sidebar = $("#sidebar");

socket.on("quit", function(data) {
	const id = data.network;
	const network = sidebar.find(`.network[data-uuid="${id}"]`);

	network.children(".chan").each(function() {
		// this = child
		chat.find($(this).attr("data-target")).remove();
	});

	network.remove();

	const chan = sidebar.find(".chan");

	if (chan.length === 0) {
		sidebar.find(".empty").show();

		// Open the connect window
		$("#footer .connect").trigger("click", {
			pushState: false,
		});
	} else {
		chan.eq(0).trigger("click");
	}
});


text:
package com.github.salvatorenovelli.seo.websiteversioning.domain;

import com.github.salvatorenovelli.seo.websiteversioning.model.PageSnapshot;

import java.io.IOException;
import java.net.URI;

public class HtmlReader {

    private final HttpClient httpClient;

    public HtmlReader(HttpClient httpClient) {
        this.httpClient = httpClient;
    }

    public PageSnapshot snapshotPage(URI s) throws IOException {
        return new PageSnapshot(s, httpClient.get(s));
    }

    public PageSnapshot snapshotPage(String uri) throws IOException {
        return snapshotPage(URI.create(uri));
    }
}


text:
import pytest
import six
from flexmock import flexmock

from sqlalchemy_utils import i18n
from sqlalchemy_utils.primitives import WeekDay, WeekDays

Locale = None
try:
    from babel import Locale
except ImportError:
    pass

@pytest.mark.skipif('Locale is None')
class TestWeekDay(object):
    def setup_method(self, method):
        i18n.get_locale = lambda: Locale('fi')

    def test_constructor_with_valid_index(self):
        day = WeekDay(1)
        assert day.index == 1

    @pytest.mark.parametrize('index', [-1, 7])
    def test_constructor_with_invalid_index(self, index):
        with pytest.raises(ValueError):
            WeekDay(index)

    def test_equality_with_equal_week_day(self):
        day = WeekDay(1)
        day2 = WeekDay(1)
        assert day == day2

    def test_equality_with_unequal_week_day(self):
        day = WeekDay(1)
        day2 = WeekDay(2)
        assert day != day2

    def test_equality_with_unsupported_comparison(self):
        day = WeekDay(1)
        assert day != 'foobar'

    def test_hash_is_equal_to_index_hash(self):
        day = WeekDay(1)
        assert hash(day) == hash(day.index)

    def test_representation(self):
        day = WeekDay(1)
        assert repr(day) == "WeekDay(1)"

    @pytest.mark.parametrize(
        ('index', 'first_week_day', 'position'),
        [
            (0, 0, 0),
            (1, 0, 1),
            (6, 0, 6),
            (0, 6, 1),
            (1, 6, 2),
            (6, 6, 0),
        ]
    )
    def test_position(self, index, first_week_day, position):
        i18n.get_locale = flexmock(first_week_day=first_week_day)
        day = WeekDay(index)
        assert day.position == position

    def test_get_name_returns_localized_week_day_name(self):
        day = WeekDay(0)
        assert day.get_name() == u'maanantaina'

    def test_override_get_locale_as_class_method(self):
        day = WeekDay(0)
        assert day.get_name() == u'maanantaina'

    def test_name_delegates_to_get_name(self):
        day = WeekDay(0)
        flexmock(day).should_receive('get_name').and_return(u'maanantaina')
        assert day.name == u'maanantaina'

    def test_unicode(self):
        day = WeekDay(0)
        flexmock(day).should_receive('name').and_return(u'maanantaina')
        assert six.text_type(day) == u'maanantaina'

    def test_str(self):
        day = WeekDay(0)
        flexmock(day).should_receive('name').and_return(u'maanantaina')
        assert str(day) == 'maanantaina'

@pytest.mark.skipif('Locale is None')
class TestWeekDays(object):
    def test_constructor_with_valid_bit_string(self):
        days = WeekDays('1000100')
        assert days._days == set([WeekDay(0), WeekDay(4)])

    @pytest.mark.parametrize(
        'bit_string',
        [
            '000000',    # too short
            '00000000',  # too long
        ]
    )
    def test_constructor_with_bit_string_of_invalid_length(self, bit_string):
        with pytest.raises(ValueError):
            WeekDays(bit_string)

    def test_constructor_with_bit_string_containing_invalid_characters(self):
        with pytest.raises(ValueError):
            WeekDays('foobarz')

    def test_constructor_with_another_week_days_object(self):
        days = WeekDays('0000000')
        another_days = WeekDays(days)
        assert days._days == another_days._days

    def test_representation(self):
        days = WeekDays('0000000')
        assert repr(days) == "WeekDays('0000000')"

    @pytest.mark.parametrize(
        'bit_string',
        [
            '0000000',
            '1000000',
            '0000001',
            '0101000',
            '1111111',
        ]
    )
    def test_as_bit_string(self, bit_string):
        days = WeekDays(bit_string)
        assert days.as_bit_string() == bit_string

    def test_equality_with_equal_week_days_object(self):
        days = WeekDays('0001000')
        days2 = WeekDays('0001000')
        assert days == days2

    def test_equality_with_unequal_week_days_object(self):
        days = WeekDays('0001000')
        days2 = WeekDays('1000000')
        assert days != days2

    def test_equality_with_equal_bit_string(self):
        days = WeekDays('0001000')
        assert days == '0001000'

    def test_equality_with_unequal_bit_string(self):
        days = WeekDays('0001000')
        assert days != '0101000'

    def test_equality_with_unsupported_comparison(self):
        days = WeekDays('0001000')
        assert days != 0

    def test_iterator_starts_from_locales_first_week_day(self):
        i18n.get_locale = lambda: flexmock(first_week_day=1)
        days = WeekDays('1111111')
        indices = list(day.index for day in days)
        assert indices == [1, 2, 3, 4, 5, 6, 0]

    def test_unicode(self):
        i18n.get_locale = lambda: Locale('fi')
        days = WeekDays('1000100')
        assert six.text_type(days) == u'maanantaina, perjantaina'

    def test_str(self):
        i18n.get_locale = lambda: Locale('fi')
        days = WeekDays('1000100')
        assert str(days) == 'maanantaina, perjantaina'


text:
'use strict';

angular.module('ngShowcaseApp').controller('ctrl.table.expanding', function ($scope) {
  var vm = $scope.vm = {};
});


text:
<?php

namespace SAREhub\Microt\App;

use Psr\Http\Message\ServerRequestInterface;
use Psr\Log\LoggerInterface;
use SAREhub\Microt\Util\JsonResponse;
use Slim\Http\Response;

class ErrorHandler
{
    /**
     * @var LoggerInterface
     */
    private $logger;

    public function __construct(LoggerInterface $logger)
    {
        $this->logger = $logger;
    }

    public function __invoke(ServerRequestInterface $rq, Response $resp, \Throwable $e)
    {
        $this->logger->error($e->getMessage(), ["exception" => $e]);
        return JsonResponse::wrap($resp)->internalServerError("exception occur");
    }

}


text:
layout: post
microblog: true
audio:
date: 2018-07-07 13:13:17 -0600
guid: http://craigmcclellan.micro.blog/2018/07/07/just-noticed-this.html
---
Just noticed this in the list of apps with integrations inside Shortcuts. Tapping on it currently does nothing, but I'm excited to see what shows up.

<img src="http://craigmcclellan.com/uploads/2018/8e3fd36bea.jpg" width="600" height="600" />


text:
package dmillerw.bling.helper;

import cpw.mods.fml.common.FMLCommonHandler;
import cpw.mods.fml.relauncher.Side;
import net.minecraftforge.common.MinecraftForge;

/**
 * @author dmillerw
 */
public class EventHelper {

	public static enum Type {
		FML, FORGE, BOTH
	}

	public static void batchRegister(Type type, Side side, Object ... objects) {
		for (Object obj : objects) {
			register(type, side, obj);
		}
	}

	public static void register(Type type, Object instance) {
		register(type, null, instance);
	}

	public static void register(Type type, Side side, Object instance) {
		if (side == null || side == FMLCommonHandler.instance().getEffectiveSide()) {
			if (type == Type.FML || type == Type.BOTH) {
				FMLCommonHandler.instance().bus().register(instance);
			}

			if (type == Type.FORGE || type == Type.BOTH) {
				MinecraftForge.EVENT_BUS.register(instance);
			}
		}
	}
}


text:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<feed><tipo>Rua</tipo><logradouro>E</logradouro><bairro>Jardim Taquaral</bairro><cidade>Assis</cidade><uf>SP</uf><cep>19816320</cep></feed>


text:
<?php
namespace Koklu\MasterData\Model;

/**
 * Shell model, used to work with logs via command line
 *
 * @author      Magento Core Team <core@magentocommerce.com>
 */
class Shell extends \Magento\Framework\App\AbstractShell
{
    /**
     * Command factory
     * @var \Koklu\MasterData\Model\Shell\Command\Factory
     */
    protected $_commandFactory;

    /**
     * Constructor
     * @param \Magento\Framework\Filesystem $filesystem
     * @param string $entryPoint
     * @param \Koklu\MasterData\Model\Shell\Command\Factory $commandFactory
     */
    public function __construct(
        \Magento\Framework\Filesystem $filesystem,
        $entryPoint,
        \Koklu\MasterData\Model\Shell\Command\Factory $commandFactory
    ) {
        parent::__construct($filesystem, $entryPoint);
        $this->_commandFactory = $commandFactory;
    }

    /**
     * Runs script
     *
     * @return $this
     */
    public function run()
    {
        if ($this->_showHelp()) {
            return $this;
        }

        if ($this->getArg('export')) {
            $this->_runExport();
        } else {
            echo $this->getUsageHelp();
        }

        return $this;
    }

    /**
     * Runs export command
     *
     * @return string
     */
    protected function _runExport()
    {
        $productIds = $this->getArg('productIds') ? explode(',', $this->getArg('productIds')) : [];

        $this->_commandFactory->createExportCommand()->execute($productIds);
    }

    /**
     * Retrieves usage help message
     *
     * @return string
     */
    public function getUsageHelp()
    {
        return <<<USAGE
Usage:  php -f {$this->_entryPoint} [options] export

  --productIds <ids> Limit export by comma-separated product IDs
  export             Export products to recommender system
  help               This help

USAGE;
    }
}


text:
package describe

import (
	"bytes"
	"fmt"
	"io"
	"os"
	"strings"
	"text/tabwriter"

	"github.com/openshift/source-to-image/pkg/api"
)

// Config returns the Config object in nice readable, tabbed format.
func DescribeConfig(config *api.Config) string {
	out, err := tabbedString(func(out io.Writer) error {
		fmt.Fprintf(out, "Builder Image:\t%s\n", config.BuilderImage)
		fmt.Fprintf(out, "Source:\t%s\n", config.Source)
		if len(config.Ref) > 0 {
			fmt.Fprintf(out, "Source Ref:\t%s\n", config.Ref)
		}
		if len(config.ContextDir) > 0 {
			fmt.Fprintf(out, "Context Directory:\t%s\n", config.ContextDir)
		}
		fmt.Fprintf(out, "Output Image Tag:\t%s\n", config.Tag)
		printEnv(out, config.Environment)
		if len(config.EnvironmentFile) > 0 {
			fmt.Fprintf(out, "Environment File:\t%s\n", config.EnvironmentFile)
		}
		fmt.Fprintf(out, "Incremental Build:\t%s\n", printBool(config.Incremental))
		fmt.Fprintf(out, "Remove Old Build:\t%s\n", printBool(config.RemovePreviousImage))
		fmt.Fprintf(out, "Force Pull:\t%s\n", printBool(config.ForcePull))
		fmt.Fprintf(out, "Quiet:\t%s\n", printBool(config.Quiet))
		fmt.Fprintf(out, "Layered Build:\t%s\n", printBool(config.LayeredBuild))
		if len(config.Destination) > 0 {
			fmt.Fprintf(out, "Artifacts Destination:\t%s\n", config.Destination)
		}
		if len(config.CallbackURL) > 0 {
			fmt.Fprintf(out, "Callback URL:\t%s\n", config.CallbackURL)
		}
		if len(config.ScriptsURL) > 0 {
			fmt.Fprintf(out, "STI Scripts URL:\t%s\n", config.ScriptsURL)
		}
		if len(config.WorkingDir) > 0 {
			fmt.Fprintf(out, "Workdir:\t%s\n", config.WorkingDir)
		}
		fmt.Fprintf(out, "Docker Endpoint:\t%s\n", config.DockerConfig.Endpoint)

		if _, err := os.Open(config.DockerCfgPath); err == nil {
			fmt.Fprintf(out, "Docker Pull Config:\t%s\n", config.DockerCfgPath)
			fmt.Fprintf(out, "Docker Pull User:\t%s\n", config.PullAuthentication.Username)
		}
		return nil
	})
	if err != nil {
		fmt.Printf("ERROR: %v", err)
	}
	return out
}

func printEnv(out io.Writer, env map[string]string) {
	if len(env) == 0 {
		return
	}
	result := []string{}
	for k, v := range env {
		result = append(result, fmt.Sprintf("%s=%s", k, v))
	}
	fmt.Fprintf(out, "Environment:\t%s\n", strings.Join(result, ","))
}

func printBool(b bool) string {
	if b {
		return "\033[1menabled\033[0m"
	}
	return "disabled"
}

func tabbedString(f func(io.Writer) error) (string, error) {
	out := new(tabwriter.Writer)
	buf := &bytes.Buffer{}
	out.Init(buf, 0, 8, 1, '\t', 0)

	err := f(out)
	if err != nil {
		return "", err
	}

	out.Flush()
	str := string(buf.String())
	return str, nil
}


text: print("{ \"result\" : true, msg : \"Hello World!\" }")


text:
#include "SecAsn1Coder.h"
#include "plarenas.h"
#include "prerror.h"
#include "seccomon.h"
#include "secasn1.h"
#include <Security/SecBase.h>

/*
 * Default chunk size for new arena pool.
 * FIXME: analyze & measure different defaults here. I'm pretty sure
 * that only performance - not correct behavior - is affected by
 * an arena pool's chunk size.
 */
#define CHUNKSIZE_DEF		1024

/*
 * Caller's SecAsn1CoderRef points to one of these.
 */
typedef struct SecAsn1Coder {
	PLArenaPool		*mPool;
} SecAsn1Coder_t;

/*
 * Create/destroy SecAsn1Coder object.
 */
OSStatus SecAsn1CoderCreate(
	SecAsn1CoderRef  *coder)
{
	if(coder == NULL) {
		return errSecParam;
	}
	SecAsn1CoderRef _coder = (SecAsn1CoderRef)malloc(sizeof(SecAsn1Coder_t));
	_coder->mPool = PORT_NewArena(CHUNKSIZE_DEF);
	if(_coder->mPool == NULL) {
        free(_coder);
		return errSecAllocate;
	}
	*coder = _coder;
	return errSecSuccess;
}

OSStatus SecAsn1CoderRelease(
	SecAsn1CoderRef  coder)
{
	if(coder == NULL) {
		return errSecParam;
	}
	if(coder->mPool != NULL) {
		/*
		 * Note: we're asking for a memory zero here, but
		 * PORT_FreeArena doesn't do that (yet).
		 */
		PORT_FreeArena(coder->mPool, PR_TRUE);
		coder->mPool = NULL;
	}
	free(coder);
	return errSecSuccess;
}

/*
 * DER decode an untyped item per the specified template array.
 * The result is allocated in this SecAsn1Coder's memory pool and
 * is freed when this object is released.
 *
 * The dest pointer is a template-specific struct allocated by the caller
 * and must be zeroed by the caller.
 */
OSStatus SecAsn1Decode(
	SecAsn1CoderRef			coder,
	const void				*src,		// DER-encoded source
	size_t					len,
	const SecAsn1Template 	*templ,
	void					*dest)
{
	if((coder == NULL) || (src == NULL) || (templ == NULL) || (dest == NULL)) {
		return errSecParam;
	}
	SECStatus prtn = SEC_ASN1Decode(coder->mPool, dest, templ, (const char *)src, len);
	if(prtn) {
		return errSecDecode;
	}
	else {
		return errSecSuccess;
	}
}

/*
 * Convenience routine, decode from a SecAsn1Item.
 */
OSStatus SecAsn1DecodeData(
	SecAsn1CoderRef			coder,
	const SecAsn1Item			*src,
	const SecAsn1Template 	*templ,
	void					*dest)
{
	return SecAsn1Decode(coder, src->Data, src->Length, templ, dest);
}

/*
 * DER encode. The encoded data (in dest.Data) is allocated in this
 * SecAsn1Coder's memory pool and is freed when this object is released.
 *
 * The src pointer is a template-specific struct.
 */
OSStatus SecAsn1EncodeItem(
	SecAsn1CoderRef			coder,
	const void				*src,
	const SecAsn1Template 	*templ,
	SecAsn1Item				*dest)
{
	if((coder == NULL) || (src == NULL) || (templ == NULL) || (dest == NULL)) {
		return errSecParam;
	}
	dest->Data = NULL;
	dest->Length = 0;

	SecAsn1Item *rtnItem = SEC_ASN1EncodeItem(coder->mPool, dest, src, templ);
	if(rtnItem == NULL) {
		/* FIXME what to return here? */
		return errSecParam;
	}
	else {
		return errSecSuccess;
	}
}

/*
 * Some alloc-related methods which come in handy when using
 * this object. All memory is allocated using this object's
 * memory pool. Caller never has to free it. Used for
 * temp allocs of memory which only needs a scope which is the
 * same as this object.
 *
 * These return a errSecAllocate in the highly unlikely event of
 * a malloc failure.
 */
void *SecAsn1Malloc(
	SecAsn1CoderRef			coder,
	size_t					len)
{
	if(coder == NULL) {
		return NULL;
	}
	return PORT_ArenaAlloc(coder->mPool, len);
}

/* malloc item.Data, set item.Length */
OSStatus SecAsn1AllocItem(
	SecAsn1CoderRef			coder,
	SecAsn1Item				*item,
	size_t					len)
{
	if((coder == NULL) || (item == NULL)) {
		return errSecParam;
	}
	item->Data = (uint8_t *)PORT_ArenaAlloc(coder->mPool, len);
	if(item->Data == NULL) {
		return errSecAllocate;
	}
	item->Length = len;
	return errSecSuccess;
}

/* malloc and copy, various forms */
OSStatus SecAsn1AllocCopy(
	SecAsn1CoderRef			coder,
	const void				*src,
	size_t					len,
	SecAsn1Item				*dest)
{
	if(src == NULL) {
		return errSecParam;
	}
	OSStatus ortn = SecAsn1AllocItem(coder, dest, len);
	if(ortn) {
		return ortn;
	}
	memmove(dest->Data, src, len);
	return errSecSuccess;
}

OSStatus SecAsn1AllocCopyItem(
	SecAsn1CoderRef			coder,
	const SecAsn1Item			*src,
	SecAsn1Item				*dest)
{
	return SecAsn1AllocCopy(coder, src->Data, src->Length, dest);
}

bool SecAsn1OidCompare(const SecAsn1Oid *oid1, const SecAsn1Oid *oid2) {
	if (!oid1 || !oid2)
		return oid1 == oid2;
	if (oid1->Length != oid2->Length)
		return false;
	return !memcmp(oid1->Data, oid2->Data, oid1->Length);
}


text:
namespace _07.FoodShortage.Population
{
    using _07.FoodShortage.Interfaces;

    public class Robot : INumber
    {
        public Robot(string model, string id)
        {
            this.Model = model;
            this.ID = id;
        }

        public string Model { get; set; }

        public string ID { get; set; }
    }
}


text:
<!-- <!DOCTYPE web-app PUBLIC
 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "http://java.sun.com/dtd/web-app_2_3.dtd" >

 -->
 <web-app xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
	      http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
	version="2.5">

	<display-name>Counter Web Application</display-name>

	<servlet>
		<servlet-name>mvc-dispatcher</servlet-name>
		<servlet-class>
                        org.springframework.web.servlet.DispatcherServlet
                </servlet-class>
		<load-on-startup>1</load-on-startup>
	</servlet>

	<servlet-mapping>
		<servlet-name>mvc-dispatcher</servlet-name>
		<url-pattern>/</url-pattern>
	</servlet-mapping>

	<context-param>
		<param-name>contextConfigLocation</param-name>
		<param-value>/WEB-INF/mvc-dispatcher-servlet.xml</param-value>
	</context-param>

	<listener>
		<listener-class>
                   org.springframework.web.context.ContextLoaderListener
                </listener-class>
	</listener>
</web-app>


text:
package com.wookler.server.river.remote.response.json;

import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.wookler.server.river.remote.common.RestResponse;
import com.wookler.server.river.remote.response.EOpType;

/**
 * Wrapper class for defining responses received from REST operations.
 *
 * @author Subho Ghosh (subho dot ghosh at outlook.com)
 * @created 12/09/14
 */
@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.PROPERTY, property = "@class")
public class RestOpResponse extends RestResponse {
    private EOpType operation;
    private long starttime;
    private long endtime;

    /**
     * Get the Operation type this response is for.
     *
     * @return - Operation type.
     */
    public EOpType getOperation() {
        return operation;
    }

    /**
     * Set the Operation type this response is for.
     *
     * @param operation - Operation type.
     */
    public void setOperation(EOpType operation) {
        this.operation = operation;
    }

    /**
     * Get the operation start timestamp on the server.
     *
     * @return - Operation start timestamp.
     */
    public long getStarttime() {
        return starttime;
    }

    /**
     * Set the operation start timestamp on the server.
     *
     * @param starttime - Current timestamp.
     */
    public void setStarttime(long starttime) {
        this.starttime = starttime;
    }

    /**
     * Get the operation end timestamp on the server.
     *
     * @return - Operation end timestamp.
     */
    public long getEndtime() {
        return endtime;
    }

    /**
     * Set the operation end timestamp on the server.
     *
     * @param endtime - Current timestamp.
     */
    public void setEndtime(long endtime) {
        this.endtime = endtime;
    }
}


text:
<!DOCTYPE HTML>

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <meta http-equiv="Content-Language" content="en-US" />
        <title>Example splash screen for HTML5 device mockups</title>

        <link rel="stylesheet" type="text/css" href="./device-mockups/device-mockups2.css" />

HTML5 Device Mockups

Boost the appearance of your splashscreens and websites with these HTML5 mockups of popular devices.


text:
'use strict';

// MODULES //

var tape = require( 'tape' );
var linspace = require( '@stdlib/array/base/linspace' );
var isnan = require( '@stdlib/math/base/assert/is-nan' );
var gamma = require( '@stdlib/math/base/special/gamma' );
var abs = require( '@stdlib/math/base/special/abs' );
var exp = require( '@stdlib/math/base/special/exp' );
var pow = require( '@stdlib/math/base/special/pow' );
var EPS = require( '@stdlib/constants/float64/eps' );
var G = require( '@stdlib/constants/float64/gamma-lanczos-g' );
var gammaLanczosSumExpGScaled = require( './../lib' );

// TESTS //

tape( 'main export is a function', function test( t ) {
	t.ok( true, __filename );
	t.equal( typeof gammaLanczosSumExpGScaled, 'function', 'main export is a function' );
	t.end();
});

tape( 'if provided `NaN`, the function returns `NaN`', function test( t ) {
	var v = gammaLanczosSumExpGScaled( NaN );
	t.equal( isnan( v ), true, 'returns NaN when provided a NaN' );
	t.end();
});

tape( 'the function evaluates the Lanczos sum (scaled by exp(-g))', function test( t ) {
	var expected;
	var delta;
	var tol;
	var i;
	var x;
	var y;

	x = linspace( 1.0, 100.0, 500 );
	for ( i = 0; i < x.length; i++ ) {
		y = gammaLanczosSumExpGScaled( x[i] );
		expected = gamma( x[i] );
		expected /= pow( x[i]+G-0.5, x[i]-0.5 ) / ( exp( x[i]+G-0.5 ) );
		expected /= exp( G );
		if ( y === expected ) {
			t.equal( y, expected, 'x: '+x[i]+', y: '+y+', expected: '+expected );
		} else {
			delta = abs( y - expected );
			tol = 10.0 * EPS * abs( expected );
			t.ok( delta <= tol, 'within tolerance. x: '+x[i]+'. y: '+y+'. E: '+expected+'. Δ: '+delta+'. tol: '+tol );
		}
	}
	t.end();
});