text:
using System;
using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Reactive;
using System.Xml.Linq;

namespace Rxx.Parsers.Reactive
{
  /// <summary>
  /// Represents an XML parser over an observable sequence of <see cref="char"/>.
  /// </summary>
  /// <typeparam name="TResult">The type of the elements that are generated from parsing the sequence of XML nodes.</typeparam>
  [ContractClass(typeof(IXmlObservableParserContract<>))]
  public interface IXmlObservableParser<TResult> : IObservableParser<char, TResult>
  {
    /// <summary>
    /// Gets a parser with a grammar that matches all characters, including whitespace, up to the start tag of an element.
    /// </summary>
    IObservableParser<char, XText> Text
    {
      get;
    }

    /// <summary>
    /// Gets a parser with a grammar that matches content sequences beginning with <!-- and ending with -->.
    /// </summary>
    IObservableParser<char, XComment> Comment
    {
      get;
    }

    /// <summary>
    /// Gets a parser with a grammar that matches content sequences beginning with <![CDATA[ and ending with ]]>.
    /// </summary>
    IObservableParser<char, XCData> CData
    {
      get;
    }

    /// <summary>
    /// Gets a parser with a grammar that matches any <see cref="Text"/>, <see cref="Comment"/> or <see cref="CData"/> content.
    /// </summary>
    IObservableParser<char, XObject> AnyContent
    {
      get;
    }

    /// <summary>
    /// Gets a parser with a grammar that matches an XML element with any attributes or content.
    /// </summary>
    IObservableParser<char, XElement> AnyElement
    {
      get;
    }

    /// <summary>
    /// Gets a parser with a grammar that matches an XML attribute.
    /// </summary>
    IObservableParser<char, XAttribute> AnyAttribute
    {
      get;
    }

    /// <summary>
    /// Creates a parser that matches a single XML attribute with the specified <paramref name="name"/>.
    /// </summary>
    /// <param name="name">The name of the attribute to match.</param>
    /// <returns>A parser that matches a single XML attribute with the specified <paramref name="name"/>.</returns>
    IObservableParser<char, XAttribute> Attribute(string name);

    /// <summary>
    /// Creates a parser that matches a single XML element containing the specified attributes and children.
    /// </summary>
    /// <param name="content">The parsers that match the element's attributes, child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element containing the specified attributes and children.</returns>
    IObservableParser<char, XElement> Element(params IObservableParser<char, XObject>[] content);

    /// <summary>
    /// Creates a parser that matches a single XML element having no attributes and containing the specified <paramref name="content"/>.
    /// </summary>
    /// <param name="content">The parser that matches the element's child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element having no attributes and containing the specified <paramref name="content"/>.</returns>
    IObservableParser<char, XElement> Element(IObservableParser<char, IObservable<XObject>> content);

    /// <summary>
    /// Creates a parser that matches a single XML element with the specified <paramref name="attributes"/> and containing
    /// the specified <paramref name="content"/>.
    /// </summary>
    /// <param name="attributes">The parser that matches the element's attributes.</param>
    /// <param name="content">The parser that matches the element's child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element with the specified <paramref name="attributes"/> and containing
    /// the specified <paramref name="content"/>.</returns>
    IObservableParser<char, XElement> Element(
      IObservableParser<char, IObservable<XAttribute>> attributes,
      IObservableParser<char, IObservable<XObject>> content);

    /// <summary>
    /// Creates a parser that matches a single XML element with the specified <paramref name="name"/> and containing
    /// the specified attributes and children.
    /// </summary>
    /// <param name="name">The name of the element to match.</param>
    /// <param name="content">The parsers that match the element's attributes, child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element with the specified <paramref name="name"/> and containing
    /// the specified attributes and children.</returns>
    IObservableParser<char, XElement> Element(string name, params IObservableParser<char, XObject>[] content);

    /// <summary>
    /// Creates a parser that matches a single XML element with the specified <paramref name="name"/>, having no attributes
    /// and containing the specified <paramref name="content"/>.
    /// </summary>
    /// <param name="name">The name of the element to match.</param>
    /// <param name="content">The parser that matches the element's child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element with the specified <paramref name="name"/>, having no attributes
    /// and containing the specified <paramref name="content"/>.</returns>
    IObservableParser<char, XElement> Element(string name, IObservableParser<char, IObservable<XObject>> content);

    /// <summary>
    /// Creates a parser that matches a single XML element with the specified <paramref name="name"/>, the specified
    /// <paramref name="attributes"/> and containing the specified <paramref name="content"/>.
    /// </summary>
    /// <param name="name">The name of the element to match.</param>
    /// <param name="attributes">The parser that matches the element's attributes.</param>
    /// <param name="content">The parser that matches the element's child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element with the specified <paramref name="name"/>, the specified
    /// <paramref name="attributes"/> and containing the specified <paramref name="content"/>.</returns>
    IObservableParser<char, XElement> Element(
      string name,
      IObservableParser<char, IObservable<XAttribute>> attributes,
      IObservableParser<char, IObservable<XObject>> content);

    /// <summary>
    /// Creates a parser that matches a single XML element with the specified <paramref name="name"/>, the specified
    /// <paramref name="attributes"/> and containing the specified <paramref name="content"/>.
    /// </summary>
    /// <param name="name">The name of the element to match.</param>
    /// <param name="attributes">An enumerable sequence containing the names of the element's attributes.</param>
    /// <param name="content">The parser that matches the element's child elements, text, cdata and comments.</param>
    /// <returns>A parser that matches a single XML element with the specified <paramref name="name"/>, the specified
    /// <paramref name="attributes"/> and containing the specified <paramref name="content"/>.</returns>
    IObservableParser<char, XElement> Element(
      string name,
      IEnumerable<string> attributes,
      params IObservableParser<char, XObject>[] content);
  }

  [ContractClassFor(typeof(IXmlObservableParser<>))]
  internal abstract class IXmlObservableParserContract<TResult> : IXmlObservableParser<TResult>
  {
    public IObservableParser<char, XText> Text
    {
      get
      {
        Contract.Ensures(Contract.Result<IObservableParser<char, XText>>() != null);
        return null;
      }
    }

    public IObservableParser<char, XComment> Comment
    {
      get
      {
        Contract.Ensures(Contract.Result<IObservableParser<char, XComment>>() != null);
        return null;
      }
    }

    public IObservableParser<char, XCData> CData
    {
      get
      {
        Contract.Ensures(Contract.Result<IObservableParser<char, XCData>>() != null);
        return null;
      }
    }

    public IObservableParser<char, XObject> AnyContent
    {
      get
      {
        Contract.Ensures(Contract.Result<IObservableParser<char, XObject>>() != null);
        return null;
      }
    }

    public IObservableParser<char, XElement> AnyElement
    {
      get
      {
        Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
        return null;
      }
    }

    public IObservableParser<char, XAttribute> AnyAttribute
    {
      get
      {
        Contract.Ensures(Contract.Result<IObservableParser<char, XAttribute>>() != null);
        return null;
      }
    }

