text:
/**
 * This module houses all core/framework functionality and is required for
 * all charting components to work
 */
/**
 * Elements: core
 */
export { System, system } from "./.internal/core/System";
export { BaseObject, IBaseObjectEvents, BaseObjectEvents } from "./.internal/core/Base";
export { CalculatedValue, IComponentProperties, IComponentDataFields, IComponentEvents, IComponentAdapters, Component } from "./.internal/core/Component";
export { ContainerLayout, IContainerProperties, IContainerEvents, IContainerAdapters, Container, FontWeight, TextDecoration } from "./.internal/core/Container";
export { IValues, IDataItemEvents, IDataItemAdapters, DataItem } from "./.internal/core/DataItem";
export { ISpriteProperties, ISpriteAnimationOptions, ISpriteAdapters, Sprite } from "./.internal/core/Sprite";
export { SpriteEventDispatcher, SpritePointEvent, SpriteMouseTouchEvent, SpriteShiftEvent, ISpriteEvents } from "./.internal/core/SpriteEvents";
export { SpriteState } from "./.internal/core/SpriteState";
export { registry, Registry, IRegistryEvents, is } from "./.internal/core/Registry";
export { options, Options } from "./.internal/core/Options";
/**
 * Elements: data
 */
export { ICSVOptions, CSVParser } from "./.internal/core/data/CSVParser";
export { IDataLoaderAdapters, DataLoader, dataLoader } from "./.internal/core/data/DataLoader";
export { IDataParserOptions, DataParser } from "./.internal/core/data/DataParser";
export { IDataSourceEvents, IDataSourceAdapters, DataSource } from "./.internal/core/data/DataSource";
export { IJSONOptions, JSONParser } from "./.internal/core/data/JSONParser";
/**
 * Elements: defs
 */
export { Roles, AriaLive } from "./.internal/core/defs/Accessibility";
export { Align } from "./.internal/core/defs/Align";
export { HorizontalCenter } from "./.internal/core/defs/HorizontalCenter";
export { IGeoPoint } from "./.internal/core/defs/IGeoPoint";
export { IMorphable } from "./.internal/core/defs/IMorphable";
export { IPoint, IOrientationPoint } from "./.internal/core/defs/IPoint";
export { IRectangle } from "./.internal/core/defs/IRectangle";
export { IRange } from "./.internal/core/defs/IRange";
export { IStyleProperty } from "./.internal/core/defs/IStyleProperty";
export { ITimeInterval } from "./.internal/core/defs/ITimeInterval";
export { IWavedShape } from "./.internal/core/defs/IWavedShape";
export { Orientation } from "./.internal/core/defs/Orientation";
export { ShapeRendering } from "./.internal/core/defs/ShapeRendering";
export { SVGDefaults } from "./.internal/core/defs/SVGDefaults";
export { TextAlign } from "./.internal/core/defs/TextAlign";
export { TextValign } from "./.internal/core/defs/TextValign";
export { TimeUnit } from "./.internal/core/defs/TimeUnit";
export { VerticalAlign } from "./.internal/core/defs/VerticalAlign";
export { VerticalCenter } from "./.internal/core/defs/VerticalCenter";
/**
 * Elements: elements
 */
export { IButtonProperties, IButtonEvents, IButtonAdapters, Button } from "./.internal/core/elements/Button";
export { ICircleProperties, ICircleEvents, ICircleAdapters, Circle } from "./.internal/core/elements/Circle";
export { IEllipseProperties, IEllipseEvents, IEllipseAdapters, Ellipse } from "./.internal/core/elements/Ellipse";
export { IImageProperties, IImageEvents, IImageAdapters, Image } from "./.internal/core/elements/Image";
export { ITextLineInfo, ILabelProperties, ILabelEvents, ILabelAdapters, Label } from "./.internal/core/elements/Label";
export { ILineProperties, ILineEvents, ILineAdapters, Line } from "./.internal/core/elements/Line";
export { IPopupAdapters, Popup } from "./.internal/core/elements/Popup";
export { IModalAdapters, Modal } from "./.internal/core/elements/Modal";
export { IPointedRectangleProperties, IPointedRectangleEvents, IPointedRectangleAdapters, PointedRectangle } from "./.internal/core/elements/PointedRectangle";
export { IPointedShapeProperties, IPointedShapeEvents, IPointedShapeAdapters, PointedShape } from "./.internal/core/elements/PointedShape";
export { IPolyarcProperties, IPolyarcEvents, IPolyarcAdapters, Polyarc } from "./.internal/core/elements/Polyarc";
export { IPolygonProperties, IPolygonEvents, IPolygonAdapters, Polygon } from "./.internal/core/elements/Polygon";
export { IPolylineProperties, IPolylineEvents, IPolylineAdapters, Polyline } from "./.internal/core/elements/Polyline";
export { IPolysplineProperties, IPolysplineEvents, IPolysplineAdapters, Polyspline } from "./.internal/core/elements/Polyspline";
export { IPreloaderProperties, IPreloaderEvents, IPreloaderAdapters, Preloader } from "./.internal/core/elements/Preloader";
export { IRectangleProperties, IRectangleEvents, IRectangleAdapters, Rectangle } from "./.internal/core/elements/Rectangle";
export { IResizeButtonProperties, IResizeButtonEvents, IResizeButtonAdapters, ResizeButton } from "./.internal/core/elements/ResizeButton";
export { IRoundedRectangleProperties, IRoundedRectangleEvents, IRoundedRectangleAdapters, RoundedRectangle } from "./.internal/core/elements/RoundedRectangle";
export { IScrollbarProperties, IScrollbarEvents, IScrollbarAdapters, Scrollbar } from "./.internal/core/elements/Scrollbar";
export { ISliderProperties, ISliderEvents, ISliderAdapters, Slider } from "./.internal/core/elements/Slider";
export { ISliceProperties, ISliceEvents, ISliceAdapters, Slice } from "./.internal/core/elements/Slice";
export { ITextLinkProperties, ITextLinkEvents, ITextLinkAdapters, TextLink } from "./.internal/core/elements/TextLink";
export { PointerOrientation, ITooltipProperties, ITooltipEvents, ITooltipAdapters, Tooltip } from "./.internal/core/elements/Tooltip";
export { ITrapezoidProperties, ITrapezoidEvents, ITrapezoidAdapters, Trapezoid } from "./.internal/core/elements/Trapezoid";
export { ITriangleProperties, ITriangleEvents, ITriangleAdapters, Triangle } from "./.internal/core/elements/Triangle";
export { IWavedCircleProperties, IWavedCircleEvents, IWavedCircleAdapters, WavedCircle } from "./.internal/core/elements/WavedCircle";
export { IWavedLineProperties, IWavedLineEvents, IWavedLineAdapters, WavedLine } from "./.internal/core/elements/WavedLine";
export { IWavedRectangleProperties, IWavedRectangleEvents, IWavedRectangleAdapters, WavedRectangle } from "./.internal/core/elements/WavedRectangle";
export { IZoomOutButtonProperties, IZoomOutButtonEvents, IZoomOutButtonAdapters, ZoomOutButton } from "./.internal/core/elements/ZoomOutButton";
export { IPlayButtonProperties, IPlayButtonEvents, IPlayButtonAdapters, PlayButton } from "./.internal/core/elements/PlayButton";
/**
 * Elements: 3d
 */
export { IConeProperties, IConeEvents, IConeAdapters, Cone } from "./.internal/core/elements/3d/Cone";
export { Rectangle3DProperties, Rectangle3DEvents, Rectangle3DAdapters, Rectangle3D } from "./.internal/core/elements/3d/Rectangle3D";
export { ISlice3DProperties, ISlice3DEvents, ISlice3DAdapters, Slice3D } from "./.internal/core/elements/3d/Slice3D";
/**
 * Elements: export
 */
export { ExportOperation, imageFormats, IExportImageOptions, IExportSVGOptions, pageSizes, IExportPDFOptions, IExportCSVOptions, IExportJSONOptions, IExportExcelOptions, IExportPrintOptions, IExportRemovedObject, IExportOptions, ExportOptions, IExportEvents, Keys, IExportAdapters, Export } from "./.internal/core/export/Export";
export { IExportMenuItem, IExportMenuEvents, IExportMenuAdapters, ExportMenu } from "./.internal/core/export/ExportMenu";
/**
 * Elements: formatters
 */
export { DateFormatInfo, DateFormatter } from "./.internal/core/formatters/DateFormatter";
export { DurationFormatter } from "./.internal/core/formatters/DurationFormatter";
export { NumberFormatter } from "./.internal/core/formatters/NumberFormatter";
export { ITextChunk, ITextFormatterAdapters, TextFormatter, getTextFormatter } from "./.internal/core/formatters/TextFormatter";
/**
 * Elements: interaction
 */
export { InertiaTypes, Inertia } from "./.internal/core/interaction/Inertia";
export { IInteractionEvents, Interaction, getInteraction } from "./.internal/core/interaction/Interaction";
export { InteractionKeyboardObject } from "./.internal/core/interaction/InteractionKeyboardObject";
export { InteractionObject } from "./.internal/core/interaction/InteractionObject";
export { PointEvent, PointerEvent, ShiftEvent, AngleEvent, ScaleEvent, CenterEvent, MouseTouchEvent, SimulatedKeyboardEvent, IInteractionObjectEvents, InteractionObjectEventDispatcher } from "./.internal/core/interaction/InteractionObjectEvents";
export { IInertiaOptions, IHitOptions, ISwipeOptions, ICursorOptions, IKeyboardOptions } from "./.internal/core/interaction/InteractionOptions";
export { MouseCursorStyle } from "./.internal/core/interaction/Mouse";
export { IPointer, IBreadcrumb } from "./.internal/core/interaction/Pointer";
/**
 * Elements: rendering
 */
export { SVGAttribute, ISVGAttribute, AMElement } from "./.internal/core/rendering/AMElement";
export { Group } from "./.internal/core/rendering/Group";
export { SVGElementNames, Paper } from "./.internal/core/rendering/Paper";
export { ISmoothing, Tension, Basis } from "./.internal/core/rendering/Smoothing";
export { SVGContainer } from "./.internal/core/rendering/SVGContainer";
/**
 * Elements: fills
 */
export { ColorModifier } from "./.internal/core/rendering/fills/ColorModifier";
export { IGradientStop, LinearGradient } from "./.internal/core/rendering/fills/LinearGradient";
export { LinearGradientModifier } from "./.internal/core/rendering/fills/LinearGradientModifier";
export { RadialGradientModifier } from "./.internal/core/rendering/fills/RadialGradientModifier";
export { LinePattern } from "./.internal/core/rendering/fills/LinePattern";
export { CirclePattern } from "./.internal/core/rendering/fills/CirclePattern";
export { PatternUnits, PatternProperties, Pattern } from "./.internal/core/rendering/fills/Pattern";
export { RadialGradient } from "./.internal/core/rendering/fills/RadialGradient";
export { RectPatternProperties, RectPattern } from "./.internal/core/rendering/fills/RectPattern";
/**
 * Elements: filters
 */
export { ColorizeFilterProperties, ColorizeFilter } from "./.internal/core/rendering/filters/ColorizeFilter";
export { DesaturateFilterProperties, DesaturateFilter } from "./.internal/core/rendering/filters/DesaturateFilter";
export { DropShadowFilterProperties, DropShadowFilter } from "./.internal/core/rendering/filters/DropShadowFilter";
export { BlurFilterProperties, BlurFilter } from "./.internal/core/rendering/filters/BlurFilter";
export { FilterProperties, Filter } from "./.internal/core/rendering/filters/Filter";
export { FocusFilterProperties, FocusFilter } from "./.internal/core/rendering/filters/FocusFilter";
export { LightenFilterProperties, LightenFilter } from "./.internal/core/rendering/filters/LightenFilter";
/**
 * Elements: utils
 */
