text:
Tor all the things!
###################
:date: 2014-10-02 03:45
:author: kura
:category: tor
:tags: tor
:slug: tor-all-the-things

.. contents::

Privacy is key
--------------

I am a big fan of keeping my browsing habits and other personal information
private. As such, I use a VPN service provided by `proxy.sh (affiliate link)
<https://proxy.sh/panel/aff.php?aff=079>`_, I also use their proxies, Tor and
various other proxies, usually from online lists, should I feel the need.

Anonymous nodes
---------------

I've run some Tor nodes for quite a while now, two Exits and five relays to be
precise. They are all listed as being part of the same family and have never
had any reference to me being their operator.

Sadly, these seven nodes will always remain a secret due to the hassle that
inherently comes with running Tor Exit nodes. These issues include some mean
emails and IP addresses and CIDR blocks being blacklisted by services like
Netflix.

New nodes!
----------

The good news is, I have recently launched three more nodes! These nodes
belong to a different family and share my PGP identity, an email address I can
be contacted at with regards to the nodes and my lovely bitcoin address for
anyone interested in firing off a donation.

At time of writing, the servers are part of the Tor network but they are
currently in their initial phase of being rarely used by the network itself.
A `post on the Tor blog
<https://blog.torproject.org/blog/lifecycle-of-a-new-relay>`_ gives some
anecdotal information as to each phase, why it happens and what it means. I
suggest giving it a read since it's quite interesting.

In my experience, within about two weeks, all three new nodes will be available
as fast relays and be acceptable is guard relays too.

Bandwidth
---------

Each of the three nodes has a 1Gbps network interface, two of the nodes have
truly infinite bandwidth while the third only has 1TB of outbound transfer but
infinite inbound.

Hopefully all three servers will add some much needed bandwidth and speed
capacity to the Tor network.

The US
------

Another piece of good news is one of these servers is actually running in the
U.S., which is something I tend to stay away from in general. This will be my
second U.S. Tor node, hopefully it will push me to run more nodes in that
region in the future.

The nodes
---------

These new nodes having a nickname scheme akin to the Ubuntu convention, but
slightly more disgusting, as befits my warped personality.

* `SpunkWeasel 865A408E2B1EA3E18C9A12E80A8D458F9C985C16 <https://globe.torproject.org/#/relay/865A408E2B1EA3E18C9A12E80A8D458F9C985C16>`_,
* `AnorexicSquirrel B8E6FFEB6F91FA3D26BC572836FB0ABBD142DC87 <https://globe.torproject.org/#/relay/B8E6FFEB6F91FA3D26BC572836FB0ABBD142DC87>`_ and,
* `EjactulatingWhale E803339621BD78503AC333F0FDA35DB705B18071 <https://globe.torproject.org/#/relay/E803339621BD78503AC333F0FDA35DB705B18071>`_.

Feel free to contact the address listed on the nodes if you have any queries or
questions regarding the nodes or running your own. Bitcoin donations are always
welcome and will help keep these nodes running and allow more to be onlined.

Relay, relay, relay
-------------------

As a final note, running a relay is pretty damn safe. You can do it pretty
cheaply too on AWS, with DigitalOcean or any other VPS provide. Relays are
generally allowed to be run on those environments too, although dropping an
email or support ticket to say you're doing it is always a good idea.

The Tor network needs nodes, especially Guards and Exits. Exits are a
difficult thing for most people to run but relays and Guards are easy. A Guard
relay is simply just a standard relay that has currently been chosen to have
the Guard flag, which is in a time period-based rotation, so it really is
simple.

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace Icecave\Siphon\Player\Statistics;

use Icecave\Siphon\Reader\ReaderInterface;

/**
 * Client for reading player statistics feeds.
 */
interface PlayerStatisticsReaderInterface extends ReaderInterface
{
}


text:
namespace Microsoft.Azure.Management.Network
{
    using System;
    using System.Collections;
    using System.Collections.Generic;
    using System.Threading;
    using System.Threading.Tasks;
    using Microsoft.Rest;
    using Microsoft.Rest.Azure;
    using Models;

    /// <summary>
    /// Extension methods for PublicIPAddressesOperations.
    /// </summary>
    public static partial class PublicIPAddressesOperationsExtensions
    {
            /// <summary>
            /// The delete publicIpAddress operation deletes the specified publicIpAddress.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the subnet.
            /// </param>
            public static void Delete(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName)
            {
                Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).DeleteAsync(resourceGroupName, publicIpAddressName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The delete publicIpAddress operation deletes the specified publicIpAddress.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the subnet.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task DeleteAsync(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, CancellationToken cancellationToken = default(CancellationToken))
            {
                await operations.DeleteWithHttpMessagesAsync(resourceGroupName, publicIpAddressName, null, cancellationToken).ConfigureAwait(false);
            }

            /// <summary>
            /// The delete publicIpAddress operation deletes the specified publicIpAddress.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the subnet.
            /// </param>
            public static void BeginDelete(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName)
            {
                Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).BeginDeleteAsync(resourceGroupName, publicIpAddressName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The delete publicIpAddress operation deletes the specified publicIpAddress.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the subnet.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task BeginDeleteAsync(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, CancellationToken cancellationToken = default(CancellationToken))
            {
                await operations.BeginDeleteWithHttpMessagesAsync(resourceGroupName, publicIpAddressName, null, cancellationToken).ConfigureAwait(false);
            }

            /// <summary>
            /// The Get publicIpAddress operation retrieves information about the
            /// specified pubicIpAddress
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the subnet.
            /// </param>
            /// <param name='expand'>
            /// expand references resources.
            /// </param>
            public static PublicIPAddress Get(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, string expand = default(string))
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).GetAsync(resourceGroupName, publicIpAddressName, expand), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The Get publicIpAddress operation retrieves information about the
            /// specified pubicIpAddress
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the subnet.
            /// </param>
            /// <param name='expand'>
            /// expand references resources.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PublicIPAddress> GetAsync(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, string expand = default(string), CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.GetWithHttpMessagesAsync(resourceGroupName, publicIpAddressName, expand, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// The Put PublicIPAddress operation creates/updates a stable/dynamic
            /// PublicIP address
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the publicIpAddress.
            /// </param>
            /// <param name='parameters'>
            /// Parameters supplied to the create/update PublicIPAddress operation
            /// </param>
            public static PublicIPAddress CreateOrUpdate(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, PublicIPAddress parameters)
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).CreateOrUpdateAsync(resourceGroupName, publicIpAddressName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The Put PublicIPAddress operation creates/updates a stable/dynamic
            /// PublicIP address
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the publicIpAddress.
            /// </param>
            /// <param name='parameters'>
            /// Parameters supplied to the create/update PublicIPAddress operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PublicIPAddress> CreateOrUpdateAsync(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, PublicIPAddress parameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.CreateOrUpdateWithHttpMessagesAsync(resourceGroupName, publicIpAddressName, parameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// The Put PublicIPAddress operation creates/updates a stable/dynamic
            /// PublicIP address
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the publicIpAddress.
            /// </param>
            /// <param name='parameters'>
            /// Parameters supplied to the create/update PublicIPAddress operation
            /// </param>
            public static PublicIPAddress BeginCreateOrUpdate(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, PublicIPAddress parameters)
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).BeginCreateOrUpdateAsync(resourceGroupName, publicIpAddressName, parameters), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The Put PublicIPAddress operation creates/updates a stable/dynamic
            /// PublicIP address
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='publicIpAddressName'>
            /// The name of the publicIpAddress.
            /// </param>
            /// <param name='parameters'>
            /// Parameters supplied to the create/update PublicIPAddress operation
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<PublicIPAddress> BeginCreateOrUpdateAsync(this IPublicIPAddressesOperations operations, string resourceGroupName, string publicIpAddressName, PublicIPAddress parameters, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, publicIpAddressName, parameters, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a subscription.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            public static IPage<PublicIPAddress> ListAll(this IPublicIPAddressesOperations operations)
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).ListAllAsync(), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a subscription.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IPage<PublicIPAddress>> ListAllAsync(this IPublicIPAddressesOperations operations, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListAllWithHttpMessagesAsync(null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a resource group.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            public static IPage<PublicIPAddress> List(this IPublicIPAddressesOperations operations, string resourceGroupName)
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).ListAsync(resourceGroupName), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a resource group.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='resourceGroupName'>
            /// The name of the resource group.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IPage<PublicIPAddress>> ListAsync(this IPublicIPAddressesOperations operations, string resourceGroupName, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListWithHttpMessagesAsync(resourceGroupName, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a subscription.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='nextPageLink'>
            /// The NextLink from the previous successful call to List operation.
            /// </param>
            public static IPage<PublicIPAddress> ListAllNext(this IPublicIPAddressesOperations operations, string nextPageLink)
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).ListAllNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a subscription.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='nextPageLink'>
            /// The NextLink from the previous successful call to List operation.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IPage<PublicIPAddress>> ListAllNextAsync(this IPublicIPAddressesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListAllNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a resource group.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='nextPageLink'>
            /// The NextLink from the previous successful call to List operation.
            /// </param>
            public static IPage<PublicIPAddress> ListNext(this IPublicIPAddressesOperations operations, string nextPageLink)
            {
                return Task.Factory.StartNew(s => ((IPublicIPAddressesOperations)s).ListNextAsync(nextPageLink), operations, CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Default).Unwrap().GetAwaiter().GetResult();
            }

