text:
package org.fluentjava.iwant.entry3;

import java.io.File;

import org.fluentjava.iwant.api.core.HelloTarget;
import org.fluentjava.iwant.api.model.Path;
import org.fluentjava.iwant.api.model.Source;
import org.fluentjava.iwant.apimocks.CachesMock;
import org.fluentjava.iwant.apimocks.TargetEvaluationContextMock;
import org.fluentjava.iwant.apimocks.TargetMock;
import org.fluentjava.iwant.entry.Iwant;
import org.fluentjava.iwant.entry.Iwant.IwantException;
import org.fluentjava.iwant.entry.Iwant.IwantNetwork;
import org.fluentjava.iwant.entrymocks.IwantNetworkMock;
import org.fluentjava.iwant.testarea.TestArea;

import junit.framework.TestCase;

public class IngredientCheckingTargetEvaluationContextTest extends TestCase {

	private Iwant iwant;
	private IwantNetwork network;
	private CachesMock caches;
	private File wsRoot;
	private TargetEvaluationContextMock delegate;
	private TargetMock target;
	private IngredientCheckingTargetEvaluationContext ctx;

	@Override
	public void setUp() {
		TestArea testArea = TestArea.forTest(this);
		network = new IwantNetworkMock(testArea);
		iwant = Iwant.using(network);
		wsRoot = testArea.root();
		caches = new CachesMock(wsRoot);
		caches.cachesModifiableTargetsAt(testArea.newDir("cached-targets"));
		caches.providesTemporaryDirectoryAt(testArea.newDir("tempDir"));
		delegate = new TargetEvaluationContextMock(iwant, caches);
		delegate.hasWsRoot(wsRoot);
		target = new TargetMock("target");
		ctx = new IngredientCheckingTargetEvaluationContext(target, delegate);
	}

	public void testReferenceToCachedSelfIsDelegated() {
		target.hasNoIngredients();
		assertEquals(delegate.cached(target), ctx.cached(target));
	}

	/**
	 * In some weird situation a target may refer to another instance of itself
	 * so no ingredient check done here.
	 */
	public void testReferenceToCopyOfCachedSelfIsDelegated() {
		target.hasNoIngredients();
		assertEquals(delegate.cached(target),
				ctx.cached(new TargetMock("target")));
	}

	/**
	 * With current design it would be too much to require proper equals from
	 * all Target implementations.
	 */
	public void testComparisonUsesNameSoEvenADifferentPathWithSameNameIsInterpretedAsTargetItself() {
		target.hasNoIngredients();

		HelloTarget differentTargetImplWithSameName = new HelloTarget("target",
				"whatever");
		assertEquals(delegate.cached(differentTargetImplWithSameName),
				ctx.cached(differentTargetImplWithSameName));

		// even Source is ok
		Source sourceWithSameName = Source.underWsroot("target");
		assertEquals(delegate.cached(sourceWithSameName),
				ctx.cached(sourceWithSameName));
	}

	public void testReferenceToIngredientIsDelegated() {
		TargetMock ingredient = new TargetMock("ingredient");
		target.hasIngredients(ingredient);
		assertEquals(delegate.cached(ingredient), ctx.cached(ingredient));
	}

	public void testReferenceToNonIngredientCausesAFailure() {
		target.hasNoIngredients();
		try {
			ctx.cached(new TargetMock("implicit ingredient"));
			fail();
		} catch (IwantException e) {
			assertEquals(
					"Target target referred to implicit ingredient without "
							+ "declaring it an ingredient.",
					e.getMessage());
		}
	}

	/**
	 * It's ok to use ingredients of ingredients, otherwise you would have to
	 * declare everything recursively
	 */
	public void testReferenceToIngredientOfIngredientIsDelegated() {
		TargetMock ingredientOfIngredient = new TargetMock(
				"ingredient-of-ingredient");
		ingredientOfIngredient.hasNoIngredients();
		TargetMock ingredient = new TargetMock("ingredient");
		ingredient.hasIngredients(ingredientOfIngredient);

		target.hasIngredients(ingredient);

		Path copyOfIngredientOfIngredient = Source
				.underWsroot("ingredient-of-ingredient");
		assertEquals(delegate.cached(copyOfIngredientOfIngredient),
				ctx.cached(copyOfIngredientOfIngredient));
	}

	/**
	 * See the other name related test for explanation
	 */
	public void testIngredientOfIngredientIsAlsoComparedByNameNotEquality() {
		TargetMock ingredientOfIngredient = new TargetMock(
				"ingredient-of-ingredient");
		ingredientOfIngredient.hasNoIngredients();
		TargetMock ingredient = new TargetMock("ingredient");
		ingredient.hasIngredients(ingredientOfIngredient);

		target.hasIngredients(ingredient);

		assertEquals(delegate.cached(ingredientOfIngredient),
				ctx.cached(ingredientOfIngredient));
	}

	public void testNullIngredientIsReportedAsFriendlyException() {
		TargetMock ingredient = new TargetMock("ingredient");
		ingredient.hasIngredients(new Path[] { null });
		target.hasIngredients(ingredient);
		try {
			ctx.cached(new TargetMock("something"));
			fail();
		} catch (IwantException e) {
			assertEquals("Path 'ingredient' has a null ingredient.",
					e.getMessage());
		}
	}

	public void testOtherMethodsAreJustDelegated() {
		assertSame(delegate.iwant(), ctx.iwant());
		assertSame(delegate.wsRoot(), ctx.wsRoot());
		assertSame(delegate.freshTemporaryDirectory(),
				ctx.freshTemporaryDirectory());
	}

}


text:
var casper = require( 'casper' ).create();
var filename = 'demo/neighbourhood-data-import.js';

var records = JSON.parse( require( 'fs' ).read( filename ));
var len = records.length;

var councils = JSON.parse( require( 'fs' ).read( 'demo/council-domains.json' ));

function inferJurisdiction( host ) {
	// councils within Queensland (check against known domains)
	var council = Object.keys( councils ).filter(function( key ) {
		// if ( host.indexOf( councils[ key ] ) > -1 ) {
		// 	casper.echo( 'council match! ' + host + ' === ' + councils[ key ] );
		// }
		return host.indexOf( councils[ key ] ) > -1;
	});

	if ( council.length > 0 ) {
		casper.echo( 'found council! ' + council.length + ' for ' + host );
		return council[ 0 ];

	} else if ( /qld/.test( host )) {
		// Queensland State
		return 'Queensland';

	} else if ( /\.au/.test( host )) {
		// other Australian states
		// federal Australia
		return 'Australia';

	} else {
		// non-government
		// international (other)
		return 'Other';
	}
}

function parseTitle( title ) {
	if ( /\|[^|]+\| Queensland Government$/.test( title )) {
		return title.replace( /\s*\|.*$/, '' );
	}
	return title;
}

function inferDocumentType( record, response ) {
	if ( /\bform\b/i.test( record.URL ) || /\bform\b/i.test( record.Title )) {
		return 'form';
	} else if ( /legislation\.qld\.gov\.au/.test( record.URL )) {
		// acts and other forms of legislation
		return 'legislation';
	}
	return 'guidelines';
}

function inferFormat( record, response ) {
	var format;

	if ( response.contentType === 'string' ) {
		return response.contentType.replace( /;.*$/, '' );

	// infer from URL
	} else if ( /\.pdf/.test( record.URL )) {
		return 'application/pdf';
	} else {
		// assume html
		return 'text/html';
	}
}

function parsePublisher( publisher ) {
	return publisher ? publisher.replace( /^.*CorporateName=(.*?);.*$/, '$1' ) : null;
}

// get ready to write output
filename = filename.replace( /.js$/, '-out.js' );
// write JSONP wrapper
require( 'fs' ).write( filename, 'getAlternativeDisputeResolutionData([', 'w' );

function handleSpecialCharacters( s ) {
	return s ? s
		// known special characters
		.replace( /'/g, '\'' )
		.replace( /»/g, '-' )
		// unknown special characters become spaces
		.replace( /[^\x00-\x7F]+/g, ' ' )
		// normalise whitespace
		.replace( /\n/g, ' ' )
		.replace( /\s\s+/g, ' ' )
		// trim
		.replace( /^\s+/, '' )
		.replace( /\s+$/, '' )
	: s;
}