export { GlobalAdapter, globalAdapter, Adapter } from "./.internal/core/utils/Adapter";
export { IAnimationObject, IAnimatable, IAnimationOptions, IPercentAnimationOptions, IColorAnimationOptions, IAnimationEvents, Animation, animate } from "./.internal/core/utils/Animation";
export { SortResult } from "./.internal/core/utils/Array";
export { Listener, nextFrame, readFrame, writeFrame, whenIdle, triggerIdle } from "./.internal/core/utils/AsyncPending";
export { Cache, cache } from "./.internal/core/utils/Cache";
export { IClone } from "./.internal/core/utils/Clone";
export { Color, iRGB, iHSL, iHSV, color, isColor, castColor } from "./.internal/core/utils/Color";
export { IColorSetStepOptions, ColorSet } from "./.internal/core/utils/ColorSet";
export { PatternSet } from "./.internal/core/utils/PatternSet";
export { IColorPurpose, InterfaceColorSet } from "./.internal/core/utils/InterfaceColorSet";
export { Constructor } from "./.internal/core/utils/Constructor";
export { IDictionaryEvents, DictionaryLike, DictionaryDisposer, Dictionary, DictionaryTemplate } from "./.internal/core/utils/Dictionary";
export { IDisposer, Disposer, MultiDisposer, MutableValueDisposer, CounterDisposer } from "./.internal/core/utils/Disposer";
export { StyleRule, StyleClass, getElement, addClass, removeClass, blur, focus, outerHTML, isElement, copyAttributes, fixPixelPerfect, ready } from "./.internal/core/utils/DOM";
export { AMEvent, EventListener, EventDispatcher, TargetedEventDispatcher } from "./.internal/core/utils/EventDispatcher";
export { Iterator, Iterable, ListIterator, min, max, join } from "./.internal/core/utils/Iterator";
export { KeyboardKeys, Keyboard, keyboard } from "./.internal/core/utils/Keyboard";
export { ILanguageEvents, ILanguageAdapters, Language } from "./.internal/core/utils/Language";
export { IndexedIterable, IListEvents, ListGrouper, ListLike, ListDisposer, List, ListTemplate } from "./.internal/core/utils/List";
export { Morpher } from "./.internal/core/utils/Morpher";
export { INetLoadResult } from "./.internal/core/utils/Net";
export { Ordering, reverse, or } from "./.internal/core/utils/Order";
export { Percent, percent, isPercent } from "./.internal/core/utils/Percent";
export { Plugin, IPlugin } from "./.internal/core/utils/Plugin";
export { IResponsiveRule, IResponsiveEvents, IResponsiveAdapters, Responsive, ResponsiveBreakpoints, defaultRules } from "./.internal/core/utils/Responsive";
export { ISortedListEvents, OrderedList, SortedList, OrderedListTemplate, SortedListTemplate } from "./.internal/core/utils/SortedList";
export { PX, STRING, NUMBER, DATE, DURATION, PLACEHOLDER, PLACEHOLDER2 } from "./.internal/core/utils/Strings";
export { Public, Optional, isNaN, checkString, checkBoolean, checkNumber, checkObject, castString, castNumber, isString, isNumber, isObject, isArray } from "./.internal/core/utils/Type";
export { Validatable } from "./.internal/core/utils/Validatable";
/**
 * Functions: rendering
 */
import * as path from "./.internal/core/rendering/Path";
export { path };
/**
 * Functions: utils
 */
import * as colors from "./.internal/core/utils/Colors";
export { colors };
import * as ease from "./.internal/core/utils/Ease";
export { ease };
import * as math from "./.internal/core/utils/Math";
export { math };
import * as array from "./.internal/core/utils/Array";
export { array };
import * as number from "./.internal/core/utils/Number";
export { number };
import * as object from "./.internal/core/utils/Object";
export { object };
import * as string from "./.internal/core/utils/String";
export { string };
import * as time from "./.internal/core/utils/Time";
export { time };
import * as utils from "./.internal/core/utils/Utils";
export { utils };
import * as iter from "./.internal/core/utils/Iterator";
export { iter };
import * as type from "./.internal/core/utils/Type";
export { type };
export { ITheme } from "./.internal/themes/ITheme";
export { create, createFromConfig, disposeAllCharts } from "./.internal/core/utils/Instance";
export { useTheme, unuseTheme, unuseAllThemes, addLicense } from "./.internal/core/utils/Instance";


text:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<title></title>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta name="generator" content="Doxygen 1.8.5">
<link rel="stylesheet" type="text/css" href="search.css"/>

Caricamento in corso...

Ricerca in corso...

Nessun risultato

redpajama_set_name: RedPajamaGithub


text:
package me.chanjar.weixin.mp.builder.outxml;

import org.apache.commons.lang3.StringUtils;

import me.chanjar.weixin.mp.bean.message.WxMpXmlOutTransferKefuMessage;

/**
 * 客服消息builder
 * <pre>
 * 用法: WxMpXmlOutTransferKefuMessage m = WxMpXmlOutMessage.TRANSFER_CUSTOMER_SERVICE().kfAccount("").toUser("").build();
 * </pre>
 *
 * @author chanjarster
 */
public final class TransferCustomerServiceBuilder
  extends BaseBuilder<TransferCustomerServiceBuilder, WxMpXmlOutTransferKefuMessage> {
  private String kfAccount;

  public TransferCustomerServiceBuilder kfAccount(String kf) {
    this.kfAccount = kf;
    return this;
  }

  @Override
  public WxMpXmlOutTransferKefuMessage build() {
    WxMpXmlOutTransferKefuMessage m = new WxMpXmlOutTransferKefuMessage();
    setCommon(m);
    if (StringUtils.isNotBlank(this.kfAccount)) {
      WxMpXmlOutTransferKefuMessage.TransInfo transInfo = new WxMpXmlOutTransferKefuMessage.TransInfo();
      transInfo.setKfAccount(this.kfAccount);
      m.setTransInfo(transInfo);
    }

    return m;
  }
}


text:
namespace WampSharp.V2.Core.Contracts
{
    /// <summary>
    /// Contains all WAMPv2 client messages.
    /// </summary>
    /// <typeparam name="TMessage"></typeparam>
    public interface IWampClient<TMessage> : IWampSessionClient<TMessage>,
        IWampError<TMessage>,
        IWampCallee<TMessage>,
        IWampCaller<TMessage>,
        IWampPublisher<TMessage>,
        IWampSubscriber<TMessage>
    {
    }
}


text:
Blender work where you are experiencing an issue

## Issue(s)
1. Your issue here
1. Additional related issues here

## Expected Behaviour
1. Expected behaviour
1. Additional expected behaviour here

## System Configuration
**Operating System:** Insert you operating system here. E.G. Linux / MacOS / Windows
**Blender version:** Place your Blender version here


text:
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_TENSOR_CTYPES_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_TENSOR_CTYPES_H_

#include "tensorflow/lite/c/c_api_internal.h"
#include "tensorflow/lite/kernels/internal/types.h"

namespace tflite {

template <typename T>
inline T* GetTensorData(TfLiteTensor* tensor) {
  return tensor != nullptr ? reinterpret_cast<T*>(tensor->data.raw) : nullptr;
}

template <typename T>
inline const T* GetTensorData(const TfLiteTensor* tensor) {
  return tensor != nullptr ? reinterpret_cast<const T*>(tensor->data.raw)
                           : nullptr;
}

inline RuntimeShape GetTensorShape(const TfLiteTensor* tensor) {
  if (tensor == nullptr) {
    return RuntimeShape();
  }

  TfLiteIntArray* dims = tensor->dims;
  const int dims_size = dims->size;
  const int32_t* dims_data = reinterpret_cast<const int32_t*>(dims->data);
  return RuntimeShape(dims_size, dims_data);
}

}  // namespace tflite

#endif  // TENSORFLOW_LITE_KERNELS_INTERNAL_TENSOR_CTYPES_H_


text:
/*
* Join is a named function that will replace /topic commands
* @param {Object} message - The message object
*/

function Topic(command, params, item) {
	if (command === 'topic') {
		if (CaoLiao.authz.hasPermission(Meteor.userId(), 'edit-room', item.rid)) {
			Meteor.call('saveRoomSettings', item.rid, 'roomTopic', params, (err) => {
				if (err) {
					return handleError(err);
				}
			});
		}
	}
}

// CaoLiao.slashCommands.add('topic', Topic, {
// 	description: TAPi18n.__('Slash_Topic_Description'),
// 	params: TAPi18n.__('Slash_Topic_Params')
// });


text:
all: helloWorld

helloWorld:
	g++ -o helloWorld helloWorld.cpp

clean:
	rm helloWorld

run: helloWorld
	./helloWorld


text:
<!doctype html>

<meta name="viewport" content="width=device-width; initial-scale=1; maximum-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">

<link href="/themes/appcache/css/style.v1.css" rel="stylesheet">

<title>AppCache demo - About</title>

Offline webapp met HTML5 Application Cache

> Home

> Products

> About

About

Based in Portland Oregon

			Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod
			tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
			quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo
			consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse
			cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non
			proident, sunt in culpa qui officia deserunt mollit anim id est laborum.

Andere bronnen

Dive into HTML5 - offline

Jake Archibald, AppCache is a douchebag

MSDN - Offline resources in Firefox

HTML5 Rocks! - Appcache Beginner

Sitepoint - Offline browsering with appcache

Als test project gemaakt door Dennis Burger, 2012

Online
Offline


text:
namespace SurgSim
{

namespace Math
{
SURGSIM_REGISTER(SurgSim::Math::Shape, SurgSim::Math::OctreeShape, OctreeShape);

OctreeShape::OctreeShape() :
	m_rootNode(std::make_shared<NodeType>())
{
	SURGSIM_ADD_SERIALIZABLE_PROPERTY(
		SurgSim::Math::OctreeShape,
		std::shared_ptr<SurgSim::Framework::Asset>,
		Octree,
		getOctree,
		setOctree);

	SURGSIM_ADD_SETTER(OctreeShape, std::string, OctreeFileName, loadOctree);
}

OctreeShape::~OctreeShape()
{
}

int OctreeShape::getType() const
{
	return SHAPE_TYPE_OCTREE;
}

void OctreeShape::loadOctree(const std::string& filePath)
{
	auto rootNode = std::make_shared<NodeType>();
	rootNode->load(filePath);

	SURGSIM_ASSERT(isValid(rootNode))
			<< "Loading failed " << filePath << " contains an invalid octree.";

	setOctree(rootNode);
}

double OctreeShape::getVolume() const
{
	SURGSIM_FAILURE() << "OctreeShape::getVolume not implemented";
	return 0.0;
}

Vector3d OctreeShape::getCenter() const
{
	return Vector3d::Zero();
}

Matrix33d OctreeShape::getSecondMomentOfVolume() const
{
	SURGSIM_FAILURE() << "OctreeShape::getSecondMomentOfVolume not implemented";
	return Matrix33d::Zero();
}

std::shared_ptr<OctreeShape::NodeType> OctreeShape::getOctree()
{
	return m_rootNode;
}

void OctreeShape::setOctree(std::shared_ptr<SurgSim::Framework::Asset> node)
{
	SURGSIM_ASSERT(node != nullptr) << "Tried to set the shape with a nullptr";
	auto octreeNode = std::dynamic_pointer_cast<NodeType>(node);
	SURGSIM_ASSERT(octreeNode != nullptr)
			<< "OctreeShape needs OctreeNode<SurgSim::DataStructures::EmptyData> but received " << node->getClassName();
	SURGSIM_ASSERT(isValid(octreeNode))
			<< "OctreeShape was passed an invalid Octree.";
	m_rootNode = octreeNode;
}

bool OctreeShape::isValid(std::shared_ptr<NodeType> node) const
{
	return (nullptr != node) && (node->getBoundingBox().sizes().minCoeff() >= 0);
}

bool OctreeShape::isValid() const
{
	return isValid(m_rootNode);
}

const Math::Aabbd& OctreeShape::getBoundingBox() const
{
	if (m_rootNode != nullptr)
	{
		return m_rootNode->getBoundingBox();
	}
	else
	{
		return m_aabb;
	}
}

}; // namespace Math
}; // namespace SurgSim


text:
class CreateSshKeys < ActiveRecord::Migration
  def change
    create_table :ssh_keys do |t|
      t.string :name
      t.text :key
      t.belongs_to :server

      t.timestamps
    end
  end
end


text:
<?php

namespace MyApp\ApBundle\Form;

use Symfony\Component\Form\AbstractType;
use Symfony\Component\Form\FormBuilderInterface;

class ContratForm extends AbstractType
{
    public $clientId;

