text:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<groupId>net.bull.javamelody</groupId>
	<artifactId>liferay-javamelody-hook</artifactId>
	<version>1.76.0.0</version>
	<packaging>war</packaging>

	<name>Liferay JavaMelody Plugin</name>
	<description>JavaMelody Monitoring in Liferay.</description>
	<url>https://github.com/javamelody/javamelody/wiki</url>
	<inceptionYear>2013</inceptionYear>
	<prerequisites>
		<maven>3.0.4</maven>
	</prerequisites>

	<developers>
		<developer>
			<id>evernat</id>
			<email>evernat@free.fr</email>
			<name>Emeric Vernat</name>
		</developer>
	</developers>
	<organization>
		<name>Emeric Vernat</name>
		<url>https://github.com/javamelody/javamelody/wiki</url>
	</organization>
	<licenses>
		<license>
			<name>ASL</name>
			<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
			<distribution>repo</distribution>
		</license>
	</licenses>

	<scm>
		<connection>scm:git:git@github.com:javamelody/liferay-javamelody.git</connection>
		<developerConnection>scm:git:git@github.com:javamelody/liferay-javamelody.git</developerConnection>
		<url>https://github.com/javamelody/liferay-javamelody</url>
		<tag>HEAD</tag>
	</scm>
	<issueManagement>
		<system>GITHUB</system>
		<url>https://github.com/javamelody/liferay-javamelody/issues</url>
	</issueManagement>
	<ciManagement>
		<system>Cloudbees</system>
		<url>http://javamelody.ci.cloudbees.com/job/liferay-javamelody</url>
	</ciManagement>

	<properties>
		<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
		<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
	</properties>

	<build>
		<plugins>
			<plugin>
				<artifactId>maven-compiler-plugin</artifactId>
				<version>3.6.1</version>
				<configuration>
					<source>1.6</source>
					<target>1.6</target>
				</configuration>
			</plugin>
			<plugin>
				<artifactId>maven-war-plugin</artifactId>
				<version>3.0.0</version>
				<configuration>
					<webResources>
						<resource>
							<directory>src/main/webapp</directory>
							<filtering>true</filtering>
						</resource>
					</webResources>
					<packagingExcludes>WEB-INF/lib/javamelody-core*.jar</packagingExcludes>
					<overlays>
						<overlay>
							<groupId>net.bull.javamelody</groupId>
							<artifactId>javamelody-core</artifactId>
							<type>jar</type>
							<excludes>
								<!-- without this, monitoring does not work in Liferay, after restart -->
								<exclude>META-INF/web-fragment.xml</exclude>
								<exclude>META-INF/**/*.*</exclude>
							</excludes>
							<targetPath>WEB-INF/classes</targetPath>
						</overlay>
					</overlays>
					<failOnMissingWebXml>false</failOnMissingWebXml>
					<archive>
						<manifestEntries>
							<Implementation-Title>${project.name}</Implementation-Title>
							<Implementation-Version>${project.version}</Implementation-Version>
							<Implementation-Vendor>Emeric Vernat</Implementation-Vendor>

							<!-- Override user.name in Built-By -->
							<Built-By>Emeric Vernat</Built-By>
						</manifestEntries>
					</archive>
				</configuration>
			</plugin>
		</plugins>
	</build>
	<dependencies>
		<dependency>
			<groupId>net.bull.javamelody</groupId>
			<artifactId>javamelody-core</artifactId>
			<version>1.76.0</version>
		</dependency>
		<dependency>
			<groupId>com.lowagie</groupId>
			<artifactId>itext</artifactId>
			<version>2.1.7</version>
			<exclusions>
				<exclusion>
					<artifactId>bcmail-jdk14</artifactId>
					<groupId>bouncycastle</groupId>
				</exclusion>
				<exclusion>
					<artifactId>bcprov-jdk14</artifactId>
					<groupId>bouncycastle</groupId>
				</exclusion>
				<exclusion>
					<artifactId>bctsp-jdk14</artifactId>
					<groupId>bouncycastle</groupId>
				</exclusion>
			</exclusions>
		</dependency>
		<dependency>
			<groupId>com.thoughtworks.xstream</groupId>
			<artifactId>xstream</artifactId>
			<version>1.4.10</version>
		</dependency>
		<dependency>
			<groupId>javax.servlet</groupId>
			<artifactId>javax.servlet-api</artifactId>
			<version>3.0.1</version>
			<scope>provided</scope>
		</dependency>
		<dependency>
			<groupId>javax.portlet</groupId>
			<artifactId>portlet-api</artifactId>
			<version>2.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- portal-service provided in Liferay 6.x -->
		<dependency>
			<groupId>com.liferay.portal</groupId>
			<artifactId>portal-service</artifactId>
			<version>6.1.0</version>
			<scope>provided</scope>
		</dependency>
		<!-- portal kernel provided in Liferay 7.x -->
		<dependency>
			<groupId>com.liferay.portal</groupId>
			<artifactId>com.liferay.portal.kernel</artifactId>
			<version>2.21.0</version>
			<scope>provided</scope>
		</dependency>
	</dependencies>
</project>


text:
# include <boost/type_traits/is_array.hpp>
# include <boost/detail/workaround.hpp>
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
#  include <boost/type_traits/is_enum.hpp>
# endif
namespace boost { namespace python { namespace detail {

template <
    bool array
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
  , bool enum_  // vc7 has a problem destroying enums
# endif
    > struct value_destroyer;

template <>
struct value_destroyer<
    false
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
  , false
# endif
    >
{
    template <class T>
    static void execute(T const volatile* p)
    {
        p->~T();
    }
};

template <>
struct value_destroyer<
    true
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
  , false
# endif
    >
{
    template <class A, class T>
    static void execute(A*, T const volatile* const first)
    {
        for (T const volatile* p = first; p != first + sizeof(A)/sizeof(T); ++p)
        {
            value_destroyer<
                boost::is_array<T>::value
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
              , boost::is_enum<T>::value
# endif
            >::execute(p);
        }
    }

    template <class T>
    static void execute(T const volatile* p)
    {
        execute(p, *p);
    }
};

# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
template <>
struct value_destroyer<true,true>
{
    template <class T>
    static void execute(T const volatile*)
    {
    }
};

template <>
struct value_destroyer<false,true>
{
    template <class T>
    static void execute(T const volatile*)
    {
    }
};
# endif
template <class T>
inline void destroy_referent_impl(void* p, T& (*)())
{
    // note: cv-qualification needed for MSVC6
    // must come *before* T for metrowerks
    value_destroyer<
         (boost::is_array<T>::value)
# if BOOST_WORKAROUND(BOOST_MSVC, == 1300)
       , (boost::is_enum<T>::value)
# endif
    >::execute((const volatile T*)p);
}

template <class T>
inline void destroy_referent(void* p, T(*)() = 0)
{
    destroy_referent_impl(p, (T(*)())0);
}

}}} // namespace boost::python::detail

#endif // DESTROY_DWA2002221_HPP

redpajama_set_name: RedPajamaGithub


text:
@interface OAQLabelElement : QLabelElement

@property (nonatomic) UIView *accessoryView;
@property (nonatomic, getter = isAccessoryViewAllowed) BOOL accessoryViewAllowed;
@property (nonatomic) UIImage *accessoryViewImage;
@property (nonatomic) CGAffineTransform transform;

@end


text:
package ti.modules.titanium.ui.widget.listview;

import java.util.HashMap;

import org.appcelerator.kroll.KrollDict;
import org.appcelerator.titanium.TiDimension;
import org.appcelerator.titanium.view.TiCompositeLayout;
import org.appcelerator.titanium.view.TiUIView;

import android.content.Context;
import android.util.AttributeSet;

public class TiBaseListViewItem extends TiCompositeLayout{

	private HashMap<String, ViewItem> viewsMap;
	private ViewItem viewItem;
	public TiBaseListViewItem(Context context) {
		super(context);
		viewsMap = new HashMap<String, ViewItem>();
	}

	public TiBaseListViewItem(Context context, AttributeSet set) {
		super(context, set);
		setId(TiListView.listContentId);
		viewsMap = new HashMap<String, ViewItem>();
		viewItem = new ViewItem(null, new KrollDict());
	}

	public HashMap<String, ViewItem> getViewsMap() {
		return viewsMap;
	}

	public ViewItem getViewItem() {
		return viewItem;
	}

	public void bindView(String binding, ViewItem view) {
		viewsMap.put(binding, view);
	}

	public TiUIView getViewFromBinding(String binding) {
		ViewItem viewItem = viewsMap.get(binding);
		if (viewItem != null) {
			return viewItem.getView();
		}
		return null;
	}

	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
		int h = MeasureSpec.getSize(heightMeasureSpec);
		int hMode = MeasureSpec.getMode(heightMeasureSpec);
		super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(h, hMode));
	}

}


text:
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using OSS.Clients.Oauth.WX;
using OSS.Clients.Oauth.WX.Mos;
using OSS.Common.BasicImpls;
using OSS.Common.BasicMos;
using OSS.Common.BasicMos.Resp;

namespace OSS.Clients.SNS.Samples.Controllers
{
    public class OauthConfigProvider : IMetaProvider<AppConfig>
    {
        private static AppConfig m_Config = new AppConfig()
        {
            AppId = "wxaa9e6cb3f03afa97",
            AppSecret = "0fc0c6f735a90fda1df5fc840e010144"
        };
        public Task<Resp<AppConfig>> GetMeta()
        {
            return Task.FromResult(new Resp<AppConfig>(m_Config));
        }
    }

    public class wxOauthController : Controller
    {
        private static WXOauthApi m_AuthApi = new WXOauthApi(new OauthConfigProvider());
        // GET: WXOauth
        public ActionResult auth( int type)
        {
            //记得更换成自己的项目域名
            var res = m_AuthApi.GetAuthorizeUrl("http://www.social.com/wxoauth/callback","1", (AuthClientType)type);
            res.Wait();

            return Redirect(res.Result.data);
        }

        public ActionResult callback(string code, string state)
        {
            var tokecRes = m_AuthApi.GetOauthAccessTokenAsync(code).Result;
            if (!tokecRes.IsSuccess())
                return Content("获取用户授权信息失败!");

            var userInfoRes = m_AuthApi.GetWXOauthUserInfoAsync(tokecRes.access_token, tokecRes.openid).Result;
            return Content($"你已成功获取用户:{userInfoRes.nickname} 信息!");
        }

    }
}


text:
package com.monits.agilefant.view;

import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Matrix;
import android.graphics.PointF;
import android.graphics.RectF;
import android.graphics.drawable.BitmapDrawable;
import android.util.AttributeSet;
import android.view.MotionEvent;
import android.view.ViewGroup;
import android.widget.ImageView;

import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;

@SuppressFBWarnings(value = "MISSING_TO_STRING_OVERRIDE",
		justification = "There's no need to override toString method on a View class")
public class ScaleImageView extends ImageView {

	/**
	 * We determinate zoom in and zoom out limits. (On scalar measure)
	 */
	private static final float LIMIT_IN = 4f;
	private static final float LIMIT_OUT = 1f;

	// This are all values on a 3x3 Matrix
	private static final int MATRIX_SIZE = 9;

	private float bottomMargin;

	// Mode enum
	private enum Action {
		DRAG, ZOOM, NONE
	}

	// Action mode
	private Action mode;

	// Determinates if we re zoomed in or not
	private boolean isZoomed;

