text:
#ifndef AVCODEC_OPT_H
#define AVCODEC_OPT_H

/**
 * @file libavcodec/opt.h
 * AVOptions
 */

#include "libavutil/rational.h"
#include "avcodec.h"

enum AVOptionType{
    FF_OPT_TYPE_FLAGS,
    FF_OPT_TYPE_INT,
    FF_OPT_TYPE_INT64,
    FF_OPT_TYPE_DOUBLE,
    FF_OPT_TYPE_FLOAT,
    FF_OPT_TYPE_STRING,
    FF_OPT_TYPE_RATIONAL,
    FF_OPT_TYPE_BINARY,  ///< offset must point to a pointer immediately followed by an int for the length
    FF_OPT_TYPE_CONST=128,
};

/**
 * AVOption
 */
typedef struct AVOption {
    const char *name;

    /**
     * short English help text
     * @todo What about other languages?
     */
    const char *help;

    /**
     * The offset relative to the context structure where the option
     * value is stored. It should be 0 for named constants.
     */
    int offset;
    enum AVOptionType type;

    /**
     * the default value for scalar options
     */
    double default_val;
    double min;                 ///< minimum valid value for the option
    double max;                 ///< maximum valid value for the option

    int flags;
#define AV_OPT_FLAG_ENCODING_PARAM  1   ///< a generic parameter which can be set by the user for muxing or encoding
#define AV_OPT_FLAG_DECODING_PARAM  2   ///< a generic parameter which can be set by the user for demuxing or decoding
#define AV_OPT_FLAG_METADATA        4   ///< some data extracted or inserted into the file like title, comment, ...
#define AV_OPT_FLAG_AUDIO_PARAM     8
#define AV_OPT_FLAG_VIDEO_PARAM     16
#define AV_OPT_FLAG_SUBTITLE_PARAM  32
//FIXME think about enc-audio, ... style flags

    /**
     * The logical unit to which the option belongs. Non-constant
     * options and corresponding named constants share the same
     * unit. May be NULL.
     */
    const char *unit;
} AVOption;

/**
 * Looks for an option in \p obj. Looks only for the options which
 * have the flags set as specified in \p mask and \p flags (that is,
 * for which it is the case that opt->flags & mask == flags).
 *
 * @param[in] obj a pointer to a struct whose first element is a
 * pointer to an AVClass
 * @param[in] name the name of the option to look for
 * @param[in] unit the unit of the option to look for, or any if NULL
 * @return a pointer to the option found, or NULL if no option
 * has been found
 */
const AVOption *av_find_opt(void *obj, const char *name, const char *unit, int mask, int flags);

#if LIBAVCODEC_VERSION_MAJOR < 53
/**
 * @see av_set_string2()
 */
attribute_deprecated const AVOption *av_set_string(void *obj, const char *name, const char *val);

/**
 * @return a pointer to the AVOption corresponding to the field set or
 * NULL if no matching AVOption exists, or if the value \p val is not
 * valid
 * @see av_set_string3()
 */
attribute_deprecated const AVOption *av_set_string2(void *obj, const char *name, const char *val, int alloc);
#endif

/**
 * Sets the field of obj with the given name to value.
 *
 * @param[in] obj A struct whose first element is a pointer to an
 * AVClass.
 * @param[in] name the name of the field to set
 * @param[in] val The value to set. If the field is not of a string
 * type, then the given string is parsed.
 * SI postfixes and some named scalars are supported.
 * If the field is of a numeric type, it has to be a numeric or named
 * scalar. Behavior with more than one scalar and +- infix operators
 * is undefined.
 * If the field is of a flags type, it has to be a sequence of numeric
 * scalars or named flags separated by '+' or '-'. Prefixing a flag
 * with '+' causes it to be set without affecting the other flags;
 * similarly, '-' unsets a flag.
 * @param[out] o_out if non-NULL put here a pointer to the AVOption
 * found
 * @param alloc when 1 then the old value will be av_freed() and the
 *                     new av_strduped()
 *              when 0 then no av_free() nor av_strdup() will be used
 * @return 0 if the value has been set, an AVERROR* error code if no
 * matching option exists, or if the value \p val is not valid
 */
int av_set_string3(void *obj, const char *name, const char *val, int alloc, const AVOption **o_out);

const AVOption *av_set_double(void *obj, const char *name, double n);
const AVOption *av_set_q(void *obj, const char *name, AVRational n);
const AVOption *av_set_int(void *obj, const char *name, int64_t n);
double av_get_double(void *obj, const char *name, const AVOption **o_out);
AVRational av_get_q(void *obj, const char *name, const AVOption **o_out);
int64_t av_get_int(void *obj, const char *name, const AVOption **o_out);
const char *av_get_string(void *obj, const char *name, const AVOption **o_out, char *buf, int buf_len);
const AVOption *av_next_option(void *obj, const AVOption *last);
int av_opt_show(void *obj, void *av_log_obj);
void av_opt_set_defaults(void *s);
void av_opt_set_defaults2(void *s, int mask, int flags);

#endif /* AVCODEC_OPT_H */


text:
/*
 * UCloudPlayback.h
 */

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import <MediaPlayer/MediaPlayer.h>

@protocol UCloudPlayback;

#pragma mark UCloudPlayback

@protocol UCloudPlayback <NSObject>

- (void)prepareToPlay;
- (void)play;
- (void)pause;
- (void)stop;
- (BOOL)isPlaying;
- (void)shutdown;
- (void)setPauseInBackground:(BOOL)pause;

@property(nonatomic, readonly)  UIView *view;
@property(nonatomic)            NSTimeInterval currentPlaybackTime;
@property(nonatomic, readonly)  NSTimeInterval duration;
@property(nonatomic, readonly)  NSTimeInterval playableDuration;
@property(nonatomic, readonly)  NSInteger bufferingProgress;

@property(nonatomic, readonly)  BOOL isPreparedToPlay;
@property(nonatomic, readonly)  MPMoviePlaybackState playbackState;
@property(nonatomic, readonly)  MPMovieLoadState loadState;

@property(nonatomic, readonly) int64_t numberOfBytesTransferred;

@property(nonatomic) MPMovieControlStyle controlStyle;
@property(nonatomic) MPMovieScalingMode scalingMode;
@property(nonatomic) BOOL shouldAutoplay;

@property (nonatomic) BOOL allowsMediaAirPlay;
@property (nonatomic) BOOL isDanmakuMediaAirPlay;
@property (nonatomic, readonly) BOOL airPlayMediaActive;

- (UIImage *)thumbnailImageAtCurrentTime;

#pragma mark Notifications

#ifdef __cplusplus
#define UCLOUD_EXTERN extern "C" __attribute__((visibility ("default")))
#else
#define UCLOUD_EXTERN extern __attribute__((visibility ("default")))
#endif

UCLOUD_EXTERN NSString *const UCloudPlaybackIsPreparedToPlayDidChangeNotification;

UCLOUD_EXTERN NSString *const UCloudPlayerLoadStateDidChangeNotification;
UCLOUD_EXTERN NSString *const UCloudPlayerPlaybackDidFinishNotification;
UCLOUD_EXTERN NSString *const UCloudPlayerPlaybackStateDidChangeNotification;

UCLOUD_EXTERN NSString *const UCloudPlayerIsAirPlayVideoActiveDidChangeNotification;
UCLOUD_EXTERN NSString *const UCloudPlayerVideoDecoderOpenNotification;
@end

#pragma mark IJKMediaResource

@protocol UCloudMediaSegmentResolver <NSObject>

- (NSString *)urlOfSegment:(int)segmentPosition;

@end

redpajama_set_name: RedPajamaGithub


text:
package com.structurizr.model;

import com.fasterxml.jackson.annotation.JsonIgnore;

import java.util.LinkedHashSet;
import java.util.Optional;
import java.util.Set;

public class Container extends Element {

    private SoftwareSystem parent;
    private String technology;

    private Set<Component> components = new LinkedHashSet<>();

    Container() {
        addTags(Tags.CONTAINER);
    }

    @JsonIgnore
    public SoftwareSystem getParent() {
        return parent;
    }

    void setParent(SoftwareSystem parent) {
        this.parent = parent;
    }

    public String getTechnology() {
        return technology;
    }

    public void setTechnology(String technology) {
        this.technology = technology;
    }

    public Component addComponentOfType(String interfaceType, String implementationType, String description, String technology) {
        Component component = getModel().addComponentOfType(this, interfaceType, implementationType, description);
        component.setTechnology(technology);

        return component;
    }

    public Component addComponent(String name, String description) {
        return getModel().addComponent(this, name, description);
    }

    public Component addComponent(String name, String description, String technology) {
        Component c = getModel().addComponent(this, name, description);
        c.setTechnology(technology);
        return c;
    }

    void add(Component component) {
        if (getComponentWithName(component.getName()) == null) {
            components.add(component);
        }
    }

    public Set<Component> getComponents() {
        return components;
    }

    public Component getComponentWithName(String name) {
        if (name == null) {
            return null;
        }

        Optional<Component> component = components.stream().filter(c -> name.equals(c.getName())).findFirst();

        if (component.isPresent()) {
            return component.get();
        } else {
            return null;
        }
    }