    public function __construct($id) {
        $this->clientId = $id;
    }
    public function buildForm(FormBuilderInterface $builder, array $options)
    {
        $clientId = $this->clientId;
        $builder->add('clientService', 'entity', array(
            'class' => 'MyApp\ApBundle\Entity\ClientService',
            'query_builder' => function ($repository) use ($clientId) { return $repository->createQueryBuilder('p','u')
                                                                            ->select('p','u')
                                                                            ->leftJoin('p.service', 'u')
                                                                            ->where('p.client = :id')
                                                                            ->setParameter('id', $clientId); },
            'property' => 'ServiceCreated',
            'expanded' => true,
            'multiple' => true,
            'required' => true,
            'label' => 'Services: '));

            $builder->add('numero','text', array('label' =>'contrat n: '))
                    ->add('date','date', array(
                        'widget' => 'single_text',
                        'format' => 'dd MMM yyyy',
                        'required' => false,
                        'label' => 'Date de rappel: '))
                    ->add('contratEstimation', 'choice', array(
                        'choices' => array('Estimation'=>'Estimation','Contrat'=>'Contrat'),
                        'label' => 'Statut: ',
                        ));
    }

    public function getName()
    {
        return 'contrat';
    }
}


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

<title>org.apache.jmeter.gui.util Class Hierarchy (Apache JMeter API)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Apache JMeter

Prev

Next

Frames

No Frames

All Classes

Hierarchy For Package org.apache.jmeter.gui.util

Package Hierarchies:

All Packages

Class Hierarchy

java.lang.Object

javax.swing.AbstractCellEditor (implements javax.swing.CellEditor, java.io.Serializable)

org.apache.jmeter.gui.util.TextAreaTableCellEditor (implements javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor)

javax.swing.table.AbstractTableModel (implements java.io.Serializable, javax.swing.table.TableModel)

javax.swing.table.DefaultTableModel (implements java.io.Serializable)

org.apache.jmeter.gui.util.PowerTableModel

java.awt.Color (implements java.awt.Paint, java.io.Serializable)

org.apache.jmeter.gui.util.JMeterColor

java.awt.Component (implements java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable)

java.awt.Container

javax.swing.JComponent (implements java.io.Serializable)

javax.swing.AbstractButton (implements java.awt.ItemSelectable, javax.swing.SwingConstants)

javax.swing.JToggleButton (implements javax.accessibility.Accessible)

javax.swing.JCheckBox (implements javax.accessibility.Accessible)

org.apache.jmeter.gui.util.TristateCheckBox

javax.swing.JLabel (implements javax.accessibility.Accessible, javax.swing.SwingConstants)

javax.swing.table.DefaultTableCellRenderer (implements java.io.Serializable, javax.swing.table.TableCellRenderer)

org.apache.jmeter.gui.util.HeaderAsPropertyRenderer

javax.swing.JMenuBar (implements javax.accessibility.Accessible, javax.swing.MenuElement)

org.apache.jmeter.gui.util.JMeterMenuBar (implements org.apache.jmeter.util.LocaleChangeListener)

javax.swing.JPanel (implements javax.accessibility.Accessible)

org.apache.jmeter.gui.util.ButtonPanel

org.apache.jmeter.gui.util.FileListPanel (implements java.awt.event.ActionListener)

org.apache.jmeter.gui.util.HorizontalPanel

org.apache.jmeter.gui.util.FilePanelEntry (implements java.awt.event.ActionListener)

org.apache.jmeter.gui.util.FilePanel

org.apache.jmeter.gui.util.JLabeledRadioI18N (implements java.awt.event.ActionListener, org.apache.jorphan.gui.JLabeledField)

org.apache.jmeter.gui.util.VerticalPanel

javax.swing.JScrollPane (implements javax.accessibility.Accessible, javax.swing.ScrollPaneConstants)

org.fife.ui.rtextarea.RTextScrollPane

org.apache.jmeter.gui.util.JTextScrollPane

javax.swing.text.JTextComponent (implements javax.accessibility.Accessible, javax.swing.Scrollable)

javax.swing.JTextArea

org.fife.ui.rtextarea.RTextAreaBase

org.fife.ui.rtextarea.RTextArea (implements java.awt.print.Printable)

org.fife.ui.rsyntaxtextarea.RSyntaxTextArea (implements org.fife.ui.rsyntaxtextarea.SyntaxConstants)

org.apache.jmeter.gui.util.JSyntaxTextArea

javax.swing.JTextField (implements javax.swing.SwingConstants)

org.apache.jmeter.gui.util.JDateField

javax.swing.JToolBar (implements javax.accessibility.Accessible, javax.swing.SwingConstants)

org.apache.jmeter.gui.util.JMeterToolBar (implements org.apache.jmeter.util.LocaleChangeListener)

java.awt.Window (implements javax.accessibility.Accessible)

java.awt.Dialog

javax.swing.JDialog (implements javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants)

org.apache.jmeter.gui.util.EscapeDialog

org.apache.jmeter.gui.util.FileDialoger

java.awt.event.FocusAdapter (implements java.awt.event.FocusListener)

org.apache.jmeter.gui.util.NumberFieldErrorListener

org.apache.jmeter.gui.util.FocusRequester

org.apache.jmeter.gui.util.IconToolbarBean

org.apache.jmeter.gui.util.MenuFactory

org.apache.jmeter.gui.util.MenuInfo

java.awt.event.MouseAdapter (implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.MouseWheelListener)

org.apache.jmeter.gui.util.TextBoxDialoger.TextBoxDoubleClick

org.apache.jmeter.gui.util.TextBoxDialoger.TextBoxDoubleClickPressed

org.apache.jmeter.gui.util.TextAreaCellRenderer (implements javax.swing.table.TableCellRenderer)

org.apache.jmeter.gui.util.TextAreaTableCellEditor.EditorDelegate (implements java.awt.event.FocusListener, java.io.Serializable)

org.apache.jmeter.gui.util.TextBoxDialoger (implements java.awt.event.ActionListener)

Enum Hierarchy

java.lang.Object

java.lang.Enum<E> (implements java.lang.Comparable<T>, java.io.Serializable)

org.apache.jmeter.gui.util.TristateState

Skip navigation links

Overview

Package

Class

Tree

Deprecated

Index

Help

Apache JMeter

Prev

Next

Frames

No Frames

All Classes

Copyright © 1998-2015 Apache Software Foundation. All Rights Reserved.


text: require 'libis/format'


text:
using JetBrains.Annotations;
using JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.DeferredCaches.AnimationEventsUsages;
using JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.DeferredCaches.AssetHierarchy.References;
using JetBrains.ReSharper.Psi;

namespace JetBrains.ReSharper.Plugins.Unity.Yaml.Psi.Search
{
    public class UnityAnimationEventFindResults : UnityAssetFindResult
    {
        public UnityAnimationEventFindResults([NotNull] IPsiSourceFile sourceFile,
                                              [NotNull] IDeclaredElement declaredElement,
                                              [NotNull] AnimationUsage usage,
                                              LocalReference owningElementLocation)
            : base(sourceFile, declaredElement, owningElementLocation)
        {
            Usage = usage;
        }

        [NotNull]
        public AnimationUsage Usage { get; }

        public override bool Equals(object obj)
        {
            if (ReferenceEquals(null, obj)) return false;
            if (ReferenceEquals(this, obj)) return true;
            return obj.GetType() == GetType() && Equals((UnityAnimationEventFindResults) obj);
        }

        private bool Equals([NotNull] UnityAnimationEventFindResults other)
        {
            return base.Equals(other) && Usage.Equals(other.Usage);
        }

        public override int GetHashCode()
        {
            unchecked
            {
                return (base.GetHashCode() * 397) ^ Usage.GetHashCode();
            }
        }
    }
}


text:
package es.tid.pce.pcep.objects.tlvs;

import java.net.Inet4Address;
import java.net.UnknownHostException;

import es.tid.pce.pcep.objects.ObjectParameters;

/**
 * UNNUMBERED-ENDPOINT TLV (as per draft-ietf-pce-gmpls-pcep-extensions-09 ).
 *

   This TLV represent an unnumbered interface.  This TLV has the same
   semantic as in [RFC3477] The TLV value is encoded as follow (TLV-
   Type=TBA)

      0                   1                   2                   3
      0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                          LSR's Router ID                      |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
     |                       Interface ID (32 bits)                  |
     +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

   This TLV MAY be ignored, in which case a PCRep with NO-PATH should be
   responded, as described in Section 2.5.1.

 * @author Oscar Gonzalez de Dios
 *
 */
public class UnnumberedEndpointTLV extends PCEPTLV {

	public Inet4Address IPv4address;

	private long ifID;

	public UnnumberedEndpointTLV(){
		this.setTLVType(ObjectParameters.PCEP_TLV_TYPE_UNNUMBERED_ENDPOINT);
	}

	public UnnumberedEndpointTLV(byte[] bytes, int offset){
		super(bytes,offset);
		decode();
	}

	/**
	 * Encode
	 */
	public void encode() {
		this.setTLVValueLength(8);
		this.tlv_bytes=new byte[this.getTotalTLVLength()];
		this.encodeHeader();
		System.arraycopy(IPv4address.getAddress(),0, this.tlv_bytes, 4, 4);
		this.getTlv_bytes()[8]=(byte)(this.ifID >>> 24);
		this.getTlv_bytes()[9]=(byte)(this.ifID >>> 16 & 0xff);
		this.getTlv_bytes()[10]=(byte)(this.ifID >>> 8 & 0xff);
		this.getTlv_bytes()[11]=(byte)(this.ifID & 0xff);
	}

	public void decode(){
		byte[] ip=new byte[4];
		System.arraycopy(this.tlv_bytes,4, ip, 0, 4);
		try {
			IPv4address=(Inet4Address)Inet4Address.getByAddress(ip);
		} catch (UnknownHostException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		int offset=8;
		ifID = 0;
		for (int k = 0; k < 4; k++) {
			ifID = (ifID << 8) | (this.getTlv_bytes()[k+offset] & 0xff);
		}
	}

	public Inet4Address getIPv4address() {
		return IPv4address;
	}

	public void setIPv4address(Inet4Address iPv4address) {
		IPv4address = iPv4address;
	}

	public long getIfID() {
		return ifID;
	}
	public void setIfID(long ifID) {
		this.ifID = ifID;
	}

	public String toString(){
		if (IPv4address!=null){
			return this.IPv4address.getHostAddress()+":"+this.ifID;
		}else {
			return "";
		}
	}

}


text:
<!DOCTYPE html>

 <title>Playing a FLIC Animation File in JavaScript</title>
 <link rel="stylesheet" href="css/full_style.css" type="text/css" />

  Home >
  BinFile.js Demo 2 >
  Playing a FLIC Animation File in JavaScript

Player doesn't work in IE or Opera

fli

    <canvas id="FLIcanvas" width="320" height="200"></canvas>

    <button type="button" onclick="resetFLI()">Reset</button>
    <button type="button" onclick="playOrStop()" id="playstop">Play</button>

Select a button below to download an FLI or FLC animation file, then press Play.

    <button type="button" onclick="loadFLI('fli/EARTH.FLI')">Earth.FLI (125kb)</button>
    <button type="button" onclick="loadFLI('fli/COASTER.FLI')">Coaster.FLI (528kb)</button>
    <button type="button" onclick="loadFLI('fli/INCREGG.FLI')">Incregg.FLI (313kb)</button>

    <button type="button" onclick="loadFLI('fli/BULLET.FLI')">Bullet.FLI (30kb)</button>
    <button type="button" onclick="loadFLI('fli/BACKFLIP.FLI')">Backflip.FLI (381kb)</button>

    <button type="button" onclick="loadFLI('fli/EMCONJ1.FLI')">Emconj1.FLI (275kb)</button>

Copyright ©  2011
    Carl Gorringe


text:
import * as Promise from "bluebird";
import Application from "../../lib/awts";
import { AppDatabase } from "../database/Database";

interface DatabaseConnectionOptions {
    url: string,
    prefix: string,
    options?: Object
}

export type Map = { [key: string]: number } | { [key: string]: string } | { [key: string]: any };
export type Listener = (name: string, cb: Function) => void;
export type Resolver = Promise.Resolver<{}>;
export type StringFuncObject = string | Function | Object;
export type Application = Application;
export type AppDatabase = AppDatabase<any, any, any>;
export type DbConnOptions = DatabaseConnectionOptions;


text:
layout: "fluid/docs_base"
version: "4.20.0"
versionHref: "/docs/native"
path: ""
category: native
id: "abbyy-real-time-recognition"
title: "ABBYY Real-Time Recognition"
header_sub_title: "Class in module "
doc: "ABBYY Real-Time Recognition"
docType: "class"
---

ABBYY Real-Time Recognition