    public IObservableParser<char, XAttribute> Attribute(string name)
    {
      Contract.Requires(!string.IsNullOrWhiteSpace(name));
      Contract.Ensures(Contract.Result<IObservableParser<char, XAttribute>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(params IObservableParser<char, XObject>[] content)
    {
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(IObservableParser<char, IObservable<XObject>> content)
    {
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(IObservableParser<char, IObservable<XAttribute>> attributes, IObservableParser<char, IObservable<XObject>> content)
    {
      Contract.Requires(attributes != null);
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(string name, params IObservableParser<char, XObject>[] content)
    {
      Contract.Requires(!string.IsNullOrWhiteSpace(name));
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(string name, IObservableParser<char, IObservable<XObject>> content)
    {
      Contract.Requires(!string.IsNullOrWhiteSpace(name));
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(string name, IObservableParser<char, IObservable<XAttribute>> attributes, IObservableParser<char, IObservable<XObject>> content)
    {
      Contract.Requires(!string.IsNullOrWhiteSpace(name));
      Contract.Requires(attributes != null);
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    public IObservableParser<char, XElement> Element(string name, IEnumerable<string> attributes, params IObservableParser<char, XObject>[] content)
    {
      Contract.Requires(!string.IsNullOrWhiteSpace(name));
      Contract.Requires(attributes != null);
      Contract.Requires(content != null);
      Contract.Ensures(Contract.Result<IObservableParser<char, XElement>>() != null);
      return null;
    }

    #region IObservableParser<char,TResult> Members
    public IObservableParser<char, char> Next
    {
      get
      {
        return null;
      }
    }

    public IObservable<IParseResult<TResult>> Parse(IObservableCursor<char> source)
    {
      return null;
    }
    #endregion
  }
}


text:
from eLisp.model import Symbol
from eLisp.expr.util import is_tagged_list, cadr, caddr

def is_assignment(expr):
    return is_tagged_list(expr, Symbol('set!'))

def assignment_variable(expr):
    return cadr(expr)

def assignment_value(expr):
    return caddr(expr)

redpajama_set_name: RedPajamaGithub


text:
<?php
  header('Content-Type: text/html; charset=utf-8');
  error_reporting(E_ALL ^ E_NOTICE);
  require_once "../bancos/conecta.php";
  require_once "../bancos/banco-usuario.php";
  require_once "../bancos/banco-profissao.php";
  require_once "../logica/logica-usuario.php";
  require_once "../alerta/mostra-alerta.php";
  verificaUsuario();
  $email = $_SESSION["usuario_logado"];
  $usuario = buscaUsuarioEmail($conexao, $email);
  $id_usuario = $usuario['id_usuario'];
?>

<!DOCTYPE html>

    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>PROJEK | Consultores</title>

    <link rel="shortcut icon" type="image/x-icon" href="../../ico/favicon.ico"/>

    <link href="../../../vendors/bootstrap/dist/css/bootstrap.min.css" rel="stylesheet">

    <link href="../../../vendors/font-awesome/css/font-awesome.min.css" rel="stylesheet">

    <link href="../../../vendors/nprogress/nprogress.css" rel="stylesheet">

    <link href="../../../vendors/datatables.net-bs/css/dataTables.bootstrap.min.css" rel="stylesheet">
    <link href="../../../vendors/datatables.net-buttons-bs/css/buttons.bootstrap.min.css" rel="stylesheet">
    <link href="../../../vendors/datatables.net-fixedheader-bs/css/fixedHeader.bootstrap.min.css" rel="stylesheet">
    <link href="../../../vendors/datatables.net-responsive-bs/css/responsive.bootstrap.min.css" rel="stylesheet">
    <link href="../../../vendors/datatables.net-scroller-bs/css/scroller.bootstrap.min.css" rel="stylesheet">

    <link href="../../../build/css/custom.min.css" rel="stylesheet">

              PROJEK

                <?php
                  $sql = "SELECT * FROM profileimg WHERE id_usuario = $id_usuario";
                  $sth = $conexao->query($sql);
                  $result=mysqli_fetch_array($sth);
                  if($result != null){
                    echo '';
                  }else{
                ?>

                <?php
                  }

                ?>

                Bem Vindo,

<?=$usuario['nome']?>

Geral

 Menu

Dashboard

 Listar

Usuários

Produtos

Consultores

Partners

 Negócios

Market

Leads

Suspects

Prospects

Contratos

Pós-venda

 Consultoria

Projetos

                    <?=$usuario['nome']?>

<a href="../profiles/usuario-profile.php?id=<?=$usuario['id_usuario']?>"> Perfil

                        Configurações

Ajuda

 Sair

Consultores

                    <input type="text" class="form-control" placeholder="Search for...">

                        <button class="btn btn-default" type="button">Go!</button>

Settings 1

Settings 2

                              Nome
                              Email
                              Estado
                              Telefone
                              Profissão
                              Ações

                            <?php
                            $usuarios = listaUsuarios($conexao);
                              foreach ($usuarios as $usuario) {
                                if($usuario['id_profissao'] == 1 || $usuario['id_profissao'] == 3 ){
                                  $profissao = buscaProfissao($conexao , $usuario['id_profissao'] );
                            ?>

                                  <?=$usuario['nome']?>
                                  <?=$usuario['email']?>
                                  <?=$usuario['estado']?>
                                  <?=$usuario['telefone']?>
                                  <?=$profissao['descricao']?>

                                    <a href="../profiles/consultor-profile.php?id=<?=$usuario['id_usuario']?>"><button class="btn btn-success btn-xs"></button>

                                    <a href="remove-usuario.php?id=<?=$usuario['id_usuario']?>"><button class="btn btn-danger btn-xs"></button>

                            <?php
                              }
                            }
                            ?>

            PROJEK


text:
require 'date'

class Plastic
  PIVOT_YEAR = 20.freeze

  def valid?
    errors.clear
    valid_pan?
    valid_brand?
    valid_expiration?
    errors.empty?
  end

  def errors
    @errors ||= []
  end

  def valid_brand?
    valid = value_is_present?(brand)
    errors << "Unknown card brand" unless valid
    valid
  end

  def valid_pan?
    unless value_is_present?(pan)
      errors << "PAN not present"
      return false
    end
    valid_pan_characters? && valid_pan_length? && valid_pan_checksum?
  end

  def valid_expiration?
    unless value_is_present?(expiration) && expiration != '='
      errors << "Expiration not present"
      return false
    end
    return false unless valid_expiration_year? && valid_expiration_month?

    # We subtract 13 hours from the current expiration time in UTC
    # so that a card that expires on 28 February 2013 in UTC-1300 is still considered valid
    # until 13:00 1 March 2013 in UTC.
    this = Time.now.utc - (60 * 60 * 13)

    if this.year == expiration_year
      valid = (this.month..12).include?(expiration_month)
      errors << "Card has expired" unless valid
      valid
    elsif expiration_year > this.year && expiration_year < this.year + PIVOT_YEAR
      true
    else
      errors << "Card has expired"
      false
    end
  end

private

  def valid_pan_characters?
    valid = pan.to_s =~ /\A[\d ]+\z/
    errors << "PAN contains non-digit characters" unless valid
    valid
  end

  def valid_pan_length?
    valid = (pan.to_s.length >= 12)
    errors << "PAN is too short" unless valid
    valid
  end

  def valid_pan_checksum?
    odd = false
    sum = pan.reverse.chars.inject(0) do |checksum, d|
      d = d.to_i
      checksum + ((odd = !odd) ? d : (d * 2 > 9 ? d * 2 - 9 : d * 2))
    end

    valid = (sum % 10 == 0)
    errors << "PAN does not pass checksum" unless valid
    valid
  end

  def valid_expiration_month?
    valid = (1..12).include?(expiration_month)
    errors << "Invalid expiration month" unless valid
    valid
  end

  def valid_expiration_year?
    valid = (expiration_yy =~ /\d\d/)
    errors << "Invalid expiration year" unless valid
    valid
  end
end


text:
<?php
class Controller_Service extends Controller_Base
{
	public $template = 'user/template';
	public function action_gioithieu()
	{
		$data['gioithieus'] = Model_Gioithieu::find('all');
		$this->template->title = "Shop";
		$this->template->content = View::forge('user/header/service/gioithieu', $data,false);
	}
	public function action_lienhe()
	{
		$data['lienhes'] = Model_Lienhe::find('all');
		$this->template->title = "Contact";
		$this->template->content = View::forge('user/header/service/lienhe', $data,false);
	}
	// post
	public function action_tintuc()
	{
		$config = array(
			'pagination_url' => 'http://project.dev/service/tintuc',
			'total_items'    => Model_Post::count(),
			'per_page'       => 2,
			'uri_segment'    => 3,
			);

		$pagination = Pagination::forge('mypagination', $config);

		$data['posts'] = Model_Post::query()
		->rows_offset($pagination->offset)
		->rows_limit($pagination->per_page)
		->get();
		$data['pagination'] = $pagination->render();

		$this->template->title = "Tin tức";
		$this->template->content = View::forge('user/header/service/tintuc', $data);
	}
	public function action_dangnhap()
	{
		$this->template->title = "Đăng nhập";
		$this->template->content = View::forge('user/header/service/dangnhap');
	}
}


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

namespace Emile.TestApp
{
  internal class Program
  {
    private static unsafe void Main(string[] args)
    {
      var xMemoryBlock = new int[1024*1024*2];
      var xMemoryBlockSize = xMemoryBlock.Length * 4;
      // we have an 8 MB block now
      fixed (int* xStart = &xMemoryBlock[0])
      {
        ReallySimpleAllocator.Initialize(xStart, xMemoryBlockSize);

        // now you can just use if however you like:

        // allocate a 1 kilobyte block
        var xBlock1 = ReallySimpleAllocator.Allocate(1024);

        // another one
        var xBlock2 = ReallySimpleAllocator.Allocate(1024);

        ReallySimpleAllocator.Free(xBlock1);
        xBlock1 = ReallySimpleAllocator.Allocate(1024);

        // etc

        // there's no need to cleanup.
      }

    }
  }
}


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<title>Markdown editor
	</title>
	<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no"/>
	<link rel="stylesheet" href="editor.css">

# Basic writing

## Styling text

Make text **bold** or *italic* by using either `*` or `_` around the text.

_This text will be italic_
__This text will be bold__

Create strikethrough text by using `~~`.

~~Mistaken text.~~

## Blockquotes

Indicate blockquotes with a `>`.

> Blockquote

## Headings

Create a heading by adding one or more `#` symbols before your heading text.

##### Heading level 5
###### Heading level 6

## Horizontal rules

Insert a horizontal rule by putting three or more `-`, `*`, or `_` on a line by themselves.

----------

## Table of contents

Insert a table of contents using the marker `[TOC]`.

[TOC]

# Lists

## Unordered lists

Make an unordered list by preceding list items with either a `*` or a `-`.

- Item
- Item
* Item

## Ordered lists

Make an ordered list by preceding list items with a number.

1. Item 1
2. Item 2
3. Item 3

# Code formatting

## Inline formats

Use single backticks to format text in a special `monospace format`.

## Multiple lines

Indent four spaces or a tab to format text as its own distinct block.

	var foo = 'bar'; // baz

## Code highlighting

Use triple backticks including the language identifier to have syntax highlighting.

```js
var foo = 'bar'; // baz
```

# Links and images

## Links

Create a link by wrapping link text in brackets, and then wrapping the link in parentheses.

[Visit Classeur](http://classeur.io)

## Images

Images are like links, but have an exclamation point in front of them.

![Classeur Logo](http://classeur.io/images/logo.png)

## Footnotes

To create footnotes, add a label starting with a `^` between a set of square brackets like this[^footnote], and then, declare the linked content.

  [^footnote]: Here is the content of the footnote.

# Tables

Create tables by assembling a list of words and dividing them with hyphens (for the first row), and then separating each column with a pipe.

First Header  | Second Header
------------- | -------------
Content Cell  | Content Cell
Content Cell  | Content Cell

By including colons within the header row, you can define text to be left-aligned, right-aligned, or center-aligned.

| Left-Aligned  | Center Aligned  | Right Aligned |
| :------------ |:---------------:| -----:|
| col 3 is      | some wordy text | $1600 |
| col 2 is      | centered        |   $12 |
| zebra stripes | are neat        |    $1 |


text:
@implementation AnimatedTransitioning

#pragma mark - Overridden: AbstractAnimatedTransitioning

- (UIViewController *)aboveViewController {
    return _presenting ? self.toViewController : self.fromViewController;
}

- (UIViewController *)belowViewController {
    return _presenting ? self.fromViewController : self.toViewController;
}

- (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionContext {
    [super animateTransition:transitionContext];

    self.fromViewController.modalPresentationCapturesStatusBarAppearance = YES;
    self.toViewController.modalPresentationCapturesStatusBarAppearance = YES;

    if (!transitionContext.isInteractive) {
        [self.belowViewController beginAppearanceTransition:!_presenting animated:transitionContext.isAnimated];
    }

    if (_presenting) {
        [self animateTransitionForPresenting:transitionContext];
    } else {
        [self animateTransitionForDismission:transitionContext];
    }
}

- (void)clear {
    [super clear];

    [self.fromViewController beginAppearanceTransition:YES animated:NO];
    [self.toViewController beginAppearanceTransition:NO animated:NO];
    [self.toViewController.view removeFromSuperview];
    [self.fromViewController endAppearanceTransition];
    [self.toViewController endAppearanceTransition];
}

#pragma mark - Protected methods

- (void)animateTransitionForDismission:(id<UIViewControllerContextTransitioning>)transitionContext {
}

- (void)animateTransitionForPresenting:(id<UIViewControllerContextTransitioning>)transitionContext {
    self.toViewController.view.frame = self.fromViewController.view.bounds;
}

@end


text:
.center {
	margin-top: 20px;
}

.faqc {
	padding-bottom: 20px;
}

.font{
	font-family: abeatbykai;
}

.pagee{
	background-image: url('images/bg.png');

	/* Set a specific height */
    min-height: 1000px;

    /* Create the parallax scrolling effect */
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

.affix {
      top: 0;
      width: 100%;
	  z-index: 10;
 }

.navbar-custom .navbar-nav > li > a {
    color: white;
}

.navbar-custom .navbar-nav > li > a:hover,
.navbar-custom .navbar-nav > li > a:focus,
.navbar-custom .navbar-nav > .active > a:hover,
.navbar-custom .navbar-nav > .active > a:focus,
.navbar-custom .navbar-nav > .open >a {
    color: black;
	background-color: transparent;
}

#logo span{
	background-color: white;

}

#footer{
	background-color: #3b8686;

}

#footer a{
	text-decoration: underline;
	color: white;
}

#footer img{
	width: 25px;
	height: 25px;
}

button.accordion {
    background-color: #ddd;
    color: #444;
    cursor: pointer;
    padding: 18px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 15px;
    transition: 0.4s;
}

button.accordion.active, button.accordion:hover {
    background-color: #3b8686;
	color:white;
}

button.accordion:after {
    content: '\23f5';
    color: white;
    font-weight: bold;
    float: right;
    margin-left: 5px;
}

button.accordion.active:after {
    content: "\23f7";
}

div.panel {
    padding: 0 18px;
    background-color: white;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
}

#faqs img{
	margin-top: 150px;
	margin-bottom: -200px;
}

#acc {
padding-top: 230px;
}


text:
var validate
  , validateMapping
  , toAscii
  , assert = require('assert')
  , SMConsumer = require('source-map').SourceMapConsumer
  , each = require('lodash.foreach')
  , template = require('lodash.template')
  , jsesc = require('jsesc')
  , fancyArrow = String.fromCharCode(parseInt(2192,16));

// Lifted from UglifyJS
toAscii = function (str, identifier) {
    return str.replace(/[\u0080-\uffff]/g, function(ch) {
        var code = ch.charCodeAt(0).toString(16);
        if (code.length <= 2 && !identifier) {
            while (code.length < 2) code = "0" + code;
            return "\\x" + code;
        } else {
            while (code.length < 4) code = "0" + code;
            return "\\u" + code;
        }
    }).replace(/\x0B/g, "\\x0B");
};

// Performs simple validation of a mapping
validateMapping = function (mapping) {
  var prettyMapping = JSON.stringify(mapping, null, 2);

  assert.ok(mapping.generatedColumn!=null, 'missing generated column, mapping: ' + prettyMapping);
  assert.ok(mapping.generatedLine!=null, 'missing generated line, mapping: ' + prettyMapping);
  assert.ok(mapping.generatedColumn >= 0, 'generated column must be greater or equal to zero, mapping: ' + prettyMapping);
  assert.ok(mapping.generatedLine >= 0, 'generated line must be greater or equal to zero: ' + prettyMapping);

  // If the source is null, the original location data has been explicitly
  // omitted from the map to clear the mapped state of a line.
  if (typeof mapping.source === "string") {
    assert.ok(mapping.originalColumn!=null, 'missing original column, mapping: ' + prettyMapping);
    assert.ok(mapping.originalLine!=null, 'missing original line, mapping: ' + prettyMapping);
    assert.ok(mapping.originalColumn >= 0, 'original column must be greater or equal to zero, mapping: ' + prettyMapping);
    assert.ok(mapping.originalLine >= 0, 'original line must be greater or equal to zero, mapping: ' + prettyMapping);
  }
};

// Validates an entire sourcemap
validate = function (min, map, srcs) {
  var consumer
    , mappingCount = 0
    , splitSrcs = {};

  srcs = srcs || {};

  // If no map was given, try to extract it from min
  if(map == null) {
    try {
      var re = /\s*\/\/(?:@|#) sourceMappingURL=data:application\/json;base64,(\S*)$/m
        , map = min.match(re);

      map = (new Buffer(map[1], 'base64')).toString();
      min = min.replace(re, '');
    }
    catch (e) {
      throw new Error('No map argument provided, and no inline sourcemap found');
    }
  }

  try {
    consumer = new SMConsumer(map);
  }
  catch (e) {
    throw new Error('The map is not valid JSON');
  }

  each(consumer.sources, function (src) {
    var content = consumer.sourceContentFor(src);
    if(content)
      srcs[src] = content;
  });

  each(srcs, function (src, file) {
    return splitSrcs[file] = src.split('\n'); // Split sources by line
  });

  consumer.eachMapping(function (mapping) {
    mappingCount++;

    validateMapping(mapping);

    // These validations can't be performed with just the mapping
    var originalLine
      , errMsg
      , mapRef
      , expected
      , actuals = []
      , success = false;

    if(mapping.name) {
      if(!splitSrcs[mapping.source]) {
        throw new Error(mapping.source + ' not found in ' + Object.keys(splitSrcs).join(', '));
      }

      originalLine = splitSrcs[mapping.source][mapping.originalLine - 1];

      expected = [
        mapping.name
      , '\'' + jsesc(mapping.name) + '\''
      , '\'' + toAscii(mapping.name) + '\''
      , '"' + jsesc(mapping.name, {quotes: 'double'}) + '"'
      , '"' + toAscii(mapping.name) + '"'
      ];

      // An exact match
      for(var i=0, ii=expected.length; i<ii; i++) {
        // It's possible to go out of bounds on some stupid cases
        try {
          var actual = originalLine.split('').splice(mapping.originalColumn, expected[i].length).join('');
        }
        catch (e) {
          return;
        }

        actuals.push(actual);

        if(expected[i] === actual) {
          success = true;
          break;
        }
      };

      if(!success) {
        mapRef = template('<%=generatedLine%>:<%=generatedColumn%>'
                          + fancyArrow
                          + '<%=originalLine%>:<%=originalColumn%> "<%=name%>" in <%=source%>')(mapping);
        errMsg = template(''
          + 'Warning: mismatched names\n'
          + 'Expected: <%=expected%>\n'
          + 'Got: <%=actual%>\n'
          + 'Original Line: <%=original%>\n'
          + 'Mapping: <%=mapRef%>'
          , {
            expected: expected.join(' || ')
          , actual: actuals.join(' || ')
          , original: originalLine
          , mapRef: mapRef
          });

          throw new Error(errMsg);
      }
    }
  });

  assert.ok(JSON.parse(map).sources && JSON.parse(map).sources.length, 'There were no sources in the file');
  assert.ok(mappingCount > 0, 'There were no mappings in the file');
};

module.exports = validate;


text:
Though [Jest's built-in
matchers](https://jestjs.io/docs/en/expect) will get you pretty
far in most testing scenarios, you may find yourself in a testing situation
better served by a custom matcher. Custom matchers can be defined using the
[`expect.extend()`
function](https://jestjs.io/docs/en/expect#expectextendmatchers).

Here is an example of a matcher that can check equality of two objects based
solely on their `id` property.

```javascript
expect.extend({
  toHaveMatchingId(recieved, expected) {
    const pass = recieved.id === expected.id;

    if (pass) {
      return {
        pass: true,
        message: () =>
          `expected id:${expected.id} to not match actual id:${recieved.id}`
      };
    } else {
      return {
        pass: false,
        message: () =>
          `expected id:${expected.id} to match actual id:${recieved.id}`
      };
    }
  }
});
```

This defines the name of the matcher (`toHaveMatchingId`), contains some logic
to figure out whether `received` and `expected` pass the matcher, and then two
return conditions (`pass: true` and `pass: false`) with accompanying
message-returning functions.

It can then be used like any other Jest matcher:

```javascript
test("compare objects", () => {
  expect({ id: "001" }).toHaveMatchingId({ id: "001" });
  // ✅
  expect({ id: "001" }).toHaveMatchingId({ id: "002" });
  // ❌ expected id:002 to match actual id:001
});
```

Check out a [live example](https://codesandbox.io/s/focused-bush-vw2s5).


text:
<?php

include_once( ABSPATH . 'wp-admin/includes/class-wp-upgrader.php' );

class Automattic_Developer_Empty_Upgrader_Skin extends WP_Upgrader_Skin {
	function __construct($args = array()) {
		$defaults = array( 'type' => 'web', 'url' => '', 'plugin' => '', 'nonce' => '', 'title' => '' );
		$args = wp_parse_args( $args, $defaults );

		$this->type = $args['type'];
		$this->api = isset( $args['api'] ) ? $args['api'] : array();

		parent::__construct( $args );
	}

	public function request_filesystem_credentials( $error = false ) {
		return true;
	}

	public function error( $errors ) {
		die( '-1' );
	}

	public function header() {}
	public function footer() {}
	public function feedback( $string ) {}
}


text:
namespace Pirate.PiVote.Circle.Create
{
  partial class SelectCertificateTypeControl
  {
    /// <summary>
    /// Required designer variable.
    /// </summary>
    private System.ComponentModel.IContainer components = null;

    /// <summary>
    /// Clean up any resources being used.
    /// </summary>
    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
    protected override void Dispose(bool disposing)
    {
      if (disposing && (components != null))
      {
        components.Dispose();
      }
      base.Dispose(disposing);
    }

    #region Component Designer generated code

    /// <summary>
    /// Required method for Designer support - do not modify
    /// the contents of this method with the code editor.
    /// </summary>
    private void InitializeComponent()
    {
      this.voterCheckBox = new System.Windows.Forms.RadioButton();
      this.authorityCheckBox = new System.Windows.Forms.RadioButton();
      this.cancelButton = new System.Windows.Forms.Button();
      this.nextButton = new System.Windows.Forms.Button();
      this.voterSubGroupCheckBox = new System.Windows.Forms.RadioButton();
      this.voterLabel = new System.Windows.Forms.Label();
      this.voterSubgroupLabel = new System.Windows.Forms.Label();
      this.authorityLabel = new System.Windows.Forms.Label();
      this.notaryCheckBox = new System.Windows.Forms.RadioButton();
      this.notaryLabel = new System.Windows.Forms.Label();
      this.SuspendLayout();
      //
      // voterCheckBox
      //
      this.voterCheckBox.AutoSize = true;
      this.voterCheckBox.Location = new System.Drawing.Point(14, 6);
      this.voterCheckBox.Name = "voterCheckBox";
      this.voterCheckBox.Size = new System.Drawing.Size(51, 18);
      this.voterCheckBox.TabIndex = 0;
      this.voterCheckBox.TabStop = true;
      this.voterCheckBox.Text = "Voter";
      this.voterCheckBox.UseVisualStyleBackColor = true;
      this.voterCheckBox.CheckedChanged += new System.EventHandler(this.voterCheckBox_CheckedChanged);
      //
      // authorityCheckBox
      //
      this.authorityCheckBox.AutoSize = true;
      this.authorityCheckBox.Location = new System.Drawing.Point(14, 125);
      this.authorityCheckBox.Name = "authorityCheckBox";
      this.authorityCheckBox.Size = new System.Drawing.Size(101, 18);
      this.authorityCheckBox.TabIndex = 1;
      this.authorityCheckBox.TabStop = true;
      this.authorityCheckBox.Text = "Voting Authority";
      this.authorityCheckBox.UseVisualStyleBackColor = true;
      this.authorityCheckBox.CheckedChanged += new System.EventHandler(this.authorityCheckBox_CheckedChanged);
      //
      // cancelButton
      //
      this.cancelButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
      this.cancelButton.Location = new System.Drawing.Point(210, 242);
      this.cancelButton.Name = "cancelButton";
      this.cancelButton.Size = new System.Drawing.Size(128, 28);
      this.cancelButton.TabIndex = 49;
      this.cancelButton.Text = "&Cancel";
      this.cancelButton.UseVisualStyleBackColor = true;
      this.cancelButton.Click += new System.EventHandler(this.cancelButton_Click);
      //
      // nextButton
      //
      this.nextButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
      this.nextButton.Font = new System.Drawing.Font("Arial", 8.25F);
      this.nextButton.Location = new System.Drawing.Point(344, 242);
      this.nextButton.Name = "nextButton";
      this.nextButton.Size = new System.Drawing.Size(128, 28);
      this.nextButton.TabIndex = 48;
      this.nextButton.Text = "&Next";
      this.nextButton.UseVisualStyleBackColor = true;
      this.nextButton.Click += new System.EventHandler(this.nextButton_Click);
      //
      // voterSubGroupCheckBox
      //
      this.voterSubGroupCheckBox.AutoSize = true;
      this.voterSubGroupCheckBox.Location = new System.Drawing.Point(14, 68);
      this.voterSubGroupCheckBox.Name = "voterSubGroupCheckBox";
      this.voterSubGroupCheckBox.Size = new System.Drawing.Size(117, 18);
      this.voterSubGroupCheckBox.TabIndex = 50;
      this.voterSubGroupCheckBox.TabStop = true;
      this.voterSubGroupCheckBox.Text = "Voter for subgroup";
      this.voterSubGroupCheckBox.UseVisualStyleBackColor = true;
      this.voterSubGroupCheckBox.CheckedChanged += new System.EventHandler(this.voterSubGroupCheckBox_CheckedChanged);
      //
      // voterLabel
      //
      this.voterLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                  | System.Windows.Forms.AnchorStyles.Right)));
      this.voterLabel.Location = new System.Drawing.Point(30, 27);
      this.voterLabel.Name = "voterLabel";
      this.voterLabel.Size = new System.Drawing.Size(442, 38);
      this.voterLabel.TabIndex = 51;
      this.voterLabel.Text = "label1";
      //
      // voterSubgroupLabel
      //
      this.voterSubgroupLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                  | System.Windows.Forms.AnchorStyles.Right)));
      this.voterSubgroupLabel.Location = new System.Drawing.Point(30, 89);
      this.voterSubgroupLabel.Name = "voterSubgroupLabel";
      this.voterSubgroupLabel.Size = new System.Drawing.Size(442, 33);
      this.voterSubgroupLabel.TabIndex = 52;
      this.voterSubgroupLabel.Text = "label2";
      //
      // authorityLabel
      //
      this.authorityLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                  | System.Windows.Forms.AnchorStyles.Right)));
      this.authorityLabel.Location = new System.Drawing.Point(30, 146);
      this.authorityLabel.Name = "authorityLabel";
      this.authorityLabel.Size = new System.Drawing.Size(442, 33);
      this.authorityLabel.TabIndex = 53;
      this.authorityLabel.Text = "label3";
      //
      // notaryCheckBox
      //
      this.notaryCheckBox.AutoSize = true;
      this.notaryCheckBox.Location = new System.Drawing.Point(14, 182);
      this.notaryCheckBox.Name = "notaryCheckBox";
      this.notaryCheckBox.Size = new System.Drawing.Size(101, 18);
      this.notaryCheckBox.TabIndex = 54;
      this.notaryCheckBox.TabStop = true;
      this.notaryCheckBox.Text = "Voting Authority";
      this.notaryCheckBox.UseVisualStyleBackColor = true;
      this.notaryCheckBox.CheckedChanged += new System.EventHandler(this.notaryCheckBox_CheckedChanged);
      //
      // notaryLabel
      //
      this.notaryLabel.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
                  | System.Windows.Forms.AnchorStyles.Right)));
      this.notaryLabel.Location = new System.Drawing.Point(30, 203);
      this.notaryLabel.Name = "notaryLabel";
      this.notaryLabel.Size = new System.Drawing.Size(442, 36);
      this.notaryLabel.TabIndex = 55;
      this.notaryLabel.Text = "label3";
      //
      // SelectCertificateTypeControl
      //
      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 14F);
      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
      this.Controls.Add(this.notaryLabel);
      this.Controls.Add(this.notaryCheckBox);
      this.Controls.Add(this.authorityLabel);
      this.Controls.Add(this.voterSubgroupLabel);
      this.Controls.Add(this.voterLabel);
      this.Controls.Add(this.voterSubGroupCheckBox);
      this.Controls.Add(this.cancelButton);
      this.Controls.Add(this.nextButton);
      this.Controls.Add(this.authorityCheckBox);
      this.Controls.Add(this.voterCheckBox);
      this.Name = "SelectCertificateTypeControl";
      this.Size = new System.Drawing.Size(475, 273);
      this.Load += new System.EventHandler(this.SelectCertificateTypeControl_Load);
      this.ResumeLayout(false);
      this.PerformLayout();

    }

    #endregion

    private System.Windows.Forms.RadioButton voterCheckBox;
    private System.Windows.Forms.RadioButton authorityCheckBox;
    private System.Windows.Forms.Button cancelButton;
    private System.Windows.Forms.Button nextButton;
    private System.Windows.Forms.RadioButton voterSubGroupCheckBox;
    private System.Windows.Forms.Label voterLabel;
    private System.Windows.Forms.Label voterSubgroupLabel;
    private System.Windows.Forms.Label authorityLabel;
    private System.Windows.Forms.RadioButton notaryCheckBox;
    private System.Windows.Forms.Label notaryLabel;
  }
}