	// Initial Matrix
	private final Matrix initialMatrix = new Matrix();

	// Mid point between fingers
	@SuppressFBWarnings(value = "FCBL_FIELD_COULD_BE_LOCAL", justification = "False Positive")
	private PointF midPoint;

	// Start point for one finger (Drag action)
	@SuppressFBWarnings(value = "FCBL_FIELD_COULD_BE_LOCAL", justification = "False Positive")
	private final PointF startPoint = new PointF();

	// Distance values are used to store last 2 movements
	@SuppressFBWarnings(value = "FCBL_FIELD_COULD_BE_LOCAL", justification = "False Positive")
	private float oldDistance;

	@SuppressFBWarnings(value = "FCBL_FIELD_COULD_BE_LOCAL", justification = "False Positive")
	private final PointF oldPosition = new PointF();

	/**
	 * @param context context
	 */
	public ScaleImageView(final Context context) {
		super(context);
	}

	/**
	 * @param context context
	 * @param attrs view attrs
	 */
	public ScaleImageView(final Context context, final AttributeSet attrs) {
		super(context, attrs);
		buildConfiguration(context, attrs);
	}

	/**
	 * @param context context
	 * @param attrs view attrs
	 * @param defStyleAttr def attrs
	 */
	public ScaleImageView(final Context context, final AttributeSet attrs, final int defStyleAttr) {
		super(context, attrs, defStyleAttr);
		buildConfiguration(context, attrs);
	}

	private void buildConfiguration(final Context context, final AttributeSet attrs) {
		//check attributes you need, for example all paddings
		final int [] attributes = new int [] { android.R.attr.layout_marginBottom };

		//then obtain typed array
		final TypedArray arr = context.obtainStyledAttributes(attrs, attributes);
		bottomMargin = arr.getDimension(0, 0);
		arr.recycle();
	}

	@Override
	protected void onDraw(final Canvas canvas) {
		super.onDraw(canvas);
		// We fix image only if we re not zoomed in
		if (!isZoomed) {
			fixImage();
		}
	}

	@Override
	public boolean onTouchEvent(final MotionEvent motionEvent) {
		switch (motionEvent.getAction() & MotionEvent.ACTION_MASK) {
		case MotionEvent.ACTION_DOWN:
			// We only want to drag image if we're zoomed in
			if (isZoomed) {
				getParent().requestDisallowInterceptTouchEvent(true);

				// We re executing a dragging action
				mode = Action.DRAG;

				// Initial matrix for dragging
				initialMatrix.set(getImageMatrix());

				// Sets startPoint
				startPoint.set(motionEvent.getX(), motionEvent.getY());

				// Restarts oldPosition
				oldPosition.set(startPoint);
			}

			break;

		case MotionEvent.ACTION_POINTER_DOWN:
			getParent().requestDisallowInterceptTouchEvent(true);

			// We re starting a zoom action (Both fingers re on screen)
			mode = Action.ZOOM;

			// Initial matrix for zooming
			initialMatrix.set(getImageMatrix());

			// Gets mid point between fingers
			midPoint = getMid(motionEvent);

			// Gets initial distance between 2 fingers
			oldDistance = spaceBetweenFingers(motionEvent);

			break;

		case MotionEvent.ACTION_MOVE:
			// if action is zoom, we start zooming
			if (mode == Action.ZOOM) {
				zoom(motionEvent);
			}

			// if action is drag, we start dragging
			if (mode == Action.DRAG) {
				drag(motionEvent);
			}
			break;

		case MotionEvent.ACTION_UP:
			performClick();
			// fallthrough
		case MotionEvent.ACTION_POINTER_UP:
		default:
			//We 've canceled every action
			mode = Action.NONE;
			break;
		}
		return true;
	}

	private void fixImage() {
		// Get bitmap from view
		final Bitmap bitmap = ((BitmapDrawable) getDrawable()).getBitmap();
		final Matrix matrix = new Matrix();
		matrix.set(getImageMatrix());

		// Get image and view dimensions and fit it to matrix
		matrix.set(getImageMatrix());
		final RectF drawableRect = new RectF(0, 0, bitmap.getWidth(), bitmap.getHeight());
		final RectF viewRect = new RectF(0, 0, getWidth(), getHeight());
		matrix.setRectToRect(drawableRect, viewRect, Matrix.ScaleToFit.CENTER);

		// Update our initial matrix
		initialMatrix.set(matrix);

		// Set matrix to view
		setImageMatrix(matrix);
	}

	private void zoom(final MotionEvent motionEvent) {

		// new distance between fingers
		final float newDistance = spaceBetweenFingers(motionEvent);

		/**
		 * We can't modificate image matrix so we need to create a new instance
		 * and set it's value to image's matrix.
		 */
		final Matrix matrix = new Matrix();
		matrix.set(getImageMatrix());

		// All values on a 3x3 matrix
		final float[] matrixValues = new float[MATRIX_SIZE];

		// fill matrixValues
		matrix.getValues(matrixValues);

		setMarginBottom(getBorderDistances(matrixValues));

		// We don't let user to zoom out more than original position
		if (newDistance < oldDistance && matrixValues[Matrix.MSCALE_X] <= LIMIT_OUT) {

			// Fixes image
			if (isZoomed) {
				fixImage();
			}

			// Isn't zoomed anymore
			isZoomed = false;
			return;
		}

		// We dont let them zoom in more than LIMIT_IN
		if (newDistance > oldDistance && matrixValues[Matrix.MSCALE_X] >= LIMIT_IN) {
			mode = Action.NONE;
			return;
		}

		// get values from matrix and save it on matrixValues
		matrix.getValues(matrixValues);

		// We get scale
		final float scale = newDistance / oldDistance;

		// Copies initial matrix to it
		matrix.set(initialMatrix);

		// We apply zoom
		matrix.postScale(scale, scale, midPoint.x, midPoint.y);
		setImageMatrix(matrix);

		// Is zoomed
		isZoomed = true;

	}

	@SuppressFBWarnings(value = "CLI_CONSTANT_LIST_INDEX", justification = "Are constants used from a specific class.")
	private void drag(final MotionEvent motionEvent) {

		/**
		 * We can't modificate imageMatrix so we need to create
		 * a new instance of matrix and set it's value to imageMatrix.
		 */
		final Matrix matrix = new Matrix();
		matrix.set(getImageMatrix());

		// all values on a 3x3 matrix
		final float[] matrixValues = new float[MATRIX_SIZE];

		// fills matrixValues
		matrix.getValues(matrixValues);

		final RectF rectF = getBorderDistances(matrixValues);

		setMarginBottom(rectF);

		float x = motionEvent.getX();
		float y = motionEvent.getY();

		// Limits X edge dragging
		if (motionEvent.getX() > oldPosition.x) {
			//Moving left
			if (rectF.left >= 0) {
				x = oldPosition.x;
			}
		} else {
			// Moving right
			if (rectF.right <= 0) {
				x = oldPosition.x;
			}
		}

		// Limits Y edge dragging
		if (motionEvent.getY() > oldPosition.y) {
			// Moving top
			if (rectF.top >= 0) {
				y = oldPosition.y;
			}
		} else {
			// Moving bottom
			if (rectF.bottom <= 0) {
				y = oldPosition.y;
			}
		}

		// Copies initial matrix to it
		matrix.set(initialMatrix);

		matrix.postTranslate(x - startPoint.x, y - startPoint.y);
		setImageMatrix(matrix);

		// Updates old position
		oldPosition.set(x, y);
	}

	private void setMarginBottom(final RectF rectF) {
		final ViewGroup.MarginLayoutParams params = (ViewGroup.MarginLayoutParams) getLayoutParams();
		final float bottomMargin = this.bottomMargin - rectF.bottom;

		if (rectF.bottom > 0) {
			params.setMargins(0, 0, 0, (int) bottomMargin);
		} else {
			params.setMargins(0, 0, 0, (int) this.bottomMargin);
		}
		setLayoutParams(params);
	}

	@SuppressFBWarnings(value = "CLI_CONSTANT_LIST_INDEX", justification = "Are constants used from a specific class.")
	private RectF getBorderDistances(final float[] matrixValues) {
		// We establish borders distance values
		final RectF rectF = new RectF();
		rectF.set(matrixValues[Matrix.MTRANS_X], matrixValues[Matrix.MTRANS_Y],
				matrixValues[Matrix.MTRANS_X] + matrixValues[Matrix.MSCALE_X] * getBitmap().getWidth() - getWidth(),
				matrixValues[Matrix.MTRANS_Y] + matrixValues[Matrix.MSCALE_X] * getBitmap().getHeight() - getHeight());

		return rectF;
	}

	private Bitmap getBitmap() {
		return ((BitmapDrawable) getDrawable()).getBitmap();
	}

	private float spaceBetweenFingers(final MotionEvent event) {
		final float x = event.getX() - event.getX(1);
		final float y = event.getY() - event.getY(1);

		return (float) Math.sqrt(x * x + y * y);
	}

	private PointF getMid(final MotionEvent event) {
		final float x = event.getX(0) + event.getX(1);
		final float y = event.getY(0) + event.getY(1);

		return new PointF(x / 2, y / 2);
	}
}


text:
package net.firejack.platform.model.config.servlet.preprocessor;

import net.firejack.platform.api.OPFEngine;
import net.firejack.platform.api.process.domain.Process;
import net.firejack.platform.api.site.domain.NavigationElement;
import net.firejack.platform.core.domain.Lookup;
import net.firejack.platform.core.exception.BusinessFunctionException;
import net.firejack.platform.core.model.registry.NavigationElementType;
import net.firejack.platform.core.response.ServiceResponse;
import net.firejack.platform.utils.WebUtils;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.ServletRequestUtils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Map;

@Component
public class WorkflowProcessor implements IGatewayPreProcessor {

    private static final Logger logger = Logger.getLogger(WorkflowProcessor.class);

    @Override
    public void execute(Map<String, String> map, HttpServletRequest request, HttpServletResponse response, NavigationElement currentNavigationElement) {
        if (currentNavigationElement != null && NavigationElementType.WORKFLOW.equals(currentNavigationElement.getElementType())) {
            String processLookup = currentNavigationElement.getUrlParams();

            Long activityActionId = ServletRequestUtils.getLongParameter(request, "activityActionId", 0);

            ServiceResponse<Process> serviceResponse;
            if (activityActionId == 0) {
                serviceResponse = OPFEngine.ProcessService.readProcessWithStartActivity(processLookup);
            } else {
                serviceResponse = OPFEngine.ProcessService.readProcessWithActionActivity(activityActionId);
            }
            if (serviceResponse.isSuccess()) {
                Process process = serviceResponse.getItem();
                try {
                    String processJson = WebUtils.serializeObjectToJSON(process);
                    map.put("process", processJson);
                } catch (IOException e) {
                    logger.error(e.getMessage(), e);
                }
            } else {
                logger.error(serviceResponse.getMessage());
                throw new BusinessFunctionException(serviceResponse.getMessage());
            }

            Lookup main = currentNavigationElement.getMain();
            if (main != null) {
                try {
                    String entityJson = WebUtils.serializeObjectToJSON(main);
                    map.put("entity", entityJson);
                } catch (IOException e) {
                    logger.error(e.getMessage(), e);
                }
            }
        }
    }

}


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"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Drachenhorn.XML: Drachenhorn.Xml.Sheet.Common.BonusValue Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>

<link href="navtree.css" rel="stylesheet" type="text/css"/>