  Improve this doc

This plugin allows to use the Text Capture and Data Capture features of
ABBYY Real-Time Recognition SDK (RTR SDK) in apps.

Repo:

    https://github.com/abbyysdk/RTR-SDK.Cordova

Installation

Install the Cordova and Ionic Native plugins:

$ ionic cordova plugin add cordova-plugin-abbyy-rtr-sdk
$ npm install --save @ionic-native/abbyy-rtr@4

Add this plugin to your app's module

Supported platforms

Android

iOS

Usage

import { AbbyyRTR } from '@ionic-native/abbyy-rtr';

constructor(private abbyyRTR: AbbyyRTR) { }

...

this.abbyyRTR.startTextCapture(options)
  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));

this.abbyyRTR.startDataCapture(options)
  .then((res: any) => console.log(res))
  .catch((error: any) => console.error(error));

Instance Members

startTextCapture(options)

Opens a modal dialog with controls for the Text Capture scenario.

    Param
    Type
    Details

      options

      TextCaptureOptions

  Returns: Promise<TextCaptureResult>

startDataCapture(options)

Opens a modal dialog with controls for the Data Capture scenario.

    Param
    Type
    Details

      options

      DataCaptureOptions

  Returns: Promise<DataCaptureResult>


text:
%%  BELLINEQUALITYMAXQUBITS    Approximates the optimal value of a 2-outcome Bell inequality in qubit (i.e., 2-dimensional quantum) settings
%   This function has five required input arguments:
%     JOINT_COE: A matrix whose (i,j)-entry is the coefficient of the term
%                <A_iB_j> in the Bell inequality.
%     A_COE: A vector whose i-th entry is the coefficient of the term <A_i>
%            in the Bell inequality.
%     B_COE: A vector whose i-th entry is the coefficient of the term <B_i>
%            in the Bell inequality.
%     A_VAL: A vector whose i-th entry is the value of the i-th measurement
%            outcome on Alice's system. Must have exactly 2 entries.
%     B_VAL: A vector whose i-th entry is the value of the i-th measurement
%            outcome on Bob's system. Must have exactly 2 entries.
%
%   BMAX = BellInequalityMaxQubits(JOINT_COE,A_COE,B_COE,A_VAL,B_VAL) is an
%   upper bound on the maximum value that the specified Bell inequality can
%   take on in 2-dimensional quantum settings (i.e., when the two parties
%   have access to qubits). This bound is computed using the method of
%   arXiv:1308.3410
%
%   This function has now optional input arguments.
%
%   URL: http://www.qetlab.com/BellInequalityMaxQubits