casper.start();
records.forEach(function( record, i ) {
	// open the page
	casper.thenOpen( record.URL, function( response ) {
		casper.echo( 'parsing ' + ( i + 1 ) + '/' + len + ': ' + record.URL + '…', 'INFO' );
		// sanity check the URL (allow for trailing slash)
		if ( response.url && record.URL.replace( / /g, '%20' ).replace( /\/$/, '' ) === response.url.replace( /\/$/, '' )) {
			// record.httpResponse = response;
			// grab metadata
			record.Title = parseTitle( this.getTitle() );
			record.Description = this.getElementAttribute( 'meta[name="DCTERMS.description"]', 'content' ) || this.getElementAttribute( 'meta[name="DC.description"]', 'content' ) || this.getElementAttribute( 'meta[name="description"]', 'content' );
			record.Publisher = parsePublisher( this.getElementAttribute( 'meta[name="DCTERMS.Publisher"]', 'content' ) || this.getElementAttribute( 'meta[name="DC.Publisher"]', 'content' ));
			record.documentType = record.documentType || this.getElementAttribute( 'meta[name="AGLSTERMS.documentType"]', 'content' ) || inferDocumentType( record, response );

			// normalise characters and whitespace
			record.Description = handleSpecialCharacters( record.Description );
			record.Title = handleSpecialCharacters( record.Title );

		} else {
			// couldn't get a response
			casper.echo( '-> NO RESPONSE! ' + record.URL, 'WARNING' );
			// infer title from filename, replace -_ with spaces and remove file extension
			record.Title = decodeURIComponent( record.URL.replace( /^.*\//, '' )).replace( /[-_]+/g, ' ' ).replace( /\.[^.]*$/, '' );
			record.documentType = record.documentType || inferDocumentType( record, record );
		}
		record.format = inferFormat( record, response );
		record.jurisdiction = inferJurisdiction( record.URL );
		require( 'fs' ).write( filename, ( i > 0 ? ', ' : '' ) + JSON.stringify( record, null, '\t' ), 'a' );
	});
});

casper.run(function() {
	// completed: close JSONP
	require( 'fs' ).write( filename, ']);', 'a' );
	casper.echo( 'Done.\n\n', 'GREEN_BAR' );

	casper.exit();
});

redpajama_set_name: RedPajamaGithub


text:
package common

var (
	// Version number needs to be var since we override the value when building
	Version = "dev"
)

const (
	// Cilium constants

	// CiliumPath is the path where cilium operational files are running.
	CiliumPath    = "/var/run/cilium"
	DefaultLibDir = "/usr/lib/cilium"
	CiliumUIPath  = DefaultLibDir + "/ui"
	// CiliumSock is the cilium socket for the communication between the daemon and cilium client.
	CiliumSock = CiliumPath + "/cilium.sock"
	// DefaultContainerMAC represents a dummy MAC address for the containers.
	DefaultContainerMAC = "AA:BB:CC:DD:EE:FF"
	// BPFMap is the file that contains the BPF Map for the host.
	BPFMapRoot    = "/sys/fs/bpf"
	BPFCiliumMaps = BPFMapRoot + "/tc/globals"
	BPFMap        = BPFCiliumMaps + "/cilium_lxc"
	// Basename prefix of endpoint specific policy map
	PolicyMapName = "cilium_policy_"
	// Path prefix to endpoint specific policy map
	PolicyMapPath = BPFCiliumMaps + "/" + PolicyMapName
	Ct6MapName    = "cilium_ct6_"
	BPFMapCT6     = BPFCiliumMaps + "/" + Ct6MapName
	Ct4MapName    = "cilium_ct4_"
	BPFMapCT4     = BPFCiliumMaps + "/" + Ct4MapName
	// RFC3339Milli is the RFC3339 with milliseconds for the default timestamp format
	// log files.
	RFC3339Milli = "2006-01-02T15:04:05.000Z07:00"

	// Consul dedicated constants

	// OperationalPath is the base path to store the operational details in consul.
	OperationalPath = "cilium-net/operational"

	// LastFreeLabelIDKeyPath is the path where the Last free UUID is stored in consul.
	LastFreeLabelIDKeyPath = OperationalPath + "/Labels/LastUUID"
	// LabelsKeyPath is the base path where labels are stored in consul.
	LabelsKeyPath = OperationalPath + "/Labels/SHA256SUMLabels"
	// LabelIDKeyPath is the base path where the IDs are stored in consul.
	LabelIDKeyPath = OperationalPath + "/Labels/IDs"
	// MaxSetOfLabels is maximum number of set of labels that can be stored in consul.
	MaxSetOfLabels = uint32(0xFFFF)
	// FirstFreeLabelID is the first ID for which the labels should be assigned.
	FirstFreeLabelID = uint32(256)
	// LastFreeServiceIDKeyPath is the path where the Last free UUID is stored in consul.
	LastFreeServiceIDKeyPath = OperationalPath + "/Services/LastUUID"
	// ServiceKeyPath is the base path where services are stored in consul.
	ServicesKeyPath = OperationalPath + "/Services/SHA256SUMServices"
	// ServiceIDKeyPath is the base path where the IDs are stored in consul.
	ServiceIDKeyPath = OperationalPath + "/Services/IDs"
	// MaxSetOfServiceID is maximum number of set of service IDs that can be stored in consul.
	MaxSetOfServiceID = uint32(0xFFFF)
	// FirstFreeServiceID is the first ID for which the services should be assigned.
	FirstFreeServiceID = uint32(1)

	// Miscellaneous dedicated constants

	// GlobalLabelPrefix is the default root path for the policy.
	GlobalLabelPrefix = "io.cilium"
	// CiliumLabelSource is the default label source for the labels read from containers.
	CiliumLabelSource = "cilium"
	// K8sLabelSource is the default label source for the labels read from kubernetes.
	K8sLabelSource = "k8s"
	// K8sAnnotationName is the annotation name used for the cilium policy name in the
	// kubernetes network policy.
	K8sAnnotationName = "io.cilium.name"
	// K8sPodNamespaceLabel is the label used in kubernetes containers to specify
	// which namespace they belong to.
	K8sPodNamespaceLabel = "io.kubernetes.pod.namespace"
	// K8sAnnotationParentName is the annotation name used for the cilium policy
	// parent name in the kubernetes network policy.
	K8sAnnotationParentName = "io.cilium.parent"
	// Label source for reserved types
	ReservedLabelSource = "reserved"
	// Label used to represent the reserved source
	ReservedLabelKey = GlobalLabelPrefix + "." + ReservedLabelSource
	// EndpointsPerHost is the maximum number of endpoints allowed per host. It should
	// represent the same number of IPv6 addresses supported on each node.
	EndpointsPerHost = 0xFFFF
	// GroupFilePath is the unix group file path.
	GroupFilePath = "/etc/group"
	// CiliumGroupName is the cilium's unix group name.
	CiliumGroupName = "cilium"

	// CHeaderFileName is the name of the C header file for BPF programs for a
	// particular endpoint.
	CHeaderFileName = "lxc_config.h"
	// Name of the header file used for bpf_netdev.c and bpf_overlay.c
	NetdevHeaderFileName = "netdev_config.h"
	// CiliumCHeaderPrefix is the prefix using when printing/writing an endpoint in a
	// base64 form.
	CiliumCHeaderPrefix = "CILIUM_BASE64_"
)


text:
import _extends from 'babel-runtime/helpers/extends';
import _classCallCheck from 'babel-runtime/helpers/classCallCheck';
import _createClass from 'babel-runtime/helpers/createClass';
import _possibleConstructorReturn from 'babel-runtime/helpers/possibleConstructorReturn';
import _inherits from 'babel-runtime/helpers/inherits';
var __rest = this && this.__rest || function (s, e) {
    var t = {};
    for (var p in s) {
        if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0) t[p] = s[p];
    }if (s != null && typeof Object.getOwnPropertySymbols === "function") for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
        if (e.indexOf(p[i]) < 0) t[p[i]] = s[p[i]];
    }return t;
};
import React from 'react';
import Tooltip from '../tooltip';
import Icon from '../icon';
import Button from '../button';
import injectLocale from '../locale-provider/injectLocale';

var Popconfirm = function (_React$Component) {
    _inherits(Popconfirm, _React$Component);

    function Popconfirm(props) {
        _classCallCheck(this, Popconfirm);

        var _this = _possibleConstructorReturn(this, (Popconfirm.__proto__ || Object.getPrototypeOf(Popconfirm)).call(this, props));

        _this.onConfirm = function (e) {
            _this.setVisible(false);
            var onConfirm = _this.props.onConfirm;

            if (onConfirm) {
                onConfirm.call(_this, e);
            }
        };
        _this.onCancel = function (e) {
            _this.setVisible(false);
            var onCancel = _this.props.onCancel;

            if (onCancel) {
                onCancel.call(_this, e);
            }
        };
        _this.onVisibleChange = function (visible) {
            _this.setVisible(visible);
        };
        _this.state = {
            visible: props.visible
        };
        return _this;
    }

    _createClass(Popconfirm, [{
        key: 'componentWillReceiveProps',
        value: function componentWillReceiveProps(nextProps) {
            if ('visible' in nextProps) {
                this.setState({ visible: nextProps.visible });
            }
        }
    }, {
        key: 'getPopupDomNode',
        value: function getPopupDomNode() {
            return this.refs.tooltip.getPopupDomNode();
        }
    }, {
        key: 'setVisible',
        value: function setVisible(visible) {
            var props = this.props;
            if (!('visible' in props)) {
                this.setState({ visible: visible });
            }
            var onVisibleChange = props.onVisibleChange;

            if (onVisibleChange) {
                onVisibleChange(visible);
            }
        }
    }, {
        key: 'render',
        value: function render() {
            var _a = this.props,
                prefixCls = _a.prefixCls,
                title = _a.title,
                placement = _a.placement,
                okText = _a.okText,
                cancelText = _a.cancelText,
                restProps = __rest(_a, ["prefixCls", "title", "placement", "okText", "cancelText"]);
            var popconfirmLocale = this.getLocale();
            var overlay = React.createElement(
                'div',
                null,
                React.createElement(
                    'div',
                    { className: prefixCls + '-inner-content' },
                    React.createElement(
                        'div',
                        { className: prefixCls + '-message' },
                        React.createElement(Icon, { type: 'exclamation-circle' }),
                        React.createElement(
                            'div',
                            { className: prefixCls + '-message-title' },
                            title
                        )
                    ),
                    React.createElement(
                        'div',
                        { className: prefixCls + '-buttons' },
                        React.createElement(
                            Button,
                            { onClick: this.onCancel, size: 'small' },
                            cancelText || popconfirmLocale.cancelText
                        ),
                        React.createElement(
                            Button,
                            { onClick: this.onConfirm, type: 'primary', size: 'small' },
                            okText || popconfirmLocale.okText
                        )
                    )
                )
            );
            return React.createElement(Tooltip, _extends({}, restProps, { prefixCls: prefixCls, placement: placement, onVisibleChange: this.onVisibleChange, visible: this.state.visible, overlay: overlay, ref: 'tooltip' }));
        }
    }]);

    return Popconfirm;
}(React.Component);

Popconfirm.defaultProps = {
    prefixCls: 'ant-popover',
    transitionName: 'zoom-big',
    placement: 'top',
    trigger: 'click'
};
var injectPopconfirmLocale = injectLocale('Popconfirm', {
    cancelText: '取消',
    okText: '确定'
});
export default injectPopconfirmLocale(Popconfirm);


text:
class MonitoringController < ApplicationController
  def index
  end
end


text:
import dash
import dash_core_components as dcc
import dash_html_components as html
import scrapenhl_globals

app = dash.Dash()

### Get data--dummy for now

### Set options
#### Player (str-->int ID--default Erik Karlsson)
allplayers = scrapenhl_globals.get_preferred_player_names().sort_values(by='Name')
player_select = dcc.Dropdown(
        options=[{'label': pname, 'value': pid} for pname, pid in zip(allplayers.Name, allplayers.ID)],
        value='8474578')

#### Date range (default to last 3 years) (two dates) via https://plot.ly/python/range-slider/
#### Team(s) (list of str--default all)
allteams = scrapenhl_globals.get_team_id_file().sort_values(by='Name')
team_select = dcc.Dropdown(
    options=[{'label': tname, 'value': tid} for tname, tid in zip(allteams.Name, allteams.Abbreviation)],
    value=allteams.Abbreviation.values, multi=True)

#### Roll length (int--default 25)
window_slider = dcc.Slider(min=5, max=80,
        marks={i: 'Label {}'.format(i) if i == 1 else str(i) for i in range(5, 81, 5)},
        value=25)

#### Score adjust (bool--default False)
scoreadjust_button = dcc.RadioItems(
        options=[
            {'label': 'None', 'value': 'None'}, {'label': '@IneffectiveMath', 'value': '@IneffectiveMath'}],
        value='None')

#### Include playoffs (bool--default True)
playoff_button = dcc.RadioItems(
        options=[
            {'label': 'Yes', 'value': 'Yes'},
            {'label': 'No', 'value': 'No'}], value='Yes')

#### Show missing games through gaps in graph (bool--default True)
gpgaps_button = dcc.RadioItems(
        options=[
            {'label': 'Yes', 'value': 'Yes'},
            {'label': 'No', 'value': 'No'}], value='Yes')
#### Show offseason via gap in graph (bool--default False)

### Calculate, using external method (replace with dummy output)

### Plot this output

### Option to save

app.layout = html.Div([html.Label('Player'), player_select,
    html.Label('Team(s)'), team_select,
    html.Label('Include playoffs?'), playoff_button,
    html.Label('Score-adjustment'), scoreadjust_button,
    html.Label('Window size'), window_slider,
    html.Label('Show missed games?'), gpgaps_button],
                      style={'columnCount': 2})

if __name__ == '__main__':
    app.run_server(debug=True)


text:
/**
 * @file
 * @brief Public interface for configuring interrupts
 */
#ifndef ZEPHYR_INCLUDE_IRQ_H_
#define ZEPHYR_INCLUDE_IRQ_H_

/* Pull in the arch-specific implementations */
#include <zephyr/arch/cpu.h>

#ifndef _ASMLANGUAGE
#include <zephyr/toolchain.h>
#include <zephyr/types.h>

#ifdef __cplusplus
extern "C" {
#endif

/**
 * @defgroup isr_apis Interrupt Service Routine APIs
 * @ingroup kernel_apis
 * @{
 */

/**
 * @brief Initialize an interrupt handler.
 *
 * This routine initializes an interrupt handler for an IRQ. The IRQ must be
 * subsequently enabled before the interrupt handler begins servicing
 * interrupts.
 *
 * @warning
 * Although this routine is invoked at run-time, all of its arguments must be
 * computable by the compiler at build time.
 *
 * @param irq_p IRQ line number.
 * @param priority_p Interrupt priority.
 * @param isr_p Address of interrupt service routine.
 * @param isr_param_p Parameter passed to interrupt service routine.
 * @param flags_p Architecture-specific IRQ configuration flags..
 */
#define IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p) \
	ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)

/**
 * Configure a dynamic interrupt.
 *
 * Use this instead of IRQ_CONNECT() if arguments cannot be known at build time.
 *
 * @param irq IRQ line number
 * @param priority Interrupt priority
 * @param routine Interrupt service routine
 * @param parameter ISR parameter
 * @param flags Arch-specific IRQ configuration flags
 *
 * @return The vector assigned to this interrupt
 */
static inline int
irq_connect_dynamic(unsigned int irq, unsigned int priority,
		    void (*routine)(const void *parameter),
		    const void *parameter, uint32_t flags)
{
	return arch_irq_connect_dynamic(irq, priority, routine, parameter,
					flags);
}

