text:
// ==========================================================================
//                 SeqAn - The Library for Sequence Analysis
// ==========================================================================
// Copyright (c) 2006-2012, Knut Reinert, FU Berlin
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above copyright
//       notice, this list of conditions and the following disclaimer in the
//       documentation and/or other materials provided with the distribution.
//     * Neither the name of Knut Reinert or the FU Berlin nor the names of
//       its contributors may be used to endorse or promote products derived
//       from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL KNUT REINERT OR THE FU BERLIN BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
// OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
// DAMAGE.
//
// ==========================================================================

#ifndef SEQAN_CORE_INCLUDE_SEQAN_FILE_INTERFACE_H_
#define SEQAN_CORE_INCLUDE_SEQAN_FILE_INTERFACE_H_

namespace seqan {

/**
.Spec.Sync:
..cat:Files
..general:Class.File
..summary:File structure supporting synchronous input/output access.
..signature:File<Sync<> >
..remarks:This class suports pseudo-asynchronous access methods, i.e. the methods to initiate a I/O request return after request completion.
..include:seqan/file.h
*/

	template <typename TSpec = void>
    struct Sync;
//IOREV

/**
.Spec.Async:
..cat:Files
..general:Class.File
..summary:File structure supporting synchronous and asynchronous input/output access.
..signature:File<Async<> >
..include:seqan/file.h
*/

	template <typename TSpec = void>
    struct Async;
//IOREV

/**
.Class.File:
..cat:Input/Output
..summary:Represents a file.
..signature:File<TSpec>
..param.TSpec:The specializing type.
...default:$Async<>$, see @Spec.Async@.
..include:seqan/file.h
*/

	template <typename TSpec = Async<> >
    class File;
//IOREV

/**
.Spec.Chained:
..cat:Files
..general:Class.File
..summary:Splits a large file into a chain of smaller files.
..signature:File<Chained<FileSize, TFile> >
..param.FileSize:The maximal split file size in byte.
...default:2^31-1 (~2GB)
..param.TFile:Underlying @Class.File@ type.
...default:$File<>$, see @Class.File@.
..remarks:This file type uses a chain of $TFile$ files, whose file sizes are at most $FileSize$ bytes.
Chained Files should be used for file systems or $TFile$ types that don't support large files (e.g. FAT32, C-style FILE*).
..remarks:The chain can be used as if it were one contiguous file.
..include:seqan/file.h
*/

	// chained file's default filesize is 2gb-1byte (fat16 filesize limitation)
	template < __int64 FileSize_ = ~(((__int64)1) << 63), typename TFile = File<> >
	struct Chained;
//IOREV

/**
.Spec.Striped:
..cat:Files
..general:Class.File
..summary:Stripes a file across multiple files.
..signature:File<Chained<FileCount, TFile> >
..param.FileCount:The number of files used for striping.
...default:2
..param.TFile:Underlying @Class.File@ type.
...default:$File<>$, see @Class.File@.
..remarks:This file type uses a software striping without redundance (see RAID0) to accelerate I/O access when using more than one disks.
..remarks:Striped files should only be used in @Class.Pool@s or external Strings as they only support block operations and no random accesses.
..include:seqan/file.h
*/

	template < unsigned FileCount_ = 2, typename TFile = File<> >
	struct Striped;
//IOREV not known if working, see file_array.h

    enum FileOpenMode {
        OPEN_RDONLY     = 1,
        OPEN_WRONLY     = 2,
        OPEN_RDWR       = 3,
        OPEN_MASK       = 3,
        OPEN_CREATE     = 4,
        OPEN_APPEND     = 8,
        OPEN_ASYNC      = 16,
		OPEN_TEMPORARY	= 32,
		OPEN_QUIET		= 128
    }; //IOREV is it intended that two labels share the same value? What is OPEN_MASK anyway?

	template <typename T>
	struct DefaultOpenMode {
//IOREV
		enum { VALUE = OPEN_RDWR | OPEN_CREATE | OPEN_APPEND };
	};

	template <typename T>
	struct DefaultOpenTempMode {
//IOREV
		enum { VALUE = OPEN_RDWR | OPEN_CREATE };
	};

    enum FileSeekMode {
        SEEK_BEGIN   = 0,
        SEEK_CURRENT = 1
#ifndef SEEK_END
      , SEEK_END     = 2
#endif
    }; //IOREV why not use constants SEEK_SET, SEEK_CUR, SEEK_END from cstdio?

    //////////////////////////////////////////////////////////////////////////////
    // result type of asynch. functions
    // you have to call release(AsyncRequest<T>) after a finished *event based* transfer
	struct AsyncDummyRequest {};
//IOREV

/**
.Class.AsyncRequest:
..cat:Input/Output
..summary:Associated with an asynchronous I/O request.
..signature:AsyncRequest<TFile>
..param.TFile:A File type.
..remarks:This structure is used to identify asynchronous requests after their initiation.
..include:seqan/file.h
*/

    template < typename T >
    struct AsyncRequest
    {
//IOREV _stub_ this seems not to be implemented at all, most functions are commented
        typedef AsyncDummyRequest Type;
    };
}  // namespace seqan;

#endif  // #ifndef SEQAN_CORE_INCLUDE_SEQAN_FILE_INTERFACE_H_


text:
from Data.Events import ChangeEvent
from Data.Objects import ObservableObject

Sizes = {
	"ISO A0": [1.189, .841],
	"ISO A1": [.841, .594],
	"ISO A2": [.594, .420],
	"ISO A3": [.420, .297],
	"ISO A4": [.297, .210],
	"ISO A5": [.210, .148],
	"ANSI E": [1.1176, .8636],
	"ANSI D": [.8636, .5588],
	"ANSI C": [.5588, .4318],
	"ANSI B": [.4318, .2794],
	"ANSI A": [.2794, .2159]
}

class Paper(ObservableObject):
	Landscape = 0
	Portrait = 1

	def __init__(self, size=Sizes["ISO A4"], orientation=Landscape):
		ObservableObject.__init__(self)
		self._size = size
		self._margins = [0.01, 0.01, 0.01, 0.01]
		self._orientation = orientation

	@property
	def size(self):
		if self._orientation == Paper.Landscape:
			return [max(self._size[0], self._size[1]), min(self._size[0], self._size[1])]
		else:
			return [min(self._size[0], self._size[1]), max(self._size[0], self._size[1])]

	@size.setter
	def size(self, value):
		old_value = self._size
		self._size[0] = value[0]
		self._size[1] = value[1]
		self.changed(ChangeEvent(self, ChangeEvent.ValueChanged,
														 {
															 "name": "size",
															 'new value': value,
															 'old value': old_value
														 }))

	@property
	def margins(self):
		return list(self._margins)

	@margins.setter
	def margins(self, value):
		old_value = self._size
		self._margins = value
		self.changed(ChangeEvent(self, ChangeEvent.ValueChanged,
														 {
															 "name": "margins",
															 'new value': value,
															 'old value': old_value
														 }))

	@property
	def orientation_name(self):
		if self._orientation == Paper.Landscape:
			return "Landscape"
		elif self._orientation == Paper.Portrait:
			return "Portrait"

	@property
	def orientation(self):
		return self._orientation

	@orientation.setter
	def orientation(self, value):
		old_value = self._orientation
		self._orientation = value
		self.changed(ChangeEvent(self, ChangeEvent.ValueChanged,
														 {
															 "name": "margins",
															 'new value': value,
															 'old value': old_value
														 }))

	def serialize_json(self):
		return {
			'size': self._size,
			'margins': self._margins,
			'orientation': self._orientation
		}

	@staticmethod
	def deserialize(data):
		paper = Paper()
		if data is not None:
			paper.deserialize_data(data)
		return paper

	def deserialize_data(self, data):
		self._size = data.get('size', Sizes["ISO A4"])
		self._margins = data.get('margins', [0.01, 0.01, 0.01, 0.01])
		self._orientation = data.get('orientation', Paper.Landscape)

redpajama_set_name: RedPajamaGithub


text:
Changelog
=========

Version 2.5.1
-------------

Version 2.5.1 improves testing, documentation, and fixes the following bugs:

- Only use listDatabases when necessary.
- Do not use the listShards command.
- Fix PyMongo 3.0 compatibility.
- Fixes support for MongoDB 2.4's invalid $unsets operations.
- Set array element to null when $unset, do not remove the element completely.
- Command line SSL options should override the config file.
- Properly send "ssl.sslCertificatePolicy" to MongoClients.
- Properly output log messages while configuration is parsed.
- All source clients should inherit MongoDB URI options from the main address.
- Do not retry operations that result in authorization failure.

Version 2.5.0
-------------

Version 2.5.0 adds some new features, bug fixes, and minor breaking changes.

New Features
~~~~~~~~~~~~

- Support for MongoDB 3.4.
- Support including or excluding fields per namespace.
- Support wildcards (*) in namespaces.
- Support for including and excluding different namespaces at the same time.
- Adds a new config file format for the `namespaces` option.
- Logs environment information on startup.
- The doc managers can now be installed through extras_require with pip.
- mongo-connector now tests against MongoDB versions 2.4, 2.6, 3.0, 3.2, and 3.4.

Bug Fixes
~~~~~~~~~

- mongo-connector now gracefully exits on SIGTERM.
- Improved handling of rollbacks.
- Now handles mongos connection failure while looking for shards.
- mongo-connector can now be cancelled during the initial collection dump.
- Improved handling of connection failure while tailing the oplog.
- Command line doc manager specific options now override the config file.
- Improved filtering of nested fields.

Breaking Changes
~~~~~~~~~~~~~~~~

- The solr-doc-manager has been extracted into a separate package and is not
  included by default. See https://pypi.python.org/pypi/solr-doc-manager.
- Asterisks (*) in namespaces configuration are now interpreted as wildcards.

Version 2.4.1
-------------

- Collection dump does not require namespace-set collection entries to be in the oplog.
- Fix an issue where a rollback was misinterpreted as falling off the oplog.
- Fix issue when re-raising exceptions containing unicode.

Version 2.4
-----------

- Add --exclude-fields option.
- Better handling of exceptions in doc managers.
- Allow doc managers to be imported from anywhere, given the full path.
- Do not call count() on oplog cursors.
- Change the oplog format to be resilient to replica set failover.

.. warning:: The change to the oplog timestamp file format means that downgrading
             from this version is not possible!

Version 2.3
-----------

- Make self._fields in OplogThread a set.
- Move elastic doc managers into their own projects.

Version 2.2
-----------
- Support for using a single meta collection to track replication to MongoDB cluster
- The log format is now configurable
- Bug fix for using '—no-dump' when nothing is in the oplog
- Now requires PyMongo 2.9+

Version 2.1
-----------