%   requires: CVX (http://cvxr.com/cvx/), PartialTranspose.m,
%             PermutationOperator.m, Swap.m
%
%   author: Nathaniel Johnston (nathaniel@njohnston.ca)
%   package: QETLAB
%   last updated: April 13, 2015

function [bmax,rho] = BellInequalityMaxQubits(joint_coe,a_coe,b_coe,a_val,b_val)

    % Get some basic values and make sure that the input vectors are column
    % vectors.
    [ma,mb] = size(joint_coe);
    oa = length(a_val);
    ob = length(b_val);
    a_val = a_val(:); b_val = b_val(:);
    a_coe = a_coe(:); b_coe = b_coe(:);

    if(length(a_val) ~= 2 || length(b_val) ~= 2)
        error('BellInequalityMaxQubits:InvalidInequality','This script is only capable of handling Bell inequalities with two outcomes.');
    end
    m = ma;

    tot_dim = 2^(2*m+2);
    obj_mat = sparse(tot_dim,tot_dim);

    for a = 0:1
        for b = 0:1
            for x = 1:m
                for y = 1:m
                    b_coeff = joint_coe(x,y)*a_val(a+1)*b_val(b+1);
                    if(y==1)
                        b_coeff = b_coeff + a_coe(x)*a_val(a+1);
                    end
                    if(x==1)
                        b_coeff = b_coeff + b_coe(y)*b_val(b+1);
                    end
                    obj_mat = obj_mat + b_coeff*kron(MN_matrix(m,a,x),MN_matrix(m,b,y));
                end
            end
        end
    end
    obj_mat = (obj_mat+obj_mat')/2; % avoids some numerical problems in CVX
    aux_mat = [1,0,0,0; 0,0,0,0; 0,0,0,0; 0,0,0,0];

    % Now construct the SDP that does the separability (really PPT)
    % optimization
    cvx_begin sdp quiet
        variable W(2^(2*m),2^(2*m)) hermitian;

        maximize trace(Swap(Swap(kron(Swap(W,[2,m+1],2*ones(1,2*m)),aux_mat),[m+1,2*m+1],2*ones(1,2*m+2)),[m+2,2*m+1],2*ones(1,2*m+2)) * obj_mat)

        subject to
            trace(W) == 1;
            W >= 0;

            % Now construct all of the different possible PPT constraints
            for sz = 1:(m-1)
                ppt_partitions = nchoosek(1:(2*m-1),sz);
                for j = 1:size(ppt_partitions,1)
                    PartialTranspose(W, ppt_partitions(j,:), [4,2*ones(1,2*(m-1))]) >= 0;
                end
            end
    cvx_end
    rho = W;

    bmax = cvx_optval;

    % Deal with error messages.
    if(strcmpi(cvx_status,'Inaccurate/Solved'))
        warning('BellInequalityMaxQubits:NumericalProblems','Minor numerical problems encountered by CVX. Consider adjusting the tolerance level TOL and re-running the script.');
    elseif(strcmpi(cvx_status,'Inaccurate/Infeasible'))
        warning('BellInequalityMaxQubits:NumericalProblems','Minor numerical problems encountered by CVX. Consider adjusting the tolerance level TOL and re-running the script.');
    elseif(strcmpi(cvx_status,'Unbounded') || strcmpi(cvx_status,'Inaccurate/Unbounded') || strcmpi(cvx_status,'Failed'))
        error('BellInequalityMaxQubits:NumericalProblems',strcat('Numerical problems encountered (CVX status: ',cvx_status,'). Please try adjusting the tolerance level TOL.'));
    end
end

% This function computes the matrices M_a^x and N_b^y. Input arguments:
% M: the number of measurement settings for Alice and Bob
function MN = MN_matrix(m,a,x)
    perm = 1:(m+1);
    perm(1) = x+1;
    perm(x+1) = 1;

    MN = a*speye(2^(m+1)) + ((-1)^a)*PermutationOperator(2*ones(1,m+1), perm, 0, 1);
end


text:
package com.nokia.xfolite.xforms.dom;

import com.nokia.xfolite.xforms.model.InstanceItem;
import com.nokia.xfolite.xforms.model.XFormsModel;
import com.nokia.xfolite.xforms.model.XFormsModelUI;
import com.nokia.xfolite.xforms.submission.XFormsXMLSerializer;
import com.nokia.xfolite.xml.dom.Attr;
import com.nokia.xfolite.xml.dom.Document;
import com.nokia.xfolite.xml.dom.Element;
import com.nokia.xfolite.xml.dom.Node;
import com.nokia.xfolite.xml.dom.events.DOMEvent;
import com.nokia.xfolite.xml.dom.events.EventAwareElement;
import com.nokia.xfolite.xml.xpath.NodeSet;
import com.nokia.xfolite.xml.xpath.XPathContext;
import com.nokia.xfolite.xml.xpath.XPathExpression;
import com.nokia.xfolite.xml.xpath.XPathNSResolver;
import com.nokia.xfolite.xml.xpath.XPathResult;

import java.io.IOException;
import java.util.Enumeration;
import java.util.Hashtable;

import org.kxml2.io.KXmlSerializer;
import org.xmlpull.v1.IXmlPullParser;
import org.xmlpull.v1.XmlPullParserException;

public class XFormsElement extends EventAwareElement implements XFormsNode {

    int treeDepth = 0;

    protected XFormsElement(Document ownerDocument, String aNamespaceURI, String aPrefix, String aLocalName) {
        super(ownerDocument, aNamespaceURI, aPrefix, aLocalName);
        this.ownerDocument = ownerDocument;
        // TODO Auto-generated constructor stub
    }

    public void logError(String msg) {
        ((XFormsDocument)ownerDocument).log(UserInterface.LVL_ERROR, msg, this);
    }
    public void logError(Throwable t) {
        ((XFormsDocument)ownerDocument).log(UserInterface.LVL_ERROR, "Exception:" +t.toString(), this);
    }
    public void logWarning(Throwable t) {
        ((XFormsDocument)ownerDocument).log(UserInterface.LVL_WARN, "Exception:" +t.toString(), this);
    }
    public void logWarning(String msg,Throwable t) {
        ((XFormsDocument)ownerDocument).log(UserInterface.LVL_WARN, "Exception:" +msg+t.toString(), this);
    }

    public void logWarning(String msg) {
        ((XFormsDocument)ownerDocument).log(UserInterface.LVL_WARN, msg, this);
    }
    public void logStatus(String msg) {
        ((XFormsDocument)ownerDocument).log(UserInterface.LVL_STATUS, msg, this);
    }
    public boolean elementParsed() {
        if (parentNode != null && parentNode instanceof XFormsElement) {
            treeDepth = ((XFormsElement)parentNode).treeDepth + 1;
        }

        String id = getAttribute("id");
        if (id != "") {
            ownerDocument.storeId(id, this);
        }
        return false;
    }

    public int getTreeDepth() {
        return treeDepth;
    }
	public XPathContext getContext()
	{
		return ((XFormsNode) parentNode).getContext();
	}

	public XFormsModel getModel() {
		return ((XFormsDocument) ownerDocument).getModel();
	}

    public XFormsModelUI getModelUI() {
        return ((XFormsDocument) ownerDocument).getModelUI();
    }

	public XPathResult getValue(String xpath) {
        XFormsModel model = getModel();
		XPathExpression expr = model.createExpression(xpath, this);
		return expr.evaluate(getContext(), XPathResult.ANY);
	}

	public void setExpressionValue(String xpath, String expression)
	{
        //#debug
        System.out.println("setExpressionValue xpath=" + xpath + ", expression=" + expression);
        XFormsModel model = getModel();
        InstanceItem item = model.getInstanceItem(xpath, getContext(),this);
		if (item == null) {
            //#debug warning
            System.out.println("Could not set " + xpath + " to " + expression + ", no such data element");
			return;
		}
		Node context = item.getNode();
		XPathExpression expr = model.createExpression(expression, this);
		String value = expr.evaluate(context, XPathResult.STRING).asString();
        //#debug
        System.out.println("Setting value to " + value);
		item.setStringValue(value);
	}

	public void setStringValue(String xpath, String value)
	{
        XFormsModel model = getModel();
		InstanceItem item = model.getInstanceItem(xpath, getContext(), this);
		if (item == null) {
			return;
		}
		item.setStringValue(value);
	}

	public void reEvaluateContext(XPathContext parentContext, boolean force)
	{
		boolean changed = reEvaluateOwnContext(parentContext);
		if (changed || force)
		{
			reEvaluateChildContexts(force);
		}
	}

	public boolean reEvaluateOwnContext(XPathContext parentContext) {
		//#debug
		System.out.println("reEvaluateOwnContext: " + getLocalName());
		return false;
	}

	public void reEvaluateChildContexts(boolean force) {
        XPathContext context = getContext();
        Node child = getFirstChild();
        while(child != null) {
            if (child instanceof XFormsElement) {
                ((XFormsElement)child).reEvaluateContext(context, force);
            }
            child = child.getNextSibling();
        }
	}

	public void dispatchEventSerially(int ev)
	{
        final DOMEvent evObj = new DOMEvent(ev, this);
        Runnable r = new Runnable()
        {
        	public void run()
        	{
                dispatchEvent(evObj);
        	}
        };
        ((XFormsDocument)this.getOwnerDocument()).callSerially(r);
	}

    public void queueEvent(int ev)
    {
        DOMEvent evObj = new DOMEvent(ev, this);
        getModelUI().queueEvent(evObj);
    }

	public XFormsNode getParentNode(Class parentClass)
	{
		Node parent = getParentNode();
		while ((! parentClass.isInstance(parent)) && parent != null)
		{
			parent = parent.getParentNode();
		}
		return (XFormsNode) parent;
	}

	boolean dispatchEvent(DOMEvent ev, String nodeId)
	{
		XFormsElement node = (XFormsElement)ownerDocument.getElementById(nodeId);
		if (node != null) {
			return node.dispatchEvent(ev);
		} else {
			return false;
		}

	}

    public static final String USERDATA_KEY = "userdata";
    public static final String LABEL_KEY = "label";
    public static final String ALERT_KEY = "alert";
    public static final String VALUE_KEY = "value";
    public static final String HINT_KEY = "hint";
    public static final String CAPTION_KEY = "caption";

    /** Redefine userdata access here so that we can use attributes but only pay
     *  for the hashtable when we actually use attributes and not just a single data item.
     *  This lets us use continue to use a single pointer for instance data where hashtable is not needed.
     *  Note that instance data uses XML DOM classes, not XForms DOM classes, so instance data processine
     *  does not pay for the runtime type check either.
     */

    public void setUserData(Object data) {
        if (userData instanceof Hashtable) {
            ((Hashtable)userData).put(USERDATA_KEY, data);
        } else {
            userData = data;
        }
    }

    public Object getUserData() {
        if (userData instanceof Hashtable) {
            return ((Hashtable)userData).get(USERDATA_KEY);
        } else {
            return userData;
        }
    }

    public void printUserData() {
        System.out.println("UserData: " + userData);
    }

    public void setUserData(Object attribute, Object data) {
        if (userData instanceof Hashtable) {
            ((Hashtable)userData).put(attribute, data);
        } else {
            Hashtable h = new Hashtable();
            if (userData != null) {
                h.put(USERDATA_KEY, userData);
            }
            h.put(attribute, data);
            userData = h;
        }
    }

    public Object getUserData(Object attribute) {
        if (userData instanceof Hashtable) {
            return ((Hashtable)userData).get(attribute);
        } else {
            return null;
        }
    }

}


text:
<?php
/**
 * Created by PhpStorm.
 * User: Wu
 * Date: 2016/11/28
 * Time: 09:24
 */
header('Content-type: application/json');
session_start();
// Connect database
include '../login/_include.php';
global $conn;
connectDB();
//Verify token
loginCheck($_SERVER['HTTP_X_ACCESS_TOKEN']);
//Get information
$teacher_info = test_input(mysqli_escape_string($conn, $_POST['teacher_info']));
$teacher_id = test_input(mysqli_escape_string($conn, $_POST['teacher_id']));
if($_SESSION['type']!=2){
    $result = array(
        "code" => 403,
        "msg" => "无效用户尝试操作",
        "res" => null
    );
    echo json_encode($result);
    exit;
}

//select *, count(distinct name) from table group by name
$query_result = mysqli_query($conn, "update teacher
                                     set teacher_info = '$teacher_info'
                                     WHERE teacher_id = '$teacher_id';");
if($query_result){
    $result = array(
        "code" => 0,
        "msg" => "修改成功",
        "res" => array(
            'teacher_info' => htmlspecialchars_decode($teacher_info),
            "token" => $_SESSION['token']
        )
    );
    echo json_encode($result);
}
else{
    $result = array(
        "code" => -1,
        "msg" => "修改失败",
        "res" => array(
            "token" => $_SESSION['token']
        )
    );
    echo json_encode($result);
}
mysqli_close($conn);
?>


text:
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Windows.Data;

namespace MetroTrilithon.UI.Controls;

public class EnumToBooleanConverter : IValueConverter
{
    public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        => BooleanBoxes.Box(value.ToString() == parameter.ToString());

    public object? ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        => (bool)value ? Enum.Parse(targetType, parameter.ToString() ?? "", true) : null;
}


text:
import { Argument } from './argument';

export interface OrderByArg extends Argument {
  index: number;
  property: string;
  extraColumns: string[];
  shouldIgnoreSchemaFields: boolean;
}


text:
package modules;

import com.squareup.okhttp.MediaType;
import com.squareup.okhttp.OkHttpClient;
import play.Configuration;

import javax.inject.Inject;
import javax.inject.Singleton;
import java.util.concurrent.TimeUnit;

/**
 * 查询参数表中的参数项
 * Created by hao on 16/2/28.
 */
@Singleton
public class SysParCom {
    public static final MediaType MEDIA_TYPE_JSON = MediaType.parse("application/json; charset=utf-8");
    public static final MediaType MEDIA_TYPE_MULTIPART = MediaType.parse("multipart/form-data; charset=utf-8");
    public static final MediaType MEDIA_TYPE_PNG = MediaType.parse("image/png");
    public static final String UTF8="UTF-8";

    //图片服务器url
    public static String IMAGE_URL;

    public static String INDEX_PAGE;
    public static final OkHttpClient client = new OkHttpClient();
    public static String LOGIN_PAGE;//用户登录
    public static String COLLECT_PAGE;
    public static String COLLECT_DEL; //取消收藏
    public static String COLLECT_SUBMIT;//收藏
    public static String ADDRESS_PAGE;//地址
    public static String ADDRESS_ADD;//地址新增
    public static String ADDRESS_DEL;//地址删除
    public static String ADDRESS_UPDATE;//地址更新
    public static String COUPON_PAGE;//我的优惠券
    public static String FEEDBACK_PAGE;//意见反馈
    public static String ORDER_PAGE;//我的订单
    public static String ORDER_CANCEL;//取消订单
    public static String ORDER_DEL;//删除订单
    public static String ORDER_REFUND;//申请售后
    public static String ORDER_VERIFY;//订单校验
    public static String ORDER_EXPRESS;//查看物流
    public static String ORDER_CONFIRM;//确认收货

    public static String PIN_LIST;//我的拼团
    public static String PIN_ACTIVITY;//拼团活动
    public static String PIN_ACTIVITY_PAY;//拼团活动支付
    public static String PIN_ORDER_DETAIL;//拼团详情

    public static String PHONE_VERIFY;//手机号检测
    public static String PHONE_CODE;//发送短信验证码
    public static String REGISTER_PAGE;//用户注册
    public static String RESET_PASSWORD;//密码修改
    public static String USER_INFO;//用户信息获取
    public static String USER_UPDATE;//用户信息修改
    public static String VIEWS_AGREEMENT;//服务条款
    public static String VIEWS_ABOUT;//关于我们
    public static String VIEWS_PRIVACY;//隐私权政策

    public static String THEME_PAGE;//主题
    public static String GOODS_PAGE;//商品详情
    public static String NAV_PAGE;//商品分类
    public static String THEMECATE_PAGE;//商品分类
    public static String RECOMMEND_PAGE;//推荐商品

//    public static String PIN_PAGE;//拼购商品
//    public static String ITEM_PAGE;//普通商品,多样化价格商品
//    public static String VARY_PAGE;//多样化价格商品
//    public static String CUSTOMIZE_PAGE;//主题中自定义价格商品

    public static String IMAGE_CODE;//图形验证码

    /******** 购物相关 ********/
    public static  String SHOPPING_LIST;//购物车列表
    public static  String SHOPPING_ADDTOCART;//加入购物车
    public static  String SHOPPING_SETTLE;//结算
    public static  String ORDER_SUBMIT;//提交订单
    public static  String CART_ADD;//加入购物车
    public static  String CART_DEL;//删除购物车
    public static  String CART_AMOUNT;//购物车数量
    public static  String CART_VERIFY;//能否购买校验
    public static  String CART_CHECK; //购物车列表中操作购物车商品勾选状态接口

    public static  String PAY_ORDER;

    public static  String PAY_URL;//去支付

    public static  String WEIXIN_CODE_URL;
    public static String WEIXIN_APPID;
    public static String WEIXIN_SECRET;
    public static String WEIXIN_ACCESS;
    public static String WEIXIN_REFRESH;

    public static String WEIXIN_VERIFY;

    public static String M_HTTP;

    public static Integer SESSION_TIMEOUT;

    public static Integer WEIXIN_REFRESH_OVERTIME;

    //评论
    public static String COMMENT_ADD;
    public static String COMMENT_CENTER;
    public static String COMMENT_WORST;
    public static String COMMENT_BEST;
    public static String COMMENT_IMG;
    public static String COMMENT_DETAIL;

    public static String REDIS_URL;
    public static String REDIS_PASSWORD;
    public static Integer REDIS_PORT;
    public static String REDIS_CHANNEL;

    public static String WEIXIN_UNION;

    public static String WEIXIN_DOWNLOAD_URL;

    //打印接收数据的LOG是否开启
    public static Boolean LOG_OPEN;

    public static String SHOPPING_COUPON_REC;

    //亿起发有效时间设为15天
    public static Integer YIQIFA_COOKIE_EXPIRES;
    //用来判断流量来自于亿起发联盟
    public static String YIQIFA_AID;

    //广告查询订单
    public static String AD_QUERY_ORDER;

    public static Integer CONNECT_TIME_OUT;

    @Inject
    public SysParCom(Configuration configuration) {

        CONNECT_TIME_OUT=configuration.getInt("connect.time.out");
        client.setConnectTimeout(CONNECT_TIME_OUT, TimeUnit.SECONDS);

        IMAGE_URL = configuration.getString("image.server.url");

        INDEX_PAGE = configuration.getString("products.page.index");
        LOGIN_PAGE = configuration.getString("user.page.login");
        COLLECT_PAGE=configuration.getString("shopping.collect.list");
        COLLECT_DEL=configuration.getString("shopping.collect.del");
        COLLECT_SUBMIT=configuration.getString("shopping.collect.submit");
        //地址
        ADDRESS_PAGE=configuration.getString("user.address.list");
        ADDRESS_ADD=configuration.getString("user.address.add");
        ADDRESS_DEL=configuration.getString("user.address.del");
        ADDRESS_UPDATE=configuration.getString("user.address.update");

        COUPON_PAGE=configuration.getString("shopping.coupons");
        FEEDBACK_PAGE=configuration.getString("shopping.feedback");
        //我的订单
        ORDER_PAGE=configuration.getString("shopping.order.all");
        ORDER_CANCEL=configuration.getString("shopping.order.cancel");
        ORDER_DEL=configuration.getString("shopping.order.del");
        ORDER_REFUND=configuration.getString("shopping.order.refund");
        ORDER_VERIFY=configuration.getString("shopping.order.verify");
        ORDER_EXPRESS=configuration.getString("shopping.order.express");
        ORDER_CONFIRM=configuration.getString("shopping.order.confirm");

        //我的拼团
        PIN_LIST=configuration.getString("promotion.pin.list");
        PIN_ACTIVITY=configuration.getString("promotion.pin.activity");
        PIN_ACTIVITY_PAY=configuration.getString("promotion.pin.activitypay");
        PIN_ORDER_DETAIL=configuration.getString("shopping.pin.detail");

        //注册与密码
        PHONE_VERIFY = configuration.getString("user.phone.verify");
        PHONE_CODE = configuration.getString("user.phone.code");
        REGISTER_PAGE = configuration.getString("user.page.register");
        RESET_PASSWORD = configuration.getString("user.reset.password ");
        VIEWS_AGREEMENT = configuration.getString("services.views.agreement");
        VIEWS_ABOUT = configuration.getString("services.views.about");
        VIEWS_PRIVACY = configuration.getString("services.views.privacy");

        //用户信息
        USER_INFO = configuration.getString("user.get.info");
        USER_UPDATE = configuration.getString("user.page.update");

        //商品信息
        THEME_PAGE = configuration.getString("products.page.theme");
        GOODS_PAGE = configuration.getString("products.page.goods");
        NAV_PAGE = configuration.getString("products.page.nav");
        THEMECATE_PAGE = configuration.getString("products.page.themecate");
        RECOMMEND_PAGE=configuration.getString("products.page.recommend");
//        PIN_PAGE = configuration.getString("products.page.pin");
//        ITEM_PAGE = configuration.getString("products.page.item");
//        VARY_PAGE = configuration.getString("products.page.vary");
//        CUSTOMIZE_PAGE = configuration.getString("products.page.customize");

        IMAGE_CODE =configuration.getString("user.page.imagecode");

        /******** 购物相关 ********/
        SHOPPING_LIST = configuration.getString("shopping.page.cart.list");
        SHOPPING_ADDTOCART = configuration.getString("shopping.page.cart.add");
        SHOPPING_SETTLE=configuration.getString("shopping.settle");
        ORDER_SUBMIT=configuration.getString("shopping.order.submit");
        CART_ADD=configuration.getString("shopping.cart.add");
        CART_DEL=configuration.getString("shopping.cart.del");
        CART_AMOUNT=configuration.getString("services.cart.amount");
        CART_VERIFY=configuration.getString("shopping.cart.verify");
        CART_CHECK=configuration.getString("shopping.cart.check");

        PAY_ORDER=configuration.getString("shopping.pay.order");
        PAY_URL=configuration.getString("shopping.pay.url");

        WEIXIN_CODE_URL = configuration.getString("weixin.code.url");
        WEIXIN_APPID = configuration.getString("weixin.appid");
        WEIXIN_SECRET=configuration.getString("weixin.secret");
        WEIXIN_ACCESS = configuration.getString("weixin.access.url");
        WEIXIN_REFRESH = configuration.getString("weixin.refresh.url");
        WEIXIN_VERIFY = configuration.getString("user.wechat.verify");

        M_HTTP = configuration.getString("m.http.prefix");

        SESSION_TIMEOUT = configuration.getInt("session.timeout");

        WEIXIN_REFRESH_OVERTIME =  configuration.getInt("weixin.refreshToken.overtime");

        COMMENT_ADD=configuration.getString("shopping.comment.add");
        COMMENT_CENTER=configuration.getString("shopping.comment.center");
        COMMENT_WORST=configuration.getString("services.comment.worst");
        COMMENT_BEST=configuration.getString("services.comment.best");
        COMMENT_IMG=configuration.getString("services.comment.img");
        COMMENT_DETAIL=configuration.getString("services.comment.detail");

        REDIS_URL = configuration.getString("redis.host");
        REDIS_PASSWORD = configuration.getString("redis.password");
        REDIS_PORT = configuration.getInt("redis.port");
        REDIS_CHANNEL = configuration.getString("redis.channel");

        WEIXIN_UNION = configuration.getString("weixin.union");

        WEIXIN_DOWNLOAD_URL=configuration.getString("weixin.download.url");

        LOG_OPEN=configuration.getBoolean("print.log.open");

        SHOPPING_COUPON_REC=configuration.getString("shopping.coupon.rec");

        YIQIFA_COOKIE_EXPIRES=configuration.getInt("yiqifa.cookie.expires");

        YIQIFA_AID=configuration.getString("yiqifa.aid");

        AD_QUERY_ORDER=configuration.getString("ad.query.order");

    }
}


text:
// Template Source: BaseEntityRequestBuilder.java.tt
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation.  All Rights Reserved.  Licensed under the MIT License.  See License in the project root for license information.
// ------------------------------------------------------------------------------

package com.microsoft.graph.requests;

import com.microsoft.graph.http.IRequestBuilder;
import com.microsoft.graph.core.ClientException;
import com.microsoft.graph.models.PolicyRoot;
import java.util.Arrays;
import java.util.EnumSet;
import javax.annotation.Nullable;
import javax.annotation.Nonnull;
import com.microsoft.graph.core.IBaseClient;
import com.microsoft.graph.http.BaseRequestBuilder;

// **NOTE** This file was generated by a tool and any changes will be overwritten.

/**
 * The class for the Policy Root Request Builder.
 */
public class PolicyRootRequestBuilder extends BaseRequestBuilder<PolicyRoot> {

    /**
     * The request builder for the PolicyRoot
     *
     * @param requestUrl     the request URL
     * @param client         the service client
     * @param requestOptions the options for this request
     */
    public PolicyRootRequestBuilder(@Nonnull final String requestUrl, @Nonnull final IBaseClient<?> client, @Nullable final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
        super(requestUrl, client, requestOptions);
    }

    /**
     * Creates the request
     *
     * @param requestOptions the options for this request
     * @return the PolicyRootRequest instance
     */
    @Nonnull
    public PolicyRootRequest buildRequest(@Nullable final com.microsoft.graph.options.Option... requestOptions) {
        return buildRequest(getOptions(requestOptions));
    }

    /**
     * Creates the request with specific requestOptions instead of the existing requestOptions
     *
     * @param requestOptions the options for this request
     * @return the PolicyRootRequest instance
     */
    @Nonnull
    public PolicyRootRequest buildRequest(@Nonnull final java.util.List<? extends com.microsoft.graph.options.Option> requestOptions) {
        return new com.microsoft.graph.requests.PolicyRootRequest(getRequestUrl(), getClient(), requestOptions);
    }

    /**
     * Gets the request builder for AuthenticationMethodsPolicy
     *
     * @return the AuthenticationMethodsPolicyRequestBuilder instance
     */
    @Nonnull
    public com.microsoft.graph.requests.AuthenticationMethodsPolicyRequestBuilder authenticationMethodsPolicy() {
        return new com.microsoft.graph.requests.AuthenticationMethodsPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("authenticationMethodsPolicy"), getClient(), null);
    }

    /**
     * Gets the request builder for AuthenticationFlowsPolicy
     *
     * @return the AuthenticationFlowsPolicyRequestBuilder instance
     */
    @Nonnull
    public com.microsoft.graph.requests.AuthenticationFlowsPolicyRequestBuilder authenticationFlowsPolicy() {
        return new com.microsoft.graph.requests.AuthenticationFlowsPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("authenticationFlowsPolicy"), getClient(), null);
    }
    /**
     *  Gets a request builder for the ActivityBasedTimeoutPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.ActivityBasedTimeoutPolicyCollectionRequestBuilder activityBasedTimeoutPolicies() {
        return new com.microsoft.graph.requests.ActivityBasedTimeoutPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("activityBasedTimeoutPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the ActivityBasedTimeoutPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.ActivityBasedTimeoutPolicyRequestBuilder activityBasedTimeoutPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.ActivityBasedTimeoutPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("activityBasedTimeoutPolicies") + "/" + id, getClient(), null);
    }

    /**
     * Gets the request builder for AuthorizationPolicy
     *
     * @return the AuthorizationPolicyRequestBuilder instance
     */
    @Nonnull
    public com.microsoft.graph.requests.AuthorizationPolicyRequestBuilder authorizationPolicy() {
        return new com.microsoft.graph.requests.AuthorizationPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("authorizationPolicy"), getClient(), null);
    }
    /**
     *  Gets a request builder for the ClaimsMappingPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.ClaimsMappingPolicyCollectionRequestBuilder claimsMappingPolicies() {
        return new com.microsoft.graph.requests.ClaimsMappingPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("claimsMappingPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the ClaimsMappingPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.ClaimsMappingPolicyRequestBuilder claimsMappingPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.ClaimsMappingPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("claimsMappingPolicies") + "/" + id, getClient(), null);
    }

    /**
     * Gets the request builder for CrossTenantAccessPolicy
     *
     * @return the CrossTenantAccessPolicyRequestBuilder instance
     */
    @Nonnull
    public com.microsoft.graph.requests.CrossTenantAccessPolicyRequestBuilder crossTenantAccessPolicy() {
        return new com.microsoft.graph.requests.CrossTenantAccessPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("crossTenantAccessPolicy"), getClient(), null);
    }
    /**
     *  Gets a request builder for the HomeRealmDiscoveryPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.HomeRealmDiscoveryPolicyCollectionRequestBuilder homeRealmDiscoveryPolicies() {
        return new com.microsoft.graph.requests.HomeRealmDiscoveryPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("homeRealmDiscoveryPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the HomeRealmDiscoveryPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.HomeRealmDiscoveryPolicyRequestBuilder homeRealmDiscoveryPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.HomeRealmDiscoveryPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("homeRealmDiscoveryPolicies") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the PermissionGrantPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.PermissionGrantPolicyCollectionRequestBuilder permissionGrantPolicies() {
        return new com.microsoft.graph.requests.PermissionGrantPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("permissionGrantPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the PermissionGrantPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.PermissionGrantPolicyRequestBuilder permissionGrantPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.PermissionGrantPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("permissionGrantPolicies") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the TokenIssuancePolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.TokenIssuancePolicyCollectionRequestBuilder tokenIssuancePolicies() {
        return new com.microsoft.graph.requests.TokenIssuancePolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("tokenIssuancePolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the TokenIssuancePolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.TokenIssuancePolicyRequestBuilder tokenIssuancePolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.TokenIssuancePolicyRequestBuilder(getRequestUrlWithAdditionalSegment("tokenIssuancePolicies") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the TokenLifetimePolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.TokenLifetimePolicyCollectionRequestBuilder tokenLifetimePolicies() {
        return new com.microsoft.graph.requests.TokenLifetimePolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("tokenLifetimePolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the TokenLifetimePolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.TokenLifetimePolicyRequestBuilder tokenLifetimePolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.TokenLifetimePolicyRequestBuilder(getRequestUrlWithAdditionalSegment("tokenLifetimePolicies") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the FeatureRolloutPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.FeatureRolloutPolicyCollectionRequestBuilder featureRolloutPolicies() {
        return new com.microsoft.graph.requests.FeatureRolloutPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("featureRolloutPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the FeatureRolloutPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.FeatureRolloutPolicyRequestBuilder featureRolloutPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.FeatureRolloutPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("featureRolloutPolicies") + "/" + id, getClient(), null);
    }

    /**
     * Gets the request builder for AdminConsentRequestPolicy
     *
     * @return the AdminConsentRequestPolicyRequestBuilder instance
     */
    @Nonnull
    public com.microsoft.graph.requests.AdminConsentRequestPolicyRequestBuilder adminConsentRequestPolicy() {
        return new com.microsoft.graph.requests.AdminConsentRequestPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("adminConsentRequestPolicy"), getClient(), null);
    }
    /**
     *  Gets a request builder for the ConditionalAccessPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.ConditionalAccessPolicyCollectionRequestBuilder conditionalAccessPolicies() {
        return new com.microsoft.graph.requests.ConditionalAccessPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("conditionalAccessPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the ConditionalAccessPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.ConditionalAccessPolicyRequestBuilder conditionalAccessPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.ConditionalAccessPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("conditionalAccessPolicies") + "/" + id, getClient(), null);
    }

    /**
     * Gets the request builder for IdentitySecurityDefaultsEnforcementPolicy
     *
     * @return the IdentitySecurityDefaultsEnforcementPolicyRequestBuilder instance
     */
    @Nonnull
    public com.microsoft.graph.requests.IdentitySecurityDefaultsEnforcementPolicyRequestBuilder identitySecurityDefaultsEnforcementPolicy() {
        return new com.microsoft.graph.requests.IdentitySecurityDefaultsEnforcementPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("identitySecurityDefaultsEnforcementPolicy"), getClient(), null);
    }
    /**
     *  Gets a request builder for the UnifiedRoleManagementPolicy collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.UnifiedRoleManagementPolicyCollectionRequestBuilder roleManagementPolicies() {
        return new com.microsoft.graph.requests.UnifiedRoleManagementPolicyCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("roleManagementPolicies"), getClient(), null);
    }

    /**
     * Gets a request builder for the UnifiedRoleManagementPolicy item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.UnifiedRoleManagementPolicyRequestBuilder roleManagementPolicies(@Nonnull final String id) {
        return new com.microsoft.graph.requests.UnifiedRoleManagementPolicyRequestBuilder(getRequestUrlWithAdditionalSegment("roleManagementPolicies") + "/" + id, getClient(), null);
    }
    /**
     *  Gets a request builder for the UnifiedRoleManagementPolicyAssignment collection
     *
     * @return the collection request builder
     */
    @Nonnull
    public com.microsoft.graph.requests.UnifiedRoleManagementPolicyAssignmentCollectionRequestBuilder roleManagementPolicyAssignments() {
        return new com.microsoft.graph.requests.UnifiedRoleManagementPolicyAssignmentCollectionRequestBuilder(getRequestUrlWithAdditionalSegment("roleManagementPolicyAssignments"), getClient(), null);
    }

    /**
     * Gets a request builder for the UnifiedRoleManagementPolicyAssignment item
     *
     * @return the request builder
     * @param id the item identifier
     */
    @Nonnull
    public com.microsoft.graph.requests.UnifiedRoleManagementPolicyAssignmentRequestBuilder roleManagementPolicyAssignments(@Nonnull final String id) {
        return new com.microsoft.graph.requests.UnifiedRoleManagementPolicyAssignmentRequestBuilder(getRequestUrlWithAdditionalSegment("roleManagementPolicyAssignments") + "/" + id, getClient(), null);
    }
}