/**
 * @brief Initialize a 'direct' interrupt handler.
 *
 * This routine initializes an interrupt handler for an IRQ. The IRQ must be
 * subsequently enabled via irq_enable() before the interrupt handler begins
 * servicing interrupts.
 *
 * These ISRs are designed for performance-critical interrupt handling and do
 * not go through common interrupt handling code. They must be implemented in
 * such a way that it is safe to put them directly in the vector table.  For
 * ISRs written in C, The ISR_DIRECT_DECLARE() macro will do this
 * automatically. For ISRs written in assembly it is entirely up to the
 * developer to ensure that the right steps are taken.
 *
 * This type of interrupt currently has a few limitations compared to normal
 * Zephyr interrupts:
 * - No parameters are passed to the ISR.
 * - No stack switch is done, the ISR will run on the interrupted context's
 *   stack, unless the architecture automatically does the stack switch in HW.
 * - Interrupt locking state is unchanged from how the HW sets it when the ISR
 *   runs. On arches that enter ISRs with interrupts locked, they will remain
 *   locked.
 * - Scheduling decisions are now optional, controlled by the return value of
 *   ISRs implemented with the ISR_DIRECT_DECLARE() macro
 * - The call into the OS to exit power management idle state is now optional.
 *   Normal interrupts always do this before the ISR is run, but when it runs
 *   is now controlled by the placement of a ISR_DIRECT_PM() macro, or omitted
 *   entirely.
 *
 * @warning
 * Although this routine is invoked at run-time, all of its arguments must be
 * computable by the compiler at build time.
 *
 * @param irq_p IRQ line number.
 * @param priority_p Interrupt priority.
 * @param isr_p Address of interrupt service routine.
 * @param flags_p Architecture-specific IRQ configuration flags.
 */
#define IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p) \
	ARCH_IRQ_DIRECT_CONNECT(irq_p, priority_p, isr_p, flags_p)

/**
 * @brief Common tasks before executing the body of an ISR
 *
 * This macro must be at the beginning of all direct interrupts and performs
 * minimal architecture-specific tasks before the ISR itself can run. It takes
 * no arguments and has no return value.
 */
#define ISR_DIRECT_HEADER() ARCH_ISR_DIRECT_HEADER()

/**
 * @brief Common tasks before exiting the body of an ISR
 *
 * This macro must be at the end of all direct interrupts and performs
 * minimal architecture-specific tasks like EOI. It has no return value.
 *
 * In a normal interrupt, a check is done at end of interrupt to invoke
 * z_swap() logic if the current thread is preemptible and there is another
 * thread ready to run in the kernel's ready queue cache. This is now optional
 * and controlled by the check_reschedule argument. If unsure, set to nonzero.
 * On systems that do stack switching and nested interrupt tracking in software,
 * z_swap() should only be called if this was a non-nested interrupt.
 *
 * @param check_reschedule If nonzero, additionally invoke scheduling logic
 */
#define ISR_DIRECT_FOOTER(check_reschedule) \
	ARCH_ISR_DIRECT_FOOTER(check_reschedule)

/**
 * @brief Perform power management idle exit logic
 *
 * This macro may optionally be invoked somewhere in between IRQ_DIRECT_HEADER()
 * and IRQ_DIRECT_FOOTER() invocations. It performs tasks necessary to
 * exit power management idle state. It takes no parameters and returns no
 * arguments. It may be omitted, but be careful!
 */
#define ISR_DIRECT_PM() ARCH_ISR_DIRECT_PM()

/**
 * @brief Helper macro to declare a direct interrupt service routine.
 *
 * This will declare the function in a proper way and automatically include
 * the ISR_DIRECT_FOOTER() and ISR_DIRECT_HEADER() macros. The function should
 * return nonzero status if a scheduling decision should potentially be made.
 * See ISR_DIRECT_FOOTER() for more details on the scheduling decision.
 *
 * For architectures that support 'regular' and 'fast' interrupt types, where
 * these interrupt types require different assembly language handling of
 * registers by the ISR, this will always generate code for the 'fast'
 * interrupt type.
 *
 * Example usage:
 *
 *     ISR_DIRECT_DECLARE(my_isr)
 *     {
 *             bool done = do_stuff();
 *             ISR_DIRECT_PM(); // done after do_stuff() due to latency concerns
 *             if (!done) {
 *                 return 0; // don't bother checking if we have to z_swap()
 *             }
 *
 *             k_sem_give(some_sem);
 *             return 1;
 *      }
 *
 * @param name symbol name of the ISR
 */
#define ISR_DIRECT_DECLARE(name) ARCH_ISR_DIRECT_DECLARE(name)

/**
 * @brief Lock interrupts.
 * @def irq_lock()
 *
 * This routine disables all interrupts on the CPU. It returns an unsigned
 * integer "lock-out key", which is an architecture-dependent indicator of
 * whether interrupts were locked prior to the call. The lock-out key must be
 * passed to irq_unlock() to re-enable interrupts.
 *
 * @note
 * This routine must also serve as a memory barrier to ensure the uniprocessor
 * implementation of `k_spinlock_t` is correct.
 *
 * This routine can be called recursively, as long as the caller keeps track
 * of each lock-out key that is generated. Interrupts are re-enabled by
 * passing each of the keys to irq_unlock() in the reverse order they were
 * acquired. (That is, each call to irq_lock() must be balanced by
 * a corresponding call to irq_unlock().)
 *
 * This routine can only be invoked from supervisor mode. Some architectures
 * (for example, ARM) will fail silently if invoked from user mode instead
 * of generating an exception.
 *
 * @note
 * This routine can be called by ISRs or by threads. If it is called by a
 * thread, the interrupt lock is thread-specific; this means that interrupts
 * remain disabled only while the thread is running. If the thread performs an
 * operation that allows another thread to run (for example, giving a semaphore
 * or sleeping for N milliseconds), the interrupt lock no longer applies and
 * interrupts may be re-enabled while other processing occurs. When the thread
 * once again becomes the current thread, the kernel re-establishes its
 * interrupt lock; this ensures the thread won't be interrupted until it has
 * explicitly released the interrupt lock it established.
 *
 * @warning
 * The lock-out key should never be used to manually re-enable interrupts
 * or to inspect or manipulate the contents of the CPU's interrupt bits.
 *
 * @return An architecture-dependent lock-out key representing the
 *         "interrupt disable state" prior to the call.
 */
#ifdef CONFIG_SMP
unsigned int z_smp_global_lock(void);
#define irq_lock() z_smp_global_lock()
#else
#define irq_lock() arch_irq_lock()
#endif

/**
 * @brief Unlock interrupts.
 * @def irq_unlock()
 *
 * This routine reverses the effect of a previous call to irq_lock() using
 * the associated lock-out key. The caller must call the routine once for
 * each time it called irq_lock(), supplying the keys in the reverse order
 * they were acquired, before interrupts are enabled.
 *
 * @note
 * This routine must also serve as a memory barrier to ensure the uniprocessor
 * implementation of `k_spinlock_t` is correct.
 *
 * This routine can only be invoked from supervisor mode. Some architectures
 * (for example, ARM) will fail silently if invoked from user mode instead
 * of generating an exception.
 *
 * @note Can be called by ISRs.
 *
 * @param key Lock-out key generated by irq_lock().
 */
#ifdef CONFIG_SMP
void z_smp_global_unlock(unsigned int key);
#define irq_unlock(key) z_smp_global_unlock(key)
#else
#define irq_unlock(key) arch_irq_unlock(key)
#endif

/**
 * @brief Return IRQ level
 * This routine returns the interrupt level number of the provided interrupt.
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 1 if IRQ level 1, 2 if IRQ level 2, 3 if IRQ level 3
 */
static inline unsigned int irq_get_level(unsigned int irq)
{
#if defined(CONFIG_3RD_LEVEL_INTERRUPTS)
	return ((irq >> 16) & 0xFF) != 0 ? 3 :
		(((irq >> 8) & 0xFF) == 0 ? 1 : 2);
#elif defined(CONFIG_2ND_LEVEL_INTERRUPTS)
	return ((irq >> 8) & 0xFF) == 0 ? 1 : 2;
#else
	ARG_UNUSED(irq);

	return 1;
#endif
}

#ifdef CONFIG_2ND_LEVEL_INTERRUPTS
/**
 * @brief Return the 2nd level interrupt number
 *
 *
 * This routine returns the second level irq number of the zephyr irq
 * number passed in
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 2nd level IRQ number
 */
static inline unsigned int irq_from_level_2(unsigned int irq)
{
#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
	return ((irq >> 8) & 0xFF) - 1;
#else
	return (irq >> 8) - 1;
#endif
}

/**
 * @brief Converts irq from level 1 to level 2 format
 *
 *
 * This routine converts the input into the level 2 irq number format
 *
 * @note Values >= 0xFF are invalid
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 2nd level IRQ number
 */
static inline unsigned int irq_to_level_2(unsigned int irq)
{
	return (irq + 1) << 8;
}

/**
 * @brief Returns the parent IRQ of the level 2 raw IRQ number
 *
 *
 * The parent of a 2nd level interrupt is in the 1st byte
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 2nd level IRQ parent
 */
static inline unsigned int irq_parent_level_2(unsigned int irq)
{
	return irq & 0xFF;
}
#endif

#ifdef CONFIG_3RD_LEVEL_INTERRUPTS
/**
 * @brief Return the 3rd level interrupt number
 *
 *
 * This routine returns the third level irq number of the zephyr irq
 * number passed in
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 3rd level IRQ number
 */
static inline unsigned int irq_from_level_3(unsigned int irq)
{
	return (irq >> 16) - 1;
}

/**
 * @brief Converts irq from level 1 to level 3 format
 *
 *
 * This routine converts the input into the level 3 irq number format
 *
 * @note Values >= 0xFF are invalid
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 3rd level IRQ number
 */
static inline unsigned int irq_to_level_3(unsigned int irq)
{
	return (irq + 1) << 16;
}

/**
 * @brief Returns the parent IRQ of the level 3 raw IRQ number
 *
 *
 * The parent of a 3rd level interrupt is in the 2nd byte
 *
 * @param irq IRQ number in its zephyr format
 *
 * @return 3rd level IRQ parent
 */
static inline unsigned int irq_parent_level_3(unsigned int irq)
{
	return (irq >> 8) & 0xFF;
}
#endif

/**
 * @brief Enable an IRQ.
 *
 * This routine enables interrupts from source @a irq.
 *
 * @param irq IRQ line.
 */
#define irq_enable(irq) arch_irq_enable(irq)

/**
 * @brief Disable an IRQ.
 *
 * This routine disables interrupts from source @a irq.
 *
 * @param irq IRQ line.
 */
#define irq_disable(irq) arch_irq_disable(irq)

/**
 * @brief Get IRQ enable state.
 *
 * This routine indicates if interrupts from source @a irq are enabled.
 *
 * @param irq IRQ line.
 *
 * @return interrupt enable state, true or false
 */
#define irq_is_enabled(irq) arch_irq_is_enabled(irq)

/**
 * @}
 */

#ifdef __cplusplus
}
#endif

#endif /* ASMLANGUAGE */
#endif /* ZEPHYR_INCLUDE_IRQ_H_ */


text:
Directive as component

Vähänkään laajemmassa ohjelmassa lomakkeet on pakko pilkkoa pienempiin osiin jotta controllerit ja templatet eivät kasva liian suuriksi. Oletustapa tehdä tämä on siirtää osa logiikasta ala-controllereihin ja ala-templateihin ja liittää ne mukaan ng-include directiivillä. Tässä tavassa on kuitenkin ongelmia.

ng-includen ongelmat

Näytä perustelu

Ala-scope käyttää suoraan ylä-scopen muuttujaa $scope.order ja muokkaa sen tilaa. Ala-controlleria lukemalla ei saa selville miten se muuttuja alustetaan tai mitään siihen liittyvää logiikkaa.

