text:
[![](https://images.microbadger.com/badges/version/ymedlop/npm-cache-resource.svg)](https://microbadger.com/images/ymedlop/npm-cache-resource "Get your own version badge on microbadger.com") [![](https://images.microbadger.com/badges/image/ymedlop/npm-cache-resource.svg)](https://microbadger.com/images/ymedlop/npm-cache-resource "Get your own image badge on microbadger.com") [![](https://images.microbadger.com/badges/commit/ymedlop/npm-cache-resource.svg)](https://microbadger.com/images/ymedlop/npm-cache-resource "Get your own commit badge on microbadger.com") [![](https://images.microbadger.com/badges/license/ymedlop/npm-cache-resource.svg)](https://microbadger.com/images/ymedlop/npm-cache-resource "Get your own license badge on microbadger.com")
[![](https://img.shields.io/docker/pulls/ymedlop/npm-cache-resource.svg)](https://img.shields.io/docker/pulls/ymedlop/npm-cache-resource.svg)

npm-cache-resource
==================

a Concourse resource for caching dependencies downloaded by NPM - built on [mhart/alpine-node](https://hub.docker.com/r/mhart/alpine-node) and [git-resource](https://github.com/concourse/git-resource).

[![EXAMPLE PIPELINE](https://raw.githubusercontent.com/ymedlop-sandbox/npm-cache-resource/gh-pages/images/example-pipeline.png)](https://raw.githubusercontent.com/ymedlop-sandbox/npm-cache-resource/gh-pages/images/example-pipeline.png)

Versions
--------

|  Tag | From  | Bower  |  Yarn | Maintained |
|---|---|---|---|---|
|  [latest](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/master/Dockerfile) | [mhart/alpine-node:latest](https://github.com/mhart/alpine-node)  | Yes | Yes | Yes |
|  [15](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v15/Dockerfile) | [mhart/alpine-node:15](https://github.com/mhart/alpine-node)  | Yes  |  Yes | Yes |
|  [14](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v14/Dockerfile) | [mhart/alpine-node:14](https://github.com/mhart/alpine-node)  | Yes  |  Yes | Yes |
|  [12](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v12/Dockerfile) | [mhart/alpine-node:12](https://github.com/mhart/alpine-node)  | Yes  |  Yes | Yes |
|  [10](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v10/Dockerfile) | [mhart/alpine-node:10](https://github.com/mhart/alpine-node)  | Yes  |  Yes | Yes |
|  [9](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v9/Dockerfile) | [mhart/alpine-node:9](https://github.com/mhart/alpine-node)  | No  |  Yes | No |
|  [8](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v8/Dockerfile) | [mhart/alpine-node:8](https://github.com/mhart/alpine-node)  | No  |  Yes | No |
|  [7](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v7/Dockerfile) | [mhart/alpine-node:7](https://github.com/mhart/alpine-node)  | No  |  No | No |
|  [6](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v6/Dockerfile) | [mhart/alpine-node:6](https://github.com/mhart/alpine-node)  | No  |  No | No |
|  [4](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v4/Dockerfile) | [mhart/alpine-node:4](https://github.com/mhart/alpine-node)  | No  |  No | No |
|  [0.12](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v0.12/Dockerfile) | [mhart/alpine-node:0.12](https://github.com/mhart/alpine-node)  | No  |  No | No |
|  [0.10](https://github.com/ymedlop-sandbox/npm-cache-resource/blob/alpine-node-v0.10/Dockerfile) | [mhart/alpine-node:0.10](https://github.com/mhart/alpine-node)  | No  |  No | No |

Resource Configuration
----------------------

```
resource_types:

  - name: npm-cache
    type: docker-image
    source: {repository: ymedlop/npm-cache-resource, tag: "12"}
```

Source Configuration
--------------------

* `<<:`: *Required.* The source is the same as the corresponding git resource

### Configuration to access a Git Private Repo

#### SSH:

* `private_key`: *Required.* Private key.

#### HTTP(S):

* `username_key`: *Required.* Username for HTTP(S) auth. This is needed when only HTTP/HTTPS protocol for git is available (which does not support private key auth) and auth is required.
* `password_key`: *Required.* Password for HTTP(S) auth.
* `skip_ssl_verification`: *Optional.* Skips git ssl verification by exporting GIT_SSL_NO_VERIFY=true.

### Configuration to access a NPM Registry or Private Registry by User and Password.

* `registry-url`: *Optional.* Private NPM registry to log in to (Default: https://registry.npmjs.org)
* `registry-user`: *Required.* Registry Username.
* `registry-pass`:  *Required.* Registry User Password.
* `registry-email`: *Required.* Registry User Email.
* `registry-scope`: *Optional.* Registry Scope.

### Configuration to access a Private Registry by Base64 Token

* `registry`: *Required.* The location our private npm registry.
* `token`: *Required.* Our npm token.

# Node.js Environment variables
* `node-env`: Set NODE_ENV. (Default: development)

### Configuration for projects living in subdirectories
* `project-path`: *Optional* Relative path of subdirectory containing the project (i.e. where the `package.json` is).

### Configuration use for npm
* `npm-args`: *Optional* Allow to add extra args to npm i / npm ci command. (Default: "-q")

### Configuration use npm ci command
* `npm-ci-support`: *Optional* Allow to use npm ci instead of npm install to install the npm modules into our resource. (Default: false)

### Configuration use yarn cli
* `yarn-support`: *Optional* Allow to use yarn to install the npm modules into our resource. (Default: false)
* `yarn-args`: *Optional* Allow to add extra args to yarn install command. (Default: "")

### Configuration use bower cli
* `bower-support`: *Optional* Allow to use bower to install packages into our resource (Bower dependency has to be in our package.json). (Default: false)
* `bower-args`: *Optional* Allow to add extra args to bower install command. (Default: "-q --allow-root")

```
Whatever tool you use to generate the encoded username and password string, try to encode the string admin:admin123, which should result in YWRtaW46YWRtaW4xMjM=. `
Another example for a valid setup is jane:testpassword123 resulting in amFuZTp0ZXN0cGFzc3dvcmQxMjM=.

In our demo we are using admin:123456 resulting in YWRtaW46MTIzNDU2
```

### Example

```
resources:

  # a perfectly normal source repository with lashings and lashings of dependencies
  - name: repo
    type: git
    source: &repo-source # apply a YAML anchor so we can refer to this in the cache resource
      uri: https://github.com/ymedlop/npm-cache-resource.git
      branch: npm-package-example

  # a resource caching the dependencies listed in the source repository
  - name: npm-repo-cache
    type: npm-cache # as defined above
    source:
      <<: *repo-source # the source is the same as the corresponding git resource ...
      paths: # ... except that it's only interested in files listing dependencies
        - package.json

```

## Behavior

### `check`: Check for new commits

The repository is cloned (or pulled if already present), and any commits from the given version on are returned. If no version is given, the ref for HEAD is returned.

Any commits that contain the string [ci skip] will be ignored. This allows you to commit to your repository without triggering a new version.

### `in`: Pulls a package from npm

Clones the repository to the destination, and locks it down to a given ref. It will return the same given ref as version. And fetch npm package from the package.json`.

#### Examples

```
jobs:

  - name: cache
    plan:

      - get: repo
        trigger: true

      - get: npm-repo-cache

  - name: test
    plan:

      - get: repo
        trigger: true
        passed: [cache]

      - get: npm-repo-cache
        passed: [cache]

      - task: run tests
        config:

          platform: linux
          image_resource:
            type: docker-image
            source: {repository: mhart/alpine-node, tag: "12"}

          inputs:
            - name: repo
              path: /src
            - name: npm-repo-cache
              path: /cache

          run:
            path: sh
            args:
              - -exc
              - |
                mv cache/node_modules src
                cd src && npm test

  - name: build
    plan:

      - get: repo
        trigger: true
        passed: [cache]

      - get: npm-repo-cache
        passed: [cache]

      - task: run build
        config:

          platform: linux
          image_resource:
            type: docker-image
            source: {repository: mhart/alpine-node, tag: "12"}

          inputs:
            - name: repo
              path: /src
            - name: npm-repo-cache
              path: /cache

          run:
            path: sh
            args:
              - -exc
              - |
                mv cache/node_modules src
                cd src && npm run build
```

### `out`: Nothing to do here....

Getting Started
---------------

You can see more examples [here](https://github.com/ymedlop-sandbox/npm-cache-resource/tree/examples).

Credits:
========

* [concourse git resource](https://github.com/concourse/git-resource)
* [projectfalcon/gradle-cache-resource](https://github.com/projectfalcon/gradle-cache-resource) We are following this resource to create our npm cache resource.

License
-------

See the [LICENSE file](LICENSE) for license text and copyright information.


text:
package com.marklogic.client.query;

/**
 * @deprecated Use {@link RawQueryByExampleDefinition Query By Example} instead for easy-to-write and much more full-featured key/value search.
 *

 *
 * A Key Locator specifies a JSON key containing a value as part
 * of a KeyValueQueryDefinition.
 */
@Deprecated
public interface KeyLocator extends ValueLocator {
    /**
     * Returns a JSON key.
     * @return	the JSON key
     */
	public String getKey();
	/**
	 * Specifies the JSON key.
	 * @param key	the JSON key
	 */
    public void setKey(String key);
}

redpajama_set_name: RedPajamaGithub


text:
package com.steve.creact.processor.app.model;

/**
 * Created by Administrator on 2016/4/9.
 */
public class BeanInfo {

    public String holderName = "";
    public String holderPackage = "";
    public String dataName = "";
    public String dataPackage = "";
    public String dataBeanName = "";
    public String dataBeanPackage = "";
    public int layoutId;

    //until methods
    public String dataClassName() {
        return dataPackage + "." + dataName;
    }

    public String holderClassName() {
        return holderPackage + "." + holderName;
    }

    public String beanClassName() {
        return dataBeanPackage + "." + dataBeanName;
    }

    @Override
    public String toString() {
        return "BeanInfo{" +
                "holderName='" + holderName + '\'' +
                ", holderPackage='" + holderPackage + '\'' +
                ", dataName='" + dataName + '\'' +
                ", dataPackage='" + dataPackage + '\'' +
                ", dataBeanName='" + dataBeanName + '\'' +
                ", dataBeanPackage='" + dataBeanPackage + '\'' +
                ", layoutId=" + layoutId +
                '}';
    }
}


text:
layout: page
title: "Kimberly Alaine Drennan"
comments: true
description: "blanks"
keywords: "Kimberly Alaine Drennan,CU,Boulder"
---
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
<script src="https://dl.dropboxusercontent.com/s/pc42nxpaw1ea4o9/highcharts.js?dl=0"></script>
<!-- <script src="../assets/js/highcharts.js"></script> -->
<style type="text/css">@font-face {
	font-family: "Bebas Neue";
	src: url(https://www.filehosting.org/file/details/544349/BebasNeue Regular.otf) format("opentype");
	}
	h1.Bebas {
		font-family: "Bebas Neue", Verdana, Tahoma;
	}
</style>
</head>

#### TEACHING INFORMATION

**College**: College of Architecture and Planning, Program in Environmental Design

**Classes taught**: ENVD 1052, ENVD 1102, ENVD 2120, ENVD 2130, ENVD 3100, ENVD 3300, ENVD 4100

#### ENVD 1052: Design and Communication 1

**Terms taught**: Fall 2015, Fall 2016

**Instructor rating**: 5.94

**Standard deviation in instructor rating**: 0.06

**Average grade** (4.0 scale): 3.55

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 4.42

**Standard deviation in workload** (raw): 0.42

#### ENVD 1102: Design and Communication 2

**Terms taught**: Spring 2013, Spring 2015, Spring 2016, Spring 2016, Spring 2017

**Instructor rating**: 5.54

**Standard deviation in instructor rating**: 0.46

**Average grade** (4.0 scale): 3.39

**Standard deviation in grades** (4.0 scale): 0.13

**Average workload** (raw): 5.47

**Standard deviation in workload** (raw): 0.47

#### ENVD 2120: Environmental Design Studio 1

**Terms taught**: Fall 2013, Fall 2014, Fall 2014, Fall 2015, Fall 2015, Fall 2016, Fall 2016, Fall 2016, Fall 2016

**Instructor rating**: 5.52

**Standard deviation in instructor rating**: 0.42

**Average grade** (4.0 scale): 3.51

**Standard deviation in grades** (4.0 scale): 0.06

**Average workload** (raw): 5.79

**Standard deviation in workload** (raw): 0.23

#### ENVD 2130: Environmental Design Studio 2

**Terms taught**: Spring 2014, Spring 2014, Spring 2015, Spring 2015

**Instructor rating**: 5.8

**Standard deviation in instructor rating**: 0.14

**Average grade** (4.0 scale): 3.45

**Standard deviation in grades** (4.0 scale): 0.03

**Average workload** (raw): 5.25

**Standard deviation in workload** (raw): 0.25

#### ENVD 3100: ENVD Studio--Architectural Design

**Terms taught**: Fall 2012, Fall 2012

**Instructor rating**: 5.82

**Standard deviation in instructor rating**: 0.18

**Average grade** (4.0 scale): 3.3

**Standard deviation in grades** (4.0 scale): 0.17

**Average workload** (raw): 5.69

**Standard deviation in workload** (raw): 0.14

#### ENVD 3300: Special Topics: Intermediate Design Lab

**Terms taught**: Spring 2017

**Instructor rating**: 5.4

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.43

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 4.5

**Standard deviation in workload** (raw): 0.0

#### ENVD 4100: Advanced Design Lab 1

**Terms taught**: Fall 2013

**Instructor rating**: 5.4

**Standard deviation in instructor rating**: 0.0

**Average grade** (4.0 scale): 3.34

**Standard deviation in grades** (4.0 scale): 0.0

**Average workload** (raw): 5.5

**Standard deviation in workload** (raw): 0.0


text:
Imports Aspose.Email.Mime
Imports Aspose.Email.Pop3

Namespace Aspose.Email.Examples.VisualBasic.Email.POP3
	Class RetrievingEmailHeaders
		Public Shared Sub Run()
			' ExStart:RetrievingEmailHeaders
			' Create an instance of the Pop3Client class
			Dim client As New Pop3Client()

			' Specify host, username. password, Port and SecurityOptions for your client
			client.Host = "pop.gmail.com"
			client.Username = "your.username@gmail.com"
			client.Password = "your.password"
			client.Port = 995
			client.SecurityOptions = SecurityOptions.Auto
			Try
				Dim headers As HeaderCollection = client.GetMessageHeaders(1)
				For i As Integer = 0 To headers.Count - 1
					' Display key and value in the header collection
					Console.Write(headers.Keys(i))
					Console.Write(" : ")
					Console.WriteLine(headers.[Get](i))
				Next
			Catch ex As Exception
				Console.WriteLine(ex.Message)
			Finally
				client.Dispose()
			End Try
			' ExEnd:RetrievingEmailHeaders
			Console.WriteLine(Environment.NewLine + "Displayed header information from emails using POP3 ")
		End Sub
	End Class
End Namespace


text:
<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender" scan="true" scanPeriod="5 seconds">
        <encoder>
            <pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
        </encoder>
    </appender>

    <!-- silence a few noisy loggers -->
    <logger name="org.apache.catalina" level="WARN"/>
    <logger name="org.apache.tomcat" level="WARN"/>
    <logger name="org.apache.http" level="WARN"/>
    <logger name="org.hibernate" level="WARN"/>
    <logger name="org.springframework" level="WARN"/>
    <logger name="com.gbr.nyan.web.support.FullRequestLogFilter" level="WARN"/>

    <logger name="org.springframework.security" level="INFO"/>

    <root level="INFO">
        <appender-ref ref="STDOUT"/>
    </root>
</configuration>


text:
package v2

import (
	"testing"

	"github.com/gophercloud/gophercloud/acceptance/clients"
	"github.com/gophercloud/gophercloud/acceptance/tools"
	"github.com/gophercloud/gophercloud/openstack/dns/v2/recordsets"
	"github.com/gophercloud/gophercloud/pagination"
	th "github.com/gophercloud/gophercloud/testhelper"
)

func TestRecordSetsListByZone(t *testing.T) {
	clients.RequireDNS(t)

	client, err := clients.NewDNSV2Client()
	th.AssertNoErr(t, err)

	zone, err := CreateZone(t, client)
	th.AssertNoErr(t, err)
	defer DeleteZone(t, client, zone)

	allPages, err := recordsets.ListByZone(client, zone.ID, nil).AllPages()
	th.AssertNoErr(t, err)

	allRecordSets, err := recordsets.ExtractRecordSets(allPages)
	th.AssertNoErr(t, err)

	var found bool
	for _, recordset := range allRecordSets {
		tools.PrintResource(t, &recordset)

		if recordset.ZoneID == zone.ID {
			found = true
		}
	}

	th.AssertEquals(t, found, true)

	listOpts := recordsets.ListOpts{
		Limit: 1,
	}

	err = recordsets.ListByZone(client, zone.ID, listOpts).EachPage(
		func(page pagination.Page) (bool, error) {
			rr, err := recordsets.ExtractRecordSets(page)
			th.AssertNoErr(t, err)
			th.AssertEquals(t, len(rr), 1)
			return true, nil
		},
	)
	th.AssertNoErr(t, err)
}

func TestRecordSetsCRUD(t *testing.T) {
	clients.RequireDNS(t)

	client, err := clients.NewDNSV2Client()
	th.AssertNoErr(t, err)

	zone, err := CreateZone(t, client)
	th.AssertNoErr(t, err)
	defer DeleteZone(t, client, zone)

	tools.PrintResource(t, &zone)

	rs, err := CreateRecordSet(t, client, zone)
	th.AssertNoErr(t, err)
	defer DeleteRecordSet(t, client, rs)

	tools.PrintResource(t, &rs)

	description := ""
	updateOpts := recordsets.UpdateOpts{
		Description: &description,
	}

	newRS, err := recordsets.Update(client, rs.ZoneID, rs.ID, updateOpts).Extract()
	th.AssertNoErr(t, err)

	tools.PrintResource(t, &newRS)

	th.AssertEquals(t, newRS.Description, description)

	records := []string{"10.1.0.3"}
	updateOpts = recordsets.UpdateOpts{
		Records: records,
	}

	newRS, err = recordsets.Update(client, rs.ZoneID, rs.ID, updateOpts).Extract()
	th.AssertNoErr(t, err)

	tools.PrintResource(t, &newRS)

	th.AssertDeepEquals(t, newRS.Records, records)
	th.AssertEquals(t, newRS.TTL, 3600)

	ttl := 0
	updateOpts = recordsets.UpdateOpts{
		TTL: &ttl,
	}

	newRS, err = recordsets.Update(client, rs.ZoneID, rs.ID, updateOpts).Extract()
	th.AssertNoErr(t, err)

	tools.PrintResource(t, &newRS)

	th.AssertDeepEquals(t, newRS.Records, records)
	th.AssertEquals(t, newRS.TTL, ttl)
}


text:
layout: post
title: "XNA Oyunu / Çanakkale Geçilmez – 2"
date: 2011-06-27 08:45
author: engin.polat
comments: true
category: [XNA]
tags: [const, contains, content, Content.Load, cos, CreateInstance, draw, graphicsdevice, iskeydown, iskeyup, Keyboard.GetState, keyboardstate, lerp, loadcontent, math, mathhelper, nextdouble, position, random, rectangle, Rotation, sin, SoundEffect, spritebatch, spriteblendmode, spriteeffects, texture2d, unloadcontent, vector2, velocity, XNA, xna game studio]
---
XNA ile Oyun Programlama serimize, daha önce başlayıp tamamlamadığımız Çanakkale Geçilmez oyununu tamamlayarak devam ediyoruz.

Bu yazıyı okumadan önce **XNA** konusunda diğer makaleler için XNA kategorisine bir göz atmanızı tavsiye ederim.

Düşman gemilerine yaptığımız atış miktarını ve isabet adedini tutacağımız iki değişkeni sınıf seviyesinde tanımlayalım;

int SKOR_ATIS = 0;
int SKOR_PUAN = 0;

Oyuna, *düşman gemileri* ve düşman gemilerine atacağımız *gülleler* eklemek için, sınıf seviyesinde *GameObject* sınıfında diziler oluşturacağız;

public GameObject[] Gemiler;
public GameObject[] Gulleler;

Ayrıca, düşman gemilerine ve onlara atacağımız güllelere sınırlama getirmek için iki sabiti (**const**) sınıf seviyesinde tanımlıyoruz;

public const int DUSMAN_ADET = 3;
public const int GULLE_ADET = 6;

Bu sayede, oyunun zorluk derecesini değiştirebilmek için iki alanımız oluyor; aynı anda savaşacağımız **düşman gemisi adedi** ve onlara atabileceğimiz **gülle adedi**. Aynı anda attığımız güllelerden bir tanesi hedefi bulmadan veya ekran dışına çıkmadan yeni gülle atamıyoruz.

Bu oyunda, düşman gemisi adedini 3 olarak, onlara aynı anda atabileceğimiz gülle adedini de 6 olarak belirledik.

**LoadContent()** methodunda bu değişkenlere başlangıç değerlerini atamalıyız;

Gemiler = new GameObject[DUSMAN_ADET];
for (int iLoop = 0; iLoop < DUSMAN_ADET; iLoop++)
{
    Gemiler[iLoop] = new GameObject(Content.Load<Texture2D>("DusmanGemi"));
}

Gulleler = new GameObject[GULLE_ADET];
for (int iLoop = 0; iLoop < GULLE_ADET; iLoop++)
{
    Gulleler[iLoop] = new GameObject(Content.Load<Texture2D>("Gulle"));
}

**Update()** method'unda *boşluk* tuşuna (*Space*) basılınca gülle atılmasını sağlayacak methodu çağıracak kodu ekliyoruz;

if (pks.IsKeyDown(Keys.Space) && ks.IsKeyUp(Keys.Space))
    GulleAtesle();

**GulleAtesle()** method'unda 6 gülle'nin herbirine tek tek bakarak, ekranda olmayan var mı kontrol ediyoruz.

Eğer o anda ekranda olmayan bir gülle bulursak (*IsAlive* özelliğinin **false** değer içermesinden) düşman gemisine doğru fırlatıyoruz.

Fırlatma işlemini yaparken güllenin fırlatma anındaki yeri ve fırlatma güzergahına dikkat etmeliyiz.

Güllenin **Position** özelliğine Top'umuzun *X* ve *Y* eksenindeki yerini veriyoruz, böylece, gülle tam olarak top'umuzun ucundan fırlatılacak.

**Velocity** özelliği ile güllenin güzergahını belirliyoruz; Top'umuzun baktığı açının *sinus*'unu ve *kosinus*'unu alarak, *hız sabiti* olan 5 değeri ile çarpıyoruz.

*Not : Top'umuz ekranın altında, gemiler üstünde olduğu için Y eksenindeki hız sabitini -1 ile çarpıp, -5 değerini elde ediyoruz.*

Ayrıca, *SKOR_ATIS* değişkeninin değerini de bir yükseltiyoruz.

private void GulleAtesle()
{
    foreach (GameObject Gulle in Gulleler)
    {
        if (!Gulle.IsAlive)
        {
            SKOR_ATIS++;
            Gulle.IsAlive = true;
            Gulle.Position = new Vector2(Top.Position.X - Gulle.Center.X, Top.Position.Y);
            Gulle.Velocity = new Vector2((float)Math.Sin(Top.Rotation) * 5, (float)Math.Cos(Top.Rotation) * -5);
            break;
        }
    }
}

Böylece, her *boşluk* (*Space*) tuşuna basıldığında 6 gülleden birisi topumuzun ucundan düşman gemisine doğru gönderilecektir. Eğer o anda ekranda 6 gülle varsa, gülle gönderilmeyecektir.

**Update()** method'unda, düşman gemilerini de yönetiyoruz;

foreach (GameObject Gemi in Gemiler)
{
    if (Gemi.IsAlive)
    {
        Gemi.Position += Gemi.Velocity;

        if (Gemi.Position.X < 0)
            Gemi.IsAlive = false;
    }
    else
    {
        Gemi.IsAlive = true;
        Gemi.Position = new Vector2(PENCERE_GENISLIK, MathHelper.Lerp(0, (float)(PENCERE_YUKSEKLIK * 0.6), (float)Rastgele.NextDouble()));
        Gemi.Velocity = new Vector2(MathHelper.Lerp(-2, -4, (float)Rastgele.NextDouble()), 0);
    }
}

Tüm düşman gemileri (*DUSMAN_ADET* sabitinden dolayı 3 adet) içerisinde dönen bir *foreach* döngüsü ile ilgili düşman gemisinin o anda hayatta olup/olmadığına bakıyoruz;

Eğer hayatta ise; gemi'nin yerini, gidiş yönünde hızı kadar ilerletiyoruz. Eğer gemi'nin yeni yeri pencere dışında ise, bir sonraki ekran güncellemesinde gemi'yi tekrar kullanabilmek için öldürüyoruz.

Eğer hayatta değilse; Gemi'yi ekrana çıkartabilmek için hayatta durumuna getiriyoruz, rastgele bir yer ve hız veriyoruz.

Rastgele yer belirlerken, pencerenin en üstünden itibaren %60'lık kısmını kullanıyoruz.

Rastgele hız belirlerken, MathHelper sınıfının Lerp() methodundan faydalanıyoruz.

**Lerp()** method'u, 3 parametre alır;

*   Değer 1 *(Kaynak değer)*
*   Değer 2 *(Kaynak değer)*
*   Büyüklük *(0 ile 1 arası değer, Değer 2'nin ağırlığı)*

Büyüklük parametresine *0* değer vermek, Değer 1'i, *1* değer vermek, Değer 2'yi döndürür.

Biz bu örnek'te düşman gemilerinin ekranın sağında belirmesi ve ekranın soluna doğru ilerlemesi için, *-2* ve *-4* arası hız'a sahip olmalarını sağladık.

**Update()** method'unda, ekrandaki gülleleri de yönetiyoruz;

foreach (GameObject Gulle in Gulleler)
{
    if (Gulle.IsAlive)
    {
        Gulle.Position += Gulle.Velocity;
        if (!Pencere.Contains(Gulle.TextureRectangle))
            Gulle.IsAlive = false;

        foreach (GameObject Gemi in Gemiler)
        {
            if (Gemi.TextureRectangle.Contains(Gulle.TextureRectangle))
            {
                SKOR_PUAN++;
                GemiVurulduSes.Play();
                Gemi.IsAlive = false;
                Gulle.IsAlive = false;
                break;
            }
        }
    }
}

Sadece hayatta olan güllelere teker teker bakıyoruz; (*GULLE_ADET* sabitinden dolayı en fazla 6 adet)

Gülle'nin yerini, hızı ve doğrultusu kadar ilerletiyoruz. Eğer pencere dışına çıktı ise, gülle'yi öldürüyoruz.

Hayatta olan her gülle için, hayatta olan her gemi ile çarpışma testi yapıyoruz. Eğer ilgili gülle gemi'lerden bir tanesi ile çarpışıyorsa, gülle'yi ve gemi'yi öldürüp, *SKOR_PUAN* değişkenini bir yükseltiyoruz.

**Draw()** method'unda, Arkaplan, Top, hayatta olan gemiler ve hayatta olan gülleleri ekrana çizdiriyoruz;

GraphicsDevice.Clear(Color.CornflowerBlue);

spriteBatch.Begin(SpriteBlendMode.AlphaBlend);

spriteBatch.Draw(Arkaplan, Pencere, Color.White);

spriteBatch.Draw(Top.Texture, Top.Position, null, Color.White, Top.Rotation, Top.Center, 1, SpriteEffects.None, 0);

foreach (GameObject Gemi in Gemiler)
{
    if (Gemi.IsAlive)
    {
        spriteBatch.Draw(Gemi.Texture, Gemi.Position, Color.White);
    }
}

foreach (GameObject Gulle in Gulleler)
{
    if (Gulle.IsAlive)
    {
        spriteBatch.Draw(Gulle.Texture, Gulle.Position, Color.White);
    }
}

Skor tablosunu çizdirebilmek için, sınıf seviyesinde iki yeni değişken eklememiz lazım;

Texture2D Karakterler;
Texture2D Sayilar;

**LoadContent()** method'unda bu değişkenlere değer atıyoruz;

Karakterler = Content.Load<texture2d>("Karakterler");
Sayilar = Content.Load</texture2d><texture2d>("Sayilar");</texture2d>

*Karakterler* imajı'nın (0, 0) noktasından itibaren (113, 25) büyüklüğündeki alanı arasında kalan kısmı ekrana çizdirmek için, *Draw()* method'una;

spriteBatch.Draw(Karakterler, new Vector2((float)(PENCERE_GENISLIK * 0.05), (float)(PENCERE_YUKSEKLIK * 0.90)), new Rectangle(0, 0, 113, 25), Color.White);

*Karakterler* imajı'nın (0, 25) noktasından itibaren (113, 25) büyüklüğündeki alanı arasında kalan kısmı ekrana çizdirmek için, *Draw()* method'una;

spriteBatch.Draw(Karakterler, new Vector2((float)(PENCERE_GENISLIK * 0.75), (float)(PENCERE_YUKSEKLIK * 0.90)), new Rectangle(0, 25, 113, 25), Color.White);

Atış adedimizi ve Skor adedimizi ekrana çizdirmek için gerekli method çağrılarını (**DrawAtis()**, **DrawSkor()**) **Draw()** method'unda yapıyoruz.

private void DrawAtis()
{
    string Atis = SKOR_ATIS.ToString();
    for (int iLoop = 0; iLoop < Atis.Length; iLoop++)
    {
        int Rakam = Convert.ToInt32(Atis.Substring(iLoop, 1));
        spriteBatch.Draw(Sayilar, new Vector2((float)(PENCERE_GENISLIK * 0.05) + (23 * iLoop) + 120, (float)(PENCERE_YUKSEKLIK * 0.90)), new Rectangle(Rakam * 23, 0, 23, 25), Color.White);
    }
}

private void DrawSkor()
{
    string Atis = SKOR_PUAN.ToString();
    for (int iLoop = 0; iLoop < Atis.Length; iLoop++)
    {
        int Rakam = Convert.ToInt32(Atis.Substring(iLoop, 1));
        spriteBatch.Draw(Sayilar, new Vector2((float)(PENCERE_GENISLIK * 0.75) + (23 * iLoop) + 120, (float)(PENCERE_YUKSEKLIK * 0.90)), new Rectangle(Rakam * 23, 0, 23, 25), Color.White);
    }
}

Böylece, oyunumuzun kodlamasını bitirmiş olduk.

![XNA ile Oyun Programlama - Çanakkale Geçilmez Oyunu](/assets/uploads/2011/06/CanakkaleGecilmez.jpg "XNA ile Oyun Programlama - Çanakkale Geçilmez Oyunu")

Oyunu tüm kodlarını buradan indirebilirsiniz.


text:
import { BookDetailsComponent } from './book-details/book-details.component';
import { BookDashboardComponent } from './book-dashboard/book-dashboard.component';
import { RouterModule, Route } from '@angular/router';
import { NgModule } from '@angular/core';

export { RouterModule } from '@angular/router';

const routes: Route[] = [
  { path: '', component: BookDashboardComponent, pathMatch: 'full' },
  { path: 'details/:isbn', component: BookDetailsComponent },
];

@NgModule({
  imports: [ RouterModule.forChild(routes) ]
})
export class BookRoutingModule { }


text:
<?xml version="1.0"?>

<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
    <referenceBlock name="product.info.form.options">
        <block class="FME\Pricecalculator\Block\Product\Pricecalculator" name="fme.pricecalculator" template="FME_Pricecalculator::pricecalculator.phtml" after="-"/>
    </referenceBlock>
</page>


text:
// Copyright (c) Tunnel Vision Laboratories, LLC. All Rights Reserved.
// Licensed under the MIT License. See LICENSE in the project root for license information.

namespace StyleCop.Analyzers.Settings.ObjectModel
{
    /// <summary>
    /// Specifies the desired placement of using directives.
    /// </summary>
    internal enum UsingDirectivesPlacement
    {
        /// <summary>
        /// Place using directives inside the namespace definition.
        /// </summary>
        InsideNamespace,

        /// <summary>
        /// Place using directives outside the namespace definition.
        /// </summary>
        OutsideNamespace,

        /// <summary>
        /// Allow using directives inside or outside the namespace definition.
        /// </summary>
        Preserve,
    }
}


text:
package shrink

import (
	gobytes "bytes"
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"net/url"
	"strings"

	"github.com/elastic/elastic-transport-go/v8/elastictransport"
)

const (
	indexMask = iota + 1

	targetMask
)

// ErrBuildPath is returned in case of missing parameters within the build of the request.
var ErrBuildPath = errors.New("cannot build path, check for missing path parameters")

type Shrink struct {
	transport elastictransport.Interface

	headers http.Header
	values  url.Values
	path    url.URL

	buf *gobytes.Buffer

	req *Request
	raw json.RawMessage

	paramSet int

	index  string
	target string
}

// NewShrink type alias for index.
type NewShrink func(index, target string) *Shrink

// NewShrinkFunc returns a new instance of Shrink with the provided transport.
// Used in the index of the library this allows to retrieve every apis in once place.
func NewShrinkFunc(tp elastictransport.Interface) NewShrink {
	return func(index, target string) *Shrink {
		n := New(tp)

		n.Index(index)

		n.Target(target)

		return n
	}
}

// Allow to shrink an existing index into a new index with fewer primary shards.
//
// https://www.elastic.co/guide/en/elasticsearch/reference/master/indices-shrink-index.html
func New(tp elastictransport.Interface) *Shrink {
	r := &Shrink{
		transport: tp,
		values:    make(url.Values),
		headers:   make(http.Header),
		buf:       gobytes.NewBuffer(nil),
	}

	return r
}

// Raw takes a json payload as input which is then passed to the http.Request
// If specified Raw takes precedence on Request method.
func (r *Shrink) Raw(raw json.RawMessage) *Shrink {
	r.raw = raw

	return r
}

// Request allows to set the request property with the appropriate payload.
func (r *Shrink) Request(req *Request) *Shrink {
	r.req = req

	return r
}

// HttpRequest returns the http.Request object built from the
// given parameters.
func (r *Shrink) HttpRequest(ctx context.Context) (*http.Request, error) {
	var path strings.Builder
	var method string
	var req *http.Request

	var err error

	if r.raw != nil {
		r.buf.Write(r.raw)
	} else if r.req != nil {
		data, err := json.Marshal(r.req)

		if err != nil {
			return nil, fmt.Errorf("could not serialise request for Shrink: %w", err)
		}

		r.buf.Write(data)
	}

	r.path.Scheme = "http"

	switch {
	case r.paramSet == indexMask|targetMask:
		path.WriteString("/")

		path.WriteString(r.index)
		path.WriteString("/")
		path.WriteString("_shrink")
		path.WriteString("/")

		path.WriteString(r.target)

		method = http.MethodPut
	}

	r.path.Path = path.String()
	r.path.RawQuery = r.values.Encode()

	if r.path.Path == "" {
		return nil, ErrBuildPath
	}

	if ctx != nil {
		req, err = http.NewRequestWithContext(ctx, method, r.path.String(), r.buf)
	} else {
		req, err = http.NewRequest(method, r.path.String(), r.buf)
	}

	req.Header = r.headers.Clone()

	if req.Header.Get("Content-Type") == "" {
		if r.buf.Len() > 0 {
			req.Header.Set("Content-Type", "application/vnd.elasticsearch+json;compatible-with=8")
		}
	}

	if req.Header.Get("Accept") == "" {
		req.Header.Set("Accept", "application/vnd.elasticsearch+json;compatible-with=8")
	}

	if err != nil {
		return req, fmt.Errorf("could not build http.Request: %w", err)
	}

	return req, nil
}

// Do runs the http.Request through the provided transport.
func (r Shrink) Do(ctx context.Context) (*http.Response, error) {
	req, err := r.HttpRequest(ctx)
	if err != nil {
		return nil, err
	}

	res, err := r.transport.Perform(req)
	if err != nil {
		return nil, fmt.Errorf("an error happened during the Shrink query execution: %w", err)
	}

	return res, nil
}

// Header set a key, value pair in the Shrink headers map.
func (r *Shrink) Header(key, value string) *Shrink {
	r.headers.Set(key, value)

	return r
}

// Index The name of the source index to shrink
// API Name: index
func (r *Shrink) Index(v string) *Shrink {
	r.paramSet |= indexMask
	r.index = v

	return r
}

// Target The name of the target index to shrink into
// API Name: target
func (r *Shrink) Target(v string) *Shrink {
	r.paramSet |= targetMask
	r.target = v

	return r
}

// MasterTimeout Specify timeout for connection to master
// API name: master_timeout
func (r *Shrink) MasterTimeout(value string) *Shrink {
	r.values.Set("master_timeout", value)

	return r
}

// Timeout Explicit operation timeout
// API name: timeout
func (r *Shrink) Timeout(value string) *Shrink {
	r.values.Set("timeout", value)

	return r
}

// WaitForActiveShards Set the number of active shards to wait for on the shrunken index before the
// operation returns.
// API name: wait_for_active_shards
func (r *Shrink) WaitForActiveShards(value string) *Shrink {
	r.values.Set("wait_for_active_shards", value)

	return r
}


text:
using UnityEngine;

namespace BehaviorDesigner.Runtime.Tasks.Basic.UnityVector3
{
    [TaskCategory("Basic/Vector3")]
    [TaskDescription("Lerp the Vector3 by an amount.")]
    public class Lerp : Action
    {
        [Tooltip("The from value")]
        public SharedVector3 fromVector3;
        [Tooltip("The to value")]
        public SharedVector3 toVector3;
        [Tooltip("The amount to lerp")]
        public SharedFloat lerpAmount;
        [Tooltip("The lerp resut")]
        [RequiredField]
        public SharedVector3 storeResult;

        public override TaskStatus OnUpdate()
        {
            storeResult.Value = Vector3.Lerp(fromVector3.Value, toVector3.Value, lerpAmount.Value);
            return TaskStatus.Success;
        }

        public override void OnReset()
        {
            fromVector3 = toVector3 = storeResult = Vector3.zero;
            lerpAmount = 0;
        }
    }
}


text:
package com.mossle.bridge.process;

import java.text.SimpleDateFormat;

import java.util.Date;
import java.util.List;
import java.util.Map;

import javax.annotation.Resource;

import com.mossle.api.form.FormDTO;
import com.mossle.api.process.ProcessConnector;
import com.mossle.api.process.ProcessDTO;
import com.mossle.api.user.UserConnector;

import com.mossle.bpm.cmd.FindStartFormCmd;
import com.mossle.bpm.persistence.domain.BpmConfForm;
import com.mossle.bpm.persistence.domain.BpmProcess;
import com.mossle.bpm.persistence.manager.BpmConfFormManager;
import com.mossle.bpm.persistence.manager.BpmProcessManager;

import com.mossle.core.page.Page;

import com.mossle.form.domain.FormTemplate;
import com.mossle.form.manager.FormTemplateManager;

import org.activiti.engine.HistoryService;
import org.activiti.engine.IdentityService;
import org.activiti.engine.ManagementService;
import org.activiti.engine.ProcessEngine;
import org.activiti.engine.RepositoryService;
import org.activiti.engine.RuntimeService;
import org.activiti.engine.TaskService;
import org.activiti.engine.history.HistoricActivityInstance;
import org.activiti.engine.history.HistoricProcessInstance;
import org.activiti.engine.history.HistoricTaskInstance;
import org.activiti.engine.repository.Deployment;
import org.activiti.engine.repository.ProcessDefinition;
import org.activiti.engine.runtime.Job;
import org.activiti.engine.runtime.ProcessInstance;
import org.activiti.engine.task.DelegationState;
import org.activiti.engine.task.Task;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.util.MultiValueMap;

public class ProcessConnectorImpl implements ProcessConnector {
    private Logger logger = LoggerFactory.getLogger(ProcessConnectorImpl.class);
    private ProcessEngine processEngine;
    private BpmConfFormManager bpmConfFormManager;
    private FormTemplateManager formTemplateManager;
    private BpmProcessManager bpmProcessManager;
    private UserConnector userConnector;

    public String startProcess(String userId, String businessKey,
            String processDefinitionId, Map<String, Object> processParameters) {
        // 先设置登录用户
        IdentityService identityService = processEngine.getIdentityService();
        identityService.setAuthenticatedUserId(userId);

        ProcessInstance processInstance = processEngine.getRuntimeService()
                .startProcessInstanceById(processDefinitionId, businessKey,
                        processParameters);

        // {流程标题:title}-{发起人:startUser}-{发起时间:startTime}
        String processDefinitionName = processEngine.getRepositoryService()
                .createProcessDefinitionQuery()
                .processDefinitionId(processDefinitionId).singleResult()
                .getName();
        String processInstanceName = processDefinitionName + "-"
                + userConnector.findById(userId).getDisplayName() + "-"
                + new SimpleDateFormat("yyyy-MM-dd HH:mm").format(new Date());
        processEngine.getRuntimeService().setProcessInstanceName(
                processInstance.getId(), processInstanceName);

        return processInstance.getId();
    }

    public ProcessDTO findProcess(String processId) {
        ProcessDTO processDto = new ProcessDTO();
        BpmProcess bpmProcess = bpmProcessManager
                .get(Long.parseLong(processId));
        String processDefinitionId = bpmProcess.getBpmConfBase()
                .getProcessDefinitionId();
        String processDefinitionName = bpmProcess.getName();
        processDto.setProcessDefinitionId(processDefinitionId);
        processDto.setProcessDefinitionName(processDefinitionName);
        processDto.setConfigTask(Integer.valueOf(1).equals(
                bpmProcess.getUseTaskConf()));

        return processDto;
    }

    /**
     * 获得启动表单.
     */
    public FormDTO findStartForm(String processDefinitionId) {
        FormDTO formDto = processEngine.getManagementService().executeCommand(
                new FindStartFormCmd(processDefinitionId));

        List<BpmConfForm> bpmConfForms = bpmConfFormManager
                .find("from BpmConfForm where bpmConfNode.bpmConfBase.processDefinitionId=? and bpmConfNode.code=?",
                        formDto.getProcessDefinitionId(),
                        formDto.getActivityId());

        if (!bpmConfForms.isEmpty()) {
            BpmConfForm bpmConfForm = bpmConfForms.get(0);

            if (!Integer.valueOf(2).equals(bpmConfForm.getStatus())) {
                if (Integer.valueOf(1).equals(bpmConfForm.getType())) {
                    formDto.setRedirect(true);
                    formDto.setUrl(bpmConfForm.getValue());
                } else {
                    formDto.setCode(bpmConfForm.getValue());
                }
            }
        }

        FormTemplate formTemplate = formTemplateManager.findUniqueBy("code",
                formDto.getCode());

        if (formTemplate == null) {
            logger.error("cannot find form : {}", formDto.getCode());

            return formDto;
        }

        if (Integer.valueOf(1).equals(formTemplate.getType())) {
            formDto.setRedirect(true);
            formDto.setUrl(formTemplate.getContent());
        } else {
            formDto.setContent(formTemplate.getContent());
        }

        return formDto;
    }

    /**
     * 未结流程.
     */
    public Page findRunningProcessInstances(String userId, Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        // TODO: 改成通过runtime表搜索,提高效率
        long count = historyService.createHistoricProcessInstanceQuery()
                .startedBy(userId).unfinished().count();
        List<HistoricProcessInstance> historicProcessInstances = historyService
                .createHistoricProcessInstanceQuery().startedBy(userId)
                .unfinished()
                .listPage((int) page.getStart(), page.getPageSize());

        page.setResult(historicProcessInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 已结流程.
     */
    public Page findCompletedProcessInstances(String userId, Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        long count = historyService.createHistoricProcessInstanceQuery()
                .startedBy(userId).finished().count();
        List<HistoricProcessInstance> historicProcessInstances = historyService
                .createHistoricProcessInstanceQuery().startedBy(userId)
                .finished().listPage((int) page.getStart(), page.getPageSize());

        page.setResult(historicProcessInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 参与流程.
     */
    public Page findInvolvedProcessInstances(String userId, Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        // TODO: finished(), unfinished()
        long count = historyService.createHistoricProcessInstanceQuery()
                .involvedUser(userId).count();
        List<HistoricProcessInstance> historicProcessInstances = historyService
                .createHistoricProcessInstanceQuery().involvedUser(userId)
                .listPage((int) page.getStart(), page.getPageSize());

        page.setResult(historicProcessInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 待办任务(个人任务).
     */
    public Page findPersonalTasks(String userId, Page page) {
        TaskService taskService = processEngine.getTaskService();

        long count = taskService.createTaskQuery().taskAssignee(userId)
                .active().count();
        List<Task> tasks = taskService.createTaskQuery().taskAssignee(userId)
                .active().listPage((int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 代领任务(组任务).
     */
    public Page findGroupTasks(String userId, Page page) {
        TaskService taskService = processEngine.getTaskService();

        long count = taskService.createTaskQuery().taskCandidateUser(userId)
                .active().count();
        List<Task> tasks = taskService.createTaskQuery()
                .taskCandidateUser(userId).active()
                .listPage((int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 已办任务(历史任务).
     */
    public Page findHistoryTasks(String userId, Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        long count = historyService.createHistoricTaskInstanceQuery()
                .taskAssignee(userId).finished().count();
        List<HistoricTaskInstance> historicTaskInstances = historyService
                .createHistoricTaskInstanceQuery().taskAssignee(userId)
                .finished().listPage((int) page.getStart(), page.getPageSize());
        page.setResult(historicTaskInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 代理中的任务(代理人还未完成该任务).
     */
    public Page findDelegatedTasks(String userId, Page page) {
        TaskService taskService = processEngine.getTaskService();

        long count = taskService.createTaskQuery().taskOwner(userId)
                .taskDelegationState(DelegationState.PENDING).count();
        List<Task> tasks = taskService.createTaskQuery().taskOwner(userId)
                .taskDelegationState(DelegationState.PENDING)
                .listPage((int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 流程定义.
     */
    public Page findProcessDefinitions(Page page) {
        RepositoryService repositoryService = processEngine
                .getRepositoryService();
        long count = repositoryService.createProcessDefinitionQuery().count();
        List<ProcessDefinition> processDefinitions = repositoryService
                .createProcessDefinitionQuery().listPage((int) page.getStart(),
                        page.getPageSize());
        page.setResult(processDefinitions);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 流程实例.
     */
    public Page findProcessInstances(Page page) {
        RuntimeService runtimeService = processEngine.getRuntimeService();
        long count = runtimeService.createProcessInstanceQuery().count();
        List<ProcessInstance> processInstances = runtimeService
                .createProcessInstanceQuery().listPage((int) page.getStart(),
                        page.getPageSize());
        page.setResult(processInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 任务.
     */
    public Page findTasks(Page page) {
        TaskService taskService = processEngine.getTaskService();
        long count = taskService.createTaskQuery().count();
        List<Task> tasks = taskService.createTaskQuery().listPage(
                (int) page.getStart(), page.getPageSize());
        page.setResult(tasks);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 部署.
     */
    public Page findDeployments(Page page) {
        RepositoryService repositoryService = processEngine
                .getRepositoryService();
        long count = repositoryService.createDeploymentQuery().count();
        List<Deployment> deployments = repositoryService
                .createDeploymentQuery().listPage((int) page.getStart(),
                        page.getPageSize());
        page.setResult(deployments);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 历史流程实例.
     */
    public Page findHistoricProcessInstances(Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        long count = historyService.createHistoricProcessInstanceQuery()
                .count();
        List<HistoricProcessInstance> historicProcessInstances = historyService
                .createHistoricProcessInstanceQuery().listPage(
                        (int) page.getStart(), page.getPageSize());
        page.setResult(historicProcessInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 历史节点.
     */
    public Page findHistoricActivityInstances(Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        long count = historyService.createHistoricActivityInstanceQuery()
                .count();
        List<HistoricActivityInstance> historicActivityInstances = historyService
                .createHistoricActivityInstanceQuery().listPage(
                        (int) page.getStart(), page.getPageSize());
        page.setResult(historicActivityInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 历史任务.
     */
    public Page findHistoricTaskInstances(Page page) {
        HistoryService historyService = processEngine.getHistoryService();

        long count = historyService.createHistoricTaskInstanceQuery().count();
        List<HistoricTaskInstance> historicTaskInstances = historyService
                .createHistoricTaskInstanceQuery().listPage(
                        (int) page.getStart(), page.getPageSize());
        page.setResult(historicTaskInstances);
        page.setTotalCount(count);

        return page;
    }

    /**
     * 作业.
     */
    public Page findJobs(Page page) {
        ManagementService managementService = processEngine
                .getManagementService();

        long count = managementService.createJobQuery().count();
        List<Job> jobs = managementService.createJobQuery().listPage(
                (int) page.getStart(), page.getPageSize());
        page.setResult(jobs);
        page.setTotalCount(count);

        return page;
    }

    @Resource
    public void setProcessEngine(ProcessEngine processEngine) {
        this.processEngine = processEngine;
    }

    @Resource
    public void setBpmConfFormManager(BpmConfFormManager bpmConfFormManager) {
        this.bpmConfFormManager = bpmConfFormManager;
    }

    @Resource
    public void setFormTemplateManager(FormTemplateManager formTemplateManager) {
        this.formTemplateManager = formTemplateManager;
    }

    @Resource
    public void setBpmProcessManager(BpmProcessManager bpmProcessManager) {
        this.bpmProcessManager = bpmProcessManager;
    }

    @Resource
    public void setUserConnector(UserConnector userConnector) {
        this.userConnector = userConnector;
    }
}


text:
from pyasn1.type import tag, namedtype, namedval, univ, constraint, char, useful

from . import constants

def _application_tag(tag_value):
    return univ.Sequence.tagSet.tagExplicitly(
        tag.Tag(tag.tagClassApplication, tag.tagFormatConstructed,
                int(tag_value)))

def _vno_component(tag_value, name="pvno"):
    return _sequence_component(
        name, tag_value, univ.Integer(),
        subtypeSpec=constraint.ValueRangeConstraint(5, 5))

def _msg_type_component(tag_value, values):
    c = constraint.ConstraintsUnion(
        *(constraint.SingleValueConstraint(int(v)) for v in values))
    return _sequence_component('msg-type', tag_value, univ.Integer(),
                               subtypeSpec=c)

def _sequence_component(name, tag_value, type, **subkwargs):
    return namedtype.NamedType(name, type.subtype(
        explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple,
                            tag_value),
        **subkwargs))

def _sequence_optional_component(name, tag_value, type, **subkwargs):
    return namedtype.OptionalNamedType(name, type.subtype(
        explicitTag=tag.Tag(tag.tagClassContext, tag.tagFormatSimple,
                            tag_value),
        **subkwargs))

def seq_set(seq, name, builder=None, *args, **kwargs):
    component = seq.setComponentByName(name).getComponentByName(name)
    if builder is not None:
        seq.setComponentByName(name, builder(component, *args, **kwargs))
    else:
        seq.setComponentByName(name)
    return seq.getComponentByName(name)

def seq_set_dict(seq, name, pairs, *args, **kwargs):
    component = seq.setComponentByName(name).getComponentByName(name)
    for k, v in pairs.iteritems():
        component.setComponentByName(k, v)

def seq_set_iter(seq, name, iterable):
    component = seq.setComponentByName(name).getComponentByName(name)
    for pos, v in enumerate(iterable):
        component.setComponentByPosition(pos, v)

def seq_set_flags(seq, name, flags):
    seq_set(seq, name, flags.to_asn1)

def seq_append(seq, name, pairs):
    component = seq.getComponentByName(name)
    if component is None:
        component = seq.setComponentByName(name).getComponentByName(name)
    index = len(component)
    element = component.setComponentByPosition(index
                                               ).getComponentByPosition(index)
    for k, v in pairs.iteritems():
        element.setComponentByName(k, v)

class Int32(univ.Integer):
    subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueRangeConstraint(
        -2147483648, 2147483647)

class UInt32(univ.Integer):
    pass
#    subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueRangeConstraint(
#        0, 4294967295)

class Microseconds(univ.Integer):
    subtypeSpec = univ.Integer.subtypeSpec + constraint.ValueRangeConstraint(
        0, 999999)

class KerberosString(char.GeneralString):
    # TODO marc: I'm not sure how to express this constraint in the API.
    # For now, we will be liberal in what we accept.
    # subtypeSpec = constraint.PermittedAlphabetConstraint(char.IA5String())
    pass

class Realm(KerberosString):
    pass

class PrincipalName(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component("name-type", 0, Int32()),
        _sequence_component("name-string", 1,
                            univ.SequenceOf(componentType=KerberosString()))
                            )

class KerberosTime(useful.GeneralizedTime):
    pass

class HostAddress(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component("addr-type", 0, Int32()),
        _sequence_component("address", 1, univ.OctetString())
        )

class HostAddresses(univ.SequenceOf):
    componentType = HostAddress()

class AuthorizationData(univ.SequenceOf):
    componentType = univ.Sequence(componentType=namedtype.NamedTypes(
        _sequence_component('ad-type', 0, Int32()),
        _sequence_component('ad-data', 1, KerberosTime())
        ))

class PAData(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('padata-type', 1, Int32()),
        _sequence_component('padata-value', 2, univ.OctetString())
        )

class KerberosFlags(univ.BitString):
    # TODO marc: it doesn't look like there's any way to specify the
    # SIZE (32.. MAX) parameter to the encoder.  However, we can
    # arrange at a higher layer to pass in >= 32 bits to the encoder.
    pass

class EncryptedData(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component("etype", 0, Int32()),
        _sequence_optional_component("kvno", 1, UInt32()),
        _sequence_component("cipher", 2, univ.OctetString())
        )

class EncryptionKey(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('keytype', 0, Int32()),
        _sequence_component('keyvalue', 1, univ.OctetString()))

class Checksum(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('cksumtype', 0, Int32()),
        _sequence_component('checksum', 1, univ.OctetString()))

class Ticket(univ.Sequence):
    tagSet = _application_tag(constants.Asn1Tags.ticket)
    componentType = namedtype.NamedTypes(
        _vno_component(name="tkt-vno", tag_value=0),
        _sequence_component("realm", 1, Realm()),
        _sequence_component("sname", 2, PrincipalName()),
        _sequence_component("enc-part", 3, EncryptedData())
        )

class TicketFlags(KerberosFlags):
    pass

class KDCOptions(KerberosFlags):
    pass

class KDCReqBody(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('kdc-options', 0, KDCOptions()),
        _sequence_optional_component('cname', 1, PrincipalName()),
        _sequence_component('realm', 2, Realm()),
        _sequence_optional_component('sname', 3, PrincipalName()),
        _sequence_optional_component('from', 4, KerberosTime()),
        _sequence_component('till', 5, KerberosTime()),
        _sequence_optional_component('rtime', 6, KerberosTime()),
        _sequence_component('nonce', 7, UInt32()),
        _sequence_component('etype', 8,
                            univ.SequenceOf(componentType=Int32())),
        _sequence_optional_component('addresses', 9, HostAddresses()),
        _sequence_optional_component('enc-authorization-data', 10,
                                     EncryptedData()),
        _sequence_optional_component('additional-tickets', 11,
                                     univ.SequenceOf(componentType=Ticket()))
        )

class KDCReq(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _vno_component(1),
        _msg_type_component(2, (constants.Asn1Tags.as_req,
                                constants.Asn1Tags.tgs_req)),
        _sequence_optional_component('padata', 3,
                                     univ.SequenceOf(componentType=PAData())),
        _sequence_component('req-body', 4, KDCReqBody())
        )

class ASReq(KDCReq):
    tagSet = _application_tag(constants.Asn1Tags.as_req)

class TGSReq(KDCReq):
    tagSet = _application_tag(constants.Asn1Tags.tgs_req)

class KDCRep(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _vno_component(0),
        _msg_type_component(1, (constants.Asn1Tags.as_rep,
                                constants.Asn1Tags.tgs_rep)),
        _sequence_optional_component('padata', 2,
                                     univ.SequenceOf(componentType=PAData())),
        _sequence_component('crealm', 3, Realm()),
        _sequence_component('cname', 4, PrincipalName()),
        _sequence_component('ticket', 5, Ticket()),
        _sequence_component('enc-part', 6, EncryptedData())
        )

class ASRep(KDCRep):
    tagSet = _application_tag(constants.Asn1Tags.as_rep)

class TGSRep(KDCRep):
    tagSet = _application_tag(constants.Asn1Tags.tgs_rep)

class LastReq(univ.SequenceOf):
    componentType = univ.Sequence(componentType=namedtype.NamedTypes(
        _sequence_component('lr-type', 0, Int32()),
        _sequence_component('lr-value', 1, KerberosTime())
        ))

class EncKDCRepPart(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('key', 0, EncryptionKey()),
        _sequence_component('last-req', 1, LastReq()),
        _sequence_component('nonce', 2, UInt32()),
        _sequence_optional_component('key-expiration', 3, KerberosTime()),
        _sequence_component('flags', 4, TicketFlags()),
        _sequence_component('authtime', 5, KerberosTime()),
        _sequence_optional_component('starttime', 6, KerberosTime()),
        _sequence_component('endtime', 7, KerberosTime()),
        _sequence_optional_component('renew-till', 8, KerberosTime()),
        _sequence_component('srealm', 9, Realm()),
        _sequence_component('sname', 10, PrincipalName()),
        _sequence_optional_component('caddr', 11, HostAddresses())
        )

class EncASRepPart(EncKDCRepPart):
    tagSet = _application_tag(constants.Asn1Tags.enc_as_rep_part)

class EncTGSRepPart(EncKDCRepPart):
    tagSet = _application_tag(constants.Asn1Tags.enc_tgs_rep_part)

class APOptions(KerberosFlags):
    pass

class Authenticator(univ.Sequence):
    tagSet = _application_tag(constants.Asn1Tags.authenticator)
    componentType = namedtype.NamedTypes(
        _vno_component(name='authenticator-vno', tag_value=0),
        _sequence_component('crealm', 1, Realm()),
        _sequence_component('cname', 2, PrincipalName()),
        _sequence_optional_component('cksum', 3, Checksum()),
        _sequence_component('cusec', 4, Microseconds()),
        _sequence_component('ctime', 5, KerberosTime()),
        _sequence_optional_component('subkey', 6, EncryptionKey()),
        _sequence_optional_component('seq-number', 7, UInt32()),
        _sequence_optional_component('authorization-data', 8,
                                     AuthorizationData())
        )

class APReq(univ.Sequence):
    tagSet = _application_tag(constants.Asn1Tags.ap_req)
    componentType = namedtype.NamedTypes(
        _vno_component(0),
        _msg_type_component(1, (constants.Asn1Tags.ap_req,)),
        _sequence_component('ap-options', 2, APOptions()),
        _sequence_component('ticket', 3, Ticket()),
        _sequence_component('authenticator', 4, EncryptedData())
        )

class KrbError(univ.Sequence):
    tagSet = _application_tag(constants.Asn1Tags.krb_error)
    componentType = namedtype.NamedTypes(
        _vno_component(0),
        _msg_type_component(1, (constants.Asn1Tags.krb_error,)),
        _sequence_optional_component('ctime', 2, KerberosTime()),
        _sequence_optional_component('cusec', 3, Microseconds()),
        _sequence_component('stime', 4, KerberosTime()),
        _sequence_component('susec', 5, Microseconds()),
        _sequence_component('error-code', 6, Int32()),
        _sequence_optional_component('crealm', 7, Realm()),
        _sequence_optional_component('cname', 8, PrincipalName()),
        _sequence_component('realm', 9, Realm()),
        _sequence_component('sname', 10, PrincipalName()),
        _sequence_optional_component('e-text', 11, KerberosString()),
        _sequence_optional_component('e-data', 12, univ.OctetString())
        )

class MethodData(univ.SequenceOf):
    componentType = PAData()

class PAEncTimestamp(EncryptedData):
    pass

class PAEncTSEnc(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('patimestamp', 0, KerberosTime()),
        _sequence_optional_component('pausec', 1, Microseconds()))

class ETypeInfoEntry(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('etype', 0, Int32()),
        _sequence_optional_component('salt', 1, univ.OctetString()))

class ETypeInfo(univ.SequenceOf):
    componentType = ETypeInfoEntry()

class ETypeInfo2Entry(univ.Sequence):
    componentType = namedtype.NamedTypes(
        _sequence_component('etype', 0, Int32()),
        _sequence_optional_component('salt', 1, KerberosString()),
        _sequence_optional_component('a2kparams', 2, univ.OctetString()))

class ETypeInfo2(univ.SequenceOf):
    componentType = ETypeInfo2Entry()


text:
      No skills linked to topic

 0">
      Select the skill to link the question to:

      You can only create questions for topics that have atleast one skill
      attached to it. Please link a skill to this topic before adding questions.

        <[skillSummary.getDescription()]>

 0">

      <button class="btn btn-default" ng-click="cancelModal()"> Cancel </button>
      <button class="btn btn-success protractor-test-confirm-skill-button"
              ng-disabled="selectedSkillIds.length === 0"
              ng-click="goToSelectDifficultyView()"> Next
      </button>

      <button class="btn btn-default" ng-click="closeModal()"> Ok </button>

      Select skills you would like to link to the question.

 0">
      Select the difficulty per skill:

      You can only set difficulty after selecting skills linked to the question. Please go back and link skill(s) to this question.

        <[skillWithDifficulty.getDescription()]>
        <md-radio-group ng-model="skillWithDifficulty._difficulty">
          <md-radio-button value="0.3">Easy</md-radio-button>
          <md-radio-button value="0.6">Medium</md-radio-button>
          <md-radio-button value="0.9">Hard</md-radio-button>
        </md-radio-group>

 0">

      <button class="btn btn-default" ng-click="cancelModal()"> Cancel </button>
      <button class="btn btn-success protractor-test-confirm-skill-difficulty-button"
              ng-disabled="linkedSkillsWithDifficulty.length === 0"
              ng-click="startQuestionCreation()"> Done
      </button>

      <button class="btn btn-default" ng-click="goToSelectSkillView()"> Back </button>


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Nueva Flora Micológica Argentina (Stuttgart) 524 (2004)

#### Original name
Leucocoprinus cepistipes var. pseudofarinosus Raithelh.

### Remarks
null


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<title>GlobalSetting</title>
<meta name="date" content="2016-09-19">
<link rel="stylesheet" type="text/css" href="../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method

Game

Class GlobalSetting

java.lang.Object

Game.GlobalSetting

public final class GlobalSetting
extends java.lang.Object

Stores all of the common settings which are used thoroughout the project

Author:

Wong Tiong Kiat and Choe Choon Ho

Field Summary

Fields

Modifier and Type
Field and Description

static int
ANIMATION_DELAY

static int
BOARD_GRID_SIZE

static java.awt.Color
COMPLETE_WHITE_TRANSPARENT

static int
GAME_CELL_HEIGHT

static int
GAME_CELL_WIDTH

static int
INITIAL_PLAYER_SCORE

static int
MAX_ACTION_ALLOWED

static java.lang.String
PLAYER_LOST_MESSAGE

static java.lang.String
PLAYER_PROJECTILE_IMAGE_PATH

static int
PLAYER_SCORE_DECREMENT_PER_TURN

static java.lang.String
PLAYER_TANK_IMAGE_PATH

static java.lang.String
PLAYER_TANK_IMAGE_PATH_DOWN

static java.lang.String
PLAYER_TANK_IMAGE_PATH_LEFT

static java.lang.String
PLAYER_TANK_IMAGE_PATH_RIGHT

static java.lang.String
PLAYER_TANK_IMAGE_PATH_UP

static java.lang.String
PLAYER_WON_MESSAGE

static int
PLAYER1_XPOS

static int
PLAYER1_YPOS

static int
PLAYER2_XPOS

static int
PLAYER2_YPOS

static java.awt.Font
tankTempFont

Method Summary

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Field Detail

PLAYER_TANK_IMAGE_PATH

public static final java.lang.String PLAYER_TANK_IMAGE_PATH

See Also:

Constant Field Values

PLAYER_TANK_IMAGE_PATH_UP

public static final java.lang.String PLAYER_TANK_IMAGE_PATH_UP

See Also:

Constant Field Values

PLAYER_TANK_IMAGE_PATH_DOWN

public static final java.lang.String PLAYER_TANK_IMAGE_PATH_DOWN

See Also:

Constant Field Values

PLAYER_TANK_IMAGE_PATH_LEFT

public static final java.lang.String PLAYER_TANK_IMAGE_PATH_LEFT

See Also:

Constant Field Values

PLAYER_TANK_IMAGE_PATH_RIGHT

public static final java.lang.String PLAYER_TANK_IMAGE_PATH_RIGHT

See Also:

Constant Field Values

PLAYER_PROJECTILE_IMAGE_PATH

public static final java.lang.String PLAYER_PROJECTILE_IMAGE_PATH

See Also:

Constant Field Values

PLAYER_WON_MESSAGE

public static final java.lang.String PLAYER_WON_MESSAGE

See Also:

Constant Field Values

PLAYER_LOST_MESSAGE

public static final java.lang.String PLAYER_LOST_MESSAGE

See Also:

Constant Field Values

tankTempFont

public static final java.awt.Font tankTempFont

COMPLETE_WHITE_TRANSPARENT

public static final java.awt.Color COMPLETE_WHITE_TRANSPARENT

INITIAL_PLAYER_SCORE

public static final int INITIAL_PLAYER_SCORE

See Also:

Constant Field Values

PLAYER_SCORE_DECREMENT_PER_TURN

public static final int PLAYER_SCORE_DECREMENT_PER_TURN

See Also:

Constant Field Values

ANIMATION_DELAY

public static final int ANIMATION_DELAY

See Also:

Constant Field Values

MAX_ACTION_ALLOWED

public static final int MAX_ACTION_ALLOWED

See Also:

Constant Field Values

BOARD_GRID_SIZE

public static final int BOARD_GRID_SIZE

See Also:

Constant Field Values

PLAYER1_XPOS

public static final int PLAYER1_XPOS

See Also:

Constant Field Values

PLAYER1_YPOS

public static final int PLAYER1_YPOS

See Also:

Constant Field Values

PLAYER2_XPOS

public static final int PLAYER2_XPOS

See Also:

Constant Field Values

PLAYER2_YPOS

public static final int PLAYER2_YPOS

See Also:

Constant Field Values

GAME_CELL_HEIGHT

public static final int GAME_CELL_HEIGHT

See Also:

Constant Field Values

GAME_CELL_WIDTH

public static final int GAME_CELL_WIDTH

See Also:

Constant Field Values

Skip navigation links

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev Class

Next Class

Frames

No Frames

All Classes

Summary:

Nested |

Field |

Constr |

Method

Detail:

Field |

Constr |

Method


text:
require "selenium-webdriver"

driver	= Selenium::WebDriver.for :chrome

#driver.navigate.to "http://127.0.0.1:8000/tmp/selenium/test.html"

#driver.navigate.to "http://127.0.0.1:8000/plugins/minecraft/examples/flyer.html"
driver.navigate.to "http://beloola.com"

sleep 1

driver.save_screenshot('/tmp/screenshot.png')

driver.quit


text:
var faye = require('../../build/node/faye-node');

ENDPOINT = 'http://localhost:8000/bayeux';
console.log('Connecting to ' + ENDPOINT);

var ping = new faye.Client(ENDPOINT);
ping.subscribe('/ping', function() {
  console.log('PING');
  setTimeout(function() { ping.publish('/pong', {}) }, 1000);
});

var pong = new faye.Client(ENDPOINT);
pong.subscribe('/pong', function() {
  console.log('PONG');
  setTimeout(function() { pong.publish('/ping', {}) }, 1000);
});

setTimeout(function() { ping.publish('/pong', {}) }, 500);


text:
using UnityEngine;
using Casanova.Prelude;
using System.Linq;
using System;
using System.Collections.Generic;
public enum RuleResult { Done, Working }
namespace Casanova.Prelude
{
  public class Tuple<T,E> {
		  public T Item1 { get; set;}
		  public E Item2 { get; set;}
		  public Tuple(T item1, E item2)
		  {
						  Item1 = item1;
						  Item2 = item2;
			}
	}
  public static class MyExtensions
  {
    //public T this[List<T> list]
    //{
    //  get { return list.ElementAt(0); }
    //}

    public static T Head<T>(this List<T> list) { return list.ElementAt(0); }
    public static T Head<T>(this IEnumerable<T> list) { return list.ElementAt(0); }

    public static int Length<T>(this List<T> list) { return list.Count; }
    public static int Length<T>(this IEnumerable<T> list) { return list.ToList<T>().Count; }
  }
  public class Cons<T> : IEnumerable<T>
  {
    public class Enumerator : IEnumerator<T>
    {
      public Enumerator(Cons<T> parent)
      {
        firstEnumerated = 0;
        this.parent = parent;
        tailEnumerator = parent.tail.GetEnumerator();
      }

      byte firstEnumerated;
      Cons<T> parent;
      IEnumerator<T> tailEnumerator;
      public T Current
      {
        get
        {
          if (firstEnumerated == 0) return default(T);
          if (firstEnumerated == 1) return parent.head;
          else return tailEnumerator.Current;
        }
      }

      object System.Collections.IEnumerator.Current { get { throw new Exception("Empty sequence has no elements"); } }
      public bool MoveNext()
      {
        if (firstEnumerated == 0)
        {
          if (parent.head == null) return false;
          firstEnumerated++;
          return true;
        }
        if (firstEnumerated == 1) firstEnumerated++;
        return tailEnumerator.MoveNext();
      }

      public void Reset() { firstEnumerated = 0; tailEnumerator.Reset(); }
      public void Dispose() { }
    }

    T head;
    IEnumerable<T> tail;
    public Cons(T head, IEnumerable<T> tail)
    {
      this.head = head;
      this.tail = tail;
    }

    public IEnumerator<T> GetEnumerator()
    {
      return new Enumerator(this);
    }

    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
    {
      return new Enumerator(this);
    }
  }

  public class Empty<T> : IEnumerable<T>
  {
    public Empty() { }
    public class Enumerator : IEnumerator<T>
    {
      public T Current { get { throw new Exception("Empty sequence has no elements"); } }
      object System.Collections.IEnumerator.Current { get { throw new Exception("Empty sequence has no elements"); } }
      public bool MoveNext() { return false; }
      public void Reset() { }
      public void Dispose() { }
    }

    public IEnumerator<T> GetEnumerator()
    {
      return new Enumerator();
    }

    System.Collections.IEnumerator System.Collections.IEnumerable.GetEnumerator()
    {
      return new Enumerator();
    }
  }

  public abstract class Option<T> : IComparable, IEquatable<Option<T>>
  {
    public bool IsSome;
    public bool IsNone { get { return !IsSome; } }
    protected abstract Just<T> Some { get; }

    public U Match<U>(Func<T,U> f, Func<U> g) {
      if (this.IsSome)
        return f(this.Some.Value);
      else
        return g();
    }

    public bool Equals(Option<T> b)
    {
      return this.Match(
        x => b.Match(
                y => x.Equals(y),
                () => false),
        () => b.Match(
                y => false,
                () => true));
    }

    public override bool Equals(System.Object other)
    {
      if (other == null) return false;
      if (other is Option<T>)
      {
        var other1 = other as Option<T>;
        return this.Equals(other1);
      }
      return false;
    }
    public override int GetHashCode() { return this.GetHashCode(); }

    public static bool operator ==(Option<T> a, Option<T> b)
    {
      if ((System.Object)a == null || (System.Object)b == null) return System.Object.Equals(a, b);
      return a.Equals(b);
    }

    public static bool operator !=(Option<T> a, Option<T> b)
    {
      if ((System.Object)a == null || (System.Object)b == null) return System.Object.Equals(a, b);
      return !(a.Equals(b));
    }

    public int CompareTo(object obj)
    {
      if (obj == null) return 1;
      if (obj is Option<T>)
      {
        var obj1 = obj as Option<T>;
        if (this.Equals(obj1)) return 0;
      }
      return -1;
    }

    abstract public T Value { get; }
    public override string ToString()
    {
      return "Option<" + typeof(T).ToString() + ">";
    }
  }

  public class Just<T> : Option<T>
  {
    T elem;
    public Just(T elem) { this.elem = elem; this.IsSome = true; }

    protected override Just<T> Some { get { return this; } }
    public override T Value { get { return elem; } }
  }

  public class Nothing<T> : Option<T>
  {
    public Nothing() { this.IsSome = false; }

    protected override Just<T> Some { get { return null; } }
    public override T Value { get { throw new Exception("Cant get a value from a None object"); } }

  }

  public class Utils
  {
    public static T IfThenElse<T>(Func<bool> c, Func<T> t, Func<T> e)
    {
      if (c())
        return t();
      else
        return e();
    }
  }

}

public class FastStack
{
  public int[] Elements;
  public int Top;

  public FastStack(int elems)
  {
    Top = 0;
    Elements = new int[elems];
  }

  public void Clear() { Top = 0; }
  public void Push(int x) { Elements[Top++] = x; }
}

public class RuleTable
{
  public RuleTable(int elems)
  {
    ActiveIndices = new FastStack(elems);
    SupportStack = new FastStack(elems);
    ActiveSlots = new bool[elems];
  }

  public FastStack ActiveIndices;
  public FastStack SupportStack;
  public bool[] ActiveSlots;

  public void Add(int i)
  {
    if (!ActiveSlots[i])
    {
      ActiveSlots[i] = true;
      ActiveIndices.Push(i);
    }
  }
}

 public class World : MonoBehaviour{
void Update () { Update(Time.deltaTime, this); }
public void Start()
	{		UnityCube = UnityCube.Find();
		}
		public UnityCube UnityCube;
	public UnityEngine.Vector3 Position{  get { return UnityCube.Position; }
  set{UnityCube.Position = value; }
 }
	public System.Boolean useGUILayout{  get { return UnityCube.useGUILayout; }
  set{UnityCube.useGUILayout = value; }
 }
	public System.Boolean enabled{  get { return UnityCube.enabled; }
  set{UnityCube.enabled = value; }
 }
	public UnityEngine.Transform transform{  get { return UnityCube.transform; }
 }
	public UnityEngine.Rigidbody rigidbody{  get { return UnityCube.rigidbody; }
 }
	public UnityEngine.Rigidbody2D rigidbody2D{  get { return UnityCube.rigidbody2D; }
 }
	public UnityEngine.Camera camera{  get { return UnityCube.camera; }
 }
	public UnityEngine.Light light{  get { return UnityCube.light; }
 }
	public UnityEngine.Animation animation{  get { return UnityCube.animation; }
 }
	public UnityEngine.ConstantForce constantForce{  get { return UnityCube.constantForce; }
 }
	public UnityEngine.Renderer renderer{  get { return UnityCube.renderer; }
 }
	public UnityEngine.AudioSource audio{  get { return UnityCube.audio; }
 }
	public UnityEngine.GUIText guiText{  get { return UnityCube.guiText; }
 }
	public UnityEngine.NetworkView networkView{  get { return UnityCube.networkView; }
 }
	public UnityEngine.GUITexture guiTexture{  get { return UnityCube.guiTexture; }
 }
	public UnityEngine.Collider collider{  get { return UnityCube.collider; }
 }
	public UnityEngine.Collider2D collider2D{  get { return UnityCube.collider2D; }
 }
	public UnityEngine.HingeJoint hingeJoint{  get { return UnityCube.hingeJoint; }
 }
	public UnityEngine.ParticleEmitter particleEmitter{  get { return UnityCube.particleEmitter; }
 }
	public UnityEngine.ParticleSystem particleSystem{  get { return UnityCube.particleSystem; }
 }
	public UnityEngine.GameObject gameObject{  get { return UnityCube.gameObject; }
 }
	public System.String tag{  get { return UnityCube.tag; }
  set{UnityCube.tag = value; }
 }
	public System.String name{  get { return UnityCube.name; }
  set{UnityCube.name = value; }
 }
	public UnityEngine.HideFlags hideFlags{  get { return UnityCube.hideFlags; }
  set{UnityCube.hideFlags = value; }
 }
	public void Update(float dt, World world) {
		this.Rule0(dt, world);

	}
	public void Rule0(float dt, World world)
	{
	UnityCube.Position = (Position) + (new UnityEngine.Vector3(0.1f,0f,0f));
	}

}


text:
<?php
/*
Plugin Name: WP Media Embed Start Time
Author: Aaron Brazell
Author URI: http://technosailor.com
Plugin URI:https://github.com/technosailor/wp-media-embed-starttime
Description: Modifies the built-in WordPress audio and video shortcodes to accept a start attribute. The start attribute is in number of seconds.
Version: 1.0
License: MIT
License URI: https://github.com/technosailor/wp-media-embed-starttime/blob/master/LICENSE
*/

class WP_Media_Embed_Start_Time {

	public function __construct() {
		$this->hooks();
	}

	public function hooks() {
		add_filter( 'shortcode_atts_audio', array( $this, 'add_attributes' ), 10, 3 );
		add_filter( 'shortcode_atts_video', array( $this, 'add_attributes' ), 10, 3 );
		add_filter( 'wp_audio_shortcode', array( $this, 'add_start_time' ), 10, 5 );
		add_filter( 'wp_video_shortcode', array( $this, 'add_start_time' ), 10, 5 );

		add_action( 'wp_enqueue_scripts', array( $this, 'enqueue' ) );
	}

	public function enqueue() {
		wp_enqueue_script( 'jquery' );
	}

	public function add_attributes( $out, $pairs, $atts ) {
		if( array_key_exists( 'start', $atts ) ) {
			if( is_numeric( $atts['start'] ) ) {
				$out['start'] = $atts['start'];
			}
			else {
				$out['start'] = 0;
			}
		}
		else {
			$out['start'] = 0;
		}
		return $out;
	}

	public function add_start_time( $html, $atts, $audio, $post_id, $library ) {
		preg_match( '#id="((audio|video)?-\d+-\d+)"#', $html, $dom );
		if( !isset( $dom[1] )  )
			return $html;
		$dom_id = esc_js( $dom[1] );
		$start_time = (int) $atts['start'];
		$script = <<<SCRIPT_TAG
		<script>
			jQuery(document).ready(function($) {
				var media = $('#$dom_id');
				media.on('canplay', function (ev) {
					this.currentTime = $start_time;
				});
			});
		</script>
SCRIPT_TAG;
		$html = $html . $script;
		return $html;
	}
}
new WP_Media_Embed_Start_Time;


text:
module FuturesPipeline
  VERSION = "0.2.1"
end


text:
html {
  height: 100%;
}

body {
  background-color: #fbfbfb;
  height: 100%;
  margin: 0;
  overflow: auto;
  padding: 0;
  width: 100%;
}

[hidden] {
  display: none !important;
}

.title-bar {
  -webkit-align-items: center;
  -webkit-app-region: drag;
  background-color: #fff;
  box-shadow: 0 1px #d0d0d0;
  color: rgb(80, 80, 82);
  display: -webkit-flex;
  font-size: 15px;
  height: 48px;
}

.title-bar #page-title {
  -webkit-flex: 1 1 auto;
  -webkit-margin-start: 20px;
}

.title-bar .button-bar {
  -webkit-flex: 0 1 auto;
}

.content {
  color: #646464;
  font-size: 12px;
  margin: 20px;
}

.content #description-text {
  border-color: #c8c8c8;
  box-sizing: border-box;
  height: 120px;
  line-height: 18px;
  padding: 10px;
  resize: none;
  width: 100%;
}

.content .text-field-container {
  -webkit-align-items: center;
  -webkit-padding-start: 10px;
  display: -webkit-flex;
  height: 29px;
  margin-top: 10px;
}

.content .text-field-container > label {
  -webkit-flex: 0 1 auto;
  width: 100px;
}

.content .text-field-container > input[type=text] {
  -webkit-flex: 1 1 auto;
  -webkit-padding-start: 5px;
  border: 1px solid;
  border-color: #c8c8c8;
  color: #585858;
  height: 100%;
}

.content .text-field-container > input[type=checkbox] {
  margin-right: 9px;
}

.content .checkbox-field-container {
  -webkit-align-items: center;
  display: -webkit-flex;
  height: 29px;
}

#screenshot-container {
  margin-top: 10px;
}

.content #screenshot-image {
  -webkit-margin-start: 100px;
  display: block;
  height: 60px;
  margin-top: 40px;
  transition: all 250ms ease;
}

.content #screenshot-image:hover {
  -webkit-margin-start: 80px;
  height: 125px;
  margin-top: 80px;
  z-index: 1;
}

.content #screenshot-image.wide-screen {
  height: auto;
  width: 100px;
}

.content #screenshot-image.wide-screen:hover {
  height: auto;
  width: 200px;
}

.content #privacy-note {
  color: #969696;
  font-size: 10px;
  line-height: 15px;
  margin-bottom: 20px;
  margin-top: 20px;
}

.content .buttons-pane {
  bottom: 20px;
  display: -webkit-flex;
  justify-content: flex-end;
  left: 20px;
  position: absolute;
  right: 20px;
}

.content .remove-file-button {
  -webkit-margin-start: 5px;
  background-color: transparent;
  background-image: -webkit-image-set(
      url(chrome://resources/images/apps/button_butter_bar_close.png) 1x,
      url(chrome://resources/images/2x/apps/button_butter_bar_close.png) 2x);
  background-position: 50% 80%;
  background-repeat: no-repeat;
  border: none;
  height: 16px;
  pointer-events: auto;
  width: 16px;
}

.content .remove-file-button:hover {
  background-image: -webkit-image-set(
      url(chrome://resources/images/apps/button_butter_bar_close_hover.png) 1x,
      url(chrome://resources/images/2x/apps/button_butter_bar_close_hover.png) 2x);
}

.content .remove-file-button:active {
  background-image: -webkit-image-set(
      url(chrome://resources/images/apps/button_butter_bar_close_pressed.png) 1x,
      url(chrome://resources/images/2x/apps/button_butter_bar_close_pressed.png) 2x);
}

.content #attach-file-note {
  -webkit-margin-start: 112px;
  margin-bottom: 10px;
  margin-top: 10px;
}

.content .attach-file-notification {
  color: rgb(204, 0, 0);
  font-weight: bold;
}

button.white-button {
  -webkit-margin-end: 10px;
  color: #000;
}

button.blue-button {
  color: #fff;
  text-shadow: 1px sharp drop shadow rgb(45, 106, 218);
}

.srt-image {
  -webkit-margin-end: auto;
  -webkit-margin-start: 40px;
  display: block;
  height: 50px;
  margin-bottom: 20px;
  margin-top: 120px;
}

.srt-body {
  font-size: 14px;
  line-height: 24px;
  margin: 0 40px;
}


text:
Nut specification

Nut metadata is stored in two places. Standard Go entities like package name and import path are accessible via standard package go/build. The rest is stored in file called nut.json, which can be created and updated with nut generate command. This document defines its format.

{
  "Version": "0.3.0",
  "Vendor": "aleksi",
  "Authors": [
    {
      "FullName": "Alexey Palazhchenko",
      "Email": "alexey.palazhchenko@gmail.com"
    }
  ],
  "ExtraFiles": [
    "CHANGELOG",
    "CONTRIBUTING.md",
    "LICENSE",
    "README.md"
  ],
  "Homepage": "http://gonuts.io/"
}

Version defines nut version according to specification.

Vendor is a user or project name. Together with package name it forms a nut URL: gonuts.io/aleksi/nut

Author defines nut authors and maintainers. Each array element contains full name and optional e-mail.

ExtraFiles defines an array of files which are a part of nut, but do not contain code and therefore are not a part of Go package.

Homepage defines nut's homepage in a form of HTTP/HTTPS URL.


text:
<?php

/**
 * Get the integer value of a variable
 *
 * @phpstub
 *
 * @param mixed $var
 * @param int $base
 *
 * @return int The integer value of  on success, or 0 on
 *             failure. Empty arrays return 0, non-empty arrays return 1.
 */
function intval($var, $base = 10)
{
}


text:
import './style.scss'
import sizeProps from 'vue-bulma-common/src/mixins/size'

export default {
  name: 'vb-delete',
  mixins: [sizeProps],
  computed: {
    classes() {
      const { size } = this
      return {
        delete: true,
        [`is-${size}`]: !!size
      }
    }
  },
  render(h) {
    const { classes, handleClick } = this
    return h('a', { class: classes, on: { click: handleClick } }, [])
  },
  methods: {
    handleClick(event) {
      this.$emit('click', event)
    }
  }
}


text:
<?php

namespace BusBot\Commands;

class EnableUpdatesCommand extends BaseCommand {

    protected $name = 'avvisa';

    protected $description = 'attiva avvisi automatici ogni minuto';

    public function run($arguments) {

        $this->user()->enableAlert();

        $this->replyWithMessage('Avvisi attivati, disabilita con /stopavvisi');
    }

}


text:
BigCcommerce plugin to Hide selected Wholesale Prices and Items unless user is logged in as a wholesale account.

## Installation

1. Setup 2 Customer Groups: "Retail" and "Wholesale"
2. Use "Retail" group as default group for Guests
3. Add all existing Retail customers to retail group
4. Create a unique category that will only be visible to Wholesale group customers, such as "Wholesale Deals," "Trade Specials," or "Bulk/Bundle Bargains"
5. Allow Wholesale group to see all categories, but Allow Retail group to see all for the exception of the category we created in step 3.
6. Install the HideWholesalePrices.html Panel reference (**%%Panel.WholeSaleFunctions%%**) to bottom of **Panels/Footer.html**
7. Finally, copy file **HideWholesalePrices.html** over to dav/template/Panels in your WedDAV account.
    1. To access your WebDAV panel, BigCommerce gives you instructions in your Admin Panel.
    2. Click "Design" in the top right corner of your store admin panel.
    3. Then click "WebDAV" in the "Current Theme" section and follow the instructions

------------------------------------------------------------------------------------

## Using

1. Just install and it'll do the work for you!

------------------------------------------------------------------------------------

##To Do

1. Finish HTML

------------------------------------------------------------------------------------

##Resources
- [Restricting Wholesale Products to Wholesale Customers](https://support.bigcommerce.com/articles/Public/How-can-I-restrict-wholesale-products-to-wholesale-customers)
- [-In Progress- Hiding Bulk Pricing from "Retail" Customer Group](http://forum.bigcommerce.com/f4/hiding-bulk-pricing-from-retail-customer-group-23011/)
- [Hide Shipping Method From Customer Group](http://forum.bigcommerce.com/f33/hide-shipping-method-from-customer-group-12374/)
- [-In Progress- Display 2nd level categories in Footer Menu](https://forum.bigcommerce.com/f4/display-2nd-level-categories-in-footer-menu-14126/)
- [Hiding and Showing Based on Customer Group Part 1](http://bigcommercejournal.blogspot.com/2013/11/hiding-and-showing-based-on-customer.html)
- [Bigcommerce Tutorial – Hide Pricing Until Customer is Signed Into a Wholesale Account](http://www.protocolthree.com/bigcommerce-tutorial-hide-pricing-until-customer-is-signed-into-a-wholesale-account/)
- [jQuery multiple conditions within if statement](http://stackoverflow.com/questions/10722682/jquery-multiple-conditions-within-if-statement)
- [jotform - How can I receive SSL Submissions?](http://www.jotform.com/help/63-How-can-I-receive-SSL-Submissions)

------------------------------------------------------------------------------------

## Other BigCommerce modules that I've made

* [BigCommerce Carousel Slider Slide Show Custom](https://github.com/iamandrebulatov/BC-Carousel-Slider-Slide-Show-Custom)
* [BigCommerce Product Page Demo Videos](https://github.com/iamandrebulatov/BigCommerce-Product-Page-Demo-Videos)
* [BigCommerce Product Page Brand Descriptions](https://github.com/iamandrebulatov/BigCommerce-Product-Page-Brand-Descriptions)
* [BigCommerce Product Page Brand Logos](https://github.com/iamandrebulatov/BigCommerce-Product-Page-Brand-Logos)
* [BigCommerce Product Page Dynamic Product Type Descriptions](https://github.com/iamandrebulatov/BC-Product-Page-Dynamic-Product-Type-Descriptions)
* [BigCommerce Product Page Image Zoom](https://github.com/iamandrebulatov/BC-Product-Page-Image-Zoom)
* [BigCommerce Category Page Color Swatch](https://github.com/iamandrebulatov/BigCommerce-Color-Swatch-On-Category)
* [BigCommerce Category Page 2nd Alternate Thumbnail](https://github.com/iamandrebulatov/BigCommerce-Category-Pages-2nd-Alternate-Thumbnail)
* [BigCommerce Category Page Videos](https://github.com/iamandrebulatov/BigCommerce-Category-Page-Demo-Videos)
* [BigCommerce Category Page Out of Stock Ribbons](https://github.com/iamandrebulatov/BigCommerce-Out-of-Stock-Category-Items)
* [BigCommerce Category Page Staff Picks Selector](https://github.com/iamandrebulatov/BC-Staff-Picks-Selector)
* [BigCommerce Preview On MouseOver](https://github.com/iamandrebulatov/BC-Preview-On-MouseOver)
* [BigCommerce Shipping Options Description](https://github.com/iamandrebulatov/BC-Shipping-Options-Descriptions)
* [BigCommerce Welcoming Age Gate](https://github.com/iamandrebulatov/BC-Welcoming-Age-Gate)
* [BigCommerce 360 Product View](https://github.com/iamandrebulatov/BC-360-Product-View)
* [BigCommerce ThumbScroll](https://github.com/iamandrebulatov/BC-ThumbScroll)
* [BigCommerce Product Accessory Options Choice Upsell](https://github.com/iamandrebulatov/BC-Product-Accessory-Options-Choice-Upsell)
* [BigCommerce Navigation Dynamic List Item Visual Cues](https://github.com/iamandrebulatov/BC-Nav-Dynamic-List-Item-Visual-Cues)
* [BigCommerce Wholesale Features and Functions](https://github.com/iamandrebulatov/BC-Wholesale-Price-and-Item-Hide)

------------------------------------------------------------------------------------

## Support

> ⚐ Please help me spend more time developing and maintaining awesome modules like this by donating!

The absolute best thing to do is to sign up with [ChangeTip](//changetip.com) or [GratiPay](//gratipay.com) if you haven't already and donate just $1 a week. That is roughly a cup of coffee per month. Also, please do donate to many other amazing open source projects!

[![ChangeTip donate button](http://andrebulatov.com/wp-content/uploads/tipme_button.png)](//www.changetip.com/tipme/andre.bulatov/ "Donate once-off to this project using ChangeTip")
[![GratiPay donate button](http://andrebulatov.com/wp-content/uploads/gratipay-button.png)](//www.gratipay.com/andrebulatov/ "Donate once-off to this project using GratiPay")

------------------------------------------------------------------------------------

## License

The MIT License (MIT)

Copyright (c) 2015 Andre Bulatov

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

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

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