    public Component getComponentOfType(String type) {
        if (type == null) {
            return null;
        }

        Optional<Component> component = components.stream().filter(c -> type.equals(c.getInterfaceType())).findFirst();

        if (component.isPresent()) {
            return component.get();
        } else {
            component = components.stream().filter(c -> type.equals(c.getImplementationType())).findFirst();
            if (component.isPresent()) {
                return component.get();
            } else {
                return null;
            }
        }
    }

    @Override
    public final ElementType getType() {
        return ElementType.Container;
    }

    @Override
    public String getCanonicalName() {
        return getParent().getCanonicalName() + CANONICAL_NAME_SEPARATOR + formatForCanonicalName(getName());
    }

}


text:
<?php

namespace Brickoo\Component\Common\Exception;

use Brickoo\Component\Common\Exception;

/**
 * DirectoryDoesNotExistException
 *
 * Exception thrown if trying to access a directory which does not exist.
 * @author Celestino Diaz <celestino.diaz@gmx.de>
 */
class DirectoryDoesNotExistException extends Exception {

    /**
     * Class constructor.
     * Calls the parent Exception constructor.
     * @param string $directory the directory which does not exists
     * @param null|\Exception $previousException
     */
    public function __construct($directory, \Exception $previousException = null) {
        parent::__construct(sprintf("Directory `%s` does not exists or is not readable.", $directory), 0, $previousException);
    }

}


text:
package com.blazebit.persistence.deltaspike.data.impl;

import org.apache.deltaspike.core.spi.activation.ClassDeactivator;
import org.apache.deltaspike.core.spi.activation.Deactivatable;
import org.apache.deltaspike.partialbean.impl.PartialBeanBindingExtension;

/**
 * @author Moritz Becker
 * @since 1.2.0
 */
public class DeltaspikeExtensionDeactivator implements ClassDeactivator {
    @Override
    public Boolean isActivated(Class<? extends Deactivatable> aClass) {
        // We only deactivate the partial bean binding extension so we can replace the it with our own version which replaces the repository handler
        return !(aClass.equals(PartialBeanBindingExtension.class));
    }
}


text:
var MasonryMixin   = require('react-masonry-mixin');
var PhotosClient   = require('../../Api/PhotosClient');
var PhotosStore    = require('../../Store/PhotosStore');
var PhotoThumbnail = require('./PhotoThumbnail.js');
var React          = require('react');

var masonryOptions = { transitionDuration : 0 };

var PhotoList = React.createClass({
    mixins: [MasonryMixin('boooths', masonryOptions)],

    getState : function () {
        return {
            all_photos                : PhotosStore.getCollection(),
            loading_new_set           : PhotosStore.newSetBeingLoaded(),
            complete_catalogue_loaded : PhotosStore.completeCatalogueLoaded(),
            current_page              : this.state ? this.state.current_page : 1,
            loaded_pages              : this.state ? this.state.loaded_pages : []
        };
    },

    getInitialState : function () {
        return this.getState();
    },

    componentDidMount : function () {
        PhotosStore.addChangeListener(this._onChange);
        PhotosClient.getCollection(this.props.page);

        this.addScrollListener();
    },

    componentWillUnmount : function () {
        PhotosStore.removeChangeListener(this._onChange);
        this.removeScrollListener();
    },

    addScrollListener : function () {
        window.addEventListener('scroll', this.scrollListener);
        window.addEventListener('resize', this.scrollListener);
    },

    removeScrollListener : function () {
        window.removeEventListener('scroll', this.scrollListener);
        window.removeEventListener('resize', this.scrollListener);
    },

    scrollListener : function () {
        var scrolled_height = window.pageYOffset;
        var page_height     = window.innerHeight;
        var body_height     = window.document.body.offsetHeight;
        var bottom_reached  = (scrolled_height + page_height) >= (body_height - 3000);

        if (bottom_reached && this.shouldLoadNextPage()) {
            var next_page = this.state.current_page + 1;
            PhotosClient.getCollection(next_page);

            var loaded_pages = this.state.loaded_pages;
            loaded_pages.push(this.state.current_page);

            this.setState({
                current_page : next_page,
                loaded_pages : loaded_pages
            });
        }
    },

    shouldLoadNextPage : function () {
        var next_page = this.state.current_page + 1;

        return (
            this.state.loaded_pages.indexOf(next_page) === -1
            && !this.state.loading_new_set
            && !this.state.complete_catalogue_loaded
        );
    },

    _onChange : function () {
        this.setState(this.getState());
    },

    render : function () {
        var photos = [];

        this.state.all_photos.map(function (photo) {
            photos.push(<PhotoThumbnail key={photo.id} photo={photo} />);
        })

        return (

                    {photos}

{this.state.loading_new_set
                    ?

                    : ''
                }

{this.state.complete_catalogue_loaded
                    ? ♡
                    : ''
                }

        );
    }
});

module.exports = PhotoList;


text:
package com.tinkerpop.blueprints.impls.sail.impls;

import com.tinkerpop.blueprints.impls.sail.SailGraph;
import org.openrdf.sail.Sail;
import org.openrdf.sail.nativerdf.NativeStore;

import java.io.File;

/**
 * @author Marko A. Rodriguez (http://markorodriguez.com)
 */
public class NativeStoreSailGraph extends SailGraph {

    public NativeStoreSailGraph(final String directory) {
        super(createNativeStore(new File(directory), null));
    }

    public NativeStoreSailGraph(final String directory, final String tripleIndices) {
        super(createNativeStore(new File(directory), tripleIndices));
    }

    private static Sail createNativeStore(final File directory, final String tripleIndices) {
        Sail s = null == tripleIndices ? new NativeStore(directory) : new NativeStore(directory, tripleIndices);
        /*try {
            s.initialize();
        } catch (SailException e) {
            // FIXME: RuntimeExceptions are the root of all evil
            throw new RuntimeException(e);
        }*/
        return s;
    }
}


text:
#pragma once

#include <string>
#include <mraa/aio.h>

namespace upm {
  /**
   * @brief GUVA-S12D UV sensor library
   * @defgroup guvas12d libupm-guvas12d
   * @ingroup seeed analog light eak
   */

  /**
   * @library guvas12d
   * @sensor guvas12d
   * @comname Grove UV Sensor
   * @altname GUVA-S12D UV Sensor
   * @type light
   * @man seeed
   * @con analog
   * @kit eak
   *
   * @brief API for the GUVA-S12D UV Sensor
   *
   * UPM module for the GUVA-S12D UV sensor
   *
   * @image html guvas12d.jpg
   * @snippet guvas12d.cxx Interesting
   */
  class GUVAS12D {
  public:
    /**
     * GUVA-S12D UV sensor constructor
     *
     * @param pin Analog pin to use
     */
    GUVAS12D(int pin);
    /**
     * GUVAS12D destructor
     */
    ~GUVAS12D();
    /**
     * Gets the average voltage value from the sensor
     *
     * @param aref Reference voltage in use (usually 5.0 V or 3.3 V)
     * @param samples Number of samples to average over
     * @return Average voltage reading
     */
    float value(float aref, unsigned int samples);

  private:
    mraa_aio_context m_aio;
  };
}


text:
require 'json'
require './api/gateways/ripple_rest_gateway'
require './api/services/transaction_service'
require './api/services/user_service'

class ConfirmationService

  # this will start a new thread which will periodically retrieve pending
  # transactions from the DB and attempt to validate them
  def start
    @service_thread = Thread.new {

      gateway = RippleRestGateway.new
      transaction_service = TransactionService.new
      user_service = UserService.new

      while true
        pending_transactions = transaction_service.get_pending_transactions

        pending_transactions.each do |transaction|

          confirmation_url = transaction.confirmation_url

          begin
            result = gateway.confirm_transaction confirmation_url
          rescue IdentityError => e
            LOGGER.error "Error confirming transaction || Error: #{e.message}"
          end

          begin
            transaction_service.confirm_transaction transaction, result
            user = user_service.get_user transaction.user_id.to_s
            user_service.update_block_status user, result[:status]
          rescue Exception => e
            LOGGER.error "Error updating transaction info on database || Error: #{e.message}"
          end if result[:status] == 'validated'

        end

        sleep 5.0

      end

    }
  end

end


text:
/**
 * This module provides functions used in templates to generate supported DOM
 * nodes.
 *
 * The idea here is to provide an abstraction over DOM construction so
 * we can detect whether we are in a browser or elsewhere and adjust to
 * suite.
 */
import { Record } from '@quenk/noni/lib/data/record';
import { Type } from '@quenk/noni/lib/data/type';
/**
 * WMLDOMAttrs is a record of attributes bound for a WMLDOMElement.
 */
export interface WMLDOMAttrs extends Record<string | number | Function> {
}
/**
 * WMLNodeList implementation.
 * @private
 */
export declare class WMLNodeList implements NodeListOf<WMLDOMNode> {
    [index: number]: WMLDOMNode;
    length: number;
    item(): WMLDOMNode;
    forEach(): void;
}
/**
 * WMLDOMNode implements the properties and methods of the DOM Node interface to
 * allow a fake DOM to be built in server side code.
 *
 * Most of the methods and properties cannot be relied on and should not be
 * used.
 */