text:
/* eslint-disable */
;(function(root, factory) {
  if (typeof define === 'function' && define.amd) { // AMD
    define(['./core', './php_compressed.js'], factory);
  } else if (typeof exports === 'object') { // Node.js
    module.exports = factory(require('./core'), require('./php_compressed.js'));
  } else { // Browser
    root.BlocklyPHP = factory(root.Blockly, root.BlocklyPHP);
  }
}(this, function(Blockly, BlocklyPHP) {
/**
 * @license
 * Copyright 2020 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * @fileoverview PHP generator module; just a wrapper for php_compressed.js.
 */

return BlocklyPHP;
}));


text:
//
//  FiveHundredPxViewController.m
//  500px Aperture Uploader
//
//  Created by Daniel Kennett on 10/03/2012.
//  For license information, see LICENSE.markdown
//

#import "FiveHundredPxViewController.h"
#import "Constants.h"
#import "FiveHundredPxExtraMetadata.h"

@interface FiveHundredPxViewController ()

@end

@implementation FiveHundredPxViewController

-(id)initWithOAuthEngine:(FiveHundredPxOAuthEngine *)oAuthEngine {

	self = [super initWithNibName:@"FiveHundredPxViewController" bundle:[NSBundle bundleForClass:[self class]]];

	if (self) {
        // Initialization code here.
		self.engine = oAuthEngine;

		[self addObserver:self
			   forKeyPath:@"metadataArrayController.selection"
				  options:NSKeyValueObservingOptionInitial
				  context:k500pxUpdateStoreSizeWarningKVOContext];

		[self addObserver:self
			   forKeyPath:@"exporter.exportManager.selectedExportPresetDictionary"
				  options:NSKeyValueObservingOptionInitial
				  context:k500pxUpdateStoreSizeWarningKVOContext];

		[self addObserver:self
			   forKeyPath:@"exporter.metadataContainers"
				  options:NSKeyValueObservingOptionInitial
				  context:nil];

		// ^ The above property isn't KVO-compliant, so we look for ALL menu actions to get the preset menu changing. UGH.
		[[NSNotificationCenter defaultCenter] addObserver:self
												 selector:@selector(presetMenuMayHaveChanged:)
													 name:NSMenuDidChangeItemNotification
												   object:nil];

	}

    return self;
}

