text:
package com.intellij.psi;

import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.NotNullLazyKey;
import com.intellij.psi.search.GlobalSearchScope;
import consulo.annotation.DeprecationInfo;
import org.jetbrains.annotations.NonNls;
import javax.annotation.Nonnull;

import javax.annotation.Nullable;
import java.util.Collection;

/**
 * @author max
 */
public abstract class JavaPsiFacade
{
	private static final NotNullLazyKey<JavaPsiFacade, Project> INSTANCE_KEY = ServiceManager.createLazyKey(JavaPsiFacade.class);

	public static JavaPsiFacade getInstance(Project project)
	{
		return INSTANCE_KEY.getValue(project);
	}

	public static PsiElementFactory getElementFactory(@Nonnull Project project)
	{
		return getInstance(project).getElementFactory();
	}

	/**
	 * Searches the specified scope within the project for a class with the specified full-qualified
	 * name and returns one if it is found.
	 *
	 * @param qualifiedName the full-qualified name of the class to find.
	 * @param scope         the scope to search.
	 * @return the PSI class, or null if no class with such name is found.
	 */
	@Nullable
	public abstract PsiClass findClass(@NonNls @Nonnull String qualifiedName, @Nonnull GlobalSearchScope scope);

	/**
	 * Searches the specified scope within the project for classes with the specified full-qualified
	 * name and returns all found classes.
	 *
	 * @param qualifiedName the full-qualified name of the class to find.
	 * @param scope         the scope to search.
	 * @return the array of found classes, or an empty array if no classes are found.
	 */
	@Nonnull
	public abstract PsiClass[] findClasses(@NonNls @Nonnull String qualifiedName, @Nonnull GlobalSearchScope scope);

	/**
	 * Searches the project for the package with the specified full-qualified name and returns one
	 * if it is found.
	 *
	 * @param qualifiedName the full-qualified name of the package to find.
	 * @return the PSI package, or null if no package with such name is found.
	 */
	@Nullable
	public abstract PsiJavaPackage findPackage(@NonNls @Nonnull String qualifiedName);

	@Nonnull
	public abstract PsiJavaPackage[] getSubPackages(@Nonnull PsiJavaPackage psiPackage, @Nonnull GlobalSearchScope scope);

	/**
	 * Returns the element factory for the project, which can be used to
	 * create instances of Java and XML PSI elements.
	 *
	 * @return the element factory instance.
	 */
	@Nonnull
	public abstract PsiElementFactory getElementFactory();

	/**
	 * Returns the factory for the project, which can be used to create instances of certain java constructs from their textual
	 * representation. Elements created shall not be used to later intermix (like insert into) a PSI parsed from the user codebase
	 * since no formatting to the user code style will be performed in this case. Please use {@link #getElementFactory()} instead, which
	 * provides exactly same methods but ensures created instances will get properly formatted.
	 *
	 * @return the parser facade.
	 */
	@Nonnull
	public abstract PsiJavaParserFacade getParserFacade();

	/**
	 * Returns the resolve helper for the project, which can be used to resolve references
	 * and check accessibility of elements.
	 *
	 * @return the resolve helper instance.
	 */
	@Nonnull
	public abstract PsiResolveHelper getResolveHelper();

	/**
	 * Returns the name helper for the project, which can be used to validate
	 * and parse Java identifiers.
	 *
	 * @return the name helper instance.
	 */
	@Nonnull
	@Deprecated
	@DeprecationInfo(value = "Use PsiNameHelper#getInstance(Project)", until = "2.0")
	public abstract PsiNameHelper getNameHelper();

	/**
	 * Returns the constant expression evaluator for the project.
	 *
	 * @return the evaluator instance.
	 */
	@Nonnull
	public abstract PsiConstantEvaluationHelper getConstantEvaluationHelper();

	/**
	 * Checks if the specified package name is part of the package prefix for
	 * any of the modules in this project.
	 *
	 * @param packageName the package name to check.
	 * @return true if it is part of the package prefix, false otherwise.
	 */
	public abstract boolean isPartOfPackagePrefix(@Nonnull String packageName);

	/**
	 * Checks if the specified PSI element belongs to the specified package.
	 *
	 * @param element  the element to check the package for.
	 * @param aPackage the package to check.
	 * @return true if the element belongs to the package, false otherwise.
	 */
	public abstract boolean isInPackage(@Nonnull PsiElement element, @Nonnull PsiJavaPackage aPackage);

	/**
	 * Checks if the specified PSI elements belong to the same package.
	 *
	 * @param element1 the first element to check.
	 * @param element2 the second element to check.
	 * @return true if the elements are in the same package, false otherwise.
	 */
	public abstract boolean arePackagesTheSame(@Nonnull PsiElement element1, @Nonnull PsiElement element2);

	@Nonnull
	public abstract Project getProject();

	/**
	 * Searches the scope for a unique Java module with the given name.
	 */
	@Nullable
	public abstract PsiJavaModule findModule(@Nonnull String moduleName, @Nonnull GlobalSearchScope scope);

	/**
	 * Searches the scope for Java modules with the given name.
	 */
	@Nonnull
	public abstract Collection<PsiJavaModule> findModules(@Nonnull String moduleName, @Nonnull GlobalSearchScope scope);
}


text:
from django.core.cache import cache

from couchdbkit import (
    BooleanProperty,
    DocumentSchema,
    ResourceNotFound,
    StringProperty,
)

from corehq.apps.domain.models import Domain

def domain_requires_auth(domain):
    timeout = 10
    key = 'domain_requires_auth/{}'.format(domain)

    result = cache.get(key)
    if result is None:
        result = _domain_requires_auth(domain)
        cache.set(key, result, timeout=timeout)
    return result

def _domain_requires_auth(domain):
    domain_obj = Domain.get_by_name(domain, strict=True)
    if domain_obj:
        return domain_obj.secure_submissions
    else:
        raise ResourceNotFound('No domain with name %s' % domain)

class AuthContext(DocumentSchema):
    authenticated = BooleanProperty(default=False)
    domain = StringProperty(required=True)
    user_id = StringProperty()

    def _auth_required(self):
        domain_requires_auth(self.domain)

    def is_valid(self):
        try:
            return self.authenticated or not self._auth_required()
        except ResourceNotFound:
            return False

class WaivedAuthContext(AuthContext):

    def _auth_required(self):
        return False

redpajama_set_name: RedPajamaGithub


text:
title: Install Drupal Console Launcher using the phar
---

```bash
curl https://drupalconsole.com/installer -L -o drupal.phar
mv drupal.phar /usr/local/bin/drupal
chmod +x /usr/local/bin/drupal
```

NOTE: If you don't have curl you can try

```bash
php -r "readfile('https://drupalconsole.com/installer');" > drupal.phar
```

## Update DrupalConsole Launcher

```bash
drupal self-update
```

## Run Drupal Console using the Launcher

```bash
drupal
```

You must execute the launcher within a drupal site directory or use `--root=/path/to/drupal8.dev
` to specify your drupal site path.

**NOTE:** The name `drupal` is just an alias you can name it anything you like.


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Icones Pictae Rariorum fungorum 3: 32 (1805)

#### Original name
Sphaeria striiformis Fr., 1823

### Remarks
null


text:
package firestore_test

import (
	"fmt"

	"cloud.google.com/go/firestore"
	"golang.org/x/net/context"

	"google.golang.org/api/iterator"
)

func ExampleNewClient() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close() // Close client when done.
	_ = client           // TODO: Use client.
}

func ExampleClient_Collection() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()
	coll1 := client.Collection("States")
	coll2 := client.Collection("States/NewYork/Cities")
	fmt.Println(coll1, coll2)
}

func ExampleClient_Doc() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()
	doc1 := client.Doc("States/NewYork")
	doc2 := client.Doc("States/NewYork/Cities/Albany")
	fmt.Println(doc1, doc2)
}

func ExampleClient_GetAll() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()
	docs, err := client.GetAll(ctx, []*firestore.DocumentRef{
		client.Doc("States/NorthCarolina"),
		client.Doc("States/SouthCarolina"),
		client.Doc("States/WestCarolina"),
		client.Doc("States/EastCarolina"),
	})
	if err != nil {
		// TODO: Handle error.
	}
	// docs is a slice with four DocumentSnapshots, but the last two are
	// nil because there is no West or East Carolina.
	fmt.Println(docs)
}

func ExampleClient_Batch() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()
	b := client.Batch()
	_ = b // TODO: Use batch.
}

func ExampleWriteBatch_Commit() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	type State struct {
		Capital    string  `firestore:"capital"`
		Population float64 `firestore:"pop"` // in millions
	}

	ny := client.Doc("States/NewYork")
	ca := client.Doc("States/California")

	writeResults, err := client.Batch().
		Create(ny, State{Capital: "Albany", Population: 19.8}).
		Set(ca, State{Capital: "Sacramento", Population: 39.14}).
		Delete(client.Doc("States/WestDakota")).
		Commit(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(writeResults)
}

func ExampleCollectionRef_Add() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	doc, wr, err := client.Collection("Users").Add(ctx, map[string]interface{}{
		"name":  "Alice",
		"email": "aj@example.com",
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(doc, wr)
}

func ExampleCollectionRef_Doc() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	fl := client.Collection("States").Doc("Florida")
	ta := client.Collection("States").Doc("Florida/Cities/Tampa")

	fmt.Println(fl, ta)
}

func ExampleCollectionRef_NewDoc() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	doc := client.Collection("Users").NewDoc()

	fmt.Println(doc)
}

func ExampleDocumentRef_Collection() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	mi := client.Collection("States").Doc("Michigan")
	cities := mi.Collection("Cities")

	fmt.Println(cities)
}