export declare class WMLDOMNode implements Node {
    nodeName: string;
    nodeType: number;
    constructor(nodeName: string, nodeType: number);
    readonly ATTRIBUTE_NODE = -1;
    readonly CDATA_SECTION_NODE = -1;
    readonly COMMENT_NODE = -1;
    readonly DOCUMENT_FRAGMENT_NODE = -1;
    readonly DOCUMENT_NODE = -1;
    readonly DOCUMENT_POSITION_CONTAINED_BY = -1;
    readonly DOCUMENT_POSITION_CONTAINS = -1;
    readonly DOCUMENT_POSITION_DISCONNECTED = -1;
    readonly DOCUMENT_POSITION_FOLLOWING = -1;
    readonly DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC = -1;
    readonly DOCUMENT_POSITION_PRECEDING = -1;
    readonly DOCUMENT_TYPE_NODE = -1;
    readonly ELEMENT_NODE = -1;
    readonly ENTITY_NODE = -1;
    readonly ENTITY_REFERENCE_NODE = -1;
    readonly NOTATION_NODE = -1;
    readonly PROCESSING_INSTRUCTION_NODE = -1;
    readonly TEXT_NODE = -1;
    baseURI: string;
    childNodes: WMLNodeList;
    firstChild: null;
    isConnected: boolean;
    lastChild: null;
    namespaceURI: null;
    nextSibling: null;
    nodeValue: null;
    ownerDocument: null;
    parentElement: null;
    parentNode: null;
    previousSibling: null;
    get textContent(): string;
    addEventListener(): void;
    dispatchEvent(): boolean;
    removeEventListener(): void;
    appendChild<T extends Node>(newChild: T): T;
    cloneNode(): this;
    compareDocumentPosition(): number;
    contains(): boolean;
    getRootNode(): Node;
    hasChildNodes(): boolean;
    insertBefore<T extends Node>(newChild: T): T;
    isDefaultNamespace(): boolean;
    isEqualNode(): boolean;
    isSameNode(): boolean;
    lookupNamespaceURI(): null;
    lookupPrefix(): null;
    normalize(): void;
    remove(): void;
    before(): void;
    after(): void;
    replaceWith(): void;
    removeChild<T extends Node>(oldChild: T): T;
    replaceChild<T extends Node>(_: Node, oldChild: T): T;
}
/**
 * WMLDOMText is used to represent Text nodes on the server side.
 * @private
 */
export declare class WMLDOMText extends WMLDOMNode {
    value: string;
    escape: boolean;
    constructor(value: string, escape?: boolean);
    get textContent(): string;
}
/**
 * WMLDOMElement is used to represent Element nodes on the server side.
 * @private
 */
export declare class WMLDOMElement extends WMLDOMNode {
    tag: string;
    attrs: WMLDOMAttrs;
    children: Node[];
    constructor(tag: string, attrs: WMLDOMAttrs, children?: Node[]);
    get innerHTML(): string;
    get outerHTML(): string;
    setAttribute(key: string, value: Type): void;
    appendChild<T extends Node>(newChild: T): T;
}
/**
 * isBrowser is set to true if we detect a window and document global variable.
 */
export declare const isBrowser: boolean;
/**
 * escapeAttrs escapes each key value pair of a WMLDOMAttrs.
 */
export declare const escapeAttrs: (attrs: WMLDOMAttrs) => Record<string | (<A, B>(a: A) => B)>;
/**
 * escapeAttrValue for safe browser display.
 */
export declare const escapeAttrValue: (value: string) => string;
/**
 * escapeHTML for safe browser display.
 */
export declare const escapeHTML: (value: string) => string;
/**
 * createTextNode wrapper.
 */
export declare const createTextNode: (txt: Type) => Node;
/**
 * createUnsafeNode allows raw strings to be output without escaping.
 *
 * THIS MUST ONLY BE USED IF YOU ARE 100% SURE THE STRING IS SAFE TO OUTPUT!
 */
export declare const createUnsafeNode: (txt: Type) => Node;
export { createTextNode as text, createUnsafeNode as unsafe };
/**
 * createElement wrapper.
 */
export declare const createElement: (tag: string, attrs?: WMLDOMAttrs, children?: Node[]) => Element;


text:
from AlgorithmImports import *
from System.Collections.Generic import List

### <summary>
### Demonstration of using coarse and fine universe selection together to filter down a smaller universe of stocks.
### </summary>
### <meta name="tag" content="using data" />
### <meta name="tag" content="universes" />
### <meta name="tag" content="coarse universes" />
### <meta name="tag" content="fine universes" />
class CoarseFineFundamentalComboAlgorithm(QCAlgorithm):

    def Initialize(self):
        '''Initialise the data and resolution required, as well as the cash and start-end dates for your algorithm. All algorithms must initialized.'''

        self.SetStartDate(2014,1,1)  #Set Start Date
        self.SetEndDate(2015,1,1)    #Set End Date
        self.SetCash(50000)            #Set Strategy Cash

        # what resolution should the data *added* to the universe be?
        self.UniverseSettings.Resolution = Resolution.Daily

        # this add universe method accepts two parameters:
        # - coarse selection function: accepts an IEnumerable<CoarseFundamental> and returns an IEnumerable<Symbol>
        # - fine selection function: accepts an IEnumerable<FineFundamental> and returns an IEnumerable<Symbol>
        self.AddUniverse(self.CoarseSelectionFunction, self.FineSelectionFunction)

        self.__numberOfSymbols = 5
        self.__numberOfSymbolsFine = 2
        self._changes = None

    # sort the data by daily dollar volume and take the top 'NumberOfSymbols'
    def CoarseSelectionFunction(self, coarse):
        # sort descending by daily dollar volume
        sortedByDollarVolume = sorted(coarse, key=lambda x: x.DollarVolume, reverse=True)

        # return the symbol objects of the top entries from our sorted collection
        return [ x.Symbol for x in sortedByDollarVolume[:self.__numberOfSymbols] ]

    # sort the data by P/E ratio and take the top 'NumberOfSymbolsFine'
    def FineSelectionFunction(self, fine):
        # sort descending by P/E ratio
        sortedByPeRatio = sorted(fine, key=lambda x: x.ValuationRatios.PERatio, reverse=True)

        # take the top entries from our sorted collection
        return [ x.Symbol for x in sortedByPeRatio[:self.__numberOfSymbolsFine] ]

    def OnData(self, data):
        # if we have no changes, do nothing
        if self._changes is None: return

        # liquidate removed securities
        for security in self._changes.RemovedSecurities:
            if security.Invested:
                self.Liquidate(security.Symbol)

        # we want 20% allocation in each security in our universe
        for security in self._changes.AddedSecurities:
            self.SetHoldings(security.Symbol, 0.2)

        self._changes = None

    # this event fires whenever we have changes to our universe
    def OnSecuritiesChanged(self, changes):
        self._changes = changes


text:
Plottet Eyetracking-Daten, wobei Blicksprünge zu Beschleunigung führen.

![image](screenshot.png)

---