-(void)dealloc {
	[self removeObserver:self forKeyPath:@"metadataArrayController.selection"];
	[self removeObserver:self forKeyPath:@"exporter.exportManager.selectedExportPresetDictionary"];
	[self removeObserver:self forKeyPath:@"exporter.metadataContainers"];
	[[NSNotificationCenter defaultCenter] removeObserver:self name:NSMenuDidChangeItemNotification object:nil];
}

#pragma mark - Properties

@synthesize firstView;
@synthesize lastView;
@synthesize selectedImageIsBigEnoughForStore;
@synthesize loginSheetUsernameField;
@synthesize loginSheetPasswordField;
@synthesize loginSheet;
@synthesize categoriesMenu;
@synthesize metadataArrayController;
@synthesize imageBrowser;
@synthesize aboutWindow;
@synthesize aboutIconImageView;
@synthesize aboutCreditsView;
@synthesize aboutVersionView;
@synthesize preferencesWindow;
@synthesize logImagePropertiesButton;
@synthesize logCurrentPresetButton;
@synthesize tagField;
@synthesize engine;
@synthesize exporter;

+(NSSet *)keyPathsForValuesAffectingLoginStatusText {
	return [NSSet setWithObjects:@"engine.working", @"engine.isAuthenticated", nil];
}