Ala-scope muokkaa ylä-scopen muuttujan tilaa ilman että tätä mitenkään näkee ylä-controllerista.

Ala-scope käyttää ylä-scopen yleistä tallennusmetodia ilman että tätä mitenkään näkee ylä-controllerista.

{{ errorMessage }}

Id: {{ order.id }}

				<button type="button" class="btn btn-primary" ng-hide="order.delivered" ng-click="order.delivered = true; save()">Merkitse toimitetuksi</button>

angular.module('directiveAsComponent')
.controller('ParentOrderController', function($scope, OrderController) {
  $scope.errorMessage = null;
  $scope.order = OrderController.load();

  $scope.save = function() {
  	$scope.errorMessage = null;
    if($scope.order.products.length === 0) {
    	$scope.errorMessage = 'Tilauksella pitää olla vähintään yksi tuote!';
    	return;
    }
    OrderController.save($scope.order);
  };
})
.controller('ChildProductsController', function($scope) {
  $scope.removeProduct = function(product) {
  	var index = $scope.order.products.indexOf(product);
  	$scope.order.products.splice(index, 1);
  	$scope.save();
  };
});

angular.module('directiveAsComponent')
.service('OrderController', function() {
  this.load = function() {
    return {
      id: 120003,
      delivered: false,
      products: [
        { id: 100, name: 'Hammastahna', qty: 2},
        { id: 200, name: 'Polkupyörä', qty: 4},
        { id: 300, name: 'Mankeli', qty: 1}
      ]
    };
  };

  this.save = function(order) {};
});

{{ errorMessage }}

Id: {{ order.id }}

  <button type="button" class="btn btn-primary" ng-hide="order.delivered" ng-click="order.delivered = true; save()">Merkitse toimitetuksi</button>

Tuotteet

        Id
        Nimi
        Määrä

        {{ product.id }}
        {{ product.name }}
        {{ product.qty }}
        Poista

ng-include -> directive

Näytä perustelu

		Tilanteen pelastaa ala-controllerin liittämisen muuttaminen ng-include -> directive. Ala-controllerin rooli yksinkertaistuu vain products taulukon näyttämiseen ja muokkaukseen, se ei näe muuta tietoa ylä-scopesta eikä pysty kutsumaan sen palveluita. Ylä-controllerin templatesta näkyy nyt myös suoraan että order-products directiiville annetaan tietty data kaksisuuntaisella bindingilla eli directiivi saa muokata sen sisältöä.

{{ errorMessage }}

Id: {{ order.id }}

				<order-products products="order.products"></order-products>
				<button type="button" class="btn btn-primary" ng-hide="order.delivered" ng-click="order.delivered = true; save()">Merkitse toimitetuksi</button>

angular.module('directiveAsComponent')
.controller('ParentOrderController2', function($scope, OrderController) {
  $scope.errorMessage = null;
  $scope.order = OrderController.load();

  $scope.$on('ChildProductsController2.productRemoved', function() {
    $scope.save();
  });

  $scope.save = function() {
    $scope.errorMessage = null;
    if($scope.order.products.length === 0) {
      $scope.errorMessage = 'Tilauksella pitää olla vähintään yksi tuote!';
      return;
    }
    OrderController.save($scope.order);
  };
})
.controller('ChildProductsController2', function($scope) {
  $scope.removeProduct = function(product) {
    var index = $scope.products.indexOf(product);
    $scope.products.splice(index, 1);
    $scope.$emit('ChildProductsController2.productRemoved', product);
  };
});

angular.module('directiveAsComponent')
.directive('orderProducts', function() {
  return {
    templateUrl: 'templates/directiveAsComponent/products2.html',
    scope: {
      products: "="
    }
  };
})

angular.module('directiveAsComponent')
.service('OrderController', function() {
  this.load = function() {
    return {
      id: 120003,
      delivered: false,
      products: [
        { id: 100, name: 'Hammastahna', qty: 2},
        { id: 200, name: 'Polkupyörä', qty: 4},
        { id: 300, name: 'Mankeli', qty: 1}
      ]
    };
  };

  this.save = function(order) {};
});

{{ errorMessage }}

Id: {{ order.id }}

  <order-products products="order.products"></order-products>
  <button type="button" class="btn btn-primary" ng-hide="order.delivered" ng-click="order.delivered = true; save()">Merkitse toimitetuksi</button>

Tuotteet

        Id
        Nimi
        Määrä

        {{ product.id }}
        {{ product.name }}
        {{ product.qty }}
        Poista


text:
<?xml version="1.0"?>

<!--
  ~ Copyright (c) 2010-2017 Evolveum and contributors
  ~
  ~ This work is dual-licensed under the Apache License 2.0
  ~ and European Union Public License. See LICENSE file for details.
  -->

<configuration>
    <midpoint>
        <global>
            <extensionDir>./src/test/resources/schema</extensionDir>
        </global>
        <repository>
            <repositoryServiceFactoryClass>com.evolveum.midpoint.repo.sql.testing.TestSqlRepositoryFactory</repositoryServiceFactoryClass>

            <port>5438</port>
            <fileName>midpoint</fileName>
            <dropIfExists>true</dropIfExists>

            <performanceStatisticsLevel>10</performanceStatisticsLevel>
            <performanceStatisticsFile>./target/performance.log</performanceStatisticsFile>
        </repository>
        <audit>
            <auditService>
                <auditServiceFactoryClass>com.evolveum.midpoint.repo.sql.SqlAuditServiceFactory</auditServiceFactoryClass>
            </auditService>
        </audit>
        <icf>
            <scanClasspath>true</scanClasspath>
            <scanDirectory>${midpoint.home}/icf-connectors</scanDirectory>
            <scanDirectory>/var/tmp</scanDirectory>
        </icf>
        <keystore>
            <keyStorePath>${midpoint.home}/keystore-test.jceks</keyStorePath>
            <keyStorePassword>changeit</keyStorePassword>
            <encryptionKeyAlias>default</encryptionKeyAlias>
        </keystore>
    </midpoint>
</configuration>


text:
package org.apereo.cas.config;

import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.consent.ConsentRepository;
import org.apereo.cas.consent.RedisConsentRepository;
import org.apereo.cas.redis.core.RedisObjectFactory;

import lombok.val;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.RedisConnectionFactory;
import org.springframework.data.redis.core.RedisTemplate;

/**
 * This is {@link CasConsentRedisConfiguration}.
 *
 * @author Misagh Moayyed
 * @since 5.2.0
 */
@Configuration("casConsentRedisConfiguration")
@EnableConfigurationProperties(CasConfigurationProperties.class)
@ConditionalOnProperty(prefix = "cas.consent.redis", name = "enabled", havingValue = "true", matchIfMissing = true)
public class CasConsentRedisConfiguration {

    @Autowired
    private CasConfigurationProperties casProperties;

    @Bean
    public ConsentRepository consentRepository() {
        return new RedisConsentRepository(consentRedisTemplate());
    }

    @Bean
    @ConditionalOnMissingBean(name = "redisConsentConnectionFactory")
    public RedisConnectionFactory redisConsentConnectionFactory() {
        val redis = casProperties.getConsent().getRedis();
        return RedisObjectFactory.newRedisConnectionFactory(redis);
    }

    @Bean
    @ConditionalOnMissingBean(name = "consentRedisTemplate")
    public RedisTemplate consentRedisTemplate() {
        return RedisObjectFactory.newRedisTemplate(redisConsentConnectionFactory());
    }
}


text:
package org.projectodd.wunderboss;

import java.net.URL;
import java.net.URLClassLoader;

public class DynamicClassLoader extends URLClassLoader {

    public DynamicClassLoader(ClassLoader parent) {
        super(new URL[0], parent);
    }

    @Override
    public void addURL(URL url) {
        super.addURL(url);
    }
}