            /// <summary>
            /// The List publicIpAddress operation retrieves all the publicIpAddresses in
            /// a resource group.
            /// </summary>
            /// <param name='operations'>
            /// The operations group for this extension method.
            /// </param>
            /// <param name='nextPageLink'>
            /// The NextLink from the previous successful call to List operation.
            /// </param>
            /// <param name='cancellationToken'>
            /// The cancellation token.
            /// </param>
            public static async Task<IPage<PublicIPAddress>> ListNextAsync(this IPublicIPAddressesOperations operations, string nextPageLink, CancellationToken cancellationToken = default(CancellationToken))
            {
                using (var _result = await operations.ListNextWithHttpMessagesAsync(nextPageLink, null, cancellationToken).ConfigureAwait(false))
                {
                    return _result.Body;
                }
            }

    }
}


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright 2015 The Chromium Authors. All rights reserved.
     Use of this source code is governed by a BSD-style license that can be
     found in the LICENSE file. -->

<!-- The view shown when there are no most visited items in document mode:
     "Nothing to see here..." -->
<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:padding="16dp"
    android:orientation="vertical">

    <ImageView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="15dp"
        android:contentDescription="@null"
        android:src="@drawable/ic_most_visited_placeholder" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginBottom="8dp"
        android:color="#c8c8c8"
        android:gravity="center_horizontal"
        android:text="@string/most_visited_placeholder_title"
        android:textSize="16sp" />

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:color="#c8c8c8"
        android:gravity="center_horizontal"
        android:text="@string/most_visited_placeholder_summary"
        android:textSize="12sp" />

</LinearLayout>


text:
/**
 */
package psdstructure;

/**
 *
 * A representation of the model object 'Radio Button'.
 *
 *
 *

 * The following features are supported:
 *

 *
{@link psdstructure.RadioButton#getValue Value}

 *
{@link psdstructure.RadioButton#isSelected Selected}

 *

 *

 *
 * @see psdstructure.PsdstructurePackage#getRadioButton()
 * @model
 * @generated
 */
public interface RadioButton extends View {
	/**
	 * Returns the value of the 'Value' attribute.
	 *
	 *

	 * If the meaning of the 'Value' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Value' attribute.
	 * @see #setValue(String)
	 * @see psdstructure.PsdstructurePackage#getRadioButton_Value()
	 * @model
	 * @generated
	 */
	String getValue();

	/**
	 * Sets the value of the '{@link psdstructure.RadioButton#getValue Value}' attribute.
	 *
	 *
	 * @param value the new value of the 'Value' attribute.
	 * @see #getValue()
	 * @generated
	 */
	void setValue(String value);

	/**
	 * Returns the value of the 'Selected' attribute.
	 *
	 *

	 * If the meaning of the 'Selected' attribute isn't clear,
	 * there really should be more of a description here...
	 *

	 *
	 * @return the value of the 'Selected' attribute.
	 * @see #setSelected(boolean)
	 * @see psdstructure.PsdstructurePackage#getRadioButton_Selected()
	 * @model
	 * @generated
	 */
	boolean isSelected();

	/**
	 * Sets the value of the '{@link psdstructure.RadioButton#isSelected Selected}' attribute.
	 *
	 *
	 * @param value the new value of the 'Selected' attribute.
	 * @see #isSelected()
	 * @generated
	 */
	void setSelected(boolean value);

} // RadioButton


text:
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace DotVVM.Samples.Tests
{
    [TestClass]
    public class BasicSamplesVirtDirTests : BasicSamplesTests
    {
        protected override string BaseUrl
        {
            get { return "http://localhost:8627/dotvvmSamples/"; }
        }

        [TestMethod]
        public void Sample1Test_VirtDir() { Sample1Test(); }
        [TestMethod]
        public void Sample2Test_VirtDir() { Sample2Test(); }
        [TestMethod]
        public void Sample3Test_VirtDir() { Sample3Test(); }
        [TestMethod]
        public void Sample4Test_VirtDir() { Sample4Test(); }
        [TestMethod]
        public void Sample5Test_VirtDir() { Sample5Test(); }
        [TestMethod]
        public void Sample6Test_VirtDir() { Sample6Test(); }
        [TestMethod]
        public void Sample8Test_VirtDir() { Sample8Test(); }
        [TestMethod]
        public void Sample9Test_VirtDir() { Sample9Test(); }
        [TestMethod]
        public void Sample10Test_VirtDir() { Sample10Test(); }
        [TestMethod]
        public void Sample11Test_VirtDir() { Sample11Test(); }
        [TestMethod]
        public void Sample12Test_VirtDir() { Sample12Test(); }
        [TestMethod]
        public void Sample13Test_VirtDir() { Sample13Test(); }
        [TestMethod]
        public void Sample14Test_VirtDir() { Sample14Test(); }
        [TestMethod]
        public void Sample15Test_VirtDir() { Sample15Test(); }
        [TestMethod]
        public void Sample16Test_VirtDir() { Sample16Test(); }
        [TestMethod]
        public void Sample17Test_VirtDir() { Sample17Test(); }
        [TestMethod]
        public void Sample18Test_VirtDir() { Sample18Test(); }
        [TestMethod]
        public void Sample20Test_VirtDir() { Sample20Test(); }
        [TestMethod]
        public void Sample22Test_VirtDir() { Sample22Test(); }
        [TestMethod]
        public void Sample24Test_VirtDir() { Sample24Test(); }

    }
}


text:
_Header only 3d quickhull in ANSI C_

![](images/quickhull.png)

Usage
=====

To use this library, simply include `quickhull.h` once with the `QUICKHULL_IMPLEMENTATION` define in a `.cpp` file.

```c
#define QUICKHULL_IMPLEMENTATION
#include "quickhull.h"
```

The usage of the library is quite simple, generate or gather a set of points, and call `qh_quickhull3d`. The result is a mesh with a set of indexed normals and vertices ready to upload in a GPU.

```c
const int n = 100;
qh_vertex_t vertices[n];

for (int i = 0; i < n; ++i) {
    float a0 = (rand_0_1() * M_PI * 2);
    float a1 = (rand_0_1() * M_PI * 2);
    vertices[i].z = sin(a0) * radius;
    vertices[i].x = cos(a1) * cos(a0) * rand_0_1();
    vertices[i].y = sin(a1) * cos(a0) * rand_0_1();
}

qh_mesh_t mesh = qh_quickhull3d(vertices, n);

// ...

qh_free_mesh(mesh);

```

Example
=======