text:
sudo apt-get update -q && sudo apt-get install -y \
    python-setuptools \
 && sudo easy_install pip \
 && sudo pip install \
    fabric \
    pyyaml

# add official Ansible repo & install Ansible
sudo apt-add-repository -y ppa:ansible/ansible
sudo apt-get update -q && sudo apt-get install -y \
    software-properties-common \
    ansible

# configure hosts file for Vagrant internal network
#sudo cat >> /etc/hosts <<EOL
sudo tee -a /etc/hosts > /dev/null <<EOL

# develop nodes
10.10.1.16 mgmt
10.10.1.17 mon
10.10.1.32 web1
EOL

### VPS config
# generate SSH key and distribute it to all nodes
if [ ! -f ${HOME}/.ssh/id_rsa.pub ]; then
    ssh-keygen -t rsa -b 2048 -f ${HOME}/.ssh/id_rsa -q -N ""
fi


text:
NS_ASSUME_NONNULL_BEGIN

SDLChoiceManagerState *const SDLChoiceManagerStateShutdown = @"Shutdown";
SDLChoiceManagerState *const SDLChoiceManagerStateCheckingVoiceOptional = @"CheckingVoiceOptional";
SDLChoiceManagerState *const SDLChoiceManagerStateReady = @"Ready";
SDLChoiceManagerState *const SDLChoiceManagerStateStartupError = @"StartupError";