-(NSString *)loginStatusText {

	if (self.engine.isWorking) {
		return DKLocalizedStringForClass(@"authenticating title");
	} else {
		return self.engine.isAuthenticated ?
		[NSString stringWithFormat:DKLocalizedStringForClass(@"logged in title"), self.engine.screenName]
		: DKLocalizedStringForClass(@"not logged in title");
	}
}

+(NSSet *)keyPathsForValuesAffectingLogInOutButtonTitle {
	return [NSSet setWithObject:@"engine.isAuthenticated"];
}

-(NSString *)logInOutButtonTitle {
	return self.engine.isAuthenticated ? DKLocalizedStringForClass(@"log out title") : DKLocalizedStringForClass(@"log in title");
}

#pragma mark - Internal Logic

-(void)awakeFromNib {

	NSBundle *myBundle = [NSBundle bundleForClass:[self class]];

	[self.aboutCreditsView setEditable:NO];
	[self.aboutCreditsView readRTFDFromFile:[myBundle pathForResource:@"Credits"
															   ofType:@"rtf"]];

	self.aboutVersionView.stringValue = [NSString stringWithFormat:DKLocalizedStringForClass(@"version formatter"),
										 [myBundle.infoDictionary valueForKey:@"CFBundleShortVersionString"],
										 [myBundle.infoDictionary valueForKey:@"CFBundleVersion"]];

	NSString *categoriesPath = [myBundle pathForResource:@"Categories"
												  ofType:@"plist"];

	if (![[NSFileManager defaultManager] fileExistsAtPath:categoriesPath])
		return;

	NSDictionary *plist = [NSPropertyListSerialization propertyListWithData:[NSData dataWithContentsOfFile:categoriesPath]
																	options:0
																	 format:NULL
																	  error:nil];

	for (NSDictionary *category in [plist valueForKey:@"Categories"]) {

		NSMenuItem *item = [[NSMenuItem alloc] initWithTitle:[category valueForKey:@"name"]
													  action:nil
											   keyEquivalent:@""];
		[item setTag:[[category valueForKey:@"id"] integerValue]];
		[[categoriesMenu menu] addItem:item];
	}

#if !DEBUG
	if (([NSEvent modifierFlags] & NSAlternateKeyMask) != NSAlternateKeyMask) {
		[self.logImagePropertiesButton setHidden:YES];
		[self.logCurrentPresetButton setHidden:YES];
	}
#endif

	self.tagField.tokenizingCharacterSet = [NSCharacterSet characterSetWithCharactersInString:@","];

	[self.imageBrowser reloadData];
}