<link href="search/search.css" rel="stylesheet" type="text/css"/>

<link href="doxygen.css" rel="stylesheet" type="text/css" />

Drachenhorn.XML

Properties |
List of all members

Drachenhorn.Xml.Sheet.Common.BonusValue Class Reference

Bonus Values for Character Generation
 More...

Inheritance diagram for Drachenhorn.Xml.Sheet.Common.BonusValue:

<map name="_drachenhorn_8_xml_8_sheet_8_common_8_bonus_value_inherit__map" id="_drachenhorn_8_xml_8_sheet_8_common_8_bonus_value_inherit__map">
<area shape="rect" id="node2" href="class_drachenhorn_1_1_xml_1_1_child_changed_base.html" title="Base class notifying ChildChanged " alt="" coords="92,155,224,181"/>
<area shape="rect" id="node3" href="class_drachenhorn_1_1_xml_1_1_bindable_base.html" title="Bindable Base Class " alt="" coords="5,80,108,107"/>
<area shape="rect" id="node6" href="interface_drachenhorn_1_1_xml_1_1_calculation_1_1_i_formula_key_item.html" title="Interface to use as Parameter in Calculation. " alt="" coords="249,155,369,181"/>
<area shape="rect" id="node5" href="interface_drachenhorn_1_1_xml_1_1_interfaces_1_1_i_notify_child_changed.html" title="Interface to note if a child has changed. " alt="" coords="133,80,271,107"/>
</map>
[legend]

Properties

string 	Name [get, set]

 	Gets or sets the name.  More...

string 	Key [get, set]

int 	Value [get, set]

 Properties inherited from Drachenhorn.Xml.Calculation.IFormulaKeyItem

string 	Key [get]

 	Gets the key.  More...

int 	Value [get]

 	Gets the value.  More...

Additional Inherited Members

 Protected Member Functions inherited from Drachenhorn.Xml.ChildChangedBase

 	ChildChangedBase ()

 	Initializes a new instance of the ChildChangedBase class.  More...

virtual void 	OnChildChanged ([CallerMemberName] string propertyName=null)

 	Called when [child changed].  More...

virtual void 	OnChildChanged (object sender, PropertyChangedEventArgs args)

 	Called when [child changed].  More...

void 	SetValuesChanged ()

 	Sets the ValueChanged.  More...

 Protected Member Functions inherited from Drachenhorn.Xml.BindableBase

virtual void 	OnPropertyChanged ([CallerMemberName] string propertyName=null)

 	Called when [property changed].  More...

 Events inherited from Drachenhorn.Xml.ChildChangedBase

PropertyChangedEventHandler 	ChildChanged

 	Occurs when [child changed].  More...

 Events inherited from Drachenhorn.Xml.BindableBase

PropertyChangedEventHandler 	PropertyChanged

 	Occurs when a property value changes.  More...

 Events inherited from Drachenhorn.Xml.Interfaces.INotifyChildChanged

PropertyChangedEventHandler 	ChildChanged

 	Occurs when [child changed].  More...

Detailed Description

Bonus Values for Character Generation

See also

Drachenhorn.Xml.ChildChangedBase, Drachenhorn.Xml.Calculation.IFormulaKeyItem

Property Documentation

◆ Key

          string Drachenhorn.Xml.Sheet.Common.BonusValue.Key

getset

◆ Name

          string Drachenhorn.Xml.Sheet.Common.BonusValue.Name

getset

Gets or sets the name.

The name.

◆ Value

          int Drachenhorn.Xml.Sheet.Common.BonusValue.Value

getset

The documentation for this class was generated from the following file:

Sheet/Common/BonusValue.cs

Drachenhorn

Xml

Sheet

Common

BonusValue

Generated by

     1.8.14


text:
package cloudup

import (
	"fmt"
	api "k8s.io/kops/pkg/apis/kops"
	"k8s.io/kops/upup/pkg/fi"
	"strings"
	"testing"
)

func TestDeepValidate_OK(t *testing.T) {
	c := buildDefaultCluster(t)
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1a"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1a"))
	err := api.DeepValidate(c, groups, true)
	if err != nil {
		t.Fatalf("Expected no error from DeepValidate")
	}
}

func TestDeepValidate_NoNodeZones(t *testing.T) {
	c := buildDefaultCluster(t)
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1a"))
	expectErrorFromDeepValidate(t, c, groups, "must configure at least one Node InstanceGroup")
}

func TestDeepValidate_NoMasterZones(t *testing.T) {
	c := buildDefaultCluster(t)
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1a"))
	expectErrorFromDeepValidate(t, c, groups, "must configure at least one Master InstanceGroup")
}

func TestDeepValidate_BadZone(t *testing.T) {
	t.Skipf("Zone validation not checked by DeepValidate")
	c := buildDefaultCluster(t)
	c.Spec.Zones = []*api.ClusterZoneSpec{
		{Name: "us-mock-1z", CIDR: "172.20.1.0/24"},
	}
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1z"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1z"))
	expectErrorFromDeepValidate(t, c, groups, "Zone is not a recognized AZ")
}

func TestDeepValidate_MixedRegion(t *testing.T) {
	t.Skipf("Region validation not checked by DeepValidate")
	c := buildDefaultCluster(t)
	c.Spec.Zones = []*api.ClusterZoneSpec{
		{Name: "us-mock-1a", CIDR: "172.20.1.0/24"},
		{Name: "us-west-1b", CIDR: "172.20.2.0/24"},
	}
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1a"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1a", "us-west-1b"))

	expectErrorFromDeepValidate(t, c, groups, "Clusters cannot span multiple regions")
}

func TestDeepValidate_RegionAsZone(t *testing.T) {
	t.Skipf("Region validation not checked by DeepValidate")
	c := buildDefaultCluster(t)
	c.Spec.Zones = []*api.ClusterZoneSpec{
		{Name: "us-mock-1", CIDR: "172.20.1.0/24"},
	}
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1"))

	expectErrorFromDeepValidate(t, c, groups, "Region is not a recognized EC2 region: \"us-east-\" (check you have specified valid zones?)")
}

func TestDeepValidate_NotIncludedZone(t *testing.T) {
	c := buildDefaultCluster(t)
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1d"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1d"))

	expectErrorFromDeepValidate(t, c, groups, "not configured as a Zone in the cluster")
}

func TestDeepValidate_DuplicateZones(t *testing.T) {
	c := buildDefaultCluster(t)
	c.Spec.Zones = []*api.ClusterZoneSpec{
		{Name: "us-mock-1a", CIDR: "172.20.1.0/24"},
		{Name: "us-mock-1a", CIDR: "172.20.2.0/24"},
	}
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1a"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1a"))
	expectErrorFromDeepValidate(t, c, groups, "Zones contained a duplicate value: us-mock-1a")
}

func TestDeepValidate_ExtraMasterZone(t *testing.T) {
	c := buildDefaultCluster(t)
	c.Spec.Zones = []*api.ClusterZoneSpec{
		{Name: "us-mock-1a", CIDR: "172.20.1.0/24"},
		{Name: "us-mock-1b", CIDR: "172.20.2.0/24"},
	}
	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1a", "us-mock-1b", "us-mock-1c"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1a", "us-mock-1b"))

	expectErrorFromDeepValidate(t, c, groups, "is not configured as a Zone in the cluster")
}

func TestDeepValidate_EvenEtcdClusterSize(t *testing.T) {
	c := buildDefaultCluster(t)
	c.Spec.EtcdClusters = []*api.EtcdClusterSpec{
		{
			Name: "main",
			Members: []*api.EtcdMemberSpec{
				{Name: "us-mock-1a", Zone: fi.String("us-mock-1a")},
				{Name: "us-mock-1b", Zone: fi.String("us-mock-1b")},
			},
		},
	}

	var groups []*api.InstanceGroup
	groups = append(groups, buildMinimalMasterInstanceGroup("us-mock-1a", "us-mock-1b", "us-mock-1c", "us-mock-1d"))
	groups = append(groups, buildMinimalNodeInstanceGroup("us-mock-1a"))

	expectErrorFromDeepValidate(t, c, groups, "There should be an odd number of master-zones, for etcd's quorum.  Hint: Use --zones and --master-zones to declare node zones and master zones separately.")
}

func expectErrorFromDeepValidate(t *testing.T, c *api.Cluster, groups []*api.InstanceGroup, message string) {
	err := api.DeepValidate(c, groups, true)
	if err == nil {
		t.Fatalf("Expected error from DeepValidate (strict=true)")
	}
	actualMessage := fmt.Sprintf("%v", err)
	if !strings.Contains(actualMessage, message) {
		t.Fatalf("Expected error %q, got %q", message, actualMessage)
	}
}


text:
This template can be used directly for the creation of new React apps in APM.

#### Includes

