text:
Pymagor: a Python based calcium imaging data analysis tool.
=======

![PymagorScreenshot](https://github.com/i-namekawa/Pymagor/blob/images/images/Main-OnlineAnalysisSheet.jpg)
![TrialViewer](https://github.com/i-namekawa/Pymagor/blob/images/images/TrialViewer.jpg)

### "ROI drawing made fun"

Pymagor is a stand alone application that aims to automate many of labor intensive steps of calcium imaging data analysis and provide a user friendly environment for manual ROI drawing. Pymagor can open any multi-page TIFF files (and other supported files) and you can quickly check dF/F image (either as frame average or movie) and the basal fluorescence image for morphology (raw frame or frame average). Pymagor will automatically align multiple image files for each stimulus and field-of-view combination. You can export a PDF summary report and a mat file (or npz) for later analysis.

For more details, check [the wiki documentation] (https://github.com/i-namekawa/Pymagor/wiki).

Supported platforms
------
Pymagor is built upon Python and cross-platform libraries (all 64-bit ready) and works on Windows/Linux/Mac.

* MS-Windows XP/7
* Ubuntu 14.04 / Linux Mint 17: Working ok
* Mac: Woring on Darwin with wxPython v3.0

Installation
------

### Easy way to test Pymgaor on Windows (no Python required! but 32-bit version only)

* Get the [Windows 32-bit binary installer](https://github.com/i-namekawa/Pymagor/releases) and follow the instructions in the installation wizard. Please __do not__ install in "Program files" folder as Pymagor needs the write access to produce an error log file in the same folder. It comes with an uninstaller. The binary "pymagor.exe" is flagged as LARGEADDRESSAWARE so that it goes over the 2GB memory allocation limit by Windows on 32-bit Python. So, the peformance of this binary is better than running the source on 32-bit python (unless python.exe is flagged too).

The 64-bit binary is possible to build but was too huge (>200 MB, due to numpy/scipy dlls). For 64-bit, run from source.

### Run from source (for development, on Linux/Mac, and to run on 64-bit Python)

1. Install the latest Python 2.7 series. Anaconda 64-bit Python 2.7 is recommended for all platforms (Windows/Ubuntu/Mac). (WinPython is no longer recommended because the latest WinPython2.7 still uses numpy 1.9.3 but the latest tifffile.py needs numpy 1.10)

2. Install all the dependencies (see below for Anaconda example)
  * pillow
  * numpy (1.10 or newer)
  * scipy (v0.12.0 or newer. For anaconda, 0.16.0 recommended due to scipy.io.loadmat bug in anaconda)
  * matplotlib (may need 1.4.* on Mac)
  * xlrd
  * xlwt
  * wx (v3.0.0.0 or newer)
  * yapsy
  * tifffile.py (ver 2016.4.13 or newer. Note that `pip install tifffile` will install a slightly older version which may require an older numpy than v1.10.)

3. Clone the git repogitory (https://github.com/i-namekawa/Pymagor.git or download zip) and run Pymagor2.py. On Mac, run with `pythonw` rather than `python`.

#### Conda command to set up Python 2.7.* (64-bit) for Pymagor

* Install Miniconda (or full anaconda) for conda command line tool
* `conda create -n pymagor_env python=2.7 xlrd xlwt matplotlib scipy=0.16.0 pillow wxpython`
* `activate pymagor_env` (win) or `source activate pymagor_env` (Linux/Mac)
* On the pymagor_env activated console, install 2 more libralies as follows:
 * yapsy: `pip install yapsy`
 * tifffile: `pip install tifffile-2016.4.13-cp27-cp27m-win_amd64.whl` (or newer) from Gohlke's site at http://www.lfd.uci.edu/~gohlke/pythonlibs/#vlfd Or, simply copy tifffile.py to `site-packages`. Compilation of tifffile.c is optional but recommended for compressed tif.

Bug report
-------
Please use [Issue tracker](https://github.com/i-namekawa/Pymagor/issues) and paste the content of pymagor.log whenever possible. pymagor.log can be found from Help menu -> Go to User folder.

License
-------

Pymagor is licensed under a 3-clause BSD style license - see the LICENSE.txt file.

Screenshots
------
![QuickPlot](https://github.com/i-namekawa/Pymagor/blob/images/images/QuickPlot.jpg)
![BatchLauncher](https://github.com/i-namekawa/Pymagor/blob/images/images/BatchLauncher.jpg)


text: greater than or equal to node

redpajama_set_name: RedPajamaGithub


text:
package jwt

import (
	"crypto"
	"crypto/rand"
	"crypto/rsa"
)

// Implements the RSA family of signing methods signing methods
// Expects *rsa.PrivateKey for signing and *rsa.PublicKey for validation
type SigningMethodRSA struct {
	Name string
	Hash crypto.Hash
}

// Specific instances for RS256 and company
var (
	SigningMethodRS256 *SigningMethodRSA
	SigningMethodRS384 *SigningMethodRSA
	SigningMethodRS512 *SigningMethodRSA
)

func init() {
	// RS256
	SigningMethodRS256 = &SigningMethodRSA{"RS256", crypto.SHA256}
	RegisterSigningMethod(SigningMethodRS256.Alg(), func() SigningMethod {
		return SigningMethodRS256
	})

	// RS384
	SigningMethodRS384 = &SigningMethodRSA{"RS384", crypto.SHA384}
	RegisterSigningMethod(SigningMethodRS384.Alg(), func() SigningMethod {
		return SigningMethodRS384
	})

	// RS512
	SigningMethodRS512 = &SigningMethodRSA{"RS512", crypto.SHA512}
	RegisterSigningMethod(SigningMethodRS512.Alg(), func() SigningMethod {
		return SigningMethodRS512
	})
}

func (m *SigningMethodRSA) Alg() string {
	return m.Name
}

// Implements the Verify method from SigningMethod
// For this signing method, must be an *rsa.PublicKey structure.
func (m *SigningMethodRSA) Verify(signingString, signature string, key interface{}) error {
	var err error

	// Decode the signature
	var sig []byte
	if sig, err = DecodeSegment(signature); err != nil {
		return err
	}

	var rsaKey *rsa.PublicKey
	var ok bool

	if rsaKey, ok = key.(*rsa.PublicKey); !ok {
		return ErrInvalidKeyType
	}

	// Create hasher
	if !m.Hash.Available() {
		return ErrHashUnavailable
	}
	hasher := m.Hash.New()
	hasher.Write([]byte(signingString))

	// Verify the signature
	return rsa.VerifyPKCS1v15(rsaKey, m.Hash, hasher.Sum(nil), sig)
}

// Implements the Sign method from SigningMethod
// For this signing method, must be an *rsa.PrivateKey structure.
func (m *SigningMethodRSA) Sign(signingString string, key interface{}) (string, error) {
	var rsaKey *rsa.PrivateKey
	var ok bool

	// Validate type of key
	if rsaKey, ok = key.(*rsa.PrivateKey); !ok {
		return "", ErrInvalidKey
	}

	// Create the hasher
	if !m.Hash.Available() {
		return "", ErrHashUnavailable
	}

	hasher := m.Hash.New()
	hasher.Write([]byte(signingString))

	// Sign the string and return the encoded bytes
	if sigBytes, err := rsa.SignPKCS1v15(rand.Reader, rsaKey, m.Hash, hasher.Sum(nil)); err == nil {
		return EncodeSegment(sigBytes), nil
	} else {
		return "", err
	}
}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using Svenkle.ExtensionMethods;
using Svenkle.TwoPly.Tokenisers.Interfaces;

namespace Svenkle.TwoPly.Tokenisers
{
    public class ConfigurationTokeniser : IConfigurationTokeniser
    {
        private readonly IEnumerable<ITokeniser> _commandTokenisers;

        public ConfigurationTokeniser(IEnumerable<ITokeniser> commandTokenisers)
        {
            _commandTokenisers = commandTokenisers;
        }

        public Dictionary<string, List<List<string>>> Tokenise(IEnumerable<string> configuration)
        {
            var buffer = new List<List<string>>();
            var commandBuffer = new Dictionary<string, List<List<string>>>();

            foreach (var line in configuration)
            {
                var lastCommand = string.Empty;
                foreach (var tokeniser in _commandTokenisers)
                {
                    if (!tokeniser.CanTokenise(line))
                        continue;

                    var tokens = tokeniser.Tokenise(line).ToList();
                    lastCommand = tokens.FirstOrDefault();
                    buffer.Add(tokens);
                    break;
                }

                if (string.IsNullOrWhiteSpace(lastCommand) || !lastCommand.Equals("Deploy", StringComparison.InvariantCultureIgnoreCase))
                    continue;

                var key = string.Join("|", buffer.SelectMany(x => x)).ToHash();
                commandBuffer[key] = buffer.ToList();
                buffer.Clear();
            }

            return commandBuffer;
        }
    }
}


text:
#import <UIKit/UIKit.h>

@class TGSecretModernConversationAccessoryTimerView;

@protocol TGSecretModernConversationAccessoryTimerViewDelegate <NSObject>

@optional

- (void)accessoryTimerViewPressed:(TGSecretModernConversationAccessoryTimerView *)accessoryTimerView;

@end

@interface TGSecretModernConversationAccessoryTimerView : UIView

@property (nonatomic, weak) id<TGSecretModernConversationAccessoryTimerViewDelegate> delegate;

@property (nonatomic) NSInteger timerValue;

@end


text:
from keystone.common import router
from keystone.common import wsgi
from keystone.policy import controllers

class Routers(wsgi.RoutersBase):

    def append_v3_routers(self, mapper, routers):
        policy_controller = controllers.PolicyV3()
        routers.append(router.Router(policy_controller, 'policies', 'policy',
                                     resource_descriptions=self.v3_resources))


text:
/**
 * runtime Text renderer
 * renders a mobiledoc to Text
 *
 * input: mobiledoc
 * output: Text (string)
 */
import ImageCard from '../cards/image';
import RENDER_TYPE from '../utils/render-type';

const LINE_BREAK = '\n';

import {
  MARKUP_SECTION_TYPE,
  LIST_SECTION_TYPE,
  CARD_SECTION_TYPE,
  IMAGE_SECTION_TYPE
} from '../utils/section-types';

import {
  MARKUP_MARKER_TYPE,
  ATOM_MARKER_TYPE
} from '../utils/marker-types';

export const MOBILEDOC_VERSION_0_3 = '0.3.0';
export const MOBILEDOC_VERSION_0_3_1 = '0.3.1';
export const MOBILEDOC_VERSION_0_3_2 = '0.3.2';

function validateVersion(version) {
  if (
    version !== MOBILEDOC_VERSION_0_3 &&
    version !== MOBILEDOC_VERSION_0_3_1 &&
    version !== MOBILEDOC_VERSION_0_3_2
  ) {
    throw new Error(`Unexpected Mobiledoc version "${version}"`);
  }
}

export default class Renderer {
  constructor(mobiledoc, state) {

    let { cards, cardOptions, atoms, unknownCardHandler, unknownAtomHandler } = state;
    let { version, sections, atoms: atomTypes, cards: cardTypes } = mobiledoc;
    validateVersion(version);

    this.root               = [];
    this.sections           = sections;
    this.atomTypes          = atomTypes;
    this.cardTypes          = cardTypes;
    this.cards              = cards;
    this.atoms              = atoms;
    this.cardOptions        = cardOptions;
    this.unknownCardHandler = unknownCardHandler || this._defaultUnknownCardHandler;
    this.unknownAtomHandler = unknownAtomHandler || this._defaultUnknownAtomHandler;

    this._teardownCallbacks  = [];
  }

  render() {
    this.sections.forEach(section => {
      this.root.push(this.renderSection(section));
    });

    let result = this.root.join(LINE_BREAK);
    return { result, teardown: () => this.teardown() };
  }

  teardown() {
    for (let i=0; i < this._teardownCallbacks.length; i++) {
      this._teardownCallbacks[i]();
    }
  }

  get _defaultUnknownCardHandler() {
    return () => {
      // for the text renderer, a missing card is a no-op
    };
  }

  get _defaultUnknownAtomHandler() {
    return ({ value }) => {
      return value || '';
    };
  }

  renderSection(section) {
    const [type] = section;
    switch (type) {
      case MARKUP_SECTION_TYPE:
        return  this.renderMarkupSection(section);
      case IMAGE_SECTION_TYPE:
        return this.renderImageSection(section);
      case LIST_SECTION_TYPE:
        return this.renderListSection(section);
      case CARD_SECTION_TYPE:
        return this.renderCardSection(section);
      default:
        throw new Error('Unimplemented renderer for type ' + type);
    }
  }

  renderImageSection() {
    return '';
  }

  renderListSection([type, tagName, items]) {
    return items.map(
      li => this.renderListItem(li)
    ).join(LINE_BREAK);
  }

  renderListItem(markers) {
    return this.renderMarkers(markers);
  }

  findCard(name) {
    for (let i=0; i < this.cards.length; i++) {
      if (this.cards[i].name === name) {
        return this.cards[i];
      }
    }
    if (name === ImageCard.name) {
      return ImageCard;
    }
    return this._createUnknownCard(name);
  }

  _findCardByIndex(index) {
    let cardType = this.cardTypes[index];
    if (!cardType) {
      throw new Error(`No card definition found at index ${index}`);
    }

    let [ name, payload ] = cardType;
    let card = this.findCard(name);

    return {
      card,
      payload
    };
  }

  _createUnknownCard(name) {
    return {
      name,
      type: RENDER_TYPE,
      render: this.unknownCardHandler
    };
  }

  renderCardSection([type, index]) {
    let { card, payload } = this._findCardByIndex(index);

    let cardArg = this._createCardArgument(card, payload);
    let rendered = card.render(cardArg);

    this._validateCardRender(rendered, card.name);

    return rendered || '';
  }

  _validateCardRender(rendered, cardName) {
    if (!rendered) {
      return;
    }

    if (typeof rendered !== 'string') {
      throw new Error(`Card "${cardName}" must render ${RENDER_TYPE}, but result was ${typeof rendered}"`);
    }
  }

  _registerTeardownCallback(callback) {
    this._teardownCallbacks.push(callback);
  }

  _createCardArgument(card, payload={}) {
    let env = {
      name: card.name,
      isInEditor: false,
      onTeardown: (callback) => this._registerTeardownCallback(callback)
    };

    let options = this.cardOptions;

    return { env, options, payload };
  }

  renderMarkupSection([type, tagName, markers]) {
    return this.renderMarkers(markers);
  }

  findAtom(name) {
    for (let i=0; i < this.atoms.length; i++) {
      if (this.atoms[i].name === name) {
        return this.atoms[i];
      }
    }
    return this._createUnknownAtom(name);
  }

  _createUnknownAtom(name) {
    return {
      name,
      type: RENDER_TYPE,
      render: this.unknownAtomHandler
    };
  }

  _createAtomArgument(atom, value, payload) {
    let env = {
      name: atom.name,
      onTeardown: (callback) => this._registerTeardownCallback(callback)
    };

    let options = this.cardOptions;

    return { env, options, value, payload };
  }

  _validateAtomRender(rendered, atomName) {
    if (!rendered) {
      return;
    }

    if (typeof rendered !== 'string') {
      throw new Error(`Atom "${atomName}" must render ${RENDER_TYPE}, but result was ${typeof rendered}"`);
    }
  }

  _findAtomByIndex(index) {
    let atomType = this.atomTypes[index];
    if (!atomType) {
      throw new Error(`No atom definition found at index ${index}`);
    }

    let [ name, value, payload ] = atomType;
    let atom = this.findAtom(name);

    return {
      atom,
      value,
      payload
    };
  }

  _renderAtom(index) {
    let { atom, value, payload } = this._findAtomByIndex(index);

    let atomArg = this._createAtomArgument(atom, value, payload);
    let rendered = atom.render(atomArg);

    this._validateAtomRender(rendered, atom.name);

    return rendered || '';
  }

  renderMarkers(markers) {
    let str = '';
    markers.forEach(m => {
      let [type, , , value] = m;
      switch (type) {
        case MARKUP_MARKER_TYPE:
          str += value;
          break;
        case ATOM_MARKER_TYPE:
          str += this._renderAtom(value);
          break;
        default:
          throw new Error(`Unknown markup type (${type})`);
      }
    });
    return str;
  }
}


text:
This page provides information for how to convert quantized TensorFlow Lite
models. For more details, please see the
[model optimization](../performance/model_optimization.md).

# Post-training: Quantizing models for CPU model size

The simplest way to create a small model is to quantize the weights to 8 bits
and quantize the inputs/activations "on-the-fly", during inference. This
has latency benefits, but prioritizes size reduction.

During conversion, set the `optimizations` flag to optimize for size:

```
converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
tflite_quant_model = converter.convert()
```

# Full integer quantization of weights and activations

We can get further latency improvements, reductions in peak memory usage, and
access to integer only hardware accelerators by making sure all model math is
quantized. To do this, we need to measure the dynamic range of activations and
inputs with a representative data set. You can simply create an input data
generator and provide it to our converter.

```
import tensorflow as tf

def representative_dataset_gen():
  for _ in range(num_calibration_steps):
    # Get sample input data as a numpy array in a method of your choosing.
    yield [input]

converter = tf.lite.TFLiteConverter.from_saved_model(saved_model_dir)
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.representative_dataset = representative_dataset_gen
tflite_quant_model = converter.convert()
```

# During training: Quantizing models for integer-only execution.

Quantizing models for integer-only execution gets a model with even faster
latency, smaller size, and integer-only accelerators compatible model.
Currently, this requires training a model with
["fake-quantization" nodes](https://github.com/tensorflow/tensorflow/tree/r1.13/tensorflow/contrib/quantize).

This is only available in the v1 converter. A longer term solution that's
compatible with 2.0 semantics is in progress.

Convert the graph:

```
converter = tf.compat.v1.lite.TFLiteConverter.from_saved_model(saved_model_dir)
converter.inference_type = tf.lite.constants.QUANTIZED_UINT8
input_arrays = converter.get_input_arrays()
converter.quantized_input_stats = {input_arrays[0] : (0., 1.)}  # mean, std_dev
tflite_model = converter.convert()
```

For fully integer models, the inputs are uint8. The `mean` and `std_dev values`
specify how those uint8 values map to the float input values used while training
the model.

`mean` is the integer value from 0 to 255 that maps to floating point 0.0f.
`std_dev` is 255 / (float_max - float_min)

For most users, we recommend using post-training quantization. We are working on
new tools for post-training and during training quantization that we hope will
simplify generating quantized models.


text:
import os
import re
from elb_update_security_policy import __version__
from setuptools import setup, find_packages

setup(
    name='elb-update-security-policy',
    version=__version__,
    author="Chris Maxwell",
    author_email="chris@wrathofchris.com",
    description="ELB Security Policy Update Tool",
    url = "https://github.com/WrathOfChris/elb-update-security-policy",
    download_url = 'https://github.com/WrathOfChris/elb-update-security-policy/tarball/%s' % __version__,
    license="Apache",
    include_package_data=True,
    packages=find_packages(),
    install_requires=[
        'boto'
    ],
    entry_points={
        "console_scripts": [
            "elb-update-security-policy = elb_update_security_policy.cli:elb_update_security_policy"
        ]
    }
)


text:
namespace MsWordToImage
{
    public class Input
    {
        private InputType type;
        private string value;

        public Input(InputType type, string value)
        {
            this.type = type;
            this.value = value;
        }

        public InputType getType()
        {
            return this.type;
        }

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


text:
#ifndef VTKMITKRENDERPROP_H_HEADER_INCLUDED_C1C53723
#define VTKMITKRENDERPROP_H_HEADER_INCLUDED_C1C53723

#include "vtkProp.h"
#include "mitkVtkPropRenderer.h"

/*!
\brief vtkMitkRenderProp

The MITK rendering process is completely integrated into the VTK rendering pipeline.
The vtkMitkRenderProp is a custom vtkProp derived class, which implements the rendering interface between MITK and VTK. It redirects render() calls to the VtkPropRenderer, which is responsible for rendering of the datatreenodes.

\sa rendering
\ingroup rendering
*/
class MITK_CORE_EXPORT vtkMitkRenderProp : public vtkProp
{
  public:
    static vtkMitkRenderProp *New();
    vtkTypeMacro(vtkMitkRenderProp,vtkProp);

    void SetPropRenderer(mitk::VtkPropRenderer::Pointer propRenderer);

    int RenderOpaqueGeometry(vtkViewport* viewport);

    int RenderOverlay(vtkViewport* viewport);

    double *GetBounds();

    void ReleaseGraphicsResources(vtkWindow* window);

    /**
     * \brief Used by vtkPointPicker/vtkPicker.
     * This will query a list of all objects in MITK and provide every vtk based mapper to the picker.
     */
    virtual void InitPathTraversal();

    /**
     * \brief Used by vtkPointPicker/vtkPicker.
     * This will query a list of all objects in MITK and provide every vtk based mapper to the picker.
     */
    virtual vtkAssemblyPath* GetNextPath();

    virtual int GetNumberOfPaths();

    //BUG (#1551) added method for depth peeling support
    virtual int HasTranslucentPolygonalGeometry();
    virtual int RenderTranslucentPolygonalGeometry( vtkViewport *);
    virtual int RenderVolumetricGeometry( vtkViewport *);

  protected:
    vtkMitkRenderProp();
    ~vtkMitkRenderProp();

    mitk::VtkPropRenderer::Pointer m_VtkPropRenderer;
};

#endif /* VTKMITKRENDERPROP_H_HEADER_INCLUDED_C1C53723 */


text:
/* ** GENEREATED FILE - DO NOT MODIFY ** */
package com.wilutions.mslib.outlook.impl;
import com.wilutions.com.*;

@SuppressWarnings("all")
@CoClass(guid="{C091A9B2-A463-DB41-5DAE-69E7A5F7FCBC}")
public class _RuleConditionImpl extends Dispatch implements com.wilutions.mslib.outlook._RuleCondition {
  @DeclDISPID(61440)  public com.wilutions.mslib.outlook._Application getApplication() throws ComException {
    final Object obj = this._dispatchCall(61440,"Application", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._ApplicationImpl.class);
  }
  @DeclDISPID(61450)  public com.wilutions.mslib.outlook.OlObjectClass getClass_() throws ComException {
    final Object obj = this._dispatchCall(61450,"Class", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return com.wilutions.mslib.outlook.OlObjectClass.valueOf((Integer)obj);
  }
  @DeclDISPID(61451)  public com.wilutions.mslib.outlook._NameSpace getSession() throws ComException {
    final Object obj = this._dispatchCall(61451,"Session", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return Dispatch.as(obj, com.wilutions.mslib.outlook.impl._NameSpaceImpl.class);
  }
  @DeclDISPID(61441)  public IDispatch getParent() throws ComException {
    final Object obj = this._dispatchCall(61441,"Parent", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (IDispatch)obj;
  }
  @DeclDISPID(103)  public Boolean getEnabled() throws ComException {
    final Object obj = this._dispatchCall(103,"Enabled", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return (Boolean)obj;
  }
  @DeclDISPID(103)  public void setEnabled(final Boolean value) throws ComException {
    assert(value != null);
    this._dispatchCall(103,"Enabled", DISPATCH_PROPERTYPUT,value);
  }
  @DeclDISPID(64298)  public com.wilutions.mslib.outlook.OlRuleConditionType getConditionType() throws ComException {
    final Object obj = this._dispatchCall(64298,"ConditionType", DISPATCH_PROPERTYGET,null);
    if (obj == null) return null;
    return com.wilutions.mslib.outlook.OlRuleConditionType.valueOf((Integer)obj);
  }
  public _RuleConditionImpl(String progId) throws ComException {
    super(progId, "{000630D9-0000-0000-C000-000000000046}");
  }
  protected _RuleConditionImpl(long ndisp) {
    super(ndisp);
  }
  public String toString() {
    return "[_RuleConditionImpl" + super.toString() + "]";
  }
}


text:
<!DOCTYPE html>

    <title>aui-datepicker</title>

    <link rel="stylesheet" href="../../../../build/aui-css/css/bootstrap.css">

    <meta charset="utf-8" />


text:
import React from 'react'

// open all markdown links in a new window, for now
// TODO: find cross platform way to run the `open` command so we launch their native web browser
const Link = (props) => <a {...props} target='_blank' />

export default Link


text:
<resources>

    <!-- Base application theme. -->
    <style name="AppTheme" parent="AppTheme.Base">
        <!-- Customize your theme here. -->
    </style>

    <style name="AppTheme.Base" parent="Theme.AppCompat.Light.NoActionBar">
        <item name="colorPrimary">@color/color_primary</item>
        <item name="colorPrimaryDark">@color/color_primary_dark</item>
        <item name="colorAccent">@color/color_accent</item>
        <item name="android:windowNoTitle">true</item>
        <item name="windowActionBar">false</item>
    </style>
</resources>


text:
package org.alien4cloud.tosca.editor.processors.inputs;

import java.util.Map;

import org.alien4cloud.tosca.editor.EditionContextManager;
import org.alien4cloud.tosca.editor.operations.inputs.AbstractInputOperation;
import org.alien4cloud.tosca.editor.processors.IEditorOperationProcessor;

import com.google.common.collect.Maps;

import alien4cloud.exception.NotFoundException;
import org.alien4cloud.tosca.model.Csar;
import org.alien4cloud.tosca.model.definitions.PropertyDefinition;
import org.alien4cloud.tosca.model.templates.Topology;

/**
 * Abstract class to process input operations. Saves common input checking.
 */
public abstract class AbstractInputProcessor<T extends AbstractInputOperation> implements IEditorOperationProcessor<T> {
    @Override
    public void process(Csar csar, Topology topology, T operation) {
        Map<String, PropertyDefinition> inputs = topology.getInputs();
        if (inputs == null) {
            if (create()) {
                inputs = Maps.newHashMap();
            } else {
                throw new NotFoundException("The topology has no defined input");
            }
        }
        processInputOperation(csar, topology, operation, inputs);
    }

    /**
     * If true then the inputs map will be created rather than throwing an exception.
     *
     * @return true if we should create the input map if none exists.
     */
    protected abstract boolean create();

    protected abstract void processInputOperation(Csar csar, Topology topology, T operation, Map<String, PropertyDefinition> inputs);
}


text:
/*
 * decaffeinate suggestions:
 * DS102: Remove unnecessary code created because of implicit returns
 * Full docs: https://github.com/decaffeinate/decaffeinate/blob/master/docs/suggestions.md
 */
const { fabricate } = require("@artsy/antigravity")
const { Partners } = require("../../collections/partners")

describe("Articles", () =>
  beforeEach(function () {
    return (this.partners = new Partners([fabricate("post")]))
  }))

// FIXME: No tests!


text:
using CK.Auth;
using CK.Core;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.Extensions.Primitives;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;

namespace CK.AspNet.Auth
{
    /// <summary>
    /// Secure IQueryCollection and/or IFormCollection data serialization, using a binary serialization.
    /// </summary>
    public class ExtraDataSecureDataFormat : SecureDataFormat<IDictionary<string, string?>>
    {
        class Serializer : IDataSerializer<IDictionary<string, string?>>
        {
            public IDictionary<string, string?> Deserialize(byte[] data)
            {
                var result = new Dictionary<string, string?>();
                using (var s = new MemoryStream(data))
                using (var r = new CKBinaryReader(s))
                {
                    int c = r.ReadNonNegativeSmallInt32();
                    while( --c >= 0 )
                    {
                        result.Add( r.ReadString(), r.ReadNullableString() );
                    }
                    return result;
                }
            }
            public byte[] Serialize( IDictionary<string, string?> model )
            {
                using (var s = new MemoryStream())
                using (var w = new CKBinaryWriter(s))
                {
                    w.WriteNonNegativeSmallInt32( model.Count );
                    foreach( var k in model )
                    {
                        w.Write( k.Key );
                        w.WriteNullableString( k.Value );
                    }
                    return s.ToArray();
                }
            }
        }

        static readonly Serializer _serializer = new Serializer();

        /// <summary>
        /// Initialize a new AuthenticationInfoSecureDataFormat.
        /// </summary>
        /// <param name="p">Data protector to use.</param>
        public ExtraDataSecureDataFormat( IDataProtector p )
            : base( _serializer, p )
        {
        }
    }

}


text:
package com.ambergleam.android.photogallery.controller;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;

import timber.log.Timber;

public class StartupReceiver extends BroadcastReceiver {

    @Override
    public void onReceive(Context context, Intent intent) {
        Timber.i("Received broadcast intent: " + intent.getAction());
        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);
        boolean isAlarmOn = prefs.getBoolean(PollService.PREF_IS_ALARM_ON, false);
        PollService.setServiceAlarm(context, isAlarmOn);
    }

}


text:
import threading
import time
import subprocess
import sys

from datetime import datetime, date
from core.settings import Settings

class Worker(threading.Thread):

  def __init__(self, settingsFile):
    threading.Thread.__init__(self, name="Worker: " + settingsFile)
    settignsFromFile = Settings(settingsFile)
    self.settings = settignsFromFile.getSettings()

  def writeToLog(self, category, msg):
    logFileName = self.settings["log"]
    if (logFileName == ""):
      logFileName = "running.log";
    errLogFile = open("logs/"+logFileName, "a")
    errLogFile.write("---" + '\n')
    errLogFile.write(str(datetime.today()) + '\n')
    errLogFile.write(self.name + '\n')
    errLogFile.write(str(category) + '\n')
    errLogFile.write(str(msg) + '\n')
    errLogFile.close()

  def runApplication(self):
      log = subprocess.Popen(self.settings["application"],
        shell=True, stdout=subprocess.PIPE)
      out = log.communicate()
      test = log.returncode
      if (test != 0):
        if (self.settings["logging-error"] == 1):
          self.writeToLog('ERROR',out)
      else:
        if (self.settings["logging-success"] == 1):
          self.writeToLog('SUCCESS',out)

  def run(self):
    while True:
      self.runApplication()
      time.sleep(self.settings["timeout"])


text:
package main

import "fmt"

func main() {
	fmt.Println("Script is working! Try making some changes to it.")
}


text:
sap.ui.define(['jquery.sap.global', 'sap/ui/core/library', 'sap/ui/core/Control', 'sap/ui/model/type/Date', 'sap/ui/model/odata/type/ODataType', 'sap/ui/core/format/DateFormat', './TimePickerSlidersRenderer', './TimePickerSlider', './VisibleItem', 'sap/ui/core/LocaleData', 'sap/ui/Device', 'sap/ui/core/Locale'],
	function (jQuery, coreLibrary, Control, SimpleDateType, ODataType, DateFormat, SlidersRenderer, TimePickerSlider, VisibleItem, LocaleData, Device, Locale) {
		"use strict";

		var DEFAULT_STEP = 1,
			CalendarType = coreLibrary.CalendarType;

		/**
		 * Constructor for a new TimePickerSliders.
		 *
		 * @param {string} [sId] ID for the new control, generated automatically if no ID is given
		 * @param {object} [mSettings] Initial settings for the new control
		 *
		 * @class
		 * A picker list container control used inside the {@link sap.m.TimePicker} or standalone to hold all the sliders.
		 * @extends sap.ui.core.Control
		 *
		 * @author SAP SE
		 * @version ${version}
		 *
		 * @constructor
		 * @public
		 * @since 1.54
		 * @alias sap.m.TimePickerSliders
		 */
		var TimePickerSliders = Control.extend("sap.m.TimePickerSliders", /** @lends sap.m.TimePickerSliders.prototype */ {
			metadata : {
				library : "sap.m",
				properties : {
					/**
					 * Defines the locale used to parse string values representing time.
					 *
					 * Determines the locale, used to interpret the string, supplied by the
					 * value property.
					 *
					 * Example: AM in the string "09:04 AM" is locale (language) dependent.
					 * The format comes from the browser language settings if not set explicitly.
					 * Used in combination with 12 hour displayFormat containing 'a', which
					 * stands for day period string.
					 */
					localeId: {type : "string", group: "Data"},

					/**
					 * Defines the time displayFormat of the sliders.
					 * The displayFormat comes from the browser language settings if not set explicitly.
					 *
					 */
					displayFormat: {name: "displayFormat", type: "string", group: "Appearance"},

					/**
					 * Defines the text of the picker label.
					 *
					 * It is read by screen readers. It is visible only on phone.
					 */
					labelText: {name: "labelText", type: "string"},

					/**
					 * Sets the minutes slider step. If step is less than 1, it will be automatically converted back to 1.
					 * The minutes slider is populated only by multiples of the step.
					 */
					minutesStep: {type: "int", group: "Misc", defaultValue: DEFAULT_STEP},

					/**
					 * Sets the seconds slider step. If step is less than 1, it will be automatically converted back to 1.
					 * The seconds slider is populated only by multiples of the step.
					 */
					secondsStep: {type: "int", group: "Misc", defaultValue: DEFAULT_STEP},

					/**
					 * Sets the width of the container.
					 * The minimum width is 320px.
					 */
					width: {type: "sap.ui.core.CSSSize", group: "Appearance"},

					/**
					 * Sets the height of the container. If percentage value is used the parent container should have
					 * specified height
					 */
					height: {type: "sap.ui.core.CSSSize", group: "Appearance"},

					/**
					 * Defines the value of the control.
					 */
					value: { type: "string", group: "Data", defaultValue: null},

					/**
					 * Determines the format of the value property.
					 */
					valueFormat: {type: "string", group: "Data", defaultValue: null}
				},
				aggregations: {
					/**
					 * Holds the inner sliders.
					 */
					_columns: { type: "sap.m.TimePickerSlider", multiple: true, visibility: "hidden" }
				},
				events: {
					/**
					 * Fired when the value is changed.
					 */
					change: {
						parameters: {

							/**
							 * The new value of the control.
							 */
							value: { type: "string" }
						}
					}
				}
			}
		});

		/**
		 * Initializes the control.
		 *
		 * @private
		 */
		TimePickerSliders.prototype.init = function () {
			var oLocale = sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale(),
				oLocaleData = LocaleData.getInstance(oLocale),
				aPeriods = oLocaleData.getDayPeriods("abbreviated"),
				sDefaultDisplayFormat = oLocaleData.getTimePattern("medium");

			this._fnLayoutChanged = jQuery.proxy(this._onOrientationChanged, this);
			Device.resize.attachHandler(this._fnLayoutChanged);

			this._sAM = aPeriods[0];
			this._sPM = aPeriods[1];

			this._onSliderExpanded = this._onSliderExpanded.bind(this);
			this._onSliderCollapsed = this._onSliderCollapsed.bind(this);

			this.setDisplayFormat(sDefaultDisplayFormat);
			this._setTimeValues();
		};

		/**
		 * Destroys the control.
		 *
		 * @private
		 */
		TimePickerSliders.prototype.exit = function () {
			this.$().off(!!Device.browser.firefox ? "DOMMouseScroll" : "mousewheel", this._onmousewheel);
			Device.resize.detachHandler(this._fnOrientationChanged);
		};

		/**
		 * After rendering
		 * @private
		 */
		TimePickerSliders.prototype.onAfterRendering = function() {
			this.$().off(!!Device.browser.firefox ? "DOMMouseScroll" : "mousewheel", this._onmousewheel);
			this.$().on(!!Device.browser.firefox ? "DOMMouseScroll" : "mousewheel", jQuery.proxy(this._onmousewheel, this));

			if (!Device.browser.msie && this._getShouldOpenSliderAfterRendering()) {
				/* This method is called here prematurely to ensure slider loading on time.
				 * Make sure _the browser native focus_ is not actually set on the early call (the "true" param)
				 * because that fires events and results in unexpected behaviors */
				if (Device.system.desktop) {
					this.getAggregation("_columns")[0].setIsExpanded(true);
				}
			}
		};

		/*
		 * PUBLIC API
		 */

		/**
		 * Sets the localeId property.
		 *
		 * @param {string} sLocaleId The ID of the Locale
		 * @returns {sap.m.TimePickerSliders} this instance, used for chaining
		 * @public
		 */
		TimePickerSliders.prototype.setLocaleId = function(sLocaleId) {
			var oLocale,
				aPeriods;

			sLocaleId = this.validateProperty("localeId", sLocaleId);

			this.setProperty("localeId", sLocaleId, true);

			if (sLocaleId) {
				oLocale = new Locale(sLocaleId);
				aPeriods = LocaleData.getInstance(oLocale).getDayPeriods("abbreviated");

				this._sAM = aPeriods[0];
				this._sPM = aPeriods[1];

				this._destroyColumns();
				this._setupLists();
			}

			return this;
		};

		/**
		 * Sets the time displayFormat.
		 *
		 * @param {string} sFormat New display format
		 * @returns {sap.m.TimePickerSliders} this instance, used for chaining
		 * @public
		 */
		TimePickerSliders.prototype.setDisplayFormat = function (sFormat) {
			this.setProperty("displayFormat", sFormat, true);

			this._destroyColumns();
			this._setupLists();

			return this;
		};

		/**
		 * Sets the text for the picker label.
		 *
		 * @param {string} sLabelText A text for the label
		 * @returns {sap.m.TimePickerSliders} this instance, used for chaining
		 * @public
		 */
		TimePickerSliders.prototype.setLabelText = function(sLabelText) {
			var $ContainerLabel;

			this.setProperty("labelText", sLabelText, true);

			if (!Device.system.desktop) {
				$ContainerLabel = jQuery(this.getDomRef("label"));
				if ($ContainerLabel) {
					$ContainerLabel.html(sLabelText);
				}
			}

			return this;
		};

		/**
		 * Sets the minutes slider step.
		 * @param {int} value The step used to generate values for the minutes slider
		 * @returns {sap.m.TimePickerSliders} this to allow method chaining
		 * @public
		 */
		TimePickerSliders.prototype.setMinutesStep = function(value) {
			value = Math.max(DEFAULT_STEP, value || DEFAULT_STEP);
			this.setProperty("minutesStep", value, true);

			this._destroyColumns();
			this._setupLists();

			return this;
		};

		/**
		 * Sets the seconds slider step.
		 * @param {int} value The step used to generate values for the seconds slider
		 * @returns {sap.m.TimePickerSliders} this to allow method chaining
		 * @public
		 */
		TimePickerSliders.prototype.setSecondsStep = function(value) {
			value = Math.max(DEFAULT_STEP, value || DEFAULT_STEP);
			this.setProperty("secondsStep", value, true);

			this._destroyColumns();
			this._setupLists();

			return this;
		};

		/**
		 * Sets the width of the TimepickerSliders container.
		 * @param {sap.ui.core.CSSSize} sWidth The width of the TimepickerSliders</code< as CSS size
		 * @returns {sap.m.TimepickerSliders} Pointer to the control instance to allow method chaining
		 * @public
		 */
		TimePickerSliders.prototype.setWidth = function (sWidth) {
			this.setProperty("width", sWidth, true);

			this.$().css("width", sWidth);

			return this;
		};

		/**
		 * Sets the height of the TimepickerSliders container.
		 * @param {sap.ui.core.CSSSize} sHeight The height of the TimepickerSliders as CSS size
		 * @returns {sap.m.TimepickerSliders} Pointer to the control instance to allow method chaining
		 * @public
		 */
		TimePickerSliders.prototype.setHeight = function (sHeight) {
			this.setProperty("height", sHeight, true);

			this.$().css("height", sHeight);

			return this;
		};

		/**
		 * Sets the value of the TimepickerSliders container.
		 * @param {string} sValue The value of the TimepickerSliders
		 * @returns {sap.m.TimepickerSliders} Pointer to the control instance to allow method chaining
		 * @public
		 */
		TimePickerSliders.prototype.setValue = function (sValue) {
			sValue = this.validateProperty("value", sValue);

			this.setProperty("value", sValue, true); // no rerendering

			// convert to date object
			var oDate;
			if (sValue) {
				oDate = this._parseValue(sValue);
			}
			if (oDate) {
				this._setTimeValues(oDate);
			}

			return this;
		};

		/**
		 * Gets the time values from the sliders, as a date object.
		 *
		 * @returns {Object} A JavaScript date object
		 * @public
		 */
		TimePickerSliders.prototype.getTimeValues = function () {
			var oCore = sap.ui.getCore(),
				oListHours = oCore.byId(this.getId() + "-listHours"),
				oListMinutes = oCore.byId(this.getId() + "-listMins"),
				oListSeconds = oCore.byId(this.getId() + "-listSecs"),
				oListAmPm = oCore.byId(this.getId() + "-listFormat"),
				iHours = null,
				sAmpm = null,
				oDateValue = new Date();

			if (oListHours) {
				iHours = parseInt(oListHours.getSelectedValue(), 10);
			}

			if (oListAmPm) {
				sAmpm = oListAmPm.getSelectedValue();
			}

			if (sAmpm === "am" && iHours === 12) {
				iHours = 0;
			} else if (sAmpm === "pm" && iHours !== 12) {
				iHours += 12;
			}

			if (iHours !== null) {
				oDateValue.setHours(iHours.toString());
			}

			if (oListMinutes) {
				oDateValue.setMinutes(oListMinutes.getSelectedValue());
			}

			if (oListSeconds) {
				oDateValue.setSeconds(oListSeconds.getSelectedValue());
			}

			return oDateValue;
		};

		/**
		 * Collapses all the slider controls.
		 *
		 * @returns {sap.m.TimepickerSliders} Pointer to the control instance to allow method chaining
		 * @public
		 *
		 */
		TimePickerSliders.prototype.collapseAll = function () {
			//collapse the expanded sliders
			var aSliders = this.getAggregation("_columns");

			if (aSliders) {
				for ( var iIndex = 0; iIndex < aSliders.length; iIndex++) {
					if (aSliders[iIndex].getIsExpanded()) {
						aSliders[iIndex].setIsExpanded(false);
					}
				}
			}

			return this;
		};

		/**
		 * Opens first slider.
		 *
		 * @returns {sap.m.TimepickerSliders} Pointer to the control instance to allow method chaining
		 *
		 * @public
		 */
		TimePickerSliders.prototype.openFirstSlider = function() {
			var oFirstSlider = this.getAggregation("_columns")[0];

			oFirstSlider.setIsExpanded(true);
			oFirstSlider.focus();

			return this;
		};

		/*
		 * PRIVATE API
		 */
		/**
		 * Sets the values of the slider controls, given a JavaScript date object.
		 *
		 * @param {Object} oDate The date to use as a setting, if not provided the current date will be used
		 * @private
		 */
		TimePickerSliders.prototype._setTimeValues = function (oDate) {
			var oCore = sap.ui.getCore(),
				oListHours = oCore.byId(this.getId() + "-listHours"),
				oListMinutes = oCore.byId(this.getId() + "-listMins"),
				oListSeconds = oCore.byId(this.getId() + "-listSecs"),
				oListAmPm = oCore.byId(this.getId() + "-listFormat"),
				iHours,
				sAmPm = null;

			oDate = oDate || new Date();

			if (oDate && !(oDate instanceof Date)) {
				throw new Error("Date must be a JavaScript date object; " + this);
			}

			// convert date object to value
			var sValue = this._formatValue(oDate, true);

			// set the property in any case but check validity on output
			this.setProperty("value", sValue, true); // no rerendering

			iHours = oDate.getHours();

			if (oListAmPm) {
				//ToDo: Replace this hardcoded values with their translated text in order to have UI API value consistency
				sAmPm = iHours >= 12 ? "pm" : "am";
				iHours = (iHours > 12) ? iHours - 12 : iHours;
				iHours = (iHours === 0 ? 12 : iHours);
			}

			oListHours && oListHours.setSelectedValue(iHours.toString());
			oListMinutes && oListMinutes._updateStepAndValue(oDate.getMinutes(), this.getMinutesStep());
			oListSeconds && oListSeconds._updateStepAndValue(oDate.getSeconds(), this.getSecondsStep());
			oListAmPm && oListAmPm.setSelectedValue(sAmPm);
		};

		/**
		 * Updates the values of all slider controls.
		 *
		 * @private
		 */
		TimePickerSliders.prototype._updateSlidersValues = function () {
			//collapse the expanded slider
			var aSliders = this.getAggregation("_columns");

			if (aSliders) {
				for ( var iIndex = 0; iIndex < aSliders.length; iIndex++) {
					aSliders[iIndex]._updateScroll(); //updates scroll position if needed
				}
			}
		};

		/**
		 * Handles the home key event.
		 *
		 * Focuses the first slider control.
		 * @param {jQuery.Event} oEvent Event object
		 * @private
		 */
		TimePickerSliders.prototype.onsaphome = function(oEvent) {
			var oCurrentSlider = this._getCurrentSlider();

			if (oCurrentSlider && document.activeElement === oCurrentSlider.getDomRef()) {
				this.getAggregation("_columns")[0].focus();
			}
		};

		/**
		 * Handles the end key event.
		 *
		 * Focuses the last slider control.
		 * @param {jQuery.Event} oEvent Event object
		 * @private
		 */
		TimePickerSliders.prototype.onsapend = function(oEvent) {
			var oCurrentSlider = this._getCurrentSlider();

			if (oCurrentSlider && document.activeElement === oCurrentSlider.getDomRef()) {
				var aSliders = this.getAggregation("_columns");
				aSliders[aSliders.length - 1].focus();
			}
		};

		/**
		 * Handles the left arrow key event.
		 *
		 * Focuses the previous slider control.
		 * @param {jQuery.Event} oEvent Event object
		 * @private
		 */
		TimePickerSliders.prototype.onsapleft = function(oEvent) {
			var oCurrentSlider = this._getCurrentSlider(),
				iCurrentSliderIndex = -1,
				iNextIndex = -1,
				aSliders = this.getAggregation("_columns");

			if (oCurrentSlider && document.activeElement === oCurrentSlider.getDomRef()) {
				iCurrentSliderIndex = aSliders.indexOf(oCurrentSlider);
				iNextIndex = iCurrentSliderIndex > 0 ? iCurrentSliderIndex - 1 : aSliders.length - 1;
				aSliders[iNextIndex].focus();
			}
		};

		/**
		 * Handles the right arrow key event.
		 *
		 * Focuses the next slider control.
		 * @param {jQuery.Event} oEvent Event object
		 * @private
		 */
		TimePickerSliders.prototype.onsapright = function(oEvent) {
			var oCurrentSlider = this._getCurrentSlider(),
				iCurrentSliderIndex = -1,
				iNextIndex = -1,
				aSliders = this.getAggregation("_columns");

			if (oCurrentSlider && document.activeElement === oCurrentSlider.getDomRef()) {
				iCurrentSliderIndex = aSliders.indexOf(oCurrentSlider);
				iNextIndex = iCurrentSliderIndex < aSliders.length - 1 ? iCurrentSliderIndex + 1 : 0;
				aSliders[iNextIndex].focus();
			}
		};

		/**
		 * Handles the mouse scroll event.
		 *
		 * @param {jQuery.Event} oEvent Event object
		 * @private
		 */
		TimePickerSliders.prototype._onmousewheel = function(oEvent) {
			var currentSlider = this._getCurrentSlider();

			if (currentSlider) {
				currentSlider._onmousewheel(oEvent);
			}
		};

		/**
		 * Handles the orientation change event.
		 *
		 * @private
		 */
		TimePickerSliders.prototype._onOrientationChanged = function() {
			var aSliders = this.getAggregation("_columns");

			if (!aSliders) {
				return;
			}

			for ( var i = 0; i < aSliders.length; i++) {
				if (aSliders[i].getIsExpanded()) {
					aSliders[i]._updateSelectionFrameLayout();
				}
			}
		};

		/**
		 * Generates the sliders' control values in the provided number range.
		 *
		 * @param {number} iFrom Starting number
		 * @param {number} iTo Ending number
		 * @param {int} iStep The step used for the slider
		 * @param {number} bLeadingZeroes Whether to add leading zeroes to number values
		 * @returns {array} Array of key/value pairs
		 * @private
		 */
		TimePickerSliders.prototype._generatePickerListValues = function (iFrom, iTo, iStep, bLeadingZeroes) {
			var aValues = [],
				sText;

			for (var iIndex = iFrom; iIndex <= iTo; iIndex += 1) {
				if (iIndex < 10 && bLeadingZeroes) {
					sText = "0" + iIndex.toString();
				} else {
					sText = iIndex.toString();
				}

				var oItem = new VisibleItem({
					key: iIndex.toString(),
					text: sText
				});

				if (iIndex % iStep !== 0) {
					oItem.setVisible(false);
				}

				aValues.push(oItem);
			}

			return aValues;
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._checkStyle = function (sPattern) {
			return (sPattern === "short" || sPattern === "medium" || sPattern === "long" || sPattern === "full");
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getDisplayFormatPattern = function () {
			var sPattern = this.getDisplayFormat();

			if (this._checkStyle(sPattern)) {
				sPattern = this._getLocaleBasedPattern(sPattern);
			}

			return sPattern;
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getLocaleBasedPattern = function (sPlaceholder) {
			return LocaleData.getInstance(
				sap.ui.getCore().getConfiguration().getFormatSettings().getFormatLocale()
			).getTimePattern(sPlaceholder);
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._destroyColumns = function () {
			var aColumns = this.getAggregation("_columns");

			if (aColumns) {
				this.destroyAggregation("_columns");
			}
		};

		/**
		 * Creates the sliders of the picker based on the format.
		 *
		 * @param {string} sFormat Display format
		 * @private
		 */
		TimePickerSliders.prototype._setupLists = function () {
			var oRb = sap.ui.getCore().getLibraryResourceBundle("sap.m"),
				sLabelHours = oRb.getText("TIMEPICKER_LBL_HOURS"),
				sLabelMinutes = oRb.getText("TIMEPICKER_LBL_MINUTES"),
				sLabelSeconds = oRb.getText("TIMEPICKER_LBL_SECONDS"),
				//ToDo This value will be always "AM/PM" due to bad translation string. Consider replacing it with something like this._sAM + / + this._sPM
				sLabelAMPM = oRb.getText("TIMEPICKER_LBL_AMPM"),
				iMinutesStep = this.getMinutesStep(),
				iSecondsStep = this.getSecondsStep(),
				sFormat = this._getDisplayFormatPattern();

			if (sFormat === undefined) {
				return;
			}

			var bHours = false, bHoursTrailingZero = false, iFrom, iTo;

			if (sFormat.indexOf("HH") !== -1) {
				bHours = true;
				iFrom = 0;
				iTo = 23;
				bHoursTrailingZero = true;
			} else if (sFormat.indexOf("H") !== -1) {
				bHours = true;
				iFrom = 0;
				iTo = 23;
			} else if (sFormat.indexOf("hh") !== -1) {
				bHours = true;
				iFrom = 1;
				iTo = 12;
				bHoursTrailingZero = true;
			} else if (sFormat.indexOf("h") !== -1) {
				bHours = true;
				iFrom = 1;
				iTo = 12;
			}

			if (bHours) {
				this.addAggregation("_columns", new TimePickerSlider(this.getId() + "-listHours", {
					items: this._generatePickerListValues(iFrom, iTo, 1, bHoursTrailingZero),
					expanded: this._onSliderExpanded,
					collapsed: this._onSliderCollapsed,
					label: sLabelHours
				}));
			}

			if (sFormat.indexOf("m") !== -1) {
				var aValues = this._generatePickerListValues(0, 59, iMinutesStep, true);

				this.addAggregation("_columns", new TimePickerSlider(this.getId() + "-listMins", {
					items: aValues,
					expanded: this._onSliderExpanded,
					collapsed: this._onSliderCollapsed,
					label: sLabelMinutes
				}));
			}

			if (sFormat.indexOf("s") !== -1) {
				var aValues = this._generatePickerListValues(0, 59, iSecondsStep, true);
				this.addAggregation("_columns", new TimePickerSlider(this.getId() + "-listSecs", {
					items: aValues,
					expanded: this._onSliderExpanded,
					collapsed: this._onSliderCollapsed,
					label: sLabelSeconds
				}));
			}

			if (sFormat.indexOf("a") !== -1) {
				this.addAggregation("_columns", new TimePickerSlider(this.getId() + "-listFormat", {
					items: [
						{ key: "am", text: this._sAM },
						{ key: "pm", text: this._sPM }
					],
					expanded: this._onSliderExpanded,
					collapsed: this._onSliderCollapsed,
					label: sLabelAMPM,
					isCyclic: false
				}).addStyleClass("sapMTimePickerSliderShort"));
			}

			// convert to date object
			var oDate,
				sValue = this.getValue();

			if (sValue) {
				oDate = this._parseValue(sValue);
			}
			if (oDate) {
				this._setTimeValues(oDate);
			}
		};

		/**
		 * Gets the currently expanded slider control.
		 *
		 * @returns {sap.m.TimePickerSlider|null} Currently expanded slider control or null if there is none
		 * @private
		 */
		TimePickerSliders.prototype._getCurrentSlider = function() {
			var aSliders = this.getAggregation("_columns");

			if (aSliders) {
				for (var i = 0; i < aSliders.length; i++) {
					if (aSliders[i].getIsExpanded()) {
						return aSliders[i];
					}
				}
			}

			return null;
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._parseValue = function (sValue) {
			return this._getFormatter().parse(sValue);
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getFormatter = function () {
			var sPattern = this._getBoundValueTypePattern(),
				bRelative = false, // if true strings like "Tomorrow" are parsed fine
				oBinding = this.getBinding("value"),
				sCalendarType;

			if (oBinding && oBinding.oType && oBinding.oType.oOutputFormat) {
				bRelative = !!oBinding.oType.oOutputFormat.oFormatOptions.relative;
				sCalendarType = oBinding.oType.oOutputFormat.oFormatOptions.calendarType;
			}

			if (!sPattern) {
				// not databinding is used -> use given format
				sPattern = this.getValueFormat() || "medium";
				sCalendarType = CalendarType.Gregorian;
			}

			if (!sCalendarType) {
				sCalendarType = sap.ui.getCore().getConfiguration().getCalendarType();
			}

			return this._getFormatterInstance(sPattern, bRelative, sCalendarType);
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getBoundValueTypePattern = function () {
			var oBinding = this.getBinding("value"),
				oBindingType = oBinding && oBinding.getType && oBinding.getType();

			if (oBindingType instanceof SimpleDateType) {
				return oBindingType.getOutputPattern();
			}

			if (oBindingType instanceof ODataType && oBindingType.oFormat) {
				return oBindingType.oFormat.oFormatOptions.pattern;
			}

			return undefined;
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getFormatterInstance = function (sPattern, bRelative, sCalendarType, bDisplayFormat) {
			var oFormat;

			if (this._checkStyle(sPattern)) {
				oFormat = this._getFormatInstance({style: sPattern, strictParsing: true, relative: bRelative, calendarType: sCalendarType});
			} else {
				oFormat = this._getFormatInstance({pattern: sPattern, strictParsing: true, relative: bRelative, calendarType: sCalendarType});
			}

			return oFormat;
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getFormatInstance = function (oArguments, bDisplayFormat) {
			return DateFormat.getTimeInstance(oArguments);
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._formatValue = function (oDate) {
			if (oDate) {
				return this._getFormatter().format(oDate);
			}

			return "";
		};

		/**
		 * Default expanded handler
		 * @param {jQuery.Event} oEvent  Event object
		 * @private
		 */
		TimePickerSliders.prototype._onSliderExpanded = function (oEvent) {
			var aSliders = this.getAggregation("_columns");

			for (var i = 0; i < aSliders.length; i++) {
				if (aSliders[i] !== oEvent.oSource && aSliders[i].getIsExpanded()) {
					aSliders[i].setIsExpanded(false);
				}
			}
		};

		/**
		 * Default collapsed handler
		 * @param {jQuery.Event} oEvent  Event object
		 * @private
		 */
		TimePickerSliders.prototype._onSliderCollapsed = function (oEvent) {
			var oDate = this.getTimeValues();

			this.setValue(this._formatValue(oDate, true));

			this.fireChange({ value: this.getValue() });
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._getShouldOpenSliderAfterRendering = function () {
			return this._shouldOpenSliderAfterRendering;
		};

		/**
		 * @private
		 */
		TimePickerSliders.prototype._setShouldOpenSliderAfterRendering = function (bShouldOpenSliderAfterRendering) {
			this._shouldOpenSliderAfterRendering = bShouldOpenSliderAfterRendering;

			return this;
		};

		return TimePickerSliders;
	});


text:
using System;
using Gtk;

public partial class MainWindow: Gtk.Window
{
	public MainWindow (): base (Gtk.WindowType.Toplevel)
	{
		Build ();
		this.Title = "Randomizer";
		this.AllowGrow = true;
		button3.Clicked += new System.EventHandler(this.button3_Click);
	}

	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
	{
		Application.Quit ();
		a.RetVal = true;
	}
	private void button3_Click(object sender, EventArgs e)
	{
		Random r = new Random ();
		double eggs = r.Next (100, 9999);
		int i = r.Next (1, 5);
		while (i != 0) { //Math.Floor because of all teh 1's
			i = i - 1;
			eggs = Math.Sqrt (eggs);
		}
		int multiply = r.Next (1, 10); //Pick a number 1 through 10
		multiply = Convert.ToInt32 (Math.Pow (10, multiply)); //Convert that number to an exponent of 10
		eggs = Math.Floor (eggs * multiply); //eeeeeggggssssss
		string finale = Convert.ToString (eggs);
		int digitSelector = r.Next (0, finale.Length);
		finale = finale.Substring (digitSelector, 1);
		if (finale == "0") {
			label1.Text = "10";
		}
		else {
		label1.Text = finale;
		}
		//go compile yourself
	}
}


text:
@interface Mild : Salsa

@end


text:
"""
    Common db shortcuts
    ===================

    This module provides common helper functions that can be used to manipulate model data.

"""

def get_or_create(session, model, **kwargs):
    """ Gets ot creates a model instance. """
    instance = session.query(model).filter_by(**kwargs).first()
    if instance:
        return instance, False
    else:
        instance = model(**kwargs)
        session.add(instance)
        session.commit()
        return instance, True


text:
package top.phrack.ctf.pojo;

import java.io.Serializable;

public class Countries implements Serializable{
	private static final long serialVersionUID = 1L;
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column public.countries.id
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    private Long id;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column public.countries.countryname
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    private String countryname;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database column public.countries.countrycode
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    private String countrycode;

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column public.countries.id
     *
     * @return the value of public.countries.id
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    public Long getId() {
        return id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column public.countries.id
     *
     * @param id the value for public.countries.id
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column public.countries.countryname
     *
     * @return the value of public.countries.countryname
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    public String getCountryname() {
        return countryname;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column public.countries.countryname
     *
     * @param countryname the value for public.countries.countryname
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    public void setCountryname(String countryname) {
        this.countryname = countryname == null ? null : countryname.trim();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method returns the value of the database column public.countries.countrycode
     *
     * @return the value of public.countries.countrycode
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    public String getCountrycode() {
        return countrycode;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method sets the value of the database column public.countries.countrycode
     *
     * @param countrycode the value for public.countries.countrycode
     *
     * @mbggenerated Thu Mar 31 16:07:59 CST 2016
     */
    public void setCountrycode(String countrycode) {
        this.countrycode = countrycode == null ? null : countrycode.trim();
    }
}


text:
/**
 * Created by jhank on 4/13/2017.
 */

import React, { Component } from 'react';
import {
    Image,
    TouchableHighlight,

} from 'react-native';

export class ImageButton extends Component {
    render() {
        return(
            <TouchableHighlight
                style = {[this.props.imageStyle, {borderRadius: 500}]}
                onPress={this.props.onPress}
                underlayColor={'black'}
                activeOpacity={0.60}
            >
                <Image source={ // Yes, this is not beautiful, but paths MUST be static, and this should not affect throughput
                    this.props.imageName === 'center' ? require('../images/centerbutton.png') :
                    this.props.imageName === 'pin' ? require('../images/pinbutton.png') :
                    this.props.imageName === 'refresh' ? require('../images/refreshbutton.png') :
                    this.props.imageName === 'check' ? require('../images/checkbutton.png') :
                    this.props.imageName === 'Gas' ? require('../images/gas.png') :
                    this.props.imageName === 'Water' ? require('../images/water.png') :
                    this.props.imageName === 'Roadblock' ? require('../images/roadblock.png') :
                    this.props.imageName === 'Hospital' ? require('../images/hospital.png') :
                    this.props.imageName === 'Food' ? require('../images/food.png') :
                    this.props.imageName === 'Power Outage' ? require('../images/nopower.png') :
                    this.props.imageName === 'verify' ? require("../images/Verify.png") :
                    this.props.imageName === 'dispute' ? require("../images/Dispute.png") :
                    this.props.imageName === 'verifyGray' ? require("../images/VerifyGray.png") :
                    this.props.imageName === 'disputeGray' ? require("../images/DisputeGray.png") :
                    this.props.imageName === 'settings' ? require("../images/settings.png") :
                    this.props.imageName === 'grayX' ? require("../images/lightGrayX.png") :
                    this.props.imageName === 'back' ? require("../images/backarrow.png") :
                    this.props.imageName === 'download' ? require("../images/download.png") :
                    this.props.imageName === 'nextpage' ? require("../images/feedforward.png") :
                    this.props.imageName === 'lastpage' ? require("../images/feedbackwards.png") :
                    this.props.imageName === 'login' ? require("../images/login.png") :
                    require("../images/xbutton.png")}
                       style={[this.props.imageStyle, {margin: 0}]}/>
            </TouchableHighlight>
        );
    }
}


text:
// Generated by Haxe 3.3.0
#ifndef INCLUDED_openfl__legacy_display_OptimizedPerlin
#define INCLUDED_openfl__legacy_display_OptimizedPerlin

#ifndef HXCPP_H
#include <hxcpp.h>
#endif

HX_DECLARE_CLASS3(openfl,_legacy,display,BitmapData)
HX_DECLARE_CLASS3(openfl,_legacy,display,IBitmapDrawable)
HX_DECLARE_CLASS3(openfl,_legacy,display,OptimizedPerlin)

namespace openfl{
namespace _legacy{
namespace display{

class HXCPP_CLASS_ATTRIBUTES OptimizedPerlin_obj : public hx::Object
{
	public:
		typedef hx::Object super;
		typedef OptimizedPerlin_obj OBJ_;
		OptimizedPerlin_obj();

	public:
		void __construct(hx::Null< Int >  __o_seed,hx::Null< Int >  __o_numOctaves,hx::Null< Float >  __o_falloff);
		inline void *operator new(size_t inSize, bool inContainer=true,const char *inName="openfl._legacy.display.OptimizedPerlin")
			{ return hx::Object::operator new(inSize,inContainer,inName); }
		inline void *operator new(size_t inSize, int extra)
			{ return hx::Object::operator new(inSize+extra,true,"openfl._legacy.display.OptimizedPerlin"); }
		static hx::ObjectPtr< OptimizedPerlin_obj > __new(hx::Null< Int >  __o_seed,hx::Null< Int >  __o_numOctaves,hx::Null< Float >  __o_falloff);
		static Dynamic __CreateEmpty();
		static Dynamic __Create(hx::DynamicArray inArgs);
		//~OptimizedPerlin_obj();

		HX_DO_RTTI_ALL;
		hx::Val __Field(const ::String &inString, hx::PropertyAccess inCallProp);
		static bool __GetStatic(const ::String &inString, Dynamic &outValue, hx::PropertyAccess inCallProp);
		hx::Val __SetField(const ::String &inString,const hx::Val &inValue, hx::PropertyAccess inCallProp);
		static bool __SetStatic(const ::String &inString, Dynamic &ioValue, hx::PropertyAccess inCallProp);
		void __GetFields(Array< ::String> &outFields);
		static void __register();
		void __Mark(HX_MARK_PARAMS);
		void __Visit(HX_VISIT_PARAMS);
		::String __ToString() const { return HX_HCSTRING("OptimizedPerlin","\xbb","\xfa","\x7d","\x3b"); }

		static void __boot();
		static ::Array< Int > P;
		Int octaves;
		::Array< Float > aOctFreq;
		::Array< Float > aOctPers;
		Float fPersMax;
		Float iXoffset;
		Float iYoffset;
		Float iZoffset;
		Float baseFactor;
		void fill( ::openfl::_legacy::display::BitmapData bitmap,Float _x,Float _y,Float _z, ::Dynamic _);
		::Dynamic fill_dyn();

		void octFreqPers(Float fPersistence);
		::Dynamic octFreqPers_dyn();

		void seedOffset(Int iSeed);
		::Dynamic seedOffset_dyn();

};

} // end namespace openfl
} // end namespace _legacy
} // end namespace display

#endif /* INCLUDED_openfl__legacy_display_OptimizedPerlin */


text:
.loadingContainer {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 16px;
}


text:
In this example we will use two tables Employee and Salary.

#### One to One
In the Parent Table Model we add a reference to the Child Model.
```
public SalaryModel Salary { get; set; }
```

In the Child Model we add the Foreign Key and a reference to the Parent Model.
```
[ForeignKey("Employee")]
public int EmployeeId { get; set; }

public EmployeeModel Employee { get; set; }
```

#### One to Many
In the Parent Table Model we add a ICollection reference to the Child Model.
```
public ICollection<SalaryModel> Salary { get; set; }
```

In the Child Model we add the Foreign Key and a reference to the Parent Model.
```
[ForeignKey("Employee")]
public int EmployeeId { get; set; }

public EmployeeModel Employee { get; set; }
```

#### Many to Many

#### Cascading Delete

- Source(s)
  - [1](link1)
  - [2](link2)


text:
package Core::ProcessMemory;

use strict;
use warnings;

use base 'Resmon::Module';

use Resmon::ExtComm qw(run_command);

=pod

=head1 NAME

Core::ProcessMemory - Memmory usage of processes

=head1 SYNOPSIS

 Core::ProcessMemory {
     myproc : pattern => foo.sh -c foo
 }

 Core::ProcessMemory {
     myproc : pgrep_path => /bin/pgrep, pattern => foo.sh

=head1 DESCRIPTION

This module uses pgrep in full mode to obtain a list of process IDs, then totals several memory statistics for those processes.  The totals are then reported.

=head1 CONFIGURATION

=over

=item check_name

The check name is descriptive only in this check. It is not used for anything.

=item pattern

The patter to match against the command line (as used by pgrep -f)

=item pgrep_path

Specify an alternate path to pgrep. Optional.

=back

=head1 METRICS

=over

=item process_count

How many matching processes are running.

=item total_vsz_kbytes

The sum of the virtual memory usage (VSZ output of ps) for all matching processes.

=item total_rss_kbytes

The sum of the resident set size (RSS output of ps) for all matching processes.

=item total_pmem_pct

The sum of the percentage of physical memory used (PMEM output of ps) for all matching processes.

=back

=cut

sub handler {
    my $self = shift;
    my $config = $self->{config}; # All configuration is in here
    my $pgrep_path = $config->{pgrep_path} || 'pgrep';

    my $args;
    my $actual_count = 0;
    my $vsz_total = 0;
    my $rss_total = 0;
    my $pmem_total = 0;

    my @output_lines;
    my @pids;

    # Run pgrep to get process IDs
    if ( $^O eq "solaris" ) {
      my $zonename = `zonename`;
      chomp $zonename;
      $args .= "-z $zonename ";
    }
    $args .= "-f";
    # This will contain a single blank at the end
    my $cmd = "$pgrep_path $args \'$config->{pattern}\'";
    #warn " Have pgrep command: $cmd\n";
    @output_lines = split(/\n/, (run_command($cmd)) );
    @output_lines = grep { $_ ne '' } @output_lines;
    @pids = @output_lines;
    my $apparent_count = @pids;

    # This is really stupid, but sometimes the shell that was used for pgrep will appear in the PID listing.
    # It won't be running at this point.
    if ($apparent_count) {
        my $pids = join(',', @pids);
        #warn " Have pids: $pids\n";

        my $ps;
        if ( $^O eq "solaris" ) {
            $ps = '/usr/bin/ps';
            $args = "-o vsz= -o rss= -o pmem=";
        } else {
            $ps = '/bin/ps';
            $args = "-o vsz,rss,pmem";
        }

        my $cmd = "$ps $args -p $pids";
        # warn " Have ps command: $cmd\n";
        @output_lines = split(/\n/, (run_command($cmd)) );
        @output_lines = grep { $_ ne '' } @output_lines;
        foreach my $line (@output_lines) {
            my ($vsz, $rss, $pmem) = $line =~ /(\d+)\s+(\d+)\s+(\d+\.\d+)/;
            next unless $vsz;
            $actual_count++;
            $vsz_total  += $vsz;
            $rss_total  += $rss;
            $pmem_total += $pmem;
        }
    }

    return {
            process_count    => [$actual_count, 'i'],
            total_vsz_kbytes => [$vsz_total, 'i'],
            total_rss_kbytes => [$rss_total, 'i'],
            total_pmem_pct   => [$pmem_total, 'n'],
           };
};

1;


text:
/* ----------------------------------------------------------------------
 * Project:      CMSIS DSP Library
 * Title:        arm_mat_scale_q31.c
 * Description:  Multiplies a Q31 matrix by a scalar
 *
 * $Date:        27. January 2017
 * $Revision:    V.1.5.1
 *
 * Target Processor: Cortex-M cores
 * -------------------------------------------------------------------- */
/*
 * Copyright (C) 2010-2017 ARM Limited or its affiliates. All rights reserved.
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Licensed under the Apache License, Version 2.0 (the License); you may
 * not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an AS IS BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include "arm_math.h"

/**
 * @ingroup groupMatrix
 */

/**
 * @addtogroup MatrixScale
 * @{
 */

/**
 * @brief Q31 matrix scaling.
 * @param[in]       *pSrc points to input matrix
 * @param[in]       scaleFract fractional portion of the scale factor
 * @param[in]       shift number of bits to shift the result by
 * @param[out]      *pDst points to output matrix structure
 * @return     		The function returns either
 * ARM_MATH_SIZE_MISMATCH or ARM_MATH_SUCCESS based on the outcome of size checking.
 *
 * @details
 * Scaling and Overflow Behavior:
 * \par
 * The input data *pSrc and scaleFract are in 1.31 format.
 * These are multiplied to yield a 2.62 intermediate result and this is shifted with saturation to 1.31 format.
 */

arm_status arm_mat_scale_q31(
  const arm_matrix_instance_q31 * pSrc,
  q31_t scaleFract,
  int32_t shift,
  arm_matrix_instance_q31 * pDst)
{
  q31_t *pIn = pSrc->pData;                      /* input data matrix pointer */
  q31_t *pOut = pDst->pData;                     /* output data matrix pointer */
  uint32_t numSamples;                           /* total number of elements in the matrix */
  int32_t totShift = shift + 1;                  /* shift to apply after scaling */
  uint32_t blkCnt;                               /* loop counters  */
  arm_status status;                             /* status of matrix scaling      */
  q31_t in1, in2, out1;                          /* temporary variabels */

#if defined (ARM_MATH_DSP)

  q31_t in3, in4, out2, out3, out4;              /* temporary variables */

#endif //      #ifndef ARM_MAT_CM0

#ifdef ARM_MATH_MATRIX_CHECK
  /* Check for matrix mismatch  */
  if ((pSrc->numRows != pDst->numRows) || (pSrc->numCols != pDst->numCols))
  {
    /* Set status as ARM_MATH_SIZE_MISMATCH */
    status = ARM_MATH_SIZE_MISMATCH;
  }
  else
#endif //    #ifdef ARM_MATH_MATRIX_CHECK
  {
    /* Total number of samples in the input matrix */
    numSamples = (uint32_t) pSrc->numRows * pSrc->numCols;

#if defined (ARM_MATH_DSP)

    /* Run the below code for Cortex-M4 and Cortex-M3 */

    /* Loop Unrolling */
    blkCnt = numSamples >> 2U;

    /* First part of the processing with loop unrolling.  Compute 4 outputs at a time.
     ** a second loop below computes the remaining 1 to 3 samples. */
    while (blkCnt > 0U)
    {
      /* C(m,n) = A(m,n) * k */
      /* Read values from input */
      in1 = *pIn;
      in2 = *(pIn + 1);
      in3 = *(pIn + 2);
      in4 = *(pIn + 3);

      /* multiply input with scaler value */
      in1 = ((q63_t) in1 * scaleFract) >> 32;
      in2 = ((q63_t) in2 * scaleFract) >> 32;
      in3 = ((q63_t) in3 * scaleFract) >> 32;
      in4 = ((q63_t) in4 * scaleFract) >> 32;

      /* apply shifting */
      out1 = in1 << totShift;
      out2 = in2 << totShift;

      /* saturate the results. */
      if (in1 != (out1 >> totShift))
        out1 = 0x7FFFFFFF ^ (in1 >> 31);

      if (in2 != (out2 >> totShift))
        out2 = 0x7FFFFFFF ^ (in2 >> 31);

      out3 = in3 << totShift;
      out4 = in4 << totShift;

      *pOut = out1;
      *(pOut + 1) = out2;

      if (in3 != (out3 >> totShift))
        out3 = 0x7FFFFFFF ^ (in3 >> 31);

      if (in4 != (out4 >> totShift))
        out4 = 0x7FFFFFFF ^ (in4 >> 31);

      *(pOut + 2) = out3;
      *(pOut + 3) = out4;

      /* update pointers to process next sampels */
      pIn += 4U;
      pOut += 4U;

      /* Decrement the numSamples loop counter */
      blkCnt--;
    }

    /* If the numSamples is not a multiple of 4, compute any remaining output samples here.
     ** No loop unrolling is used. */
    blkCnt = numSamples % 0x4U;

#else

    /* Run the below code for Cortex-M0 */

    /* Initialize blkCnt with number of samples */
    blkCnt = numSamples;

#endif /* #if defined (ARM_MATH_DSP) */

    while (blkCnt > 0U)
    {
      /* C(m,n) = A(m,n) * k */
      /* Scale, saturate and then store the results in the destination buffer. */
      in1 = *pIn++;

      in2 = ((q63_t) in1 * scaleFract) >> 32;

      out1 = in2 << totShift;

      if (in2 != (out1 >> totShift))
        out1 = 0x7FFFFFFF ^ (in2 >> 31);

      *pOut++ = out1;

      /* Decrement the numSamples loop counter */
      blkCnt--;
    }

    /* Set status as ARM_MATH_SUCCESS */
    status = ARM_MATH_SUCCESS;
  }

  /* Return to application */
  return (status);
}

/**
 * @} end of MatrixScale group
 */


text:
package zego

import (
	"encoding/json"
)

type TicketArray struct {
	Count         int    `json:"count"`
	Created       string `json:"created"`
	Next_page     string `json:"next_page"`
	Previous_page string `json:"previous_page"`
	Tickets       []Ticket
}

type SingleTicket struct {
	Ticket *Ticket `json:"ticket"`
}

type Ticket struct {
	Id                    uint64      `json:"id"`
	URL                   string      `json:"url"`
	ExternalId            string      `json:"external_id"`
	CreatedAt             string      `json:"created_at"`
	UpdatedAt             string      `json:"updated_at"`
	Type                  string      `json:"type"`
	Subject               string      `json:"subject"`
	RawSubject            string      `json:"raw_subject"`
	Description           string      `json:"description"`
	Priority              string      `json:"priority"`
	Status                string      `json:"status"`
	Recipient             string      `json:"recipient"`
	RequesterId           uint32      `json:"requester_id"`
	SubmitterId           uint32      `json:"submitter_id"`
	AssigneeId            uint32      `json:"assignee_id"`
	OrganizationId        uint32      `json:"organization_id"`
	GroupId               uint32      `json:"group_id"`
	CollaboratorIds       []int32     `json:"collaborator_ids"`
	ForumTopicId          uint32      `json:"forum_topic_id"`
	ProblemId             uint32      `json:"problem_id"`
	HasIncidents          bool        `json:"has_incidents"`
	DueAt                 string      `json:"due_at"`
	Tags                  []string    `json:"tags"`
	Satisfaction_rating   string      `json:"satisfaction_rating"`
	Ticket_form_id        uint32      `json:"ticket_form_id"`
	Sharing_agreement_ids interface{} `json:"sharing_agreement_ids"`
	Via                   interface{} `json:"via"`
	Custom_Fields         interface{} `json:"custom_fields"`
	Fields                interface{} `json:"fields"`
}

func (a Auth) ListTickets(pag ...string) (*TicketArray, error) {

	TicketStruct := &TicketArray{}

	var path string
	if len(pag) < 1 {
		path = "/tickets.json"
	} else {
		path = pag[0]
	}
	resource, err := api(a, "GET", path, "")
	if err != nil {
		return nil, err
	}

	json.Unmarshal([]byte(resource.Raw), TicketStruct)

	return TicketStruct, nil

}

func (a Auth) GetTicket(ticket_id string) (*SingleTicket, error) {

	TicketStruct := &SingleTicket{}

	path := "/tickets/" + ticket_id + ".json"
	resource, err := api(a, "GET", path, "")
	if err != nil {
		return nil, err
	}

	json.Unmarshal([]byte(resource.Raw), TicketStruct)

	return TicketStruct, nil

}

func (a Auth) GetMultipleTickets(ticket_id string) (*Resource, error) {

	path := "/tickets/" + ticket_id + ".json"
	resource, err := api(a, "GET", path, "")
	if err != nil {
		return nil, err
	}

	return resource, nil

}

func (a Auth) GetTicketComments(ticket_id string) (*Resource, error) {

	path := "/tickets/" + ticket_id + "/comments.json"
	resource, err := api(a, "GET", path, "")
	if err != nil {
		return nil, err
	}

	return resource, nil

}

func (a Auth) DeleteTicket(ticket_id string) (*Resource, error) {

	path := "/tickets/" + ticket_id + ".json"
	resource, err := api(a, "DELETE", path, "")
	if err != nil {
		return nil, err
	}

	return resource, nil

}

func (a Auth) CreateTicket(data string) (*Resource, error) {

	path := "/tickets.json"
	resource, err := api(a, "POST", path, data)
	if err != nil {
		return nil, err
	}

	return resource, nil

}


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace TaxCalculator
{
    public partial class Site1 : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }
}