func ExampleDocumentRef_Create_map() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	wr, err := client.Doc("States/Colorado").Create(ctx, map[string]interface{}{
		"capital": "Denver",
		"pop":     5.5,
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}

func ExampleDocumentRef_Create_struct() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	type State struct {
		Capital    string  `firestore:"capital"`
		Population float64 `firestore:"pop"` // in millions
	}

	wr, err := client.Doc("States/Colorado").Create(ctx, State{
		Capital:    "Denver",
		Population: 5.5,
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}

func ExampleDocumentRef_Set() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	// Overwrite the document with the given data. Any other fields currently
	// in the document will be removed.
	wr, err := client.Doc("States/Alabama").Set(ctx, map[string]interface{}{
		"capital": "Montgomery",
		"pop":     4.9,
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}

func ExampleDocumentRef_Set_merge() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	// Overwrite only the fields in the map; preserve all others.
	_, err = client.Doc("States/Alabama").Set(ctx, map[string]interface{}{
		"pop": 5.2,
	}, firestore.MergeAll)
	if err != nil {
		// TODO: Handle error.
	}

	type State struct {
		Capital    string  `firestore:"capital"`
		Population float64 `firestore:"pop"` // in millions
	}

	// To do a merging Set with struct data, specify the exact fields to overwrite.
	// MergeAll is disallowed here, because it would probably be a mistake: the "capital"
	// field would be overwritten with the empty string.
	_, err = client.Doc("States/Alabama").Set(ctx, State{Population: 5.2}, firestore.Merge([]string{"pop"}))
	if err != nil {
		// TODO: Handle error.
	}
}

func ExampleDocumentRef_Update() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	tenn := client.Doc("States/Tennessee")
	wr, err := tenn.Update(ctx, []firestore.Update{
		{Path: "pop", Value: 6.6},
		{FieldPath: []string{".", "*", "/"}, Value: "odd"},
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}

func ExampleDocumentRef_Delete() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	// Oops, Ontario is a Canadian province...
	if _, err = client.Doc("States/Ontario").Delete(ctx); err != nil {
		// TODO: Handle error.
	}
}

func ExampleDocumentRef_Get() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	docsnap, err := client.Doc("States/Ohio").Get(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	_ = docsnap // TODO: Use DocumentSnapshot.
}

func ExampleDocumentRef_Snapshots() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()
	iter := client.Doc("States/Idaho").Snapshots(ctx)
	defer iter.Stop()
	for {
		docsnap, err := iter.Next()
		if err != nil {
			// TODO: Handle error.
		}
		_ = docsnap // TODO: Use DocumentSnapshot.
	}
}

func ExampleDocumentSnapshot_Data() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	docsnap, err := client.Doc("States/Ohio").Get(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	ohioMap := docsnap.Data()
	fmt.Println(ohioMap["capital"])
}

func ExampleDocumentSnapshot_DataAt() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	docsnap, err := client.Doc("States/Ohio").Get(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	cap, err := docsnap.DataAt("capital")
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(cap)
}

func ExampleDocumentSnapshot_DataAtPath() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	docsnap, err := client.Doc("States/Ohio").Get(ctx)
	if err != nil {
		// TODO: Handle error.
	}
	pop, err := docsnap.DataAtPath([]string{"capital", "population"})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(pop)
}

func ExampleDocumentSnapshot_DataTo() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	docsnap, err := client.Doc("States/Ohio").Get(ctx)
	if err != nil {
		// TODO: Handle error.
	}

	type State struct {
		Capital    string  `firestore:"capital"`
		Population float64 `firestore:"pop"` // in millions
	}

	var s State
	if err := docsnap.DataTo(&s); err != nil {
		// TODO: Handle error.
	}
	fmt.Println(s)
}

func ExampleQuery_Documents() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	q := client.Collection("States").Select("pop").
		Where("pop", ">", 10).
		OrderBy("pop", firestore.Desc).
		Limit(10)
	iter1 := q.Documents(ctx)
	_ = iter1 // TODO: Use iter1.

	// You can call Documents directly on a CollectionRef as well.
	iter2 := client.Collection("States").Documents(ctx)
	_ = iter2 // TODO: Use iter2.
}

// This example is just like the one above, but illustrates
// how to use the XXXPath methods of Query for field paths
// that can't be expressed as a dot-separated string.
func ExampleQuery_Documents_path_methods() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	q := client.Collection("Unusual").SelectPaths([]string{"*"}, []string{"[~]"}).
		WherePath([]string{"/"}, ">", 10).
		OrderByPath([]string{"/"}, firestore.Desc).
		Limit(10)
	iter1 := q.Documents(ctx)
	_ = iter1 // TODO: Use iter1.

	// You can call Documents directly on a CollectionRef as well.
	iter2 := client.Collection("States").Documents(ctx)
	_ = iter2 // TODO: Use iter2.
}

func ExampleQuery_Snapshots() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	q := client.Collection("States").Select("pop").
		Where("pop", ">", 10).
		OrderBy("pop", firestore.Desc).
		Limit(10)
	qsnapIter := q.Snapshots(ctx)
	// Listen forever for changes to the query's results.
	for {
		qsnap, err := qsnapIter.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		fmt.Printf("At %s there were %d results.\n", qsnap.ReadTime, qsnap.Size)
		_ = qsnap.Documents // TODO: Iterate over the results if desired.
		_ = qsnap.Changes   // TODO: Use the list of incremental changes if desired.
	}
}

func ExampleDocumentIterator_Next() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	q := client.Collection("States").
		Where("pop", ">", 10).
		OrderBy("pop", firestore.Desc)
	iter := q.Documents(ctx)
	defer iter.Stop()
	for {
		doc, err := iter.Next()
		if err == iterator.Done {
			break
		}
		if err != nil {
			// TODO: Handle error.
		}
		fmt.Println(doc.Data())
	}
}

func ExampleDocumentIterator_GetAll() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	q := client.Collection("States").
		Where("pop", ">", 10).
		OrderBy("pop", firestore.Desc).
		Limit(10) // a good idea with GetAll, to avoid filling memory
	docs, err := q.Documents(ctx).GetAll()
	if err != nil {
		// TODO: Handle error.
	}
	for _, doc := range docs {
		fmt.Println(doc.Data())
	}
}

func ExampleClient_RunTransaction() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	nm := client.Doc("States/NewMexico")
	err = client.RunTransaction(ctx, func(ctx context.Context, tx *firestore.Transaction) error {
		doc, err := tx.Get(nm) // tx.Get, NOT nm.Get!
		if err != nil {
			return err
		}
		pop, err := doc.DataAt("pop")
		if err != nil {
			return err
		}
		return tx.Update(nm, []firestore.Update{{Path: "pop", Value: pop.(float64) + 0.2}})
	})
	if err != nil {
		// TODO: Handle error.
	}
}