text:
> Create a EOT font from a TTF font with [Gulp](http://gulpjs.com/).

[![NPM version](https://badge.fury.io/js/gulp-ttf2eot.png)](https://npmjs.org/package/gulp-iconfont) [![Build status](https://secure.travis-ci.org/nfroidure/gulp-iconfont.png)](https://travis-ci.org/nfroidure/gulp-iconfont) [![Dependency Status](https://david-dm.org/nfroidure/gulp-iconfont.png)](https://david-dm.org/nfroidure/gulp-iconfont) [![devDependency Status](https://david-dm.org/nfroidure/gulp-iconfont/dev-status.png)](https://david-dm.org/nfroidure/gulp-iconfont#info=devDependencies) [![Coverage Status](https://coveralls.io/repos/nfroidure/gulp-iconfont/badge.png?branch=master)](https://coveralls.io/r/nfroidure/gulp-iconfont?branch=master) [![Code Climate](https://codeclimate.com/github/nfroidure/gulp-iconfont.png)](https://codeclimate.com/github/nfroidure/gulp-iconfont)

## Usage

First, install `gulp-ttf2eot` as a development dependency:

```shell
npm install --save-dev gulp-ttf2eot
```

Then, add it to your `gulpfile.js`:

```javascript
var ttf2eot = require('gulp-ttf2eot');

gulp.task('ttf2eot', function(){
  gulp.src(['fonts/*.ttf'])
    .pipe(ttf2eot())
    .pipe(gulp.dest('fonts/'));
});
```

## API

### ttf2eot(options)

#### options.ignoreExt
Type: `Boolean`
Default value: `false`

Set to true to also convert files that doesn't have the .ttf extension.

#### options.clone
Type: `Boolean`
Default value: `false`

Set to true to clone the file before converting him so that it will output the
 original file too.

## Stats

[![NPM](https://nodei.co/npm/gulp-ttf2eot.png?downloads=true&stars=true)](https://nodei.co/npm/gulp-iconfont/)
[![NPM](https://nodei.co/npm-dl/gulp-ttf2eot.png)](https://nodei.co/npm/gulp-iconfont/)

### Contributing / Issues

Please submit TTF to EOT related issues to the
 [ttf2eot project](https://github.com/fontello/ttf2eot)
 on wich gulp-ttf2eot is built.

This repository issues is only for gulp and gulp tasks related issues.

You may want to contribute to this project, pull requests are welcome if you
 accept to publish under the MIT licence.


text:
<?php

namespace Elcodi\Admin\CurrencyBundle\Controller\Components;

use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template;

use Elcodi\Admin\CoreBundle\Controller\Abstracts\AbstractAdminController;

/**
 * Class CurrencyComponentController
 */
class CurrencyComponentController extends AbstractAdminController
{
    /**
     * Component for entity list.
     *
     * As a component, this action should not return all the html macro, but
     * only the specific component
     *
     * @return array Result
     *
     * @Route(
     *      path = "currencies/component",
     *      name = "admin_currency_list_component",
     *      methods = {"GET"}
     * )
     * @Template("AdminCurrencyBundle:Currency:Component/listComponent.html.twig")
     */
    public function listComponentAction()
    {
        $currencies = $this
            ->get('elcodi.repository.currency')
            ->findBy(
                [],
                [
                    'enabled' => 'DESC',
                    'iso' => 'ASC',
                ]
            );

        return [
            'paginator' => $currencies,
        ];
    }
}


text:
title:  Ukuphila Kumphakathi Oxakeke Umlibe
date:  26/06/2021
---

### Fundela Isifundo Sale Veki
Gen. 2:1–3, Yer. 45:1–5, Eks. 20:11, 2 Sam. 7:12, Marko 6:30–32, Gen. 4:1–17.

>
Indima Yenkumbulo

> "Umphefumlo wam ulangazelela, uyaphela kukuzilangazelela, iintendelezo zikaYehova; intliziyo yam nenyama yam imemelela kuThixo ophilileyo" (INd. 84:2).

Tik, tok; tik, tok; tik, tok. Yatsho iwotshi ithe chu, ingenalusizi.  Kwakusele iiyure ezimbini kuqale iSabatha. UMary waba nesingqala akukhangela igunjana ahleli kulo. Kwakuthe saa izinto zokudlala zabantwana; ekhitshini kukwagximfi; uSarah, eyona ntwazana incinane, ilele ebhedini inefiva; wayevumile ukuba ngengomso uza kusebenza enkonzweni, nto leyo eyayithetha ukuba kufuneka bahambe kuselithuba. Akwaba bendingafumana inzolo ngomso, wanomnqweno otshoyo uMary.

Kwangelo xesha linye, kwelinye icala ledolophu, uJosh, umyeni kaMary, wayemi emgceni eza kuhlawulela inkinkqa yabo yeveki. Iimoto endleleni zaziyinyakanyaka. Imigca yokuhlawula yayimide kakhulu. Kwakungathi wonke umntu uze kuthenga ngoku. Ndiyakudinga ukuphumla, andikwazi ukunyamezela le nto. Watsho uJosh ezishwabulela ngaphakathi. Abumele kuphelel'apha ubomi.

Ubomi bethu bulawulwa ngamaxesha akhawulezileyo, iiyure zokusebenza, ukuya koogqirha, ukuncokola kooSkype, ukuthenga, imicimbi yesikolo. Nokuba sihamba ngeebhasi, skhwele izikuta, okanye siqhuba iveni ezincinane ukujikeleza neentsapho zethu, yonke ingxolo esijikelezileyo ehlabathini ibetha kusithele konke okubaluleke ngokwenene.

Sikufumana njani ukuphumla phakathi kwengxolo nesiphithiphithi esilolu hlobo?

_*Funda esi sifundo ukulungiselela iSabatha kaJulayi 3._


text:
@interface Megamodule : MegamoduleBase<IMegamodule> {
    int intProp;
}

-(id)init;

-(void) getIntegerProperty:(id<IMethodResult>)methodResult;
-(void) setIntegerProperty:(int)value;
-(void) typesTest:(NSString*)paramStr paramBool:(BOOL)paramBool paramInt:(int)paramInt paramFloat:(float)paramFloat paramArray:(NSArray*)paramArray paramHash:(NSDictionary*)paramHash methodResult:(id<IMethodResult>)methodResult;
-(void) produceArray:(id<IMethodResult>)methodResult;
-(void) produceHash:(id<IMethodResult>)methodResult;
-(void) produceComplicatedResult:(id<IMethodResult>)methodResult;
-(void) showAlertFromUIThread:(NSString*)message;
-(void) setPeriodicallyCallback:(int)periodInMilliseconds methodResult:(id<IMethodResult>)methodResult;
-(void) isPeriodicallyCallbackSetted:(id<IMethodResult>)methodResult;
-(void) stopPeriodicallyCallback;
-(void) complicatedTypesTest1:(NSArray*)paramArray methodResult:(id<IMethodResult>)methodResult;

@end


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="ProjectAllReadModelDatabaseTest.cs">
//     Copyright (c) 2017. All rights reserved. Licensed under the MIT license. See LICENSE file in
//     the project root for full license information.
// </copyright>
// --------------------------------------------------------------------------------------------------------------------

namespace Spritely.ReadModel.Mongo.Test
{
    using System;
    using NUnit.Framework;

    [TestFixture]
    public class ProjectAllReadModelDatabaseTest : ProjectAllTestBase
    {
        [SetUp]
        public void Setup()
        {
            Database = new TestMongoDatabase();
            StorageModels = StorageModel.CreateMany(nameof(ProjectAllReadModelDatabaseTest), count: 5);
            TestModels = TestModel.CreateMany(nameof(ProjectAllReadModelDatabaseTest), count: 5);
        }

        [TearDown]
        public void CleanUp()
        {
            Database.Drop();
        }

        [Test]
        public void Create_throws_on_invalid_arguments()
        {
            Assert.That(
                () => Queries.ProjectAllAsync<TestModel, ProjectAllTestBase>(null),
                Throws.TypeOf<ArgumentNullException>());
        }

        [Test]
        public void Create_throws_on_invalid_arguments_with_custom_metadata()
        {
            Assert.That(
                () => Queries.ProjectAllAsync<TestModel, TestMetadata, ProjectAllTestBase>(null),
                Throws.TypeOf<ArgumentNullException>());
        }
    }
}


text:
// Karma configuration
// Generated on Sat Jun 10 2017 15:26:52 GMT-0300 (ART)
// https://cafedev.org/article/2016/12/testing-with-wepack-2-inject-loader-karma-mocha-chai-and-sinon/

module.exports = function(config) {
  let reporters = ['nyan', 'coverage'];
  const coverageReporters = [{
    type: 'text-summary'
  }, {
    type: 'html',
    dir: 'coverage',
    subdir: '.'
  }];
  let browsers = ['Chrome'];

  if (process.env.TRAVIS) {
    console.log('On Travis sending coveralls');
    coverageReporters.push({
      type: 'lcov',
      dir: 'coverage'
    });
    reporters = ['mocha', 'coverage', 'coveralls'];
    browsers = ['Chrome_travis_ci'];
  }

  config.set({

    // base path that will be used to resolve all patterns (eg. files, exclude)
    basePath: '',

    // frameworks to use
    // available frameworks: https://npmjs.org/browse/keyword/karma-adapter
    frameworks: ['mocha', 'chai'],

    // list of files / patterns to load in the browser
    files: [
      'tests/**/*.js'
    ],

    // list of files to exclude
    exclude: [
    ],

    // preprocess matching files before serving them to the browser
    // available preprocessors: https://npmjs.org/browse/keyword/karma-preprocessor
    preprocessors: {
      'src/**/*.js': ['webpack'],
      'tests/**/*.js': ['webpack']
    },
    // webpack configuration
    webpack: {
      module: {
        rules: [{
          test: /\.js$/,
          use: 'babel-loader',
          exclude: /(\/node_modules\/|test\.js|\.spec\.js$)/
        },
        {
          test: /\.js?$/,
          include: /src/,
          exclude: /(node_modules|bower_components|spec)/,
          loader: 'babel-istanbul-loader',
          query: {
            cacheDirectory: true
          }
        },
        {
          test: /\.scss$/,
          use: [{
            loader: 'style-loader'
          }, {
            loader: 'css-loader'
          }, {
            loader: 'sass-loader'
          }]
        }
      ]}
    },
    webpackMiddleware: {
      stats: 'errors-only'
    },

    // test results reporter to use
    // possible values: 'dots', 'progress'
    // available reporters: https://npmjs.org/browse/keyword/karma-reporter
    reporters: reporters,
    coverageReporter: {
      reporters: coverageReporters
    },

    // web server port
    port: 9876,

    // enable / disable colors in the output (reporters and logs)
    colors: true,

    // level of logging
    // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
    logLevel: config.LOG_INFO,

    // enable / disable watching file and executing tests whenever any file changes
    autoWatch: true,

    // start these browsers
    // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
    browsers: browsers,
    customLaunchers: {
      Chrome_travis_ci: {
        base: 'Chrome',
        flags: ['--no-sandbox']
      }
    },

    // Continuous Integration mode
    // if true, Karma captures browsers, runs the tests and exits
    singleRun: false,

    // Concurrency level
    // how many browser should be started simultaneous
    concurrency: Infinity,

    client: {
      captureConsole: false
    }
  });
};


text:
package edu.duke.cabig.c3pr.web.registration.tabs;

import edu.duke.cabig.c3pr.web.registration.StudySubjectWrapper;

public class ReConsentConfirmationTab extends RegistrationTab<StudySubjectWrapper> {

	public ReConsentConfirmationTab() {
        super("Confirmation", "Confirmation", "registration/reg_re_consent_confirmation");
    }
}


text:
/* @flow */
import styled from 'styled-components';
import { colors, sizes } from '../styles/utils';
import Section from './Section';
import Container from './Container';
import ZigZagSeparator from './ZigZagSeparator';

const FlexWrapper = styled.div`
  display: flex;
  margin-top: 1.5rem;

  @media (max-width: 700px) {
  }
`;

const Right = styled.div`
  flex: 0 0 5.5rem;
`;

const Left = styled.div`
  flex: 1 1 auto;
  padding-right: 1.5rem;
`;

const SubText = styled.p`
  margin: 0;
  line-height: 1em;
  font-size: 2rem;
  @media (max-width: 700px) {
    font-size: 1.7rem;
  }
`;

const KeyText = styled.p`
  margin: .5rem 0 0 0;
  line-height: 1.5em;
  font-size: 2.5rem;
  font-weight: bold;
`;

const Highlight = styled.span`
  background: ${colors.paleBlue};
`;

const FullImage = styled.img`
  max-width: 100%;
  display: inline-block;
`;

const SinceIsDown = ({ ...props }) => (
  <Section>
    <Container padded>
      <ZigZagSeparator align="right" />

      <FlexWrapper>
        <Right>
          <FullImage src="/static/images/clock.svg" />
        </Right>
        <Left>
          <SubText>
            دردناک‌تر از پایین اومدن سایت اینه که
          </SubText>
          <KeyText>
            معلوم نیست چقدره دردسترس نیست و
            <Highlight>تو خبر نداشتی!</Highlight>
          </KeyText>
        </Left>
      </FlexWrapper>
    </Container>
  </Section>
);

export default SinceIsDown;


text:
import createWrapperComponent from '../util/create-wrapper-component';
import styles from './_styles.scss';

export const Subheader = createWrapperComponent({
  displayName: 'Subheader',
  styles,
  mapProps: props => ({ props, classNames: 'subheader' }),
});

export const Lead = createWrapperComponent({
  displayName: 'Lead',
  styles,
  mapProps: props => ({ props, classNames: 'lead' }),
});

export const UnbulletedList = createWrapperComponent({
  displayName: 'UnbulletedList',
  styles,
  mapProps: props => ({ props, classNames: 'no-bullet' }),
  defaultComponentClass: 'ul',
});

export const Statistic = createWrapperComponent({
  displayName: 'Statistic',
  styles,
  mapProps: props => ({ props, classNames: 'stat' }),
});

export const TypographyHelpers = { Subheader, Lead, UnbulletedList, Statistic };

export default TypographyHelpers;


text:
<?php

namespace Magento\Quote\Model\Quote\Address;

class CustomAttributeList implements CustomAttributeListInterface
{
    /**
     * Retrieve list of quote addresss custom attributes
     *
     * @return array
     */
    public function getAttributes()
    {
        return [];
    }
}


text:
package com.ajlopez.ajtalk.compiler.ast;

public class PrimitiveNode extends Node {
	private int value;

	public PrimitiveNode(int value) {
		this.value = value;
	}

	public int getValue() {
		return this.value;
	}
}


text:
using System;
using System.Collections.Generic;
namespace WhippedCream.Data.User
{

    [System.Data.Services.Common.DataServiceEntity]
    [System.Data.Services.Common.DataServiceKey("FileKey")]
    public partial class FilesWizardInfo : System.IEquatable<FilesWizardInfo>
    {
        public System.Guid FileKey { get; set; }
        public string ClientFirstName { get; set; }
        public string ClientLastName { get; set; }
        public Nullable<System.DateTime> RunDate { get; set; }

        #region Members overriden from System.Object

        public override bool Equals(object obj)
        {
            return obj is FilesWizardInfo ? Equals(obj as FilesWizardInfo) : false;
        }

        /// <summary>
        /// The Implementation of this algorithm was taken
        /// from [here](http://www.isthe.com/chongo/tech/comp/fnv/).
        /// </summary>
        public override int GetHashCode()
        {
            int hash = 13;
            unchecked
            {
                hash = (hash * 16777619) ^ FileKey.GetHashCode();
                hash = (hash * 16777619) ^ (ClientFirstName == null ? 0 : ClientFirstName.GetHashCode());
                hash = (hash * 16777619) ^ (ClientLastName == null ? 0 : ClientLastName.GetHashCode());
                hash = (hash * 16777619) ^ (RunDate == null ? 0 : RunDate.GetHashCode());
            }
            return hash;
        }

        public override string ToString()
        {
            return base.ToString();
        }

        #endregion

        #region IEquatable<FilesWizardInfo> Members

        public bool Equals(FilesWizardInfo rhs)
        {
            if(rhs == null)
                return false;

            return System.Collections.Generic.EqualityComparer<FilesWizardInfo>.Equals(FileKey, rhs.FileKey) && System.Collections.Generic.EqualityComparer<FilesWizardInfo>.Equals(ClientFirstName, rhs.ClientFirstName) && System.Collections.Generic.EqualityComparer<FilesWizardInfo>.Equals(ClientLastName, rhs.ClientLastName) && System.Collections.Generic.EqualityComparer<FilesWizardInfo>.Equals(RunDate, rhs.RunDate);
        }

        #endregion
    }
}


text:
package com.me.diankun.drawdemo;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

/**
 * Created by diankun on 2016/3/15.
 */
public class PorterDuffXfermodeActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.porter_duff_xfermode_layout);
    }
}


text:
// Copyright 2013 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "ash/app_list/views/app_list_main_view.h"

#include <algorithm>
#include <memory>
#include <string>
#include <utility>

#include "ash/app_list/app_list_metrics.h"
#include "ash/app_list/app_list_model_provider.h"
#include "ash/app_list/app_list_util.h"
#include "ash/app_list/app_list_view_delegate.h"
#include "ash/app_list/model/app_list_folder_item.h"
#include "ash/app_list/model/app_list_item.h"
#include "ash/app_list/views/app_list_folder_view.h"
#include "ash/app_list/views/app_list_item_view.h"
#include "ash/app_list/views/app_list_view.h"
#include "ash/app_list/views/apps_container_view.h"
#include "ash/app_list/views/apps_grid_view.h"
#include "ash/app_list/views/contents_view.h"
#include "ash/app_list/views/paged_apps_grid_view.h"
#include "ash/app_list/views/search_box_view.h"
#include "ash/app_list/views/search_result_base_view.h"
#include "ash/app_list/views/search_result_page_view.h"
#include "ash/constants/ash_features.h"
#include "ash/public/cpp/app_list/app_list_features.h"
#include "ash/public/cpp/pagination/pagination_model.h"
#include "ash/search_box/search_box_view_base.h"
#include "base/bind.h"
#include "base/callback.h"
#include "base/files/file_path.h"
#include "base/strings/string_util.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/gfx/geometry/insets.h"
#include "ui/views/border.h"
#include "ui/views/controls/button/button.h"
#include "ui/views/controls/textfield/textfield.h"
#include "ui/views/layout/fill_layout.h"
#include "ui/views/widget/widget.h"
#include "ui/wm/public/activation_client.h"

namespace ash {

////////////////////////////////////////////////////////////////////////////////
// AppListMainView:

AppListMainView::AppListMainView(AppListViewDelegate* delegate,
                                 AppListView* app_list_view)
    : delegate_(delegate), app_list_view_(app_list_view) {
  // We need a layer to apply transform to in small display so that the apps
  // grid fits in the display.
  SetPaintToLayer();
  layer()->SetFillsBoundsOpaquely(false);
}

AppListMainView::~AppListMainView() = default;

void AppListMainView::Init(int initial_apps_page,
                           SearchBoxView* search_box_view) {
  search_box_view_ = search_box_view;
  AddContentsViews();

  // Switch the apps grid view to the specified page.
  PaginationModel* pagination_model = GetAppsPaginationModel();
  if (pagination_model->is_valid_page(initial_apps_page))
    pagination_model->SelectPage(initial_apps_page, false);
}

void AppListMainView::AddContentsViews() {
  DCHECK(search_box_view_);
  auto contents_view = std::make_unique<ContentsView>(app_list_view_);
  contents_view->Init();
  contents_view->SetPaintToLayer(ui::LAYER_NOT_DRAWN);
  contents_view->layer()->SetMasksToBounds(true);
  contents_view_ = AddChildView(std::move(contents_view));

  search_box_view_->set_contents_view(contents_view_);
}

void AppListMainView::ShowAppListWhenReady() {
  // After switching to tablet mode, other app windows may be active. Show the
  // app list without activating it to avoid breaking other windows' state.
  const aura::Window* active_window =
      wm::GetActivationClient(
          app_list_view_->GetWidget()->GetNativeView()->GetRootWindow())
          ->GetActiveWindow();
  if (app_list_view_->is_tablet_mode() && active_window)
    GetWidget()->ShowInactive();
  else
    GetWidget()->Show();
}

void AppListMainView::SetDragAndDropHostOfCurrentAppList(
    ApplicationDragAndDropHost* drag_and_drop_host) {
  contents_view_->SetDragAndDropHostOfCurrentAppList(drag_and_drop_host);
}

PaginationModel* AppListMainView::GetAppsPaginationModel() {
  return contents_view_->apps_container_view()
      ->apps_grid_view()
      ->pagination_model();
}

void AppListMainView::NotifySearchBoxVisibilityChanged() {
  // Repaint the AppListView's background which will repaint the background for
  // the search box. This is needed because this view paints to a layer and
  // won't propagate paints upward.
  if (parent())
    parent()->SchedulePaint();
}

const char* AppListMainView::GetClassName() const {
  return "AppListMainView";
}

void AppListMainView::Layout() {
  gfx::Rect rect = GetContentsBounds();
  if (!rect.IsEmpty())
    contents_view_->SetBoundsRect(rect);
}

void AppListMainView::QueryChanged(const std::u16string& trimmed_query,
                                   bool initiated_by_user) {
  app_list_view_->SetStateFromSearchBoxView(trimmed_query.empty(),
                                            initiated_by_user);
  contents_view_->ShowSearchResults(search_box_view_->is_search_box_active() ||
                                    !trimmed_query.empty());
  contents_view_->search_result_page_view()->UpdateForNewSearch();
}

void AppListMainView::ActiveChanged(SearchBoxViewBase* sender) {
  // Do not update views on closing.
  if (app_list_view_->app_list_state() == AppListViewState::kClosed)
    return;

  if (search_box_view_->is_search_box_active()) {
    // Show zero state suggestions when search box is activated with an empty
    // query.
    const bool is_query_empty = sender->IsSearchBoxTrimmedQueryEmpty();
    app_list_view_->SetStateFromSearchBoxView(
        is_query_empty, true /*triggered_by_contents_change*/);
    contents_view_->ShowSearchResults(true);
  } else {
    // Close the search results page if the search box is inactive.
    contents_view_->ShowSearchResults(false);
  }
}

void AppListMainView::OnSearchBoxKeyEvent(ui::KeyEvent* event) {
  app_list_view_->RedirectKeyEventToSearchBox(event);

  if (!IsUnhandledUpDownKeyEvent(*event))
    return;

  // Handles arrow key events from the search box while the search box is
  // inactive. This covers both folder traversal and apps grid traversal. Search
  // result traversal is handled in |HandleKeyEvent|
  AppListPage* page =
      contents_view_->GetPageView(contents_view_->GetActivePageIndex());
  views::View* next_view = nullptr;

  if (event->key_code() == ui::VKEY_UP)
    next_view = page->GetLastFocusableView();
  else
    next_view = page->GetFirstFocusableView();

  if (next_view)
    next_view->RequestFocus();
  event->SetHandled();
}

bool AppListMainView::CanSelectSearchResults() {
  // If there's a result, keyboard selection is allowed.
  return !!contents_view_->search_result_page_view()->CanSelectSearchResults();
}

void AppListMainView::AssistantButtonPressed() {
  delegate_->StartAssistant();
}

void AppListMainView::CloseButtonPressed() {
  // Deactivate the search box.
  search_box_view_->SetSearchBoxActive(false, ui::ET_UNKNOWN);
  search_box_view_->ClearSearch();
}

}  // namespace ash


text:
/**
 * Build the CSS Framework Documentation
 */

import gulp from 'gulp'
import sassdoc from 'sassdoc'

const sassdocGenerateTask = () => {
  return gulp
    .src('src/framework/**/*.scss')
    .pipe(sassdoc(
      {
        dest: 'doc/sassdoc'
      }
    ))
}

gulp.task('sassdoc:generate', sassdocGenerateTask)
module.exports = sassdocGenerateTask


text:
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**Class** | Pointer to **string** |  | [optional]
**Links** | Pointer to [**PipelineStepImpllinks**](PipelineStepImpllinks.md) |  | [optional]
**DisplayName** | Pointer to **string** |  | [optional]
**DurationInMillis** | Pointer to **int32** |  | [optional]
**Id** | Pointer to **string** |  | [optional]
**Input** | Pointer to [**InputStepImpl**](InputStepImpl.md) |  | [optional]
**Result** | Pointer to **string** |  | [optional]
**StartTime** | Pointer to **string** |  | [optional]
**State** | Pointer to **string** |  | [optional]

## Methods

### NewPipelineStepImpl

`func NewPipelineStepImpl() *PipelineStepImpl`

NewPipelineStepImpl instantiates a new PipelineStepImpl object
This constructor will assign default values to properties that have it defined,
and makes sure properties required by API are set, but the set of arguments
will change when the set of required properties is changed

### NewPipelineStepImplWithDefaults

`func NewPipelineStepImplWithDefaults() *PipelineStepImpl`

NewPipelineStepImplWithDefaults instantiates a new PipelineStepImpl object
This constructor will only assign default values to properties that have it defined,
but it doesn't guarantee that properties required by API are set

### GetClass

`func (o *PipelineStepImpl) GetClass() string`

GetClass returns the Class field if non-nil, zero value otherwise.

### GetClassOk

`func (o *PipelineStepImpl) GetClassOk() (*string, bool)`

GetClassOk returns a tuple with the Class field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetClass

`func (o *PipelineStepImpl) SetClass(v string)`

SetClass sets Class field to given value.

### HasClass

`func (o *PipelineStepImpl) HasClass() bool`

HasClass returns a boolean if a field has been set.

### GetLinks

`func (o *PipelineStepImpl) GetLinks() PipelineStepImpllinks`

GetLinks returns the Links field if non-nil, zero value otherwise.

### GetLinksOk

`func (o *PipelineStepImpl) GetLinksOk() (*PipelineStepImpllinks, bool)`

GetLinksOk returns a tuple with the Links field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetLinks

`func (o *PipelineStepImpl) SetLinks(v PipelineStepImpllinks)`

SetLinks sets Links field to given value.

### HasLinks

`func (o *PipelineStepImpl) HasLinks() bool`

HasLinks returns a boolean if a field has been set.

### GetDisplayName

`func (o *PipelineStepImpl) GetDisplayName() string`

GetDisplayName returns the DisplayName field if non-nil, zero value otherwise.

### GetDisplayNameOk

`func (o *PipelineStepImpl) GetDisplayNameOk() (*string, bool)`

GetDisplayNameOk returns a tuple with the DisplayName field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDisplayName

`func (o *PipelineStepImpl) SetDisplayName(v string)`

SetDisplayName sets DisplayName field to given value.

### HasDisplayName

`func (o *PipelineStepImpl) HasDisplayName() bool`

HasDisplayName returns a boolean if a field has been set.

### GetDurationInMillis

`func (o *PipelineStepImpl) GetDurationInMillis() int32`

GetDurationInMillis returns the DurationInMillis field if non-nil, zero value otherwise.

### GetDurationInMillisOk

`func (o *PipelineStepImpl) GetDurationInMillisOk() (*int32, bool)`

GetDurationInMillisOk returns a tuple with the DurationInMillis field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetDurationInMillis

`func (o *PipelineStepImpl) SetDurationInMillis(v int32)`

SetDurationInMillis sets DurationInMillis field to given value.

### HasDurationInMillis

`func (o *PipelineStepImpl) HasDurationInMillis() bool`

HasDurationInMillis returns a boolean if a field has been set.

### GetId

`func (o *PipelineStepImpl) GetId() string`

GetId returns the Id field if non-nil, zero value otherwise.

### GetIdOk

`func (o *PipelineStepImpl) GetIdOk() (*string, bool)`

GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetId

`func (o *PipelineStepImpl) SetId(v string)`

SetId sets Id field to given value.

### HasId

`func (o *PipelineStepImpl) HasId() bool`

HasId returns a boolean if a field has been set.

### GetInput

`func (o *PipelineStepImpl) GetInput() InputStepImpl`

GetInput returns the Input field if non-nil, zero value otherwise.

### GetInputOk

`func (o *PipelineStepImpl) GetInputOk() (*InputStepImpl, bool)`

GetInputOk returns a tuple with the Input field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetInput

`func (o *PipelineStepImpl) SetInput(v InputStepImpl)`

SetInput sets Input field to given value.

### HasInput

`func (o *PipelineStepImpl) HasInput() bool`

HasInput returns a boolean if a field has been set.

### GetResult

`func (o *PipelineStepImpl) GetResult() string`

GetResult returns the Result field if non-nil, zero value otherwise.

### GetResultOk

`func (o *PipelineStepImpl) GetResultOk() (*string, bool)`

GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetResult

`func (o *PipelineStepImpl) SetResult(v string)`

SetResult sets Result field to given value.

### HasResult

`func (o *PipelineStepImpl) HasResult() bool`

HasResult returns a boolean if a field has been set.

### GetStartTime

`func (o *PipelineStepImpl) GetStartTime() string`

GetStartTime returns the StartTime field if non-nil, zero value otherwise.

### GetStartTimeOk

`func (o *PipelineStepImpl) GetStartTimeOk() (*string, bool)`

GetStartTimeOk returns a tuple with the StartTime field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetStartTime

`func (o *PipelineStepImpl) SetStartTime(v string)`

SetStartTime sets StartTime field to given value.

### HasStartTime

`func (o *PipelineStepImpl) HasStartTime() bool`

HasStartTime returns a boolean if a field has been set.

### GetState

`func (o *PipelineStepImpl) GetState() string`

GetState returns the State field if non-nil, zero value otherwise.

### GetStateOk

`func (o *PipelineStepImpl) GetStateOk() (*string, bool)`

GetStateOk returns a tuple with the State field if it's non-nil, zero value otherwise
and a boolean to check if the value has been set.

### SetState

`func (o *PipelineStepImpl) SetState(v string)`

SetState sets State field to given value.

### HasState

`func (o *PipelineStepImpl) HasState() bool`

HasState returns a boolean if a field has been set.

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


text:
#ifndef sitkElastixTransformixWrappers_h
#define sitkElastixTransformixWrappers_h

#include "sitkMacro.h"

#if defined( SITKDLL )
  #ifdef SITKElastix_EXPORTS
    #define SITKElastix_EXPORT SITK_ABI_EXPORT
  #else
    #define SITKElastix_EXPORT SITK_ABI_IMPORT
  #endif
#else
  // Don't hide symbols in the static library in case
  // -fvisibility=hidden is used
  #define SITKElastix_EXPORT
#endif

#define SITKElastix_HIDDEN SITK_ABI_HIDDEN

#endif // sitkElastixTransformixWrappers_h


text:
#include "config.h"
#include "core/css/StyleMedia.h"

#include "core/css/MediaList.h"
#include "core/css/MediaQueryEvaluator.h"
#include "core/dom/Document.h"
#include "core/frame/FrameView.h"
#include "core/frame/LocalFrame.h"

namespace blink {

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

AtomicString StyleMedia::type() const
{
    FrameView* view = m_frame ? m_frame->view() : nullptr;
    if (view)
        return view->mediaType();

    return nullAtom;
}

bool StyleMedia::matchMedium(const String& query) const
{
    if (!m_frame)
        return false;

    Document* document = m_frame->document();
    ASSERT(document);
    Element* documentElement = document->documentElement();
    if (!documentElement)
        return false;

    RefPtrWillBeRawPtr<MediaQuerySet> media = MediaQuerySet::create();
    if (!media->set(query))
        return false;

    MediaQueryEvaluator screenEval(m_frame);
    return screenEval.eval(media.get());
}

DEFINE_TRACE(StyleMedia)
{
    DOMWindowProperty::trace(visitor);
}

} // namespace blink


text:
.. CritOpS documentation master file, created by
   sphinx-quickstart on Tue Apr 11 17:09:52 2017.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

Welcome to CritOpS's documentation!
===================================

.. toctree::
   :maxdepth: 2
   :caption: Contents:

   intro
       external_iteration
   iterator
   readinputs
   outputs

Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`


text:
class Editor::SearchFeature < ParagraphFeature #:nodoc:all
  include ActionView::Helpers::FormOptionsHelper

  feature :search_page_search_box, :default_feature => <<-FEATURE
    <cms:search_box>
      Search: <cms:q/> <cms:category/>
      <cms:submit/>
    </cms:search_box>
  FEATURE

  def search_page_search_box_feature(data)
    webiva_custom_feature(:search_page_search_box,data) do |c|
      add_search_box_feature(c, data)
    end
  end

  feature :search_page_search_results, :default_feature => <<-FEATURE
    <cms:search>
      <cms:results>
        <cms:result>

<cms:result_link><cms:title/></cms:result_link>

            <cms:excerpt>
<cms:value/>
</cms:excerpt>
            <cms:preview>
<cms:value/>
</cms:preview>
            <cms:display_url/>

        </cms:result>
        <cms:pages/>
      </cms:results>
      <cms:no_results>

          No results found.

      </cms:no_results>
    </cms:search>
  FEATURE

  def search_page_search_results_feature(data)
    webiva_custom_feature(:search_page_search_results,data) do |c|
      add_search_box_feature(c, data)

      c.expansion_tag('search') { |t| data[:searched] }
      c.value_tag('search:total_results') { |t| data[:total_results] }
      c.loop_tag('search:result') { |t| data[:results] }
        add_result_features(c, data, 'search:result')
      c.pagelist_tag('search:results:pages') { |t| data[:pages] }
    end
  end

  def add_search_box_feature(context, data, base='search_box')
    context.define_tag('search_box') do |t|
      t.locals.form = data[:search]
      "<form method='get' action='#{data[:options].search_results_page_url}'>" + t.expand + '</form>'
    end

      context.form_error_tag('search_box:errors')

      context.define_tag('search_box:q') { |t| text_field_tag(:q, t.locals.form.terms, t.attr) }

      context.define_tag('search_box:type') { |t| select_tag(:type, options_for_select(data[:search].content_types_options, t.locals.form.content_type_id), t.attr) }

      context.define_tag('search_box:per_page') do |t|
        options = t.attr['options'] ? t.attr['options'].split(',') : [10, 20, 30, 50]
        opts = t.attr.clone
        opts.delete('options')
        select_tag :per_page, options_for_select(options, t.locals.form.per_page), opts
      end

      context.expansion_tag('search_box:has_categories') { |t| ! data[:search].categories.empty? }
      context.define_tag('search_box:category') { |t| select_tag(:category, options_for_select(data[:search].category_options, t.locals.form.category_id), t.attr) }

      context.define_tag('search_box:published_after') { |t| text_field_tag(:published_after, t.locals.form.published_after, t.attr) }
      context.define_tag('search_box:published_before') { |t| text_field_tag(:published_before, t.locals.form.published_before, t.attr) }

      context.submit_tag('search_box:submit', :default => 'Submit')
  end

  def add_result_features(context, data, base='result')
    context.h_tag(base + ':title') { |t| t.locals.result[:title] }
    context.h_tag(base + ':subtitle') { |t| t.locals.result[:subtitle] }
    context.value_tag(base + ':excerpt') { |t| t.locals.result[:excerpt] }
    context.value_tag(base + ':preview') { |t| t.locals.result[:preview] }
    context.value_tag(base + ':url') { |t| t.locals.result[:url] }
    context.value_tag(base + ':display_url') { |t| t.locals.result[:url] }
    context.link_tag(base + ':result') { |t| t.locals.result[:url] }
  end
end


text:
using namespace std;
using namespace util;

app::app(const string& name)
  : log(name),
  args(name),
  log_level("l", "loglevel", "Log level to use", true, 0, "int", args) {

  }

int app::run(int argc, char** argv) {
  args.parse(argc, argv);

  log.set_level(log_level.getValue());

  log.debug("Starting");

  do_run();

  log.debug("Terminating");

  return EXIT_SUCCESS;
}


text:
<?php namespace DreamFactory\Managed\Services;

use DreamFactory\Managed\Components\GelfMessage;
use DreamFactory\Managed\Enums\AuditLevels;
use DreamFactory\Managed\Enums\ManagedDefaults;
use DreamFactory\Managed\Support\GelfLogger;
use Illuminate\Foundation\Application;
use Illuminate\Http\Request;

/**
 * Contains auditing methods for DFE
 */
class AuditingService
{
    //******************************************************************************
    //* Constants
    //******************************************************************************

    /**
     * @type string
     */
    const DEFAULT_FACILITY = 'dreamfactory-enterprise';

    //******************************************************************************
    //* Members
    //******************************************************************************

    /**
     * @type GelfLogger
     */
    protected $gelfLogger = null;
    /**
     * @type array
     */
    protected $metadata;
    /**
     * @type Application
     */
    protected $app;

    //********************************************************************************
    //* Public Methods
    //********************************************************************************

    /**
     * boot up
     *
     * @param Application $app
     * @param GelfLogger  $logger
     */
    public function __construct($app, GelfLogger $logger = null)
    {
        $this->app = $app;

        $this->setLogger($logger);
    }

    /**
     * @param string $host
     */
    public function setHost($host = GelfLogger::DEFAULT_HOST)
    {
        $this->getLogger()->setHost($host);
    }

    /**
     * @param int $port
     */
    public function setPort($port = GelfLogger::DEFAULT_PORT)
    {
        $this->getLogger()->setPort($port);
    }

    /**
     * Logs API requests to logging system
     *
     * @param string  $instanceId  The id of the sending instance
     * @param Request $request     The request
     * @param array   $sessionData Any session data to log
     * @param int     $level       The level, defaults to INFO
     * @param string  $facility    The facility, used for sorting
     *
     * @return bool
     */
    public function logRequest($instanceId, Request $request, $sessionData = [], $level = AuditLevels::INFO, $facility = self::DEFAULT_FACILITY)
    {
        try {
            $_metadata = array_get($sessionData, 'metadata', []);
            array_forget($sessionData, 'metadata');

            //  Add in stuff for API request logging
            static::log([
                'facility' => $facility,
                'dfe'      => $this->prepareMetadata($instanceId, $request, $_metadata),
                'user'     => $sessionData,
            ],
                $level,
                $request);
        } catch (\Exception $_ex) {
            //  Completely ignore any issues
        }
    }

    /**
     * @param string                   $instanceId
     * @param \Illuminate\Http\Request $request
     * @param array                    $metadata
     *
     * @return array
     */
    protected function prepareMetadata($instanceId, Request $request, array $metadata = [])
    {
        return $this->metadata
            ?: [
                'instance_id'       => $instanceId,
                'instance_owner_id' => array_get($metadata, 'owner-email-address'),
                'cluster_id'        => array_get($metadata, 'cluster-id', $request->server->get('DFE_CLUSTER_ID')),
                'app_server_id'     => array_get($metadata,
                    'app-server-id',
                    $request->server->get('DFE_APP_SERVER_ID')),
                'db_server_id'      => array_get($metadata, 'db-server-id', $request->server->get('DFE_DB_SERVER_ID')),
                'web_server_id'     => array_get($metadata,
                    'web-server-id',
                    $request->server->get('DFE_WEB_SERVER_ID')),
            ];
    }

    /**
     * Logs API requests to logging system
     *
     * @param array      $data    The data to log
     * @param int|string $level   The level, defaults to INFO
     * @param Request    $request The request, if available
     * @param string     $type    Optional type
     *
     * @return bool
     */
    public function log($data = [], $level = AuditLevels::INFO, $request = null, $type = null)
    {
        try {
            $_request = $request ?: Request::createFromGlobals();
            $_data = array_merge(static::_buildBasicEntry($_request), $data);
            $type && $_data['type'] = $type;

            $_message = new GelfMessage($_data);
            $_message->setLevel($level);
            $_message->setShortMessage($_request->getMethod() . ' ' . $_request->getRequestUri());
            $_message->setFullMessage('DFE Audit | ' . implode(', ',
                    $_data['source_ip']) . ' | ' . $_data['request_timestamp']);

            $_result = $this->getLogger()->send($_message);

            logger('audit ' .
                ($_result ? 'success' : 'failure') .
                ': ' .
                json_encode($_message->toArray(), JSON_UNESCAPED_SLASHES));
        } catch (\Exception $_ex) {
            //  Completely ignore any issues
            logger('audit send fail: ' . $_ex->getMessage());
        }
    }

    /**
     * @param Request|\Symfony\Component\HttpFoundation\Request $request
     *
     * @return array
     */
    protected function _buildBasicEntry($request)
    {
        return [
            'request_timestamp' => (double)$request->server->get('REQUEST_TIME_FLOAT', microtime(true)),
            'user_agent'        => $request->headers->get('user-agent', 'None'),
            'source_ip'         => $request->getClientIps(),
            'content_type'      => $request->getContentType(),
            'content_length'    => (int)$request->headers->get('Content-Length', 0),
            'token'             => $request->headers->get('x-dreamfactory-session-token',
                $request->headers->get('x-dreamfactory-access-token',
                    $request->headers->get('authorization', $request->query->get('access_token')))),
            'app_name'          => $request->query->get('app_name',
                $request->headers->get('x-dreamfactory-application-name',
                    $request->headers->get('x-application-name'))),
            'api_key'           => $request->query->get('api_key',
                $request->headers->get(ManagedDefaults::DF_API_KEY)),
            'dfe'               => [],
            'host'              => $request->getHost(),
            'method'            => $request->getMethod(),
            'path_info'         => $request->getPathInfo(),
            'path_translated'   => $request->server->get('PATH_TRANSLATED'),
            'query'             => $request->query->all(),
        ];
    }

    /**
     * @return GelfLogger
     */
    public function getLogger()
    {
        return $this->gelfLogger;
    }

    /**
     * Sets a logger instance on the object
     *
     * @param GelfLogger $logger
     *
     * @return $this
     */
    public function setLogger(GelfLogger $logger = null)
    {
        $this->gelfLogger = $logger ?: new GelfLogger();

        return $this;
    }

    /**
     * @param array $metadata
     *
     * @return $this
     */
    public function setMetadata(array $metadata)
    {
        $this->metadata = [];

        foreach ($metadata as $_key => $_value) {
            $this->metadata[str_replace('-', '_', $_key)] = $_value;
        }

        return $this;
    }
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Avalonia.Remote.Protocol
{
    [AttributeUsage(AttributeTargets.Class)]
    public class AvaloniaRemoteMessageGuidAttribute : Attribute
    {
        public Guid Guid { get; }

        public AvaloniaRemoteMessageGuidAttribute(string guid)
        {
            Guid = Guid.Parse(guid);
        }
    }
}


text:
<?php
/**
 * Typography block support flag.
 *
 * @package WordPress
 * @since 5.6.0
 */

/**
 * Registers the style and typography block attributes for block types that support it.
 *
 * @since 5.6.0
 * @access private
 *
 * @param WP_Block_Type $block_type Block Type.
 */
function wp_register_typography_support( $block_type ) {
	if ( ! property_exists( $block_type, 'supports' ) ) {
		return;
	}

	$typography_supports = _wp_array_get( $block_type->supports, array( 'typography' ), false );
	if ( ! $typography_supports ) {
		return;
	}

	$has_font_family_support     = _wp_array_get( $typography_supports, array( '__experimentalFontFamily' ), false );
	$has_font_size_support       = _wp_array_get( $typography_supports, array( 'fontSize' ), false );
	$has_font_style_support      = _wp_array_get( $typography_supports, array( '__experimentalFontStyle' ), false );
	$has_font_weight_support     = _wp_array_get( $typography_supports, array( '__experimentalFontWeight' ), false );
	$has_letter_spacing_support  = _wp_array_get( $typography_supports, array( '__experimentalLetterSpacing' ), false );
	$has_line_height_support     = _wp_array_get( $typography_supports, array( 'lineHeight' ), false );
	$has_text_decoration_support = _wp_array_get( $typography_supports, array( '__experimentalTextDecoration' ), false );
	$has_text_transform_support  = _wp_array_get( $typography_supports, array( '__experimentalTextTransform' ), false );

	$has_typography_support = $has_font_family_support
		|| $has_font_size_support
		|| $has_font_style_support
		|| $has_font_weight_support
		|| $has_letter_spacing_support
		|| $has_line_height_support
		|| $has_text_decoration_support
		|| $has_text_transform_support;

	if ( ! $block_type->attributes ) {
		$block_type->attributes = array();
	}

	if ( $has_typography_support && ! array_key_exists( 'style', $block_type->attributes ) ) {
		$block_type->attributes['style'] = array(
			'type' => 'object',
		);
	}

	if ( $has_font_size_support && ! array_key_exists( 'fontSize', $block_type->attributes ) ) {
		$block_type->attributes['fontSize'] = array(
			'type' => 'string',
		);
	}
}

/**
 * Adds CSS classes and inline styles for typography features such as font sizes
 * to the incoming attributes array. This will be applied to the block markup in
 * the front-end.
 *
 * @since 5.6.0
 * @access private
 *
 * @param WP_Block_Type $block_type       Block type.
 * @param array         $block_attributes Block attributes.
 * @return array Typography CSS classes and inline styles.
 */
function wp_apply_typography_support( $block_type, $block_attributes ) {
	if ( ! property_exists( $block_type, 'supports' ) ) {
		return array();
	}

	$typography_supports = _wp_array_get( $block_type->supports, array( 'typography' ), false );
	if ( ! $typography_supports ) {
		return array();
	}

	if ( wp_should_skip_block_supports_serialization( $block_type, 'typography' ) ) {
		return array();
	}

	$attributes = array();
	$classes    = array();
	$styles     = array();

	$has_font_family_support     = _wp_array_get( $typography_supports, array( '__experimentalFontFamily' ), false );
	$has_font_size_support       = _wp_array_get( $typography_supports, array( 'fontSize' ), false );
	$has_font_style_support      = _wp_array_get( $typography_supports, array( '__experimentalFontStyle' ), false );
	$has_font_weight_support     = _wp_array_get( $typography_supports, array( '__experimentalFontWeight' ), false );
	$has_letter_spacing_support  = _wp_array_get( $typography_supports, array( '__experimentalLetterSpacing' ), false );
	$has_line_height_support     = _wp_array_get( $typography_supports, array( 'lineHeight' ), false );
	$has_text_decoration_support = _wp_array_get( $typography_supports, array( '__experimentalTextDecoration' ), false );
	$has_text_transform_support  = _wp_array_get( $typography_supports, array( '__experimentalTextTransform' ), false );

	if ( $has_font_size_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontSize' ) ) {
		$has_named_font_size  = array_key_exists( 'fontSize', $block_attributes );
		$has_custom_font_size = isset( $block_attributes['style']['typography']['fontSize'] );

		if ( $has_named_font_size ) {
			$classes[] = sprintf( 'has-%s-font-size', _wp_to_kebab_case( $block_attributes['fontSize'] ) );
		} elseif ( $has_custom_font_size ) {
			$styles[] = sprintf( 'font-size: %s;', $block_attributes['style']['typography']['fontSize'] );
		}
	}

	if ( $has_font_family_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontFamily' ) ) {
		$has_named_font_family  = array_key_exists( 'fontFamily', $block_attributes );
		$has_custom_font_family = isset( $block_attributes['style']['typography']['fontFamily'] );

		if ( $has_named_font_family ) {
			$classes[] = sprintf( 'has-%s-font-family', _wp_to_kebab_case( $block_attributes['fontFamily'] ) );
		} elseif ( $has_custom_font_family ) {
			// Before using classes, the value was serialized as a CSS Custom Property.
			// We don't need this code path when it lands in core.
			$font_family_custom = $block_attributes['style']['typography']['fontFamily'];
			if ( strpos( $font_family_custom, 'var:preset|font-family' ) !== false ) {
				$index_to_splice    = strrpos( $font_family_custom, '|' ) + 1;
				$font_family_slug   = _wp_to_kebab_case( substr( $font_family_custom, $index_to_splice ) );
				$font_family_custom = sprintf( 'var(--wp--preset--font-family--%s)', $font_family_slug );
			}
			$styles[] = sprintf( 'font-family: %s;', $font_family_custom );
		}
	}

	if ( $has_font_style_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontStyle' ) ) {
		$font_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'fontStyle', 'font-style' );
		if ( $font_style ) {
			$styles[] = $font_style;
		}
	}

	if ( $has_font_weight_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'fontWeight' ) ) {
		$font_weight = wp_typography_get_css_variable_inline_style( $block_attributes, 'fontWeight', 'font-weight' );
		if ( $font_weight ) {
			$styles[] = $font_weight;
		}
	}

	if ( $has_line_height_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'lineHeight' ) ) {
		$has_line_height = isset( $block_attributes['style']['typography']['lineHeight'] );
		if ( $has_line_height ) {
			$styles[] = sprintf( 'line-height: %s;', $block_attributes['style']['typography']['lineHeight'] );
		}
	}

	if ( $has_text_decoration_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'textDecoration' ) ) {
		$text_decoration_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'textDecoration', 'text-decoration' );
		if ( $text_decoration_style ) {
			$styles[] = $text_decoration_style;
		}
	}

	if ( $has_text_transform_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'textTransform' ) ) {
		$text_transform_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'textTransform', 'text-transform' );
		if ( $text_transform_style ) {
			$styles[] = $text_transform_style;
		}
	}

	if ( $has_letter_spacing_support && ! wp_should_skip_block_supports_serialization( $block_type, 'typography', 'letterSpacing' ) ) {
		$letter_spacing_style = wp_typography_get_css_variable_inline_style( $block_attributes, 'letterSpacing', 'letter-spacing' );
		if ( $letter_spacing_style ) {
			$styles[] = $letter_spacing_style;
		}
	}

	if ( ! empty( $classes ) ) {
		$attributes['class'] = implode( ' ', $classes );
	}
	if ( ! empty( $styles ) ) {
		$attributes['style'] = implode( ' ', $styles );
	}

	return $attributes;
}

/**
 * Generates an inline style for a typography feature e.g. text decoration,
 * text transform, and font style.
 *
 * @since 5.8.0
 * @access private
 *
 * @param array  $attributes   Block's attributes.
 * @param string $feature      Key for the feature within the typography styles.
 * @param string $css_property Slug for the CSS property the inline style sets.
 * @return string CSS inline style.
 */
function wp_typography_get_css_variable_inline_style( $attributes, $feature, $css_property ) {
	// Retrieve current attribute value or skip if not found.
	$style_value = _wp_array_get( $attributes, array( 'style', 'typography', $feature ), false );
	if ( ! $style_value ) {
		return;
	}

	// If we don't have a preset CSS variable, we'll assume it's a regular CSS value.
	if ( strpos( $style_value, "var:preset|{$css_property}|" ) === false ) {
		return sprintf( '%s:%s;', $css_property, $style_value );
	}

	// We have a preset CSS variable as the style.
	// Get the style value from the string and return CSS style.
	$index_to_splice = strrpos( $style_value, '|' ) + 1;
	$slug            = substr( $style_value, $index_to_splice );

	// Return the actual CSS inline style e.g. `text-decoration:var(--wp--preset--text-decoration--underline);`.
	return sprintf( '%s:var(--wp--preset--%s--%s);', $css_property, $css_property, $slug );
}

// Register the block support.
WP_Block_Supports::get_instance()->register(
	'typography',
	array(
		'register_attribute' => 'wp_register_typography_support',
		'apply'              => 'wp_apply_typography_support',
	)
);