typedef NSNumber * SDLChoiceId;

@interface SDLChoiceCell()

@property (assign, nonatomic) UInt16 choiceId;
@property (strong, nonatomic, readwrite) NSString *uniqueText;
@property (copy, nonatomic, readwrite, nullable) NSString *secondaryText;
@property (copy, nonatomic, readwrite, nullable) NSString *tertiaryText;
@property (copy, nonatomic, readwrite, nullable) NSArray<NSString *> *voiceCommands;
@property (strong, nonatomic, readwrite, nullable) SDLArtwork *artwork;
@property (strong, nonatomic, readwrite, nullable) SDLArtwork *secondaryArtwork;

@end

@interface SDLChoiceSetManager()

@property (weak, nonatomic) id<SDLConnectionManagerType> connectionManager;
@property (weak, nonatomic) SDLFileManager *fileManager;
@property (weak, nonatomic) SDLSystemCapabilityManager *systemCapabilityManager;

@property (strong, nonatomic, readonly) SDLStateMachine *stateMachine;
@property (strong, nonatomic) NSOperationQueue *transactionQueue;
@property (copy, nonatomic) dispatch_queue_t readWriteQueue;

@property (copy, nonatomic, nullable) SDLHMILevel currentHMILevel;
@property (copy, nonatomic, nullable) SDLWindowCapability *currentWindowCapability;

@property (assign, nonatomic) UInt16 nextCancelId;
@property (assign, nonatomic, getter=isVROptional) BOOL vrOptional;
@property (copy, nonatomic, readwrite) NSSet<SDLChoiceCell *> *preloadedChoices;

@end

// Assigns a set range of unique cancel ids in order to prevent overlap with other sub-screen managers that use cancel ids. If the max cancel id is reached, generation starts over from the cancel id min value.
UInt16 const ChoiceCellCancelIdMin = 101;
UInt16 const ChoiceCellCancelIdMax = 200;

@implementation SDLChoiceSetManager

#pragma mark - Lifecycle

- (instancetype)initWithConnectionManager:(id<SDLConnectionManagerType>)connectionManager fileManager:(SDLFileManager *)fileManager systemCapabilityManager:(SDLSystemCapabilityManager *)systemCapabilityManager {
    self = [super init];
    if (!self) { return nil; }

    _connectionManager = connectionManager;
    _fileManager = fileManager;
    _systemCapabilityManager = systemCapabilityManager;
    _stateMachine = [[SDLStateMachine alloc] initWithTarget:self initialState:SDLChoiceManagerStateShutdown states:[self.class sdl_stateTransitionDictionary]];
    _transactionQueue = [self sdl_newTransactionQueue];

    _readWriteQueue = dispatch_queue_create_with_target("com.sdl.screenManager.choiceSetManager.readWriteQueue", DISPATCH_QUEUE_SERIAL, [SDLGlobals sharedGlobals].sdlProcessingQueue);

    _preloadedChoices = [NSSet set];

    _nextCancelId = ChoiceCellCancelIdMin;
    _vrOptional = YES;
    _keyboardConfiguration = [self sdl_defaultKeyboardConfiguration];
    _currentHMILevel = SDLHMILevelNone;

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(sdl_hmiStatusNotification:) name:SDLDidChangeHMIStatusNotification object:nil];

    return self;
}

- (void)start {
    SDLLogD(@"Starting manager");

    [self.systemCapabilityManager subscribeToCapabilityType:SDLSystemCapabilityTypeDisplays withObserver:self selector:@selector(sdl_displayCapabilityDidUpdate)];

    if ([self.currentState isEqualToString:SDLChoiceManagerStateShutdown]) {
        [self.stateMachine transitionToState:SDLChoiceManagerStateCheckingVoiceOptional];
    }

    // Else, we're already started
}

- (void)stop {
    SDLLogD(@"Stopping manager");

    [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
        [self.stateMachine transitionToState:SDLChoiceManagerStateShutdown];
    }];
}

+ (NSDictionary<SDLState *, SDLAllowableStateTransitions *> *)sdl_stateTransitionDictionary {
    return @{
             SDLChoiceManagerStateShutdown: @[SDLChoiceManagerStateCheckingVoiceOptional],
             SDLChoiceManagerStateCheckingVoiceOptional: @[SDLChoiceManagerStateShutdown, SDLChoiceManagerStateReady, SDLChoiceManagerStateStartupError],
             SDLChoiceManagerStateReady: @[SDLChoiceManagerStateShutdown],
             SDLChoiceManagerStateStartupError: @[SDLChoiceManagerStateShutdown]
             };
}

- (NSOperationQueue *)sdl_newTransactionQueue {
    NSOperationQueue *queue = [[NSOperationQueue alloc] init];
    queue.name = @"com.sdl.screenManager.choiceSetManager.transactionQueue";
    queue.maxConcurrentOperationCount = 1;
    queue.qualityOfService = NSQualityOfServiceUserInteractive;
    queue.underlyingQueue = [SDLGlobals sharedGlobals].sdlConcurrentQueue;
    queue.suspended = YES;

    return queue;
}

/// Suspend the transaction queue if we are in HMI NONE
/// OR if the text field name "menu name" (i.e. is the primary choice text) cannot be used, we assume we cannot present a PI.
- (void)sdl_updateTransactionQueueSuspended {
    if ([self.currentHMILevel isEqualToEnum:SDLHMILevelNone]
        || (![self.currentWindowCapability hasTextFieldOfName:SDLTextFieldNameMenuName])) {
        SDLLogD(@"Suspending the transaction queue. Current HMI level is: %@, window capability has MenuName (choice primary text): %@", self.currentHMILevel, ([self.currentWindowCapability hasTextFieldOfName:SDLTextFieldNameMenuName] ? @"YES" : @"NO"));
        self.transactionQueue.suspended = YES;
    } else {
        SDLLogD(@"Starting the transaction queue");
        self.transactionQueue.suspended = NO;
    }
}

#pragma mark - State Management

- (void)didEnterStateShutdown {
    SDLLogV(@"Manager shutting down");

    NSAssert(dispatch_get_specific(SDLProcessingQueueName) != nil, @"%@ must only be called on the SDL serial queue", NSStringFromSelector(_cmd));

    _currentHMILevel = SDLHMILevelNone;

    [self.transactionQueue cancelAllOperations];
    self.transactionQueue = [self sdl_newTransactionQueue];
    _preloadedChoices = [NSMutableSet set];

    _vrOptional = YES;
    _nextCancelId = ChoiceCellCancelIdMin;
}

- (void)didEnterStateCheckingVoiceOptional {
    // Setup by sending a Choice Set without VR, seeing if there's an error. If there is, send one with VR. This choice set will be used for `presentKeyboard` interactions.
    __weak typeof(self) weakself = self;
    SDLCheckChoiceVROptionalOperation *checkOp = [[SDLCheckChoiceVROptionalOperation alloc] initWithConnectionManager:self.connectionManager completionHandler:^(BOOL isVROptional, NSError * _Nullable error) {
        __strong typeof(weakself) strongself = weakself;
        if ([self.currentState isEqualToString:SDLChoiceManagerStateShutdown]) { return; }

        strongself.vrOptional = isVROptional;
        if (error != nil) {
            [strongself.stateMachine transitionToState:SDLChoiceManagerStateStartupError];
        } else {
            [strongself.stateMachine transitionToState:SDLChoiceManagerStateReady];
        }
    }];

    [self.transactionQueue addOperation:checkOp];
}

- (void)didEnterStateStartupError {
    // TODO
}

#pragma mark - Choice Management

#pragma mark Delete

- (void)deleteChoices:(NSArray<SDLChoiceCell *> *)choices {
    SDLLogV(@"Request to delete choices: %@", choices);
    if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) {
        SDLLogE(@"Attempted to delete choices in an incorrect state: %@, they will not be deleted", self.currentState);
        return;
    }

    __weak typeof(self) weakself = self;
    SDLDeleteChoicesOperation *deleteOp = [[SDLDeleteChoicesOperation alloc] initWithConnectionManager:self.connectionManager cellsToDelete:[NSSet setWithArray:choices] loadedCells:self.preloadedChoices completionHandler:^(NSSet<SDLChoiceCell *> * _Nonnull updatedLoadedCells, NSError *_Nullable error) {
        __strong typeof(weakself) strongself = weakself;
        if ([strongself.currentState isEqualToEnum:SDLChoiceManagerStateShutdown]) {
            SDLLogD(@"Cancelling deleting choices because the manager is shut down");
            return;
        }

        SDLLogD(@"Finished deleting choices");

        strongself.preloadedChoices = updatedLoadedCells;
        [strongself sdl_updatePendingTasksWithCurrentPreloads];

        if (error != nil) {
            SDLLogE(@"Failed to delete choices with error: %@", error);
        }
    }];

    [self.transactionQueue addOperation:deleteOp];
}

#pragma mark Upload / Present

- (void)preloadChoices:(NSArray<SDLChoiceCell *> *)choices withCompletionHandler:(nullable SDLPreloadChoiceCompletionHandler)handler {
    SDLLogV(@"Request to preload choices: %@", choices);
    if (choices.count == 0) {
        if (handler != nil) {
            handler([NSError sdl_choiceSetManager_choiceUploadFailed:@{
                NSLocalizedDescriptionKey: @"Choice upload failed",
                NSLocalizedFailureReasonErrorKey: @"No choices were provided for upload",
                NSLocalizedRecoverySuggestionErrorKey: @"Provide some choice cells to upload instead of an empty list"
            }]);
        }
        return;
    }
    if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) {
        NSError *error = [NSError sdl_choiceSetManager_incorrectState:self.currentState];
        SDLLogE(@"Cannot preload choices when the manager isn't in the ready state: %@", error);
        if (handler != nil) { handler(error); }
        return;
    }

    // Upload pending preloads
    // For backward compatibility with Gen38Inch display type head units
    SDLLogD(@"Starting preload choices");
    SDLLogV(@"Choices to be uploaded: %@", choices);
    NSString *displayName = self.systemCapabilityManager.displays.firstObject.displayName;

    __weak typeof(self) weakSelf = self;
    SDLPreloadPresentChoicesOperation *preloadOp = [[SDLPreloadPresentChoicesOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager displayName:displayName windowCapability:self.currentWindowCapability isVROptional:self.isVROptional cellsToPreload:choices loadedCells:self.preloadedChoices preloadCompletionHandler:^(NSSet<SDLChoiceCell *> * _Nonnull updatedLoadedCells, NSError * _Nullable error) {
        __strong typeof(weakSelf) strongSelf = weakSelf;

        // Check if the manager has shutdown because the list of uploaded and pending choices should not be updated
        if ([strongSelf.currentState isEqualToString:SDLChoiceManagerStateShutdown]) {
            SDLLogD(@"Cancelling preloading choices because the manager is shut down");

            if (handler != nil) { handler([NSError sdl_choiceSetManager_incorrectState:SDLChoiceManagerStateShutdown]); }
            BLOCK_RETURN;
        }

        // Update the list of `preloadedChoices`
        strongSelf.preloadedChoices = updatedLoadedCells;
        [strongSelf sdl_updatePendingTasksWithCurrentPreloads];

        SDLLogD(@"Choices finished preloading");

        if (handler != nil) { handler(error); }
    }];

    [self.transactionQueue addOperation:preloadOp];
}