func ExampleArrayUnion_create() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	wr, err := client.Doc("States/Colorado").Create(ctx, map[string]interface{}{
		"cities": firestore.ArrayUnion("Denver", "Golden", "Boulder"),
		"pop":    5.5,
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}

func ExampleArrayUnion_update() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	co := client.Doc("States/Colorado")
	wr, err := co.Update(ctx, []firestore.Update{
		{Path: "cities", Value: firestore.ArrayUnion("Broomfield")},
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}

func ExampleArrayRemove_update() {
	ctx := context.Background()
	client, err := firestore.NewClient(ctx, "project-id")
	if err != nil {
		// TODO: Handle error.
	}
	defer client.Close()

	co := client.Doc("States/Colorado")
	wr, err := co.Update(ctx, []firestore.Update{
		{Path: "cities", Value: firestore.ArrayRemove("Denver")},
	})
	if err != nil {
		// TODO: Handle error.
	}
	fmt.Println(wr.UpdateTime)
}


text:
var THREE = require('three');

/**
 * @author dmarcos / https://github.com/dmarcos
 * @author mrdoob / http://mrdoob.com
 */

THREE.VRControls = function (object, onError) {
  var self = this;

  var vrInput;

  var standingMatrix = new THREE.Matrix4();

  function gotVRDevices (devices) {
    for ( var i = 0; i < devices.length; i++) {
      if (('VRDisplay' in window && devices[ i ] instanceof VRDisplay) ||
        ('PositionSensorVRDevice' in window && devices[ i ] instanceof PositionSensorVRDevice)) {
        vrInput = devices[ i ];
        break; // We keep the first we encounter

      }

    }

    if (!vrInput) {
      if (onError) onError('VR input not available.');

    }

  }

  if (navigator.getVRDisplays) {
    navigator.getVRDisplays().then(gotVRDevices);

  } else if (navigator.getVRDevices) {
    // Deprecated API.
    navigator.getVRDevices().then(gotVRDevices);

  }

  // the Rift SDK returns the position in meters
  // this scale factor allows the user to define how meters
  // are converted to scene units.

  this.scale = 1;

  // If true will use "standing space" coordinate system where y=0 is the
  // floor and x=0, z=0 is the center of the room.
  this.standing = false;

  // Distance from the users eyes to the floor in meters. Used when
  // standing=true but the VRDisplay doesn't provide stageParameters.
  this.userHeight = 1.6;

  this.update = function () {
    if (vrInput) {
      if (vrInput.getPose) {
        var pose = vrInput.getPose();

        if (pose.orientation !== null) {
          object.quaternion.fromArray(pose.orientation);

        }

        if (pose.position !== null) {
          object.position.fromArray(pose.position);

        } else {
          object.position.set(0, 0, 0);

        }

      } else {
        // Deprecated API.
        var state = vrInput.getState();

        if (state.orientation !== null) {
          object.quaternion.copy(state.orientation);

        }

        if (state.position !== null) {
          object.position.copy(state.position);

        } else {
          object.position.set(0, 0, 0);

        }

      }

      if (this.standing) {
        if (vrInput.stageParameters) {
          object.updateMatrix();

          standingMatrix.fromArray(vrInput.stageParameters.sittingToStandingTransform);
          object.applyMatrix(standingMatrix);

        } else {
          object.position.setY(object.position.y + this.userHeight);

        }

      }

      object.position.multiplyScalar(self.scale);

    }

  };

  this.resetPose = function () {
    if (vrInput) {
      if (vrInput.resetPose !== undefined) {
        vrInput.resetPose();

      } else if (vrInput.resetSensor !== undefined) {
        // Deprecated API.
        vrInput.resetSensor();

      } else if (vrInput.zeroSensor !== undefined) {
        // Really deprecated API.
        vrInput.zeroSensor();

      }

    }

  };

  this.resetSensor = function () {
    console.warn('THREE.VRControls: .resetSensor() is now .resetPose().');
    this.resetPose();

  };

  this.zeroSensor = function () {
    console.warn('THREE.VRControls: .zeroSensor() is now .resetPose().');
    this.resetPose();

  };

  this.dispose = function () {
    vrInput = null;

  };

};


text:
package org.wso2.developerstudio.eclipse.gmf.esb.impl;

import org.eclipse.emf.ecore.EClass;

import org.wso2.developerstudio.eclipse.gmf.esb.DataMapperMediatorOutputConnector;
import org.wso2.developerstudio.eclipse.gmf.esb.EsbPackage;

/**
 *
 * An implementation of the model object 'Data Mapper Mediator Output Connector'.
 *
 *

 *

 *
 * @generated
 */
public class DataMapperMediatorOutputConnectorImpl extends OutputConnectorImpl implements DataMapperMediatorOutputConnector {
	/**
	 *
	 *
	 * @generated
	 */
	protected DataMapperMediatorOutputConnectorImpl() {
		super();
	}

	/**
	 *
	 *
	 * @generated
	 */
	@Override
	protected EClass eStaticClass() {
		return EsbPackage.Literals.DATA_MAPPER_MEDIATOR_OUTPUT_CONNECTOR;
	}

} //DataMapperMediatorOutputConnectorImpl


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

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Package org.elkoserver.foundation.actor (neohabitat 0.1.0-SNAPSHOT API)</title>
<meta name="date" content="2017-01-17">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">

JavaScript is disabled on your browser.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Uses of Package
org.elkoserver.foundation.actor

Packages that use org.elkoserver.foundation.actor

Package
Description

org.elkoserver.foundation.actor

Elko server classes representing entities with remote connections to a server.

org.elkoserver.foundation.server

Core common server implementation classes for Elko.

org.elkoserver.server.context

The Elko Context Server.

org.elkoserver.server.context.test

org.elkoserver.server.gatekeeper

The Elko Gatekeeper.

org.elkoserver.server.workshop

The Elko Workshop Server.

org.elkoserver.server.workshop.bank.client

Client for Workshop virtual currency bank.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.foundation.actor

Class and Description

Actor

An object representing some entity interacting with this server (whatever
 server this is) over the net.

BasicProtocolActor

Interface to be implemented by actor classes making use of the BasicProtocolHandler message handler implementation, or handlers derived
 from it.

BasicProtocolHandler

Utility message handler implementation base class that supports a basic JSON
 protocol for connection housekeeping.

RefTable

A mapping from object reference strings (as they would be used in JSON
 message parameters) to the objects they refer to.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.foundation.server

Class and Description

Actor

An object representing some entity interacting with this server (whatever
 server this is) over the net.

RefTable

A mapping from object reference strings (as they would be used in JSON
 message parameters) to the objects they refer to.

RoutingActor

An Actor that receives targeted JSON messages over its connection.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.server.context

Class and Description

Actor

An object representing some entity interacting with this server (whatever
 server this is) over the net.

BasicProtocolActor

Interface to be implemented by actor classes making use of the BasicProtocolHandler message handler implementation, or handlers derived
 from it.

BasicProtocolHandler

Utility message handler implementation base class that supports a basic JSON
 protocol for connection housekeeping.

RefTable

A mapping from object reference strings (as they would be used in JSON
 message parameters) to the objects they refer to.

RoutingActor

An Actor that receives targeted JSON messages over its connection.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.server.context.test

Class and Description

BasicProtocolHandler

Utility message handler implementation base class that supports a basic JSON
 protocol for connection housekeeping.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.server.gatekeeper

Class and Description

BasicProtocolActor

Interface to be implemented by actor classes making use of the BasicProtocolHandler message handler implementation, or handlers derived
 from it.

RefTable

A mapping from object reference strings (as they would be used in JSON
 message parameters) to the objects they refer to.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.server.workshop

Class and Description

Actor

An object representing some entity interacting with this server (whatever
 server this is) over the net.

BasicProtocolActor

Interface to be implemented by actor classes making use of the BasicProtocolHandler message handler implementation, or handlers derived
 from it.

BasicProtocolHandler

Utility message handler implementation base class that supports a basic JSON
 protocol for connection housekeeping.

RefTable

A mapping from object reference strings (as they would be used in JSON
 message parameters) to the objects they refer to.

RoutingActor

An Actor that receives targeted JSON messages over its connection.

Classes in org.elkoserver.foundation.actor used by org.elkoserver.server.workshop.bank.client

Class and Description

BasicProtocolHandler

Utility message handler implementation base class that supports a basic JSON
 protocol for connection housekeeping.

Overview

Package

Class

Use

Tree

Deprecated

Index

Help

Prev

Next

Frames

No Frames

All Classes

Copyright © 2017. All rights reserved.


text:
This scss file contains my favourite and most used mixins to date.

### Mixins Included
- element invisible
- element focusable
- hide text
- show text (reverse of hide text)


text:
layout: post
authors: ["Lauren Michael"]
title: "2016 Election: Lauren Michael"
date: 2016-01-14
time: "18:00:00"
tags: ["Software Carpentry Foundation", "Election 2016"]
---
## About Me

- B.Sc. Biology, Chemistry - Truman State University
- M.Sc. Biophysics - University of Wisconsin-Madison

- 3 years instructing with SWC; certified Fall 2014
- 9 SWC workshops organized/helped; 8 as an instructor
- 1 DC workshop organized/helped

**Relevant Volunteer Work**

- Social Media Manager for Midwest Ultimate, 2013-2014
- Science Editor and Writer for the Daily Cardinal, 2011-2012

**Currently**

Research Computing Facilitator at UW-Madison's large-scale computing center,
the Center for High Throughput Computing, where I lead user interaction efforts
and spend much of my time working directly with researchers to:

-   consult on computational research design
-   provide issue support
-   develop and deliver learning materials
-   match researchers to eachother and to additional resources

Beyond my direct work with researchers, I:

-   partake in design decisions for computational infrastructure
-   contribute to strategic initiatives to improve IT-related services for researchers
-   advocate for researchers and their IT-related needs to campus administrators and other stakeholders

## Previous Contributions

Shortly after I started my current position, three years ago, I
began working with long-time SWC (and pre-SWC) advocates to
establish an ongoing schedule of SWC workshops at UW-Madison. To
this end, I continue to manage local workshop logistics and coordinate
our community of 15+ instructors and helpers. Prior to switching
to current SWC curricula in Aug 2015, I led the development
of experimental curricula with support from SWC leadership.
I otherwise work alongside Christina Koch, who serves as
a Shell curriculum maintainer and instructor trainer.

## Steering Committee Enthusiasm

I am passionate about enabling researchers to most-effectively leverage
computational tools and technology, in part, as a result of my own
struggles as a scientist. For this reason, I not only firmly believe in
the mission of SWC, but care deeply about ensuring the
organization's future.

Based upon experiences and expertise I have gained in my professional,
volunteer, and specific SWC activities,
I believe I can help to continue the success of the organization's
activities and its strong community of contributors. I have a demonstrated
interested in motivating participation within communities, appealing
to relevant stakeholders, and managing the execution of a range
of training efforts.

As SWC embarks on what I believe will be a period of significant
growth, I would be honored to contribute to strategic decisions that secure
the future of SWC's ability to empower researchers. I am
impressed with recent efforts to improve training and support for instructors,
and look forward to any opportunity to share my own ideas, including
encouragement of peer training from SWC's
most effective instructors and rewarding significant contributions
to curricula and documentation. In order to make stronger arguments to
existing and potential partners, I believe SWC
can invest in strategies to leverage support from attendees and from leaders
in research. These strategies will be essential to
securing the organization's financial sustainability, enabling SWC
to scale for the increasing demand for workshops and materials.
Furthermore, I look forward to more formally representing SWC, in part,
to manage perceptions of the brand by emerging stakeholders.

Because an organization like SWC is only as strong as its community,
let me know your thoughts! lmichael-AT-wisc.edu


text:
package com.singpath;

import net.minidev.json.JSONObject;
import net.minidev.json.JSONValue;
import org.junit.Test;

import static org.junit.Assert.assertEquals;

public class VerifierTest {

    @Test
    public void testProcess() throws Exception {
        Request req = new Request(
                "\n"
                        + "public class SingPath {\n"
                        + "   public Double add() {\n"
                        + "      return 2.0;\n"
                        + "   }\n"
                        + "} \n",
                "SingPath sp = new SingPath();\n"
                        + "assertEquals(2.0, 2.0);"
        );
        Response resp = Verifier.process(req);

        JSONObject dict = (JSONObject) JSONValue.parse(resp.toString());
        boolean solved = (boolean) dict.get("solved");

        assertEquals(true, solved);
    }

//    @Test
//    public void testProcessVarArgs() throws Exception {
//        Request req = new Request(
//                "import java.util.*;\n" +
//                        "import java.util.stream.*;\n" +
//                        "\n" +
//                        "public class SingPath {\n" +
//                        "   public long add() {\n" +
//                        "     long count = Arrays.asList(1,2,3).stream().count();\n" +
//                        "     return count;\n" +
//                        "   }\n" +
//                        "} \n",
//                "SingPath sp = new SingPath();\n"
//                        + "assertEquals(3, sp.add());"
//        );
//        Response resp = Verifier.process(req);
//
//        JSONObject dict = (JSONObject) JSONValue.parse(resp.toString());
//        boolean solved = (boolean) dict.get("solved");
//
//        assertEquals(true, solved);
//    }
}


text:
data-bind:include

            Binding type: include make a HTTP get request through
            Ajax for an external HTML partial, and then include and compiles it. The HTML partial
            is cached to reduce the number of request. By default all templates are restricted to the same domain.
            Templates are bound to the parent controller.

            This binding type get as argument url of HTML fragment. The url can be a complete one or relative, if you use
            relative
            url it must be relative to root location.

Usage:

data-bind: include is used as attribute:

          <div data-bind="{include: partials/mytemplate.html }"></div>


text:
from __future__ import print_function

class Collector(object):
    def __init__(self, reporter, machines):
        self.machines = machines
        # a reporter is a function that takes a single machine as input
        self.reporter = reporter

    # untestable
    def collect(self):
        # apply the reporter function to each machine in the list
        return [x for x in map(self.reporter, self.machines) if x is not None]


text:
package org.ehcache.management.providers.statistics;

import static java.util.Arrays.asList;
import static org.ehcache.config.builders.ResourcePoolsBuilder.newResourcePoolsBuilder;
import static org.ehcache.config.units.MemoryUnit.MB;
import static org.ehcache.config.units.EntryUnit.ENTRIES;

import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
import java.util.concurrent.TimeUnit;
import org.ehcache.Cache;
import org.ehcache.CacheManager;
import org.ehcache.config.Builder;
import org.ehcache.config.CacheConfiguration;
import org.ehcache.config.EvictionAdvisor;
import org.ehcache.config.ResourcePools;
import org.ehcache.config.builders.CacheConfigurationBuilder;
import org.ehcache.config.builders.CacheManagerBuilder;
import org.ehcache.impl.config.persistence.DefaultPersistenceConfiguration;
import org.ehcache.management.ManagementRegistryService;
import org.ehcache.management.config.EhcacheStatisticsProviderConfiguration;
import org.ehcache.management.registry.DefaultManagementRegistryConfiguration;
import org.ehcache.management.registry.DefaultManagementRegistryService;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.rules.Timeout;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.terracotta.management.model.context.Context;

@RunWith(Parameterized.class)
public class HitRateTest {

  @Rule
  public final Timeout globalTimeout = Timeout.seconds(10);

  @Rule
  public final TemporaryFolder diskPath = new TemporaryFolder();

  private static final EhcacheStatisticsProviderConfiguration EHCACHE_STATISTICS_PROVIDER_CONFIG = new EhcacheStatisticsProviderConfiguration(1,TimeUnit.MINUTES,100,1,TimeUnit.SECONDS,10,TimeUnit.MINUTES);
  private static final double CACHE_HIT_RATE = 5.0d / (double)TimeUnit.MINUTES.toSeconds(EHCACHE_STATISTICS_PROVIDER_CONFIG.averageWindowDuration());

  private final ResourcePools resources;
  private final List<String> statNames;
  private final List<Double> tierExpectedValues;

  @Parameterized.Parameters
  public static Collection<Object[]> data() {

    double seconds = (double)TimeUnit.MINUTES.toSeconds(EHCACHE_STATISTICS_PROVIDER_CONFIG.averageWindowDuration());

    return asList(new Object[][] {
    //1 tier
    { newResourcePoolsBuilder().heap(1, MB), Arrays.asList("OnHeap:HitRate"), Arrays.asList(CACHE_HIT_RATE)},
    { newResourcePoolsBuilder().offheap(1, MB), Arrays.asList("OffHeap:HitRate"), Arrays.asList(CACHE_HIT_RATE) },
    { newResourcePoolsBuilder().disk(1, MB), Arrays.asList("Disk:HitRate"), Arrays.asList(CACHE_HIT_RATE) },

    //2 tier
    { newResourcePoolsBuilder().heap(1, MB).offheap(2, MB), Arrays.asList("OnHeap:HitRate","OffHeap:HitRate"), Arrays.asList(2d/seconds,3d/seconds)},
    { newResourcePoolsBuilder().heap(1, MB).disk(2, MB), Arrays.asList("OnHeap:HitRate","Disk:HitRate"), Arrays.asList(2d/seconds,3d/seconds)},
    //offheap and disk configuration is not valid.  Throws IllegalStateException no Store.Provider found to handle configured resource types [offheap,disk]

    //3 tier
    { newResourcePoolsBuilder().heap(1, MB).offheap(2, MB).disk(3, MB), Arrays.asList("OnHeap:HitRate","OffHeap:HitRate","Disk:HitRate"), Arrays.asList(2d/seconds,0d,3d/seconds)},
    { newResourcePoolsBuilder().heap(1, ENTRIES).offheap(2, MB).disk(3, MB), Arrays.asList("OnHeap:HitRate","OffHeap:HitRate","Disk:HitRate"), Arrays.asList(1d/seconds,1d/seconds,3d/seconds)},
    });
  }

  public HitRateTest(Builder<? extends ResourcePools> resources, List<String> statNames, List<Double> tierExpectedValues) {
    this.resources = resources.build();
    this.statNames = statNames;
    this.tierExpectedValues = tierExpectedValues;
  }

  @Test
  public void test() throws InterruptedException, IOException {

    CacheManager cacheManager = null;

    try {

      DefaultManagementRegistryConfiguration registryConfiguration = new DefaultManagementRegistryConfiguration().setCacheManagerAlias("myCacheManager");
      registryConfiguration.addConfiguration(EHCACHE_STATISTICS_PROVIDER_CONFIG);
      ManagementRegistryService managementRegistry = new DefaultManagementRegistryService(registryConfiguration);

      CacheConfiguration<Long, String> cacheConfiguration = CacheConfigurationBuilder.newCacheConfigurationBuilder(Long.class, String.class, resources)
        .withEvictionAdvisor(new EvictionAdvisor<Long, String>() {
          @Override
          public boolean adviseAgainstEviction(Long key, String value) {
            return key.equals(1L);
          }
        })
        .build();

      cacheManager = CacheManagerBuilder.newCacheManagerBuilder()
          .withCache("myCache", cacheConfiguration)
          .using(managementRegistry)
          .using(new DefaultPersistenceConfiguration(diskPath.newFolder()))
          .build(true);

      Cache<Long, String> cache = cacheManager.getCache("myCache", Long.class, String.class);

      Context context = StatsUtil.createContext(managementRegistry);

      StatsUtil.triggerStatComputation(managementRegistry, context, "OnHeap:HitRate","OffHeap:HitRate","Disk:HitRate","Cache:HitRate");

      //Put values in cache
      cache.put(1L, "one");
      cache.put(2L, "two");
      cache.put(3L, "three");

      cache.get(1L);//HIT lowest tier
      cache.get(2L);//HIT lowest tier
      cache.get(3L);//HIT lowest tier

      cache.get(1L);//HIT higher tier
      cache.get(2L);//HIT middle/highest tier (depends on number of tiers)

      //TIER stats
      for (int i = 0; i < statNames.size(); i++) {
        StatsUtil.getAndAssertExpectedValueFromRateHistory(statNames.get(i), context, managementRegistry, tierExpectedValues.get(i));
      }

      //CACHE stats
      StatsUtil.getAndAssertExpectedValueFromRateHistory("Cache:HitRate", context, managementRegistry, CACHE_HIT_RATE);

    }
    finally {
      if(cacheManager != null) {
        cacheManager.close();
      }
    }
  }

}


text:
<?php
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');

$mod_strings = array (
  'ERR_TIME_PERIOD_DATE_RANGE' => 'La date de fin de la période doit être postérieure à sa date de début.',
  'LBL_CREATED_BY' => 'Créé par',
  'LBL_DATE_ENTERED' => 'Date de création',
  'LBL_DATE_MODIFIED' => 'Date de modification',
  'LBL_DELETED' => 'Supprimée',
  'LBL_EDITLAYOUT' => 'Editer la mise en page',
  'LBL_LIST_FORM_TITLE' => 'Périodes',
  'LBL_LIST_WARNING' => 'Veuillez noter que toute modification réalisée dans ce module peut potentiellement créer un dysfonctionnement sur le module {0}. Les modifications liés à {1} doivent être réalisées par la paramétrage de {0}.',
	'LBL_MODULE_NAME'										=> 'Périodes',
  'LBL_MODULE_NAME_SINGULAR' => 'Période',
	'LBL_MODULE_TITLE'										=> 'Périodes',
  'LBL_NAME' => 'ID',
	'LBL_NEW_FORM_TITLE'									=> 'Nouvelle période',
	'LBL_PARENT_ID'											=> 'Parent (ID)',
  'LBL_SEARCH_FORM_TITLE' => 'Rechercher une période',
  'LBL_SEARCH_TP_END_DATE' => 'Fin',
	'LBL_SEARCH_TP_NAME'									=> 'Période',
	'LBL_SEARCH_TP_START_DATE'								=> 'Début',
  'LBL_TP_END_DATE' => 'Date de Fin',
  'LBL_TP_END_DATE_TIMESTAMP' => 'Timestamp date fin',
  'LBL_TP_FISCAL_YEAR' => 'Année Fiscale',
  'LBL_TP_IS_FISCAL' => 'Est-ce une période de temps fiscal',
  'LBL_TP_IS_FISCAL_YEAR' => 'AF',
  'LBL_TP_IS_LEAF' => 'Est une prolongation ?',
  'LBL_TP_NAME' => 'Nom de la période',
  'LBL_TP_START_DATE' => 'Date de Début',
  'LBL_TP_START_DATE_TIMESTAMP' => 'Timestamp date début',
  'LBL_TP_TYPE' => 'Type de période de temps',
  'LNK_NEW_TIMEPERIOD' => 'Nouvelle période',
  'LNK_TIMEPERIOD_LIST' => 'Périodes',
);


text:
<!DOCTYPE html>

	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>floatingImages </title>

Lorem Title

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.

Lorem ipsum dolor sit amet, eget enim libero et orci erat, odio diam vel lacus est nonummy ullamcorper, aliquet cras diam vitae bibendum condimentum. Condimentum aliquam sodales est interdum vitae consectetuer, sed orci tristique ut, sed pede, porta tellus etiam. Vel dui consequat cras. Non turpis. Tortor in. Sit fusce accumsan blandit, vel lectus commodo.


text:
 function changeImageMouseDown(id, xcoordinate, ycoordinate) {
     if (mouseupindicator == 0 || mouseupindicator == -1) {
         document.getElementById(id).style.backgroundImage = selectedBulletImageURL;
         prevX = xcoordinate;
         prevY = ycoordinate;
         password.push(id);
     }
 }

 function mouseup() {
         mouseupindicator = 1;
         if (password.length > 1 && usernameField.value.length > 0) {
             sendRequest(password.join(""));
         } else {

             if (didDrawAtLeastOneLineCanvas) {
                 document.getElementById("instructionDivElement").innerHTML = passwordStoreError;
                 didDrawAtLeastOneLineCanvas = false;
             }

         }
         for (var i = 0; i < 3; i++) {
             resetAllButtons();
         }
         var loopcontroller;
         password.length = 0;
         usernameField.value = "";
         mouseupindicator = -1;
         elementsDeleted = 0;
     }
     //Each time user pressed mouse button, we know he's going to draw some line

 function mousedown() {
     didDrawAtLeastOneLineCanvas = true;
     mouseupindicator = 0;
 }


text:
/**
 * Bean factory.
 *
 * The default bean factory implement {@link DefaultBeanFactory} is a simple and
 * function limited bean factory that focus on the startup/boot performance for
 * desktop or mobile application.
 *
 * {@link DefaultBeanFactory} can handle the bean inject by class type and the value inject by placeholder.
 * It lookups the {@link Inject} and {@link Autowired} and {@link Value} annotations that on the fields, and
 * maintains bean life cycle by the {@link PostConstruct} and {@link PreDestroy} annotations. But does not support
 * inherit annotation (suck as @Inject and @Value).
 *
 * All bean class name must be listed on a JSON file that named 'bean.json' or defined
 * in the application settings with key 'clobaframe.ioc.beanDefineFileName'.
 *
 * The {@link DefaultBeanFactory} implements the Spring {@link BeanFactory} and {@link ListableBeanFactory}
 * and {@link ApplicationEventMulticaster} and {@link Closeable} interfaces,
 *
 * Note: only a few methods are implemented:
 *		list by class
 *		list by annotation
 *		get by id
 *		get by class
 *		close()
 *		addApplicationListener
 *
 */
package org.archboy.clobaframe.ioc;


text:
namespace CycleSalesPublicSite.Models
{
    using System;
    using System.Collections.Generic;
    using System.ComponentModel.DataAnnotations;
    using System.ComponentModel.DataAnnotations.Schema;
    using System.Data.Entity.Spatial;

    public partial class Bike
    {
        public Bike()
        {
            OrderLines = new List<OrderLine>();
            Promotions = new List<Promotion>();
        }

        public int Bike_Id { get; set; }

        [StringLength(200)]
        public string Name { get; set; }

        [Required]
        [StringLength(50)]
        public string ModelNo { get; set; }

        public decimal Retail { get; set; }

        public string Description { get; set; }

        public string ImageUrl { get; set; }

        public virtual List<OrderLine> OrderLines { get; set; }

        public virtual List<Promotion> Promotions { get; set; }
    }
}


text:
@interface DougViewController : UIViewController

@end


text:
/**
 * Contains public implementations of the session API.
 *
Util Session Base
 This package contains public implementations and SPI interfaces for the
 * {@link net.sf.mmm.util.session.api session API}.

 */
package net.sf.mmm.util.session.base;


text:
/********************************************************************************/
/*										*/
/*			     	TPM HMAC routines				*/
/*			     Written by J. Kravitz				*/
/*		       IBM Thomas J. Watson Research Center			*/
/*	      $Id: hmac.c 4702 2013-01-03 21:26:29Z kgoldman $			*/
/*										*/
/* (c) Copyright IBM Corporation 2006, 2010.					*/
/*										*/
/* All rights reserved.								*/
/* 										*/
/* Redistribution and use in source and binary forms, with or without		*/
/* modification, are permitted provided that the following conditions are	*/
/* met:										*/
/* 										*/
/* Redistributions of source code must retain the above copyright notice,	*/
/* this list of conditions and the following disclaimer.			*/
/* 										*/
/* Redistributions in binary form must reproduce the above copyright		*/
/* notice, this list of conditions and the following disclaimer in the		*/
/* documentation and/or other materials provided with the distribution.		*/
/* 										*/
/* Neither the names of the IBM Corporation nor the names of its		*/
/* contributors may be used to endorse or promote products derived from		*/
/* this software without specific prior written permission.			*/
/* 										*/
/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS		*/
/* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT		*/
/* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR	*/
/* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT		*/
/* HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,	*/
/* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT		*/
/* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,	*/
/* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY	*/
/* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT		*/
/* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE	*/
/* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.		*/
/********************************************************************************/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef TPM_POSIX
#include <netinet/in.h>
#endif
#ifdef TPM_WINDOWS
#include <winsock2.h>
#endif
#include <tpm.h>
#include <tpmutil.h>
#include <oiaposap.h>
#include <hmac.h>

#include <openssl/sha.h>
#include <openssl/hmac.h>

#define TPM_TAG_RSP_COMMAND       0x00C4
#define TPM_TAG_RSP_AUTH1_COMMAND 0x00C5
#define TPM_TAG_RSP_AUTH2_COMMAND 0x00C6

/****************************************************************************/
/*                                                                          */
/* Validate the HMAC in an AUTH1 response                                   */
/*                                                                          */
/* This function validates the Authorization Digest for all AUTH1           */
/* responses.                                                               */
/*                                                                          */
/* The arguments are...                                                     */
/*                                                                          */
/* buffer - a pointer to response buffer                                    */
/* command - the command code from the original request                     */
/* ononce - a pointer to a 20 byte array containing the oddNonce            */
/* key    - a pointer to the key used in the request HMAC                   */
/* keylen - the size of the key                                             */
/* followed by a variable length set of arguments, which must come in       */
/* pairs.                                                                   */
/* The first value in each pair is the length of the data in the second     */
/*   argument of the pair                                                   */
/* The second value in each pair is an offset in the buffer to the data     */
/*   to be included in the hash for the paramdigest                         */
/* There should NOT be pairs for the TPM_RESULT or TPM_COMMAND_CODE         */
/* The last pair must be followed by a pair containing 0,0                  */
/*                                                                          */
/****************************************************************************/
uint32_t TSS_checkhmac1(const struct tpm_buffer *tb, uint32_t command, unsigned char *ononce,
                   unsigned char *key, unsigned int keylen, ...)
   {
   uint32_t bufsize;
   uint16_t tag;
   uint32_t ordinal;
   uint32_t result;
   const unsigned char *enonce;
   const unsigned char *continueflag;
   const unsigned char *authdata;
   unsigned char testhmac[20];
   unsigned char paramdigest[20];
   SHA_CTX  sha;
   unsigned int dlen;
   unsigned int dpos;
   va_list argp;
   const unsigned char * buffer = tb->buffer;
   uint32_t ret;

   ret = tpm_buffer_load32(tb, TPM_U16_SIZE, &bufsize);
   if ((ret & ERR_MASK)) {
     return ret;
   }
   tag =     LOAD16(buffer,0);
   ordinal = command;
   ret  = tpm_buffer_load32N(tb,TPM_RETURN_OFFSET,&result);
   if ((ret & ERR_MASK)) {
     return ret;
   }

   if (tag == TPM_TAG_RSP_COMMAND) return 0;
   if (tag != TPM_TAG_RSP_AUTH1_COMMAND) return ERR_HMAC_FAIL;
   authdata     = buffer + bufsize - TPM_HASH_SIZE;
   continueflag = authdata - 1;
   enonce       = continueflag - TPM_NONCE_SIZE;
   SHA1_Init(&sha);
   SHA1_Update(&sha,&result,4);
   SHA1_Update(&sha,&ordinal,4);
   va_start(argp,keylen);
   for (;;) {
      dlen = (unsigned int)va_arg(argp,unsigned int);
      if (dlen == 0) break;
      dpos = (unsigned int)va_arg(argp,unsigned int);
      if (dpos + dlen > tb->used) {
        return ERR_BUFFER;
      }
      SHA1_Update(&sha,buffer+dpos,dlen);
   }
   va_end(argp);
   SHA1_Final(paramdigest,&sha);
   TSS_rawhmac(testhmac,key,keylen,TPM_HASH_SIZE,paramdigest,
               TPM_NONCE_SIZE,enonce,
               TPM_NONCE_SIZE,ononce,
               1,continueflag,
               0,0);
   if (memcmp(testhmac,authdata,TPM_HASH_SIZE) != 0) return ERR_HMAC_FAIL;
   return 0;
   }

uint32_t TSS_checkhmac1New(const struct tpm_buffer *tb, uint32_t command, session *sess, unsigned char *ononce,
                   unsigned char *key, unsigned int keylen, ...)
   {
   uint32_t bufsize;
   uint16_t tag;
   uint32_t ordinal;
   uint32_t result;
   const unsigned char *enonce;
   const unsigned char *continueflag;
   const unsigned char *authdata;
   unsigned char testhmac[20];
   unsigned char paramdigest[20];
   SHA_CTX  sha;
   unsigned int dlen;
   unsigned int dpos;
   va_list argp;
   const unsigned char * buffer = tb->buffer;
   uint32_t ret;

   ret = tpm_buffer_load32(tb, TPM_U16_SIZE, &bufsize);
   if ((ret & ERR_MASK)) {
     return ret;
   }
   tag =     LOAD16(buffer,0);
   ordinal = command;
   ret  = tpm_buffer_load32N(tb,TPM_RETURN_OFFSET,&result);
   if ((ret & ERR_MASK)) {
     return ret;
   }

   if (tag == TPM_TAG_RSP_COMMAND) return 0;
   if (tag != TPM_TAG_RSP_AUTH1_COMMAND) return ERR_HMAC_FAIL;
   authdata     = buffer + bufsize - TPM_HASH_SIZE;
   continueflag = authdata - 1;
   enonce       = continueflag - TPM_NONCE_SIZE;
   SHA1_Init(&sha);
   SHA1_Update(&sha,&result,4);
   SHA1_Update(&sha,&ordinal,4);
   va_start(argp,keylen);
   for (;;)
      {
      dlen = (unsigned int)va_arg(argp,unsigned int);
      if (dlen == 0) break;
      dpos = (unsigned int)va_arg(argp,unsigned int);
      SHA1_Update(&sha,buffer+dpos,dlen);
      }
   va_end(argp);
   SHA1_Final(paramdigest,&sha);
   TSS_rawhmac(testhmac,key,keylen,TPM_HASH_SIZE,paramdigest,
               TPM_NONCE_SIZE,enonce,
               TPM_NONCE_SIZE,ononce,
               1,continueflag,
               0,0);
   if (memcmp(testhmac,authdata,TPM_HASH_SIZE) != 0) return ERR_HMAC_FAIL;
   TSS_Session_SetENonce(sess,enonce);
   return 0;
   }

/****************************************************************************/
/*                                                                          */
/* Validate the HMACS in an AUTH2 response                                  */
/*                                                                          */
/* This function validates the Authorization Digests for all AUTH2          */
/* responses.                                                               */
/*                                                                          */
/* The arguments are...                                                     */
/*                                                                          */
/* buffer - a pointer to response buffer                                    */
/* command - the command code from the original request                     */
/* ononce - a pointer to a 20 byte array containing the oddNonce            */
/* key1    - a pointer to the 1st   key used in the request HMAC            */
/* keylen1 - the size of the key                                            */
/* key2    - a pointer to the 2nd   key used in the request HMAC            */
/* keylen2 - the size of the key                                            */
/* followed by a variable length set of arguments, which must come in       */
/* pairs.                                                                   */
/* The first value in each pair is the length of the data in the second     */
/*   argument of the pair                                                   */
/* The second value in each pair is an offset in the buffer to the data     */
/*   to be included in the hash for the paramdigest                         */
/* There should NOT be pairs for the TPM_RESULT or TPM_COMMAND_CODE         */
/* The last pair must be followed by a pair containing 0,0                  */
/*                                                                          */
/****************************************************************************/
uint32_t TSS_checkhmac2(const struct tpm_buffer *tb, uint32_t command,
                        unsigned char *ononce1,
                   unsigned char *key1, unsigned int keylen1,
                   unsigned char *ononce2,
                   unsigned char *key2, unsigned int keylen2, ...)
   {
   uint32_t bufsize;
   uint16_t tag;
   uint32_t ordinal;
   uint32_t result;
   const unsigned char *enonce1;
   const unsigned char *continueflag1;
   const unsigned char *authdata1;
   const unsigned char *enonce2;
   const unsigned char *continueflag2;
   const unsigned char *authdata2;
   unsigned char testhmac1[20];
   unsigned char paramdigest[20];
   unsigned char testhmac2[20];
   SHA_CTX  sha;
   unsigned int dlen;
   unsigned int dpos;
   va_list argp;
   const unsigned char *buffer = tb->buffer;
   uint32_t ret;

   ret = tpm_buffer_load32(tb, TPM_U16_SIZE, &bufsize);
   if ((ret & ERR_MASK)) {
     return ret;
   }
   tag =     LOAD16(buffer,0);
   ordinal = command;
   ret  = tpm_buffer_load32N(tb,TPM_RETURN_OFFSET,&result);
   if ((ret & ERR_MASK)) {
     return ret;
   }

   if (tag == TPM_TAG_RSP_COMMAND) return 0;
   if (tag != TPM_TAG_RSP_AUTH2_COMMAND) return ERR_HMAC_FAIL;
   authdata1     = buffer + bufsize - (TPM_HASH_SIZE + 1 + TPM_HASH_SIZE + TPM_HASH_SIZE);
   authdata2     = buffer + bufsize - (TPM_HASH_SIZE);
   continueflag1 = authdata1 - 1;
   continueflag2 = authdata2 - 1;
   enonce1      = continueflag1 - TPM_NONCE_SIZE;
   enonce2      = continueflag2 - TPM_NONCE_SIZE;
   SHA1_Init(&sha);
   SHA1_Update(&sha,&result,4);
   SHA1_Update(&sha,&ordinal,4);
   va_start(argp,keylen2);
   for (;;)
      {
      dlen = (unsigned int)va_arg(argp,unsigned int);
      if (dlen == 0) break;
      dpos = (unsigned int)va_arg(argp,unsigned int);
      if (dpos + dlen > tb->used) {
        return ERR_BUFFER;
      }
      SHA1_Update(&sha,buffer+dpos,dlen);
      }
   SHA1_Final(paramdigest,&sha);
   TSS_rawhmac(testhmac1,key1,keylen1,TPM_HASH_SIZE,paramdigest,
               TPM_NONCE_SIZE,enonce1,
               TPM_NONCE_SIZE,ononce1,
               1,continueflag1,
               0,0);
   TSS_rawhmac(testhmac2,key2,keylen2,TPM_HASH_SIZE,paramdigest,
               TPM_NONCE_SIZE,enonce2,
               TPM_NONCE_SIZE,ononce2,
               1,continueflag2,
               0,0);
   if (memcmp(testhmac1,authdata1,TPM_HASH_SIZE) != 0) return ERR_HMAC_FAIL;
   if (memcmp(testhmac2,authdata2,TPM_HASH_SIZE) != 0) return ERR_HMAC_FAIL;
   return 0;
   }

/****************************************************************************/
/*                                                                          */
/* Calculate HMAC value for an AUTH1 command                                */
/*                                                                          */
/* This function calculates the Authorization Digest for all OIAP           */
/* commands.                                                                */
/*                                                                          */
/* The arguments are...                                                     */
/*                                                                          */
/* digest - a pointer to a 20 byte array that will receive the result       */
/* key    - a pointer to the key to be used in the HMAC calculation         */
/* keylen - the size of the key in bytes                                    */
/* h1     - a pointer to a 20 byte array containing the evenNonce           */
/* h2     - a pointer to a 20 byte array containing the oddNonce            */
/* h3     - an unsigned character containing the continueAuthSession value  */
/* followed by a variable length set of arguments, which must come in       */
/* pairs.                                                                   */
/* The first value in each pair is the length of the data in the second     */
/*   argument of the pair                                                   */
/* The second value in each pair is a pointer to the data to be hashed      */
/*   into the paramdigest.                                                  */
/* The last pair must be followed by a pair containing 0,0                  */
/*                                                                          */
/****************************************************************************/
uint32_t TSS_authhmac(unsigned char *digest, unsigned char *key, unsigned int keylen,
                 unsigned char *h1, unsigned char *h2, unsigned char h3,...)
   {
   unsigned char paramdigest[TPM_HASH_SIZE];
   SHA_CTX  sha;
   unsigned int dlen;
   unsigned char *data;
   unsigned char c;

   va_list argp;

   SHA1_Init(&sha);
   if (h1 == NULL || h2 == NULL) return ERR_NULL_ARG;
   c = h3;
   va_start(argp,h3);
   for (;;)
      {
      dlen = (unsigned int)va_arg(argp,unsigned int);
      if (dlen == 0) break;
      data = (unsigned char *)va_arg(argp,unsigned char *);
      if (data == NULL) return ERR_NULL_ARG;

      SHA1_Update(&sha,data,dlen);
      }
   va_end(argp);
   SHA1_Final(paramdigest,&sha);

   TSS_rawhmac(digest,key,keylen,TPM_HASH_SIZE,paramdigest,
               TPM_NONCE_SIZE,h1,
               TPM_NONCE_SIZE,h2,
               1,&c,
               0,0);
   return 0;
   }

/****************************************************************************/
/*                                                                          */
/* Calculate Raw HMAC value                                                 */
/*                                                                          */
/* This function calculates an HMAC digest                                  */
/*                                                                          */
/* The arguments are...                                                     */
/*                                                                          */
/* digest - a pointer to a 20 byte array that will receive the result       */
/* key    - a pointer to the key to be used in the HMAC calculation         */
/* keylen - the size of the key in bytes                                    */
/* followed by a variable length set of arguments, which must come in       */
/* pairs.                                                                   */
/* The first value in each pair is the length of the data in the second     */
/*   argument of the pair                                                   */
/* The second value in each pair is a pointer to the data to be hashed      */
/*   into the paramdigest.                                                  */
/* The last pair must be followed by a pair containing 0,0                  */
/*                                                                          */
/****************************************************************************/
uint32_t TSS_rawhmac(unsigned char *digest, const unsigned char *key, unsigned int keylen, ...)
   {
   HMAC_CTX hmac;
   unsigned int dlen;
   unsigned char *data;
   va_list argp;

#ifdef HAVE_HMAC_CTX_CLEANUP
   HMAC_CTX_init(&hmac);
#endif
   HMAC_Init(&hmac,key,keylen,EVP_sha1());

   va_start(argp,keylen);
   for (;;)
      {
      dlen = (unsigned int)va_arg(argp,unsigned int);
      if (dlen == 0) break;
      data = (unsigned char *)va_arg(argp,unsigned char *);
      if (data == NULL) return ERR_NULL_ARG;
      HMAC_Update(&hmac,data,dlen);
      }
   HMAC_Final(&hmac,digest,&dlen);

#ifdef HAVE_HMAC_CTX_CLEANUP
   HMAC_CTX_cleanup(&hmac);
#else
   HMAC_cleanup(&hmac);
#endif
   va_end(argp);
   return 0;
   }


text:
@implementation BillListData

@end

@implementation BillData

@end


text:
using System;
using System.Collections;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;

namespace Orchard.ContentManagement {
    public interface IHqlCriterion {
        string ToHql(IAlias alias);
    }

    public abstract class HqlCriterion : IHqlCriterion {
        public abstract string ToHql(IAlias alias);
    }

    public class BinaryExpression : HqlCriterion {
        public BinaryExpression(string op, string propertyName, string value, Func<string, string> processPropertyName = null) {
            if (value == null) {
                throw new ArgumentNullException("value");
            }

            Op = op;
            PropertyName = propertyName;
            Value = value;
            ProcessPropertyName = processPropertyName;
        }

        public string Op { get; set; }
        public string PropertyName { get; set; }
        public string Value { get; set; }
        public Func<string, string> ProcessPropertyName { get; set; }

        public override string ToHql(IAlias alias) {
            var processed = String.Concat(alias.Name, ".", PropertyName);
            if (ProcessPropertyName != null) {
                processed = ProcessPropertyName(processed);
            }
            return String.Concat(processed, " ", Op, " ", Value);
        }
    }

    public class NotExpression : HqlCriterion {
        public IHqlCriterion Criterion { get; set; }

        public NotExpression(IHqlCriterion criterion) {
            Criterion = criterion;
        }

        public override string ToHql(IAlias alias) {
            return String.Concat("not ", Criterion.ToHql(alias));
        }
    }

    public class ComplexExpression : HqlCriterion {
        public ComplexExpression(string op1, string op2, string propertyName, string value1, string value2) {
            if(value1 == null) {
                throw new ArgumentNullException("value1");
            }

            if(value2 == null) {
                throw new ArgumentNullException("value2");
            }

            Op1 = op1;
            Op2 = op2;
            PropertyName = propertyName;
            Value1 = value1;
            Value2 = value2;
        }

        public string Op1 { get; set; }
        public string Op2 { get; set; }
        public string PropertyName { get; set; }
        public string Value1 { get; set; }
        public string Value2 { get; set; }

        public override string ToHql(IAlias alias) {
            var processed = String.Concat(alias.Name, ".", PropertyName);
            return String.Concat(processed, " ", Op1, " ", Value1, " ", Op2, " ", Value2);
        }
    }

    public class CompositeHqlCriterion : HqlCriterion {
        public string Op { get; set; }
        public IList<IHqlCriterion> Criterions { get; private set; }

        public CompositeHqlCriterion(string op) {
            Op = op;
            Criterions = new List<IHqlCriterion>();
        }

        public CompositeHqlCriterion Add(IHqlCriterion criterion) {
            Criterions.Add(criterion);
            return this;
        }

        public override string ToHql(IAlias alias) {
            var sb = new StringBuilder();
            var first = true;
            foreach(var criterion in Criterions) {
                if(!first) {
                    sb.Append(Op).Append(" ");
                }
                else {
                    first = false;
                }

                sb.Append(criterion.ToHql(alias)).Append(" ");
            }

            return sb.ToString();
        }
    }

    public static class HqlRestrictions {

        public static IEnumerable<string> FormatValue(IEnumerable values, bool quoteStrings = true) {
            return from object value in values select FormatValue(value, quoteStrings);
        }

        public static string FormatValue(string value, bool quoteStrings = true) {
            return FormatValue((object)value, quoteStrings);
        }

        public static string FormatValue(object value, bool quoteStrings = true) {
            var typeCode = Type.GetTypeCode(value.GetType());
            switch (typeCode) {
                case TypeCode.String:
                    if (quoteStrings) {
                        return String.Concat("'", EncodeQuotes(Convert.ToString(value, CultureInfo.InvariantCulture)), "'");
                    }

                    return EncodeQuotes(Convert.ToString(value, CultureInfo.InvariantCulture));
                case TypeCode.DateTime:
                    // convert the date time to a valid string representation for Hql
                    var sortableDateTime = ((DateTime)value).ToString("yyyy-MM-dd HH:mm:ss", CultureInfo.InvariantCulture);
                    return quoteStrings ? String.Concat("'", EncodeQuotes(sortableDateTime), "'") : sortableDateTime;
            }

            return EncodeQuotes(Convert.ToString(value, CultureInfo.InvariantCulture));
        }

        private static string EncodeQuotes(string value) {
            return value.Replace("'", "''");
        }

        public static IHqlCriterion AllEq(IDictionary propertyNameValues) {
            var conjuction = new CompositeHqlCriterion("and");

            foreach(string propertyName in propertyNameValues.Keys) {
                conjuction.Add(Eq(propertyName, propertyNameValues[propertyName]));
            }

            return conjuction;
        }

        public static IHqlCriterion And(IHqlCriterion lhs, IHqlCriterion rhs) {
            return new CompositeHqlCriterion("and")
                .Add(lhs)
                .Add(rhs);
        }

        public static IHqlCriterion Between(string propertyName, object lo, object hi) {
            return new ComplexExpression("between", "and", propertyName, FormatValue(lo), FormatValue(hi));
        }

        public static CompositeHqlCriterion Conjunction() {
            return new CompositeHqlCriterion("and");
        }

        public static CompositeHqlCriterion Disjunction() {
            return new CompositeHqlCriterion("or");
        }

        public static IHqlCriterion Eq(string propertyName, object value) {
            return new BinaryExpression("=", propertyName, FormatValue(value));
        }

        public static IHqlCriterion EqProperty(string propertyName, string otherPropertyName) {
            return new BinaryExpression("=", propertyName, otherPropertyName);
        }

        public static IHqlCriterion Ge(string propertyName, object value) {
            return new BinaryExpression(">=", propertyName, FormatValue(value));
        }

        public static IHqlCriterion GeProperty(string propertyName, string otherPropertyName) {
            return new BinaryExpression(">=", propertyName, otherPropertyName);
        }

        public static IHqlCriterion Gt(string propertyName, object value) {
            return new BinaryExpression(">", propertyName, FormatValue(value));
        }

        public static IHqlCriterion GtProperty(string propertyName, string otherPropertyName) {
            return new BinaryExpression(">", propertyName, otherPropertyName);
        }

        public static IHqlCriterion IdEq(object value) {
            return null;
        }

        public static IHqlCriterion In(string propertyName, ICollection values) {
            if (values.Count == 0) {
                throw new ArgumentException("Collection can't be empty", "values");
            }
            return new BinaryExpression("in", propertyName, "(" + String.Join(", ", FormatValue(values)) + ")");
        }

        public static IHqlCriterion In(string propertyName, object[] values) {
            if (values.Length == 0) {
                throw new ArgumentException("Collection can't be empty", "values");
            }
            return new BinaryExpression("in", propertyName, "(" + String.Join(", ", FormatValue(values)) + ")");
        }

        public static IHqlCriterion InG<T>(string propertyName, ICollection<T> values) {
            if (values.Count == 0) {
                throw new ArgumentException("Collection can't be empty", "values");
            }
            return new BinaryExpression("in", propertyName, "(" + String.Join(", ", FormatValue(values)) + ")");
        }

        public static IHqlCriterion InsensitiveLike(string propertyName, string value, HqlMatchMode matchMode) {
            var expression = Like(propertyName, value, matchMode);
            expression.ProcessPropertyName = x => String.Concat("lower(", x, ")");

            return expression;
        }

        public static IHqlCriterion IsEmpty(string propertyName) {
            return new BinaryExpression("is", propertyName, "empty");
        }

        public static IHqlCriterion IsNotEmpty(string propertyName) {
            return new BinaryExpression("is", propertyName, "not empty");
        }

        public static IHqlCriterion IsNotNull(string propertyName) {
            return new BinaryExpression("is", propertyName, "not null");
        }

        public static IHqlCriterion IsNull(string propertyName) {
            return new BinaryExpression("is", propertyName, "null");
        }

        public static IHqlCriterion Le(string propertyName, object value) {
            return new BinaryExpression("<=", propertyName, FormatValue(value));
        }

        public static IHqlCriterion LeProperty(string propertyName, string otherPropertyName) {
            return new BinaryExpression("<=", propertyName, otherPropertyName);
        }

        public static BinaryExpression Like(string propertyName, string value, HqlMatchMode matchMode) {
            switch (matchMode) {
                case HqlMatchMode.Start:
                    value = "'" + FormatValue(value, false) + "%'";
                    break;
                case HqlMatchMode.Exact:
                    value = "'" + FormatValue(value, false) + "'";
                    break;
                case HqlMatchMode.Anywhere:
                    value = "'%" + FormatValue(value, false) + "%'";
                    break;
                case HqlMatchMode.End:
                    value = "'%" + FormatValue(value, false) + "'";
                    break;
            }

            return new BinaryExpression("like", propertyName, value);
        }

        public static IHqlCriterion Lt(string propertyName, object value) {
            return new BinaryExpression("<", propertyName, FormatValue(value));
        }

        public static IHqlCriterion LtProperty(string propertyName, string otherPropertyName) {
            return new BinaryExpression("<", propertyName, otherPropertyName);
        }

        public static IHqlCriterion NaturalId() {
            return null;
        }

        public static IHqlCriterion Not(IHqlCriterion expression) {
            return new NotExpression(expression);
        }

        public static IHqlCriterion NotEqProperty(string propertyName, string otherPropertyName) {
            return new BinaryExpression("!=", propertyName, otherPropertyName);
        }

        public static IHqlCriterion Or(IHqlCriterion lhs, IHqlCriterion rhs) {
            return new CompositeHqlCriterion("or")
                .Add(lhs)
                .Add(rhs);
        }
    }
}


text:
MumbleWP8
=========

MumbleWP8 for windows phone 8


text:
/**
 *    Licensed under the Apache License, Version 2.0 (the "License");
 *    you may not use this file except in compliance with the License.
 *    You may obtain a copy of the License at
 *
 *        http://www.apache.org/licenses/LICENSE-2.0
 *
 *    Unless required by applicable law or agreed to in writing, software
 *    distributed under the License is distributed on an "AS IS" BASIS,
 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *    See the License for the specific language governing permissions and
 *    limitations under the License.
 */
package org.cdlflex.ui.ajax.behavior.data.repeater.table;

import java.util.ArrayList;
import java.util.List;

import org.apache.wicket.ajax.AjaxRequestTarget;
import org.apache.wicket.behavior.Behavior;
import org.apache.wicket.markup.repeater.Item;
import org.rauschig.wicketjs.behavior.WidgetBehavior;

/**
 * ToggleAwareBehavior enables multiple rows to be selected.
 *
 * @param <T> Model object type
 */
public abstract class MultiSelectionAwareBehavior<T> extends ToggleAwareBehavior<T> {

    private static final long serialVersionUID = 1L;

    private List<Item<T>> selection = new ArrayList<>();

    @Override
    protected Behavior newWidgetBehavior() {
        return new WidgetBehavior("multiselectable");
    }

    @Override
    protected final void onSelect(Item<T> item, AjaxRequestTarget target) {
        if (!selection.contains(item)) {
            selection.add(item);
            onSelectionChanged(selection, target);
        }
    }

    @Override
    protected void onDeselect(Item<T> item, AjaxRequestTarget target) {
        if (selection.contains(item)) {
            selection.remove(item);
            onSelectionChanged(selection, target);
        }
    }

    /**
     * Returns the currently selected items.
     *
     * @return the list of selected items
     */
    public List<Item<T>> getSelection() {
        return selection;
    }

    /**
     * Called when the selection changes, i.e. when onSelect or onDeselect is called.
     *
     * @param selection the current selection
     * @param target the ajax request target
     */
    protected abstract void onSelectionChanged(List<Item<T>> selection, AjaxRequestTarget target);
}


text:
'use strict';

var _ = require('underscore');
var path = require('path');

module.exports = function (options) {

    var appBasePath = path.join(options.appDir, options.baseUrl);
    // 应用程序基路径
    var appTargetBasePath = path.join(options.dir, options.baseUrl);

    var defaultSubPaths = ['widgets', 'plugins'];
    var reqPluginNames = ['ver', 'text', 'css', 'normalize', 'css-builder'];
    var notEmptyPaths = ['', 'main', 'styles', 'views', 'templates'];
    var excludeFileNames = ['.css', '.js', '.DS_Store', 'styles'];

    var DEFAULT_MODULE_NAME = '__default__';

    var helper = {

        // 获取相对于某个基路径的真实路径
        getRelativePath: function (originBasePath, originPath, currBasePath) {
            // 实际路径
            var truePath = path.join(originBasePath, originPath);
            var dep = 10;  // 设定最多向上查找10次

            // 如果基路径不在应用程序路径中,则附加应用程序路径
            if (path.join(originBasePath) !== '.\\' && path.join(currBasePath, originPath).indexOf(path.join(originBasePath) + '\\') < 0) {
                originPath = path.join(appBasePath, originPath);
            }
            while (truePath !== path.join(currBasePath, originPath) && dep !== 0) {
                originPath = path.join('../', originPath);
                dep--;
            }
            return originPath;
        },

        getSolutionPath: function (solution) {
            return solution === '' ? '' : helper.getRelativePath('./', solution, appTargetBasePath);
        }
    };

    return helper;
}


text:
==============================
Python API Client for Kanboard
==============================

Client library for Kanboard API.

- Author: Frédéric Guillot
- License: MIT

Installation
============

.. code-block:: bash

    pip install kanboard

This library is compatible with Python >= 3.5.

Note: **Support for Python 2.7 has been dropped since version 1.1.0.**

Examples
========

Methods and arguments are the same as the JSON-RPC procedures described in the
`official documentation <https://docs.kanboard.org/en/latest/api/index.html>`_.

Python methods are dynamically mapped to the API procedures. **You must use named arguments.**

By default, calls are made synchronously, meaning that they will block the program until completed.

Creating a new team project
---------------------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')
    project_id = kb.create_project(name='My project')

Authenticate as user
--------------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'admin', 'secret')
    kb.get_my_projects()

Create a new task
-----------------

.. code-block:: python

    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')
    project_id = kb.create_project(name='My project')
    task_id = kb.create_task(project_id=project_id, title='My task title')

Asynchronous I/O
================

The client also exposes async/await style method calls. Similarly to the synchronous calls (see above),
the method names are mapped to the API methods.

To invoke an asynchronous call, the method name must be appended with ``_async``. For example, a synchronous call
to ``create_project`` can be made asynchronous by calling ``create_project_async`` instead.

.. code-block:: python

    import asyncio
    import kanboard

    kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')

    loop = asyncio.get_event_loop()
    project_id = loop.run_until_complete(kb.create_project_async(name='My project'))

.. code-block:: python

    import asyncio
    import kanboard

    async def call_within_function():
        kb = kanboard.Client('http://localhost/jsonrpc.php', 'jsonrpc', 'your_api_token')
        return await kb.create_project_async(name='My project')

    loop = asyncio.get_event_loop()
    project_id = loop.run_until_complete(call_within_function())

See the `official API documentation <https://docs.kanboard.org/en/latest/api/index.html>`_ for the complete list of
methods and arguments.


text:
package org.apache.syncope.ide.eclipse.plugin.editors.htmlhelpers;

import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITypedRegion;
import org.eclipse.jface.text.Region;
import org.eclipse.jface.text.rules.DefaultDamagerRepairer;
import org.eclipse.jface.text.rules.ITokenScanner;

public class HTMLTagDamagerRepairer extends DefaultDamagerRepairer {

    public HTMLTagDamagerRepairer(final ITokenScanner scanner) {
        super(scanner);
    }

    public IRegion getDamageRegion(final ITypedRegion partition, final DocumentEvent e,
            final boolean documentPartitioningChanged) {
        if (!documentPartitioningChanged) {
            String source = fDocument.get();
            int start = source.substring(0, e.getOffset()).lastIndexOf('<');
            if (start == -1) {
                start = 0;
            }
            int end = source.indexOf('>', e.getOffset());
            int nextEnd = source.indexOf('>', end + 1);
            if (nextEnd >= 0 && nextEnd > end) {
                end = nextEnd;
            }
            int end2 = e.getOffset() + (e.getText() == null ? e.getLength() : e.getText().length());
            if (end == -1) {
                end = source.length();
            } else if (end2 > end) {
                end = end2;
            } else {
                end++;
            }

            return new Region(start, end - start);
        }
        return partition;
    }

}


text:
import React from 'react';
import styled from 'styled-components';
import CopyButton from '../common/buttons/CopyButton';

const MessageUrlWrapper = styled.div`
  font-family: 'Work Sans', sans-serif;
  color: #fff;
  font-size: 15px;
  text-align: center;
`;

const MessageUrl = props => (
  <MessageUrlWrapper>

Here is your URL!

      {props.url}

    <CopyButton>Copy link!</CopyButton>
  </MessageUrlWrapper>
);

export default MessageUrl;


text:
'use strict';

export default (elements, array) => {
  var length = array.length;
  var result = new Array(elements);
  var taken = new Array(length);

  if (elements > length) {
    throw new RangeError('getRandomElementsFromArray: More elements requested than available!');
  }

  while (elements--) {
    var random = Math.floor(Math.random() * length);
    result[elements] = array[random in taken ? taken[random] : random];
    taken[random] = --length;
  }

  return result;
}


text:
package czsem.gate.treex.factory;

import czsem.gate.treex.TreexException;
import czsem.gate.treex.TreexServerConnection;

public interface TreexCloudFactoryInterface {
	TreexServerConnection prepareTreexServerConnection(String languageCode, String scenarioString) throws TreexException;
}


text:
package org.wso2.carbon.event.processor.core.internal.ds;

import com.hazelcast.core.HazelcastInstance;
import org.wso2.carbon.base.api.ServerConfigurationService;
import org.wso2.carbon.event.processor.common.storm.config.StormDeploymentConfig;
import org.wso2.carbon.event.processor.core.internal.CarbonEventProcessorService;
import org.wso2.carbon.event.processor.core.internal.storm.manager.StormManagerServer;
import org.wso2.carbon.event.statistics.EventStatisticsService;
import org.wso2.carbon.event.stream.core.EventStreamService;
import org.wso2.carbon.ndatasource.core.DataSourceService;
import org.wso2.carbon.user.core.UserRealm;
import org.wso2.carbon.utils.ConfigurationContextService;
import org.wso2.siddhi.core.SiddhiManager;
import org.wso2.siddhi.core.util.persistence.PersistenceStore;

import java.util.concurrent.ScheduledExecutorService;

public class EventProcessorValueHolder {
    private static CarbonEventProcessorService eventProcessorService;
    private static EventStatisticsService eventStatisticsService;
    private static EventStreamService eventStreamService;
    private static HazelcastInstance hazelcastInstance;
    private static PersistenceStore persistenceStore;
    private static ScheduledExecutorService scheduledExecutorService;
    private static UserRealm userRealm;
    private static DataSourceService dataSourceService;
    private static ServerConfigurationService serverConfiguration;
    private static ConfigurationContextService configurationContext;
    private static StormManagerServer stormManagerServer;
    private static StormDeploymentConfig stormDeploymentConfig;

    public static SiddhiManager getSiddhiManager() {
        return siddhiManager;
    }

    public static void registerSiddhiManager(SiddhiManager siddhiManager) {
        EventProcessorValueHolder.siddhiManager = siddhiManager;
    }

    private static SiddhiManager siddhiManager;

    public static void registerEventProcessorService(CarbonEventProcessorService service) {
        eventProcessorService = service;
    }

    public static CarbonEventProcessorService getEventProcessorService() {
        return eventProcessorService;
    }

    public static void registerEventStatisticsService(EventStatisticsService eventStatisticsService) {
        EventProcessorValueHolder.eventStatisticsService = eventStatisticsService;
    }

    public static EventStatisticsService getEventStatisticsService() {
        return eventStatisticsService;
    }

    public static void registerHazelcastInstance(HazelcastInstance hazelcastInstance) {
        EventProcessorValueHolder.hazelcastInstance = hazelcastInstance;
    }

    public static HazelcastInstance getHazelcastInstance() {
        return hazelcastInstance;
    }

    public static PersistenceStore getPersistenceStore() {
        return persistenceStore;
    }

    public static void setPersistenceStore(PersistenceStore persistenceStore) {
        EventProcessorValueHolder.persistenceStore = persistenceStore;
    }

    public static ScheduledExecutorService getScheduledExecutorService() {
        return scheduledExecutorService;
    }

    public static void setScheduledExecutorService(ScheduledExecutorService scheduledExecutorService) {
        EventProcessorValueHolder.scheduledExecutorService = scheduledExecutorService;
    }
    //
//    public static DataAccessService getDataAccessService() {
//        return dataAccessService;
//    }
//
//    public static void setDataAccessService(DataAccessService dataAccessService) {
//        EventProcessorValueHolder.dataAccessService = dataAccessService;
//    }
//
//    public static ClusterInformation getClusterInformation() {
//        return clusterInformation;
//    }
//
//    public static void setClusterInformation(ClusterInformation clusterInformation) {
//        EventProcessorValueHolder.clusterInformation = clusterInformation;
//    }

    public static UserRealm getUserRealm() {
        return userRealm;
    }

    public static void setUserRealm(UserRealm userRealm) {
        EventProcessorValueHolder.userRealm = userRealm;
    }

    public static DataSourceService getDataSourceService() {
        return dataSourceService;
    }

    public static void setDataSourceService(DataSourceService dataSourceService) {
        EventProcessorValueHolder.dataSourceService = dataSourceService;
    }

    public static EventStreamService getEventStreamService() {
        return eventStreamService;
    }

    public static void registerEventStreamService(EventStreamService eventStreamService) {
        EventProcessorValueHolder.eventStreamService = eventStreamService;
    }

    public static ServerConfigurationService getServerConfiguration() {
        return serverConfiguration;
    }

    public static void setServerConfiguration(ServerConfigurationService serverConfiguration) {
        EventProcessorValueHolder.serverConfiguration = serverConfiguration;
    }

    public static ConfigurationContextService getConfigurationContext() {
        return configurationContext;
    }

    public static void setConfigurationContext(ConfigurationContextService configurationContext) {
        EventProcessorValueHolder.configurationContext = configurationContext;
    }

    public static void registerStormManagerServer(StormManagerServer stormManagerServer) {
        EventProcessorValueHolder.stormManagerServer = stormManagerServer;
    }

    public static StormManagerServer getStormManagerServer() {
        return stormManagerServer;
    }

    public static void registerStormDeploymentConfig(StormDeploymentConfig stormDeploymentConfig) {
        EventProcessorValueHolder.stormDeploymentConfig = stormDeploymentConfig;
    }

    public static StormDeploymentConfig getStormDeploymentConfig() {
        return stormDeploymentConfig;
    }
}