Version 2.1 adds a couple minor features and fixes a few bugs.

New Features
~~~~~~~~~~~~

- Bulk write support when synchronizing to MongoDB.
- Add 'docManagers.XXX.args.clientOptions' to the config file for passing arbitrary keyword arguments to clients contained within a DocManager.
- Add 'docManagers.XXX.bulkSize' to the config file for adjusting the size of bulk requests.
- Add '--stdout' option to mongo-connector for printing logs to STDOUT.

Bug Fixes
~~~~~~~~~

- Filter replacement documents in filter_oplog_entry.
- Multiple improvements to the test suite to stand up better across various versions of MongoDB.
- Authenticate to shards within a sharded cluster (thanks to Hugo Hromic!)
- Raise InvalidConfiguration for unrecognized command-line arguments.
- Clean out 'NaN'/'inf' from number fields in Elasticsearch (thanks to jaredkipe!)
- Fix autoCommitInterval when set to 0.

Version 2.0.3
-------------

Version 2.0.3 requires that the PyMongo version installed be in the range [2.7.2, 3.0). It also adds more fine-grained control over log levels.

Version 2.0.2
-------------

Version 2.0.2 fixes the following issues:

- Fix configuring timezone-aware datetimes (--tz-aware).
- Fix password file from the command line (--password-file).
- Automatically escape certain characters from field names in documents sent to Solr.
- Add a lot more testing around the configuration file and command-line options.

Version 2.0.1
-------------

Version 2.0.1 fixes filtering by namespace (--namespace-set, namespaces.include).

Version 2.0
-----------

Version 2.0 is a major version of Mongo Connector and includes breaking changes, new features, and bug fixes.

Improvements
~~~~~~~~~~~~

- SSL certificates may now be given to Mongo Connector to validate connections to MongoDB.
- A new JSON configuration file makes configuring and starting Mongo Connector as a system service much easier.
- The `setup.py` file can now install Mongo Connector as a service automatically.
- Support for replicating files in GridFS.
- Allow DocManagers to be distributed as separate packages, rather than needing a fork or pull request.
- DocManagers may handle arbitrary database commands in the oplog.

Bug Fixes
~~~~~~~~~

- Adding an element beyond the end of an array in MongoDB no longer throws an exception.
- All errors that cause Mongo Connector to exit are written to the log.
- Automatically use all-lowercase index names when targeting Elasticsearch.

Breaking Changes
~~~~~~~~~~~~~~~~

- The constructor signatures for OplogThread and Connector have changed:
        - The `u_key` and `target_url` keyword arguments have been removed from the constructor for Connector.
        - `target_url` is gone from the OplogThread constructor.
        - The `doc_manager` keyword argument in the constructors for Connector and OplogThread is now called `doc_managers`.
        - The `doc_managers` keyword argument in Connector takes a list of **instances** of `DocManager`, rather that a list of strings corresponding to files that define DocManagers.
- ConnectorError has been removed. Exceptions that occur when constructing Connector will be passed on to the caller.
- The DocManagerBase class moved from mongo_connector.doc_managers to mongo_connector.doc_managers.doc_manager_base
- The exception_wrapper function moved from mongo_connector.doc_managers to mongo_connector.util
- The arguments to many DocManager methods have changed. For an up-to-date overview of how to write a custom DocManager, see the `Writing Your Own DocManager wiki page <https://github.com/10gen-labs/mongo-connector/wiki/Writing-Your-Own-DocManager>`__. A synopsis:
        - The `remove` method now takes a document id, namespace, and a timestamp instead of a whole document.
        - The `upsert`, `bulk_upsert`, and `update` methods all take two additional arguments: namespace and timestamp.

Version 1.3.1
-------------

Version 1.3.1 contains mostly bug fixes and adds timezone-aware timestamp support. Bugs fixed include:

- Fixes for update operations to Solr.
- Re-insert documents that were deleted before a rollback.
- Catch a few additional exceptions sometimes thrown by the Elasticsearch Python driver.

Version 1.3
-----------

Version 1.3 fixes many issues and adds a couple minor features. Highlights include:

- Use proper updates instead of upserting the most recent version of a document.

.. Warning:: Update operations require ``_source`` field to be enabled in Elasticsearch.

- Fix many issues relating to sending BSON types to external drivers, such as for Elasticsearch and Solr.
- Fix several issues related to using a unique key other than ``_id``.
- Support all UTF8 database and collection names.
- Keep namespace and timestamp metadata in a separate Elasticsearch index.
- Documentation overhaul for using Mongo Connector with Elasticsearch.
- New ``--continue-on-error`` flag for collection dumps.
- ``_id`` is no longer duplicated in ``_source`` field in Elasticsearch.

Version 1.2.1
-------------

Version 1.2.1 fixes some trivial installation issues and renames the CHANGELOG to CHANGELOG.rst.

Version 1.2
-----------

Version 1.2 is a major release with a large number of fixes since the last release on PyPI. It also includes a number of improvements for use with Solr and ElasticSearch.

Improvements
~~~~~~~~~~~~

- Ability to have multiple targets of replication
- Ability to upsert documents containing arrays and nested documents with the Solr DocManager
- Upserts during a collection dump may happen in bulk, resulting in a performance boost
- mongo-connector does not commit writes in target systems by default, resulting in a peformance boost

.. Warning:: This new behavior may give unexpected delays before
             documents are comitted in the target system. Most
             indexing systems provide some way of configuring how
             often changes should be comitted. Please see the relevant
             wiki articles for `Solr
             <https://github.com/10gen-labs/mongo-connector/wiki/Usage%20with%20Solr#managing-commit-behavior/>`_
             and `ElasticSearch
             <https://github.com/10gen-labs/mongo-connector/wiki/Usage%20with%20ElasticSearch#managing-refresh-behavior/>`_
             for more information on configuring commit behavior for
             your system. Note that MongoDB as a target system is
             unaffected by this change.

- Addition of ``auto-commit-interval`` to the command-line options
- Ability to change the destination namespace of upserted documents
- Ability to restrict the fields upserted in documents
- Memory footprint reduced
- Collection dumps may happen in batch, resulting in huge performance gains

Fixes
~~~~~

- Fix for unexpected exit during chunk migrations and orphan documents in MongoDB
- Fix installation problems due to namespace issues

.. Warning:: RENAME of ``mongo_connector.py`` module to
             ``connector.py``. Thus, if you should need to import the
             ``Connector`` object, you now should do
             ``from mongo_connector.connector import Connector``

- Fix user-specified unique keys in Solr and ElasticSearch DocManagers
- Fix for keyboard exit taking large amounts of time to be effective

Version 1.1.1
-------------

This was the first release of mongo-connector.


text:
@interface DownloadInformation : NSObject <NSCoding>
{
}

@property (retain) NSObject* data;
@property (retain) NSString* url;
@property (retain) NSString* name;
@property (retain) NSString* locale;
@property (retain) NSString* filePath;
@property (retain) NSString* storageLocation;
@property NetworkTypes permittedNetworkTypes;
@property NSUInteger length;
@property NSInteger mediaBitsPerSecond;
@property NSUInteger availableLength;
@property (retain) NSDate* creationUtc;
@property (retain) NSDate* lastWriteUtc;
@property NSInteger lastDownloadBitsPerSecond;
@property double downloadPriority;
@property BOOL isReadyForPlayback;
@property (retain) NSString* message;

@end


text:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tags on Terry Ma</title>
    <link>https://terry.ma/tags/</link>
    <description>Recent content in Tags on Terry Ma</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language><atom:link href="https://terry.ma/tags/index.xml" rel="self" type="application/rss+xml" />
  </channel>
</rss>


text:
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">

    <TextView
        style="@style/TextAppearance.AppCompat.Large"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:gravity="center"
        android:text="@string/app_name"
        app:fontFamily="@font/dancing_script" />

</LinearLayout>


text:
namespace net {

namespace {

TEST(NetLog, ScopedNetLogEventTest) {
  CapturingNetLog log(CapturingNetLog::kUnbounded);
  BoundNetLog net_log(BoundNetLog::Make(&log, NetLog::SOURCE_URL_REQUEST));

  scoped_ptr<ScopedNetLogEvent> net_log_event(
      new ScopedNetLogEvent(net_log, NetLog::TYPE_REQUEST_ALIVE, NULL));

  CapturingNetLog::EntryList entries;
  log.GetEntries(&entries);
  EXPECT_EQ(1u, entries.size());
  EXPECT_TRUE(LogContainsBeginEvent(entries, 0, NetLog::TYPE_REQUEST_ALIVE));

  net_log_event.reset();
  log.GetEntries(&entries);
  EXPECT_EQ(2u, entries.size());
  EXPECT_TRUE(LogContainsEndEvent(entries, 1, NetLog::TYPE_REQUEST_ALIVE));
}

}  // namespace

}  // namespace net


text:
require File.dirname(__FILE__) + '/../test_helper'

class UserTest < ActiveSupport::TestCase
end


text:
package com.sun.tools.internal.xjc.reader.xmlschema.bindinfo;

import java.util.HashMap;
import java.util.Map;

import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlTransient;
import javax.xml.namespace.QName;

import com.sun.tools.internal.xjc.reader.Const;
import com.sun.tools.internal.xjc.reader.xmlschema.SimpleTypeBuilder;

/**
 * Enumeration customization.
 *

 * This customization binds a simple type to a type-safe enum class.
 * The actual binding process takes place in {@link SimpleTypeBuilder}.
 *
 *

 * This customization is acknowledged by {@link SimpleTypeBuilder}.
 *
 * @author
 *  Kohsuke Kawaguchi (kohsuke.kawaguchi@sun.com)
 */
@XmlRootElement(name="typesafeEnumClass")
public final class BIEnum extends AbstractDeclarationImpl {

    /**
     * If false, it means not to bind to a type-safe enum.
     *
     * this takes precedence over all the other properties of this class.
     */
    @XmlAttribute(name="map")
    private boolean map = true;

    /** Gets the specified class name, or null if not specified. */
    @XmlAttribute(name="name")
    public String className = null;

    /**
     * @see BIClass#getExistingClassRef()
     */
    @XmlAttribute(name="ref")
    public String ref;

    /**
     * Gets the javadoc comment specified in the customization.
     * Can be null if none is specified.
     */
    @XmlElement
    public final String javadoc = null;

    public boolean isMapped() {
        return map;
    }

    /**
     * Gets the map that contains XML value->BIEnumMember pairs.
     * This table is built from <enumMember> customizations.
     *
     * Always return non-null.
     */
    @XmlTransient
    public final Map<String,BIEnumMember> members = new HashMap<String,BIEnumMember>();

    public QName getName() { return NAME; }