-(BOOL)imageAtIndexIsBigEnoughForStore:(NSUInteger)index {

	NSDictionary *preset = self.exporter.exportManager.selectedExportPresetDictionary;
	NSDictionary *image = [self.exporter.exportManager propertiesWithoutThumbnailForImageAtIndex:(unsigned)index];

	NSSize nativeSize = [[image valueForKey:kExportKeyImageSize] sizeValue];
	NSInteger sizeMode = [[preset valueForKey:@"ExportSizeStyle"] integerValue];
	NSUInteger longestSideAfterPreset = 0;

	if (sizeMode == 0 /* Pixels */) {

		NSNumber *widthInPixels = [preset valueForKey:@"DestinationPixelWidth"];
		NSNumber *heightInPixels = [preset valueForKey:@"DestinationPixelHeight"];
		longestSideAfterPreset = MAX([widthInPixels unsignedIntegerValue], [heightInPixels unsignedIntegerValue]);

	} else if (sizeMode == 1 /* Percent */) {

		NSNumber *percent = [preset valueForKey:@"PercentToSizeBy"];
		double scaleFactor = [percent doubleValue] / 100.0;
		longestSideAfterPreset = MAX(nativeSize.width * scaleFactor, nativeSize.height * scaleFactor);

	} else if (sizeMode == 2 /* Original size */) {

		longestSideAfterPreset = MAX(nativeSize.width, nativeSize.height);

	} else if (sizeMode == 3 /* Fit in inches */) {

		double widthInIn = [[preset valueForKey:@"DestinationPhysicalWidth"] doubleValue];
		double heightInIn = [[preset valueForKey:@"DestinationPhysicalHeight"] doubleValue];
		double dpi = [[preset valueForKey:@"DestinationDPI"] doubleValue];
		longestSideAfterPreset = MAX(widthInIn * dpi, heightInIn * dpi);

	} else if (sizeMode == 4 /* Fit in cm */) {

		double widthInCm = [[preset valueForKey:@"DestinationPhysicalWidthInCentimeters"] doubleValue];
		double heightInCm = [[preset valueForKey:@"DestinationPhysicalHeightInCentimeters"] doubleValue];
		double dpcm = [[preset valueForKey:@"DestinationDPI"] doubleValue] / 2.54;
		longestSideAfterPreset = MAX(widthInCm * dpcm, heightInCm * dpcm);
	}

	return longestSideAfterPreset >= k500pxMinimumSizeForStore;
}

