text:
#ifndef __GTK_FILE_FILTER_H__
#define __GTK_FILE_FILTER_H__

#if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
#error "Only <gtk/gtk.h> can be included directly."
#endif

#include <glib-object.h>
#include <gdk/gdk.h>

G_BEGIN_DECLS

#define GTK_TYPE_FILE_FILTER              (gtk_file_filter_get_type ())
#define GTK_FILE_FILTER(obj)              (G_TYPE_CHECK_INSTANCE_CAST ((obj), GTK_TYPE_FILE_FILTER, GtkFileFilter))
#define GTK_IS_FILE_FILTER(obj)           (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GTK_TYPE_FILE_FILTER))

typedef struct _GtkFileFilter     GtkFileFilter;
typedef struct _GtkFileFilterInfo GtkFileFilterInfo;

/**
 * GtkFileFilterFlags:
 * @GTK_FILE_FILTER_FILENAME: the filename of the file being tested
 * @GTK_FILE_FILTER_URI: the URI for the file being tested
 * @GTK_FILE_FILTER_DISPLAY_NAME: the string that will be used to
 *   display the file in the file chooser
 * @GTK_FILE_FILTER_MIME_TYPE: the mime type of the file
 *
 * These flags indicate what parts of a #GtkFileFilterInfo struct
 * are filled or need to be filled.
 */
typedef enum {
  GTK_FILE_FILTER_FILENAME     = 1 << 0,
  GTK_FILE_FILTER_URI          = 1 << 1,
  GTK_FILE_FILTER_DISPLAY_NAME = 1 << 2,
  GTK_FILE_FILTER_MIME_TYPE    = 1 << 3
} GtkFileFilterFlags;

/**
 * GtkFileFilterFunc:
 * @filter_info: a #GtkFileFilterInfo that is filled according
 *   to the @needed flags passed to gtk_file_filter_add_custom()
 * @data: (closure): user data passed to gtk_file_filter_add_custom()
 *
 * The type of function that is used with custom filters, see
 * gtk_file_filter_add_custom().
 *
 * Returns: %TRUE if the file should be displayed
 */
typedef gboolean (*GtkFileFilterFunc) (const GtkFileFilterInfo *filter_info,
				       gpointer                 data);

/**
 * GtkFileFilterInfo:
 * @contains: Flags indicating which of the following fields need
 *   are filled
 * @filename: the filename of the file being tested
 * @uri: the URI for the file being tested
 * @display_name: the string that will be used to display the file
 *   in the file chooser
 * @mime_type: the mime type of the file
 *
 * A #GtkFileFilterInfo-struct is used to pass information about the
 * tested file to gtk_file_filter_filter().
 */
struct _GtkFileFilterInfo
{
  GtkFileFilterFlags contains;

  const gchar *filename;
  const gchar *uri;
  const gchar *display_name;
  const gchar *mime_type;
};

GDK_AVAILABLE_IN_ALL
GType gtk_file_filter_get_type (void) G_GNUC_CONST;

GDK_AVAILABLE_IN_ALL
GtkFileFilter *       gtk_file_filter_new      (void);
GDK_AVAILABLE_IN_ALL
void                  gtk_file_filter_set_name (GtkFileFilter *filter,
						const gchar   *name);
GDK_AVAILABLE_IN_ALL
const gchar *         gtk_file_filter_get_name (GtkFileFilter *filter);

GDK_AVAILABLE_IN_ALL
void gtk_file_filter_add_mime_type      (GtkFileFilter      *filter,
					 const gchar        *mime_type);
GDK_AVAILABLE_IN_ALL
void gtk_file_filter_add_pattern        (GtkFileFilter      *filter,
					 const gchar        *pattern);
GDK_AVAILABLE_IN_ALL
void gtk_file_filter_add_pixbuf_formats (GtkFileFilter      *filter);
GDK_AVAILABLE_IN_ALL
void gtk_file_filter_add_custom         (GtkFileFilter      *filter,
					 GtkFileFilterFlags  needed,
					 GtkFileFilterFunc   func,
					 gpointer            data,
					 GDestroyNotify      notify);

GDK_AVAILABLE_IN_ALL
GtkFileFilterFlags gtk_file_filter_get_needed (GtkFileFilter           *filter);
GDK_AVAILABLE_IN_ALL
gboolean           gtk_file_filter_filter     (GtkFileFilter           *filter,
					       const GtkFileFilterInfo *filter_info);

G_END_DECLS

#endif /* __GTK_FILE_FILTER_H__ */