Copyright © 2014 Timo Hausmann | Lizensiert unter der [MIT License](http://opensource.org/licenses/mit-license.php)


text:
using System.Windows;

namespace XElement.SDM.UI.Win32
{
#region not unit-tested
    public partial class AboutWindow : Window
    {
        public AboutWindow()
        {
            InitializeComponent();
        }
    }
#endregion
}


text:
---
uid: SolidEdgeAssembly.AssemblyDocument.CreateReference(SolidEdgeAssembly.Occurrence,System.Object)
summary:
remarks:
syntax:
    parameters:
    - id: Entity
      description: Specifies the matrix that describes where the Reference object is to be located in the assembly.
    - id: Occurrence
      description: Specifies the object for which a reference is to be created.
example: [*content]
---
[!code-vb[Main](..\snippets\SolidEdgeAssembly.AssemblyDocument.CreateReference.bas]


text:
using Chloe.Extensions;
using Chloe.QueryExpressions;
using Chloe.Reflection;
using System.Linq.Expressions;
using System.Reflection;

namespace Chloe.Query
{
    class IncludableQuery<TEntity, TNavigation> : Query<TEntity>, IIncludableQuery<TEntity, TNavigation>
    {
        public IncludableQuery(QueryExpression prevExpression, LambdaExpression navigationPath) : base(BuildIncludeExpression(prevExpression, navigationPath))
        {

        }
        IncludableQuery(QueryExpression exp) : base(exp)
        {

        }

        static List<MemberExpression> ExtractMemberAccessChain(LambdaExpression navigationPath)
        {
            List<MemberExpression> members = new List<MemberExpression>();

            Expression exp = navigationPath.Body;
            while (exp != null && exp.NodeType == ExpressionType.MemberAccess)
            {
                MemberExpression member = exp as MemberExpression;
                members.Add(member);
                exp = member.Expression;
            }

            if (exp != navigationPath.Parameters[0] || members.Count == 0)
            {
                throw new ArgumentException($"Not support inclue navigation path {navigationPath.Body.ToString()}");
            }

            members.Reverse();
            return members;
        }
        static QueryExpression BuildIncludeExpression(QueryExpression prevExpression, LambdaExpression navigationPath)
        {
            List<MemberExpression> memberExps = ExtractMemberAccessChain(navigationPath);

            NavigationNode startNavigation = null;
            NavigationNode lastNavigation = null;
            for (int i = 0; i < memberExps.Count; i++)
            {
                PropertyInfo member = memberExps[i].Member as PropertyInfo;

                DbContextProvider dbContextProvider = prevExpression.GetRootDbContextProvider() as DbContextProvider;
                NavigationNode navigation = InitNavigationNode(member, dbContextProvider);

                if (startNavigation == null)
                {
                    startNavigation = navigation;
                    lastNavigation = navigation;
                    continue;
                }

                lastNavigation.Next = navigation;
                lastNavigation = navigation;
            }

            IncludeExpression ret = new IncludeExpression(typeof(TEntity), prevExpression, startNavigation);

            return ret;
        }
        static NavigationNode InitNavigationNode(PropertyInfo member, DbContextProvider dbContextProvider)
        {
            NavigationNode navigation = new NavigationNode(member);

            Type elementType = member.PropertyType;
            if (member.PropertyType.IsGenericCollection())
            {
                elementType = member.PropertyType.GetGenericArguments()[0];
            }

            List<LambdaExpression> filters = dbContextProvider.QueryFilters.FindValue(elementType);
            if (filters != null)
                navigation.ContextFilters.AppendRange(filters);

            return navigation;
        }

        IncludeExpression BuildThenIncludeExpression(LambdaExpression navigationPath)
        {
            IncludeExpression prevIncludeExpression = this.QueryExpression as IncludeExpression;
            NavigationNode startNavigation = prevIncludeExpression.NavigationNode.Clone();
            NavigationNode lastNavigation = startNavigation.GetLast();

            List<MemberExpression> memberExps = ExtractMemberAccessChain(navigationPath);

            for (int i = 0; i < memberExps.Count; i++)
            {
                PropertyInfo member = memberExps[i].Member as PropertyInfo;

                DbContextProvider dbContextProvider = this.QueryExpression.GetRootDbContextProvider() as DbContextProvider;
                NavigationNode navigation = InitNavigationNode(member, dbContextProvider);

                lastNavigation.Next = navigation;
                lastNavigation = navigation;
            }

            IncludeExpression includeExpression = new IncludeExpression(typeof(TEntity), prevIncludeExpression.PrevExpression, startNavigation);
            return includeExpression;
        }

        public IIncludableQuery<TEntity, TProperty> ThenInclude<TProperty>(Expression<Func<TNavigation, TProperty>> navigationPath)
        {
            IncludeExpression includeExpression = this.BuildThenIncludeExpression(navigationPath);
            return new IncludableQuery<TEntity, TProperty>(includeExpression);
        }

        public IIncludableQuery<TEntity, TCollectionItem> ThenIncludeMany<TCollectionItem>(Expression<Func<TNavigation, IEnumerable<TCollectionItem>>> navigationPath)
        {
            IncludeExpression includeExpression = this.BuildThenIncludeExpression(navigationPath);
            return new IncludableQuery<TEntity, TCollectionItem>(includeExpression);
        }

        public IIncludableQuery<TEntity, TNavigation> Filter(Expression<Func<TNavigation, bool>> predicate)
        {
            IncludeExpression prevIncludeExpression = this.QueryExpression as IncludeExpression;
            NavigationNode startNavigation = prevIncludeExpression.NavigationNode.Clone();
            NavigationNode lastNavigation = startNavigation.GetLast();
            lastNavigation.Condition = lastNavigation.Condition.AndAlso(predicate);

            IncludeExpression includeExpression = new IncludeExpression(typeof(TEntity), prevIncludeExpression.PrevExpression, startNavigation);

            return new IncludableQuery<TEntity, TNavigation>(includeExpression);
        }

        public IIncludableQuery<TEntity, TNavigation> AndWhere(Expression<Func<TNavigation, bool>> predicate)
        {
            return this.Filter(predicate);
        }
    }
}


text:
!function ($, jQuery, document) {
    'use strict';

    app.module.config(function ($stateProvider, $urlRouterProvider) {
        $stateProvider
            .state('dashboard', getState('dashboard', '/'), false)
            .state('about', getStaticState('about', '/about'), false)
            .state('testPage', getState('testPage', '/testPage'), false)
            .state('testFileUpload', getState('testFileUpload', '/testFileUpload'), false)
            .state('costCenters', getState('costCenterList', '/costCenters'), false)
            .state('costCenters.detail', getState('costCenterDetail', '/:costCenterId'), false)
            .state('employees', getState('employeeList', '/employees?currentPage&itemsPerPage&sortPredicate&sortReverse&searchFilter', true, {
                currentPage: {
                    value: '0',
                    squash: true
                },
                itemsPerPage: {
                    value: '10',
                    squash: true
                },
                sortPredicate: {
                    value: '',
                    squash: true
                },
                sortReverse: {
                    value: '',
                    squash: true
                },
                searchFilter: {
                    value: '',
                    squash: true
                }
            }))
            .state('employees.detail', getState('employeeDetail', '/:employeeId?currentTab', true, {
                currentTab: {
                    value: '0',
                    squash: true
                }
            }))
        $urlRouterProvider.otherwise('/');
    });

    function getState(name, url, useFormFactor, params) {
        var templateUrl = 'app/' + name + '/' + name + '.html';
        if (useFormFactor && (window.innerWidth < window.innerHeight))
        {
            templateUrl = 'app/' + name + '/' + name + '-portrait.html';
        }

        return {
            url: url || '/' + name,
            params: params,
            views: {
                'main@': {
                    templateUrl: templateUrl,
                    controller: name + 'Controller',
                    //controllerAs: name
                }
            }
        };
    }

    function getStaticState(name, url) {
        return {
            url: url || '/' + name,
            views: {
                'main@': {
                    templateUrl: 'app/' + name + '/' + name + '.html',
                }
            }
        };
    }
}();


text:
'use strict';

const globalHooks = require('../../../hooks');
const hooks       = require('feathers-hooks-common');
const auth        = require('feathers-authentication').hooks;

const restrictToRequestUser = require('./restrict-to-request-user');
const preProcess = require('./process');

const populateFinancerUser = hooks.populate('financerUser', {
    service : '/apimock/users',
    field   : 'financerUserId'
});
const populateSupervisorUser = hooks.populate('supervisorUser', {
    service : '/apimock/users',
    field   : 'supervisorUserId'
});
const populateHarborUser = hooks.populate('harborUser', {
    service : '/apimock/users',
    field   : 'harborUserId'
});

const populateTraderUser = hooks.populate('traderUser', {
    service : '/apimock/users',
    field   : 'traderUserId'
});
const populateTraderAccountantUser = hooks.populate('traderAccountantUser', {
    service : '/apimock/users',
    field   : 'traderAccountantUserId'
});

const populateFundProviderUser = hooks.populate('fundProviderUser', {
    service : '/apimock/users',
    field   : 'fundProviderUserId'
});
const populateFundProviderAccountantUser = hooks.populate('fundProviderAccountantUser', {
    service : '/apimock/users',
    field   : 'fundProviderAccountantUserId'
});

exports.before = {
    all    : [
        auth.verifyToken(),
        auth.populateUser(),
        auth.restrictToAuthenticated(),
        globalHooks.logHook()
    ],
    find   : [],
    get    : [],
    create : [preProcess()],
    update : [],
    patch  : [],
    remove : []
};

exports.after = {
    all    : [
        populateFinancerUser,
        populateTraderUser,
        populateTraderAccountantUser,
        populateHarborUser,
        populateSupervisorUser,
        populateFundProviderUser,
        populateFundProviderAccountantUser
    ],
    find   : [],
    get    : [],
    create : [],
    update : [],
    patch  : [],
    remove : []
};


text:
class ChromeDeviceClient : device::DeviceClient {
 public:
  ChromeDeviceClient();
  virtual ~ChromeDeviceClient();

  // device::DeviceClient implementation
  virtual device::UsbService* GetUsbService() OVERRIDE;
  virtual device::HidService* GetHidService() OVERRIDE;

 private:
  DISALLOW_COPY_AND_ASSIGN(ChromeDeviceClient);
};

#endif  // CHROME_BROWSER_CHROME_DEVICE_CLIENT_H_


text:
import demistomock as demisto
from CommonServerPython import *
''' IMPORTS '''
import base64
import re
import requests
import urllib3

# disable insecure warnings
urllib3.disable_warnings()

''' GLOBALS '''
handle_proxy()
params = demisto.params()
server = params["server"].rstrip('/')
prefix = server + "/awakeapi/v1"
verify = not params.get('unsecure', False)
credentials = params["credentials"]
identifier = credentials["identifier"]
password = credentials["password"]
suspicious_threshold = params["suspicious_threshold"]
malicious_threshold = params["malicious_threshold"]
authTokenRequest = {
    "loginUsername": identifier,
    "loginPassword": password
}
authTokenResponse = requests.post(prefix + "/authtoken", json=authTokenRequest, verify=verify)
authToken = authTokenResponse.json()["token"]["value"]
headers = {
    "Authentication": ("access " + authToken)
}
command = demisto.command()
args = demisto.args()
request = {}

''' HELPERS '''

# Convenient utility to marshal command arguments into the request body

def slurp(fields):
    for field in fields:
        if field in args:
            request[field] = args[field]

# Render a subset of the fields of the Contents as a markdown table

def displayTable(contents, fields):
    # We don't use a set() because we want to preserve field order
    #
    # The fields are ordered to put the most relevant information first
    presentFields = []  # type: List[str]
    # Omit table columns that are all empty
    for content in contents:
        for field in fields:
            if field in content and content[field] and field not in presentFields:
                presentFields.append(field)
    line0 = "| "
    line1 = "| "
    for field in presentFields:
        # Translate camel-case field names to title-case space-separated words
        tokens = re.findall("[a-zA-Z][A-Z]*[^A-Z]*", field)
        name = " ".join(map(lambda token: token.title(), tokens))
        line0 += name + " | "
        line1 += "--- | "
    line0 += "\n"
    line1 += "\n"
    body = ""
    for content in contents:
        body += "| "
        for field in presentFields:
            if field in content:
                value = json.dumps(content[field])
            else:
                value = ""
            body += value + " | "
        body += "\n"
    if presentFields:
        return (line0 + line1 + body)
    else:
        return "Empty results"

def returnResults(contents, outerKey, innerKey, humanReadable, dbotScore, genericContext=None):
    machineReadable = {
        "AwakeSecurity": contents,
    }
    entryContext = {
        ("AwakeSecurity." + outerKey + "(val." + innerKey + "== obj." + innerKey + ")"): contents,
    }
    if dbotScore is not None:
        machineReadable["DBotScore"] = dbotScore
        entryContext["DBotScore"] = dbotScore

    if genericContext:
        entryContext.update(genericContext)

    demisto.results({
        "Type": entryTypes['note'],
        "ContentsFormat": formats['json'],
        "Contents": json.dumps(machineReadable),
        "HumanReadable": humanReadable,
        "ReadableContentsFormat": formats['markdown'],
        "EntryContext": entryContext,
    })

def toDBotScore(indicator_type, percentile, lookup_key):
    if percentile <= suspicious_threshold:
        score = 1
    elif percentile <= malicious_threshold:
        # Something doing something out of the ordinary
        score = 2
    else:
        # Probably bad or at least not compliant with
        # company policy.
        score = 3
    return {
        "Vendor": "Awake Security",
        "Type": indicator_type,
        "Indicator": lookup_key,
        "Score": score,
        "Reliability": demisto.params().get('integrationReliability')
    }

''' COMMANDS '''

def lookup(lookup_type, lookup_key):
    path = "/lookup/" + lookup_type
    request["lookup_key"] = lookup_key
    # default value of lookback_minutes is 480
    if "lookback_minutes" not in args:
        args["lookback_minutes"] = 480
    request["lookback_minutes"] = int(args["lookback_minutes"])
    response = requests.post(prefix + path, json=request, headers=headers, verify=verify)
    if response.status_code < 200 or response.status_code >= 300:
        return_error(f'Request Failed.\nStatus code: {str(response.status_code)}'
                     f' with body {str(response.content)} with headers {response.headers}')

    return response.json()

def lookupDevice():
    lookup_key = args["device"]
    contents = lookup("device", lookup_key)
    humanReadableFields = [
        "deviceScore",
        "deviceName",
        "deviceType",
        "os",
        "osVersion",
        "commonEmail",
        "commonUsername",
        "tags",
        "recentIP",
        "activeIP",
        "nSimilarDevices",
        "ipCount",
        "applicationCount",
        # "protocols",
        "firstSeen",
        "lastSeen",
    ]
    if "deviceScore" in contents:
        dbotScore = toDBotScore("device", contents["deviceScore"], lookup_key)
    else:
        dbotScore = {
            "Vendor": "Awake Security",
            "Type": 'device',
            "Indicator": lookup_key,
            "Score": 0,
            "Reliability": demisto.params().get('integrationReliability')
        }
    humanReadable = displayTable([contents], humanReadableFields)
    contents["device"] = lookup_key
    returnResults(contents, "Devices", "device", humanReadable, dbotScore)

def lookupDomain():
    lookup_key = args["domain"]
    contents = lookup("domain", lookup_key)
    humanReadableFields = [
        "notability",
        "isAlexaTopOneMillion",
        "isDGA",
        "intelSources",
        "numAssociatedDevices",
        "numAssociatedActivities",
        "approxBytesTransferred",
        "protocols",
        "firstSeen",
        "lastSeen",
    ]
    if "notability" in contents:
        dbotScore = toDBotScore("domain", contents["notability"], lookup_key)
    else:
        dbotScore = {
            "Vendor": "Awake Security",
            "Type": 'domain',
            "Indicator": lookup_key,
            "Score": 0,
            "Reliability": demisto.params().get('integrationReliability')
        }
    humanReadable = displayTable([contents], humanReadableFields)
    contents["domain"] = lookup_key
    genericContext = {"Domain": {"Name": lookup_key}}
    returnResults(contents, "Domains", "domain", humanReadable, dbotScore, genericContext)

def lookupEmail():
    lookup_key = args["email"]
    contents = lookup("email", lookup_key)
    humanReadableFields = [
        "notabilityPercentile",
        "deviceName",
        "os",
        "deviceType",
        "application",
        "numberSimilarDevices",
        "numberSessions",
        "firstSeen",
        "lastSeen",
        "duration",
        "deviceId",
    ]
    if "notabilityPercentile" in contents:
        dbotScore = toDBotScore("email", contents["notabilityPercentile"], lookup_key)
    else:
        dbotScore = {
            "Vendor": "Awake Security",
            "Type": 'email',
            "Indicator": lookup_key,
            "Score": 0,
            "Reliability": demisto.params().get('integrationReliability')
        }
    humanReadable = displayTable(contents, humanReadableFields)
    for content in contents:
        content["email"] = lookup_key
    returnResults(contents, "Emails", "email", humanReadable, dbotScore)

def lookupIp():
    lookup_key = args["ip"]
    contents = lookup("ip", lookup_key)
    humanReadableFields = [
        "deviceCount",
        "activityCount",
        "ipFirstSeen",
        "ipLastSeen",
    ]
    dbotScore = {
        "Vendor": "Awake Security",
        "Type": 'ip',
        "Indicator": lookup_key,
        "Score": 0,
        "Reliability": demisto.params().get('integrationReliability')
    }
    # Note: No DBotScore for IP addresses as we do not score them.
    # Our product scores devices rather than IP addresses.
    humanReadable = displayTable([contents], humanReadableFields)
    contents["ip"] = lookup_key
    genericContext = {"IP": {"Address": lookup_key}}
    returnResults(contents, "IPs", "ip", humanReadable, dbotScore, genericContext)

def query(lookup_type):
    # Default to an empty query if unset
    request["queryExpression"] = ""
    slurp(["queryExpression", "startTime", "endTime"])
    nameMappings = [
        ("ipAddress", "device.ip == {}"),
        ("deviceName", "device.name like r/{}/"),
        ("domainName", "domain.name like r/{}/"),
        ("protocol", "activity.protocol == \"{}\""),
        ("tags", "\"{}\" in device.tags"),
    ]
    for (name, mapping) in nameMappings:
        if name in args:
            if "queryExpression" in request and request["queryExpression"]:
                request["queryExpression"] = request["queryExpression"] + " && " + mapping.format(args[name])
            else:
                request["queryExpression"] = mapping.format(args[name])
    path = "/query/" + lookup_type
    response = requests.post(prefix + path, json=request, headers=headers, verify=verify)
    if response.status_code < 200 or response.status_code >= 300:
        return_error(f'Request Failed.\nStatus code: {str(response.status_code)}'
                     f' with body {str(response.content)} with headers {response.headers}')
    contents = response.json()
    return request["queryExpression"], contents

def queryActivities():
    q, contents = query("activities")
    humanReadableFields = [
        "sourceIP",
        "sourceHost",
        "sourcePort",
        "destIP",
        "destHost",
        "destPort",
        "activityDeviceName",
        "activityStart",
        "activityEnd",
        "protocols",
    ]
    humanReadable = displayTable(contents, humanReadableFields)
    for content in contents:
        content["query"] = q
    returnResults(contents, "Activities", "activityId", humanReadable, None)

def queryDevices():
    q, contents = query("devices")
    humanReadableFields = [
        "notabilityPercentile",
        "deviceName",
        "os",
        "deviceType",
        "application",
        "numberSimilarDevices",
        "numberSessions",
        "firstSeen",
        "lastSeen",
        "duration",
        "deviceId",
    ]
    humanReadable = displayTable(contents, humanReadableFields)
    for content in contents:
        content["query"] = q
    returnResults(contents, "Devices", "deviceId", humanReadable, None)

def queryDomains():
    q, contents = query("domains")
    humanReadableFields = [
        "name",
        "notability",
        "created",
        "lastUpdated",
        "expiration",
        "registrantOrg",
        "registrantCountry",
        "registrarName",
        "nameservers",
        "deviceCount",
        "intelCount",
        "lastSeen",
    ]
    humanReadable = displayTable(contents, humanReadableFields)
    for content in contents:
        content["query"] = q
    returnResults(contents, "Domains", "name", humanReadable, None)

def pcapDownload():
    slurp(["monitoringPointID"])
    session = {}
    for field in ["hostA", "hostB", "startTimeRFC3339Nano", "endTimeRFC3339Nano"]:
        if field in args:
            session[field] = args[field]
    if "startTimeRFC3339Nano" in args:
        session["startTimeRFC3339Nano"] = args["startTime"]
    if "endTimeRFC3339Nano" in args:
        session["endTimeRFC3339Nano"] = args["endTime"]
    for field in ["protocol", "portA", "portB"]:
        if field in args:
            session[field] = int(args[field])
    request["sessions"] = [session]
    path = "/pcap/download"
    response = requests.post(prefix + path, json=request, headers=headers, verify=verify)
    if response.status_code < 200 or response.status_code >= 300:
        return_error(f"Request Failed.\nStatus code: {str(response.status_code)} "
                     f"with body {str(response.content)} with headers {response.headers}")
    b64 = response.json()["pcap"]
    bytes = base64.b64decode(b64)
    demisto.results(fileResult("download.pcap", bytes))

def fetchIncidents():
    threatBehaviorsString = params.get("threat_behaviors") or ""
    threatBehaviors = [threatBehavior.strip() for threatBehavior in threatBehaviorsString.split(",")]
    if threatBehaviors == [""]:
        threatBehaviors = []
    lastRun = demisto.getLastRun()
    formatString = "%Y-%m-%d %H:%M:%S+0000"
    earlyTimeString = "1970-01-01 00:00:00+0000"
    startTimeString = lastRun.get("time") or earlyTimeString
    startTime = datetime.strptime(startTimeString, formatString)
    endTime = datetime.utcnow()
    endTimeString = datetime.strftime(endTime, formatString)
    if timedelta(minutes=int(params['fetch_interval'])) <= endTime - startTime:
        jsonRequest = {
            "startTime": startTimeString,
            "endTime": endTimeString,
            "threatBehaviors": threatBehaviors
        }
        response = requests.post(prefix + "/threat-behavior/matches", json=jsonRequest, headers=headers, verify=verify)
        jsonResponse = response.json()
        matchingThreatBehaviors = jsonResponse.get("matchingThreatBehaviors", [])

        def toIncident(matchingThreatBehavior):
            # Currently the threat behavior API doesn't allow us to retrieve metadata for
            # the behaviors that matched, which is why this incident record is mostly empty
            #
            # However, we can provide the original query that the threat behavior corresponded
            # to plus the date range so that a playbook can feed them back into
            # `awake-query-{devices,activities}` to retrieving the matching devices or
            # activities that triggered the match to the threat behavior.
            return {
                "Name": matchingThreatBehavior["name"],
                "Query": matchingThreatBehavior["query"],
                "StartTime": startTimeString,
                "EndTime": endTimeString,
                "rawJSON": json.dumps(matchingThreatBehavior),
            }
        demisto.incidents(map(toIncident, matchingThreatBehaviors))
        # Don't increase the low-water-mark until we actually find incidents
        #
        # This is a precaution because incidents sometimes appear in an old time
        # bucket after a delay
        if 0 < len(matchingThreatBehaviors):
            lastRun = {"time": endTimeString}
    else:
        demisto.incidents([])
    demisto.setLastRun(lastRun)

''' EXECUTION '''
LOG('command is %s' % (command))

try:
    if command == "test-module":
        # If we got this far we already successfully authenticated against the server
        demisto.results('ok')

    elif command == "fetch-incidents":
        fetchIncidents()

    elif command == "awake-query-devices":
        queryDevices()

    elif command == "awake-query-activities":
        queryActivities()

    elif command == "awake-query-domains":
        queryDomains()

    elif command == "awake-pcap-download":
        pcapDownload()

    elif command == "domain":
        lookupDomain()

    elif command == "email":
        lookupEmail()

    elif command == "ip":
        lookupIp()

    elif command == "device":
        lookupDevice()

except Exception as e:
    if command == "fetch-incidents":
        raise
    LOG(e)
    LOG.print_log()
    return_error(e)


text:
/*
 * @OSF_COPYRIGHT@
 */

#ifndef	_KERN_KERN_TYPES_H_
#define	_KERN_KERN_TYPES_H_

#include <stdint.h>
#include <mach/mach_types.h>
#include <mach/machine/vm_types.h>

#ifdef	KERNEL_PRIVATE

#ifndef	MACH_KERNEL_PRIVATE

struct zone ;

#ifndef __LP64__
struct wait_queue { unsigned int opaque[2]; uintptr_t opaquep[2]; } ;
#else
struct wait_queue { unsigned char opaque[32]; };
#endif

#endif	/* MACH_KERNEL_PRIVATE */

typedef struct zone			*zone_t;
#define		ZONE_NULL			((zone_t) 0)

typedef struct wait_queue		*wait_queue_t;
#define		WAIT_QUEUE_NULL 	((wait_queue_t) 0)
#define 		SIZEOF_WAITQUEUE	sizeof(struct wait_queue)

typedef vm_offset_t			ipc_kobject_t;
#define		IKO_NULL			((ipc_kobject_t) 0)

#endif	/* KERNEL_PRIVATE */

typedef	void *event_t;		/* wait event */
#define		NO_EVENT			((event_t) 0)

typedef uint64_t event64_t;		/* 64 bit wait event */
#define		NO_EVENT64		((event64_t) 0)
#define		CAST_EVENT64_T(a_ptr)	((event64_t)((uintptr_t)(a_ptr)))

/*
 *	Possible wait_result_t values.
 */
typedef int wait_result_t;
#define THREAD_WAITING		-1		/* thread is waiting */
#define THREAD_AWAKENED		0		/* normal wakeup */
#define THREAD_TIMED_OUT	1		/* timeout expired */
#define THREAD_INTERRUPTED	2		/* aborted/interrupted */
#define THREAD_RESTART		3		/* restart operation entirely */
#define THREAD_NOT_WAITING      10              /* thread didn't need to wait */

typedef	void (*thread_continue_t)(void *, wait_result_t);
#define	THREAD_CONTINUE_NULL	((thread_continue_t) 0)

/*
 * Interruptible flag for waits.
 *
 * THREAD_UNINT: Uninterruptible wait
 *   Wait will only end when someone explicitly wakes up the thread, or if the
 *   wait timeout expires.
 *
 *   Use this state if the system as a whole cannot recover from a thread being
 *   interrupted out of the wait.
 *
 * THREAD_INTERRUPTIBLE:
 *    Wait will end if someone explicitly wakes up the thread, the wait timeout
 *    expires,  or the current thread is being terminated.
 *
 *    This value can be used when your operation may not be cleanly restartable
 *    for the current process or thread (i.e. the loss of state would be only visible
 *    to the current client).  Since the thread is exiting anyways, you're willing
 *    to cut the operation short.  The system as a whole must be able to cleanly
 *    deal with the interruption (i.e. remain in a consistent and recoverable state).
 *
 * THREAD_ABORTSAFE:
 *    Wait will end if someone explicitly wakes up the thread, the wait timeout
 *    expires, the current thread is being terminated, if any signal arrives for
 *    the task, or thread_abort_safely() is called on the thread.
 *
 *    Using this value means that you are willing to be interrupted in the face
 *    of any user signal, and safely rewind the thread back to the user/kernel
 *    boundary.  Many syscalls will try to restart the operation they were performing
 *    after the signal has been handled.
 *
 *    You must provide this value for any unbounded wait - otherwise you will
 *    pend user signals forever.
 *
 * Thread interrupt mask:
 *
 *   The current maximum interruptible state for the thread, as set by
 *   thread_interrupt_level(), will limit the conditions that will cause a wake.
 *   This is useful for code that can't be interrupted to set before calling code
 *   that doesn't know that.
 *
 * Thread termination vs safe abort:
 *
 *    Termination abort: thread_abort(), thread_terminate()
 *
 *    A termination abort is sticky.  Once a thread is marked for termination, every
 *    THREAD_INTERRUPTIBLE wait will return immediately with THREAD_INTERRUPTED
 *    until the thread successfully exits.
 *
 *    Safe abort: thread_abort_safely()
 *
 *    A safe abort is not sticky.  The current wait, (or the next wait if the thread
 *    is not currently waiting) will be interrupted, but then the abort condition is cleared.
 *    The next wait will sleep as normal. Safe aborts only have a single effect.
 *
 *    The path back to the user/kernel boundary must not make any further unbounded
 *    wait calls. The waiter should detect the THREAD_INTERRUPTED return code
 *    from an ABORTSAFE wait and return an error code that causes its caller
 *    to understand that the current operation has been interrupted, and its
 *    caller should return a similar error code, and so on until the
 *    user/kernel boundary is reached.  For Mach, the error code is usually KERN_ABORTED,
 *    for BSD it is EINTR.
 *
 *    Debuggers rely on the safe abort mechanism - a signaled thread must return to
 *    the AST at the user/kernel boundary for the debugger to finish attaching.
 *
 *    No wait/block will ever disappear a thread out from under the waiter. The block
 *    call will always either return or call the passed in continuation.
 */
typedef int wait_interrupt_t;
#define THREAD_UNINT			0		/* not interruptible      */
#define THREAD_INTERRUPTIBLE	1		/* may not be restartable */
#define THREAD_ABORTSAFE		2		/* abortable safely       */

typedef int wait_timeout_urgency_t;
#define TIMEOUT_URGENCY_SYS_NORMAL	0x00		/* use default leeway thresholds for system */
#define TIMEOUT_URGENCY_SYS_CRITICAL	0x01		/* use critical leeway thresholds for system */
#define TIMEOUT_URGENCY_SYS_BACKGROUND	0x02		/* use background leeway thresholds for system */

#define TIMEOUT_URGENCY_USER_MASK	0x10		/* mask to identify user timeout urgency classes */
#define TIMEOUT_URGENCY_USER_NORMAL	0x10		/* use default leeway thresholds for user */
#define TIMEOUT_URGENCY_USER_CRITICAL	0x11		/* use critical leeway thresholds for user */
#define TIMEOUT_URGENCY_USER_BACKGROUND	0x12		/* use background leeway thresholds for user */

#define TIMEOUT_URGENCY_MASK		0x13		/* mask to identify timeout urgency */

#define TIMEOUT_URGENCY_LEEWAY		0x20		/* don't ignore provided leeway value */

#define TIMEOUT_URGENCY_FIRST_AVAIL	0x40		/* first available bit outside of urgency mask/leeway */

#ifdef	KERNEL_PRIVATE

#ifdef	MACH_KERNEL_PRIVATE

#include <kern/misc_protos.h>
typedef  struct clock			*clock_t;

typedef struct mig_object		*mig_object_t;
#define MIG_OBJECT_NULL			((mig_object_t) 0)

typedef struct mig_notify		*mig_notify_t;
#define MIG_NOTIFY_NULL 		((mig_notify_t) 0)

typedef struct pset_node		*pset_node_t;
#define PSET_NODE_NULL			((pset_node_t) 0)

typedef struct affinity_set		*affinity_set_t;
#define AFFINITY_SET_NULL		((affinity_set_t) 0)

typedef struct run_queue               *run_queue_t;
#define RUN_QUEUE_NULL                 ((run_queue_t) 0)

typedef struct grrr_run_queue               *grrr_run_queue_t;
#define GRRR_RUN_QUEUE_NULL                 ((grrr_run_queue_t) 0)

typedef struct grrr_group					*grrr_group_t;
#define GRRR_GROUP_NULL						((grrr_group_t) 0)

#else	/* MACH_KERNEL_PRIVATE */

struct wait_queue_set ;
struct _wait_queue_link ;

#endif	/* MACH_KERNEL_PRIVATE */

typedef struct wait_queue_set	*wait_queue_set_t;
#define WAIT_QUEUE_SET_NULL 	((wait_queue_set_t)0)
#define SIZEOF_WAITQUEUE_SET	wait_queue_set_size()

typedef struct _wait_queue_link	*wait_queue_link_t;
#define WAIT_QUEUE_LINK_NULL	((wait_queue_link_t)0)
#define SIZEOF_WAITQUEUE_LINK	wait_queue_link_size()

/* legacy definitions - going away */
struct wait_queue_sub ;
typedef struct wait_queue_sub	*wait_queue_sub_t;
#define WAIT_QUEUE_SUB_NULL 	((wait_queue_sub_t)0)
#define SIZEOF_WAITQUEUE_SUB	wait_queue_set_size()

#endif	/* KERNEL_PRIVATE */

#endif	/* _KERN_KERN_TYPES_H_ */


text:
import React, { Component } from 'react';

class TimerDashboardWidget extends Component {

  render() {
    const props = this.props;

    let stateClass = 'open';

    if ( ! props.isOpen ) {
      stateClass = 'closed';
    }

    const widgetClass = 'timer-dashboard-widget ' + stateClass + ' ' + props.class;

    return (

          {props.title}

          {props.children}

    );
  }

  _closeOrOpen(stateClass) {
    console.log(stateClass);
    if ( stateClass === 'open' ) {
      this.props.onRequestClose();

      return;
    }
    this.props.onRequestOpen();
  }
}

export default TimerDashboardWidget;


text:
package com.jk.faces.decorators;

import java.util.List;
import java.util.logging.Logger;

import javax.faces.view.facelets.Tag;
import javax.faces.view.facelets.TagDecorator;

import com.jk.faces.config.JKFacesConfigurations;
import com.jk.faces.config.JKNamespace;
import com.jk.faces.config.JKTagMapping;
import com.jk.faces.tags.JKTagAttributeWrapper;
import com.jk.faces.tags.JKTagWrapper;
import com.jk.faces.util.JKJsfUtil;
import com.jk.util.JKObjectUtil;
import com.jk.util.annotations.Author;
import com.jk.util.logging.JKLogger;
import com.jk.util.logging.JKLoggerFactory;

// TODO: Auto-generated Javadoc
/**
 * JKTagDecorator this class represents the JK implementation for
 * JKTagDecorator.
 *
 * @author Jalal H. Kiswani
 * @see
 *      TagDecorator
 */
@Author(name = "Jalal Kiswani", date = "3/9/2014", version = "1.0")
public final class JKTagDecorator implements TagDecorator {

	/** The logger. */
	JKLogger logger = JKLoggerFactory.getLogger(getClass());

	/** The Constant Instance. */
	public final static JKTagDecorator Instance = new JKTagDecorator();

	/**
	 * Instantiates a new JK tag decorator.
	 */
	public JKTagDecorator() {
	}

	/**
	 * Decorate.
	 *
	 * @param tag
	 *            the tag
	 * @return the tag
	 */
	/**
	 * JK_NAMESPACE.
	 *
	 * @param tag
	 *            the tag
	 * @return the tag
	 * @see com.sun.facelets.tag.TagDecorator#decorate(com.sun.facelets.tag.Tag)
	 */
	@Override
	public Tag decorate(final Tag tag) {
		if (JKFacesConfigurations.getInstance().isDecorate()) {
			final JKTagWrapper wrapper = new JKTagWrapper(tag);
			this.logger.debug("decorate tag :", tag.getQName());
			if (wrapper.isHtmlTag()) {
				this.logger.debug("add missing namespaces");
				addMissingNamespaces(wrapper);
			} else {
				this.logger.debug("handle mapping for tag: " + tag.getQName());
				handleMapping(wrapper);
				if (wrapper.isUrlable()) {
					this.logger.debug("fixing links:" + tag.getQName());
					fixLinks(wrapper);
				}
			}
			return wrapper.buildTag();
		} else {
			return tag;
		}
	}

	/**
	 * Adds the names spaces.
	 *
	 * @param wrapper
	 *            the tag
	 * @return the tag
	 */
	protected void addMissingNamespaces(final JKTagWrapper wrapper) {
		final JKFacesConfigurations config = JKFacesConfigurations.getInstance();

		final List<JKNamespace> namespaces = config.getNamespaces();
		for (final JKNamespace namespace : namespaces) {
			wrapper.addAttribue(namespace.getPrefix(), namespace.getUrl());
		}
	}

	/**
	 * Fix links.
	 *
	 * @param wrapper the wrapper
	 */
	protected void fixLinks(final JKTagWrapper wrapper) {
		if (JKFacesConfigurations.getInstance().isDecorateFixLinks()) {
			 logger.debug("fix links");
			final List<JKTagAttributeWrapper> links = wrapper.getLinksAttributes();
			for (final JKTagAttributeWrapper link : links) {
				 logger.debug("fix link :", link.getValue());
				// TODO: check if contextPath already set
				if (link.getValue().contains("#{request.contextPath}")) {
					continue;
				}
				if (link.getValue().startsWith("/")) {
					String context = JKJsfUtil.evaluateExpressionToObject("#{request.contextPath}").toString();
					if (context != null && !context.trim().equals("")) {
						link.setValue(context.concat(link.getValue()));
					}
				}
				 logger.debug("final-link :", link.getValue());
			}
		}
	}

	/**
	 * Handle mapping.
	 *
	 * @param wrapper the wrapper
	 */
	protected void handleMapping(final JKTagWrapper wrapper) {
		if (JKFacesConfigurations.getInstance().isDecorateMapping()) {
			final JKFacesConfigurations config = JKFacesConfigurations.getInstance();

			final JKTagMapping mapping = config.findTagMapping(wrapper);
			if (mapping != null) {
				this.logger.debug("mapping found : ", JKObjectUtil.toString(mapping));
				final String nameSpaceLetter = mapping.getNameSpaceLetter();
				if (nameSpaceLetter != null) {
					final JKNamespace namespace = config.getNamespaceByLetter(nameSpaceLetter);
					wrapper.setNamespace(namespace.getUrl());
				}
				wrapper.setqName(mapping.getTargetQName());
				wrapper.setLocalName(mapping.getTargetLocalName());
			}
		}
	}

	// protected Tag createTag(Tag oldTag, final List<TagAttribute>
	// newAttributes) {
	// TagAttributesImpl attributes = new
	// TagAttributesImpl(newAttributes.toArray(new TagAttribute[0]));
	// Tag tag = new Tag(oldTag.getLocation(), oldTag.getNamespace(),
	// oldTag.getLocalName(), oldTag.getQName(), attributes);
	// return tag;
	// }

	// protected TagAttributeImpl createAttribute(Tag tag, final String
	// nameSpaceKey, String property) {
	// return new TagAttributeImpl(tag.getLocation(), tag.getNamespace(),
	// nameSpaceKey, nameSpaceKey, property);
	// }

}


text:
'''
The MIT License (MIT)

Copyright (c) 2016, 2017 Erika Jonell (xevrem)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.o
'''

__all__ = ('HttpData', 'http_data_create', 'http_data_parse', 'http_data_add_header', 'http_data_render_request', 'http_data_render_response')

#constants
CRLF = '\r\n'
HTTP_STANDARD = 'HTTP/1.1'
SP = ' '
STATUS_DICT = {'200':'OK',
               '201':'Created',
               '202':'Accepted',
               '203':'Non-Authoratative Information',
               '205':'Reset Content',
               '206':'Partial Content',
               '207':'Multi-Status',
               '208':'Already Reported',
               '226':'IM Used',
               '300':'Multiple Choices',
               '301':'Moved Permanently',
               '302':'Found',
               '303':'See Other',
               '304':'Not Modified',
               '305':'Use Proxy',
               '306':'Switch Proxy',
               '307':'Temporary Redirect',
               '308':'Permanent Redirect',
               '400':'Bad Request',
               '401':'Unauthorized',
               '402':'Payment Required',
               '403':'Forbidden',
               '404':'Not Found',
               '405':'Method Not Allowed',
               '406':'Not Acceptable',
               '407':'Proxy Authentication Required',
               '407':'Request Timeout',
               '409':'Conflict',
               '410':'Gone',
               '411':'Length Requried',
               '412':'Precondition Failed',
               '413':'Payload Too Large',
               '414':'URI Too Long',
               '415':'Unsupported Media Type',
               '416':'Range Not Satisfiable',
               '417':'Expectation Failed',
               '418':'I\'m a teapot',
               '421':'Misdirected Request',
               '422':'Unprocessable Entity',
               '423':'Locked',
               '424':'Failed Dependency',
               '425':'Upgrade Requried',
               '428':'Precondition Required',
               '429':'Too Many Requests',
               '431':'Request Header Fields Too Large',
               '451':'Unavailable For Legal Reasons',
               '500':'Internal Server Error',
               '501':'Not Implemented',
               '502':'Bad Gateway',
               '503':'Service Unabailable',
               '504':'Gateway Timeout',
               '505':'HTTP Version Not Supported',
               '506':'Variant Also Negotiates',
               '507':'Insufficient Storage',
               '508':'Loop Detected',
               '510':'Not Extended',
               '511':'Network AUthentication Required'}
SEP = ':'
AP = '&'
QM = '?'
EQ = '='

class HttpData:
    '''simple HTTP Data Holder
    '''
    raw = None
    text = None
    http_standard = HTTP_STANDARD
    headers = {}
    status = "200"
    body = ''
    resource = ''
    method = ''
    params= {}
    wildcards={}

def http_data_create(raw_data=None):
    if raw_data:
        return http_data_parse(HttpData(), raw_data)
    else:
        return HttpData()

def http_data_add_header(http_data, key, value):
    '''add a key-value pair to the headers
    '''
    http_data.headers[key] = value
    return http_data

def http_data_parse(http_data, raw):
    '''attempts to parse the raw request data
    '''
    http_data.raw = raw

    #if data supplied as raw bytes, decode
    if type(http_data.raw) is bytes:
        data = http_data.raw.decode()
    else:
        data = http_data.raw

    #determine type of request, and resource requested
    http_data.start_line = data.split(CRLF)[0]
    http_data.method = http_data.start_line.split(SP)[0].strip(SP)
    http_data.resource = http_data.start_line.split(SP)[1].strip(SP)

    #process parameters
    if QM in http_data.resource:
        http_data.resource, params = http_data.resource.split(QM)
        for param in params.split(AP):
            key,token = param.split(EQ)
            http_data.params[key]=token

    #if resource ends with a / remove it
    if http_data.resource.endswith('/') and len(http_data.resource) > 1:
        http_data.resource = http_data.resource[:-1]

    #process headers and body
    in_headers = True
    for item in data.split(CRLF)[1:]:
        if in_headers:
            index = item.find(':')
            k = item[:index]
            if k:
                v = item[index+1:].strip(SP)
                http_data.headers[k] = v
            else:
                in_headers = False
        else:
            http_data.body = item
            break

    return http_data

def http_data_render_request(http_data):
    '''renders all textual information into raw bytes
    '''
    start_line = http_data.method + SP + http_data.resource + SP + http_data.http_standard + CRLF

    hdrs=''
    for key, value in http_data.headers.items():
        hdrs += key + SEP + value + CRLF

    http_data.text = start_line + hdrs + CRLF + http_data.body + CRLF
    http_data.raw = http_data.text.encode()

    return http_data

def http_data_render_response(http_data):
    '''renders all textual information into raw bytes
    '''
    start_line = HTTP_STANDARD + SP + http_data.status + SP + STATUS_DICT[http_data.status] + CRLF

    hdrs=''
    for key, value in http_data.headers.items():
        hdrs += key + SEP + value + CRLF

    http_data.text = start_line + hdrs + CRLF + http_data.body
    http_data.raw = http_data.text.encode()

    return http_data


text:
param(
  [string]$package,
  [string]$version,
  [string]$workDir = ".\LastMajorVersionBinaries"
)

if (-Not (Test-Path $workDir))
{
    Write-Host "Working directory for compatibility check packages '$workDir' not found, creating..."
    New-Item -Path $workDir -ItemType "directory" | Out-Null
}

if (Test-Path -Path "$workDir\$package.$version.zip")
{
    Write-Debug "Previous package $package@$version already downloaded for compatibility check"
}
else
{
    Write-Host "Retrieving package $package@$version for compatibility check"
    Invoke-WebRequest -Uri https://www.nuget.org/api/v2/package/$package/$version -Outfile "$workDir\$package.$version.zip"
}

if (Test-Path -Path "$workDir\$package\$version\lib")
{
    Write-Debug "Previous package $package@$version already extracted to '$workDir\$package\$version\lib'"
}
else
{
    Write-Host "Extracting package $package@$version from '$workDir\$package.$version.zip' to '$workDir\$package\$version' for compatibility check"
    Expand-Archive -LiteralPath "$workDir\$package.$version.zip" -DestinationPath "$workDir\$package\$version" -Force
}


text:
$(document).ready(function() {
	$('.action-item').click(function() {
		$(this).children('form').submit();
	});
});


text:
<?php

namespace Modules\Platform\Controllers\Admin;

use Nova\Auth\Access\AuthorizationException;
use Nova\Support\Facades\Cache;
use Nova\Support\Facades\Config;
use Nova\Support\Facades\Gate;
use Nova\Support\Facades\Input;
use Nova\Support\Facades\Redirect;
use Nova\Support\Facades\Validator;
use Nova\Support\Facades\View;

use Modules\Platform\Controllers\Admin\BaseController;
use Modules\Platform\Models\Option;

class Settings extends BaseController
{

    protected function validator(array $data)
    {
        // Validation rules
        $rules = array(
            // The Application.
            'siteName'        => 'required|max:100',
            'siteSkin'        => 'required|alpha_dash',

            // The Mailer
            'mailDriver'      => 'required|alpha',
            'mailHost'        => 'url',
            'mailPort'        => 'numeric',
            'mailFromAddress' => 'required|email',
            'mailFromName'    => 'required|max:100',
            'mailEncryption'  => 'alpha',
            'mailUsername'    => 'max:100',
            'mailPassword'    => 'max:100',
        );

        $attributes = array(
            // The Application.
            'siteName'        => __d('platform', 'Site Name'),
            'siteSkin'        => __d('platform', 'Site Skin'),

            // The Mailer
            'mailDriver'      => __d('platform', 'Mail Driver'),
            'mailHost'        => __d('platform', 'Server Name'),
            'mailPort'        => __d('platform', 'Server Port'),
            'mailFromAddress' => __d('platform', 'Mail from Adress'),
            'mailFromName'    => __d('platform', 'Mail from Name'),
            'mailEncryption'  => __d('platform', 'Encryption'),
            'mailUsername'    => __d('platform', 'Server Username'),
            'mailPassword'    => __d('platform', 'Server Password'),
        );

        return Validator::make($data, $rules, array(), $attributes);
    }

    public function index()
    {
        // Authorize the current User.
        if (Gate::denies('manage', Option::class)) {
            throw new AuthorizationException();
        }

        // Load the Options from database.
        $options = array(
            // The Application.
            'siteName'        => Input::old('siteName', Config::get('app.name')),
            'siteSkin'        => Input::old('siteSkin', Config::get('app.color_scheme')),

            // The Mailer
            'mailDriver'      => Input::old('mailDriver',      Config::get('mail.driver')),
            'mailHost'        => Input::old('mailHost',        Config::get('mail.host')),
            'mailPort'        => Input::old('mailPort',        Config::get('mail.port')),
            'mailFromAddress' => Input::old('mailFromAddress', Config::get('mail.from.address')),
            'mailFromName'    => Input::old('mailFromName',    Config::get('mail.from.name')),
            'mailEncryption'  => Input::old('mailEncryption',  Config::get('mail.encryption')),
            'mailUsername'    => Input::old('mailUsername',    Config::get('mail.username')),
            'mailPassword'    => Input::old('mailPassword',    Config::get('mail.password')),
        );

        return $this->createView()
            ->shares('title', __d('platform', 'Settings'))
            ->withOptions($options);
    }

    public function store()
    {
        // Authorize the current User.
        if (Gate::denies('manage', Option::class)) {
            throw new AuthorizationException();
        }

        // Validate the Input data.
        $input = Input::all();

        $validator = $this->validator($input);

        if($validator->fails()) {
            return Redirect::back()->withInput()->withErrors($validator->errors());
        }

        // The Application.
        Option::set('app.name',          $input['siteName']);
        Option::set('app.color_scheme',  $input['siteSkin']);

        // The Mailer
        Option::set('mail.driver',       $input['mailDriver']);
        Option::set('mail.host',         $input['mailHost']);
        Option::set('mail.port',         $input['mailPort']);
        Option::set('mail.from.address', $input['mailFromAddress']);
        Option::set('mail.from.name',    $input['mailFromName']);
        Option::set('mail.encryption',   $input['mailEncryption']);
        Option::set('mail.username',     $input['mailUsername']);
        Option::set('mail.password',     $input['mailPassword']);

        // Invalidate the cached system options.
        Cache::forget('system_options');

        return Redirect::to('admin/settings')
            ->with('success', __d('platform', 'The Settings was successfully updated.'));
    }

}


text:
        Presentation

        Possible savings

        PPU

        Drug Tariff PPU

      Loading...

 Download raw data