- Open Frameworks wrapper: https://github.com/satcy/ofx3DQuickHull
- Obj to hull: https://github.com/karimnaaji/3d-quickhull/blob/master/example/command_line.cpp

If you're interested in low-polygon rendering, using quickhull as a base for mesh triangulation can give such results:

![](images/mesh_quickhull.png)
![](http://karim.naaji.fr/images/lowpoly0.png)


text:
## Unblock files
Get-ChildItem -Path $PSScriptRoot -Recurse -File | Unblock-File

## dot source all script files
Get-ChildItem -Path $PSScriptRoot -Recurse -File -Filter '*.ps1' | ForEach-Object {
    if($_.DirectoryName -imatch '.+\\poshkeepass\\(functions|internal)$')
    {
        . $_.FullName
    }
}

[String] $Global:KeePassConfigurationFile = '{0}\KeePassConfiguration.xml' -f $PSScriptRoot
[String] $Global:KeePassLibraryPath = '{0}\bin\KeePassLib_2.39.1.dll' -f $PSScriptRoot

## Source KpLib
Import-KPLibrary

## Check for config and init
if (-not(Test-Path -Path $Global:KeePassConfigurationFile))
{
    Write-Warning -Message '**IMPORTANT NOTE:** Please always keep an up-to-date backup of your keepass database files and key files if used.'

    $Versions = ((Get-ChildItem "$PSScriptRoot\..").Name | Sort-Object -Descending)

    if(-not $(Restore-KPConfigurationFile))
    {
        New-KPConfigurationFile

        $previousVersion = [int]($Versions[1] -replace '\.')
        $CurrentVersion = $Versions[0]
        if($previousVersion -lt 2124)
        {
            Write-Warning -Message ('**BREAKING CHANGES:** This new version of the module {0} contains BREAKING CHANGES, please review the changelog or readme for details!' -f $CurrentVersion)
        }

        Write-Warning -Message 'This message will not show again on next import.'
    }
}
else
{
    New-Variable -Name 'KeePassProfileNames' -Value @((Get-KeePassDatabaseConfiguration).Name) -Scope 'Script' #-Option Constant
}

Export-ModuleMember *

if(Get-Command Register-ArgumentCompleter -ea 0)
{
    Register-ArgumentCompleter -ParameterName 'DatabaseProfileName' -ScriptBlock {
        param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

        Get-KeePassDatabaseConfiguration | Where-Object { $_.Name -ilike "${wordToComplete}*" } | ForEach-Object {
            New-Object System.Management.Automation.CompletionResult ( $_.Name, $_.Name, 'ParameterValue', $_.Name)
        }
    }

    Register-ArgumentCompleter -ParameterName 'IconName' -ScriptBlock {
        param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

        [KeePassLib.PwIcon].GetEnumValues() | Where-Object { $_ -ilike "${wordToComplete}*" } | ForEach-Object {
            New-Object System.Management.Automation.CompletionResult ( $_, $_, 'ParameterValue', $_)
        }
    }

    Register-ArgumentCompleter -ParameterName 'PasswordProfileName' -ScriptBlock {
        param($commandName, $parameterName, $wordToComplete, $commandAst, $fakeBoundParameter)

        (Get-KPPasswordProfile).Name | Where-Object { $_ -ilike "${wordToComplete}*" } | ForEach-Object {
            New-Object System.Management.Automation.CompletionResult ( $_, $_, 'ParameterValue', $_)
        }
    }
}

## add one for paths - can't do this until connection management is implemented.


text:
import $ from 'jquery';

import SlidyScreen from './screen';
import SlidyRouter from './router';
import SlidyDeck from './deck';
import SlidyUI from './ui';

// For IE9
import 'html5-history-api';

// No / after # in url in IE9
window.history.setup(null, '');

function getControlSettings($el) {
  const defaults = {
    keyboard: true,
    scroll: true,
    touch: 'auto',
  };
  const controls = $.extend({}, defaults, $el.data('controls'));

  if (controls.touch === 'auto') controls.touch = 'ontouchstart' in window;

  return controls;
}

function slidy($context) {
  const screen = new SlidyScreen({$screen: $context});
  const deck = new SlidyDeck({$context});

  const controls = getControlSettings($context);

  new SlidyRouter({deck})
    .bindToScreenAndWindow(screen, window);

  const ui = new SlidyUI({deck, screen})
    .bindDeckUI()
    .bindSlideUI();

  if (controls.keyboard) ui.bindKeyboardUI();
  if (controls.scroll) ui.bindScrollUI();
  if (controls.touch) ui.bindTouchUI();
}

$(document).ready(() => slidy($(document.body)));


text:
Command to compile an example:

    ./make [name of example]

Command to compile and upload an example to a connected Arduino:

    ./make [name of example] upload

Before we can run these commands, we need to install a few dependencies:

* [The Haskell platform](https://www.haskell.org/platform/)
* [Arduino-Makefile](https://github.com/sudar/Arduino-Makefile)

Haskell should be installed system wide, but Arduino-Makefile should just be
copied to the root of this repository.

In order to use Arduino-Makefile, we also need standard build tools like make
and gcc, and in particular, the [gcc toolchain for avr](http://www.nongnu.org/avr-libc/).

On a Fedora system, we can install all dependencies with the following
commands:

    yum install haskell-platform
    yum install arduino-core
    git clone https://github.com/sudar/Arduino-Makefile.git

The arduino-core package depends on the following packages:

* avr-gcc
* avr-gcc-c++
* avr-libc
* avrdude


text:
// Copyright © 2011 - Present RealDimensions Software, LLC
//
// 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
//
// 	http://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.

namespace chocolatey.infrastructure.services
{
    using System.Text.RegularExpressions;

    /// <summary>
    ///   Regular expressions helper
    /// </summary>
    public interface IRegularExpressionService
    {
        /// <summary>
        ///   Replaces the specified input.
        /// </summary>
        /// <param name="input">The input.</param>
        /// <param name="pattern">The pattern.</param>
        /// <param name="matchEvaluator">The match evaluator.</param>
        /// <returns></returns>
        string replace(string input, string pattern, MatchEvaluator matchEvaluator);
    }
}


text:
<!DOCTYPE html>

  <meta charset="utf-8">
  <title>QUnit Example</title>
  <link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.20.0.css">

.validate()

  Returns: Boolean

Validates each element in the set of matched elements using the jqValidator object passed as a parameter, overriding default validation behaviour and validation

.validate()

.validate( jqValidator )

  jqValidator
  Type: PlainObject

.validation()

.validation( jqValidator )

Binds a jqValidator object to an element, this item will be used

//jqValidatorObject
//jqPostValidationObject


text:
from __future__ import absolute_import

import six
import json
import logging
from uuid import uuid4
from datetime import datetime

from dateutil.parser import parse

from cassandra.cqlengine import connection
from cassandra.cqlengine import management
from cassandra.cluster import NoHostAvailable
from cassandra.cqlengine import columns, models

from scrapi import events
from scrapi import settings
from scrapi.util import try_n_times
from scrapi.util import copy_to_unicode
from scrapi.linter import RawDocument, NormalizedDocument
from scrapi.processing import DocumentTuple
from scrapi.processing.base import BaseHarvesterResponse, BaseProcessor, BaseDatabaseManager

logger = logging.getLogger(__name__)
logging.getLogger('cqlengine.cql').setLevel(logging.WARN)

class DatabaseManager(BaseDatabaseManager):
    _models = set()

    def __init__(self, uri=None, keyspace=None):
        self._setup = False

        self.uri = uri or settings.CASSANDRA_URI
        self.keyspace = keyspace or settings.CASSANDRA_KEYSPACE
        self._models = set(map(self.register_model, self._models))

    def setup(self, force=False, sync=True):
        if self._setup and not force:
            return True

        try:
            connection.setup(self.uri, self.keyspace)
            if sync:
                management.create_keyspace(self.keyspace, replication_factor=1, strategy_class='SimpleStrategy')
                for model in self._models:
                    model.__keyspace__ = self.keyspace
                    management.sync_table(model)
        except NoHostAvailable:
            logger.error('Could not connect to Cassandra, expect errors.')
            return False

        # Note: return values are for test skipping
        self._setup = True
        return True

    def tear_down(self):
        if not self._setup:
            logger.warning('Attempting to tear down a database that was never setup')

        if connection.cluster is not None:
            connection.cluster.shutdown()
        if connection.session is not None:
            connection.session.shutdown()

        self._setup = False

    def clear(self, force=False):
        assert force, 'clear_keyspace must be called with force'
        assert self.keyspace != settings.CASSANDRA_KEYSPACE, 'Cannot erase the keyspace in settings'

        management.delete_keyspace(self.keyspace)
        self.tear_down()
        return self.setup()

    def register_model(self, model):
        self._models.add(model)
        model.__keyspace__ = self.keyspace
        if self._setup:
            management.sync_table(model)
        return model

    def celery_setup(self, *args, **kwargs):
        self.tear_down()
        self.setup()

    @classmethod
    def registered_model(cls, model):
        cls._models.add(model)
        return model

class CassandraProcessor(BaseProcessor):
    '''
    Cassandra processor for scrapi. Handles versioning and storing documents in Cassandra
    '''
    NAME = 'cassandra'
    _manager = None

    @property
    def manager(self):
        self._manager = self._manager or DatabaseManager()
        return self._manager

    @property
    def HarvesterResponseModel(self):
        return HarvesterResponse

    @events.logged(events.PROCESSING, 'normalized.cassandra')
    def process_normalized(self, raw_doc, normalized):
        self.send_to_database(
            source=copy_to_unicode(raw_doc['source']),
            docID=copy_to_unicode(raw_doc['docID']),
            contributors=copy_to_unicode(json.dumps(normalized['contributors'])),
            description=copy_to_unicode(normalized.get('description')),
            uris=copy_to_unicode(json.dumps(normalized['uris'])),
            providerUpdatedDateTime=parse(normalized['providerUpdatedDateTime']).replace(tzinfo=None),
            freeToRead=copy_to_unicode(json.dumps(normalized.get('freeToRead', {}))),
            languages=normalized.get('language'),
            licenses=copy_to_unicode(json.dumps(normalized.get('licenseRef', []))),
            publisher=copy_to_unicode(json.dumps(normalized.get('publisher', {}))),
            sponsorships=copy_to_unicode(json.dumps(normalized.get('sponsorship', []))),
            title=copy_to_unicode(normalized['title']),
            version=copy_to_unicode(json.dumps(normalized.get('version'), {})),
            otherProperties=copy_to_unicode(json.dumps(normalized.get('otherProperties', {}))),
            shareProperties=copy_to_unicode(json.dumps(normalized['shareProperties']))
        ).save()

    @events.logged(events.PROCESSING, 'raw.cassandra')
    def process_raw(self, raw_doc):
        self.send_to_database(
            source=raw_doc['source'],
            docID=raw_doc['docID'],
            filetype=raw_doc['filetype'],
            doc=six.text_type(raw_doc['doc']).encode('utf-8'),
            timestamps=raw_doc.get('timestamps', {})
        ).save()

    def send_to_database(self, docID, source, **kwargs):
        documents = DocumentModel.objects(docID=docID, source=source)
        if documents:
            document = documents[0]
            if self.different(dict(document), dict(docID=docID, source=source, **kwargs)):
                # Create new version, get UUID of new version, update
                versions = document.versions + kwargs.pop('versions', [])
                version = VersionModel(key=uuid4(), **dict(document))
                version.save()
                versions.append(version.key)
                return document.update(versions=versions, **kwargs)
            else:
                raise events.Skip("No changes detected for document with ID {0} and source {1}.".format(docID, source))
        else:
            # create document
            return DocumentModel.create(docID=docID, source=source, **kwargs)

    def different(self, old, new):
        try:
            return not all([new[key] == old[key] or (not new[key] and not old[key]) for key in new.keys() if key != 'timestamps'])
        except Exception:
            return True  # If the document fails to load/compare for some reason, accept a new version

    def documents(self, *sources):
        sources = sources
        q = DocumentModel.objects.timeout(500).allow_filtering().all().limit(1000)
        querysets = (q.filter(source=source) for source in sources) if sources else [q]
        for query in querysets:
            page = try_n_times(5, list, query)
            while len(page) > 0:
                for doc in page:
                    yield DocumentTuple(self.to_raw(doc), self.to_normalized(doc))
                page = try_n_times(5, self.next_page, query, page)

    def next_page(self, query, page):
        return list(query.filter(docID__gt=page[-1].docID))

    def to_raw(self, doc):
        return RawDocument({
            'doc': doc.doc,
            'docID': doc.docID,
            'source': doc.source,
            'filetype': doc.filetype,
            'timestamps': doc.timestamps,
            'versions': doc.versions
        }, validate=False, clean=False)

    def to_normalized(self, doc):
        # make the new dict actually contain real items
        normed = {}
        do_not_include = ['docID', 'doc', 'filetype', 'timestamps', 'source']
        for key, value in dict(doc).items():
            if value and key not in do_not_include:
                try:
                    normed[key] = json.loads(value)
                except (ValueError, TypeError):
                    normed[key] = value

        if normed.get('versions'):
            normed['versions'] = list(map(str, normed['versions']))

        # No datetime means the document wasn't normalized (probably wasn't on the approved list)
        # TODO - fix odd circular import that makes us import this here
        from scrapi.base.helpers import datetime_formatter
        if normed.get('providerUpdatedDateTime'):
            normed['providerUpdatedDateTime'] = datetime_formatter(normed['providerUpdatedDateTime'].isoformat())
        else:
            return None

        return NormalizedDocument(normed, validate=False, clean=False)

    def get(self, source, docID):

        documents = DocumentModel.objects(source=source, docID=docID)

        try:
            doc = documents[0]
        except IndexError:
            return None
        raw = self.to_raw(doc)
        normalized = self.to_normalized(doc)

        return DocumentTuple(raw, normalized)

    def delete(self, source, docID):
        document = DocumentModel.objects(source=source, docID=docID)
        document.timeout(5).delete()

    def create(self, attributes):
        DocumentModel.create(**attributes).save()

@DatabaseManager.registered_model
class DocumentModel(models.Model):
    '''
    Defines the schema for a metadata document in cassandra

    The schema contains denormalized raw document, denormalized
    normalized (so sorry for the terminology clash) document, and
    a list of version IDs that refer to previous versions of this
    metadata.
    '''
    __table_name__ = 'documents_source_partitioned'

    # Raw
    source = columns.Text(primary_key=True, partition_key=True)
    docID = columns.Text(primary_key=True, index=True, clustering_order='ASC')

    doc = columns.Bytes()
    filetype = columns.Text()
    timestamps = columns.Map(columns.Text, columns.Text)

    # Normalized
    uris = columns.Text()
    title = columns.Text()
    contributors = columns.Text()  # TODO
    providerUpdatedDateTime = columns.DateTime()

    description = columns.Text()
    freeToRead = columns.Text()  # TODO
    languages = columns.List(columns.Text())
    licenses = columns.Text()  # TODO
    publisher = columns.Text()  # TODO
    subjects = columns.List(columns.Text())
    tags = columns.List(columns.Text())
    sponsorships = columns.Text()  # TODO
    version = columns.Text()  # TODO
    otherProperties = columns.Text()  # TODO
    shareProperties = columns.Text()  # TODO

    # Additional metadata
    versions = columns.List(columns.UUID)

@DatabaseManager.registered_model
class DocumentModelOld(models.Model):
    '''
    Defines the schema for a metadata document in cassandra

    The schema contains denormalized raw document, denormalized
    normalized (so sorry for the terminology clash) document, and
    a list of version IDs that refer to previous versions of this
    metadata.
    '''
    __table_name__ = 'documents'

    # Raw
    docID = columns.Text(primary_key=True)
    source = columns.Text(primary_key=True, clustering_order="DESC")

    doc = columns.Bytes()
    filetype = columns.Text()
    timestamps = columns.Map(columns.Text, columns.Text)

    # Normalized
    uris = columns.Text()
    title = columns.Text()
    contributors = columns.Text()  # TODO
    providerUpdatedDateTime = columns.DateTime()

    description = columns.Text()
    freeToRead = columns.Text()  # TODO
    languages = columns.List(columns.Text())
    licenses = columns.Text()  # TODO
    publisher = columns.Text()  # TODO
    subjects = columns.List(columns.Text())
    tags = columns.List(columns.Text())
    sponsorships = columns.Text()  # TODO
    version = columns.Text()  # TODO
    otherProperties = columns.Text()  # TODO
    shareProperties = columns.Text()  # TODO

    # Additional metadata
    versions = columns.List(columns.UUID)

@DatabaseManager.registered_model
class VersionModel(models.Model):
    '''
    Defines the schema for a version of a metadata document in Cassandra

    See the DocumentModel class. This schema is very similar, except it is
    keyed on a UUID that is generated by us, rather than it's own metadata
    '''

    __table_name__ = 'versions'

    key = columns.UUID(primary_key=True, required=True)

    # Raw
    doc = columns.Bytes()
    docID = columns.Text()
    filetype = columns.Text()
    source = columns.Text()
    timestamps = columns.Map(columns.Text, columns.Text)

    # Normalized
    uris = columns.Text()
    title = columns.Text()
    contributors = columns.Text()  # TODO
    providerUpdatedDateTime = columns.DateTime()

    description = columns.Text()
    freeToRead = columns.Text()  # TODO
    languages = columns.List(columns.Text())
    licenses = columns.Text()  # TODO
    publisher = columns.Text()  # TODO
    subjects = columns.List(columns.Text())
    tags = columns.List(columns.Text())
    sponsorships = columns.Text()  # TODO
    version = columns.Text()  # TODO
    otherProperties = columns.Text()  # TODO
    shareProperties = columns.Text()  # TODO

    # Additional metadata
    versions = columns.List(columns.UUID)

@DatabaseManager.registered_model
class HarvesterResponse(models.Model, BaseHarvesterResponse):
    __table_name__ = 'responses'

    method = columns.Text(primary_key=True)
    url = columns.Text(primary_key=True, required=True)

    # Raw request data
    ok = columns.Boolean()
    content = columns.Bytes()
    encoding = columns.Text()
    headers_str = columns.Text()
    status_code = columns.Integer()
    time_made = columns.DateTime(default=datetime.now)


text:
var passport = require('passport');
var FacebookStrategy = require('passport-facebook').Strategy;
var TwitterStrategy = require('passport-twitter').Strategy;
var GithubStrategy = require('passport-github').Strategy;
var GitlabStrategy = require('passport-gitlab2').Strategy;
var DropboxStrategy = require('passport-dropbox-oauth2').Strategy;
var GoogleStrategy = require('passport-google-oauth20').Strategy;

//core
var config = require('./config.js');
var logger = require("./logger.js");
var models = require("./models");

function callback(accessToken, refreshToken, profile, done) {
    //logger.info(profile.displayName || profile.username);
    var stringifiedProfile = JSON.stringify(profile);
    models.User.findOrCreate({
        where: {
            profileid: profile.id.toString()
        },
        defaults: {
            profile: stringifiedProfile,
            accessToken: accessToken,
            refreshToken: refreshToken
        }
    }).spread(function (user, created) {
        if (user) {
            var needSave = false;
            if (user.profile != stringifiedProfile) {
                user.profile = stringifiedProfile;
                needSave = true;
            }
            if (user.accessToken != accessToken) {
                user.accessToken = accessToken;
                needSave = true;

            }
            if (user.refreshToken != refreshToken) {
                user.refreshToken = refreshToken;
                needSave = true;

            }
            if (needSave) {
                user.save().then(function () {
                    if (config.debug)
                        logger.info('user login: ' + user.id);
                    return done(null, user);
                });
            } else {
                if (config.debug)
                    logger.info('user login: ' + user.id);
                return done(null, user);
            }
        }
    }).catch(function (err) {
        logger.error('auth callback failed: ' + err);
        return done(err, null);
    })
}

//facebook
if (config.facebook) {
    module.exports = passport.use(new FacebookStrategy({
        clientID: config.facebook.clientID,
        clientSecret: config.facebook.clientSecret,
        callbackURL: config.serverurl + '/auth/facebook/callback'
    }, callback));
}
//twitter
if (config.twitter) {
    passport.use(new TwitterStrategy({
        consumerKey: config.twitter.consumerKey,
        consumerSecret: config.twitter.consumerSecret,
        callbackURL: config.serverurl + '/auth/twitter/callback'
    }, callback));
}
//github
if (config.github) {
    passport.use(new GithubStrategy({
        clientID: config.github.clientID,
        clientSecret: config.github.clientSecret,
        callbackURL: config.serverurl + '/auth/github/callback'
    }, callback));
}
//gitlab
if (config.gitlab) {
    passport.use(new GitlabStrategy({
        baseURL: config.gitlab.baseURL,
        clientID: config.gitlab.clientID,
        clientSecret: config.gitlab.clientSecret,
        callbackURL: config.serverurl + '/auth/gitlab/callback'
    }, callback));
}
//dropbox
if (config.dropbox) {
    passport.use(new DropboxStrategy({
        apiVersion: '2',
        clientID: config.dropbox.clientID,
        clientSecret: config.dropbox.clientSecret,
        callbackURL: config.serverurl + '/auth/dropbox/callback'
    }, callback));
}
//google
if (config.google) {
    passport.use(new GoogleStrategy({
        clientID: config.google.clientID,
        clientSecret: config.google.clientSecret,
        callbackURL: config.serverurl + '/auth/google/callback'
    }, callback));
}


text:
import json
import os

import shutil
from pathlib import Path
from typing import Callable

from .deck_exporter import DeckExporter
from ..anki.adapters.anki_deck import AnkiDeck
from ..representation import deck_initializer
from ..representation.deck import Deck
from ..utils.constants import DECK_FILE_NAME, DECK_FILE_EXTENSION, MEDIA_SUBDIRECTORY_NAME
from ..utils.filesystem.name_sanitizer import sanitize_anki_deck_name
from .note_sorter import NoteSorter
from ..config.config_settings import ConfigSettings

class AnkiJsonExporter(DeckExporter):
    def __init__(self, collection,
                 config: ConfigSettings,
                 deck_name_sanitizer: Callable[[str], str] = sanitize_anki_deck_name,
                 deck_file_name: str = DECK_FILE_NAME):
        self.config = config
        self.collection = collection
        self.last_exported_count = 0
        self.deck_name_sanitizer = deck_name_sanitizer
        self.deck_file_name = deck_file_name
        self.note_sorter = NoteSorter(config)

    def export_to_directory(self, deck: AnkiDeck, output_dir=Path("."), copy_media=True, create_deck_subdirectory=True) -> Path:
        deck_directory = output_dir
        if create_deck_subdirectory:
            deck_directory = output_dir.joinpath(self.deck_name_sanitizer(deck.name))
            deck_directory.mkdir(parents=True, exist_ok=True)

        deck = deck_initializer.from_collection(self.collection, deck.name)

        deck.notes = self.note_sorter.sort_notes(deck.notes)

        self.last_exported_count = deck.get_note_count()

        deck_filename = deck_directory.joinpath(self.deck_file_name).with_suffix(DECK_FILE_EXTENSION)
        with deck_filename.open(mode='w', encoding="utf8") as deck_file:
            deck_file.write(json.dumps(deck,
                                       default=Deck.default_json,
                                       sort_keys=True,
                                       indent=4,
                                       ensure_ascii=False))

        self._save_changes(deck)

        if copy_media:
            self._copy_media(deck, deck_directory)

        return deck_directory

    def _save_changes(self, deck, is_export_child=False):
        """Save updates that were made during the export. E.g. UUID fields

        It saves decks, deck configurations and models.

        is_export_child refers to whether this deck is a child for the
        _purposes of the current export operation_.  For instance, if
        we're exporting or snapshotting a specific subdeck, then it's
        considered the "parent" here.  We need the argument to avoid
        duplicately saving deck configs and note models.

        """

        self.collection.decks.save(deck.anki_dict)
        for child_deck in deck.children:
            self._save_changes(child_deck, is_export_child=True)

        if not is_export_child:
            for deck_config in deck.metadata.deck_configs.values():
                self.collection.decks.save(deck_config.anki_dict)

            for model in deck.metadata.models.values():
                self.collection.models.save(model.anki_dict)

        # Notes?

    def _copy_media(self, deck, deck_directory):
        media_directory = deck_directory.joinpath(MEDIA_SUBDIRECTORY_NAME)

        media_directory.mkdir(parents=True, exist_ok=True)

        for file_src in deck.get_media_file_list():
            try:
                shutil.copy(os.path.join(self.collection.media.dir(), file_src),
                            str(media_directory.resolve()))
            except IOError as ioerror:
                print("Failed to copy a file {}. Full error: {}".format(file_src, ioerror))


text:
<?php
// This file is part of Moodle - http://moodle.org/
//
// Moodle is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Moodle is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.

require_once("../config.php");
require_once("lib.php");

$id      = required_param('id',PARAM_INT);       // course id
$user    = required_param('user',PARAM_INT);     // user id
$mode    = optional_param('mode', "todaylogs", PARAM_ALPHA);

$url = new moodle_url('/course/user.php', array('id'=>$id,'user'=>$user, 'mode'=>$mode));

$course = $DB->get_record('course', array('id'=>$id), '*', MUST_EXIST);
$user = $DB->get_record("user", array("id"=>$user, 'deleted'=>0), '*', MUST_EXIST);

if ($mode === 'outline' or $mode === 'complete') {
    $url = new moodle_url('/report/outline/user.php', array('id'=>$user->id, 'course'=>$course->id, 'mode'=>$mode));
    redirect($url);
}
if ($mode === 'todaylogs' or $mode === 'alllogs') {
    $logmode = ($mode === 'todaylogs') ? 'today' : 'all';
    $url = new moodle_url('/report/log/user.php', array('id'=>$user->id, 'course'=>$course->id, 'mode'=>$logmode));
    redirect($url);
}
if ($mode === 'stats') {
    $url = new moodle_url('/report/stats/user.php', array('id'=>$user->id, 'course'=>$course->id));
    redirect($url);
}
if ($mode === 'coursecompletions' or $mode === 'coursecompletion') {
    $url = new moodle_url('/report/completion/user.php', array('id'=>$user->id, 'course'=>$course->id));
    redirect($url);
}

$coursecontext   = context_course::instance($course->id);
$personalcontext = context_user::instance($user->id);

$PAGE->set_url('/course/user.php', array('id'=>$id, 'user'=>$user->id, 'mode'=>$mode));

require_login();
$PAGE->set_pagelayout('report');
if (has_capability('moodle/user:viewuseractivitiesreport', $personalcontext) and !is_enrolled($coursecontext)) {
    // do not require parents to be enrolled in courses ;-)
    $PAGE->set_course($course);
} else {
    require_login($course);
}

if ($user->deleted) {
    echo $OUTPUT->header();
    echo $OUTPUT->heading(get_string('userdeleted'));
    echo $OUTPUT->footer();
    die;
}

// prepare list of allowed modes
$myreports  = ($course->showreports and $USER->id == $user->id);
$anyreport  = has_capability('moodle/user:viewuseractivitiesreport', $personalcontext);

$modes = array();

// Used for grade reports, it represents whether we should be viewing the report as ourselves, or as the targetted user.
$viewasuser = false;

if (has_capability('moodle/grade:viewall', $coursecontext)) {
    //ok - can view all course grades
    $modes[] = 'grade';

} else if ($course->showgrades and $user->id == $USER->id and has_capability('moodle/grade:view', $coursecontext)) {
    //ok - can view own grades
    $modes[] = 'grade';

} else if ($course->showgrades and has_capability('moodle/grade:viewall', $personalcontext)) {
    // ok - can view grades of this user - parent most probably
    $modes[] = 'grade';
    $viewasuser = true;

} else if ($course->showgrades and $anyreport) {
    // ok - can view grades of this user - parent most probably
    $modes[] = 'grade';
    $viewasuser = true;
}

if (empty($modes)) {
    require_capability('moodle/user:viewuseractivitiesreport', $personalcontext);
}

if (!in_array($mode, $modes)) {
    // forbidden or non-existent mode
    $mode = reset($modes);
}

add_to_log($course->id, "course", "user report", "user.php?id=$course->id&user=$user->id&mode=$mode", "$user->id");

$stractivityreport = get_string("activityreport");

$PAGE->navigation->extend_for_user($user);
$PAGE->navigation->set_userid_for_parent_checks($user->id); // see MDL-25805 for reasons and for full commit reference for reversal when fixed.
$PAGE->set_title("$course->shortname: $stractivityreport ($mode)");
$PAGE->set_heading($course->fullname);
echo $OUTPUT->header();

switch ($mode) {
    case "grade":
        if (empty($CFG->grade_profilereport) or !file_exists($CFG->dirroot.'/grade/report/'.$CFG->grade_profilereport.'/lib.php')) {
            $CFG->grade_profilereport = 'user';
        }
        require_once $CFG->libdir.'/gradelib.php';
        require_once $CFG->dirroot.'/grade/lib.php';
        require_once $CFG->dirroot.'/grade/report/'.$CFG->grade_profilereport.'/lib.php';

        $functionname = 'grade_report_'.$CFG->grade_profilereport.'_profilereport';
        if (function_exists($functionname)) {
            $functionname($course, $user, $viewasuser);
        }
        break;

        break;
    default:
        // can not be reached ;-)
}

echo $OUTPUT->footer();


text:
import React from 'react'
import { renderRoutes } from 'react-router-config'
import Header from './Header'

const App = ({ route, children }) => (
  <div>
    {/*Define the HEAD section and register static resources.
       See the 'client/components/Header' file for implementation details.
    */}
    <Header
      title="ReSolve Shopping List Example"
      css={['/bootstrap.min.css']}
    />
    {renderRoutes(route.routes)}
    {children}
  </div>
)

export default App


text:
title: Filters
---

LiquidJS implements business-logic independent filters that are typically implemented in [shopify/liquid][shopify/liquid]. This section contains the specification and demoes for all the filters implemented by LiquidJS.

There's 40+ filters supported by LiquidJS. These filters can be categorized into these groups:

Categories | Filters
--- | ---
Math | plus, minus, modulo, times, floor, ceil, round, divided_by, abs
String | append, prepend, capitalize, upcase, downcase, strip, lstrip, rstrip, strip_newlines, split, replace, replace_first, remove, remove_first, truncate, truncatewords
HTML/URI | escape, escape_once, url_encode, url_decode, strip_html, newline_to_br
Array | slice, map, sort, sort_natural, uniq, where, first, last, join, reverse
Date | date

[shopify/liquid]: https://github.com/Shopify/liquid


text:
var utils = require('./utils.js');
var createActionArgs = require('./createActionArgs.js');
var createNext = require('./createNext.js');
var analyze = require('./analyze.js');
var staticTree = require('./staticTree');
var types = require('./types.js');

var batchedSignals = [];
var pending = false;
var requestAnimationFrame = global.requestAnimationFrame || function (cb) {
  setTimeout(cb, 0);
};

module.exports = function (signalStore, recorder, devtools, controller, model, services) {

  return function () {

    var args = [].slice.call(arguments);
    var signalName = args.shift();
    var chain = args;

    if (utils.isDeveloping()) {
      analyze(signalName, chain);
    }

    var signalChain = function () {

      var tree = staticTree(signalChain.chain);
      var actions = tree.actions;

      var hasSyncArg = arguments[0] === true;
      var runSync = hasSyncArg;
      var payload = hasSyncArg ? arguments[1] : arguments[0]
      var branches = hasSyncArg ? arguments[2] : arguments[1];

      // When remembering, the branches with filled out values will be
      // passed
      branches = branches || tree.branches;

      var runSignal = function () {

        // Accumulate the args in one object that will be passed
        // to each action
        var signalArgs = payload || {};

        // Test payload
        if (utils.isDeveloping()) {
          try {
            JSON.stringify(signalArgs);
          } catch (e) {
            console.log('Not serializable', signalArgs);
            throw new Error('Cerebral - Could not serialize input to signal. Please check signal ' + signalName);
          }
        }

        // Describe the signal to later trigger as if it was live
        var start = Date.now();
        var signal = {
          name: signalName,
          start: start,
          isSync: runSync,
          isExecuting: true,
          branches: branches,
          duration: 0,
          input: payload
        };

        if (!signalStore.isRemembering() && !recorder.isCatchingUp()) {
          controller.emit('signalStart', signal);
        }

        if (recorder.isRecording()) {
          recorder.addSignal(signal);
        }

        signalStore.addSignal(signal);

        var runBranch = function (branch, index, start) {

          var currentBranch = branch[index];
          if (!currentBranch && branch === signal.branches && !signalStore.isRemembering() && !recorder.isCatchingUp()) {

             branch[index - 1].duration = Date.now() - start;
             signal.isExecuting = false;
             controller.emit('signalEnd', signal);
             controller.emit('change');
             devtools && devtools.update();
             return;

          }

          if (!currentBranch) {
            return;
          }

          if (Array.isArray(currentBranch)) {

            if (signalStore.isRemembering() || recorder.isPlaying()) {

              currentBranch.forEach(function (action) {

                utils.merge(signalArgs, action.output);

                if (action.outputPath) {
                  runBranch(action.outputs[action.outputPath], 0);
                }

              });

              runBranch(branch, index + 1);

            } else {

              controller.emit('actionStart', true);
              controller.emit('change');

              var promises = currentBranch.map(function (action) {

                var actionFunc = actions[action.actionIndex];

                if (utils.isDeveloping() && actionFunc.input) {
                  utils.verifyInput(action.name, signal.name, actionFunc.input, signalArgs);
                }

                signalStore.addAsyncAction();

                action.isExecuting = true;
                action.input = utils.merge({}, signalArgs);
                var actionArgs = createActionArgs.async(action, signalArgs, model);
                var next = createNext.async(actionFunc);
                actionFunc.apply(null, actionArgs.concat(next.fn, services));
                return next.promise.then(function (result) {

                  action.hasExecuted = true;
                  action.isExecuting = false;
                  action.output = result.arg;
                  utils.merge(signalArgs, result.arg);
                  signalStore.removeAsyncAction();
                  if (result.path) {
                    action.outputPath = result.path;
                    var result = runBranch(action.outputs[result.path], 0, Date.now());
                    controller.emit('change');
                    devtools && devtools.update();
                    return result;
                  } else {
                    devtools && devtools.update();
                  }

                });

              });
              devtools && devtools.update();
              return Promise.all(promises)
              .then(function () {
                return runBranch(branch, index + 1, Date.now());
              })
              .catch(function (error) {
                // We just throw any unhandled errors
                controller.emit('error', error);
                throw error;
              });

            }

          } else {

            if (signalStore.isRemembering() || recorder.isPlaying()) {

              var action = currentBranch;
              action.mutations.forEach(function (mutation) {
                model.mutators[mutation.name].apply(null, [mutation.path.slice()].concat(mutation.args));
              });

              if (action.outputPath) {
                runBranch(action.outputs[action.outputPath], 0);
              }

              runBranch(branch, index + 1);

            } else {

              controller.emit('actionStart', false);
              try {

                var action = currentBranch;
                var actionArgs = createActionArgs.sync(action, signalArgs, model);
                var actionFunc = actions[action.actionIndex];

                if (utils.isDeveloping() && actionFunc.input) {
                  utils.verifyInput(action.name, signal.name, actionFunc.input, signalArgs);
                }

                action.mutations = []; // Reset mutations array
                action.input = utils.merge({}, signalArgs);

                var next = createNext.sync(actionFunc, signal.name);
                actionFunc.apply(null, actionArgs.concat(next, services));

                // TODO: Also add input here

                var result = next._result || {};
                utils.merge(signalArgs, result.arg);

                action.isExecuting = false;
                action.hasExecuted = true;
                action.output = result.arg;

                if (!branch[index + 1] || Array.isArray(branch[index + 1])) {
                  action.duration = Date.now() - start;
                }

                if (result.path) {
                  action.outputPath = result.path;
                  var result = runBranch(action.outputs[result.path], 0, start);
                  if (result && result.then) {
                    return result.then(function () {
                      return runBranch(branch, index + 1, Date.now());
                    });
                  } else {
                    return runBranch(branch, index + 1, start);
                  }
                } else {
                  controller.emit('actionEnd');
                  return runBranch(branch, index + 1, start);
                }

              } catch (error) {

                controller.emit('error', error);
                throw error;
              }

            }

          }

        };

        runBranch(signal.branches, 0, Date.now());

        return;

      };

      if (runSync || signalStore.isRemembering() || recorder.isCatchingUp()) {
        runSignal();
      } else {

        batchedSignals.push(runSignal);

        if (!pending) {

          requestAnimationFrame(function () {

            while (batchedSignals.length) {
              batchedSignals.shift()();
            }
            pending = false;

          });

          pending = true;

        }

      }

    };

    signalChain.chain = chain;
    signalChain.sync = function (payload) {
      signalChain(true, payload);
    };

    return signalChain;

  };

};


text:
import { URI } from 'vs/base/common/uri';
import { LifecyclePhase } from 'vs/platform/lifecycle/common/lifecycle';
import { Registry } from 'vs/platform/registry/common/platform';
import { Extensions as WorkbenchExtensions, IWorkbenchContributionsRegistry } from 'vs/workbench/common/contributions';
import { IMarkerListProvider, MarkerList, IMarkerNavigationService } from 'vs/editor/contrib/gotoError/markerNavigationService';
import { CellUri } from 'vs/workbench/contrib/notebook/common/notebookCommon';
import { IMarkerService } from 'vs/platform/markers/common/markers';
import { IDisposable } from 'vs/base/common/lifecycle';

class MarkerListProvider implements IMarkerListProvider {

	private readonly _dispoables: IDisposable;

	constructor(
		@IMarkerService private readonly _markerService: IMarkerService,
		@IMarkerNavigationService markerNavigation: IMarkerNavigationService,
	) {
		this._dispoables = markerNavigation.registerProvider(this);
	}

	dispose() {
		this._dispoables.dispose();
	}

	getMarkerList(resource: URI | undefined): MarkerList | undefined {
		if (!resource) {
			return undefined;
		}
		const data = CellUri.parse(resource);
		if (!data) {
			return undefined;
		}
		return new MarkerList(uri => {
			const otherData = CellUri.parse(uri);
			return otherData?.notebook.toString() === data.notebook.toString();
		}, this._markerService);
	}
}

Registry
	.as<IWorkbenchContributionsRegistry>(WorkbenchExtensions.Workbench)
	.registerWorkbenchContribution(MarkerListProvider, LifecyclePhase.Ready);


text:
package org.royawesome.renderer.shader.variables;

import org.lwjgl.opengl.GL20;
import org.lwjgl.util.vector.Vector4f;

public class Vec4ShaderVariable extends ShaderVariable {
	Vector4f value;
	public Vec4ShaderVariable(int program, String name, Vector4f value) {
		super(program, name);
		this.value = value;
	}

	@Override
	public void assign() {
		GL20.glUniform4f(location, value.x, value.y, value.z, value.w);
	}

}


text:
define(['cookies'], function (cookies) {
    var parseBool = function (boolAsString) {
        return boolAsString === 'true';
    };

    var settings = { };

    Object.defineProperty(settings, 'theme', {
        get: function() { return cookies.get('theme') || 'default'; },
        set: function(value) { cookies.set('theme', value); },
        enumerable: true
    });

    Object.defineProperty(settings, 'browserNotificationEnabled', {
        get: function() { return parseBool(cookies.get('browserNotificationEnabled')) || false; },
        set: function(value) { cookies.set('browserNotificationEnabled', value); },
        enumerable: true
    });

    Object.defineProperty(settings, 'soundNotificationEnabled', {
        get: function() { return parseBool(cookies.get('soundNotificationEnabled')) || false; },
        set: function(value) { cookies.set('soundNotificationEnabled', value); },
        enumerable: true
    });

    return settings;
});


text:
//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by a tool.
//     Runtime Version:4.0.30319.34014
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

namespace Karambit.Web {
    using System;

    /// <summary>
    ///   A strongly-typed resource class, for looking up localized strings, etc.
    /// </summary>
    // This class was auto-generated by the StronglyTypedResourceBuilder
    // class via a tool like ResGen or Visual Studio.
    // To add or remove a member, edit your .ResX file then rerun ResGen
    // with the /str option, or rebuild your VS project.
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
    internal class Resources {

        private static global::System.Resources.ResourceManager resourceMan;

        private static global::System.Globalization.CultureInfo resourceCulture;

        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
        internal Resources() {
        }

        /// <summary>
        ///   Returns the cached ResourceManager instance used by this class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Resources.ResourceManager ResourceManager {
            get {
                if (object.ReferenceEquals(resourceMan, null)) {
                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Karambit.Web.Resources", typeof(Resources).Assembly);
                    resourceMan = temp;
                }
                return resourceMan;
            }
        }

        /// <summary>
        ///   Overrides the current thread's CurrentUICulture property for all
        ///   resource lookups using this strongly typed resource class.
        /// </summary>
        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
        internal static global::System.Globalization.CultureInfo Culture {
            get {
                return resourceCulture;
            }
            set {
                resourceCulture = value;
            }
        }

        /// <summary>
        ///   Looks up a localized resource of type System.Byte[].
        /// </summary>
        internal static byte[] mimes {
            get {
                object obj = ResourceManager.GetObject("mimes", resourceCulture);
                return ((byte[])(obj));
            }
        }

        /// <summary>
        ///   Looks up a localized string similar to {
        ///	"200" : "OK",
        ///	"201" : "Created",
        ///	"204" : "No Content",
        ///	"300" : "Multiple Choices",
        ///	"301" : "Moved Permanently",
        ///	"302" : "Found",
        ///	"304" : "Not Modified",
        ///	"307" : "Temporary Redirect",
        ///	"400" : "Bad Request",
        ///	"401" : "Unauthorized",
        ///	"403" : "Forbidden",
        ///	"404" : "Not Found",
        ///	"410" : "Gone",
        ///	"500" : "Internal Server Error",
        ///	"501" : "Not Implemented",
        ///	"503" : "Service Unavailable",
        ///	"550" : "Permission Denied"
        ///}.
        /// </summary>
        internal static string status {
            get {
                return ResourceManager.GetString("status", resourceCulture);
            }
        }
    }
}


text:
package demo.java.v2c09security.ClassLoaderTest;
import java.io.*;

/**
 * Encrypts a file using the Caesar cipher.
 * @version 1.00 1997-09-10
 * @author Cay Horstmann
 */
public class Caesar
{
   public static void main(String[] args)
   {
      if (args.length != 3)
      {
         System.out.println("USAGE: java Caesar in out key");
         return;
      }

      try
      {
         FileInputStream in = new FileInputStream(args[0]);
         FileOutputStream out = new FileOutputStream(args[1]);
         int key = Integer.parseInt(args[2]);
         int ch;
         while ((ch = in.read()) != -1)
         {
            byte c = (byte) (ch + key);
            out.write(c);
         }
         in.close();
         out.close();
      }
      catch (IOException exception)
      {
         exception.printStackTrace();
      }
   }
}


text:
module Fog
  module Parsers
    module Compute
      module AWS

        class DeleteDhcpOptions  < Fog::Parsers::Base

          def end_element(name)
            case name
            when 'requestId'
              @response[name] = value
            when 'return'
              if value == 'true'
                @response[name] = true
              else
                @response[name] = false
              end
            end
          end
        end
      end
    end
  end
end


text:
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision: 322115 $ -->
<refentry xml:id="haruencoder.getunicode" xmlns="http://docbook.org/ns/docbook">
 <refnamediv>
  <refname>HaruEncoder::getUnicode</refname>
  <refpurpose>Convert the specified character to unicode</refpurpose>
 </refnamediv>

 <refsect1 role="description">
  &reftitle.description;
  <methodsynopsis>
   <type>int</type><methodname>HaruEncoder::getUnicode</methodname>
   <methodparam><type>int</type><parameter>character</parameter></methodparam>
  </methodsynopsis>
  <para>
   Converts the specified character to unicode.
  </para>
 </refsect1>

 <refsect1 role="parameters">
  &reftitle.parameters;
  <para>
   <variablelist>
    <varlistentry>
     <term><parameter>character</parameter></term>
     <listitem>
      <para>
       The character code to convert.
      </para>
     </listitem>
    </varlistentry>
   </variablelist>
  </para>
 </refsect1>

 <refsect1 role="returnvalues">
  &reftitle.returnvalues;
  <para>
   <!-- FIXME -->
  </para>
 </refsect1>

 <refsect1 role="errors">
  &reftitle.errors;
  &haru.error;
 </refsect1>

</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->


text:
// --------------------------------------------------------------------------------------------------------------------
// <copyright file="UTExtensions.cs" company="">
//
// </copyright>
// <summary>
//   Summary description for UTExtensions
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace ABM.Common.UnitTests
{
    using System.Collections.Generic;

    using Microsoft.VisualStudio.TestTools.UnitTesting;

    /// <summary>
    ///     Summary description for UTExtensions
    /// </summary>
    [TestClass]
    public class UTExtensions
    {
        #region Fields

        /// <summary>
        /// The darray.
        /// </summary>
        private readonly double[] darray = new double[12];

        #endregion

        #region Constructors and Destructors

        /// <summary>
        /// Initializes a new instance of the <see cref="UTExtensions"/> class.
        /// </summary>
        public UTExtensions()
        {
            this.darray[0] = 1.0;
            this.darray[1] = 2.0;
            this.darray[2] = 3.0;
            this.darray[3] = 4.0;
            this.darray[4] = 5.0;
            this.darray[5] = 6.0;
            this.darray[6] = 7.0;
            this.darray[7] = 8.0;
            this.darray[8] = 9.0;
            this.darray[9] = 10.0;
            this.darray[10] = 0;
            this.darray[11] = 0;
        }

        #endregion

        #region Public Properties

        /// <summary>
        ///     Gets or sets the test context which provides
        ///     information about and functionality for the current test run.
        /// </summary>
        public TestContext TestContext { get; set; }

        #endregion

        // You can use the following additional attributes as you write your tests:
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        // Use TestInitialize to run code before running each test
        // [TestInitialize()]
        // public void MyTestInitialize() { }
        // Use TestCleanup to run code after each test has run
        // [TestCleanup()]
        // public void MyTestCleanup() { }
        #region Public Methods and Operators

        /// <summary>
        /// The double array.
        /// </summary>
        [TestMethod]
        public void DoubleArray()
        {
            List<decimal> decimalList = this.darray.ToDecimalListFromDoubleArray();
            Assert.IsTrue(decimalList.Count == 12);

            decimalList = this.darray.ToDecimalListFromDoubleArray(true);
            Assert.IsTrue(decimalList.Count == 10);
        }

        #endregion
    }
}