text:
[![Discord Bots](https://top.gg/api/widget/servers/349394562336292876.svg)](https://top.gg/bot/349394562336292876)
[![Build Status](https://travis-ci.org/bryanforbes/Erasmus.svg?branch=master)](https://travis-ci.org/bryanforbes/Erasmus)
[![codecov](https://codecov.io/gh/bryanforbes/Erasmus/branch/master/graph/badge.svg)](https://codecov.io/gh/bryanforbes/Erasmus)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://github.com/bryanforbes/botus_receptus/blob/master/LICENSE)
[![Checked with mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)

A Bible bot for Discord

[Invite Erasmus to your server](https://discord.com/oauth2/authorize?client_id=349394562336292876&scope=bot+applications.commands&permissions=275414871104)

## Commands

* `/verse` - Look up a verse in your preferred or selected version
* `/search` - Search for terms in your preferred or selected version
* `/bibles` - List the Bible versions supported
* `/bibleinfo` - Display information about the specified Bible version
* `/version set` - Set your preferred version
* `/version clear` - Clear your preferred version
* `/version show` - Display information about how Erasmus will display verses for you
* `/serverprefs version set` - Set the server's preferred version (Administrator only)
* `/serverprefs version clear` - Clear the server's preferred version (Administrator only)
* `/serverprefs version show` - Display the server's preferred version (Administrator only)
* `/creed apostles` - Display The Apostles' Creed
* `/creed athanasian` - Display The Athanasian Creed
* `/creed chalcedon` - Display The Chalcedonian Definition
* `/creed nicene` - Display The Nicene Creed
* `/creed nicene325` - Display The Nicene Creed (325 AD)
* `/creed nicene381` - Display The Nicene Creed (381 AD)
* `/confess cite` - Cite the specified section from the selected confession or catechism
* `/confess search` - Search for terms in the selected confession or catechism
* `/invite` - Get a link to invite Erasmus to your server
* `/about` - Information about Erasmus
* `/news` - News from the latest release

## Bracket Notation

In addition to the slash-commands listed above, Erasmus will respond to all verse references surrounded in brackets (ex. `[John 1:1]`) anywhere in a message. By default, Erasmus will look up the verse using the user's default version (set with `/version set`), the servers's default version (`/serverprefs version set`), or the ESV. Users can also specify a version to use by appending the version abbreviation after the verse (ex. `[John 1:1 KJV]`).

## Data Privacy Policy

Erasmus retains the following data:

* A user's internal Discord ID (a [snowflake](https://discord.com/developers/docs/reference#snowflakes)) ONLY if the user sets a preferred version using `/version set` (this can be deleted using `/version clear`)
* A guild's internal Discord ID (a [snowflake](https://discord.com/developers/docs/reference#snowflakes)) ONLY if a guild administrator sets a preferred version for the guild using `/serverprefs version set` (this can be deleted using `/serverprefs version clear`)

Erasmus **never** retains message content.

## Setup

Ensure that [Poetry](https://python-poetry.org/) is [installed](https://python-poetry.org/docs/#installation)

### Running

```
poetry install --only main
poetry run erasmus
```

### Development

```
poetry install
poetry run erasmus
```

redpajama_set_name: RedPajamaGithub


text:
#include <DromeXml/XmlElement.h>
#include <DromeXml/XmlException.h>
#include "XmlUtil.h"

using namespace std;

namespace DromeXml {

XmlElement::XmlElement(XmlElement *parent, const char *name)
{
	m_parent = parent;
	m_name = name;
}

XmlElement::~XmlElement()
{
	// delete attributes
	for(unsigned int i = 0; i < m_attributes.size(); ++i)
		delete m_attributes[i];

	// delete children
	for(unsigned int i = 0; i < m_children.size(); ++i)
		delete m_children[i];
}

XmlElement *
XmlElement::getParent()
{
	return m_parent;
}

string
XmlElement::getName() const
{
	return m_name;
}

void
XmlElement::setName(const char *name)
{
	m_name = name;
}

string
XmlElement::getContent() const
{
	return m_content;
}

void
XmlElement::setContent(const char *content)
{
	m_content = content;
}

unsigned int
XmlElement::getNumAttributes() const
{
	return (unsigned int)m_attributes.size();
}

const XmlAttribute *
XmlElement::getAttribute(unsigned int index) const
{
	if(index >= m_attributes.size())
		throw XmlException("XmlElement::getAttribute(): Invalid index");

	return m_attributes[index];
}

const XmlAttribute *
XmlElement::getAttribute(const string &name) const
{
	for(unsigned int i = 0; i < m_attributes.size(); ++i) {
		if(name == m_attributes[i]->getName())
			return m_attributes[i];
	}

	return NULL;
}

const XmlAttribute *
XmlElement::getAttribute(const char *name) const
{
	return getAttribute(string(name));
}

void
XmlElement::addAttribute(XmlAttribute *attribute)
{
	m_attributes.insert(m_attributes.end(), attribute);
}

unsigned int
XmlElement::getNumChildren() const
{
	return (unsigned int)m_children.size();
}

const XmlElement *
XmlElement::getChild(unsigned int index) const
{
	if(index >= m_children.size())
		throw XmlException("XmlElement::getChild(): Invalid index");

	return m_children[index];
}

const XmlElement *
XmlElement::getChild(const string &name) const
{
	for(unsigned int i = 0; i < m_children.size(); ++i) {
		if(name == m_children[i]->getName())
			return m_children[i];
	}

	return NULL;
}

const XmlElement *
XmlElement::getChild(const char *name) const
{
	return getChild(string(name));
}

void
XmlElement::addChild(XmlElement *child)
{
	m_children.insert(m_children.end(), child);
}

string
XmlElement::toString(int tabLevel) const
{
	string str;

	for(int i = 0; i < tabLevel; ++i)
		str += '\t';

	// if the element has no name, it's a text data
	// element and its content can just be returned
	if(m_name.length() == 0) {
		str += encodeString(m_content);
		return str;
	}

	str += "<" + m_name;

	// append attributes to string
	for(unsigned int i = 0; i < m_attributes.size(); ++i)
		str += " " + m_attributes[i]->toString();

	// append children to string
	if(m_children.size() != 0) {
		str += ">";

		for(unsigned int i = 0; i < m_children.size(); ++i)
			str += '\n' + m_children[i]->toString(tabLevel + 1);

		str += '\n';
		for(int i = 0; i < tabLevel; ++i)
			str += '\t';
		str += "</" + m_name + ">";
	} else {
		str += " />";
	}

	return str;
}

} // namespace DromeXml


text:
package ru.spb.kpit.kivan.XML.XMLSerializer.OCreator.instantiator.gcj;

import java.io.IOException;
import java.io.ObjectInputStream;
import java.lang.reflect.Method;

import ru.spb.kpit.kivan.XML.XMLSerializer.OCreator.ObjenesisException;
import ru.spb.kpit.kivan.XML.XMLSerializer.OCreator.instantiator.ObjectInstantiator;

/**
 * Base class for GCJ-based instantiators. It initializes reflection access to method
 * ObjectInputStream.newObject, as well as creating a dummy ObjectInputStream to be used as the
 * "this" argument for the method.
 *
 * @author Leonardo Mesquita
 */
public abstract class GCJInstantiatorBase implements ObjectInstantiator {
   static Method newObjectMethod = null;
   static ObjectInputStream dummyStream;

   private static class DummyStream extends ObjectInputStream {
      public DummyStream() throws IOException {
      }
   }

   private static void initialize() {
      if(newObjectMethod == null) {
         try {
            newObjectMethod = ObjectInputStream.class.getDeclaredMethod("newObject", new Class[] {
               Class.class, Class.class});
            newObjectMethod.setAccessible(true);
            dummyStream = new DummyStream();
         }
         catch(RuntimeException e) {
            throw new ObjenesisException(e);
         }
         catch(NoSuchMethodException e) {
            throw new ObjenesisException(e);
         }
         catch(IOException e) {
            throw new ObjenesisException(e);
         }
      }
   }

   protected final Class type;

   public GCJInstantiatorBase(Class type) {
      this.type = type;
      initialize();
   }

   public abstract Object newInstance();
}


text:
package org.apache.pig.backend.hadoop.executionengine.physicalLayer.expressionOperators;

import java.util.HashMap;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.pig.PigException;
import org.apache.pig.backend.executionengine.ExecException;
import org.apache.pig.backend.hadoop.executionengine.physicalLayer.POStatus;
import org.apache.pig.backend.hadoop.executionengine.physicalLayer.Result;
import org.apache.pig.backend.hadoop.executionengine.physicalLayer.plans.PhyPlanVisitor;
import org.apache.pig.data.DataType;
import org.apache.pig.impl.plan.NodeIdGenerator;
import org.apache.pig.impl.plan.OperatorKey;
import org.apache.pig.impl.plan.VisitorException;

public class NotEqualToExpr extends BinaryComparisonOperator {

    /**
     *
     */
    private static final long serialVersionUID = 1L;
    transient private final Log log = LogFactory.getLog(getClass());

    public NotEqualToExpr(OperatorKey k) {
        this(k, -1);
    }

    public NotEqualToExpr(OperatorKey k, int rp) {
        super(k, rp);
        resultType = DataType.BOOLEAN;
    }

    @Override
    public String name() {
        return "Not Equal To" + "[" + DataType.findTypeName(resultType) + "]" +" - " + mKey.toString();
    }

    @Override
    public void visit(PhyPlanVisitor v) throws VisitorException {
        v.visitNotEqualTo(this);
    }

    @Override
    public Result getNextBoolean() throws ExecException {
        Result left, right;

        switch (operandType) {
        case DataType.BYTEARRAY:
        case DataType.DOUBLE:
        case DataType.FLOAT:
        case DataType.BOOLEAN:
        case DataType.INTEGER:
        case DataType.BIGINTEGER:
        case DataType.BIGDECIMAL:
        case DataType.LONG:
        case DataType.DATETIME:
        case DataType.CHARARRAY:
        case DataType.TUPLE:
        case DataType.MAP: {
            Result r = accumChild(null, operandType);
            if (r != null) {
                return r;
            }
            left = lhs.getNext(operandType);
            right = rhs.getNext(operandType);
            return doComparison(left, right);
        }
        default: {
            int errCode = 2067;
            String msg = this.getClass().getSimpleName() + " does not know how to " +
            "handle type: " + DataType.findTypeName(operandType);
            throw new ExecException(msg, errCode, PigException.BUG);
        }

        }
    }

    @SuppressWarnings("unchecked")
    private Result doComparison(Result left, Result right) throws ExecException {
        if (left.returnStatus != POStatus.STATUS_OK) {
            return left;
        }
        if (right.returnStatus != POStatus.STATUS_OK) {
            return right;
        }
        // if either operand is null, the result should be
        // null
        if(left.result == null || right.result == null) {
            left.result = null;
            left.returnStatus = POStatus.STATUS_OK;
            return left;
        }

        if (left.result instanceof Comparable && right.result instanceof Comparable){
            if (((Comparable)left.result).compareTo(right.result) != 0) {
                left.result = Boolean.TRUE;
            } else {
                left.result = Boolean.FALSE;
            }
        }else if (left.result instanceof HashMap && right.result instanceof HashMap){
            HashMap leftMap=(HashMap)left.result;
            HashMap rightMap=(HashMap)right.result;
            if (leftMap.equals(rightMap)) {
                left.result = Boolean.FALSE;
            } else {
                left.result = Boolean.TRUE;
            }
        }else{
            throw new ExecException("The left side and right side has the different types");
        }
        illustratorMarkup(null, left.result, (Boolean) left.result ? 0 : 1);
        return left;
    }

    @Override
    public NotEqualToExpr clone() throws CloneNotSupportedException {
        NotEqualToExpr clone = new NotEqualToExpr(new OperatorKey(mKey.scope,
            NodeIdGenerator.getGenerator().getNextNodeId(mKey.scope)));
        clone.cloneHelper(this);
        return clone;
    }
}


text:
// Copyright 2000-2020 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.ide.customize;

import com.intellij.ide.IdeBundle;
import com.intellij.ide.actions.CreateDesktopEntryAction;
import com.intellij.ide.plugins.PluginManagerCore;
import com.intellij.idea.ActionsBundle;
import com.intellij.openapi.application.ApplicationBundle;
import com.intellij.openapi.ui.Messages;
import com.intellij.openapi.util.EmptyRunnable;
import com.intellij.openapi.util.IconLoader;
import com.intellij.util.ExceptionUtil;
import com.intellij.util.ui.GridBag;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;

import javax.swing.*;
import java.awt.*;

/**
 * @author Alexander Lobas
 */
public class CustomizeDesktopEntryStep extends AbstractCustomizeWizardStep {
  public static boolean isAvailable() {
    return System.getProperty("idea.skip.desktop.entry.step") == null && CreateDesktopEntryAction.isAvailable();
  }

  private final JCheckBox myCreateEntryCheckBox = new JCheckBox(ActionsBundle.message("action.CreateDesktopEntry.description"));
  private final JCheckBox myGlobalEntryCheckBox = new JCheckBox(ApplicationBundle.message("desktop.entry.system.wide"));

  public CustomizeDesktopEntryStep(@NonNls String iconPath) {
    setLayout(new BorderLayout());

    JPanel panel = createBigButtonPanel(createSmallBorderLayout(), myCreateEntryCheckBox, EmptyRunnable.INSTANCE);
    panel.setBorder(createSmallEmptyBorder());

    JPanel buttonPanel = new JPanel(new GridBagLayout());
    buttonPanel.setOpaque(false);

    GridBag gbc = new GridBag().setDefaultAnchor(GridBagConstraints.WEST).setDefaultFill(GridBagConstraints.HORIZONTAL).setDefaultWeightX(1);

    myCreateEntryCheckBox.setOpaque(false);
    buttonPanel.add(myCreateEntryCheckBox, gbc.nextLine());

    myGlobalEntryCheckBox.setOpaque(false);
    gbc.nextLine().insets.left = UIUtil.PANEL_REGULAR_INSETS.left;
    buttonPanel.add(myGlobalEntryCheckBox, gbc);

    panel.add(buttonPanel, BorderLayout.NORTH);

    JLabel label = new JLabel(IconLoader.getIcon(iconPath));
    label.setVerticalAlignment(SwingConstants.TOP);
    panel.add(label, BorderLayout.CENTER);

    add(panel, BorderLayout.CENTER);

    myCreateEntryCheckBox.addChangeListener(e -> myGlobalEntryCheckBox.setEnabled(myCreateEntryCheckBox.isSelected()));
    myCreateEntryCheckBox.setSelected(!PluginManagerCore.isRunningFromSources());

    myGlobalEntryCheckBox.setSelected(false);
    myGlobalEntryCheckBox.setEnabled(myCreateEntryCheckBox.isSelected());
  }

  @Override
  public boolean beforeOkAction() {
    if (myCreateEntryCheckBox.isSelected()) {
      CustomizeIDEWizardInteractions.INSTANCE.record(CustomizeIDEWizardInteractionType.DesktopEntryCreated);

      try {
        CreateDesktopEntryAction.createDesktopEntry(myGlobalEntryCheckBox.isSelected());
      }
      catch (Exception e) {
        Messages.showErrorDialog(ExceptionUtil.getNonEmptyMessage(e, IdeBundle.message("dialog.message.internal.error")),
                                 IdeBundle.message("dialog.title.desktop.entry.creation.failed"));
        return false;
      }
    }

    return true;
  }

  @Override
  public String getTitle() {
    return IdeBundle.message("step.title.desktop.entry");
  }

  @Override
  public String getHTMLHeader() {
    return IdeBundle.message("label.create.desktop.entry");
  }

  @Override
  public String getHTMLFooter() {
    return IdeBundle.message("label.text.desktop.entry.can.be.created.later.in.tools.create.desktop.entry");
  }
}


text:
SYNONYM

#### According to
The Catalogue of Life, 3rd January 2011

#### Published in
Mycotaxon 29: 63 (1987)

#### Original name
Clavaria lurida Kalchbr., 1882

### Remarks
null


text:
#ifndef NRFX_LOG_H__
#define NRFX_LOG_H__

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup nrfx_log nrfx_log.h
 * @{
 * @ingroup nrfx
 *
 * @brief This file contains macros that should be implemented according to
 *        the needs of the host environment into which @em nrfx is integrated.
 */

/**
 * @brief Macro for logging a message with the severity level ERROR.
 *
 * @param format  printf-style format string, optionally followed by arguments
 *                to be formatted and inserted in the resulting string.
 */
#define NRFX_LOG_ERROR(format, ...)

/**
 * @brief Macro for logging a message with the severity level WARNING.
 *
 * @param format  printf-style format string, optionally followed by arguments
 *                to be formatted and inserted in the resulting string.
 */
#define NRFX_LOG_WARNING(format, ...)

/**
 * @brief Macro for logging a message with the severity level INFO.
 *
 * @param format  printf-style format string, optionally followed by arguments
 *                to be formatted and inserted in the resulting string.
 */
#define NRFX_LOG_INFO(format, ...)

/**
 * @brief Macro for logging a message with the severity level DEBUG.
 *
 * @param format  printf-style format string, optionally followed by arguments
 *                to be formatted and inserted in the resulting string.
 */
#define NRFX_LOG_DEBUG(format, ...)

/**
 * @brief Macro for logging a memory dump with the severity level ERROR.
 *
 * @param[in] p_memory  Pointer to the memory region to be dumped.
 * @param[in] length    Length of the memory region in bytes.
 */
#define NRFX_LOG_HEXDUMP_ERROR(p_memory, length)

/**
 * @brief Macro for logging a memory dump with the severity level WARNING.
 *
 * @param[in] p_memory  Pointer to the memory region to be dumped.
 * @param[in] length    Length of the memory region in bytes.
 */
#define NRFX_LOG_HEXDUMP_WARNING(p_memory, length)

/**
 * @brief Macro for logging a memory dump with the severity level INFO.
 *
 * @param[in] p_memory  Pointer to the memory region to be dumped.
 * @param[in] length    Length of the memory region in bytes.
 */
#define NRFX_LOG_HEXDUMP_INFO(p_memory, length)

/**
 * @brief Macro for logging a memory dump with the severity level DEBUG.
 *
 * @param[in] p_memory  Pointer to the memory region to be dumped.
 * @param[in] length    Length of the memory region in bytes.
 */
#define NRFX_LOG_HEXDUMP_DEBUG(p_memory, length)

/**
 * @brief Macro for getting the textual representation of a given error code.
 *
 * @param[in] error_code  Error code.
 *
 * @return String containing the textual representation of the error code.
 */
#define NRFX_LOG_ERROR_STRING_GET(error_code)

/** @} */

#ifdef __cplusplus
}
#endif

#endif // NRFX_LOG_H__


text:
package org.apereo.cas.services;

import org.apereo.cas.configuration.support.ExpressionLanguageCapable;
import org.apereo.cas.util.ResourceUtils;
import org.apereo.cas.util.scripting.ScriptingUtils;
import org.apereo.cas.util.spring.SpringExpressionLanguageValueResolver;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.EqualsAndHashCode;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.SneakyThrows;
import lombok.val;

import javax.persistence.Transient;
import java.net.URI;
import java.util.Map;
import java.util.Set;

/**
 * This is {@link GroovyRegisteredServiceAccessStrategy}.
 *
 * @author Misagh Moayyed
 * @since 5.3.0
 */
@Getter
@Setter
@NoArgsConstructor
@EqualsAndHashCode(of = {"order", "groovyScript"})
public class GroovyRegisteredServiceAccessStrategy implements RegisteredServiceAccessStrategy {

    private static final long serialVersionUID = -2407494148882123062L;

    /**
     * The sorting/execution order of this strategy.
     */
    private int order;

    @ExpressionLanguageCapable
    private String groovyScript;

    @JsonIgnore
    @Transient
    @org.springframework.data.annotation.Transient
    private transient RegisteredServiceAccessStrategy groovyStrategyInstance;

    @Override
    @JsonIgnore
    public boolean isServiceAccessAllowed() {
        buildGroovyAccessStrategyInstanceIfNeeded();
        return this.groovyStrategyInstance.isServiceAccessAllowed();
    }

    @Override
    @JsonIgnore
    public void setServiceAccessAllowed(final boolean enabled) {
        buildGroovyAccessStrategyInstanceIfNeeded();
        this.groovyStrategyInstance.setServiceAccessAllowed(enabled);
    }

    @Override
    @JsonIgnore
    public boolean isServiceAccessAllowedForSso() {
        buildGroovyAccessStrategyInstanceIfNeeded();
        return this.groovyStrategyInstance.isServiceAccessAllowedForSso();
    }

    @Override
    @JsonIgnore
    public boolean doPrincipalAttributesAllowServiceAccess(final String principal, final Map<String, Object> attributes) {
        buildGroovyAccessStrategyInstanceIfNeeded();
        return this.groovyStrategyInstance.doPrincipalAttributesAllowServiceAccess(principal, attributes);
    }

    @JsonIgnore
    @Override
    public URI getUnauthorizedRedirectUrl() {
        buildGroovyAccessStrategyInstanceIfNeeded();
        return this.groovyStrategyInstance.getUnauthorizedRedirectUrl();
    }

    @Override
    @JsonIgnore
    public RegisteredServiceDelegatedAuthenticationPolicy getDelegatedAuthenticationPolicy() {
        buildGroovyAccessStrategyInstanceIfNeeded();
        return this.groovyStrategyInstance.getDelegatedAuthenticationPolicy();
    }

    @Override
    @JsonIgnore
    public Map<String, Set<String>> getRequiredAttributes() {
        return this.groovyStrategyInstance.getRequiredAttributes();
    }

    @SneakyThrows
    private void buildGroovyAccessStrategyInstanceIfNeeded() {
        if (this.groovyStrategyInstance == null) {
            val groovyResource = ResourceUtils.getResourceFrom(SpringExpressionLanguageValueResolver.getInstance().resolve(this.groovyScript));
            this.groovyStrategyInstance = ScriptingUtils.getObjectInstanceFromGroovyResource(groovyResource, RegisteredServiceAccessStrategy.class);
        }
    }
}


text:
<?php namespace Carbontwelve\BloggyKernel\Models\Classification\Taxons;
/**
* --------------------------------------------------------------------------
* Taxons Interface
* --------------------------------------------------------------------------
*
* @package  Carbontwelve/Bloggy
* @category Interface
* @since    0.0.1
* @author   Simon Dann <simon@photogabble.co.uk>
*/

/** @noinspection PhpDocSignatureInspection */
interface TaxonsInterface {

    /**
     * --------------------------------------------------------------------------
     * Return the key
     * --------------------------------------------------------------------------
     *
     * On boards the key is the id field.
     *
     * @return mixed
     */
    public function getId();

    /**
     * --------------------------------------------------------------------------
     * Overloading of Save method
     * --------------------------------------------------------------------------
     *
     * @internal param array $options
     * @return bool
     */
    public function save();

    /**
     * --------------------------------------------------------------------------
     * Overloading of Update method
     * --------------------------------------------------------------------------
     *
     * @param array $attributes
     * @internal param array $options
     * @return bool
     */
    public function update( array $attributes = array() );

    /**
    * --------------------------------------------------------------------------
    * Overloading of Delete method
    * --------------------------------------------------------------------------
    *
    * @return bool|void
    */
    public function delete();

    /**
    * --------------------------------------------------------------------------
    * Data Validation
    * --------------------------------------------------------------------------
    *
    * @param $rule
    * @return bool
    * @throws TaxonsNotValidException
    */
    public function validate( $rule );

}


text:
package models.gridobjects.items;

import java.io.Serializable;

/**
 * The Shrub object extends Item and acts as a more limited Tree. It blocks
 * spaces and allows for the storage and removal of Bamboo.
 *
 * @author Carmine Iannaccone
 *
 */
public class Shrub extends Item implements Serializable{

	/**
	 * A shrub can only contain one piece bamboo.
	 */
	private boolean bamboo;

	/**
	 *
	 */
	private static final long serialVersionUID = 8L;

	public Shrub(int iD, boolean bamboo){
		super(iD);
		this.bamboo = bamboo;
	}

	/**
	 * Checks to see if the Shrub has at least one Bamboo object stored inside
	 * of it.
	 *
	 * @return true  If the Shrub has a Bamboo object inside it.
	 */
	public boolean hasBamboo() {
		return this.bamboo;
	}

	/**
	 * Adds Bamboo to the shrub.
	 * @param bamboo the bamboo to add to the shrub
	 * @return true iff able to add bamboo successfully
	 */
	public boolean addBamboo(){
		if(this.bamboo) return false;
		this.bamboo = true;
		return true;
	}

	/**
	 * Removes bamboo from the tree.
	 */
	public void removeBamboo(){
		this.bamboo = false;
	}

	/**
	 * Determines what type the object is and returns the first letter of that types name.
	 * @return type  Returns the first letter of the type name. (Example: "S" = Shrub)
	 */
	public String toString() {
		return "S";

	}

	public Item copy(){
		return new Shrub(this.getId(), this.bamboo);
	}

}


text:
package org.onvif.ver10.device.wsdl;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
import javax.xml.datatype.XMLGregorianCalendar;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.cxf.xjc.runtime.JAXBToStringStyle;

/**
 *
Java class for anonymous complex type.
 *
 *
The following schema fragment specifies the expected content contained within this class.
 *
 *

 * <complexType>
 *   <complexContent>
 *     <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
 *       <sequence>
 *         <element name="CertificateID" type="{http://www.w3.org/2001/XMLSchema}token" minOccurs="0"/>
 *         <element name="Subject" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
 *         <element name="ValidNotBefore" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *         <element name="ValidNotAfter" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
 *       </sequence>
 *     </restriction>
 *   </complexContent>
 * </complexType>
 *

 *
 *
 */
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
    "certificateID",
    "subject",
    "validNotBefore",
    "validNotAfter"
})
@XmlRootElement(name = "CreateCertificate")
public class CreateCertificate {

    @XmlElement(name = "CertificateID")
    @XmlJavaTypeAdapter(CollapsedStringAdapter.class)
    @XmlSchemaType(name = "token")
    protected String certificateID;
    @XmlElement(name = "Subject")
    protected String subject;
    @XmlElement(name = "ValidNotBefore")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar validNotBefore;
    @XmlElement(name = "ValidNotAfter")
    @XmlSchemaType(name = "dateTime")
    protected XMLGregorianCalendar validNotAfter;

    /**
     * Gets the value of the certificateID property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getCertificateID() {
        return certificateID;
    }

    /**
     * Sets the value of the certificateID property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setCertificateID(String value) {
        this.certificateID = value;
    }

    /**
     * Gets the value of the subject property.
     *
     * @return
     *     possible object is
     *     {@link String }
     *
     */
    public String getSubject() {
        return subject;
    }

    /**
     * Sets the value of the subject property.
     *
     * @param value
     *     allowed object is
     *     {@link String }
     *
     */
    public void setSubject(String value) {
        this.subject = value;
    }

    /**
     * Gets the value of the validNotBefore property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getValidNotBefore() {
        return validNotBefore;
    }

    /**
     * Sets the value of the validNotBefore property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setValidNotBefore(XMLGregorianCalendar value) {
        this.validNotBefore = value;
    }

    /**
     * Gets the value of the validNotAfter property.
     *
     * @return
     *     possible object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public XMLGregorianCalendar getValidNotAfter() {
        return validNotAfter;
    }

    /**
     * Sets the value of the validNotAfter property.
     *
     * @param value
     *     allowed object is
     *     {@link XMLGregorianCalendar }
     *
     */
    public void setValidNotAfter(XMLGregorianCalendar value) {
        this.validNotAfter = value;
    }

    /**
     * Generates a String representation of the contents of this type.
     * This is an extension method, produced by the 'ts' xjc plugin
     *
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this, JAXBToStringStyle.DEFAULT_STYLE);
    }

}


text:
REM INSERTING into MESSAGE_OWNER.LANGUAGES
SET DEFINE OFF;
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Egypt) (ar-eg)','ar-eg');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Morocco) (ar-ma)','ar-ma');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Oman) (ar-om)','ar-om');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Syria) (ar-sy)','ar-sy');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Chinese (China) (zh-cn)','zh-cn');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Chinese (Macau SAR) (zh-mo)','zh-mo');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Chinese (Taiwan) (zh-tw)','zh-tw');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Icelandic (is)','is');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Kannada (kn)','kn');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Latvian (lv)','lv');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Malayalam (ml)','ml');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Nepali (India) (ne)','ne');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Norwegian (Bokmal) (no)','no');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Slovak (sk)','sk');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Swedish (sv)','sv');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Urdu (ur)','ur');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Bahrain) (ar-bh)','ar-bh');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Libya) (ar-ly)','ar-ly');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Assamese (as)','as');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Basque (eu)','eu');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Croatian (hr)','hr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('FYRO Macedonian (mk)','mk');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Italian (Italy) (it)','it');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Italian (Switzerland) (it-ch)','it-ch');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Slovenian (sl)','sl');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Chile) (es-cl)','es-cl');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Columbia) (es-co)','es-co');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Ecudor) (es-ec)','es-ec');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Panama) (es-pa)','es-pa');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Ukrainian (uk)','uk');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Dutch (Belgium) (nl-be)','nl-be');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Australia) (en-au)','en-au');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Belize) (en-bz)','en-bz');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('French (Switzerland) (fr-ch)','fr-ch');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Gaelic (gd)','gd');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Greek (el)','el');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Gujarati (gu)','gu');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Hindi (hi)','hi');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Portuguese (Portugal) (pt)','pt');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Mexico) (es-mx)','es-mx');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Uruguay) (es-uy)','es-uy');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Tamil (ta)','ta');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Irish (ga)','ga');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Afrikaans (af)','af');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Yemen) (ar-ye)','ar-ye');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Bulgarian (bg)','bg');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Chinese (zh)','zh');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (South Africa) (en-za)','en-za');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Galician (gl)','gl');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('German (Germany) (de)','de');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('German (Luxemgourg) (de-lu)','de-lu');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('German (Switzerland) (de-ch)','de-ch');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Indonesian (id)','id');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Kazakh (kk)','kk');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Konkani (kok)','kok');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Maltese (mt)','mt');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Oriya (or)','or');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Punjabi (pa)','pa');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Serbian (sr)','sr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Guatemala) (es-gt)','es-gt');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Nicaragua) (es-ni)','es-ni');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Paraguay) (es-py)','es-py');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Venezuela) (es-ve)','es-ve');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Thai (th)','th');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Turkish (tr)','tr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (ar)','ar');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Iraq) (ar-iq)','ar-iq');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Jordan) (ar-jo)','ar-jo');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Kuwait) (ar-kw)','ar-kw');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Lebanon) (ar-lb)','ar-lb');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Bengali (bn)','bn');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Czech (cs)','cs');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Danish (da)','da');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Philippines) (en-ph)','en-ph');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (United Kingdom) (en-gb)','en-gb');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Farsi (fa)','fa');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('French (Belgium) (fr-be)','fr-be');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('French (Luxembourg) (fr-lu)','fr-lu');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('German (Liechtenstein) (de-li)','de-li');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Norwegian (Bokmal) (nb-no)','nb-no');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Norwegian (Nynorsk) (nn-no)','nn-no');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Bolivia) (es-bo)','es-bo');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Costa Rica) (es-cr)','es-cr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (El Salvador) (es-sv)','es-sv');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Peru) (es-pe)','es-pe');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Swedish (Finland) (sv-fi)','sv-fi');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Uzbek (uz)','uz');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Vietnamese (vi)','vi');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Welsh (cy)','cy');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Qatar) (ar-qa)','ar-qa');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Saudi Arabia) (ar-sa)','ar-sa');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (U.A.E.) (ar-ae)','ar-ae');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Catalan (ca)','ca');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Dutch (Netherlands) (nl)','nl');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (en)','en');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Jamaica) (en-jm)','en-jm');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Zimbabwe) (en-zw)','en-zw');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Faeroese (fo)','fo');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Hebrew (he)','he');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Hungarian (hu)','hu');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Japanese (ja)','ja');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Korean (ko)','ko');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Lithuanian (lt)','lt');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Russian (ru)','ru');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Russian (Moldova) (ru-md)','ru-md');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Honduras) (es-hn)','es-hn');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Peurto Rico) (es-pr)','es-pr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Telugu (te)','te');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Algeria) (ar-dz)','ar-dz');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Chinese (Singapore) (zh-sg)','zh-sg');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (New Zealand) (en-nz)','en-nz');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Estonian (et)','et');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Finnish (fi)','fi');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('French (Monaco) (fr-mc)','fr-mc');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('German (Austria) (de-at)','de-at');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Kyrgyz (kz)','kz');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Malay (Malaysia) (ms)','ms');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Marathi (mr)','mr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Polish (pl)','pl');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Portuguese (Brazil) (pt-br)','pt-br');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Argentina) (es-ar)','es-ar');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Dominican Republic) (es-do)','es-do');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (United States) (es-us)','es-us');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Arabic (Tunisia) (ar-tn)','ar-tn');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Belarusian (be)','be');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Chinese (Hong Kong SAR) (zh-hk)','zh-hk');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Canada) (en-ca)','en-ca');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Ireland) (en-ie)','en-ie');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (Trinidad) (en-tt)','en-tt');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('English (United States) (en-us)','en-us');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('French (Canada) (fr-ca)','fr-ca');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('French (France) (fr)','fr');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Romanian (ro)','ro');
Insert into MESSAGE_OWNER.LANGUAGES (NAME,CODE) values ('Spanish (Traditional Sort) (es)','es');


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Core Plot (Mac OS): Source/CPTXYAxis.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="customdoxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>

Core Plot (Mac OS)

Cocoa plotting framework for Mac OS X and iOS

Main Page

Animation & Constants

Classes

Files

File List

File Members

Classes

CPTXYAxis.h File Reference

#import "CPTAxis.h"

#import <Foundation/Foundation.h>

   Include dependency graph for CPTXYAxis.h:

<map name="_source_2_c_p_t_x_y_axis_8h" id="_source_2_c_p_t_x_y_axis_8h">
<area shape="rect" id="node3" href="_c_p_t_axis_8h.html" title="CPTAxis.h" alt="" coords="657,86,743,117"/><area shape="rect" id="node5" href="_c_p_t_definitions_8h.html" title="CPTDefinitions.h" alt="" coords="635,246,764,277"/><area shape="rect" id="node15" href="_c_p_t_layer_8h.html" title="CPTLayer.h" alt="" coords="389,166,481,197"/><area shape="rect" id="node29" href="_c_p_t_text_style_8h.html" title="CPTTextStyle.h" alt="" coords="493,246,611,277"/><area shape="rect" id="node17" href="_c_p_t_responder_8h.html" title="CPTResponder.h" alt="" coords="139,246,265,277"/><area shape="rect" id="node20" href="_c_p_t_platform_specific_defines_8h.html" title="CPTPlatformSpecificDefines.h" alt="" coords="5,326,216,357"/></map>

   This graph shows which files directly or indirectly include this file:

<map name="_source_2_c_p_t_x_y_axis_8hdep" id="_source_2_c_p_t_x_y_axis_8hdep">
<area shape="rect" id="node3" href="_c_p_t_x_y_axis_8m.html" title="Source/CPTXYAxis.m" alt="" coords="5,86,163,117"/><area shape="rect" id="node5" href="_c_p_t_x_y_axis_set_8m.html" title="Source/CPTXYAxisSet.m" alt="" coords="187,86,364,117"/><area shape="rect" id="node7" href="_c_p_t_x_y_graph_8m.html" title="Source/CPTXYGraph.m" alt="" coords="389,86,557,117"/><area shape="rect" id="node9" href="_c_p_t_x_y_plot_space_8m.html" title="Source/CPTXYPlotSpace.m" alt="" coords="582,86,772,117"/></map>

Go to the source code of this file.

Classes

class  	CPTXYAxis

 	A 2-dimensional cartesian (X-Y) axis class.  More...

Generated by


text:
package energy.usef.agr.workflow.operate.identifychangeforecast;

/**
 * The defined parameters for the 'AGR identify changes in forecast' workflow.
 */
public class IdentifyChangeInForecastStepParameter {

    private IdentifyChangeInForecastStepParameter() {
        // private constructor
    }

    /**
     * The incoming parameters.
     */
    public enum IN {
        PERIOD,
        CONNECTION_PORTFOLIO,
        LATEST_A_PLANS_DTO_LIST,
        PTU_DURATION
    }

    /**
     * The outgoing parameters.
     */
    public enum OUT {
        FORECAST_CHANGED,
        FORECAST_CHANGED_PTU_CONTAINER_DTO_LIST
    }

}


text:
#include "ir.h"

void do_remove_unused_typedecls(exec_list* instructions);


text:
#pragma once

#include <memory>

#include <QString>
#include <QTimer>
#include <QQuickFramebufferObject>

#include <gloperate-qtquick/gloperate-qtquick_api.h>

class QQuickWindow;

namespace globjects
{
    class Framebuffer;
}

namespace gloperate
{
    class Canvas;
}

namespace gloperate_qtquick
{

/**
*  @brief
*    Qt quick item for displaying a gloperate render stage
*/
class GLOPERATE_QTQUICK_API RenderItem : public QQuickFramebufferObject
{
    Q_OBJECT
    Q_PROPERTY(QString stage READ stage WRITE setStage)

signals:
    void canvasInitialized(); ///< Called after the canvas has been successfully initialized

public:
    /**
    *  @brief
    *    Constructor
    *
    *  @param[in] parent
    *    Parent item (can be null)
    */
    RenderItem(QQuickItem * parent = nullptr);

    /**
    *  @brief
    *    Destructor
    */
    virtual ~RenderItem();

    /**
    *  @brief
    *    Get canvas
    *
    *  @return
    *    Canvas that renders into the item (never null)
    */
    gloperate::Canvas * canvas() const;

    /**
    *  @brief
    *    Get render stage
    *
    *  @return
    *    Name of render stage
    */
    const QString & stage() const;

    /**
    *  @brief
    *    Set render stage
    *
    *  @param[in] name
    *    Name of render stage
    */
    void setStage(const QString & name);

    // Virtual QQuickFramebufferObject interface
    QQuickFramebufferObject::Renderer * createRenderer() const Q_DECL_OVERRIDE;

protected:
    virtual void keyPressEvent(QKeyEvent * event) override;
    virtual void keyReleaseEvent(QKeyEvent * event) override;
    virtual void hoverMoveEvent(QHoverEvent * event) override;
    virtual void mouseMoveEvent(QMouseEvent * event) override;
    virtual void mousePressEvent(QMouseEvent * event) override;
    virtual void mouseReleaseEvent(QMouseEvent * event) override;
    virtual void wheelEvent(QWheelEvent * event) override;

    /**
    *  @brief
    *    Called on timer update
    */
    void onTimer();

protected:
    QString                            m_stage;  ///< Name of the render stage to use
    QTimer                             m_timer;  ///< Timer for continuous update
    std::unique_ptr<gloperate::Canvas> m_canvas; ///< Canvas that renders into the item (must NOT be null)
};

} // namespace gloperate_qtquick


text:
package xyz.avarel.kaiper.vm;

import xyz.avarel.kaiper.bytecode.walker.BufferWalker;
import xyz.avarel.kaiper.bytecode.walker.BytecodeBatchReader;
import xyz.avarel.kaiper.bytecode.walker.BytecodeWalkerAdapter;
import xyz.avarel.kaiper.scope.Scope;
import xyz.avarel.kaiper.vm.compiled.CompiledExecution;
import xyz.avarel.kaiper.vm.runtime.functions.CompiledParameter;

import java.io.ByteArrayOutputStream;
import java.io.DataInput;
import java.io.DataOutputStream;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;

class FunctionParamWalker extends BytecodeWalkerAdapter {
    LinkedList<CompiledParameter> parameters = new LinkedList<>();

    private StackMachineWalker parent;

    FunctionParamWalker(StackMachineWalker parent) {
        this.parent = parent;
    }

    @Override
    public void opcodeDefineFunctionParam(DataInput input, BytecodeBatchReader reader, List<String> stringPool, int depth) throws IOException {
        parent.checkTimeout();
        int modifiers = input.readByte();
        String name = stringPool.get(input.readUnsignedShort());

        boolean isRest = (modifiers & 2) == 2;

        if ((modifiers & 1) == 1) {
            ByteArrayOutputStream buffer = new ByteArrayOutputStream();
            reader.walkInsts(input, new BufferWalker(new DataOutputStream(buffer)), stringPool, depth + 1);
            byte[] bytecode = buffer.toByteArray();
            Scope scope = parent.getScope().subPool();

            parameters.add(new CompiledParameter(name, new CompiledExecution(bytecode, reader, stringPool, depth + 1, parent), isRest));
        } else {
            parameters.add(new CompiledParameter(name, null, isRest));
        }
    }
}


text:
/*
 * pkcs12Templates.h
 *
 *******************************************************************
 *
 * In a probably vain attempt to clarify the structure of a PKCS12
 * PFX, here is a high-level summary.
 *
 * The top level item in P12 is a PFX.
 *
 * PFX = {
 *  	int version;
 *		ContentInfo authSafe;	-- from PKCS7
 *		MacData mac;			-- optional, password integrity version
 * }
 *
 * The authSafe in a PFX has two legal contentTypes in the P12
 * world, CT_Data (password integrity mode) or CT_SignedData
 * (public key integrity mode). The current version of this library
 * only supports password integrity mode. Thus the integrity of
 * the whole authSafe item is protected by a MAC in the PFX.
 *
 * The authSafe.content field is a BER-encoded AuthenticatedSafe.
 *
 * AuthenticatedSafe = {
 *		SEQUENCE OF ContentInfo;
 * }
 *
 * OK. Each ContentInfo in an AuthenticatedSafe can either be type
 * CT_Data, CT_EnvData, or CT_EncryptedData. In the latter cases the
 * content is decrypted to produce an encoded SafeContents; in the
 * former case the content *is* an encoded SafeContents.
 *
 * A SafeContents is a sequence of SafeBags.
 *
 * Each SafeBag can be of several types:
 *
 *		BT_KeyBag
 *		BT_ShroudedKeyBag
 *		BT_CertBag
 *		BT_CrlBag
 *		BT_SecretBag
 *		BT_SafeContentsBag
 *
 */

#ifndef	_PKCS12_TEMPLATES_H_
#define _PKCS12_TEMPLATES_H_

#include <Security/keyTemplates.h>	/* for NSS_Attribute */
#include <Security/pkcs7Templates.h>			/* will be lib-specific place */

#ifdef __cplusplus
extern "C" {
#endif

/*
 * MacData ::= SEQUENCE {
 * 		mac 		DigestInfo,
 *		macSalt	    OCTET STRING,
 *		iterations	INTEGER DEFAULT 1
 * }
 */
typedef struct {
	NSS_P7_DigestInfo	mac;
	SecAsn1Item			macSalt;
	SecAsn1Item			iterations;	// optional
} NSS_P12_MacData;

extern const SecAsn1Template NSS_P12_MacDataTemplate[];

/*
 * PFX ::= SEQUENCE {
 *   	version		INTEGER {v3(3)}(v3,...),
 *   	authSafe	ContentInfo,
 *   	macData    	MacData OPTIONAL
 * }
 */

/*
 * First the top level PFX with unparsed ContentInfo.content.
 */
typedef struct {
	SecAsn1Item				version;
	NSS_P7_RawContentInfo	authSafe;
	NSS_P12_MacData			*macData;
} NSS_P12_RawPFX;

extern const SecAsn1Template NSS_P12_RawPFXTemplate[];

/*
 * And a PFX with a decoded ContentInfo.content.
 */
typedef struct {
	SecAsn1Item					version;
	NSS_P7_DecodedContentInfo	authSafe;
	NSS_P12_MacData				*macData;
} NSS_P12_DecodedPFX;

extern const SecAsn1Template NSS_P12_DecodedPFXTemplate[];

/*
 * The CSSMOID_PKCS7_Data-style ContentInfo.content of a PFX
 * contains an encoded AuthenticatedSafe.
 *
 * AuthenticatedSafe ::= SEQUENCE OF ContentInfo
 * 		-- Data if unencrypted
 * 		-- EncryptedData if password-encrypted
 * 		-- EnvelopedData if public key-encrypted
 */
typedef struct {
	NSS_P7_DecodedContentInfo		**info;
} NSS_P12_AuthenticatedSafe;

extern const SecAsn1Template NSS_P12_AuthenticatedSafeTemplate[];

/*
 * Individual BagTypes.
 * Code on demand.
 */
typedef SecAsn1Item	NSS_P12_KeyBag;
typedef NSS_EncryptedPrivateKeyInfo	NSS_P12_ShroudedKeyBag;
typedef SecAsn1Item	NSS_P12_SecretBag;
typedef SecAsn1Item	NSS_P12_SafeContentsBag;

/*
 * CertBag
 *
 * CertBag ::= SEQUENCE {
 * 		certId BAG-TYPE.&id ({CertTypes}),
 * 		certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})
 * }
 *
 * x509Certificate BAG-TYPE ::=
 * 		{OCTET STRING IDENTIFIED BY {certTypes 1}}
 * 			-- DER-encoded X.509 certificate stored in OCTET STRING
 * sdsiCertificate BAG-TYPE ::=
 * 		{IA5String IDENTIFIED BY {certTypes 2}}
 * 			-- Base64-encoded SDSI certificate stored in IA5String
 */
typedef enum {
	CT_Unknown,			// --> ASN_ANY
	CT_X509,
	CT_SDSI,
} NSS_P12_CertBagType;

typedef struct {
	SecAsn1Oid			bagType;
	NSS_P12_CertBagType	type;
	SecAsn1Item			certValue;
} NSS_P12_CertBag;

extern const SecAsn1Template NSS_P12_CertBagTemplate[];

/*
 * CRLBag
 *
 * CRLBag ::= SEQUENCE {
 * 		certId BAG-TYPE.&id ({CertTypes}),
 * 		certValue [0] EXPLICIT BAG-TYPE.&Type ({CertTypes}{@certId})
 * }
 *
 * x509Certificate BAG-TYPE ::=
 * 		{OCTET STRING IDENTIFIED BY {certTypes 1}}
 * 			-- DER-encoded X.509 certificate stored in OCTET STRING
 * sdsiCertificate BAG-TYPE ::=
 * 		{IA5String IDENTIFIED BY {certTypes 2}}
 * 			-- Base64-encoded SDSI certificate stored in IA5String
 */
typedef enum {
	CRT_Unknown,			// --> ASN_ANY
	CRT_X509,
} NSS_P12_CrlBagType;

typedef struct {
	SecAsn1Oid			bagType;
	NSS_P12_CrlBagType	type;
	SecAsn1Item			crlValue;
} NSS_P12_CrlBag;

extern const SecAsn1Template NSS_P12_CrlBagTemplate[];

/*
 * BagId OIDs map to one of these for convenience. Our dynamic
 * template chooser drops one of these into NSS_P12_SafeBag.type
 * on decode.
 */
typedef enum {
	BT_None = 0,
	BT_KeyBag,
	BT_ShroudedKeyBag,
	BT_CertBag,
	BT_CrlBag,
	BT_SecretBag,
	BT_SafeContentsBag
} NSS_P12_SB_Type;

/*
 * The ContentInfo.content values of each element in
 * an AuthenticatedSafe map to a sequence of these - either directly
 * (contentType CSSMOID_PKCS7_Data, octet string contents are
 * the DER encoding of this) or indirectly (encrypted or
 * shrouded, the decrypted content is the DER encoding of this).
 */
typedef struct {
	SecAsn1Oid					bagId;
	NSS_P12_SB_Type				type;
	union {
		NSS_P12_KeyBag			*keyBag;
		NSS_P12_ShroudedKeyBag	*shroudedKeyBag;
		NSS_P12_CertBag			*certBag;
		NSS_P12_CrlBag			*crlBag;
		NSS_P12_SecretBag		*secretBag;
		NSS_P12_SafeContentsBag	*safeContentsBag;
	} bagValue;
	NSS_Attribute				**bagAttrs;		// optional
} NSS_P12_SafeBag;

extern const SecAsn1Template NSS_P12_SafeBagTemplate[];

/*
 * SafeContents, the contents of an element in an AuthenticatedSafe.
 */
typedef struct {
	NSS_P12_SafeBag				**bags;
}
NSS_P12_SafeContents;

extern const SecAsn1Template NSS_P12_SafeContentsTemplate[];

/*
 * PKCS12-specific algorithm parameters.
 * A DER encoded version of this is the parameters value of
 * a CSSM_X509_ALGORITHM_IDENTIFIER used in a
 * NSS_P7_EncrContentInfo.encrAlg in P12 password privacy mode.
 *
 * pkcs-12PbeParams ::= SEQUENCE {
 *		salt OCTET STRING,
 *		iterations INTEGER
 * }
 *
 * NOTE the P12 spec does place a limit on the value of iterations.
 * I guess we have to assume in actual usage that it's
 * restricted to (0..MAX), i.e., uint32-sized.
 *
 * We're also assuming that it is explicitly an unsigned value,
 * so that the value bytes in the encoding of 0xff would be
 * (0, 255).
 */
typedef struct {
	SecAsn1Item		salt;
	SecAsn1Item		iterations;
} NSS_P12_PBE_Params;

extern const SecAsn1Template NSS_P12_PBE_ParamsTemplate[];

#ifdef __cplusplus
}
#endif

#endif	/* _PKCS12_TEMPLATES_H_ */


text:
package org.kuali.rice.kim.impl.role;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Convert;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.eclipse.persistence.annotations.JoinFetch;
import org.eclipse.persistence.annotations.JoinFetchType;
import org.kuali.rice.kim.api.role.RoleResponsibilityAction;
import org.kuali.rice.kim.api.role.RoleResponsibilityActionContract;
import org.kuali.rice.krad.bo.DataObjectBase;
import org.kuali.rice.krad.data.jpa.PortableSequenceGenerator;
import org.kuali.rice.krad.data.jpa.converters.BooleanYNConverter;

/**
 * This is a description of what this class does - kellerj don't forget to fill this in.
 *
 * @author Kuali Rice Team (rice.collab@kuali.org)
 */
@Entity
@Table(name = "KRIM_ROLE_RSP_ACTN_T")
public class RoleResponsibilityActionBo extends DataObjectBase implements RoleResponsibilityActionContract {

    private static final long serialVersionUID = 1L;

    @PortableSequenceGenerator(name = "KRIM_ROLE_RSP_ACTN_ID_S")
    @GeneratedValue(generator = "KRIM_ROLE_RSP_ACTN_ID_S")
    @Id
    @Column(name = "ROLE_RSP_ACTN_ID")
    private String id;

    @Column(name = "ROLE_RSP_ID")
    private String roleResponsibilityId;

    @Column(name = "ROLE_MBR_ID")
    private String roleMemberId;

    @Column(name = "ACTN_TYP_CD")
    private String actionTypeCode;

    @Column(name = "ACTN_PLCY_CD")
    private String actionPolicyCode;

    @Column(name = "FRC_ACTN")
    @Convert(converter = BooleanYNConverter.class)
    private boolean forceAction;

    @Column(name = "PRIORITY_NBR")
    private Integer priorityNumber;

    @JoinFetch(value= JoinFetchType.OUTER)
    @ManyToOne(targetEntity = RoleResponsibilityBo.class, cascade = { CascadeType.REFRESH })
    @JoinColumn(name = "ROLE_RSP_ID", referencedColumnName = "ROLE_RSP_ID", insertable = false, updatable = false)
    private RoleResponsibilityBo roleResponsibility;

    @Override
    public RoleResponsibilityBo getRoleResponsibility() {
        return roleResponsibility;
    }

    public static RoleResponsibilityAction to(RoleResponsibilityActionBo bo) {
        if (bo == null) {
            return null;
        }
        return RoleResponsibilityAction.Builder.create(bo).build();
    }

    public static RoleResponsibilityActionBo from(RoleResponsibilityAction immutable) {
        if (immutable == null) {
            return null;
        }
        RoleResponsibilityActionBo bo = new RoleResponsibilityActionBo();
        bo.id = immutable.getId();
        bo.roleResponsibilityId = immutable.getRoleResponsibilityId();
        bo.roleMemberId = immutable.getRoleMemberId();
        bo.actionTypeCode = immutable.getActionTypeCode();
        bo.actionPolicyCode = immutable.getActionPolicyCode();
        bo.forceAction = immutable.isForceAction();
        bo.priorityNumber = immutable.getPriorityNumber();
        bo.roleResponsibility = RoleResponsibilityBo.from(immutable.getRoleResponsibility());
        bo.setVersionNumber(immutable.getVersionNumber());
        return bo;
    }

    public boolean equals(RoleResponsibilityActionBo roleRspActn) {
        if (!StringUtils.equals(roleRspActn.getRoleMemberId(), getRoleMemberId())) {
            return false;
        }
        if (!StringUtils.equals(roleRspActn.getRoleResponsibilityId(), getRoleResponsibilityId())) {
            return false;
        }
        if (!StringUtils.equals(roleRspActn.getActionTypeCode(), getActionTypeCode())) {
            return false;
        }
        if (!StringUtils.equals(roleRspActn.getActionPolicyCode(), getActionPolicyCode())) {
            return false;
        }
        if (!ObjectUtils.equals(roleRspActn.getPriorityNumber(), getPriorityNumber())) {
            return false;
        }
        return true;
    }

    @Override
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String getRoleResponsibilityId() {
        return roleResponsibilityId;
    }

    public void setRoleResponsibilityId(String roleResponsibilityId) {
        this.roleResponsibilityId = roleResponsibilityId;
    }

    @Override
    public String getRoleMemberId() {
        return roleMemberId;
    }

    public void setRoleMemberId(String roleMemberId) {
        this.roleMemberId = roleMemberId;
    }

    @Override
    public String getActionTypeCode() {
        return actionTypeCode;
    }

    public void setActionTypeCode(String actionTypeCode) {
        this.actionTypeCode = actionTypeCode;
    }

    @Override
    public String getActionPolicyCode() {
        return actionPolicyCode;
    }

    public void setActionPolicyCode(String actionPolicyCode) {
        this.actionPolicyCode = actionPolicyCode;
    }

    public boolean getForceAction() {
        return forceAction;
    }

    @Override
    public boolean isForceAction() {
        return forceAction;
    }

    public void setForceAction(boolean forceAction) {
        this.forceAction = forceAction;
    }

    @Override
    public Integer getPriorityNumber() {
        return priorityNumber;
    }

    public void setPriorityNumber(Integer priorityNumber) {
        this.priorityNumber = priorityNumber;
    }

    public void setRoleResponsibility(RoleResponsibilityBo roleResponsibility) {
        this.roleResponsibility = roleResponsibility;
    }
}


text:
//===- llvm/Value.h - Definition of the Value class -------------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// This file declares the Value class.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_IR_VALUE_H
#define LLVM_IR_VALUE_H

#include "llvm-c/Types.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/IR/Use.h"
#include "llvm/Support/Alignment.h"
#include "llvm/Support/CBindingWrapping.h"
#include "llvm/Support/Casting.h"
#include <cassert>
#include <iterator>
#include <memory>

namespace llvm {

class APInt;
class Argument;
class BasicBlock;
class Constant;
class ConstantData;
class ConstantAggregate;
class DataLayout;
class Function;
class GlobalAlias;
class GlobalIFunc;
class GlobalIndirectSymbol;
class GlobalObject;
class GlobalValue;
class GlobalVariable;
class InlineAsm;
class Instruction;
class LLVMContext;
class Module;
class ModuleSlotTracker;
class raw_ostream;
template<typename ValueTy> class StringMapEntry;
class StringRef;
class Twine;
class Type;
class User;

using ValueName = StringMapEntry<Value *>;

//===----------------------------------------------------------------------===//
//                                 Value Class
//===----------------------------------------------------------------------===//

/// LLVM Value Representation
///
/// This is a very important LLVM class. It is the base class of all values
/// computed by a program that may be used as operands to other values. Value is
/// the super class of other important classes such as Instruction and Function.
/// All Values have a Type. Type is not a subclass of Value. Some values can
/// have a name and they belong to some Module.  Setting the name on the Value
/// automatically updates the module's symbol table.
///
/// Every value has a "use list" that keeps track of which other Values are
/// using this Value.  A Value can also have an arbitrary number of ValueHandle
/// objects that watch it and listen to RAUW and Destroy events.  See
/// llvm/IR/ValueHandle.h for details.
class Value {
  Type *VTy;
  Use *UseList;

  friend class ValueAsMetadata; // Allow access to IsUsedByMD.
  friend class ValueHandleBase;

  const unsigned char SubclassID;   // Subclass identifier (for isa/dyn_cast)
  unsigned char HasValueHandle : 1; // Has a ValueHandle pointing to this?

protected:
  /// Hold subclass data that can be dropped.
  ///
  /// This member is similar to SubclassData, however it is for holding
  /// information which may be used to aid optimization, but which may be
  /// cleared to zero without affecting conservative interpretation.
  unsigned char SubclassOptionalData : 7;

private:
  /// Hold arbitrary subclass data.
  ///
  /// This member is defined by this class, but is not used for anything.
  /// Subclasses can use it to hold whatever state they find useful.  This
  /// field is initialized to zero by the ctor.
  unsigned short SubclassData;

protected:
  /// The number of operands in the subclass.
  ///
  /// This member is defined by this class, but not used for anything.
  /// Subclasses can use it to store their number of operands, if they have
  /// any.
  ///
  /// This is stored here to save space in User on 64-bit hosts.  Since most
  /// instances of Value have operands, 32-bit hosts aren't significantly
  /// affected.
  ///
  /// Note, this should *NOT* be used directly by any class other than User.
  /// User uses this value to find the Use list.
  enum : unsigned { NumUserOperandsBits = 28 };
  unsigned NumUserOperands : NumUserOperandsBits;

  // Use the same type as the bitfield above so that MSVC will pack them.
  unsigned IsUsedByMD : 1;
  unsigned HasName : 1;
  unsigned HasHungOffUses : 1;
  unsigned HasDescriptor : 1;

private:
  template <typename UseT> // UseT == 'Use' or 'const Use'
  class use_iterator_impl
      : public std::iterator<std::forward_iterator_tag, UseT *> {
    friend class Value;

    UseT *U;

    explicit use_iterator_impl(UseT *u) : U(u) {}

  public:
    use_iterator_impl() : U() {}

    bool operator==(const use_iterator_impl &x) const { return U == x.U; }
    bool operator!=(const use_iterator_impl &x) const { return !operator==(x); }

    use_iterator_impl &operator++() { // Preincrement
      assert(U && "Cannot increment end iterator!");
      U = U->getNext();
      return *this;
    }

    use_iterator_impl operator++(int) { // Postincrement
      auto tmp = *this;
      ++*this;
      return tmp;
    }

    UseT &operator*() const {
      assert(U && "Cannot dereference end iterator!");
      return *U;
    }

    UseT *operator->() const { return &operator*(); }

    operator use_iterator_impl<const UseT>() const {
      return use_iterator_impl<const UseT>(U);
    }
  };

  template <typename UserTy> // UserTy == 'User' or 'const User'
  class user_iterator_impl
      : public std::iterator<std::forward_iterator_tag, UserTy *> {
    use_iterator_impl<Use> UI;
    explicit user_iterator_impl(Use *U) : UI(U) {}
    friend class Value;

  public:
    user_iterator_impl() = default;

    bool operator==(const user_iterator_impl &x) const { return UI == x.UI; }
    bool operator!=(const user_iterator_impl &x) const { return !operator==(x); }

    /// Returns true if this iterator is equal to user_end() on the value.
    bool atEnd() const { return *this == user_iterator_impl(); }

    user_iterator_impl &operator++() { // Preincrement
      ++UI;
      return *this;
    }

    user_iterator_impl operator++(int) { // Postincrement
      auto tmp = *this;
      ++*this;
      return tmp;
    }

    // Retrieve a pointer to the current User.
    UserTy *operator*() const {
      return UI->getUser();
    }

    UserTy *operator->() const { return operator*(); }

    operator user_iterator_impl<const UserTy>() const {
      return user_iterator_impl<const UserTy>(*UI);
    }

    Use &getUse() const { return *UI; }
  };

protected:
  Value(Type *Ty, unsigned scid);

  /// Value's destructor should be virtual by design, but that would require
  /// that Value and all of its subclasses have a vtable that effectively
  /// duplicates the information in the value ID. As a size optimization, the
  /// destructor has been protected, and the caller should manually call
  /// deleteValue.
  ~Value(); // Use deleteValue() to delete a generic Value.

public:
  Value(const Value &) = delete;
  Value &operator=(const Value &) = delete;

  /// Delete a pointer to a generic Value.
  void deleteValue();

  /// Support for debugging, callable in GDB: V->dump()
  void dump() const;

  /// Implement operator<< on Value.
  /// @{
  void print(raw_ostream &O, bool IsForDebug = false) const;
  void print(raw_ostream &O, ModuleSlotTracker &MST,
             bool IsForDebug = false) const;
  /// @}

  /// Print the name of this Value out to the specified raw_ostream.
  ///
  /// This is useful when you just want to print 'int %reg126', not the
  /// instruction that generated it. If you specify a Module for context, then
  /// even constanst get pretty-printed; for example, the type of a null
  /// pointer is printed symbolically.
  /// @{
  void printAsOperand(raw_ostream &O, bool PrintType = true,
                      const Module *M = nullptr) const;
  void printAsOperand(raw_ostream &O, bool PrintType,
                      ModuleSlotTracker &MST) const;
  /// @}

  /// All values are typed, get the type of this value.
  Type *getType() const { return VTy; }

  /// All values hold a context through their type.
  LLVMContext &getContext() const;

  // All values can potentially be named.
  bool hasName() const { return HasName; }
  ValueName *getValueName() const;
  void setValueName(ValueName *VN);

private:
  void destroyValueName();
  enum class ReplaceMetadataUses { No, Yes };
  void doRAUW(Value *New, ReplaceMetadataUses);
  void setNameImpl(const Twine &Name);

public:
  /// Return a constant reference to the value's name.
  ///
  /// This guaranteed to return the same reference as long as the value is not
  /// modified.  If the value has a name, this does a hashtable lookup, so it's
  /// not free.
  StringRef getName() const;

  /// Change the name of the value.
  ///
  /// Choose a new unique name if the provided name is taken.
  ///
  /// \param Name The new name; or "" if the value's name should be removed.
  void setName(const Twine &Name);

  /// Transfer the name from V to this value.
  ///
  /// After taking V's name, sets V's name to empty.
  ///
  /// \note It is an error to call V->takeName(V).
  void takeName(Value *V);

  /// Change all uses of this to point to a new Value.
  ///
  /// Go through the uses list for this definition and make each use point to
  /// "V" instead of "this".  After this completes, 'this's use list is
  /// guaranteed to be empty.
  void replaceAllUsesWith(Value *V);

  /// Change non-metadata uses of this to point to a new Value.
  ///
  /// Go through the uses list for this definition and make each use point to
  /// "V" instead of "this". This function skips metadata entries in the list.
  void replaceNonMetadataUsesWith(Value *V);

  /// Go through the uses list for this definition and make each use point
  /// to "V" if the callback ShouldReplace returns true for the given Use.
  /// Unlike replaceAllUsesWith() this function does not support basic block
  /// values or constant users.
  void replaceUsesWithIf(Value *New,
                         llvm::function_ref<bool(Use &U)> ShouldReplace) {
    assert(New && "Value::replaceUsesWithIf(<null>) is invalid!");
    assert(New->getType() == getType() &&
           "replaceUses of value with new value of different type!");

    for (use_iterator UI = use_begin(), E = use_end(); UI != E;) {
      Use &U = *UI;
      ++UI;
      if (!ShouldReplace(U))
        continue;
      U.set(New);
    }
  }

  /// replaceUsesOutsideBlock - Go through the uses list for this definition and
  /// make each use point to "V" instead of "this" when the use is outside the
  /// block. 'This's use list is expected to have at least one element.
  /// Unlike replaceAllUsesWith() this function does not support basic block
  /// values or constant users.
  void replaceUsesOutsideBlock(Value *V, BasicBlock *BB);

  //----------------------------------------------------------------------
  // Methods for handling the chain of uses of this Value.
  //
  // Materializing a function can introduce new uses, so these methods come in
  // two variants:
  // The methods that start with materialized_ check the uses that are
  // currently known given which functions are materialized. Be very careful
  // when using them since you might not get all uses.
  // The methods that don't start with materialized_ assert that modules is
  // fully materialized.
  void assertModuleIsMaterializedImpl() const;
  // This indirection exists so we can keep assertModuleIsMaterializedImpl()
  // around in release builds of Value.cpp to be linked with other code built
  // in debug mode. But this avoids calling it in any of the release built code.
  void assertModuleIsMaterialized() const {
#ifndef NDEBUG
    assertModuleIsMaterializedImpl();
#endif
  }

  bool use_empty() const {
    assertModuleIsMaterialized();
    return UseList == nullptr;
  }

  bool materialized_use_empty() const {
    return UseList == nullptr;
  }

  using use_iterator = use_iterator_impl<Use>;
  using const_use_iterator = use_iterator_impl<const Use>;

  use_iterator materialized_use_begin() { return use_iterator(UseList); }
  const_use_iterator materialized_use_begin() const {
    return const_use_iterator(UseList);
  }
  use_iterator use_begin() {
    assertModuleIsMaterialized();
    return materialized_use_begin();
  }
  const_use_iterator use_begin() const {
    assertModuleIsMaterialized();
    return materialized_use_begin();
  }
  use_iterator use_end() { return use_iterator(); }
  const_use_iterator use_end() const { return const_use_iterator(); }
  iterator_range<use_iterator> materialized_uses() {
    return make_range(materialized_use_begin(), use_end());
  }
  iterator_range<const_use_iterator> materialized_uses() const {
    return make_range(materialized_use_begin(), use_end());
  }
  iterator_range<use_iterator> uses() {
    assertModuleIsMaterialized();
    return materialized_uses();
  }
  iterator_range<const_use_iterator> uses() const {
    assertModuleIsMaterialized();
    return materialized_uses();
  }

  bool user_empty() const {
    assertModuleIsMaterialized();
    return UseList == nullptr;
  }

  using user_iterator = user_iterator_impl<User>;
  using const_user_iterator = user_iterator_impl<const User>;

  user_iterator materialized_user_begin() { return user_iterator(UseList); }
  const_user_iterator materialized_user_begin() const {
    return const_user_iterator(UseList);
  }
  user_iterator user_begin() {
    assertModuleIsMaterialized();
    return materialized_user_begin();
  }
  const_user_iterator user_begin() const {
    assertModuleIsMaterialized();
    return materialized_user_begin();
  }
  user_iterator user_end() { return user_iterator(); }
  const_user_iterator user_end() const { return const_user_iterator(); }
  User *user_back() {
    assertModuleIsMaterialized();
    return *materialized_user_begin();
  }
  const User *user_back() const {
    assertModuleIsMaterialized();
    return *materialized_user_begin();
  }
  iterator_range<user_iterator> materialized_users() {
    return make_range(materialized_user_begin(), user_end());
  }
  iterator_range<const_user_iterator> materialized_users() const {
    return make_range(materialized_user_begin(), user_end());
  }
  iterator_range<user_iterator> users() {
    assertModuleIsMaterialized();
    return materialized_users();
  }
  iterator_range<const_user_iterator> users() const {
    assertModuleIsMaterialized();
    return materialized_users();
  }

  /// Return true if there is exactly one user of this value.
  ///
  /// This is specialized because it is a common request and does not require
  /// traversing the whole use list.
  bool hasOneUse() const {
    const_use_iterator I = use_begin(), E = use_end();
    if (I == E) return false;
    return ++I == E;
  }

  /// Return true if this Value has exactly N users.
  bool hasNUses(unsigned N) const;

  /// Return true if this value has N users or more.
  ///
  /// This is logically equivalent to getNumUses() >= N.
  bool hasNUsesOrMore(unsigned N) const;

  /// Return true if there is exactly one user of this value that cannot be
  /// dropped.
  ///
  /// This is specialized because it is a common request and does not require
  /// traversing the whole use list.
  Use *getSingleUndroppableUse();

  /// Return true if there this value.
  ///
  /// This is specialized because it is a common request and does not require
  /// traversing the whole use list.
  bool hasNUndroppableUses(unsigned N) const;

  /// Return true if this value has N users or more.
  ///
  /// This is logically equivalent to getNumUses() >= N.
  bool hasNUndroppableUsesOrMore(unsigned N) const;

  /// Remove every uses that can safely be removed.
  ///
  /// This will remove for example uses in llvm.assume.
  /// This should be used when performing want to perform a tranformation but
  /// some Droppable uses pervent it.
  /// This function optionally takes a filter to only remove some droppable
  /// uses.
  void dropDroppableUses(llvm::function_ref<bool(const Use *)> ShouldDrop =
                             [](const Use *) { return true; });

  /// Check if this value is used in the specified basic block.
  bool isUsedInBasicBlock(const BasicBlock *BB) const;

  /// This method computes the number of uses of this Value.
  ///
  /// This is a linear time operation.  Use hasOneUse, hasNUses, or
  /// hasNUsesOrMore to check for specific values.
  unsigned getNumUses() const;

  /// This method should only be used by the Use class.
  void addUse(Use &U) { U.addToList(&UseList); }

  /// Concrete subclass of this.
  ///
  /// An enumeration for keeping track of the concrete subclass of Value that
  /// is actually instantiated. Values of this enumeration are kept in the
  /// Value classes SubclassID field. They are used for concrete type
  /// identification.
  enum ValueTy {
#define HANDLE_VALUE(Name) Name##Val,
#include "llvm/IR/Value.def"

    // Markers:
#define HANDLE_CONSTANT_MARKER(Marker, Constant) Marker = Constant##Val,
#include "llvm/IR/Value.def"
  };

  /// Return an ID for the concrete type of this object.
  ///
  /// This is used to implement the classof checks.  This should not be used
  /// for any other purpose, as the values may change as LLVM evolves.  Also,
  /// note that for instructions, the Instruction's opcode is added to
  /// InstructionVal. So this means three things:
  /// # there is no value with code InstructionVal (no opcode==0).
  /// # there are more possible values for the value type than in ValueTy enum.
  /// # the InstructionVal enumerator must be the highest valued enumerator in
  ///   the ValueTy enum.
  unsigned getValueID() const {
    return SubclassID;
  }

  /// Return the raw optional flags value contained in this value.
  ///
  /// This should only be used when testing two Values for equivalence.
  unsigned getRawSubclassOptionalData() const {
    return SubclassOptionalData;
  }

  /// Clear the optional flags contained in this value.
  void clearSubclassOptionalData() {
    SubclassOptionalData = 0;
  }

  /// Check the optional flags for equality.
  bool hasSameSubclassOptionalData(const Value *V) const {
    return SubclassOptionalData == V->SubclassOptionalData;
  }

  /// Return true if there is a value handle associated with this value.
  bool hasValueHandle() const { return HasValueHandle; }

  /// Return true if there is metadata referencing this value.
  bool isUsedByMetadata() const { return IsUsedByMD; }

  /// Return true if this value is a swifterror value.
  ///
  /// swifterror values can be either a function argument or an alloca with a
  /// swifterror attribute.
  bool isSwiftError() const;

  /// Strip off pointer casts, all-zero GEPs and address space casts.
  ///
  /// Returns the original uncasted value.  If this is called on a non-pointer
  /// value, it returns 'this'.
  const Value *stripPointerCasts() const;
  Value *stripPointerCasts() {
    return const_cast<Value *>(
        static_cast<const Value *>(this)->stripPointerCasts());
  }

  /// Strip off pointer casts, all-zero GEPs, address space casts, and aliases.
  ///
  /// Returns the original uncasted value.  If this is called on a non-pointer
  /// value, it returns 'this'.
  const Value *stripPointerCastsAndAliases() const;
  Value *stripPointerCastsAndAliases() {
    return const_cast<Value *>(
        static_cast<const Value *>(this)->stripPointerCastsAndAliases());
  }

  /// Strip off pointer casts, all-zero GEPs and address space casts
  /// but ensures the representation of the result stays the same.
  ///
  /// Returns the original uncasted value with the same representation. If this
  /// is called on a non-pointer value, it returns 'this'.
  const Value *stripPointerCastsSameRepresentation() const;
  Value *stripPointerCastsSameRepresentation() {
    return const_cast<Value *>(static_cast<const Value *>(this)
                                   ->stripPointerCastsSameRepresentation());
  }

  /// Strip off pointer casts, all-zero GEPs and invariant group info.
  ///
  /// Returns the original uncasted value.  If this is called on a non-pointer
  /// value, it returns 'this'. This function should be used only in
  /// Alias analysis.
  const Value *stripPointerCastsAndInvariantGroups() const;
  Value *stripPointerCastsAndInvariantGroups() {
    return const_cast<Value *>(static_cast<const Value *>(this)
                                   ->stripPointerCastsAndInvariantGroups());
  }

  /// Strip off pointer casts and all-constant inbounds GEPs.
  ///
  /// Returns the original pointer value.  If this is called on a non-pointer
  /// value, it returns 'this'.
  const Value *stripInBoundsConstantOffsets() const;
  Value *stripInBoundsConstantOffsets() {
    return const_cast<Value *>(
              static_cast<const Value *>(this)->stripInBoundsConstantOffsets());
  }

  /// Accumulate the constant offset this value has compared to a base pointer.
  /// Only 'getelementptr' instructions (GEPs) with constant indices are
  /// accumulated but other instructions, e.g., casts, are stripped away as
  /// well. The accumulated constant offset is added to \p Offset and the base
  /// pointer is returned.
  ///
  /// The APInt \p Offset has to have a bit-width equal to the IntPtr type for
  /// the address space of 'this' pointer value, e.g., use
  /// DataLayout::getIndexTypeSizeInBits(Ty).
  ///
  /// If \p AllowNonInbounds is true, constant offsets in GEPs are stripped and
  /// accumulated even if the GEP is not "inbounds".
  ///
  /// If this is called on a non-pointer value, it returns 'this' and the
  /// \p Offset is not modified.
  ///
  /// Note that this function will never return a nullptr. It will also never
  /// manipulate the \p Offset in a way that would not match the difference
  /// between the underlying value and the returned one. Thus, if no constant
  /// offset was found, the returned value is the underlying one and \p Offset
  /// is unchanged.
  const Value *stripAndAccumulateConstantOffsets(const DataLayout &DL,
                                                 APInt &Offset,
                                                 bool AllowNonInbounds) const;
  Value *stripAndAccumulateConstantOffsets(const DataLayout &DL, APInt &Offset,
                                           bool AllowNonInbounds) {
    return const_cast<Value *>(
        static_cast<const Value *>(this)->stripAndAccumulateConstantOffsets(
            DL, Offset, AllowNonInbounds));
  }

  /// This is a wrapper around stripAndAccumulateConstantOffsets with the
  /// in-bounds requirement set to false.
  const Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL,
                                                         APInt &Offset) const {
    return stripAndAccumulateConstantOffsets(DL, Offset,
                                             /* AllowNonInbounds */ false);
  }
  Value *stripAndAccumulateInBoundsConstantOffsets(const DataLayout &DL,
                                                   APInt &Offset) {
    return stripAndAccumulateConstantOffsets(DL, Offset,
                                             /* AllowNonInbounds */ false);
  }

  /// Strip off pointer casts and inbounds GEPs.
  ///
  /// Returns the original pointer value.  If this is called on a non-pointer
  /// value, it returns 'this'.
  const Value *stripInBoundsOffsets() const;
  Value *stripInBoundsOffsets() {
    return const_cast<Value *>(
                      static_cast<const Value *>(this)->stripInBoundsOffsets());
  }

  /// Returns the number of bytes known to be dereferenceable for the
  /// pointer value.
  ///
  /// If CanBeNull is set by this function the pointer can either be null or be
  /// dereferenceable up to the returned number of bytes.
  uint64_t getPointerDereferenceableBytes(const DataLayout &DL,
                                          bool &CanBeNull) const;

  /// Returns an alignment of the pointer value.
  ///
  /// Returns an alignment which is either specified explicitly, e.g. via
  /// align attribute of a function argument, or guaranteed by DataLayout.
  MaybeAlign getPointerAlignment(const DataLayout &DL) const;

  /// Translate PHI node to its predecessor from the given basic block.
  ///
  /// If this value is a PHI node with CurBB as its parent, return the value in
  /// the PHI node corresponding to PredBB.  If not, return ourself.  This is
  /// useful if you want to know the value something has in a predecessor
  /// block.
  const Value *DoPHITranslation(const BasicBlock *CurBB,
                                const BasicBlock *PredBB) const;
  Value *DoPHITranslation(const BasicBlock *CurBB, const BasicBlock *PredBB) {
    return const_cast<Value *>(
             static_cast<const Value *>(this)->DoPHITranslation(CurBB, PredBB));
  }

  /// The maximum alignment for instructions.
  ///
  /// This is the greatest alignment value supported by load, store, and alloca
  /// instructions, and global values.
  static const unsigned MaxAlignmentExponent = 29;
  static const unsigned MaximumAlignment = 1u << MaxAlignmentExponent;

  /// Mutate the type of this Value to be of the specified type.
  ///
  /// Note that this is an extremely dangerous operation which can create
  /// completely invalid IR very easily.  It is strongly recommended that you
  /// recreate IR objects with the right types instead of mutating them in
  /// place.
  void mutateType(Type *Ty) {
    VTy = Ty;
  }

  /// Sort the use-list.
  ///
  /// Sorts the Value's use-list by Cmp using a stable mergesort.  Cmp is
  /// expected to compare two \a Use references.
  template <class Compare> void sortUseList(Compare Cmp);

  /// Reverse the use-list.
  void reverseUseList();

private:
  /// Merge two lists together.
  ///
  /// Merges \c L and \c R using \c Cmp.  To enable stable sorts, always pushes
  /// "equal" items from L before items from R.
  ///
  /// \return the first element in the list.
  ///
  /// \note Completely ignores \a Use::Prev (doesn't read, doesn't update).
  template <class Compare>
  static Use *mergeUseLists(Use *L, Use *R, Compare Cmp) {
    Use *Merged;
    Use **Next = &Merged;

    while (true) {
      if (!L) {
        *Next = R;
        break;
      }
      if (!R) {
        *Next = L;
        break;
      }
      if (Cmp(*R, *L)) {
        *Next = R;
        Next = &R->Next;
        R = R->Next;
      } else {
        *Next = L;
        Next = &L->Next;
        L = L->Next;
      }
    }

    return Merged;
  }

protected:
  unsigned short getSubclassDataFromValue() const { return SubclassData; }
  void setValueSubclassData(unsigned short D) { SubclassData = D; }
};

struct ValueDeleter { void operator()(Value *V) { V->deleteValue(); } };

/// Use this instead of std::unique_ptr<Value> or std::unique_ptr<Instruction>.
/// Those don't work because Value and Instruction's destructors are protected,
/// aren't virtual, and won't destroy the complete object.
using unique_value = std::unique_ptr<Value, ValueDeleter>;

inline raw_ostream &operator<<(raw_ostream &OS, const Value &V) {
  V.print(OS);
  return OS;
}

void Use::set(Value *V) {
  if (Val) removeFromList();
  Val = V;
  if (V) V->addUse(*this);
}

Value *Use::operator=(Value *RHS) {
  set(RHS);
  return RHS;
}

const Use &Use::operator=(const Use &RHS) {
  set(RHS.Val);
  return *this;
}

template <class Compare> void Value::sortUseList(Compare Cmp) {
  if (!UseList || !UseList->Next)
    // No need to sort 0 or 1 uses.
    return;

  // Note: this function completely ignores Prev pointers until the end when
  // they're fixed en masse.

  // Create a binomial vector of sorted lists, visiting uses one at a time and
  // merging lists as necessary.
  const unsigned MaxSlots = 32;
  Use *Slots[MaxSlots];

  // Collect the first use, turning it into a single-item list.
  Use *Next = UseList->Next;
  UseList->Next = nullptr;
  unsigned NumSlots = 1;
  Slots[0] = UseList;

  // Collect all but the last use.
  while (Next->Next) {
    Use *Current = Next;
    Next = Current->Next;

    // Turn Current into a single-item list.
    Current->Next = nullptr;

    // Save Current in the first available slot, merging on collisions.
    unsigned I;
    for (I = 0; I < NumSlots; ++I) {
      if (!Slots[I])
        break;

      // Merge two lists, doubling the size of Current and emptying slot I.
      //
      // Since the uses in Slots[I] originally preceded those in Current, send
      // Slots[I] in as the left parameter to maintain a stable sort.
      Current = mergeUseLists(Slots[I], Current, Cmp);
      Slots[I] = nullptr;
    }
    // Check if this is a new slot.
    if (I == NumSlots) {
      ++NumSlots;
      assert(NumSlots <= MaxSlots && "Use list bigger than 2^32");
    }

    // Found an open slot.
    Slots[I] = Current;
  }

  // Merge all the lists together.
  assert(Next && "Expected one more Use");
  assert(!Next->Next && "Expected only one Use");
  UseList = Next;
  for (unsigned I = 0; I < NumSlots; ++I)
    if (Slots[I])
      // Since the uses in Slots[I] originally preceded those in UseList, send
      // Slots[I] in as the left parameter to maintain a stable sort.
      UseList = mergeUseLists(Slots[I], UseList, Cmp);

  // Fix the Prev pointers.
  for (Use *I = UseList, **Prev = &UseList; I; I = I->Next) {
    I->setPrev(Prev);
    Prev = &I->Next;
  }
}

// isa - Provide some specializations of isa so that we don't have to include
// the subtype header files to test to see if the value is a subclass...
//
template <> struct isa_impl<Constant, Value> {
  static inline bool doit(const Value &Val) {
    static_assert(Value::ConstantFirstVal == 0, "Val.getValueID() >= Value::ConstantFirstVal");
    return Val.getValueID() <= Value::ConstantLastVal;
  }
};

template <> struct isa_impl<ConstantData, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() >= Value::ConstantDataFirstVal &&
           Val.getValueID() <= Value::ConstantDataLastVal;
  }
};

template <> struct isa_impl<ConstantAggregate, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() >= Value::ConstantAggregateFirstVal &&
           Val.getValueID() <= Value::ConstantAggregateLastVal;
  }
};

template <> struct isa_impl<Argument, Value> {
  static inline bool doit (const Value &Val) {
    return Val.getValueID() == Value::ArgumentVal;
  }
};

template <> struct isa_impl<InlineAsm, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() == Value::InlineAsmVal;
  }
};

template <> struct isa_impl<Instruction, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() >= Value::InstructionVal;
  }
};