    public void setParent(BindInfo p) {
        super.setParent(p);
        for( BIEnumMember mem : members.values() )
            mem.setParent(p);

        // if this specifies a reference to external class,
        // then it's OK even if noone actually refers this class.
        if(ref!=null)
            markAsAcknowledged();
    }

    /** Name of this declaration. */
    public static final QName NAME = new QName(
        Const.JAXB_NSURI, "enum" );

    // setter method for JAXB runtime
    @XmlElement(name="typesafeEnumMember")
    private void setMembers(BIEnumMember2[] mems) {
        for (BIEnumMember2 e : mems)
            members.put(e.value,e);
    }

    /**
     * {@link BIEnumMember} used inside {@link BIEnum} has additional 'value' attribute.
     */
    static class BIEnumMember2 extends BIEnumMember {
        /**
         * The lexical representaion of the constant to which we are attaching.
         */
        @XmlAttribute(required=true)
        String value;
    }
}


text:
![Build Status](https://travis-ci.org/Cyan101/web-dash.svg?branch=master)

Web-Dash is a small Web UI for keeping an eye on your linux system, most likely your NAS or any Pi's/SBC's you have
Its aim is to provide information on statistics such as running services, memory usage, cpu usage and being able to control/toggle said services
Web-Dash will also have support for links to other web programs running so it can be used to navigate through your system remotely without having to bookmark a bunch of URL's

Current Example:
![Current Example](http://i.imgur.com/OxfEls1.png)

## Installation

TODO: Write installation instructions here

## Usage

TODO: Write usage instructions here
1. Compile with `crystal build --release src/web-dash.cr` (add `--no-debug` if you have issues) or use a build from the releases tab
2. `./web-dash > web-dash.output &` is a simple way to run web-dash in the background, might stick with this or look into other better ways. This needs to be run inside the project folder for proper linking to the `public/` folder for CSS and such
2. To use SSL with Web-Dash `./web-dash --ssl --ssl-key-file your_key_file --ssl-cert-file your_cert_file`

## Development

TODO: Write development instructions here

## Contributing

1. Fork it ( https://github.com/cyan101/web-dash/fork )
2. Create your feature branch (git checkout -b my-new-feature)
3. Commit your changes (git commit -am 'Add some feature')
4. Push to the branch (git push origin my-new-feature)
5. Create a new Pull Request

## Contributors

- [Cyan101](https://github.com/[your-github-name]cyan101) Cyan101 - creator, maintainer


text:
<?php

namespace Skaphandrus\AppBundle\Utils;

class Utils {

    public static function slugify($string) {
        $slug = str_replace(array(' ', '/'), array('-', '_'), $string);
        return $slug ? $slug : "-";
    }

    public static function unslugify($string) {
        //return str_replace(array('-', '_', '   '), array(' ', '/', ' - '), $string);
        return str_replace(array('-', '_', '+'), array(' ', '/', ' '), $string);
    }

    public static function taxonomyStructure() {
        return array(
            'phylum' => array('parent' => 'kingdom', 'next' => 'class', 'parent_plural' => 'kingdoms', 'next_plural' => 'classes'),
            'class' => array('parent' => 'phylum', 'next' => 'order', 'parent_plural' => 'phyla', 'next_plural' => 'orders'),
            'order' => array('parent' => 'class', 'next' => 'family', 'parent_plural' => 'classes', 'next_plural' => 'families'),
            'family' => array('parent' => 'order', 'next' => 'genus', 'parent_plural' => 'orders', 'next_plural' => 'genuss'),
            'genus' => array('parent' => 'family', 'next' => 'species', 'parent_plural' => 'families', 'next_plural' => 'speciess'),
        );
    }

    public static function isOwner($loggedUser, $owner) {

        if ($loggedUser === $owner){
            return true;
        } else {
            return false;
        }

    }

}


text:
<?php

namespace common\models\c;

use kartik\builder\Form;
use kartik\money\MaskMoney;
use kartik\widgets\Select2;
use Yii;
use yii\helpers\ArrayHelper;

/**
 * This is the model class for table "cuentas.d2_otros_tributos_pag".
 *
 * @property integer $id
 * @property integer $otros_tributos_id
 * @property string $saldo_pah
 * @property string $credito_fiscal
 * @property string $monto
 * @property string $debito_fiscal
 * @property string $debito_fiscal_no
 * @property string $importe_pagado
 * @property string $saldo_cierre
 * @property integer $contratista_id
 * @property string $anho
 * @property integer $creado_por
 * @property integer $actualizado_por
 * @property boolean $sys_status
 * @property string $sys_creado_el
 * @property string $sys_actualizado_el
 * @property string $sys_finalizado_el
 *
 * @property CuentasConceptos $otrosTributos
 * @property Contratistas $contratista
 * @property CuentasD1D2Beneficiario $otrosTributosBeneficiarios
 */
class CuentasD2OtrosTributosPag extends \common\components\BaseActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'cuentas.d2_otros_tributos_pag';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['otros_tributos_id', 'saldo_pah', 'credito_fiscal', 'monto', 'debito_fiscal', 'debito_fiscal_no', 'importe_pagado', 'contratista_id', 'anho'], 'required'],
            [['otros_tributos_id', 'contratista_id', 'creado_por', 'actualizado_por'], 'integer'],
            [['saldo_pah', 'credito_fiscal', 'monto', 'debito_fiscal', 'debito_fiscal_no', 'importe_pagado', 'saldo_cierre'], 'number'],
            [['sys_status'], 'boolean'],
            [['sys_creado_el', 'sys_actualizado_el', 'sys_finalizado_el'], 'safe'],
            [['anho'], 'string', 'max' => 100],
            [['otros_tributos_id', 'contratista_id', 'anho'], 'unique', 'targetAttribute' => ['otros_tributos_id', 'contratista_id', 'anho'], 'message' => 'Este tributo ya ha sido cargado.']
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'otros_tributos_id' => Yii::t('app', 'Otros Tributos'),
            'saldo_pah' => Yii::t('app', 'Saldo Periodo anterior (Histórico)'),
            'credito_fiscal' => Yii::t('app', 'Credito Fiscal'),
            'monto' => Yii::t('app', 'Monto'),
            'debito_fiscal' => Yii::t('app', 'Debito Fiscal'),
            'debito_fiscal_no' => Yii::t('app', 'Debito Fiscal Numero'),
            'importe_pagado' => Yii::t('app', 'Importe Pagado'),
            'saldo_cierre' => Yii::t('app', 'Saldo al Cierre'),
            'contratista_id' => Yii::t('app', 'Contratista ID'),
            'anho' => Yii::t('app', 'Anho'),
            'creado_por' => Yii::t('app', 'Creado Por'),
            'actualizado_por' => Yii::t('app', 'Actualizado Por'),
            'sys_status' => Yii::t('app', 'Sys Status'),
            'sys_creado_el' => Yii::t('app', 'Sys Creado El'),
            'sys_actualizado_el' => Yii::t('app', 'Sys Actualizado El'),
            'sys_finalizado_el' => Yii::t('app', 'Sys Finalizado El'),
        ];
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getOtrosTributos()
    {
        return $this->hasOne(CuentasSysConceptos::className(), ['id' => 'otros_tributos_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getContratista()
    {
        return $this->hasOne(Contratistas::className(), ['id' => 'contratista_id']);
    }

    /**
     * @return \yii\db\ActiveQuery
     */
    public function getOtrosTributosBeneficiarios()
    {
        return $this->hasMany(CuentasD1D2Beneficiario::className(), ['cuenta_id' => 'id']);
    }

    public function getFormAttribs() {
        return [
            // primary key column
            'id'=>[ // primary key attribute
                'type'=>Form::INPUT_HIDDEN,
                'columnOptions'=>['hidden'=>true]
            ],
            'otros_tributos_id' => ['type'=>Form::INPUT_WIDGET,'widgetClass'=>Select2::classname(),'options'=>['data'=>ArrayHelper::map(CuentasSysConceptos::concepto('d2'),'id','nombre'),
                'options'=>['id'=>'otros_tributos-concepto','placeholder'=>'Seleccionar', 'onchange'=>''],'pluginOptions' => [
                    'allowClear' => false,
                ],]],
            'saldo_pah' =>['type'=>Form::INPUT_WIDGET,'widgetClass'=>MaskMoney::className(),],
            'credito_fiscal' => ['type'=>Form::INPUT_WIDGET,'widgetClass'=>MaskMoney::className(),],
            'monto' => ['type'=>Form::INPUT_WIDGET,'widgetClass'=>MaskMoney::className(),],
            'debito_fiscal' => ['type'=>Form::INPUT_WIDGET,'widgetClass'=>MaskMoney::className(),],
            'debito_fiscal_no' => ['type'=>Form::INPUT_TEXT,],
            'importe_pagado' => ['type'=>Form::INPUT_WIDGET,'widgetClass'=>MaskMoney::className(),],
            'saldo_cierre' => ['type'=>Form::INPUT_WIDGET,'widgetClass'=>MaskMoney::className(),],

        ];
    }

    public function Calculo(){

        //$this->saldo_cierre = $this->saldo_ph + $this->importe_pagado_ejer_econo + $this->monto + $this->importe_aplicado_ejer_econo;

        return true;
    }
}


text:
<?xml version="1.0" encoding="UTF-8"?>
<project
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
    xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <parent>
        <groupId>org.vizzini</groupId>
        <artifactId>vizzini-POM</artifactId>
        <version>1.0-SNAPSHOT</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.vizzini.ai</groupId>
    <artifactId>vizzini-ai</artifactId>
    <packaging>jar</packaging>
    <version>1.0-SNAPSHOT</version>
    <name>Vizzini-AI</name>
    <dependencies>
        <dependency>
            <groupId>org.vizzini.core</groupId>
            <artifactId>vizzini-core</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-collections</groupId>
            <artifactId>commons-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.commons</groupId>
            <artifactId>commons-lang3</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>2.4</version>
                <configuration>
                    <descriptorRefs>
                        <descriptorRef>jar-with-dependencies</descriptorRef>
                    </descriptorRefs>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <reporting>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>2.5.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.9.1</version>
                <reportSets>
                    <reportSet>
                        <id>uml</id>
                        <configuration>
                            <doclet>org.umlgraph.doclet.UmlGraphDoc</doclet>
                            <docletArtifact>
                                <groupId>org.umlgraph</groupId>
                                <artifactId>doclet</artifactId>
                                <version>5.1</version>
                            </docletArtifact>
                            <additionalparam>-views</additionalparam>
                            <additionalparam>-inferdep</additionalparam>
                            <additionalparam>-inferrel</additionalparam>
                            <destDir>uml</destDir>
                            <show>private</show>
                        </configuration>
                        <reports>
                            <report>javadoc</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <outputName>Unit Test Results</outputName>
                    <aggregate>false</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.3.2</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>2.0-beta-2</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.2</version>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>dashboard-maven-plugin</artifactId>
                <version>1.0.0-beta-1</version>
            </plugin>
        </plugins>
    </reporting>
</project>


text:
using System.Security.Permissions;
using System.Drawing;
using System.Diagnostics;

namespace System.Windows.Forms
{
    public partial class DataGridView
    {
        /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridView.DataGridViewTopRowAccessibleObject"]/*' />
        [
            System.Runtime.InteropServices.ComVisible(true)
        ]
        protected class DataGridViewTopRowAccessibleObject : AccessibleObject
        {
            DataGridView owner;

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.DataGridViewTopRowAccessibleObject1"]/*' />
            public DataGridViewTopRowAccessibleObject() : base()
            {
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.DataGridViewTopRowAccessibleObject2"]/*' />
            public DataGridViewTopRowAccessibleObject(DataGridView owner) : base()
            {
                this.owner = owner;
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Bounds"]/*' />
            public override Rectangle Bounds
            {
                get
                {
                    if (this.owner == null)
                    {
                        throw new InvalidOperationException(SR.GetString(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet));
                    }
                    if (this.owner.ColumnHeadersVisible)
                    {
                        Rectangle rect = Rectangle.Union(this.owner.layout.ColumnHeaders, this.owner.layout.TopLeftHeader);
                        return this.owner.RectangleToScreen(rect);
                    }
                    else
                    {
                        return Rectangle.Empty;
                    }
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Name"]/*' />
            public override string Name
            {
                get
                {
                    return SR.GetString(SR.DataGridView_AccTopRow);
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Owner"]/*' />
            public DataGridView Owner
            {
                get
                {
                    return this.owner;
                }
                set
                {
                    if (this.owner != null)
                    {
                        throw new InvalidOperationException(SR.GetString(SR.DataGridViewTopRowAccessibleObject_OwnerAlreadySet));
                    }
                    this.owner = value;
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Parent"]/*' />
            public override AccessibleObject Parent
            {
                [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
                get
                {
                    if (this.owner == null)
                    {
                        throw new InvalidOperationException(SR.GetString(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet));
                    }
                    return this.owner.AccessibilityObject;
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Role"]/*' />
            public override AccessibleRole Role
            {
                get
                {
                    return AccessibleRole.Row;
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Value"]/*' />
            public override string Value
            {
                [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
                get
                {
                    return this.Name;
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.GetChild"]/*' />
            public override AccessibleObject GetChild(int index)
            {
                if (this.owner == null)
                {
                    throw new InvalidOperationException(SR.GetString(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet));
                }

                if (index < 0)
                {
                    throw new ArgumentOutOfRangeException("index");
                }

                if (index == 0 && this.owner.RowHeadersVisible)
                {
                    return this.owner.TopLeftHeaderCell.AccessibilityObject;
                }

                if (this.owner.RowHeadersVisible)
                {
                    // decrement the index because the first child is the top left header cell
                    index --;
                }

                Debug.Assert(index >= 0);

                if (index < this.owner.Columns.GetColumnCount(DataGridViewElementStates.Visible))
                {
                    int actualColumnIndex = this.owner.Columns.ActualDisplayIndexToColumnIndex(index, DataGridViewElementStates.Visible);
                    return this.owner.Columns[actualColumnIndex].HeaderCell.AccessibilityObject;
                }
                else
                {
                    return null;
                }
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.GetChildCount"]/*' />
            public override int GetChildCount()
            {
                if (this.owner == null)
                {
                    throw new InvalidOperationException(SR.GetString(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet));
                }
                int result = this.owner.Columns.GetColumnCount(DataGridViewElementStates.Visible);
                if (this.owner.RowHeadersVisible)
                {
                    // + 1 is the top left header cell accessibility object
                    result ++;
                }

                return result;
            }

            /// <include file='doc\DataGridViewTopRowAccessibleObject.uex' path='docs/doc[@for="DataGridViewTopRowAccessibleObject.Navigate"]/*' />
            [SecurityPermission(SecurityAction.Demand, Flags = SecurityPermissionFlag.UnmanagedCode)]
            public override AccessibleObject Navigate(AccessibleNavigation navigationDirection)
            {
                if (this.owner == null)
                {
                    throw new InvalidOperationException(SR.GetString(SR.DataGridViewTopRowAccessibleObject_OwnerNotSet));
                }
                switch (navigationDirection)
                {
                    case AccessibleNavigation.Down:
                    case AccessibleNavigation.Next:
                        if (this.owner.AccessibilityObject.GetChildCount() > 1)
                        {
                            return this.owner.AccessibilityObject.GetChild(1);
                        }
                        else
                        {
                            return null;
                        }
                    case AccessibleNavigation.FirstChild:
                        return this.GetChild(0);
                    case AccessibleNavigation.LastChild:
                        return this.GetChild(this.GetChildCount() - 1);
                    default:
                        return null;
                }
            }
        }
    }
}


text:
package at.ac.tuwien.kr.alpha.api.query;

import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

import at.ac.tuwien.kr.alpha.common.AnswerSet;
import at.ac.tuwien.kr.alpha.common.Predicate;
import at.ac.tuwien.kr.alpha.common.atoms.Atom;
import at.ac.tuwien.kr.alpha.common.terms.ConstantTerm;
import at.ac.tuwien.kr.alpha.common.terms.FunctionTerm;
import at.ac.tuwien.kr.alpha.common.terms.Term;

/**
 * A query for ASP atoms matching a set of filter predicates.
 */
public final class AnswerSetQuery implements java.util.function.Predicate<Atom> {

	private final Predicate predicate;
	private Map<Integer, java.util.function.Predicate<Term>> filters = new HashMap<>();

	private AnswerSetQuery(Predicate pred) {
		this.predicate = pred;
	}

	/**
	 * Creates a new AnswerSetQuery that will match all atoms that are instances of the given {@link Predicate}.
	 *
	 * @param predicate the predicate to match against
	 * @return a new AnswerSetQuery matching against the given predicate
	 */
	public static AnswerSetQuery forPredicate(Predicate predicate) {
		return new AnswerSetQuery(predicate);
	}

	/**
	 * Adds a new filter to this AnswerSetQuery.
	 * For an atom a(t1, ..., tn), the term at index termIdx will be tested against the given filter predicate.
	 *
	 * @param termIdx the index of the term to test
	 * @param filter  the test predicate to use on terms
	 * @return this AnswerSetQuery with the additional filter added
	 */
	public AnswerSetQuery withFilter(int termIdx, java.util.function.Predicate<Term> filter) {
		if (termIdx >= this.predicate.getArity()) {
			throw new IndexOutOfBoundsException(
					"Predicate " + this.predicate.getName() + " has arity " + this.predicate.getArity() + ", term index " + termIdx + " is invalid!");
		}
		if (this.filters.containsKey(termIdx)) {
			java.util.function.Predicate<Term> currFilter = this.filters.get(termIdx);
			this.filters.put(termIdx, currFilter.and(filter));
		} else {
			this.filters.put(termIdx, filter);
		}
		return this;
	}

	/**
	 * Convenience method - adds a filter to match names of symbolic constants against a string.
	 *
	 * @param termIdx
	 * @param str
	 * @return
	 */
	public AnswerSetQuery withConstantEquals(int termIdx, String str) {
		return this.withFilter(termIdx, AnswerSetQuery.constantTermEquals(str));
	}

	/**
	 * Convenience method - adds a filter to match values of constant terms against a string.
	 *
	 * @param termIdx
	 * @param str
	 * @return
	 */
	public AnswerSetQuery withStringEquals(int termIdx, String str) {
		return this.withFilter(termIdx, (term) -> {
			if (!(term instanceof ConstantTerm<?>)) {
				return false;
			}
			if (((ConstantTerm<?>) term).isSymbolic()) {
				return false;
			}
			return ((ConstantTerm<?>) term).getObject().equals(str);
		});
	}

	/**
	 * Convenience method - adds a filter to check for function terms with a given function symbol and arity.
	 *
	 * @param termIdx
	 * @param funcSymbol
	 * @param funcArity
	 * @return
	 */
	public AnswerSetQuery withFunctionTerm(int termIdx, String funcSymbol, int funcArity) {
		java.util.function.Predicate<Term> isFunction = (term) -> {
			if (!(term instanceof FunctionTerm)) {
				return false;
			}
			FunctionTerm funcTerm = (FunctionTerm) term;
			if (!funcTerm.getSymbol().equals(funcSymbol)) {
				return false;
			}
			if (funcTerm.getTerms().size() != funcArity) {
				return false;
			}
			return true;
		};
		return this.withFilter(termIdx, isFunction);
	}

	/**
	 * Convenience method - adds a filter to check whether a term is equal to a given term.
	 *
	 * @param termIdx
	 * @param otherTerm
	 * @return
	 */
	public AnswerSetQuery withTermEquals(int termIdx, Term otherTerm) {
		java.util.function.Predicate<Term> isEqual = (term) -> {
			return term.equals(otherTerm);
		};
		return this.withFilter(termIdx, isEqual);
	}

	/**
	 * Applies this query to an atom. Filters are worked off in
	 * order of ascending term index in a conjunctive fashion, i.e. for an atom
	 * to match the query, all of its terms must satisfy all filters on these
	 * terms
	 *
	 * @param atom the atom to which to apply the query
	 * @return true iff the atom satisfies the query
	 */
	@Override
	public boolean test(Atom atom) {
		if (!atom.getPredicate().equals(predicate)) {
			return false;
		}
		for (int i = 0; i < atom.getTerms().size(); i++) {
			Term ithTerm = atom.getTerms().get(i);
			java.util.function.Predicate<Term> ithFilter = filters.get(i);
			if (ithFilter != null && !ithFilter.test(ithTerm)) {
				return false;
			}
		}
		return true;
	}

	/**
	 * Applies this query to an {@link AnswerSet}.
	 *
	 * @param as
	 * @return
	 */
	public List<Atom> applyTo(AnswerSet as) {
		if (!as.getPredicates().contains(this.predicate)) {
			return Collections.emptyList();
		}
		return as.getPredicateInstances(this.predicate).stream().filter(this).collect(Collectors.toList());
	}

	private static java.util.function.Predicate<Term> constantTermEquals(final String str) {
		java.util.function.Predicate<Term> equalsGivenString = (t) -> {
			return AnswerSetQuery.constantTermEquals(t, str);
		};
		return equalsGivenString;
	}

	private static boolean constantTermEquals(Term term, String str) {
		if (!(term instanceof ConstantTerm<?>)) {
			return false;
		}
		if (!((ConstantTerm<?>) term).isSymbolic()) {
			return false;
		}
		return ((ConstantTerm<?>) term).getObject().toString().equals(str);
	}

}


text:
//------------------------------------------------------------------------------------
// <copyright file="FlowchartPath.cs" company="Stephen Jennings">
//   Copyright 2011 Stephen Jennings. Licensed under the Apache License, Version 2.0.
// </copyright>
//------------------------------------------------------------------------------------

namespace Heap.Web.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.Linq;
    using System.Web;

    public class FlowchartPath
    {
        [Key]
        [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public virtual Guid Id { get; set; }

        public virtual string Title { get; set; }

        public virtual string Description { get; set; }

        public virtual Flowchart Flowchart { get; set; }

        public virtual FlowchartStep Source { get; set; }

        public virtual FlowchartStep Target { get; set; }
    }
}


text:
<TITLE>Review for Clay Pigeons (1998)</TITLE>
<LINK REL="STYLESHEET" TYPE="text/css" HREF="/ramr.css">

Clay Pigeons (1998)

reviewed by
Dennis Schwartz

CLAY PIGEONS (director: David Dobkin; screenwriter: Matt L. Healy;
cinematographer:Eric Edwards; cast: Joaquin Phoenix (Clay Birdwell),
Vince Vaughn (Lester Long), Janeane Garofalo (Dale Shelby), Georgina
Cates (Amanda ), Gregory Sporleder (Earl), Scott Wilson (Sheriff
Mooney), Vince Vieluf (Deputy Barney), Monica Moench (Kimberly), Phil
Morris (Agent Reynard), Nikki Arlyn (Gloria), 1998)

Reviewed by Dennis Schwartz

"Clay Pigeons" tried hard to be a pleasant comedy/suspense story about a
serial killer and a character study of some small town denizens and the
outsider FBI agents. It worked reasonably well for part of the film, as
dead bodies came popping up unexpectedly in this sleepy Montana town,
but then the story ran out of tricks and everything about the film fell
apart and the psychopathic woman hating slasher, Lester Long (Vaughn),
became a tiresome charge, his maniacal charm just wore out his welcome
on screen, and the film's conclusion lacked tension or purpose and
seemed to be a wasted effort, as it just simply ran out of gas after
about an hour into it.

Since it's a story about clay pigeons- with the singular dictionary
meaning for that slang term, a person in a situation where he can be
taken advantage of by others- the clay pigeon is the town's auto
mechanic, Clay Birdwell (Phoenix), considered by the locals to be a nice
guy, who is out target shooting with his best friend Earl (Sporleder)
when Earl confronts him with the news that his wife Amanda (Coates) told
him she is making love to him, and Earl tells him I can't live with
that. Earl comes up with this crazy idea of shooting himself in the leg
and then killing himself, while framing it so that Clay would be accused
of the crime and have to serve prison time. Clay tells this to the sexy
Amanda, after Earl carries out his plan, as we see her dressed in a see-
through-nightgown, wearing only red panties. But she tells Clay he's on
his own, she wants no one to know about her relationship with him. Our
flawed hero then tows Earl's pickup with him in it and has it go down a
hill to explode, and when his friend, the unassuming Sheriff Mooney
(Scott) comes to investigate, he fails to tell him the whole truth.

While playing a mean game of pool, in a place aptly named Doc Holiday's,
Clay meets an enigmatic and garrulous cowboy, clad in full cowboy gear,
including a fancy stetson. The cowboy, Lester Long, is a stranger in
town and is impressed that Clay slapped Amanda when she tried to seduce
him by the pool table. A friendship between the two develops, leading to
a fishing expedition, where a woman's body, stabbed 7 times, is
discovered floating in the water.

A fatal friendship also develops between Lester and Amanda, as she will
later on be killed  by the psychopath.

But, first the story gets more twisted and unbelievable when Clay
refuses to see Amanda anymore and has sex with a waitress (Nikki) he
picks-up. She is shot while in the middle of her sexual climax with him,
by the jealous and deranged Amanda, knowing Clay is not in a position to
squeal. He is forced to also dispose of this body, which he dumps in the
local lake.

Into the picture comes the FBI, led by the wry-humored agent Dale Shelby
(Janeane Garofalo) and the efficient-looking agent Reynard (Morris), who
are looking at Clay as a possible serial killer. There have been seven
other dead bodies turning up all over Montana that the FBI believes to
be the work of one serial killer. What Garofalo brought to the film at
this point, was some welcomed comic relief, much needed because this
film was exhausted from all the contrivances and lack of adequate
character study it provided. It was only through Garofolo's sense of
black comedy, that the film was still bearable; and, at that, it was
only barely bearable.

Clay is somewhat of an innocent, at least, as far as the murders go, but
he certainly can't be commended for being a truthful person.

Everything gets resolved in the film's anticlimax, that mercifully ends
in an arrest, though some 30 minutes too late, as far as I'm concerned.
What might be likable about this film, to viewers not that discerning
about plot or character study, is that this film was user friendly and
brought about a hearty guffaw or two. None of the actors was bad, bad,
but none were memorable. It's one of those films that is easily
forgotten.

REVIEWED ON 11/19/99           GRADE: C-

Dennis Schwartz: "Ozus'  World Movie Reviews"

http://www.sover.net/~ozus

ozus@sover.net

© ALL RIGHTS RESERVED   DENNIS SCHWARTZ

The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).

The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.

Please direct comments/criticisms of the review to relevant newsgroups.

Broken URLs inthe reviews are the responsibility of the author.

The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.

Related links: index of all rec.arts.movies.reviews reviews


text:
Supported boards and operating system
--------------------------------------

MicroFlo for ARM has been tested with
* Mbed LPC1768
* ***INPROGRESS*** Texas Instruments TM4C123G (Tiva-C)

It is expected that other ARM Cortex-Mx based devices that are supported by ARM-GCC can be made to work easily.

The process below has only been tested on Arch Linux, but should work on all Linuxes.
Probably will also work on Mac OSX.

Prerequisites
-----------------
1. Download and install [Node.JS](http://nodejs.org)

2. Download and install an 'gcc-arm-none-eabi' toolchain
For Ubuntu use the PPA [terry.guo/gcc-arm-embedded](https://launchpad.net/~terry.guo/+archive/gcc-arm-embedded)

3. Download and install [lm4flash](https://github.com/utzig/lm4tools)

4. (for debugging) Download and install [OpenOCD]. As of March 2014 you need to build it from source to get Tiva-C support.

Building MicroFlo
------------------
It is assumed that you have common build tools such as 'make', 'git' and 'screen'

1. Download MicroFlo from git

    git clone https://github.com/jonnor/microflo.git

2. Build

    git submodule update --init --recursive
    npm install
    make build-stellaris

3. Upload/flash

    make upload-stellaris

Debugging on Tiva-C
------------------

For debugging follow the steps under [Run OpenOCD](http://processors.wiki.ti.com/index.php/Stellaris_Launchpad_with_OpenOCD_and_Linux),
but use:

* AFX file: build/stellaris/gcc/main.afx
* Board config: ek-tm4c123gxl.cfg

Running on Mbed
------------------
Put the firmware.bin file onto the USB mass storage device


text: sbt ~container:start


text:
CREATE vclass ddl_0001(
    dummy_column set( int ),
    num                 int,
    name               string
)
METHOD get_2000() int FUNCTION TEST_getInt,
       get_success() string FUNCTION TEST_getString
FILE '$HOME/method_test/myyang';

drop vclass ddl_0001;


text:
package internalversion

import (
	api "k8s.io/kubernetes/pkg/api"
	restclient "k8s.io/kubernetes/pkg/client/restclient"
	watch "k8s.io/kubernetes/pkg/watch"
)

// ServicesGetter has a method to return a ServiceInterface.
// A group's client should implement this interface.
type ServicesGetter interface {
	Services(namespace string) ServiceInterface
}

// ServiceInterface has methods to work with Service resources.
type ServiceInterface interface {
	Create(*api.Service) (*api.Service, error)
	Update(*api.Service) (*api.Service, error)
	UpdateStatus(*api.Service) (*api.Service, error)
	Delete(name string, options *api.DeleteOptions) error
	DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error
	Get(name string) (*api.Service, error)
	List(opts api.ListOptions) (*api.ServiceList, error)
	Watch(opts api.ListOptions) (watch.Interface, error)
	Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error)
	ServiceExpansion
}

// services implements ServiceInterface
type services struct {
	client restclient.Interface
	ns     string
}

// newServices returns a Services
func newServices(c *CoreClient, namespace string) *services {
	return &services{
		client: c.RESTClient(),
		ns:     namespace,
	}
}

// Create takes the representation of a service and creates it.  Returns the server's representation of the service, and an error, if there is any.
func (c *services) Create(service *api.Service) (result *api.Service, err error) {
	result = &api.Service{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("services").
		Body(service).
		Do().
		Into(result)
	return
}

// Update takes the representation of a service and updates it. Returns the server's representation of the service, and an error, if there is any.
func (c *services) Update(service *api.Service) (result *api.Service, err error) {
	result = &api.Service{}
	err = c.client.Put().
		Namespace(c.ns).
		Resource("services").
		Name(service.Name).
		Body(service).
		Do().
		Into(result)
	return
}

func (c *services) UpdateStatus(service *api.Service) (result *api.Service, err error) {
	result = &api.Service{}
	err = c.client.Put().
		Namespace(c.ns).
		Resource("services").
		Name(service.Name).
		SubResource("status").
		Body(service).
		Do().
		Into(result)
	return
}

// Delete takes name of the service and deletes it. Returns an error if one occurs.
func (c *services) Delete(name string, options *api.DeleteOptions) error {
	return c.client.Delete().
		Namespace(c.ns).
		Resource("services").
		Name(name).
		Body(options).
		Do().
		Error()
}

// DeleteCollection deletes a collection of objects.
func (c *services) DeleteCollection(options *api.DeleteOptions, listOptions api.ListOptions) error {
	return c.client.Delete().
		Namespace(c.ns).
		Resource("services").
		VersionedParams(&listOptions, api.ParameterCodec).
		Body(options).
		Do().
		Error()
}

// Get takes name of the service, and returns the corresponding service object, and an error if there is any.
func (c *services) Get(name string) (result *api.Service, err error) {
	result = &api.Service{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("services").
		Name(name).
		Do().
		Into(result)
	return
}

// List takes label and field selectors, and returns the list of Services that match those selectors.
func (c *services) List(opts api.ListOptions) (result *api.ServiceList, err error) {
	result = &api.ServiceList{}
	err = c.client.Get().
		Namespace(c.ns).
		Resource("services").
		VersionedParams(&opts, api.ParameterCodec).
		Do().
		Into(result)
	return
}

// Watch returns a watch.Interface that watches the requested services.
func (c *services) Watch(opts api.ListOptions) (watch.Interface, error) {
	return c.client.Get().
		Prefix("watch").
		Namespace(c.ns).
		Resource("services").
		VersionedParams(&opts, api.ParameterCodec).
		Watch()
}

// Patch applies the patch and returns the patched service.
func (c *services) Patch(name string, pt api.PatchType, data []byte, subresources ...string) (result *api.Service, err error) {
	result = &api.Service{}
	err = c.client.Patch(pt).
		Namespace(c.ns).
		Resource("services").
		SubResource(subresources...).
		Name(name).
		Body(data).
		Do().
		Into(result)
	return
}


text:
package twg2.parser.codeParser.typescript;

import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.ArrayList;
import java.util.List;

import twg2.io.files.FileRecursion;
import twg2.streams.StreamUtil;
import twg2.text.stringUtils.StringJoin;

/**
 * @author TeamworkGuy2
 * @since 2015-5-11
 */
public class ImportsTest {

	public static void main(String[] args) {
		Path projectPath = Paths.get("C:/Users/TeamworkGuy2/Documents/Visual Studio 2015/Projects/ps/l/ca/app/scripts/");
		Path projectModulesPath = Paths.get("C:/Users/TeamworkGuy2/Documents/Visual Studio 2015/Projects/ps/l/ca/node_modules/");
		File folder = Paths.get("C:/Users/TeamworkGuy2/Documents/Visual Studio 2015/Projects/ps/l/ca/app/scripts/modules/psServices").toFile();
		//projectPath.res

		FileRecursion.forEachFileByFolderRecursively(folder, (f) -> f.getName().toLowerCase().endsWith(".ts"), Integer.MAX_VALUE, (parent, file) -> {
			try {
				Path parentPath = parent.toPath();
				List<String> lines = StreamUtil.toList(Files.lines(file.toPath()), new ArrayList<>());
				List<String> imports = Imports.extractImports(lines);
				List<Path> relativeImports = new ArrayList<>();
				List<String> relativeImportStrs = new ArrayList<>();

				for(String importStr : imports) {
					Path relativePath = null;
					if(importStr.startsWith(".")) {
						relativePath = projectPath.relativize(parentPath.resolve(importStr)).toAbsolutePath();
					}
					else {
						relativePath = projectModulesPath.resolve(importStr).toAbsolutePath();
					}
					relativeImports.add(relativePath);
					relativeImportStrs.add(relativePath.toFile().getCanonicalPath());
				}

				System.out.println(imports.size() + " imports for: " + file);
				System.out.println(StringJoin.join(relativeImportStrs, "\n"));
				System.out.println();
			} catch (Exception e) {
				e.printStackTrace();
			}
		});
	}

}


text:
namespace BlueYonder.Companion.Client.Helpers
{
    public class Response
    {
        public string Content { get; set; }

        public bool Success { get; set; }
    }
}


text:
require 'rexml/document'
require 'rexml/xpath'

module Ape
  class Feed
    # Load up a collection feed from its URI.  Return an array of <entry> objects.
    #  follow <link rel="next" /> pointers as required to get the whole
    #  collection
    def Feed.read(uri, name, ape, report=true)

      entries = []
      uris = []
      next_page = uri
      page_num = 1

      while (next_page) && (page_num < 10) do

        label = "Page #{page_num} of #{name}"
        uris << next_page
        page = ape.check_resource(next_page, label, Names::AtomMediaType, report)
        break unless page

        # * Validate it
        Validator.validate(Samples.atom_RNC, page.body, label, ape) if report

        # XML-parse the feed
        error = "not well-formed"
        feed = nil
        begin
          feed = REXML::Document.new(page.body, { :raw => nil })
        rescue Exception
          error = $!.to_s
          feed = nil
        end
        if feed == nil
          ape.error "Can't parse #{label} at #{next_page}, Parser said: #{$!}" if report
          break
        end

        feed = feed.root
        if feed == nil
          ape.warning "#{label} is empty."
          break
        end

        page_entries = REXML::XPath.match(feed, "./atom:entry", Names::XmlNamespaces)
        if page_entries.empty? && report
          ape.info "#{label} has no entries."
        end

        entries += page_entries.map { |e| Entry.new(e, next_page)}

        next_link = REXML::XPath.first(feed, "./atom:link[@rel=\"next\"]", Names::XmlNamespaces)
        if next_link
          next_link = next_link.attributes['href']
          base = AtomURI.new(next_page)
          next_link = base.absolutize(next_link, feed)
          if uris.index(next_link)
            ape.error "Collection contains circular 'next' linkage: #{next_link}" if report
            break
          end
          page_num += 1
        end
        next_page = next_link
      end

      if report && next_page
        ape.warning "Stopped reading collection after #{page_num} pages."
      end

      # all done unless we're error-checking
      return entries unless report

      # Ensure that entries are ordered by app:edited
      last_date = nil
      with_app_date = 0
      clean = true
      entries.each do |e|
        datestr = e.child_content("edited", Names::AppNamespace)
        error = nil
        if datestr
          if datestr =~ /\d\d\d\d-\d\d-\d\dT\d\d:\d\d:\d\d(\.\d+)?(Z|([-+]\d\d:\d\d))/
            begin
              date = Time.parse(datestr)
              with_app_date += 1
              if last_date && (date > last_date)
                error = "app:edited values out of order, d #{date} ld #{last_date}"
              end
              last_date = date
            rescue ArgumentError
              error = "invalid app:edited value: #{datestr}"
            end
          else
            error = "invalid app:edited child: #{datestr}"
          end
          if error
            title = e.child_content "title"
            ape.error "In entry with title '#{title}', #{error}."
            clean = false
          end
        end
      end
      if with_app_date < entries.size
        ape.error "#{entries.size - with_app_date} of #{entries.size} entries in #{name} lack app:edited elements."
        clean = false
      end

      ape.good "#{name} has correct app:edited value order." if clean

      entries
    end
  end
end


text:
#ifndef MSKPSlide_DEFINED
#define MSKPSlide_DEFINED

#include "tools/MSKPPlayer.h"
#include "tools/viewer/Slide.h"

class SkStreamSeekable;

class MSKPSlide : public Slide {
public:
    MSKPSlide(const SkString& name, const SkString& path);
    MSKPSlide(const SkString& name, std::unique_ptr<SkStreamSeekable>);

    SkISize getDimensions() const override;

    void draw(SkCanvas* canvas) override;
    bool animate(double nanos) override;
    void load(SkScalar winWidth, SkScalar winHeight) override;
    void unload() override;
    void gpuTeardown() override;

private:
    // Call if layers need to be redrawn because we've looped playback or UI interaction.
    void redrawLayers();

    std::unique_ptr<SkStreamSeekable> fStream;
    std::unique_ptr<MSKPPlayer>       fPlayer;

    int    fFrame         = 0;
    int    fFPS           = 15;
    bool   fPaused        = false;
    double fLastFrameTime = -1;

    bool fShowFrameBounds = false;

    // Default to transparent black, which is correct for Android MSKPS.
    float fBackgroundColor[4] = {0, 0, 0, 0};

    std::vector<int>              fAllLayerIDs;
    std::vector<std::vector<int>> fFrameLayerIDs;
    std::vector<SkString>         fLayerIDStrings;
    int                           fDrawLayerID = -1;  // -1 means just draw the root layer
    bool                          fListAllLayers = true;

    using INHERITED = Slide;
};

#endif


text:
class HighScoreHandler
{
  public:
        HighScoreHandler(int score, bool won);
        void handleInput(const Input& input);
        void draw(Graphics& graphics);
        char upChar(char c);
        char downChar(char c);
        bool finished()
        {
                return finished_;
        }

  private:
        char initials_[4]{'A', 'A', 'A', '\0'};
        int position_{0};
        int high_position_{0};
        int score_{0};
        bool won_{false};
        bool finished_{false};
        void drawHighScoreLine(Graphics& graphics, const std::string& label,
                               const std::string& initials, int score, int x,
                               int y, Color* color);
        void finalizeHighScore();
        HighScoreList high_score_list_;
};


text:
describe Lakitu::Configurer do
  subject { described_class }
  before :each do
    mock_config
    allow(File).to receive(:write).and_return(true)
  end

  it "creates config file when it doesn't exist" do
    mock_no_options
    expect(File).to receive(:write).with(Lakitu::OPTIONS_FILE_PATH, Lakitu::Options.default_config).and_return(true)
    expect(File).to receive(:read).with(Lakitu::OPTIONS_FILE_PATH).and_return(Lakitu::Options.default_config)
    expect(subject.find_or_create_config).to eq Lakitu::Options.default_config
  end

  it "uses existing config file when it exists" do
    mock_options
    expect(subject.find_or_create_config).to eq OPTIONS_CONTENT
  end

  it "opens config file in default editor" do
    expect(subject).to receive(:system).with(Lakitu::EDIT_FILE_COMMAND)
    subject.edit
  end

  it "opens local config file in default editor" do
    expect(subject).to receive(:system).with(Lakitu::EDIT_LOCAL_CONFIG_COMMAND)
    subject.edit_local
  end
end


text:
package unused.terrain.Objects3D;

import java.awt.Color;
import java.util.LinkedList;
import java.util.Random;

import unused.terrain.JavaRenderer.Drawable;
import unused.terrain.JavaRenderer.MyMath;
import unused.terrain.JavaRenderer.Scene;
import unused.terrain.JavaRenderer.Vector3D;
import unused.terrain.JavaRenderer.Tri;

public class Terrain extends Drawable
{
	// Fields and Attributes
	public int SizeX;
	public int SizeY;
	private int factor;

	public double[][] FieldHeight;
	public ITerrainInfo[][] FieldInfo;

	// Constructors
	private Terrain(Scene frame)
	{
		super(frame);
	}

	public Terrain(Scene scene, int sizeX, int sizeY, int factor)
	{
		this(scene, sizeX, sizeY, factor, null);
	}

	public Terrain(Scene scene, int sizeX, int sizeY, int factor, ITerrainInfo defaultInfo)
	{
		super(scene);
		this.SizeX = sizeX;
		this.SizeY = sizeY;
		this.factor = factor;

		this.color = Color.green;

		this.FieldHeight = new double[sizeX][sizeY];
		this.FieldInfo = new ITerrainInfo[sizeX][sizeY];
		// this.fill = false;

		this.setShininess(1);
		this.setReflection(this.color);

		Reset(0, defaultInfo);
	}

	// Methods
	public void Reset(double defaultValue, ITerrainInfo defaultInfo)
	{
		// iterate
		for (int i = 0; i < SizeX; i++)
			for (int j = 0; j < SizeY; j++)
			{
				// Set field values
				this.FieldHeight[i][j] = defaultValue;

				if (defaultInfo != null)
					this.FieldInfo[i][j] = defaultInfo;
			}
	}

	public void RandomizeFieldHeight(double low, double high)
	{
		for (int x = 0; x < SizeX; x++)
			for (int y = 0; y < SizeY; y++)
			{
				this.FieldHeight[x][y] = (x % 2 == 0) ? low : high;
			}
	}

	public void RandomizeFieldHeight(double min, double max, double maxChange)
	{
		Random random = new Random();
		double start = MyMath.RandomDouble(random, min, max);
		Reset(start, null);
		// System.out.println("Start:" + start);

		for (int i = 0; i < SizeX; i++)
			for (int j = 0; j < SizeY; j++)
			{
				// get surrounding values
				double left = i > 0 ? FieldHeight[i - 1][j] : start;
				double right = i < SizeX - 1 ? FieldHeight[i + 1][j] : start;
				double top = j > 0 ? FieldHeight[i][j - 1] : start;
				double bottom = j < SizeY - 1 ? FieldHeight[i][j + 1] : start;

				// calculate new value
				double mid = (left + right + top + bottom) / 4;
				double change = MyMath.RandomDouble(random, -maxChange, maxChange);
				FieldHeight[i][j] = mid + change;

				// Keep value in bounds
				if (FieldHeight[i][j] > max)
					FieldHeight[i][j] = max;
				if (FieldHeight[i][j] < min)
					FieldHeight[i][j] = min;
				// System.out.println(i + " " + j + " " + FieldHeight[i][j]);
			}
		this.vertices = new Tri[(this.SizeX - 1) * (this.SizeY - 1) * 2];
		getVertices().toArray(this.vertices);
	}

	public double getMaxValue()
	{
		double max = FieldHeight[0][0];
		for (int i = 0; i < SizeX; i++)
		{
			for (int j = 0; j < SizeY; j++)
			{
				if (FieldHeight[i][j] > max)
					max = FieldHeight[i][j];
			}
		}
		return max;
	}

	public double getMinValue()
	{
		double min = FieldHeight[0][0];
		for (int i = 0; i < SizeX; i++)
		{
			for (int j = 0; j < SizeY; j++)
			{
				if (FieldHeight[i][j] < min)
					min = FieldHeight[i][j];
			}
		}
		return min;
	}

	public Line3D[] getFlatLines(Line3D[][][] lines)
	{
		int cnt = 0;
		Line3D[] flatResult = new Line3D[lines.length * lines[0].length * lines[0][0].length];
		for (Line3D[][] direction : lines)
			for (Line3D[] row : direction)
				for (Line3D line : row)
				{
					flatResult[cnt] = line;
					cnt++;
				}
		return flatResult;
	}

	public Vector3D[] getPoints()
	{
		Vector3D[] result = new Vector3D[this.FieldHeight.length * this.FieldHeight[0].length];

		for (int x = 0; x < this.FieldHeight.length - 1; x++)
		{// Right lines
			for (int y = 0; y < this.FieldHeight[x].length; y++)
			{
				Vector3D p = new Vector3D(x, y, this.FieldHeight[x][y]);
				result[x * this.FieldHeight.length + y] = p;
			}
		}
		return result;
	}

	public Line3D[][][] getLines(Scene scene)
	{

		Line3D[][] resultRight = new Line3D[this.FieldHeight.length - 1][this.FieldHeight[0].length];
		Line3D[][] resultBottom = new Line3D[this.FieldHeight.length][this.FieldHeight[0].length - 1];

		for (int x = 0; x < this.FieldHeight.length - 1; x++)
		{// Right lines
			for (int y = 0; y < this.FieldHeight[x].length; y++)
			{
				Line3D rightLine = new Line3D(scene, new Vector3D(x, y, this.FieldHeight[x][y]), new Vector3D(x + 1, y, this.FieldHeight[x + 1][y]),
						Color.black, 1);
				resultRight[x][y] = rightLine;
			}
		}

		for (int x = 0; x < this.FieldHeight.length; x++)
		{// Bottom lines
			for (int y = 0; y < this.FieldHeight[x].length - 1; y++)
			{
				Line3D bottomLine = new Line3D(scene, new Vector3D(x, y, this.FieldHeight[x][y]), new Vector3D(x, y + 1, this.FieldHeight[x][y]),
						Color.black, 1);
				resultBottom[x][y] = bottomLine;
			}
		}

		return new Line3D[][][] { resultRight, resultBottom };
	}

	public LinkedList<Tri> getVertices()
	{
		LinkedList<Tri> ll = new LinkedList<Tri>();
		Vector3D delta = new Vector3D((FieldHeight.length - 1) * factor / -2, 0, (FieldHeight[0].length - 1) * factor / -2);

		this.vectors = new Vector3D[this.FieldHeight.length * this.FieldHeight[0].length];
		Vector3D[][] points = new Vector3D[this.FieldHeight.length][this.FieldHeight[0].length];

		for (int x = 0; x < this.FieldHeight.length; x++)
		{
			for (int y = 0; y < this.FieldHeight[x].length; y++)
			{
				points[x][y] = new Vector3D(x * factor, this.FieldHeight[x][y] * factor, y * factor).add(delta);
				this.vectors[x * this.FieldHeight.length + y] = points[x][y];
				if (x != 0 && y != 0)
				{
					ll.add(new Tri(points[x][y], points[x][y - 1], points[x - 1][y - 1]));
					ll.add(new Tri(points[x][y], points[x - 1][y - 1], points[x - 1][y]));
				}
			}
		}

		/*
		 * for (int x = 0; x < this.FieldHeight.length - 1; x++) { // Right
		 * lines for (int y = 0; y < this.FieldHeight[x].length - 1; y++) {
		 * Vector3D v1x = new Vector3D((x + 1) * factor, this.FieldHeight[x +
		 * 1][y + 1] * factor, (y + 1) * factor).add(delta); Vector3D v1y = new
		 * Vector3D((x + 1) * factor, this.FieldHeight[x + 1][y] * factor, y *
		 * factor).add(delta); Vector3D v1z = new Vector3D(x * factor,
		 * this.FieldHeight[x][y] * factor, y * factor).add(delta); Vertice v1 =
		 * new Vertice(v1x, v1y, v1z);
		 *
		 * Vector3D v2x = new Vector3D(x * factor, this.FieldHeight[x][y] *
		 * factor, y * factor).add(delta); Vector3D v2y = new Vector3D(x *
		 * factor, this.FieldHeight[x][y + 1] * factor, (y + 1) *
		 * factor).add(delta); Vector3D v2z = new Vector3D((x + 1) * factor,
		 * this.FieldHeight[x + 1][y + 1] * factor, (y + 1) *
		 * factor).add(delta); Vertice v2 = new Vertice(v2x, v2y, v2z);
		 *
		 * ll.add(v1); ll.add(v2); } }
		 */
		return ll;
	}

	public String toString()
	{
		return this.toString(2);
	}

	public String toString(int digits)
	{
		String result = "";
		for (int i = 0; i < SizeX; i++)
		{
			for (int j = 0; j < SizeY; j++)
			{
				result += FieldHeight[i][j] >= 0 ? " " : "";
				result += MyMath.Round(FieldHeight[i][j], 2) + "\t";
			}
			result += "\n";
		}
		result += "\n";
		result += "Highest value: " + getMaxValue();
		result += "\n";
		result += "Lowest  value: " + getMinValue();
		return result;
	}

	@Override
	public Drawable clone()
	{
		Terrain c = new Terrain(this.scene);
		c.vectors = this.vectors;
		c.vertices = this.vertices;
		c.setPosition(this.getPosition().clone());
		c.color = this.color;
		c.setReflection(this.getReflection());
		c.setShininess(this.getShininess());

		c.SizeX = this.SizeX;
		c.SizeY = this.SizeY;
		c.factor = this.factor;

		c.FieldHeight = this.FieldHeight;
		c.FieldInfo = this.FieldInfo;

		return c;
	}

	// Events
}


text:
<?php

namespace Peggy\Response\App;

use JMS\Serializer\Annotation as JMS;
use Peggy\Response\ResponseInterface;

class ListAppsResponse implements ResponseInterface
{
    /**
     * @JMS\Type("array<Peggy\Response\App\AppResponse>")
     *
     * @var AppResponse[]
     */
    protected $data;

    /**
     * @return AppResponse[]
     */
    public function getData()
    {
        return $this->data;
    }

    /**
     * @param AppResponse[] $data
     */
    public function setData($data)
    {
        $this->data = $data;
    }
}


text:
#include <chrono>
#include <GL/glew.h>
#include <GL/gl.h>
#include <fstream>
#include <iostream>
#ifndef _MSC_VER
#include <SDL2/SDL.h>
#else
#include <SDL.h>
#endif

#include "Vec.h"
#include "Surface.h"
#include "InputHandler.h"
#include "ThrowContainer.h"
#include "CLibraryContainer.h"

const int WINDOW_HEIGHT = 768;
const int WINDOW_WIDTH = 1024;

typedef std::chrono::high_resolution_clock Time;
typedef std::chrono::duration<GLfloat> fsecond;

void loadShaders(unsigned int*,unsigned int*, unsigned int*);
void DrawBall(GLfloat,Vec pos);
void programLoop(SDL_Window *window);

void programLoop(SDL_Window *window)
{
	unsigned int frag,vertex,program;
	loadShaders(&program,&frag,&vertex);
	int continueloop =1;
	Surface heightmap(100,100,0.05);
	InputHandler mouse;
	glPolygonMode(GL_FRONT_AND_BACK,GL_LINE);
	glMatrixMode(GL_PROJECTION);
	gluPerspective(45.0,(GLfloat)WINDOW_WIDTH/(GLfloat)WINDOW_HEIGHT,1.0,700.0);
	glEnable(GL_NORMALIZE);
	ThrowContainer ballList;
	glMatrixMode(GL_MODELVIEW);
    auto loop_end_time = Time::now();
    auto loop_start_time = Time::now();
	while(continueloop)
	{
		continueloop = mouse.handleEvent(&heightmap);
		loop_start_time = loop_end_time;
		loop_end_time = Time::now();
		fsecond delta = (loop_end_time - loop_start_time);
		mouse.movement(delta.count()*256.0f);
		ballList.cullLow();
		ballList.moveObjects(0.05,0.0005,&heightmap);
		switch(continueloop)
		{
			case 2:
				ballList.addToList(mouse.getDirectionVector(),mouse.getPosition());
			break;
			default:
			break;
		}
		glClear(GL_COLOR_BUFFER_BIT);
		glLoadIdentity();
		glUniform3f(glGetUniformLocation(program,"lightpos"),-2.0,2.0,-3.0);
        glUniform3f(glGetUniformLocation(program,"amblight"),0.2,0.2,0.2);
		glUniform3f(glGetUniformLocation(program,"diffuselight"),0.8,0.8,0.8);
		glUniform3f(glGetUniformLocation(program,"speclight"),1.0,1.0,1.0);

		mouse.preRenderTranslate();
		heightmap.calculateSurfaceNormals();
		heightmap.setHeights();
		heightmap.drawSurface(program);
		ballList.drawObjects(0.5);
		glFlush();
		SDL_GL_SwapWindow(window);

	}
	glDetachShader(program,vertex);
	glDetachShader(program,frag);
	glDeleteShader(vertex);
	glDeleteShader(frag);
	glDeleteProgram(program);

}
void loadShaders(unsigned int *program,unsigned int *FragID,unsigned int *VertID)
{
	*FragID = glCreateShader(GL_FRAGMENT_SHADER);
	std::ifstream input("shaders/fragment.frag");
	if(!input.is_open())
	{
		std::cout << "error loading fragment.frag \n";
		return;
	}
	//concat file into 1 string
	std::string shadersource = "";
	char temp[500];
	while(!input.eof())
	{
		input.getline(temp,500);
		shadersource += temp;
		shadersource += '\n';
	}
	const GLchar* fragsource = shadersource.c_str();
	glShaderSource(*FragID,1,&fragsource,NULL);
	glCompileShader(*FragID);
	char status[1500];
	glGetShaderInfoLog(*FragID,1500,NULL,status);
	std::cout << "Fragment Compile Status : \n" << status << std::endl;

	*VertID = glCreateShader(GL_VERTEX_SHADER);
	std::ifstream input2("shaders/vertex.vert");
	if(!input2.is_open())
	{
		std::cout << "error loading vertex.vert \n";
		return;
	}
	shadersource = "";
	while(!input2.eof())
	{
		input2.getline(temp,500);
		shadersource += temp;
		shadersource += '\n';
	}
	const GLchar* vertsource = shadersource.c_str();
	glShaderSource(*VertID,1,&vertsource,NULL);
	glCompileShader(*VertID);
	glGetShaderInfoLog(*VertID,1500,NULL,status);
	std::cout << "Vertex Compile Status : \n" << status << std::endl;

	*program = glCreateProgram();
	glAttachShader(*program,*VertID);
	glAttachShader(*program, *FragID);
	glLinkProgram(*program);
	glUseProgram(*program);
}

int main(int argc, char *argv[])
{
	SDL_Init(SDL_INIT_EVERYTHING);
	CLibraryContainer<SDL_Window*> window(
		SDL_CreateWindow(
			argv[0],
			SDL_WINDOWPOS_UNDEFINED,
			SDL_WINDOWPOS_UNDEFINED,
			WINDOW_WIDTH,
			WINDOW_HEIGHT,
			SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE
		),
		std::function<void(SDL_Window*)>(SDL_DestroyWindow)
	);
	SDL_assert(&window != nullptr);

	CLibraryContainer<SDL_GLContext> gl_context(
		SDL_GL_CreateContext(&window),
		std::function<void(SDL_GLContext)>(SDL_GL_DeleteContext)
	);

	GLenum err = glewInit();

	if(err!= GLEW_OK)
	{
		fprintf(stderr,"Glew error: %s\n",glewGetErrorString(err));
		SDL_assert(err != GLEW_OK);
	}
	programLoop(&window);

	SDL_Quit();
	return 0;
}


text:
import { isWasm, transform } from '../../swc'
import { getLoaderSWCOptions } from '../../swc/options'
import path, { isAbsolute } from 'path'

async function loaderTransform(parentTrace, source, inputSourceMap) {
  // Make the loader async
  const filename = this.resourcePath

  let loaderOptions = this.getOptions() || {}

  const {
    isServer,
    isServerLayer,
    rootDir,
    pagesDir,
    hasReactRefresh,
    nextConfig,
    jsConfig,
    supportedBrowsers,
    swcCacheDir,
    hasServerComponents,
  } = loaderOptions
  const isPageFile = filename.startsWith(pagesDir)
  const relativeFilePathFromRoot = path.relative(rootDir, filename)

  const swcOptions = getLoaderSWCOptions({
    pagesDir,
    filename,
    isServer,
    isServerLayer,
    isPageFile,
    development: this.mode === 'development',
    hasReactRefresh,
    nextConfig,
    jsConfig,
    supportedBrowsers,
    swcCacheDir,
    relativeFilePathFromRoot,
    hasServerComponents,
  })

  const programmaticOptions = {
    ...swcOptions,
    filename,
    inputSourceMap: inputSourceMap ? JSON.stringify(inputSourceMap) : undefined,

    // Set the default sourcemap behavior based on Webpack's mapping flag,
    sourceMaps: this.sourceMap,
    inlineSourcesContent: this.sourceMap,

    // Ensure that Webpack will get a full absolute path in the sourcemap
    // so that it can properly map the module back to its internal cached
    // modules.
    sourceFileName: filename,
  }

  if (!programmaticOptions.inputSourceMap) {
    delete programmaticOptions.inputSourceMap
  }

  // auto detect development mode
  if (
    this.mode &&
    programmaticOptions.jsc &&
    programmaticOptions.jsc.transform &&
    programmaticOptions.jsc.transform.react &&
    !Object.prototype.hasOwnProperty.call(
      programmaticOptions.jsc.transform.react,
      'development'
    )
  ) {
    programmaticOptions.jsc.transform.react.development =
      this.mode === 'development'
  }

  const swcSpan = parentTrace.traceChild('next-swc-transform')
  return swcSpan.traceAsyncFn(() =>
    transform(source, programmaticOptions).then((output) => {
      if (output.eliminatedPackages && this.eliminatedPackages) {
        for (const pkg of JSON.parse(output.eliminatedPackages)) {
          this.eliminatedPackages.add(pkg)
        }
      }
      return [output.code, output.map ? JSON.parse(output.map) : undefined]
    })
  )
}

const EXCLUDED_PATHS =
  /[\\/](cache[\\/][^\\/]+\.zip[\\/]node_modules|__virtual__)[\\/]/g

export function pitch() {
  const callback = this.async()
  ;(async () => {
    let loaderOptions = this.getOptions() || {}
    if (
      // TODO: investigate swc file reading in PnP mode?
      !process.versions.pnp &&
      loaderOptions.fileReading &&
      !EXCLUDED_PATHS.test(this.resourcePath) &&
      this.loaders.length - 1 === this.loaderIndex &&
      isAbsolute(this.resourcePath) &&
      !(await isWasm())
    ) {
      const loaderSpan = this.currentTraceSpan.traceChild('next-swc-loader')
      this.addDependency(this.resourcePath)
      return loaderSpan.traceAsyncFn(() =>
        loaderTransform.call(this, loaderSpan)
      )
    }
  })().then((r) => {
    if (r) return callback(null, ...r)
    callback()
  }, callback)
}

export default function swcLoader(inputSource, inputSourceMap) {
  const loaderSpan = this.currentTraceSpan.traceChild('next-swc-loader')
  const callback = this.async()
  loaderSpan
    .traceAsyncFn(() =>
      loaderTransform.call(this, loaderSpan, inputSource, inputSourceMap)
    )
    .then(
      ([transformedSource, outputSourceMap]) => {
        callback(null, transformedSource, outputSourceMap || inputSourceMap)
      },
      (err) => {
        callback(err)
      }
    )
}

// accept Buffers instead of strings
export const raw = true


text:
class Station
  attr_accessor :trains
  attr_reader :name

  def initialize(name)
    @name = name
    @trains = []
  end

  def add_train(train)
    if !trains.include? train
      self.trains << train
    end
  end

  def leave(train)
    self.trains.delete(train)
  end

  def show_all_trains
    self.trains.each {|item| puts item}
  end

  def show_trains_by_kind(kind)
    puts "List of \"#{kind}\" trains on #{name} station:"
    trains.each {|item| puts " - #{item.number }" if item.kind == kind }
  end

end


text:
cask :v1 => 'voodoopad' do
  version :latest
  sha256 :no_check

  url 'https://plausible.coop/static/download/VoodooPad.zip'
  name 'VoodooPad'
  homepage 'https://plausible.coop/voodoopad/'
  license :commercial

  app 'VoodooPad.app'
end


text:
#include <linux/clk.h>
#include <linux/compiler.h>
#include <linux/slab.h>
#include <linux/io.h>
#include <linux/clkdev.h>
#include <asm/clock.h>

static struct clk master_clk = {
	.flags		= CLK_ENABLE_ON_INIT,
	.rate		= CONFIG_SH_PCLK_FREQ,
};

static struct clk peripheral_clk = {
	.parent		= &master_clk,
	.flags		= CLK_ENABLE_ON_INIT,
};

static struct clk bus_clk = {
	.parent		= &master_clk,
	.flags		= CLK_ENABLE_ON_INIT,
};

static struct clk cpu_clk = {
	.parent		= &master_clk,
	.flags		= CLK_ENABLE_ON_INIT,
};

/*
 * The ordering of these clocks matters, do not change it.
 */
static struct clk *onchip_clocks[] = {
	&master_clk,
	&peripheral_clk,
	&bus_clk,
	&cpu_clk,
};

static struct clk_lookup lookups[] = {
	/* main clocks */
	CLKDEV_CON_ID("master_clk", &master_clk),
	CLKDEV_CON_ID("peripheral_clk", &peripheral_clk),
	CLKDEV_CON_ID("bus_clk", &bus_clk),
	CLKDEV_CON_ID("cpu_clk", &cpu_clk),
};

int __init __deprecated cpg_clk_init(void)
{
	int i, ret = 0;

	for (i = 0; i < ARRAY_SIZE(onchip_clocks); i++) {
		struct clk *clk = onchip_clocks[i];
		arch_init_clk_ops(&clk->ops, i);
		if (clk->ops)
			ret |= clk_register(clk);
	}

	clkdev_add_table(lookups, ARRAY_SIZE(lookups));

	clk_add_alias("tmu_fck", NULL, "peripheral_clk", NULL);
	clk_add_alias("mtu2_fck", NULL, "peripheral_clk", NULL);
	clk_add_alias("cmt_fck", NULL, "peripheral_clk", NULL);
	clk_add_alias("sci_ick", NULL, "peripheral_clk", NULL);

	return ret;
}

/*
 * Placeholder for compatibility, until the lazy CPUs do this
 * on their own.
 */
int __init __weak arch_clk_init(void)
{
	return cpg_clk_init();
}