- ES2015 using [Webpack](https://webpack.github.io/) and [Babel](https://babeljs.io/)
- [React](https://facebook.github.io/react/) and [Babel](https://babeljs.io/)
- CSS with autoprefixing using [PostCSS](http://postcss.org/)
- SCSS using [sass-loader](https://github.com/jtangelder/sass-loader)
- Development server and reloading using [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) and [webpack-hot-middleware](https://github.com/glenjamin/webpack-hot-middleware)
- Unit tests using [Mocha](https://mochajs.org/), [enzyme](http://airbnb.io/enzyme/index.html), and [assert](https://nodejs.org/api/assert.html)
- Linting using [ESLint](http://eslint.org/)
- Code coverage using [nyc](https://github.com/istanbuljs/nyc)

#### Using
The sample code under `/src` is a basic React example to ensure bundling works correctly.

----

### Setup

    npm install

### Develop

    npm run
Open [http://localhost:8080](http://localhost:8080) in browser

- Uses [hot-module-replacement](https://webpack.github.io/docs/hot-module-replacement.html) to automatically rebuild and reload modules as the files under `src` are modified.

### Test

    npm test

- Runs unit tests using [Mocha](https://mochajs.org/) and [enzyme](http://airbnb.io/enzyme/index.html),
- Runs headless browser tests using Mocha and [Nightmare](http://www.nightmarejs.org/)
- Shows code coverage using [nyc/Istanbul](https://github.com/istanbuljs/nyc).
  A coverage report will also be written in the `./coverage/` directory.

### Lint

    npm run lint

- Runs [ESLint](http://eslint.org/) using [airbnb-base](https://www.npmjs.com/package/eslint-config-airbnb-base) as the base configuration

----

### Contributors
- Gary Thomas
- Li Zhang
- Tim Connor
- Michael Jewell


text:
.class public interface abstract Landroid/service/resolver/IResolverRankerResult;
.super Ljava/lang/Object;
.source "IResolverRankerResult.java"

# interfaces
.implements Landroid/os/IInterface;

# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Landroid/service/resolver/IResolverRankerResult$Stub;
    }
.end annotation

# virtual methods
.method public abstract sendResult(Ljava/util/List;)V
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/List",
            "<",
            "Landroid/service/resolver/ResolverTarget;",
            ">;)V"
        }
    .end annotation

    .annotation system Ldalvik/annotation/Throws;
        value = {
            Landroid/os/RemoteException;
        }
    .end annotation
.end method


text:
#include "TransferQueueTest.h"

#include <decaf/internal/util/concurrent/TransferQueue.h>

using namespace decaf;
using namespace decaf::internal;
using namespace decaf::internal::util;
using namespace decaf::internal::util::concurrent;

////////////////////////////////////////////////////////////////////////////////
TransferQueueTest::TransferQueueTest() {
}

////////////////////////////////////////////////////////////////////////////////
TransferQueueTest::~TransferQueueTest() {
}

////////////////////////////////////////////////////////////////////////////////
void TransferQueueTest::test() {

    TransferQueue<int> queue;
}


text:
var Aria = require("../Aria");
var ariaTemplatesDomElementWrapper = require("./DomElementWrapper");
var ariaDomEvent = require("../DomEvent");

/**
 * Wrapper class for DOM events to be passed to templates. Templates must not have direct access to the DOM, so the
 * DomEvent object cannot be passed directly. Instead, this wrapper object extends the DomEvent object by replacing DOM
 * references by wrappers on that references for safe DOM access.
 * @class aria.templates.DomEventWrapper
 */
module.exports = Aria.classDefinition({
    $classpath : "aria.templates.DomEventWrapper",
    $extends : ariaDomEvent,
    /**
     * Build a DomEventWrapper object.
     * @param {Object} domEvt DOM event object (passed directly)
     */
    $constructor : function (domEvt) {
        var DomWrapper = ariaTemplatesDomElementWrapper;
        this.$DomEvent.constructor.call(this, domEvt);

        /**
         * Wrapper on the HTML element on which the event happened.
         * @type aria.templates.DomElementWrapper
         */
        this.target = (this.target ? new DomWrapper(this.target) : null);

        /**
         * Wrapper on the HTML element from/to which the event is directed. (relatedTarget/fromElement/toElement)
         * @type aria.templates.DomElementWrapper
         */
        this.relatedTarget = (this.relatedTarget ? new DomWrapper(this.relatedTarget) : null);
        // bind function to original scope so that "this" is preserved
        // Not needed as $DomEvent constructor creates these functions
        // this.stopPropagation = aria.utils.Function.bind(domEvt.stopPropagation, domEvt);
        // this.preventDefault = aria.utils.Function.bind(domEvt.preventDefault, domEvt);
    },
    $destructor : function () {
        if (this.target) {
            this.target.$dispose();
            this.target = null;
        }
        if (this.relatedTarget) {
            this.relatedTarget.$dispose();
            this.relatedTarget = null;
        }
        this.$DomEvent.$destructor.call(this);
    },
    $prototype : {
        /**
         * Modify the target element of this event.
         * @param {HTMLElement} target New event target
         * @override
         */
        setTarget : function (target) {
            if (this.target) {
                this.target.$dispose();
            }
            this.target = target ? new ariaTemplatesDomElementWrapper(target) : null;
        }
    }
});


text:
package com.intellij.openapi.wm.impl.welcomeScreen;

import com.intellij.ide.RecentProjectsManagerBase;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.DefaultActionGroup;
import com.intellij.ui.UIBundle;

/**
 * @author pti
 *         Date: Mar 2, 2005
 */
public class RecentProjectsAction extends WelcomePopupAction {
  protected void fillActions(final DefaultActionGroup group) {
    final AnAction[] recentProjectActions = RecentProjectsManagerBase.getInstance().getRecentProjectsActions(false);
    for (AnAction action : recentProjectActions) {
      group.add(action);
    }
  }

  protected String getTextForEmpty() {
    return UIBundle.message("welcome.screen.recent.projects.action.no.recent.projects.to.display.action.name");
  }

  protected String getCaption() {
    return "";
  }

  @Override
  protected boolean isSilentlyChooseSingleOption() {
    return false;
  }

  @Override
  public void update(final AnActionEvent e) {
    e.getPresentation().setVisible(RecentProjectsManagerBase.getInstance().getRecentProjectsActions(false).length > 0);
  }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">

    <item android:drawable="@color/bg" android:state_focused="true" android:state_pressed="true"/>
    <item android:drawable="@color/bg" android:state_focused="false" android:state_pressed="true"/>
    <item android:drawable="@android:color/transparent" android:state_focused="false"/>

</selector>


text:
import test from 'ava'
import auth from '../../app/auth'

test('registers when given good data', t => {
  auth.register('jennifer', 'password')
    .then(response => {
      t.true(response)
      t.true(auth.loggedIn())
    })
})

test('returns error when given existing user', t => {
  t.throws(auth.register('juan', 'password', 'Username already in use'))
})


text:
/*!

Name: Commitment
Dependencies: jQuery
Author: Michael Lynch
Author URL: http://michaelynch.com
Date Created: February 7, 2014
Last Updated: February 7, 2014
Licensed under the MIT license

*/

;(function($) {

    $.fn.commitment = function(options) {

    	//return if no element was bound
		//so chained events can continue
		if(!this.length) {
			return this;
		}

		//define default parameters
        var defaults = {
        	user: null,
        	repo: null,
        	filterBranch: null,
        	filterAuthor: null,
        	filterPath: null,
        	filterSince: null,
        	filterUntil: null,
            makeCommitLink: false,
            showCommitDate: true,
            dateFormat: null,
            showCommitter: true,
            showCommitterAvatar: true,
            error: function(message) {},
            success: function() {},
            limit: null
        }

        //define plugin
        var plugin = this;

        //define settings
        plugin.settings = {}

        //merge defaults and options
        plugin.settings = $.extend({}, defaults, options);

        var s = plugin.settings;

        //define element
        var el = $(this);

        //if user and repo are set
        if(s.user && s.repo) {

	        //define endpoint
	        var endPoint = 'https://api.github.com/repos/'+s.user+'/'+s.repo+'/commits';

	        //define params array
	        var params = [];

	        //if filter author is set
	        if(s.filterBranch) {

	    		//push filter author param
	    		params.push('sha='+s.filterBranch);
	        }

	        //if filter author is set
	        if(s.filterAuthor) {

	    		//push filter author param
	    		params.push('author='+s.filterAuthor);
	        }

	        //if filter path is set
	        if(s.filterPath) {

		        //push path param
		        params.push('path='+s.filterPath);
	        }

	        //if filter since is set
	        if(s.filterSince) {

		        //push since param
		        params.push('since='+s.filterSince);
	        }

	        //if filter until is set
	        if(s.filterUntil) {

		        //push until param
		       params.push('until='+s.filterUntil);
	        }

	        //join params using an ampersand
	        //and add a question mark to define the first param
	        params = '?'+params.join('&');

	        //if there are params
	        if(params.length > 1) {

		        //append params to endpoint
		        endPoint += params;
	        }

	        //for each element
	        el.each(function() {

	        	$.ajax({
		        	type: 'GET',
		        	url: endPoint,
		        	dataType: 'json',
		        	success: function(data) {

		        		//default limit
		        		var showLimit = data.length;

	        			//get the show limit
		        		if(s.limit) {
		        			showLimit = s.limit;
		        		}

		        		//for each commit or until limit is reached
		        		for(var i = 0; i < showLimit; i++) {

		        			//define commit as a list item
		        			var commit = '
';

		        			//if makeCommitLink is true and html_url exists
		        			if(s.makeCommitLink && data[i].html_url) {

		        				//wrap commit message with an anchor tag
		        				commit += ''+data[i].commit.message+'';

		        			} else {

			        			//otherwise just write out the commit message
			        			commit += '
'+data[i].commit.message+'
';
		        			}

		        			if(s.showCommitDate && data[i].commit.committer.date) {

		        				var date = new Date(data[i].commit.committer.date);

			        			var day = date.getDate();

								var month = date.getMonth();

								var year = date.getFullYear();

								if(s.dateFormat === 'dd/mm/yyyy') {

									date = day+'/'+month+'/'+year;

								} else {

									date = date.toDateString();

								}

			        			commit += '
'+date+'
';
		        			}

		        			//if showCommitter is true and committer.login exists
		        			if(s.showCommitter && data[i].committer.login) {

			        			//create committer div
			        			commit += '
';

			        			//if showCommitterAvatar is true and committer.avatar_url exists
			        			if(s.showCommitterAvatar && data[i].committer.avatar_url) {

				        			//append committer avatar
				        			commit += '';
			        			}

			        			//append committer username
			        			commit += '
By '+data[i].committer.login+'

';
		        			}

		        			//close the commit message list item
		        			commit += '
';

			        		//append the commit
			        		el.append(commit);
		        		}

		        		//run success callback
		        		s.success.call(this);

		        	},
		        	error: function(jqXHR, textStatus,  errorThrown) {

		        		//run error callback
		        		s.error.call(this, 'Status: '+jqXHR.status+' Error: '+errorThrown);

		        	}

	        	});//ajax

	        });//each

        } else {

	        //run error callback
		    s.error.call(this, 'A Github username and repository are required.');

        }

    }

})(jQuery);


text:
using std::cin;
using std::cout;
using std::sort;
using std::string;
using std::vector;

typedef vector<string>::size_type vec_sz;

int main()
{
    // Read words from the input stream.
    vector<string> words;
    read(cin, words);

    // Count unique words.
    sort(words.begin(), words.end());
    vec_sz n_unique = 0;
    string word = "";
    for (vec_sz word_id = 0; word_id < words.size(); ++word_id)
        if (words[word_id] != word) {
            ++n_unique;
            word = words[word_id];
        }
    cout << n_unique;
    return 0;
}


text:
#ifndef __OSXTimer_H__
#define __OSXTimer_H__

#include <sys/time.h>
#include <sys/times.h>

/** Timer class */
class Timer
{
private:
	struct timeval mStart;
	clock_t mZeroClock;
public:
	Timer()
	{
		reset();
	}

	~Timer() {}

	/** Resets timer */
	void reset()
	{
		mZeroClock = clock();
		gettimeofday(&mStart, NULL);
	}

	/** Returns milliseconds since initialisation or last reset */
	unsigned long getMilliseconds()
	{
		struct timeval now;
		gettimeofday(&now, NULL);
		return (now.tv_sec - mStart.tv_sec) * 1000 + (now.tv_usec - mStart.tv_usec) / 1000;
	}

	/** Returns microseconds since initialisation or last reset */
	unsigned long getMicroseconds()
	{
		struct timeval now;
		gettimeofday(&now, NULL);
		return (now.tv_sec - mStart.tv_sec) * 1000000 + (now.tv_usec - mStart.tv_usec);
	}

	/** Returns milliseconds since initialisation or last reset, only CPU time measured */
	unsigned long getMillisecondsCPU()
	{
		clock_t newClock = clock();
		return (unsigned long)((float)(newClock - mZeroClock) / ((float)CLOCKS_PER_SEC / 1000.0)) ;
	}

	/** Returns microseconds since initialisation or last reset, only CPU time measured */
	unsigned long getMicrosecondsCPU()
	{
		clock_t newClock = clock();
		return (unsigned long)((float)(newClock - mZeroClock) / ((float)CLOCKS_PER_SEC / 1000000.0)) ;
	}
};

#endif


text:
// Copyright © 2012, Université catholique de Louvain
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// *  Redistributions of source code must retain the above copyright notice,
//    this list of conditions and the following disclaimer.
// *  Redistributions in binary form must reproduce the above copyright notice,
//    this list of conditions and the following disclaimer in the documentation
//    and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.

#ifndef __LSTRING_DECL_H
#define __LSTRING_DECL_H

#include <utility>
#include <string>
#include <cstring>
#include <type_traits>
#include <ostream>

#include "core-forward-decl.hh"
#include "functiontraits-decl.hh"

namespace mozart {

/////////////
// LString //
/////////////

/**
 * An integer indicating the string pair contains a surrogate character.
 */
enum UnicodeErrorReason : nativeint {
  empty = 0,         // not really an error...
  outOfRange = -1,   // the code point is outside of the valid range 0 -- 0x10ffff
  surrogate = -2,    // the code point refers to a surrogate 0xd800 -- 0xdfff
  invalidUTF8 = -3,  // an invalid UTF-8 sequence is provided.
  invalidUTF16 = -4, // an invalid UTF-16 sequence is provided.
  truncated = -5,    // the data is truncated such that an incomplete code unit exists.
  indexOutOfBounds = -6, // index out-of-bounds.

  invalidUTFNative = invalidUTF8
};

namespace mut { // mut = mutable (which is a keyword in C++.)

// BaseLString -----------------------------------------------------------------

template <class C>
struct BaseLString {  // LString = Length-prefixed string.
  const C* string;
  union {
    nativeint length;
    UnicodeErrorReason error;
  };

  constexpr bool isError() const { return length < 0; }
  constexpr bool isErrorOrEmpty() const { return length <= 0; }

  constexpr size_t bytesCount() const { return length * sizeof(C); }

  const C* begin() const { return string; }
  const C* end() const { return string + length; }

  constexpr C operator[](nativeint i) const { return string[i]; }

  // Initialize with nothing.
  constexpr BaseLString() : string(nullptr), length(0) {}
  constexpr BaseLString(std::nullptr_t) : string(nullptr), length(0) {}

  // Initialize with an error.
  constexpr BaseLString(UnicodeErrorReason error)
      : string(nullptr), error(error) {}

  // Can be moved.
  inline BaseLString(BaseLString&& other);
  // Not copyable by default.
  BaseLString(const BaseLString&) = delete;
  BaseLString& operator=(const BaseLString&) = delete;

  // Initialize from string and length.
  constexpr BaseLString(const C* str, nativeint len)
      : string(str), length(len) {}
  template <nativeint n>
  constexpr BaseLString(const C (&str)[n], nativeint len=n-1)
      : string(str), length(len) {}

  // Initialize from C string.
  inline BaseLString(const C* str);

  // Slice the string. This operation is unsafe, because the resulting string
  // will become invalid when the source string goes out of scope.
  constexpr const BaseLString unsafeSlice(nativeint from) const;
  constexpr const BaseLString unsafeSlice(nativeint from, nativeint to) const;
};

// Equality testing.
template <class C>
inline
bool operator==(const BaseLString<C>& a, const BaseLString<C>& b);
template <class C>
inline
bool operator!=(const BaseLString<C>& a, const BaseLString<C>& b);

template <class C, nativeint n>
inline bool operator==(const C (&str)[n], const BaseLString<C>& b) {
  return BaseLString<C>(str) == b;
}
template <class C, nativeint n>
inline bool operator==(const BaseLString<C>& a, const C (&str)[n]) {
  return a == BaseLString<C>(str);
}

/**
 * Write the string to an output stream.
 */
template <class OutC, class InC>
inline std::basic_ostream<OutC>& operator<<(std::basic_ostream<OutC>& out,
                                            const BaseLString<InC>& input);

// LString ---------------------------------------------------------------------
// "The" LString with persistent/VM storage.
template <class C>
struct LString : BaseLString<C> {
  // Initialize from string literal.
  // (Based on http://stackoverflow.com/a/2041727/224671, obviously not
  //  fool-proof.)
  template <nativeint n>
  constexpr LString(const C (&str)[n], nativeint len=n-1)
      : BaseLString<C>(str, len) {}
  template <nativeint n>
  LString(C (&str)[n], nativeint len=n-1) = delete;

  constexpr LString(UnicodeErrorReason e) : BaseLString<C>(e) {}
  constexpr LString(std::nullptr_t) : BaseLString<C>(nullptr) {}

  // LString is copyable (aliasable).
  constexpr LString(const LString& s) : BaseLString<C>(s.string, s.length) {}

  LString& operator=(const LString& s) {
    this->string = s.string;
    this->length = s.length;
    return *this;
  }

  // Copy-construct with help of VM.
  inline LString(VM vm, const BaseLString<C>& other);

  template <class F>
  inline LString(VM vm, nativeint length, const F& initializer);

  // Only LString can be safely sliced.
  inline constexpr const LString slice(nativeint from, nativeint to) const;
  inline constexpr const LString slice(nativeint from) const;

  template <nativeint n>
  static constexpr const LString<C>
      fromLiteral(const C (&str)[n], nativeint len=n-1) { return {str, len}; }

private:
  constexpr LString(const C* str, nativeint len) : BaseLString<C>(str, len) {}
};

}

// ContainedLString ------------------------------------------------------------
// LString with an STL container backend.

template <class T>
struct ContainedLString : mut::BaseLString<typename T::value_type> {
  typedef typename T::value_type CharType;

  inline ContainedLString(T container);
  inline ContainedLString(ContainedLString&& other);

  template <class It>
  inline ContainedLString(It begin, It end);

  // Insert a string at the beginning of the container.
  inline void insertPrefix(const mut::BaseLString<CharType>& prefix);

  constexpr ContainedLString(UnicodeErrorReason reason)
      : mut::BaseLString<CharType>(reason) {}

private:
  T _container;
};

#if defined(__clang__) || !defined(__GNUC__)

// The default view is immutable.
template <class C> using LString = const mut::LString<C>;
template <class C> using BaseLString = const mut::BaseLString<C>;

#else

// Note: gcc users can only "be careful", because of bug 53026.
// - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53026
using namespace mut;

#endif

// Make BaseLString from local buffer
template <class C>
inline mut::BaseLString<C> makeLString(const C* str);
template <class C>
inline mut::BaseLString<C> makeLString(const C* str, nativeint len);

// Create LString on heap.
template <class C, nativeint n>
inline LString<C> newLString(const C (&str)[n], nativeint len=n-1);
template <class C, nativeint n>
LString<C> newLString(C (&str)[n], nativeint len=n-1) = delete;

template <class C>
inline LString<C> newLString(VM vm, const C* str);
template <class C>
inline LString<C> newLString(VM vm, const C* str, nativeint len);
template <class T>
inline LString<typename T::value_type> newLString(VM vm, const T& container);
template <class C>
inline LString<C> newLString(VM vm, const BaseLString<C>& copyFrom);

template <class F>
inline auto newLStringInit(VM vm, nativeint len, const F& func)
    -> LString<typename std::remove_pointer<
                 typename function_traits<F>::template arg<0>::type>::type>;

// Concatenate two LString's.
template <class C>
inline LString<C> concatLString(VM vm, const LString<C>& a, const LString<C>& b);

}

#endif // __LSTRING_DECL_H


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

using System.Reflection;
using Azure.Test.Perf;

await PerfProgram.Main(Assembly.GetEntryAssembly(), args);


text:
declare const CursorSelectMixin: StateMixin<
  {},
  {},
  {},
  {
    selectedIndex: number;
    selectedItem: Element | null;
  }
>;

export default CursorSelectMixin;


text:
require 'active_record/base'

module ActiveRecord
  module ConnectionAdapters
    class OracleEnhancedAdapter
      class DatabaseTasks
        delegate :connection, :establish_connection, :to => ActiveRecord::Base

        def initialize(config)
          @config = config
        end

        def create
          system_password = ENV.fetch('ORACLE_SYSTEM_PASSWORD') {
            print "Please provide the SYSTEM password for your Oracle installation (set ORACLE_SYSTEM_PASSWORD to avoid this prompt)\n>"
            $stdin.gets.strip
          }
          establish_connection(@config.merge('username' => 'SYSTEM', 'password' => system_password))
          begin
            connection.execute "CREATE USER #{@config['username']} IDENTIFIED BY #{@config['password']}"
          rescue => e
            if e.message =~ /ORA-01920/ # user name conflicts with another user or role name
              connection.execute "ALTER USER #{@config['username']} IDENTIFIED BY #{@config['password']}"
            else
              raise e
            end
          end
          connection.execute "GRANT unlimited tablespace TO #{@config['username']}"
          connection.execute "GRANT create session TO #{@config['username']}"
          connection.execute "GRANT create table TO #{@config['username']}"
          connection.execute "GRANT create view TO #{@config['username']}"
          connection.execute "GRANT create sequence TO #{@config['username']}"
        end

        def drop
          establish_connection(@config)
          connection.execute_structure_dump(connection.full_drop)
        end

        def purge
          drop
          connection.execute('PURGE RECYCLEBIN') rescue nil
        end

        def structure_dump(filename)
          establish_connection(@config)
          File.open(filename, 'w:utf-8') { |f| f << connection.structure_dump }
          if @config['structure_dump'] == 'db_stored_code'
             File.open(filename, 'a') { |f| f << connection.structure_dump_db_stored_code }
          end
        end

        def structure_load(filename)
          establish_connection(@config)
          connection.execute_structure_dump(File.read(filename))
        end
      end
    end
  end
end

ActiveRecord::Tasks::DatabaseTasks.register_task(/(oci|oracle)/, ActiveRecord::ConnectionAdapters::OracleEnhancedAdapter::DatabaseTasks)


text:
template <class T>
class vector {
    T *v;
    int size;
  public:
    int compare(T leftElement, T rightElement);
    void sort(int order);
    void add(T x);
    void print();
};

#include "sort.tpp"


text:
import { __ } from '~/locale';

/**
 * Returns the attributes used for gl-empty-state in the Service Desk issues list.
 */
export function emptyStateHelper(emptyStateMeta) {
  const { isServiceDeskSupported, svgPath, serviceDeskHelpPage } = emptyStateMeta;

  if (isServiceDeskSupported) {
    const title = __(
      'Use Service Desk to connect with your users (e.g. to offer customer support) through email right inside GitLab',
    );
    const commonMessage = __(
      'Those emails automatically become issues (with the comments becoming the email conversation) listed here.',
    );
    const commonDescription = `
      ${commonMessage}
      ${__('Read more')}`;

    if (emptyStateMeta.canEditProjectSettings && emptyStateMeta.isServiceDeskEnabled) {
      return {
        title,
        svgPath,
        description: `
${__('Have your users email')} ${
          emptyStateMeta.serviceDeskAddress
        }
 ${commonDescription}`,
      };
    }

    if (emptyStateMeta.canEditProjectSettings && !emptyStateMeta.isServiceDeskEnabled) {
      return {
        title,
        svgPath,
        description: commonDescription,
        primaryLink: emptyStateMeta.editProjectPage,
        primaryText: __('Turn on Service Desk'),
      };
    }

    return {
      title,
      svgPath,
      description: commonDescription,
    };
  }

  return {
    title: __('Service Desk is enabled but not yet active'),
    svgPath,
    description: __('You must set up incoming email before it becomes active.'),
    primaryLink: emptyStateMeta.incomingEmailHelpPage,
    primaryText: __('More information'),
  };
}


text:
[![Build status](https://ci.appveyor.com/api/projects/status/7basx8plqk4s29yn/branch/master?svg=true)](https://ci.appveyor.com/project/PowerShell/xscsr/branch/master)

# xSCSR

The **xSCSR** module contains DSC resources for deploying System Center Service Reporting (SR):

This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

## Contributing
Please check out common DSC Resources [contributing guidelines](https://github.com/PowerShell/DscResource.Kit/blob/master/CONTRIBUTING.md).

## Resources

* **xSCSRServerSetup** installs the SR server.
* **xSCSRServerUpdate** updates an SR server to Update Rollup 4.

### xSCSRServerSetup

* **Ensure**: (Key) Ensures that SR server is installed on the machine: { Present | Absent }
* **SourcePath**: (Required) UNC path to the root of the source files for installation.
* **SourceFolder**: Folder within the source path containing the source files for installation.
* **SetupCredential**: (Required) Credential to be used to perform the installation.
* **UseMicrosoftUpdate**: { 0 | 1 }
0: Do not opt in to Microsoft Update.
1: Opt in to Microsoft Update.
* **SendCEIPReports**: { 0 | 1 }
0: Do not opt in to the Customer Experience Improvement Program (CEIP).
1: Opt in to CEIP.
* **InstallFolder**: Folder to install to.
* **DatabaseServer**: (Required) Name of the database server.
* **DatabaseServerInstance**: (Required) Name of the SQL Server database instance to install to.
* **RepositoryDatabaseName**: Name of the usage repository database that already exists, or that setup should create.
* **StagingDatabaseName**: Name of the usage staging database that already exists, or that setup should create.
* **DWDatabaseName**: Name of the usage data warehouse database that already exists, or that setup should create.
* **AnalysisDatabaseServer**: (Required) Name of the server that is running SQL Server where the analysis database already exists, or that setup should create.
* **AnalysisDatabaseServerInstance**: (Required) Name of the SQL Server analysis database instance to install to.
* **AnalysisDatabaseName**: Name of the analysis database that already exists, or that setup should create.

### xSCSRServerUpdate

* **Ensure**: (Key) Ensures that SR server update is installed on the machine: { Present | Absent }
* **SourcePath**: (Required) UNC path to the root of the source files for installation.
* **SourceFolder**: Folder within the source path containing the source files for installation.
* **Credential**: (Required) Credential to be used to perform the installation.
* **Update**: Output display name of the update.

## Versions

### Unreleased

* Update appveyor.yml to use the default template.
* Added default template files .codecov.yml, .gitattributes, and .gitignore, and
  .vscode folder.

### 1.3.0.0

* Increased timeout for setup process to start to 60 seconds
* Added /norestart to xSCSRUpdate to allow DSC to control reboots

### 1.2.0.0

* Updated release with the following resource:
    - xSCSRServerUpdate

### 1.1.0.0

* Initial release with the following resource:
    - xSCSRServerSetup

## Examples

### Single Server Installation

SCSR-SingleServer.ps1 installs SR including prerequisites and SQL on a single server.

### Separate SQL

SCSR-SeperateSQL.ps1 installs SR on one server and SQL on a seperate server.

Notes:

The samples require the use of [Windows Management Framework (WMF) 5.0 Preview](http://go.microsoft.com/fwlink/?LinkId=398175).

All three examples use the exact same Configuration and just modify the behavior based on input ConfigurationData.

In the Examples folder you will see a version of each file with "-TP" appended to the name.
These are the equivalent examples for deployment of System Center Technical Preview on Windows Server Technical Preview.


text:
define(
     ({
        map: {
            error: "Nie można utworzyć mapy"
        },
        general: {
            map: "Mapa",
            mapInfo: "Informacje o mapie",
            legend: "Legenda",
            layers: "Warstwy",
            rendererTitle: "Wyświetl informacje dla tego obszaru",
            summarize: "Cały obszar",
            summarizeTitle: "Wyświetl podsumowanie informacji dla wszystkich obszarów",
            share: "Udostępnij",
            about: "Informacje o",
            find: "Kod pocztowy, miasto itd.",
            noSearchResult: "Nie znaleziono wyników",
            impactArea: "Obszar wpływu",
            dateModified: "Data modyfikacji",
            moreInfo: "Dowiedz się więcej",
        },
        configure: {
            mapdlg: {
                items: {
                    organizationLabel: "Moja instytucja",
                    onlineLabel: "Usługa ArcGIS Online",
                    contentLabel: "Moje zasoby",
                    favoritesLabel: "Moje ulubione"
                },
                title: "Wybierz mapę internetową",
                searchTitle: "Wyszukaj",
                ok: "OK",
                cancel: "Anuluj",
                placeholder: "Wprowadź wyszukiwane wyrażenie"
            },
            groupdlg: {
                items: {
                    organizationLabel: "Moja instytucja",
                    onlineLabel: "Usługa ArcGIS Online",
                    contentLabel: "Moje zasoby",
                    favoritesLabel: "Moje ulubione"
                },
                title: "Wybierz grupę",
                searchTitle: "Wyszukaj",
                ok: "OK",
                cancel: "Anuluj",
                placeholder: "Wprowadź wyszukiwane wyrażenie"
            }
        }
    })
);


text:
TOPLEVEL_LANG ?= verilog
PWD=$(shell pwd)
TOPDIR=$(PWD)/..
COCOTB 	:= $(shell $(python) nysa paths -c -s)
NYSA 	:= $(shell $(python) nysa paths -s -v nysa-verilog)
PYTHONPATH := ./model:$(PYTHONPATH)
export PYTHONPATH
export PYTHONHOME=$(shell python -c "from distutils.sysconfig import get_config_var; print(get_config_var('prefix'))")

EXTRA_ARGS+=-I$(TOPDIR)/rtl/ -I$(NYSA)/verilog/axi/ -Wall

VERILOG_SOURCES =  $(NYSA)/verilog/generic/ppfifo.v
VERILOG_SOURCES += $(NYSA)/verilog/generic/axi_lite_slave.v
VERILOG_SOURCES += $(NYSA)/verilog/generic/adapter_ppfifo_2_axi_stream.v
VERILOG_SOURCES += $(NYSA)/verilog/generic/bram.v
VERILOG_SOURCES += $(TOPDIR)/rtl/character_buffer.v
VERILOG_SOURCES += $(TOPDIR)/rtl/console_osd.v

#DUT
VERILOG_SOURCES += $(TOPDIR)/rtl/axi_on_screen_display.v

#Test Benches
VERILOG_SOURCES += $(TOPDIR)/cocotb/tb_cocotb.v

TOPLEVEL = tb_cocotb

GPI_IMPL := vpi

export TOPLEVEL_LANG
MODULE=test_dut

include $(COCOTB)/makefiles/Makefile.inc
include $(COCOTB)/makefiles/Makefile.sim

.PHONY: wave test
wave:
	gtkwave waveforms.gtkw &


text:
#ifndef _PEI_SMBUS_PPI_H_
#define _PEI_SMBUS_PPI_H_

#include <Ppi/Smbus2.h>

#define EFI_PEI_SMBUS_PPI_GUID \
  { \
    0xabd42895, 0x78cf, 0x4872, {0x84, 0x44, 0x1b, 0x5c, 0x18, 0xb, 0xfb, 0xda } \
  }

typedef struct _EFI_PEI_SMBUS_PPI EFI_PEI_SMBUS_PPI;

/**
  Executes an SMBus operation to an SMBus controller.

  @param[in]      PeiServices   A pointer to the system PEI Services Table.
  @param[in]      This          A pointer to the EFI_PEI_SMBUS_PPI instance.
  @param[in]      SlaveAddress  The SMBUS hardware address to which the SMBUS
                                device is preassigned or allocated.
  @param[in]      Command       This command is transmitted by the SMBus host
                                controller to the SMBus slave device, and the
                                interpretation is SMBus slave device specific.
  @param[in]      Operation     Signifies which particular SMBus hardware protocol
                                instance to use to execute the SMBus transactions.
  @param[in]      PecCheck      Defines if Packet Error Code (PEC) checking is
                                required for this operation.
  @param[in, out] Length        The number of bytes for this operation.
  @param[in, out] Buffer        Contains the value of data to execute to the SMBus
                                slave device.

  @retval EFI_SUCCESS           The last data that was returned from the access
                                matched the poll exit criteria.
  @retval EFI_CRC_ERROR         The checksum is not correct (PEC is incorrect).
  @retval EFI_TIMEOUT           Timeout expired before the operation was completed.
                                Timeout is determined by the SMBus host controller device.
  @retval EFI_OUT_OF_RESOURCES  The request could not be completed
                                due to a lack of resources.
  @retval EFI_DEVICE_ERROR      The request was not completed because a failure
                                was recorded in the Host Status Register bit.
  @retval EFI_INVALID_PARAMETER The operation is not defined in EFI_SMBUS_OPERATION.
  @retval EFI_INVALID_PARAMETER Length/Buffer is NULL for operations except for
                                EfiSmbusQuickRead and EfiSmbusQuickWrite. Length
                                is outside the range of valid values.
  @retval EFI_UNSUPPORTED       The SMBus operation or PEC is not supported.
  @retval EFI_BUFFER_TOO_SMALL  Buffer is not sufficient for this operation.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS_PPI_EXECUTE_OPERATION)(
  IN      EFI_PEI_SERVICES          **PeiServices,
  IN      EFI_PEI_SMBUS_PPI         *This,
  IN      EFI_SMBUS_DEVICE_ADDRESS  SlaveAddress,
  IN      EFI_SMBUS_DEVICE_COMMAND  Command,
  IN      EFI_SMBUS_OPERATION       Operation,
  IN      BOOLEAN                   PecCheck,
  IN OUT  UINTN                     *Length,
  IN OUT  VOID                      *Buffer
  );

/**
  This function is user-defined, and is called when the SlaveAddress/Data pair happens.

  @param[in]  PeiServices    A pointer to the system PEI Services Table.
  @param[in]  This           A pointer to the EFI_PEI_SMBUS_PPI instance.
  @param[in]  SlaveAddress   The SMBUS hardware address to which the SMBUS
                             device is preassigned or allocated.
  @param[in]  Data           Data of the SMBus host notify command, which denotes that
                             the caller wants to be called.

  @return Status Code returned by callback function.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS_NOTIFY_FUNCTION)(
  IN      EFI_PEI_SERVICES              **PeiServices,
  IN      EFI_PEI_SMBUS_PPI             *SmbusPpi,
  IN      EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress,
  IN      UINTN                         Data
  );

/**
  The ArpDevice() function enumerates either the entire bus or a specific
  device identified by SmbusUdid.

  @param[in]      PeiServices   A pointer to the system PEI Services Table.
  @param[in]      This          A pointer to the EFI_PEI_SMBUS_PPI instance.
  @param[in]      ArpAll        A Boolean expression that indicates if the host
                                drivers need to enumerate all the devices or to
                                enumerate only the device that is identified
                                by SmbusUdid. If ArpAll is TRUE, SmbusUdid and
                                SlaveAddress are optional and ignored if entered.
                                If ArpAll is FALSE, ArpDevice will enumerate
                                SmbusUdid, and the address will be at SlaveAddress.
  @param[in]      SmbusUdid     The targeted SMBus Unique Device Identifier (UDID).
                                The UDID may not exist for SMBus devices with fixed
                                addresses.
  @param[in, out] SlaveAddress  The new SMBus address for the slave device for
                                which the operation is targeted.
                                This address may be NULL.

  @retval EFI_SUCCESS           The SMBus slave device address was set.
  @retval EFI_INVALID_PARAMETER SlaveAddress is NULL.
  @retval EFI_OUT_OF_RESOURCES  The request could not be completed
                                due to a lack of resources.
  @retval EFI_TIMEOUT           The SMBus slave device did not respond.
  @retval EFI_DEVICE_ERROR      The request was not completed because the transaction failed.
  @retval EFI_UNSUPPORTED       ArpDevice() is not implemented by this PEIM.
                                This return value is not defined in the Framework Specification.
                                This return value was introduced in the PI Specification.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS_PPI_ARP_DEVICE)(
  IN      EFI_PEI_SERVICES          **PeiServices,
  IN      EFI_PEI_SMBUS_PPI         *This,
  IN      BOOLEAN                   ArpAll,
  IN      EFI_SMBUS_UDID            *SmbusUdid, OPTIONAL
  IN OUT  EFI_SMBUS_DEVICE_ADDRESS  *SlaveAddress OPTIONAL
  );

/**
  The GetArpMap() function returns the mapping of all the SMBus devices
  that are enumerated by the SMBus host driver.

  @param[in]      PeiServices    A pointer to the system PEI Services Table.
  @param[in]      This           A pointer to the EFI_PEI_SMBUS_PPI instance.
  @param[in, out] Length         The size of the buffer that contains the SMBus device map.
  @param[in, out] SmbusDeviceMap The pointer to the device map as enumerated
                                 by the SMBus controller driver.

  @retval EFI_SUCCESS       The device map was returned correctly in the buffer.
  @retval EFI_UNSUPPORTED   GetArpMap() are not implemented by this PEIM.
                            This return value was not defined in the Framework Specification.
                            This return value was introduced in the PI Specification.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS_PPI_GET_ARP_MAP)(
  IN      EFI_PEI_SERVICES          **PeiServices,
  IN      EFI_PEI_SMBUS_PPI         *This,
  IN OUT  UINTN                     *Length,
  IN OUT  EFI_SMBUS_DEVICE_MAP      **SmbusDeviceMap
  );

/**
  Allows a device driver to register for a callback when the bus driver detects a state that it needs to
  propagate to other PEIMs that are registered for a callback.

  The Notify() function registers all the callback functions to allow the
  bus driver to call these functions when the SlaveAddress/Data pair occur.
  All functions to be registered with EFI_PEI_SMBUS_PPI_NOTIFY must be of type
  EFI_PEI_SMBUS_NOTIFY_FUNCTION.

  @param[in] PeiServices    A pointer to the system PEI Services Table.
  @param[in] This           A pointer to the EFI_PEI_SMBUS_PPI instance.
  @param[in] SlaveAddress   The address that the host controller detects as
                            sending a message and triggers all the registered functions.
  @param[in] Data           Data that the host controller detects as sending a message
                            and triggers all the registered functions.
  @param[in] NotifyFunction The function to call when the bus driver
                            detects the SlaveAddress and Data pair.

  @retval EFI_SUCCESS       NotifyFunction has been registered.
  @retval EFI_UNSUPPORTED   Notify() are not implemented by this PEIM.
                            This return value is not defined in  the Framework Specification.
                            This return value was introduced in the PI Specification.

**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS_PPI_NOTIFY)(
  IN      EFI_PEI_SERVICES              **PeiServices,
  IN      EFI_PEI_SMBUS_PPI             *This,
  IN      EFI_SMBUS_DEVICE_ADDRESS      SlaveAddress,
  IN      UINTN                         Data,
  IN      EFI_PEI_SMBUS_NOTIFY_FUNCTION NotifyFunction
  );

///
/// Provides the basic I/O interfaces that a PEIM uses to access
/// its SMBus controller and the slave devices attached to it.
///
struct _EFI_PEI_SMBUS_PPI {
  ///
  /// Executes the SMBus operation to an SMBus slave device.
  ///
  EFI_PEI_SMBUS_PPI_EXECUTE_OPERATION Execute;

  ///
  /// Allows an SMBus 2.0 device(s) to be Address Resolution Protocol (ARP)
  ///
  EFI_PEI_SMBUS_PPI_ARP_DEVICE        ArpDevice;

  ///
  /// Allows a PEIM to retrieve the address that was allocated by the SMBus
  /// host controller during enumeration/ARP.
  ///
  EFI_PEI_SMBUS_PPI_GET_ARP_MAP       GetArpMap;

  ///
  /// Allows a driver to register for a callback to the SMBus host
  /// controller driver when the bus issues a notification to the bus controller PEIM.
  ///
  EFI_PEI_SMBUS_PPI_NOTIFY            Notify;
};

extern EFI_GUID gEfiPeiSmbusPpiGuid;

#endif


text:
<!DOCTYPE html>

<meta charset="UTF-8"/>
<link href="default.css" rel="stylesheet" type="text/css" />

(ルーシィ)え~っ! この<ruby>街<rt>まち</rt></ruby>
って
 <ruby>魔法<rt>まほう</rt></ruby><ruby>屋<rt>や</rt></ruby><ruby>1<rt>いち</rt></ruby><ruby>軒<rt>けん</rt></ruby>
しか
ない
の
!?

What?   This is the only magic store in this town?


text:
package org.apache.isis.viewer.wicket.ui.pages.error;

import org.apache.wicket.authroles.authorization.strategies.role.annotations.AuthorizeInstantiation;
import org.apache.isis.viewer.wicket.model.common.PageParametersUtils;
import org.apache.isis.viewer.wicket.ui.errors.ExceptionModel;
import org.apache.isis.viewer.wicket.ui.errors.ExceptionStackTracePanel;
import org.apache.isis.viewer.wicket.ui.pages.PageAbstract;

/**
 * Web page representing the home page (showing a welcome message).
 */
@AuthorizeInstantiation("org.apache.isis.viewer.wicket.roles.USER")
public class ErrorPage extends PageAbstract {

    private static final long serialVersionUID = 1L;

    private static final String ID_EXCEPTION_STACK_TRACE = "exceptionStackTrace";

    public ErrorPage(ExceptionModel exceptionModel) {
        super(PageParametersUtils.newPageParameters(), null);

        addBookmarkedPages(themeDiv);

        themeDiv.add(new ExceptionStackTracePanel(ID_EXCEPTION_STACK_TRACE, exceptionModel));

    }

}


text:
<!DOCTYPE html>

    <title>SceneJS Example</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">

    <link href="css/styles.css" rel="stylesheet"/>

    SceneJS - clouds reflection map

    learn more in this tutorial


text:
export default function addParticipantCountContainer() {
    this.wrap
        .select('.legend')
        .append('span')
        .classed('annote', true)
        .style('float', 'right')
        .style('font-style', 'italic');
}


text:
/**
 * @file ARCONTROLLER_JNI_Dictionary.c
 * @brief libARController JNI dictionary c file.
 **/

/*****************************************
 *
 *             include file :
 *
 *****************************************/

#include <jni.h>
#include <stdlib.h>

#include <uthash/uthash.h>
#include <uthash/utlist.h>

#include <libARSAL/ARSAL_Print.h>

#include <libARController/ARCONTROLLER_Error.h>
#include <libARController/ARCONTROLLER_Dictionary.h>
#include <libARController/ARCONTROLLER_DICTIONARY_Key.h>

/*****************************************
 *
 *             define :
 *
 *****************************************/

#define ARCONTROLLER_JNIDICTIONARY_TAG "JNIDictionary"

/*****************************************
 *
 *             private header:
 *
 *****************************************/

static jmethodID ARCONTROLLER_JNIDICTIONARY_METHOD_NEW_INTEGER;
static jmethodID ARCONTROLLER_JNIDICTIONARY_METHOD_NEW_DOUBLE;

/*****************************************
 *
 *             implementation :
 *
 *****************************************/

JNIEXPORT jstring JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerDictionary_nativeStaticGetSingleKey (JNIEnv *env, jclass class)
{
    return (*env)->NewStringUTF(env, ARCONTROLLER_DICTIONARY_SINGLE_KEY);
}

JNIEXPORT jint JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerDictionary_nativeGetSize (JNIEnv *env, jobject thizz, jlong jniDictionary)
{
    // local declarations
    ARCONTROLLER_DICTIONARY_ELEMENT_t *nativeDictionary = (ARCONTROLLER_DICTIONARY_ELEMENT_t*) (intptr_t) jniDictionary;

    return HASH_COUNT (nativeDictionary);
}

JNIEXPORT jlong JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerDictionary_nativeGetElement (JNIEnv *env, jobject thizz, jlong jniDictionary, jstring key)
{
    // local declarations
    const char *nativeKey = (*env)->GetStringUTFChars(env, key, 0);
    ARCONTROLLER_DICTIONARY_ELEMENT_t *nativeDictionary = (ARCONTROLLER_DICTIONARY_ELEMENT_t*) (intptr_t) jniDictionary;
    ARCONTROLLER_DICTIONARY_ELEMENT_t *element = NULL;

    HASH_FIND_STR (nativeDictionary, nativeKey, element);

    // cleanup
    (*env)->ReleaseStringUTFChars(env, key, nativeKey);

    return (long) element;
}

JNIEXPORT jlong JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerDictionary_nativeGetAllElements (JNIEnv *env, jobject thizz, jlong jniDictionary)
{
    // local declarations
    ARCONTROLLER_DICTIONARY_ELEMENT_t *nativeDictionary = (ARCONTROLLER_DICTIONARY_ELEMENT_t*) (intptr_t) jniDictionary;
    ARCONTROLLER_DICTIONARY_ELEMENT_t *element = NULL;
    ARCONTROLLER_DICTIONARY_ELEMENT_t *elementTmp = NULL;

    int length = HASH_COUNT (nativeDictionary);
    jlongArray jElements = (*env)->NewLongArray(env, length);
    jlong *elementsArr = (*env)->GetLongArrayElements(env, jElements, NULL);

    int i = 0;
    HASH_ITER (hh, nativeDictionary, element, elementTmp)
    {
        // For each element
        elementsArr[i] = (long) element;
        i++;
    }

    // cleanup
    (*env)->ReleaseLongArrayElements(env, jElements, elementsArr, NULL);

    return (long) jElements;
}

JNIEXPORT jlong JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerArgumentDictionary_nativeGetArg (JNIEnv *env, jobject thizz, jlong jniDictionary, jstring key)
{
    // local declarations
    const char *nativeKey = (*env)->GetStringUTFChars(env, key, 0);
    ARCONTROLLER_DICTIONARY_ELEMENT_t *nativeDictionary = (ARCONTROLLER_DICTIONARY_ELEMENT_t*) (intptr_t) jniDictionary;
    ARCONTROLLER_DICTIONARY_ARG_t *arg = NULL;

    if (nativeDictionary != NULL)
    {
        HASH_FIND_STR (nativeDictionary->arguments, nativeKey, arg);
    }

    // cleanup
    (*env)->ReleaseStringUTFChars(env, key, nativeKey);

    return (long) arg;
}

JNIEXPORT jint JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerArgumentDictionary_nativeGetArgType (JNIEnv *env, jobject thizz, jlong jniArg)
{
    // local declarations
    ARCONTROLLER_DICTIONARY_ARG_t *nativeArg = (ARCONTROLLER_DICTIONARY_ARG_t*) (intptr_t) jniArg;

    return nativeArg->valueType;
}

JNIEXPORT jint JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerArgumentDictionary_nativeGetArgValueInt (JNIEnv *env, jobject thizz, jlong jniArg)
{
    // local declarations
    ARCONTROLLER_DICTIONARY_ARG_t *nativeArg = (ARCONTROLLER_DICTIONARY_ARG_t*) (intptr_t) jniArg;
    int value = 0;

    if (nativeArg != NULL)
    {
        switch (nativeArg->valueType)
        {
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U8:
                value = (int) nativeArg->value.U8;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I8:
                value = (int) nativeArg->value.I8;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U16:
                value = (int) nativeArg->value.U16;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I16:
                value = (int) nativeArg->value.I16;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U32:
                value = (int) nativeArg->value.U32;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_ENUM:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I32:
                value = (int) nativeArg->value.I32;
                break;

            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U64:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I64:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_FLOAT:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_DOUBLE:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_STRING:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "Bad valueType:%d to return int", nativeArg->valueType);
                break;

            default:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "ValueType:%d not known", nativeArg->valueType);
                break;
        }
    }

    return value;
}

JNIEXPORT jlong JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerArgumentDictionary_nativeGetArgValueLong (JNIEnv *env, jobject thizz, jlong jniArg)
{
    ARSAL_PRINT(ARSAL_PRINT_INFO, ARCONTROLLER_JNIDICTIONARY_TAG, "nativeGetArgValueLong ...");

    // local declarations
    ARCONTROLLER_DICTIONARY_ARG_t *nativeArg = (ARCONTROLLER_DICTIONARY_ARG_t*) (intptr_t) jniArg;
    long value = 0;

    if (nativeArg != NULL)
    {
        switch (nativeArg->valueType)
        {
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U64:
                value = (long) nativeArg->value.U64;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I64:
                value = (long) nativeArg->value.I64;
                break;

            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U8:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I8:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U16:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I16:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U32:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I32:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_ENUM:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_FLOAT:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_DOUBLE:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_STRING:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "Bad valueType:%d to return long", nativeArg->valueType);
                break;

            default:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "ValueType:%d not known", nativeArg->valueType);
                break;
        }
    }

    return value;
}

JNIEXPORT jdouble JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerArgumentDictionary_nativeGetArgValueDouble (JNIEnv *env, jobject thizz, jlong jniArg)
{
    ARSAL_PRINT(ARSAL_PRINT_INFO, ARCONTROLLER_JNIDICTIONARY_TAG, "nativeGetArgValueDouble ...");

    // local declarations
    ARCONTROLLER_DICTIONARY_ARG_t *nativeArg = (ARCONTROLLER_DICTIONARY_ARG_t*) (intptr_t) jniArg;
    double value = 0.0;

    if (nativeArg != NULL)
    {
        switch (nativeArg->valueType)
        {
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_FLOAT:
                value = (double) nativeArg->value.Float;
                break;
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_DOUBLE:
                value = (double) nativeArg->value.Double;
                break;

            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U8:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I8:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U16:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I16:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U32:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I32:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_ENUM:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U64:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I64:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_STRING:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "Bad valueType:%d to return long", nativeArg->valueType);
                break;

            default:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "ValueType:%d not known", nativeArg->valueType);
                break;
        }
    }

    return value;
}

JNIEXPORT jstring JNICALL
Java_com_parrot_arsdk_arcontroller_ARControllerArgumentDictionary_nativeGetArgValueString (JNIEnv *env, jobject thizz, jlong jniArg)
{
    ARSAL_PRINT(ARSAL_PRINT_INFO, ARCONTROLLER_JNIDICTIONARY_TAG, "nativeGetArgValueString ...");

    // local declarations
    ARCONTROLLER_DICTIONARY_ARG_t *nativeArg = (ARCONTROLLER_DICTIONARY_ARG_t*) (intptr_t) jniArg;
    jstring value = NULL;

    if (nativeArg != NULL)
    {
        switch (nativeArg->valueType)
        {
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_STRING:
                value = (*env)->NewStringUTF(env, nativeArg->value.String);
                break;

            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U8:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I8:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U16:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I16:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U32:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I32:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_ENUM:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_U64:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_I64:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_FLOAT:
            case ARCONTROLLER_DICTIONARY_VALUE_TYPE_DOUBLE:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "Bad valueType:%d to return long", nativeArg->valueType);
                break;

            default:
                ARSAL_PRINT(ARSAL_PRINT_ERROR, ARCONTROLLER_JNIDICTIONARY_TAG, "ValueType:%d not known", nativeArg->valueType);
                break;
        }
    }

    return value;
}

/*****************************************
 *
 *             private implementation:
 *
 *****************************************/


text:
// Copyright (C) 2019 The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package com.google.gerrit.extensions.client;

import java.lang.reflect.InvocationTargetException;
import java.util.EnumSet;

/** Enum that can be expressed as a bitset in query parameters. */
public interface ListOption {
  int getValue();

  static <T extends Enum<T> & ListOption> EnumSet<T> fromBits(Class<T> clazz, int v) {
    EnumSet<T> r = EnumSet.noneOf(clazz);
    T[] values;
    try {
      @SuppressWarnings("unchecked")
      T[] tmp = (T[]) clazz.getMethod("values").invoke(null);
      values = tmp;
    } catch (IllegalAccessException | NoSuchMethodException | InvocationTargetException e) {
      throw new IllegalStateException(e);
    }
    for (T o : values) {
      if ((v & (1 << o.getValue())) != 0) {
        r.add(o);
        v &= ~(1 << o.getValue());
      }
      if (v == 0) {
        return r;
      }
    }
    if (v != 0) {
      throw new IllegalArgumentException(
          "unknown " + clazz.getName() + ": " + Integer.toHexString(v));
    }
    return r;
  }
}


text:
include ../../../Make.inc

TARG=archive/zip
GOFILES=\
	reader.go\
	struct.go\
	writer.go\

include ../../../Make.pkg


text:
require "google/cloud/data_labeling/v1beta1"

##
# Example demonstrating basic usage of
# Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client#resume_evaluation_job
#
def resume_evaluation_job
  # Create a client object. The client can be reused for multiple calls.
  client = Google::Cloud::DataLabeling::V1beta1::DataLabelingService::Client.new

  # Create a request. To set request fields, pass in keyword arguments.
  request = Google::Cloud::DataLabeling::V1beta1::ResumeEvaluationJobRequest.new

  # Call the resume_evaluation_job method.
  result = client.resume_evaluation_job request

  # The returned object is of type Google::Protobuf::Empty.
  p result
end
# [END datalabeling_v1beta1_generated_DataLabelingService_ResumeEvaluationJob_sync]


text:
(function (Handsontable, CopyPaste, SheetClip) {

  function CopyPastePlugin(instance) {
    this.copyPasteInstance = CopyPaste.getInstance();

    this.copyPasteInstance.onCut(onCut);
    this.copyPasteInstance.onPaste(onPaste);
    var plugin = this;

    instance.addHook('beforeKeyDown', onBeforeKeyDown);

    function onCut() {
      if (!instance.isListening()) {
        return;
      }

      instance.selection.empty();
    }

    function onPaste(str) {
      if (!instance.isListening() || !instance.selection.isSelected()) {
        return;
      }

      var input = str.replace(/^[\r\n]*/g, '').replace(/[\r\n]*$/g, '') //remove newline from the start and the end of the input
        , inputArray = SheetClip.parse(input)
        , selected = instance.getSelected()
        , coordsFrom = new WalkontableCellCoords(selected[0], selected[1])
        , coordsTo = new WalkontableCellCoords(selected[2], selected[3])
        , cellRange = new WalkontableCellRange(coordsFrom, coordsFrom, coordsTo)
        , topLeftCorner = cellRange.getTopLeftCorner()
        , bottomRightCorner = cellRange.getBottomRightCorner()
        , areaStart = topLeftCorner
        , areaEnd = new WalkontableCellCoords(
          Math.max(bottomRightCorner.row, inputArray.length - 1 + topLeftCorner.row),
          Math.max(bottomRightCorner.col, inputArray[0].length - 1 + topLeftCorner.col)
        );

      instance.addHookOnce('afterChange', function (changes, source) {
        if (changes && changes.length) {
          this.selectCell(areaStart.row, areaStart.col, areaEnd.row, areaEnd.col);
        }
      });

      instance.populateFromArray(areaStart.row, areaStart.col, inputArray, areaEnd.row, areaEnd.col, 'paste', instance.getSettings().pasteMode);
    };

    function onBeforeKeyDown (event) {
      if (Handsontable.helper.isCtrlKey(event.keyCode) && instance.getSelected()) {
        //when CTRL is pressed, prepare selectable text in textarea
        //http://stackoverflow.com/questions/3902635/how-does-one-capture-a-macs-command-key-via-javascript
        plugin.setCopyableText();
        event.stopImmediatePropagation();
        return;
      }

      var ctrlDown = (event.ctrlKey || event.metaKey) && !event.altKey; //catch CTRL but not right ALT (which in some systems triggers ALT+CTRL)

      if (event.keyCode == Handsontable.helper.keyCode.A && ctrlDown) {
        setTimeout(Handsontable.helper.proxy(plugin.setCopyableText, plugin));
      }

    }

    this.destroy = function () {
      this.copyPasteInstance.removeCallback(onCut);
      this.copyPasteInstance.removeCallback(onPaste);
      this.copyPasteInstance.destroy();
      instance.removeHook('beforeKeyDown', onBeforeKeyDown);
    };

    instance.addHook('afterDestroy', Handsontable.helper.proxy(this.destroy, this));

    this.triggerPaste = Handsontable.helper.proxy(this.copyPasteInstance.triggerPaste, this.copyPasteInstance);
    this.triggerCut = Handsontable.helper.proxy(this.copyPasteInstance.triggerCut, this.copyPasteInstance);

    /**
     * Prepares copyable text in the invisible textarea
     */
    this.setCopyableText = function () {

      var settings = instance.getSettings();
      var copyRowsLimit = settings.copyRowsLimit;
      var copyColsLimit = settings.copyColsLimit;

      var selRange = instance.getSelectedRange();
      var topLeft = selRange.getTopLeftCorner();
      var bottomRight = selRange.getBottomRightCorner();
      var startRow = topLeft.row;
      var startCol = topLeft.col;
      var endRow = bottomRight.row;
      var endCol = bottomRight.col;
      var finalEndRow = Math.min(endRow, startRow + copyRowsLimit - 1);
      var finalEndCol = Math.min(endCol, startCol + copyColsLimit - 1);

      instance.copyPaste.copyPasteInstance.copyable(instance.getCopyableData(startRow, startCol, finalEndRow, finalEndCol));

      if (endRow !== finalEndRow || endCol !== finalEndCol) {
        Handsontable.hooks.run(instance, "afterCopyLimit", endRow - startRow + 1, endCol - startCol + 1, copyRowsLimit, copyColsLimit);
      }
    };

  }

  function init() {
    var instance  = this;
    var pluginEnabled = instance.getSettings().copyPaste !== false;

    if(pluginEnabled && !instance.copyPaste){

      instance.copyPaste = new CopyPastePlugin(instance);

    } else if (!pluginEnabled && instance.copyPaste) {

      instance.copyPaste.destroy();
      delete instance.copyPaste;

    }

  }

  Handsontable.hooks.add('afterInit', init);
  Handsontable.hooks.add('afterUpdateSettings', init);

  Handsontable.hooks.register('afterCopyLimit');
})(Handsontable, CopyPaste, SheetClip);


text:
module Mongoid #:nodoc:
  module Extensions #:nodoc:
    module Array #:nodoc:
      # This module converts arrays into mongoid related objects.
      module Conversions #:nodoc:
        extend ActiveSupport::Concern

        module ClassMethods #:nodoc:
          def raise_or_return(value)
            unless value.nil? || value.is_a?(::Array)
              raise Mongoid::Errors::InvalidType.new(::Array, value)
            end
            value
          end

          alias :get :raise_or_return
          alias :set :raise_or_return
        end
      end
    end
  end
end