template <> struct isa_impl<BasicBlock, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() == Value::BasicBlockVal;
  }
};

template <> struct isa_impl<Function, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() == Value::FunctionVal;
  }
};

template <> struct isa_impl<GlobalVariable, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() == Value::GlobalVariableVal;
  }
};

template <> struct isa_impl<GlobalAlias, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() == Value::GlobalAliasVal;
  }
};

template <> struct isa_impl<GlobalIFunc, Value> {
  static inline bool doit(const Value &Val) {
    return Val.getValueID() == Value::GlobalIFuncVal;
  }
};

template <> struct isa_impl<GlobalIndirectSymbol, Value> {
  static inline bool doit(const Value &Val) {
    return isa<GlobalAlias>(Val) || isa<GlobalIFunc>(Val);
  }
};

template <> struct isa_impl<GlobalValue, Value> {
  static inline bool doit(const Value &Val) {
    return isa<GlobalObject>(Val) || isa<GlobalIndirectSymbol>(Val);
  }
};

template <> struct isa_impl<GlobalObject, Value> {
  static inline bool doit(const Value &Val) {
    return isa<GlobalVariable>(Val) || isa<Function>(Val);
  }
};

// Create wrappers for C Binding types (see CBindingWrapping.h).
DEFINE_ISA_CONVERSION_FUNCTIONS(Value, LLVMValueRef)