- (void)presentChoiceSet:(SDLChoiceSet *)choiceSet mode:(SDLInteractionMode)mode withKeyboardDelegate:(nullable id<SDLKeyboardDelegate>)delegate {
    if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) {
        SDLLogE(@"Attempted to present choices in an incorrect state: %@, it will not be presented", self.currentState);
        return;
    }

    if (choiceSet == nil) {
        SDLLogW(@"Attempted to present a nil choice set, ignoring.");
        return;
    }

    SDLLogD(@"Preloading and presenting choice set: %@", choiceSet);

    // Add an operation to present it once the preload is complete
    __weak typeof(self) weakSelf = self;
    NSString *displayName = self.systemCapabilityManager.displays.firstObject.displayName;
    SDLPreloadPresentChoicesOperation *presentOp = [[SDLPreloadPresentChoicesOperation alloc] initWithConnectionManager:self.connectionManager fileManager:self.fileManager choiceSet:choiceSet mode:mode keyboardProperties:self.keyboardConfiguration keyboardDelegate:delegate cancelID:self.nextCancelId displayName:displayName windowCapability:self.currentWindowCapability isVROptional:self.isVROptional loadedCells:self.preloadedChoices preloadCompletionHandler:^(NSSet<SDLChoiceCell *> * _Nonnull updatedLoadedCells, NSError * _Nullable error) {
        __strong typeof(weakSelf) strongSelf = weakSelf;

        // Check if the manager has shutdown because the list of uploaded and pending choices should not be updated
        if ([strongSelf.currentState isEqualToString:SDLChoiceManagerStateShutdown]) {
            SDLLogD(@"Cancelling preloading choices because the manager is shut down");
            BLOCK_RETURN;
        }

        // Update the list of `preloadedChoices`
        strongSelf.preloadedChoices = updatedLoadedCells;
        [strongSelf sdl_updatePendingTasksWithCurrentPreloads];

        SDLLogD(@"Choices finished preloading");
    }];

    [self.transactionQueue addOperation:presentOp];
}

- (nullable NSNumber<SDLInt> *)presentKeyboardWithInitialText:(NSString *)initialText delegate:(id<SDLKeyboardDelegate>)delegate {
    if (![self.currentState isEqualToString:SDLChoiceManagerStateReady]) {
        SDLLogE(@"Attempted to present keyboard in an incorrect state: %@, it will not be presented", self.currentState);
        return nil;
    }

    SDLLogD(@"Presenting keyboard with initial text: %@", initialText);
    // Present a keyboard with the choice set that we used to test VR's optional state
    UInt16 keyboardCancelId = self.nextCancelId;
    SDLPresentKeyboardOperation *keyboardOperation = [[SDLPresentKeyboardOperation alloc] initWithConnectionManager:self.connectionManager keyboardProperties:self.keyboardConfiguration initialText:initialText keyboardDelegate:delegate cancelID:keyboardCancelId windowCapability:self.currentWindowCapability];
    [self.transactionQueue addOperation:keyboardOperation];
    return @(keyboardCancelId);
}

- (void)dismissKeyboardWithCancelID:(NSNumber<SDLInt> *)cancelID {
    for (SDLAsynchronousOperation *op in self.transactionQueue.operations) {
        if (![op isKindOfClass:SDLPresentKeyboardOperation.class]) { continue; }

        SDLPresentKeyboardOperation *keyboardOperation = (SDLPresentKeyboardOperation *)op;
        if (keyboardOperation.cancelId != cancelID.unsignedShortValue) { continue; }

        SDLLogD(@"Dismissing keyboard with cancel ID: %@", cancelID);
        [keyboardOperation dismissKeyboard];
        break;
    }
}

#pragma mark - Choice Management Helpers

- (void)sdl_updatePendingTasksWithCurrentPreloads {
    for (NSOperation *op in self.transactionQueue.operations) {
        if (op.isExecuting || op.isCancelled) { continue; }

        if ([op isMemberOfClass:SDLPreloadPresentChoicesOperation.class]) {
            SDLPreloadPresentChoicesOperation *preloadPresentOp = (SDLPreloadPresentChoicesOperation *)op;
            preloadPresentOp.loadedCells = self.preloadedChoices;
        } else if ([op isMemberOfClass:SDLDeleteChoicesOperation.class]) {
            SDLDeleteChoicesOperation *deleteOp = (SDLDeleteChoicesOperation *)op;
            deleteOp.loadedCells = self.preloadedChoices;
        }
    }
}

#pragma mark - Keyboard Configuration

- (void)setKeyboardConfiguration:(nullable SDLKeyboardProperties *)keyboardConfiguration {
    if (keyboardConfiguration == nil) {
        SDLLogD(@"Updating keyboard configuration to the default");
        _keyboardConfiguration = [self sdl_defaultKeyboardConfiguration];
    } else {
        SDLLogD(@"Updating keyboard configuration to a new configuration: %@", keyboardConfiguration);
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
        _keyboardConfiguration = [[SDLKeyboardProperties alloc] initWithLanguage:keyboardConfiguration.language layout:keyboardConfiguration.keyboardLayout keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:keyboardConfiguration.limitedCharacterList autoCompleteText:keyboardConfiguration.autoCompleteText autoCompleteList:keyboardConfiguration.autoCompleteList];
#pragma clang diagnostic pop

        if (keyboardConfiguration.keypressMode != SDLKeypressModeResendCurrentEntry) {
            SDLLogW(@"Attempted to set a keyboard configuration with an invalid keypress mode; only .resentCurrentEntry is valid. This value will be ignored, the rest of the properties will be set.");
        }
    }
}

- (SDLKeyboardProperties *)sdl_defaultKeyboardConfiguration {
    return [[SDLKeyboardProperties alloc] initWithLanguage:SDLLanguageEnUs keyboardLayout:SDLKeyboardLayoutQWERTY keypressMode:SDLKeypressModeResendCurrentEntry limitedCharacterList:nil autoCompleteList:nil maskInputCharacters:nil customKeys:nil];
}

#pragma mark - Getters

- (UInt16)nextCancelId {
    __block UInt16 cancelId = 0;
    [SDLGlobals runSyncOnSerialSubQueue:self.readWriteQueue block:^{
        cancelId = self->_nextCancelId;
        if (cancelId >= ChoiceCellCancelIdMax) {
            self->_nextCancelId = ChoiceCellCancelIdMin;
        } else {
            self->_nextCancelId = cancelId + 1;
        }
    }];

    return cancelId;
}

- (NSString *)currentState {
    return self.stateMachine.currentState;
}

#pragma mark - RPC Responses / Notifications

- (void)sdl_displayCapabilityDidUpdate {
    self.currentWindowCapability = self.systemCapabilityManager.defaultMainWindowCapability;
    [self sdl_updateTransactionQueueSuspended];
}

- (void)sdl_hmiStatusNotification:(SDLRPCNotificationNotification *)notification {
    // We can only present a choice set if we're in FULL
    SDLOnHMIStatus *hmiStatus = (SDLOnHMIStatus *)notification.notification;
    if (hmiStatus.windowID != nil && hmiStatus.windowID.integerValue != SDLPredefinedWindowsDefaultWindow) { return; }

    self.currentHMILevel = hmiStatus.hmiLevel;

    [self sdl_updateTransactionQueueSuspended];
}

@end

NS_ASSUME_NONNULL_END


text:
module DiscourseSSO
  class Request
    USER_PROPERTIES = [:name, :username, :email, :about_me,
      :external_email, :external_username, :external_name, :external_id]

    attr_reader :request_payload, :request_signature
    attr_accessor :user

    def initialize(request_payload, request_signature)
      @request_payload = request_payload
      @request_signature = request_signature
      verify_authentic_request!
    end

    def callback_url
      Config.configuration.return_url_base + '?' + Rack::Utils.build_query(callback_parameters)
    end

    private

    def verify_authentic_request!
      raise InvalidSignature unless sign(request_payload) == request_signature
    end

    def sign(stuff_to_sign)
      OpenSSL::HMAC.hexdigest("sha256", Config.configuration.secret, stuff_to_sign)
    end

    def callback_parameters
      sso_payload = Base64.encode64(Rack::Utils.build_query(payload_properties))
      { sso: sso_payload, sig: sign(sso_payload) }
    end

    def payload_properties
      { nonce: request_nonce }.merge(user)
    end

    def request_nonce
      decoded = Base64.decode64(request_payload)
      Rack::Utils.parse_query(decoded).fetch('nonce')
    end
  end
end


text:
module Squib
  class Deck

    # :nodoc:
    # @api private
    def render_pdf(range, sheet)
      file         = "#{sheet.dir}/#{sheet.file}"
      cc           = Cairo::Context.new(Cairo::PDFSurface.new(file, sheet.width * 72.0 / @dpi, sheet.height * 72.0 / @dpi))
      cc.scale(72.0 / @dpi, 72.0 / @dpi) # for bug #62
      x, y         = sheet.margin, sheet.margin
      card_width   = @width  - 2 * sheet.trim
      card_height  = @height - 2 * sheet.trim
      @progress_bar.start("Saving PDF to #{file}", range.size) do |bar|
        range.each do |i|
          card = @cards[i]
          cc.translate(x,y)
          cc.rectangle(sheet.trim, sheet.trim, card_width, card_height)
          cc.clip
          case card.backend.downcase.to_sym
          when :memory
            cc.set_source(card.cairo_surface, 0, 0)
            cc.paint
          when :svg
            card.cairo_surface.finish
            cc.save
            cc.scale(0.8,0.8) # I really don't know why I needed to do this at all. But 0.8 is the magic number to get this to scale right
            cc.render_rsvg_handle(RSVG::Handle.new_from_file(card.svgfile), nil)
            cc.restore
          else
            abort "No such back end supported for save_pdf: #{backend}"
          end
          bar.increment
          cc.reset_clip
          cc.translate(-x,-y)
          x += card.width + sheet.gap - 2*sheet.trim
          if x > (sheet.width - card_width - sheet.margin)
            x = sheet.margin
            y += card.height + sheet.gap - 2*sheet.trim
            if y > (sheet.height - card_height - sheet.margin)
              cc.show_page # next page
              x,y = sheet.margin,sheet.margin
            end
          end
        end
      end
    end

    # :nodoc:
    # @api private
    def render_sheet(range, batch, sheet)
      sheet_width = (sheet.columns * (@width + 2 * sheet.gap - 2 * sheet.trim)) + (2 * sheet.margin)
      sheet_height = (sheet.rows * (@height + 2 * sheet.gap - 2 * sheet.trim)) + (2 * sheet.margin)
      cc = Cairo::Context.new(Cairo::ImageSurface.new(sheet_width, sheet_height))
      num_this_sheet = 0
      sheet_num = 0
      x, y = sheet.margin, sheet.margin
      @progress_bar.start("Saving PNG sheet to #{batch.summary}", @cards.size + 1) do |bar|
        range.each do |i|
          if num_this_sheet >= (sheet.columns * sheet.rows) # new sheet
            filename = batch.full_filename(sheet_num)
            cc.target.write_to_png(filename)
            new_sheet = false
            num_this_sheet = 0
            sheet_num += 1
            x, y = sheet.margin, sheet.margin
            cc = Cairo::Context.new(Cairo::ImageSurface.new(sheet_width, sheet_height))
          end
          surface = trim(@cards[i].cairo_surface, sheet.trim, @width, @height)
          cc.set_source(surface, x, y)
          cc.paint
          num_this_sheet += 1
          x += surface.width + sheet.gap
          if num_this_sheet % sheet.columns == 0 # new row
            x = sheet.margin
            y += surface.height + sheet.gap
          end
          bar.increment
        end
        cc.target.write_to_png(batch.full_filename(sheet_num))
      end
    end

    # Return a new Cairo::ImageSurface that is trimmed from the original
    #
    # @param surface The surface to trim
    # @param trim The number of pixels around the edge to trim
    # @param width The width of the surface prior to the trim
    # @param height The height of the surface prior to the trim
    # :nodoc:
    # @api private
    def trim(surface, trim, width, height)
      if trim > 0
        tmp = Cairo::ImageSurface.new(width-2*trim, height-2*trim)
        cc = Cairo::Context.new(tmp)
        cc.set_source(surface,-1*trim, -1*trim)
        cc.paint
        surface = tmp
      end
      surface
    end

  end
end