-(void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
    if (context == k500pxUpdateStoreSizeWarningKVOContext) {
		self.selectedImageIsBigEnoughForStore = [self imageAtIndexIsBigEnoughForStore:self.metadataArrayController.selectionIndex];
    } else if ([keyPath isEqualToString:@"exporter.metadataContainers"]) {
		[self.imageBrowser reloadData];
		[self.imageBrowser setSelectionIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
		[self.metadataArrayController setSelectionIndex:0];
	} else {
        [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
    }
}

-(void)presetMenuMayHaveChanged:(NSNotification *)not {
	self.selectedImageIsBigEnoughForStore = [self imageAtIndexIsBigEnoughForStore:self.metadataArrayController.selectionIndex];
}

-(void)presentLoginFailedError:(NSError *)error {
	NSString *description = error.code == 401 ?
	DKLocalizedStringForClass(@"cannot login error description") :
	DKLocalizedStringForClass(@"cannot login auth failed description");

	NSAlert *alert = [NSAlert alertWithMessageText:DKLocalizedStringForClass(@"cannot login error title")
									 defaultButton:DKLocalizedStringForClass(@"ok title")
								   alternateButton:@""
									   otherButton:@""
						 informativeTextWithFormat:@"%@", description];

	[alert runModal];
}

#pragma mark - Actions

- (IBAction)logCurrentExportPreset:(id)sender {
	NSLog(@"%@", self.exporter.exportManager.selectedExportPresetDictionary);
}

- (IBAction)logCurrentImageProperties:(id)sender {
	NSLog(@"%@", [self.exporter.exportManager propertiesWithoutThumbnailForImageAtIndex:(unsigned)self.metadataArrayController.selectionIndex]);
}

- (IBAction)openLogsDirectory:(id)sender {

	NSURL *logsDir = [FiveHundredPxExportLogger logsDirectory];
	[[NSFileManager defaultManager] createDirectoryAtURL:logsDir withIntermediateDirectories:YES attributes:nil error:nil];

	[[NSWorkspace sharedWorkspace] openURL:logsDir];
}

- (IBAction)logInOut:(id)sender {

	if (self.engine.isAuthenticated) {
		[self.engine forgetStoredToken];
	} else {
		[NSApp beginSheet:self.loginSheet
		   modalForWindow:self.view.window
			modalDelegate:nil
		   didEndSelector:nil
			  contextInfo:nil];
	}

}

- (IBAction)cancelLogInSheet:(id)sender {
	[NSApp endSheet:self.loginSheet];
	[self.loginSheet close];
}

- (IBAction)confirmLogInSheet:(id)sender {

	if (self.loginSheetUsernameField.stringValue.length == 0) {
		NSBeep();
		[self.loginSheetUsernameField becomeFirstResponder];
		return;
	}

	if (self.loginSheetPasswordField.stringValue.length == 0) {
		NSBeep();
		[self.loginSheetPasswordField becomeFirstResponder];
		return;
	}

	[self cancelLogInSheet:sender];

	[self.engine authenticateWithCompletionBlock:^(NSError *error) {
		if (error != nil) {
			[self presentLoginFailedError:error];
		}
	}];
}

- (IBAction)showAboutSheet:(id)sender {
	[NSApp beginSheet:self.aboutWindow
	   modalForWindow:self.view.window
		modalDelegate:nil
	   didEndSelector:nil
		  contextInfo:nil];
}

- (IBAction)closeAboutSheet:(id)sender {
	[NSApp endSheet:self.aboutWindow];
	[self.aboutWindow close];
}

- (IBAction)showPreferencesSheet:(id)sender {
	[NSApp beginSheet:self.preferencesWindow
	   modalForWindow:self.view.window
		modalDelegate:nil
	   didEndSelector:nil
		  contextInfo:nil];
}

- (IBAction)closePreferencesSheet:(id)sender {
	[NSApp endSheet:self.preferencesWindow];
	[self.preferencesWindow close];
}

- (IBAction)checkForUpdates:(id)sender {
	[self.exporter.updater checkForUpdates:YES];
}

- (IBAction)viewSelectedPhotoOn500px:(id)sender {

	FiveHundredPxExtraMetadata *metadata = [self.exporter.metadataContainers objectAtIndex:self.metadataArrayController.selectionIndex];
	if (metadata.existing500pxURL != nil)
		[[NSWorkspace sharedWorkspace] openURL:metadata.existing500pxURL];
	else
		NSBeep();
}

#pragma mark -
#pragma mark Image Browser

-(NSUInteger)numberOfItemsInImageBrowser:(IKImageBrowserView *)aBrowser {
	return [self.metadataArrayController.arrangedObjects count];
}

-(id)imageBrowser:(IKImageBrowserView *)aBrowser itemAtIndex:(NSUInteger)index {
	return [self.metadataArrayController.arrangedObjects objectAtIndex:index];
}

-(void)imageBrowserSelectionDidChange:(IKImageBrowserView *)aBrowser {
	self.metadataArrayController.selectionIndexes = aBrowser.selectionIndexes;
}

@end


text:
import * as angular from 'angular';

declare module 'angular' {
    export namespace dynamicLocale {

        interface tmhDynamicLocaleService {
            set(locale: string): angular.IPromise<string>;
            get(): string;
        }

        interface tmhDynamicLocaleProvider extends angular.IServiceProvider {
            localeLocationPattern(location: string): tmhDynamicLocaleProvider;
            localeLocationPattern(): string;
            storageKey(storageKey: string): void;
            useStorage(storageName: string): void;
            useCookieStorage(): void;
        }
    }
}


text:
@echo off
rem Content dir with "\" in the end
rem "%~dp0" = directory of this script
set CONTENTDIR=%~dp0
set MYSCRIPTS="c:\myscipts"
set UNCPATH="\\path\to"
set SCRIPT="Del-exam_prof-c_temp.ps1"

if not exist %MYSCRIPTS% mkdir %MYSCRIPTS%
copy /Y %UNCPATH%\%SCRIPT% %MYSCRIPTS%
powershell.exe -executionpolicy bypass -file %MYSCRIPTS%\%SCRIPT%


text:
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.

/**
 * Package containing the implementations for AzureDigitalTwinsManagementClient. Azure Digital Twins Client for managing
 * DigitalTwinsInstance.
 */
package com.azure.resourcemanager.digitaltwins.implementation;


text:
#ifndef __itkSmartPointer_h
#define __itkSmartPointer_h

#include <iostream>

namespace itk
{
/** \class SmartPointer
 * \brief Implements transparent reference counting.
 *
 * SmartPointer implements reference counting by overloading
 * operator -> (and *) among others. This allows natural interface
 * to the class referred to by the pointer without having to invoke
 * special Register()/UnRegister() methods directly.
 *
 * To compile / test this class
 * Windows: cl SmartPointerTest.cxx; .\\SmartPointerTest.exe
 * linux:   c++ SmartPointerTest.cxx ./a.out
 * other:   CCcompiler SmartPointerTest.cxx  ./a.out
 *
 * \ingroup ITKSystemObjects
 * \ingroup DataAccess
 * \ingroup ITKCommon
 */
template< class TObjectType >
class SmartPointer
{
public:
  typedef TObjectType ObjectType;

  /** Constructor  */
  SmartPointer ()
  { m_Pointer = 0; }

  /** Copy constructor  */
  SmartPointer (const SmartPointer< ObjectType > & p):
    m_Pointer(p.m_Pointer)
  { this->Register(); }

  /** Constructor to pointer p  */
  SmartPointer (ObjectType *p):
    m_Pointer(p)
  { this->Register(); }

  /** Destructor  */
  ~SmartPointer ()
  {
    this->UnRegister();
    m_Pointer = 0;
  }

  /** Overload operator ->  */
  ObjectType * operator->() const
  { return m_Pointer; }

  /** Return pointer to object.  */
  operator ObjectType *() const
        { return m_Pointer; }

  /** Test if the pointer has been initialized */
  bool IsNotNull() const
  { return m_Pointer != 0; }
  bool IsNull() const
  { return m_Pointer == 0; }

  /** Template comparison operators. */
  template< typename TR >
  bool operator==(TR r) const
  { return ( m_Pointer == static_cast< const ObjectType * >( r ) ); }

  template< typename TR >
  bool operator!=(TR r) const
  { return ( m_Pointer != static_cast< const ObjectType * >( r ) ); }

  /** Access function to pointer. */
  ObjectType * GetPointer() const
  { return m_Pointer; }

  /** Comparison of pointers. Less than comparison.  */
  bool operator<(const SmartPointer & r) const
  { return (void *)m_Pointer < (void *)r.m_Pointer; }

  /** Comparison of pointers. Greater than comparison.  */
  bool operator>(const SmartPointer & r) const
  { return (void *)m_Pointer > (void *)r.m_Pointer; }

  /** Comparison of pointers. Less than or equal to comparison.  */
  bool operator<=(const SmartPointer & r) const
  { return (void *)m_Pointer <= (void *)r.m_Pointer; }

  /** Comparison of pointers. Greater than or equal to comparison.  */
  bool operator>=(const SmartPointer & r) const
  { return (void *)m_Pointer >= (void *)r.m_Pointer; }

  /** Overload operator assignment.  */
  // cppcheck-suppress operatorEqVarError
  SmartPointer & operator=(const SmartPointer & r)
  { return this->operator=( r.GetPointer() ); }

  /** Overload operator assignment.  */
  SmartPointer & operator=(ObjectType *r)
  {
    if ( m_Pointer != r )
      {
      ObjectType *tmp = m_Pointer; //avoid recursive unregisters by retaining
                                   // temporarily
      m_Pointer = r;
      this->Register();
      if ( tmp ) { tmp->UnRegister(); }
      }
    return *this;
  }

  /** Function to print object pointed to  */
  ObjectType * Print(std::ostream & os) const
  {
    // This prints the object pointed to by the pointer
    ( *m_Pointer ).Print(os);
    return m_Pointer;
  }

private:
  /** The pointer to the object referred to by this smart pointer. */
  ObjectType *m_Pointer;

  void Register()
  {
    if ( m_Pointer ) { m_Pointer->Register(); }
  }

  void UnRegister()
  {
    if ( m_Pointer ) { m_Pointer->UnRegister(); }
  }
};

template< typename T >
std::ostream & operator<<(std::ostream & os, SmartPointer< T > p)
{
  p.Print(os);
  return os;
}
} // end namespace itk

#endif