// Specialized opaque value conversions.
inline Value **unwrap(LLVMValueRef *Vals) {
  return reinterpret_cast<Value**>(Vals);
}

template<typename T>
inline T **unwrap(LLVMValueRef *Vals, unsigned Length) {
#ifndef NDEBUG
  for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I)
    unwrap<T>(*I); // For side effect of calling assert on invalid usage.
#endif
  (void)Length;
  return reinterpret_cast<T**>(Vals);
}

inline LLVMValueRef *wrap(const Value **Vals) {
  return reinterpret_cast<LLVMValueRef*>(const_cast<Value**>(Vals));
}

} // end namespace llvm

#endif // LLVM_IR_VALUE_H


text:
Quadratic-equation-solver
=========================

Quadratic equation solver


text:
'use strict';

/**
 * Module dependencies.
 */
var mongoose = require('mongoose'),
    Schema = mongoose.Schema;

/**
 * Comment Schema
 */
var CommentSchema = new Schema({
    created: {
        type: Date,
        default: Date.now
    },
    parent: {
        Article: {
            type: Schema.ObjectId,
            ref: 'Article'
        },
        header: {
            type: String,
            default: '',
            trim: true
        }
    },
    content: {
        type: String,
        default: '',
        trim: true
    },
    status: {
        type: String,
        enum: [
        'public',
        'private', // only to me and author
        'protected'
        ],
        default:'private'
    },
    user: {
        type: Schema.ObjectId,
        ref: 'User'
    }
});

mongoose.model('Comment', CommentSchema);


text:
from .index import IndexPage

__all__ = ["IndexPage"]