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

<TITLE>
C-Index
</TITLE>

<META NAME="date" CONTENT="2011-10-25">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A B C D E F G H I L M N O P Q R S T U V W X Y

C

cellSize -
Variable in class edu.turtlekit2.kernel.agents.Viewer

change() -
Method in class edu.turtlekit2.demos.creation.Walker

change -
Variable in class edu.turtlekit2.kernel.environment.Patch

ChartWindow - Class in edu.turtlekit2.tools.chart
The turtleKit charter panel.
ChartWindow() -
Constructor for class edu.turtlekit2.tools.chart.ChartWindow

Constructor.

child(int) -
Method in class trashier.TreeEditorUI.AdapterNode

childCount() -
Method in class trashier.TreeEditorUI.AdapterNode

CircleFiller - Class in edu.turtlekit2.tools.fillers
Title : Circle Filler.
CircleFiller() -
Constructor for class edu.turtlekit2.tools.fillers.CircleFiller

clearAllTurtles() -
Method in class edu.turtlekit2.kernel.environment.TurtleEnvironment

clearPatch() -
Method in class edu.turtlekit2.kernel.python.PythonCommandCenter

clearT() -
Method in class edu.turtlekit2.kernel.python.PythonCommandCenter

clearVariable(String) -
Method in class edu.turtlekit2.kernel.environment.TurtleEnvironment

clearVariables(ArrayList<PatchVariable>) -
Method in class edu.turtlekit2.kernel.environment.TurtleEnvironment

clickedPoint -
Variable in class edu.turtlekit2.kernel.agents.Viewer

Mouse interaction

color -
Variable in class edu.turtlekit2.kernel.agents.Turtle

color -
Variable in class edu.turtlekit2.kernel.environment.Patch

color(double, double, double) -
Method in class edu.turtlekit2.tools.fillers.PerlinSolidNoiseGenerator

Returns an (alpha, red, green, blue) color value associated with
 the value() at the specified point.

color(double, double, double) -
Method in interface edu.turtlekit2.tools.fillers.SolidNoiseGenerator

Returns an (alpha, red, green, blue) color value associated with
 the value() at the specified point.

command(String) -
Method in class edu.turtlekit2.kernel.python.CommandEditorPanel

CommandEditorPanel - Class in edu.turtlekit2.kernel.python
Command Panel for the Python Command Center.
CommandEditorPanel(AbstractAgent, PythonInterpreter) -
Constructor for class edu.turtlekit2.kernel.python.CommandEditorPanel

COMMUNITY -
Static variable in class edu.turtlekit2.kernel.agents.AgentFactory

COMMUNITY -
Static variable in class edu.turtlekit2.Tk2Launcher

The default TurtleKit community

computeDistFromBall() -
Method in class edu.turtlekit2.demos.soccer.Player

computeMessage(GUIMessage<JComponent>) -
Method in class edu.turtlekit2.ui.BoardAgent

Checks mailBox and forwards message to the Simulation Board.

computeMessage(GUIMessage<JComponent>) -
Method in class trashier.Tk2SimuUIManager

computeNearestFromBall() -
Method in class edu.turtlekit2.demos.soccer.Player

computeTeamateAndNearest() -
Method in class edu.turtlekit2.demos.soccer.BluePlayer

computeTeamateAndNearest() -
Method in class edu.turtlekit2.demos.soccer.RedPlayer

CONSOLE_ZONE -
Static variable in class edu.turtlekit2.ui.SimulationBoard

CONSOLE_ZONE -
Static variable in class trashier.SimulationUI

CONSOLE_ZONE -
Static variable in class trashier.tete.SimulationBoard

containsImbeddedComp(Component) -
Method in class edu.turtlekit2.ui.utils.ToolBarLayout

containsImbeddedComp(Component, int) -
Method in class edu.turtlekit2.ui.utils.ToolBarLayout

(SwingConstants top,left,bottom,right):
 top:1, left:2, bottom:3, right:4

content() -
Method in class trashier.TreeEditorUI.AdapterNode

contentPane -
Variable in class edu.turtlekit2.ui.ControlBoard

contentPane -
Variable in class trashier.LauncherGui

ControlBoard - Class in edu.turtlekit2.ui
This class defines the Graphics object to execute the simulation.
ControlBoard(SimulationRunner) -
Constructor for class edu.turtlekit2.ui.ControlBoard

Constructor for the ControlBoard

countTurtlesAt(int, int) -
Method in class edu.turtlekit2.kernel.agents.Turtle

return the number of turtles in the patch situated at (a,b) units away

countTurtlesHere() -
Method in class edu.turtlekit2.kernel.agents.Turtle

createAppearance() -
Method in class edu.turtlekit2.demos.mle.PheromoneMesh

createAppearance(boolean) -
Method in class edu.turtlekit2.demos.mle.PheromoneMesh

createAppearance() -
Method in class edu.turtlekit2.tools.pheromone3D.PheromoneMesh

createAppearance(boolean) -
Method in class edu.turtlekit2.tools.pheromone3D.PheromoneMesh

createAppearance() -
Method in class edu.turtlekit2.tools.viewer3D.QuadMesh

createAppearance(boolean) -
Method in class edu.turtlekit2.tools.viewer3D.QuadMesh

createBackground() -
Method in class edu.turtlekit2.demos.mle.Phero3DPanel

createBackground() -
Method in class edu.turtlekit2.tools.pheromone3D.Phero3DPanel

createBackground() -
Method in class edu.turtlekit2.tools.viewer3D.Quad3DViewer

createCamera() -
Method in class edu.turtlekit2.demos.mle.Phero3DPanel

Create and configure camera attach them to the @param root node (BranchGroup)

createCamera() -
Method in class edu.turtlekit2.tools.pheromone3D.Phero3DPanel

Create and configure camera attach them to the @param root node (BranchGroup)

createCamera() -
Method in class edu.turtlekit2.tools.viewer3D.Quad3DViewer

Create and configure camera attach them to the @param root node (BranchGroup)

createGeometry() -
Method in class edu.turtlekit2.tools.viewer3D.QuadMesh

createImageIcon(String, String) -
Method in class edu.turtlekit2.ui.ControlBoard

createImageIcon(String, String) -
Method in class trashier.LauncherGui

createObjects() -
Method in class edu.turtlekit2.demos.mle.Phero3DPanel

createObjects() -
Method in class edu.turtlekit2.tools.pheromone3D.Phero3DPanel

createObjects() -
Method in class edu.turtlekit2.tools.viewer3D.Quad3DViewer

createSimpleStripGeometry() -
Method in class edu.turtlekit2.demos.mle.PheromoneMesh

createSimpleStripGeometry() -
Method in class edu.turtlekit2.tools.pheromone3D.PheromoneMesh

createSimulationWindow(String, SimulationRunner, BoardAgent) -
Method in class edu.turtlekit2.ui.TurtleKitGUI

Creates the tabPanel window for a given simulation

createSimulationWindow(String, SimulationRunner, Tk2SimuUIManager) -
Method in class trashier.Tk2UI

Creates the tabPanel window for a given simulation

createStripGeometry() -
Method in class edu.turtlekit2.demos.mle.PheromoneMesh

createStripGeometry() -
Method in class edu.turtlekit2.tools.pheromone3D.PheromoneMesh

createTurtle(Turtle) -
Method in class edu.turtlekit2.kernel.agents.Turtle

create a turtle at the creator position (xcor,ycor)
       returns the ID of the new turtle

createTurtle(int) -
Method in class edu.turtlekit2.kernel.python.PythonCommandCenter

Creator - Class in edu.turtlekit2.demos.creation
Adapted from the creation simulation of TurtleKit (v1).
Creator() -
Constructor for class edu.turtlekit2.demos.creation.Creator

curImbeddedTBRs -
Variable in class edu.turtlekit2.ui.utils.ToolBarLayout

cycle -
Variable in class edu.turtlekit2.ui.ControlBoard

cycle -
Variable in class trashier.LauncherGui

      Overview
      Package
      Class
      Use
      Tree
      Deprecated
    Index
      Help

 PREV LETTER
 NEXT LETTER

  FRAMES
 NO FRAMES

  All Classes

A B C D E F G H I L M N O P Q R S T U V W X Y


text:
class Ortheus < Formula
  desc 'Probabilistic method for the inference of ancestor (aka tree) alignments'
  homepage 'http://hgwdev.cse.ucsc.edu/~benedict/code/Ortheus.html'
  url "https://github.com/Ensembl/ortheus/archive/ensembl_release_candidate_3.zip"
  sha256 "07aa60594ea5d83a49e8625a70e59dd35cd2dc99cad54e0bd4d5bbbd563c9572"
  version 'rc3'

  depends_on 'ensembl/ensembl/sonlib'
  depends_on 'ensembl/ensembl/semphy'

  def install
    sonlib = Formula['ensembl/ensembl/sonlib']
    ENV.deparallelize
    inreplace 'include.mk', '${rootPath}../sonLib', "#{sonlib.prefix}"
    inreplace 'include.mk', '-I ${sonLibPath}', "-I #{sonlib.include}"
    inreplace 'include.mk', '${sonLibRootPath}/include.mk', "#{sonlib.prefix}/sonLib/include.mk"

    ENV["PYTHONPATH"] = sonlib.prefix
    ENV["PATH"] = "#{buildpath}/bin"+':'+ENV["PATH"]
    system 'make'
    cd 'bin' do
      bin.install %w(ortheus_core Ortheus.py)
    end
    (prefix+'ortheus').mkpath
    (prefix+'ortheus').install Dir['*']
  end
end

redpajama_set_name: RedPajamaGithub


text:
'''
lottery-omit-zj205
http://www.lottery.gov.cn/historykj/history_{0}.jspx?_ltype=zj205

@Author Aaric
@since 1.0
'''
import os
import threading


text:
#pragma once

#include "VDeviceConfig.h"
#include "VDeviceManager.h"
#include "CmdServerModule.h"
#include "Poco/Thread.h"
#include "Poco/Mutex.h"
#include "Poco/ScopedLock.h"

class RegisterManager : public Runnable
{
public:
  RegisterManager();
  ~RegisterManager();

public:
	void Start();
private:
	Poco::FastMutex m_Mutex;
	bool is_stop_;
	Poco::Thread workthread;

private:
	void OnRegisterResponse(const CmdHead& head, char* res_xml, int index);
	void OnAbilityPostResponse(const CmdHead& head, char* res_xml, int index);

public:
    void run();
    vector<VDeviceConfig> deviceConfigsCopy;

};


text:
package exec_test

import (
	"sync/atomic"
	"testing"
	"time"

	"github.com/kbolino/go-exec"
	. "github.com/smartystreets/goconvey/convey"
)

func TestDirect_Do(t *testing.T) {
	Convey("Direct.Do runs task on the calling goroutine", t, func() {
		direct := exec.Direct
		counter := int32(0)
		go func() {
			direct.Do(func() {
				time.Sleep(50 * time.Millisecond)
			})
			atomic.AddInt32(&counter, 1)
		}()
		time.Sleep(10 * time.Millisecond)
		So(atomic.LoadInt32(&counter), ShouldEqual, 0)
		time.Sleep(100 * time.Millisecond)
		So(atomic.LoadInt32(&counter), ShouldEqual, 1)
	})
}


text:
<?php

namespace Symfony\Component\Validator\Mapping\Loader;

use Symfony\Component\PropertyInfo\PropertyAccessExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyListExtractorInterface;
use Symfony\Component\PropertyInfo\PropertyTypeExtractorInterface;
use Symfony\Component\PropertyInfo\Type as PropertyInfoType;
use Symfony\Component\Validator\Constraints\All;
use Symfony\Component\Validator\Constraints\NotBlank;
use Symfony\Component\Validator\Constraints\NotNull;
use Symfony\Component\Validator\Constraints\Type;
use Symfony\Component\Validator\Mapping\AutoMappingStrategy;
use Symfony\Component\Validator\Mapping\ClassMetadata;

/**
 * Guesses and loads the appropriate constraints using PropertyInfo.
 *
 * @author Kévin Dunglas <dunglas@gmail.com>
 */
final class PropertyInfoLoader implements LoaderInterface
{
    use AutoMappingTrait;

    private PropertyListExtractorInterface $listExtractor;
    private PropertyTypeExtractorInterface $typeExtractor;
    private PropertyAccessExtractorInterface $accessExtractor;
    private ?string $classValidatorRegexp;

    public function __construct(PropertyListExtractorInterface $listExtractor, PropertyTypeExtractorInterface $typeExtractor, PropertyAccessExtractorInterface $accessExtractor, string $classValidatorRegexp = null)
    {
        $this->listExtractor = $listExtractor;
        $this->typeExtractor = $typeExtractor;
        $this->accessExtractor = $accessExtractor;
        $this->classValidatorRegexp = $classValidatorRegexp;
    }

    public function loadClassMetadata(ClassMetadata $metadata): bool
    {
        $className = $metadata->getClassName();
        if (!$properties = $this->listExtractor->getProperties($className)) {
            return false;
        }

        $loaded = false;
        $enabledForClass = $this->isAutoMappingEnabledForClass($metadata, $this->classValidatorRegexp);
        foreach ($properties as $property) {
            if (false === $this->accessExtractor->isWritable($className, $property)) {
                continue;
            }

            if (!property_exists($className, $property)) {
                continue;
            }

            $types = $this->typeExtractor->getTypes($className, $property);
            if (null === $types) {
                continue;
            }

            $enabledForProperty = $enabledForClass;
            $hasTypeConstraint = false;
            $hasNotNullConstraint = false;
            $hasNotBlankConstraint = false;
            $allConstraint = null;
            foreach ($metadata->getPropertyMetadata($property) as $propertyMetadata) {
                // Enabling or disabling auto-mapping explicitly always takes precedence
                if (AutoMappingStrategy::DISABLED === $propertyMetadata->getAutoMappingStrategy()) {
                    continue 2;
                }

                if (AutoMappingStrategy::ENABLED === $propertyMetadata->getAutoMappingStrategy()) {
                    $enabledForProperty = true;
                }

                foreach ($propertyMetadata->getConstraints() as $constraint) {
                    if ($constraint instanceof Type) {
                        $hasTypeConstraint = true;
                    } elseif ($constraint instanceof NotNull) {
                        $hasNotNullConstraint = true;
                    } elseif ($constraint instanceof NotBlank) {
                        $hasNotBlankConstraint = true;
                    } elseif ($constraint instanceof All) {
                        $allConstraint = $constraint;
                    }
                }
            }

            if (!$enabledForProperty) {
                continue;
            }

            $loaded = true;
            $builtinTypes = [];
            $nullable = false;
            $scalar = true;
            foreach ($types as $type) {
                $builtinTypes[] = $type->getBuiltinType();

                if ($scalar && !\in_array($type->getBuiltinType(), [PropertyInfoType::BUILTIN_TYPE_INT, PropertyInfoType::BUILTIN_TYPE_FLOAT, PropertyInfoType::BUILTIN_TYPE_STRING, PropertyInfoType::BUILTIN_TYPE_BOOL], true)) {
                    $scalar = false;
                }

                if (!$nullable && $type->isNullable()) {
                    $nullable = true;
                }
            }
            if (!$hasTypeConstraint) {
                if (1 === \count($builtinTypes)) {
                    if ($types[0]->isCollection() && \count($collectionValueType = $types[0]->getCollectionValueTypes()) > 0) {
                        [$collectionValueType] = $collectionValueType;
                        $this->handleAllConstraint($property, $allConstraint, $collectionValueType, $metadata);
                    }

                    $metadata->addPropertyConstraint($property, $this->getTypeConstraint($builtinTypes[0], $types[0]));
                } elseif ($scalar) {
                    $metadata->addPropertyConstraint($property, new Type(['type' => 'scalar']));
                }
            }

            if (!$nullable && !$hasNotBlankConstraint && !$hasNotNullConstraint) {
                $metadata->addPropertyConstraint($property, new NotNull());
            }
        }

        return $loaded;
    }

    private function getTypeConstraint(string $builtinType, PropertyInfoType $type): Type
    {
        if (PropertyInfoType::BUILTIN_TYPE_OBJECT === $builtinType && null !== $className = $type->getClassName()) {
            return new Type(['type' => $className]);
        }

        return new Type(['type' => $builtinType]);
    }

    private function handleAllConstraint(string $property, ?All $allConstraint, PropertyInfoType $propertyInfoType, ClassMetadata $metadata)
    {
        $containsTypeConstraint = false;
        $containsNotNullConstraint = false;
        if (null !== $allConstraint) {
            foreach ($allConstraint->constraints as $constraint) {
                if ($constraint instanceof Type) {
                    $containsTypeConstraint = true;
                } elseif ($constraint instanceof NotNull) {
                    $containsNotNullConstraint = true;
                }
            }
        }

        $constraints = [];
        if (!$containsNotNullConstraint && !$propertyInfoType->isNullable()) {
            $constraints[] = new NotNull();
        }

        if (!$containsTypeConstraint) {
            $constraints[] = $this->getTypeConstraint($propertyInfoType->getBuiltinType(), $propertyInfoType);
        }

        if (null === $allConstraint) {
            $metadata->addPropertyConstraint($property, new All(['constraints' => $constraints]));
        } else {
            $allConstraint->constraints = array_merge($allConstraint->constraints, $constraints);
        }
    }
}


text:
FileManager::FileManager()
{
}

FileManager::~FileManager()
{
}

bool FileManager::ReadWord(byte** buffer, byte* wordBuffer)
{
	unsigned int	wordPosition = 0;
	while (((*buffer)[wordPosition] != '\0') && ((*buffer)[wordPosition] != ' ')
			&& (wordPosition < MAX_FILE_WORD_LENGTH-1))
	{
		wordBuffer[wordPosition] = (*buffer)[wordPosition];
		wordPosition++;
	}
	wordBuffer[wordPosition] = '\0';
	if ((*buffer)[wordPosition] == '\0')
	{
		return true;
	}
	else
	{
		(*buffer)+=wordPosition+1;
		return false;
	}
}

bool FileManager::ReadLine(byte** buffer, byte* lineBuffer)
{
	unsigned int	linePosition = 0;
	while (((*buffer)[linePosition] != '\n') && ((*buffer)[linePosition] != '\0')
			&& (linePosition < MAX_FILE_LINE_LENGTH-1))
	{
		lineBuffer[linePosition] = (*buffer)[linePosition];
		linePosition++;
	}
	lineBuffer[linePosition] = '\0';
	if ((*buffer)[linePosition] == '\0')
	{
		return true;
	}
	else
	{
		(*buffer)+=linePosition+1;
		return false;
	}
}

// Load a file into Manta
bool FileManager::LoadFile(byte** buffer, string filename)
{
	FILE*	modelFile;
	unsigned long	filesize;
	size_t	result;

	// Open the model file as a text file for reading
	modelFile = fopen(filename, "r");
	if (modelFile==NULL)
	{
		printf("Error opening file \"%s\".\n", filename);
		return false;
	}

	// Get the filesize
	fseek(modelFile, 0, SEEK_END);
	filesize = ftell(modelFile);
	rewind(modelFile);

	// Allocate memory to read in the whole file
	(*buffer) = (byte*) malloc (sizeof(byte)*filesize);
	if ((*buffer) == NULL)
	{
		printf("Error allocating memory for file \"%s\" of length %ld.\n", filename, filesize);
		fclose(modelFile);
		return false;
	}

	// Read in the file
	result = fread((*buffer), 1, filesize, modelFile);
	if (result != filesize)
	{
		printf("Error reading file \"%s\".\n", filename);
		fclose(modelFile);
		return false;
	}
	// Close the file
	fclose(modelFile);
	return true;
}


text:
if [ -z ${1+x} ]; then
    ROOT_DIR=$PWD
else
    ROOT_DIR=$1
fi

echo "Root dir is $ROOT_DIR"

SPARK_HOME=~/opensource-projects/spark
SPARK_MASTER=spark://galarragas.local:7077
TEST_ROOT_PATH=$ROOT_DIR/data/cdc
TEST_ROOT_PATH_URL=file:$TEST_ROOT_PATH

RMDIR="rm -rf"
#RMDIR=hdfs dfs -rm -r

CAT=cat
#CAT=hadoop fs -cat

echo "Cleaning output folder"
`$RMDIR $TEST_ROOT_PATH/out/*`

echo "Submit CDC importer job"
$SPARK_HOME/bin/spark-submit \
    --master $SPARK_MASTER \
    --class uk.co.pragmasoft.experiments.bigdata.spark.dbimport.CustomerCDCDataBaseImporter \
    /Users/stefano/projects/spark-experiments/target/scala-2.10/SparkExperiments-assembly-1.0.jar \
    --rootPath $TEST_ROOT_PATH_URL

if [ $? -ne 0 ]; then
    echo "Spark command failed"
    exit 1
fi

echo "Check if there is any processed record with error"
$CAT $TEST_ROOT_PATH/out/errors.txt > errors.txt
ERROR_COUNT=`wc -l errors.txt`

if [ "$ERROR_COUNT" -gt 0 ]; then
    echo "Spark job generated error lines"
    cat errors.txt
    exit 1
fi

$CAT $TEST_ROOT_PATH/out/cdc.csv/part* | sort > out.csv

cat > expected-out.csv <<- EOM
10001,Stefano,New Home,U
10003,Tiago,Another address,I
10004,Antonios,home,I
10104,To be Deleted,Old Home,D
customerId,name,address,cdc
EOM

echo "Comparing output with expected out"
diff out.csv expected-out.csv

if [ $? -ne 0 ]; then
    echo "!!! Output of spark job different than expected, see output above for details"
    exit 1
fi

echo "Test completed successfully"

exit 0


text:
## 0.9.0 - Dev

* Working on shared haxe code implementation (see readme Future Plans - [tides](https://github.com/snowkit/tides))

## 0.8.14

* Handle both source.haxe and source.hx extensions for compatility with unfixed/fixed language-haxe plugins (see [jeremyfa/language-haxe#3](https://github.com/jeremyfa/language-haxe/issues/3#issuecomment-214175415))

## 0.8.13

* Add save all files on build option, thanks @DjPale

## 0.8.12

* Improve El Capitan default PATH fix

## 0.8.11

* Display completion return type on the right. Add an option to put it on the left
* Minor fixes on toplevel completion display
* Optimize and fix haxe server not running after closing the window that started it
* Display haxe language snippets in addition to the compiler completion
* Fix code completion failing after `'\''`
* Fix decreased indent on `case` and `default` [](https://github.com/snowkit/atom-haxe/pull/53)

## 0.8.10

* Fix missing path_set to true

## 0.8.9

* Minor fixes for El Capitan path fix

## 0.8.8

* Fix El Capitan default PATH for the immediate term
* Completion fixes and tweaks to display

## 0.8.7

* Fix context commands pointing at flow by mistake

## 0.8.6

* Fix context menus not working with Atom 1.0.7
* Add context menu to hxml files as well

## 0.8.5

* Improve code completion: disable it in various unexpected cases (fixes `#38`)
* Ensure type hints are compatible with the latest autocomplete-plus package (version `2.19.0`)

## 0.8.4

* Fix linter handling of multiline errors

## 0.8.3

* Fix empty buffer causing errors `#33`
* Ensure custom haxe path is used `#37` and logged

## 0.8.2

* Fix linter deprecations `#32`
* Implement project wide linting from new Linter API

## 0.8.1

* Add SERVICES.md documentation
* Update changelogs

## 0.8.0

* completion; Fix truncated type hint and return type on newer autocomplete-plus version
* completion; Exclude haxe completion providers with priority lower than 2 instead of 1
* NOTE: The version bump from 0.6.2 => 0.8.0 was an error, trying to correct it created unavailable downloads from the atom API so it was pushed up one to continue working.

## 0.6.1

* tidy up logging from build consumers, and so on to debug logging system/flag
* hxml state parsing handles spaces and parses more smartly to avoid problems from macro calls etc
* completion: various parsing improvements
* go to definition : various improvements and additions

## 0.6.0

* Update readme requirements to mention Haxe requirement
* Add initial go to definition (requires haxe 3.2.0+)
* Add initial top level completion (requires haxe 3.2.0+)
* fix line-comment command putting `/* */` instead of `//`
* fixes to tmp_path experimental option

## 0.5.1~0.5.3

* minor clean ups

## 0.5.0

* ensure completion is more stable with autocomplete-plus `2.6.0`
* many fixes in type parsing and display
* many fixes in experimental tmp file option
* fix byte offset with unicode
* lint shares code completion cache
* refactor for separating the future shared code

## 0.4.0 ~ 0.4.3

* add all dependencies to dependency check
* show more info on type hints
* more robust completion state detection
* add consumer build workflow
* fix bugs about tree view assumptions
* implement build system
* added unset project option
* make menus useful
* fix bug in hxml formatting
* completion improvements (filter suggestions, type hints, etc)
* port type parsing to new package
* linting fixes

## 0.3.0

* implemented consumer state handling
    - active consumer will be notified when it's being made inactive
    - prevents clobbering of state from multiple consumers
* implemented error linting
* implemented dependency check with notifications
    - package will abort until installed
    - restart after installing if needed
* implemented prelim completion
    - still very wip, but just about usable
    - completes every char typed atm
* fix scrolling on completion debug views
* fix deactivation errors
    - resolves server being weird
    - resolves cleanup

## 0.1.0 ~ 0.2.0

* Renamed to haxe instead of atom-haxe
* Initial completion implementation
* Initial completion service provider
* Initial structure implemented


text:
{% extends "base_web.html" %}

{% block header %}

OSDC Query Builder

{% endblock %}

{% block main %}

	       <select class="attrSelect">
            {% for field in query_fields %}
                <option title="{{field.help_text}}" value="{{field.name}}">{{field.label}}</option>
            {% comment %}
            {% for field_name field in query_fields %}
                <option title="{{field.help_text}}" value="{{field.name}}">{{field.label}}</option>
	    {% endcomment %}
            {% endfor %}
            </select>
            <input class="queryValue" type="text" data-provide="typeahead"/>

        ×

        <form action="" method="post" class="form-horizontal"> {% csrf_token %}

 Query Builder

Build a query over the TCGA data then launch an instance with links to matching files.

              Link Directory
	      {% if form.query_top_dir.errors %}

                        {{ form.query_top_dir }}

                            {% for error in form.query_top_dir.errors %}
                            {{ error|escape }}
                            {% endfor %}

                      Name of directory on the VM that will
                        contain generated links.

                {% else %}
                    {{ form.query_top_dir }}

                        Name of directory on the VM that will
                        contain generated links.

                {% endif %}

                Query Name
                {% if form.query_name.errors %}

                        {{ form.query_name }}

                            {% for error in form.query_name.errors %}
                                {{ error|escape }}
                            {% endfor %}

                        Name of directory under the above Link Directory that will
                        contain generated links.

                {% else %}
                    {{ form.query_name }}

                        Name of directory under the above Link Directory that will
                        contain generated links.

                {% endif %}

 Include:

                    Add Term

Exclude:

                    Add Term

                Generated Query
                {% if form.generated_query.errors %}

                        {{ form.generated_query}}

                            {% for error in form.generated_query.errors %}
                                {{ error|escape }}
                            {% endfor %}

                {% else %}
                    {{ form.generated_query }}
                {% endif %}

                Cloud
                {% if form.cloud.errors %}

                        {{ form.cloud}}

                            {% for error in form.cloud.errors %}
                                {{ error|escape }}
                            {% endfor %}

                {% else %}
                    {{ form.cloud }}
                {% endif %}

                <input class="btn btn-primary" type="submit" value="Preview Results" />

        </form>

{% endblock %}

{% block js %}
    {% include "horizon/_scripts.html" %}
{% comment %}	 {% comment %}

{% comment %}  {% endcomment %}

{% endblock %}


text:
<?php
$unset_session = TRUE;
error_reporting(E_ALL ^ E_WARNING ^ E_DEPRECATED);
include_once("php/session.php");
function mklink($path, $src = NULL) {
  echo $path . "?" . filemtime($_SERVER['DOCUMENT_ROOT'] . ($src ? $src : $path));
}
?>
<!DOCTYPE html>

  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Diablo III Character Planner</title>

  <link rel="apple-touch-icon" sizes="57x57" href="/favicons/apple-touch-icon-57x57.png">
  <link rel="apple-touch-icon" sizes="60x60" href="/favicons/apple-touch-icon-60x60.png">
  <link rel="apple-touch-icon" sizes="72x72" href="/favicons/apple-touch-icon-72x72.png">
  <link rel="apple-touch-icon" sizes="76x76" href="/favicons/apple-touch-icon-76x76.png">
  <link rel="apple-touch-icon" sizes="114x114" href="/favicons/apple-touch-icon-114x114.png">
  <link rel="apple-touch-icon" sizes="120x120" href="/favicons/apple-touch-icon-120x120.png">
  <link rel="icon" type="image/png" href="/favicons/favicon-32x32.png" sizes="32x32">
  <link rel="icon" type="image/png" href="/favicons/favicon-96x96.png" sizes="96x96">
  <link rel="icon" type="image/png" href="/favicons/favicon-16x16.png" sizes="16x16">
  <link rel="manifest" href="/favicons/manifest.json">
  <meta name="msapplication-TileColor" content="#da532c">
  <meta name="theme-color" content="<?php if (isset($_COOKIE["theme"]) && $_COOKIE["theme"] == "\"dark\"") echo "#121212"; else echo "#ffffff"; ?>">

  <link rel="stylesheet" type="text/css" href="external/all.css" />
  <link rel="stylesheet" type="text/css" href="external/bnet/css/all.css" />
  <link rel="stylesheet" type="text/css" href="css/all.css" />

 <body class="<?php echo (isset($_COOKIE["theme"]) && $_COOKIE["theme"] == "\"light\"") ? "theme-light" : "theme-dark"; ?>">

      <select class="char-class"></select>
      Level <input type="number" min="70" max="70" value="70" class="char-level"/>

Build Info

Equipment

Paragon

Skills/Effects

Import/Save

    Developed by Riv @ rivsoft.net.
    <select class="theme-select">
     <option value="light">Light Theme</option>
     <option value="dark">Dark Theme</option>
    </select>
    Privacy policy.
    <select class="locale-select">
<?php
/*    require('translate/translate.inc.php');
    foreach ($locale_languages as $key => $info) {
      if (!$info || $info['usable']) {
        echo "     <option value=\"$key\">" . ($info ? $info['name'] : 'English') . "</option>\n";
      }
    }*/
?>
    </select>


text:
using System;
using GalaSoft.MvvmLight.Helpers;

namespace GalaSoft.MvvmLight.Test.Helpers
{
#if !WP70
    public class PublicTestClass<T>
    {
        private int _index; // Just here to force instance methods

        public const string Expected = "Hello";
        public const string Public = "Public";
        public const string Internal = "Internal";
        public const string Private = "Private";
        public const string PublicStatic = "PublicStatic";
        public const string InternalStatic = "InternalStatic";
        public const string PrivateStatic = "PrivateStatic";

        public static string Result
        {
            get;
            private set;
        }

        public PublicTestClass()
        {

        }

        public PublicTestClass(int index)
        {
            _index = index;
        }

        private void DoStuffPrivately(T parameter)
        {
            Result = Expected + Private + _index + parameter;
        }

        internal void DoStuffInternally(T parameter)
        {
            Result = Expected + Internal + _index + parameter;
        }

        public void DoStuffPublically(T parameter)
        {
            Result = Expected + Public + _index + parameter;
        }

        private static void DoStuffPrivatelyAndStatically(T parameter)
        {
            Result = Expected + PrivateStatic + parameter;
        }

        public static void DoStuffPublicallyAndStatically(T parameter)
        {
            Result = Expected + PublicStatic + parameter;
        }

        internal static void DoStuffInternallyAndStatically(T parameter)
        {
            Result = Expected + InternalStatic + parameter;
        }

        public WeakAction<T> GetAction(WeakActionTestCase testCase)
        {
            WeakAction<T> action = null;

            switch (testCase)
            {
                case WeakActionTestCase.PublicNamedMethod:
                    action = new WeakAction<T>(
                        this,
                        DoStuffPublically);
                    break;
                case WeakActionTestCase.InternalNamedMethod:
                    action = new WeakAction<T>(
                        this,
                        DoStuffInternally);
                    break;
                case WeakActionTestCase.PrivateNamedMethod:
                    action = new WeakAction<T>(
                        this,
                        DoStuffPrivately);
                    break;
                case WeakActionTestCase.PublicStaticMethod:
                    action = new WeakAction<T>(
                        this,
                        DoStuffPublicallyAndStatically);
                    break;
                case WeakActionTestCase.InternalStaticMethod:
                    action = new WeakAction<T>(
                        this,
                        DoStuffInternallyAndStatically);
                    break;
                case WeakActionTestCase.PrivateStaticMethod:
                    action = new WeakAction<T>(
                        this,
                        DoStuffPrivatelyAndStatically);
                    break;
                case WeakActionTestCase.AnonymousStaticMethod:
                    action = new WeakAction<T>(
                        this,
                        p => Result = Expected + p);
                    break;
                case WeakActionTestCase.AnonymousMethod:
                    action = new WeakAction<T>(
                        this,
                        p => Result = Expected + _index + p);
                    break;
            }

            return action;
        }

        private string DoStuffPrivatelyWithResult(T parameter)
        {
            Result = Expected + Private + _index + parameter;
            return Result;
        }

        internal string DoStuffInternallyWithResult(T parameter)
        {
            Result = Expected + Internal + _index + parameter;
            return Result;
        }

        public string DoStuffPublicallyWithResult(T parameter)
        {
            Result = Expected + Public + _index + parameter;
            return Result;
        }

        private static string DoStuffPrivatelyAndStaticallyWithResult(T parameter)
        {
            Result = Expected + PrivateStatic + parameter;
            return Result;
        }

        public static string DoStuffPublicallyAndStaticallyWithResult(T parameter)
        {
            Result = Expected + PublicStatic + parameter;
            return Result;
        }

        internal static string DoStuffInternallyAndStaticallyWithResult(T parameter)
        {
            Result = Expected + InternalStatic + parameter;
            return Result;
        }

        public WeakFunc<T, string> GetFunc(WeakActionTestCase testCase)
        {
            WeakFunc<T, string> action = null;

            switch (testCase)
            {
                case WeakActionTestCase.PublicNamedMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        DoStuffPublicallyWithResult);
                    break;
                case WeakActionTestCase.InternalNamedMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        DoStuffInternallyWithResult);
                    break;
                case WeakActionTestCase.PrivateNamedMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        DoStuffPrivatelyWithResult);
                    break;
                case WeakActionTestCase.PublicStaticMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        DoStuffPublicallyAndStaticallyWithResult);
                    break;
                case WeakActionTestCase.InternalStaticMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        DoStuffInternallyAndStaticallyWithResult);
                    break;
                case WeakActionTestCase.PrivateStaticMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        DoStuffPrivatelyAndStaticallyWithResult);
                    break;
                case WeakActionTestCase.AnonymousStaticMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        p =>
                        {
                            Result = Expected + p;
                            return Result;
                        });
                    break;
                case WeakActionTestCase.AnonymousMethod:
                    action = new WeakFunc<T, string>(
                        this,
                        p =>
                        {
                            Result = Expected + _index + p;
                            return Result;
                        });
                    break;
            }

            return action;
        }
    }
#endif
}


text:
/*
 * TODO put header
 */
package com.skywin.obdreader.activity;

import java.util.Date;

import android.app.ActionBar;
import android.app.Activity;
import android.bluetooth.BluetoothAdapter;
import android.bluetooth.BluetoothDevice;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.graphics.Color;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.PowerManager;
import android.util.Log;
import android.view.Gravity;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.ViewGroup.MarginLayoutParams;
import android.widget.Button;
import android.widget.EditText;
import android.widget.TableLayout;
import android.widget.TableRow;
import android.widget.TextView;
import android.widget.Toast;

import com.example.MyCommand;
import com.skywin.obd.DemoConstant;
import com.skywin.obd.DeviceListActivity;
import com.skywin.obdreader.R;
import com.skywin.obdreader.thread.BluetoothDemoService;
import com.skywin.obdreader.thread.CommandThread;

import eu.lighthouselabs.obd.commands.SpeedObdCommand;
import eu.lighthouselabs.obd.commands.control.CommandEquivRatioObdCommand;
import eu.lighthouselabs.obd.commands.engine.EngineRPMObdCommand;
import eu.lighthouselabs.obd.commands.engine.MassAirFlowObdCommand;
import eu.lighthouselabs.obd.commands.fuel.FuelEconomyWithMAFObdCommand;
import eu.lighthouselabs.obd.commands.fuel.FuelLevelObdCommand;
import eu.lighthouselabs.obd.commands.fuel.FuelTrimObdCommand;
import eu.lighthouselabs.obd.commands.temperature.AmbientAirTemperatureObdCommand;
import eu.lighthouselabs.obd.enums.AvailableCommandNames;
import eu.lighthouselabs.obd.enums.FuelTrim;
import eu.lighthouselabs.obd.enums.FuelType;
import eu.lighthouselabs.obd.reader.IPostListener;
import eu.lighthouselabs.obd.reader.io.ObdCommandJob;

/**
 * The main activity.
 */
public class MainActivity extends Activity {

	private static final String TAG = "MainActivity";

	/*
	 * TODO put description
	 */
	static final int NO_BLUETOOTH_ID = 0;
	static final int BLUETOOTH_DISABLED = 1;
	static final int NO_GPS_ID = 2;
	static final int SETTINGS = 5;
	static final int COMMAND_ACTIVITY = 6;
	static final int TABLE_ROW_MARGIN = 7;
	static final int NO_ORIENTATION_SENSOR = 8;

	// Intent request codes
	private static final int REQUEST_CONNECT_DEVICE_SECURE = 1;
	private static final int REQUEST_CONNECT_DEVICE_INSECURE = 2;
	private static final int REQUEST_ENABLE_BT = 3;

	private Handler mHandler = new DemoHandler();

	private BluetoothAdapter mBluetoothAdapter;

	// Member object for the chat services
	private BluetoothDemoService mChatService = null;

	private IPostListener mListener = null;
	// private Intent mServiceIntent = null;
	private CommandThread mCmdThread = null;

	// private SensorManager sensorManager = null;
	// private Sensor orientSensor = null;
	private SharedPreferences prefs = null;

	private PowerManager powerManager = null;
	private PowerManager.WakeLock wakeLock = null;

	private boolean preRequisites = true;

	private boolean autosend = false;

	private int speed = 1;
	private double maf = 1;
	private float ltft = 0;
	private double equivRatio = 1;

	private EditText commandText;
	private TextView resultText;
	private Button sendButton;

	private final SensorEventListener orientListener = new SensorEventListener() {
		public void onSensorChanged(SensorEvent event) {
			float x = event.values[0];
			String dir = "";
			if (x >= 337.5 || x < 22.5) {
				dir = "N";
			} else if (x >= 22.5 && x < 67.5) {
				dir = "NE";
			} else if (x >= 67.5 && x < 112.5) {
				dir = "E";
			} else if (x >= 112.5 && x < 157.5) {
				dir = "SE";
			} else if (x >= 157.5 && x < 202.5) {
				dir = "S";
			} else if (x >= 202.5 && x < 247.5) {
				dir = "SW";
			} else if (x >= 247.5 && x < 292.5) {
				dir = "W";
			} else if (x >= 292.5 && x < 337.5) {
				dir = "NW";
			}
			TextView compass = (TextView) findViewById(R.id.compass_text);
			updateTextView(compass, dir);
		}

		public void onAccuracyChanged(Sensor sensor, int accuracy) {
			// TODO Auto-generated method stub
		}
	};

	public void updateTextView(final TextView view, final String txt) {
		new Handler().post(new Runnable() {
			public void run() {
				view.setText(txt);
			}
		});
	}

	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);

		setContentView(R.layout.main);

		commandText = (EditText) this.findViewById(R.id.commandText);
		resultText = (TextView) this.findViewById(R.id.resultText);
		sendButton = (Button) this.findViewById(R.id.sendButton);

		sendButton.setOnClickListener(new View.OnClickListener() {
			@Override
			public void onClick(View view) {
				final MyCommand command = new MyCommand(commandText.getText()
						.toString());
				ObdCommandJob job = new ObdCommandJob(command);
				job.setId(new Date().getTime());
				mCmdThread.addJobToQueue(job);

				mHandler.postDelayed(new Runnable() {
					@Override
					public void run() {
						resultText.setText(command.getName() + ">>"
								+ command.getResult());
					}
				}, 2000);
			}
		});

		mListener = new IPostListener() {
			public void stateUpdate(ObdCommandJob job) {
				String cmdName = job.getCommand().getName();
				String cmdResult = job.getCommand().getFormattedResult();

				Log.d(TAG, FuelTrim.LONG_TERM_BANK_1.getBank() + " equals "
						+ cmdName + "?");

				if (AvailableCommandNames.ENGINE_RPM.getValue().equals(cmdName)) {
					TextView tvRpm = (TextView) findViewById(R.id.rpm_text);
					tvRpm.setText(cmdResult);
				} else if (AvailableCommandNames.SPEED.getValue().equals(
						cmdName)) {
					TextView tvSpeed = (TextView) findViewById(R.id.spd_text);
					tvSpeed.setText(cmdResult);
					speed = ((SpeedObdCommand) job.getCommand())
							.getMetricSpeed();
				} else if (AvailableCommandNames.MAF.getValue().equals(cmdName)) {
					maf = ((MassAirFlowObdCommand) job.getCommand()).getMAF();
					addTableRow(cmdName, cmdResult);
				} else if (FuelTrim.LONG_TERM_BANK_1.getBank().equals(cmdName)) {
					ltft = ((FuelTrimObdCommand) job.getCommand()).getValue();
				} else if (AvailableCommandNames.EQUIV_RATIO.getValue().equals(
						cmdName)) {
					equivRatio = ((CommandEquivRatioObdCommand) job
							.getCommand()).getRatio();
					addTableRow(cmdName, cmdResult);
				} else {
					addTableRow(cmdName, cmdResult);
				}
			}
		};

		/*
		 * Validate Bluetooth service.
		 */
		// Bluetooth device exists?
		mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
		if (mBluetoothAdapter == null) {
			preRequisites = false;
			Toast.makeText(this, "蓝牙不可用", 0).show();
			finish();
			return;
		}
	}

	@Override
	protected void onStart() {
		super.onStart();

		if (!mBluetoothAdapter.isEnabled()) {
			preRequisites = false;
			Intent enableIntent = new Intent(
					BluetoothAdapter.ACTION_REQUEST_ENABLE);
			startActivityForResult(enableIntent, REQUEST_ENABLE_BT);
		}else{
			if(mChatService==null){
				envSetup();
			}
		}
	}

	private void envSetup() {
		mChatService = new BluetoothDemoService(this, mHandler);
		mCmdThread = new CommandThread(mHandler, mChatService);
		new Thread(mCmdThread).start();
	}

	private void connectDevice(Intent data, boolean secure) {
		// Get the device MAC address
		String address = data.getExtras().getString(
				DeviceListActivity.EXTRA_DEVICE_ADDRESS);
		// Get the BluetoothDevice object
		BluetoothDevice device = mBluetoothAdapter.getRemoteDevice(address);
		// Attempt to connect to the device
		mChatService.connect(device, secure);
	}

	@Override
	public void onActivityResult(int requestCode, int resultCode, Intent data) {
		switch (requestCode) {
		case REQUEST_CONNECT_DEVICE_SECURE:
			// When DeviceListActivity returns with a device to connect
			if (resultCode == Activity.RESULT_OK) {
				connectDevice(data, true);
			}
			break;
		case REQUEST_CONNECT_DEVICE_INSECURE:
			// When DeviceListActivity returns with a device to connect
			if (resultCode == Activity.RESULT_OK) {
				connectDevice(data, false);
			}
			break;
		case REQUEST_ENABLE_BT:
			//Toast.makeText(this, "sdsds", Toast.LENGTH_SHORT).show();
			if (resultCode == Activity.RESULT_OK) {
				if(mChatService==null){
					envSetup();
				}
			} else {
				Toast.makeText(this, "蓝牙未开启,应用将退出", Toast.LENGTH_SHORT).show();
				finish();
			}
			break;
		}
	}

	@Override
	protected void onDestroy() {
		super.onDestroy();

		releaseWakeLockIfHeld();
		mListener = null;
		if(mHandler!=null){
			stopLiveData();
			mHandler = null;
		}
		if(mCmdThread!=null){
			mCmdThread.destroy();
			mCmdThread = null;
		}
	}

	@Override
	protected void onPause() {
		super.onPause();
		Log.d(TAG, "Pausing..");
		releaseWakeLockIfHeld();
	}

	/**
	 * If lock is held, release. Lock will be held when the service is running.
	 */
	private void releaseWakeLockIfHeld() {
		if (wakeLock.isHeld()) {
			wakeLock.release();
		}
	}

	protected void onResume() {
		super.onResume();

		Log.d(TAG, "Resuming..");

		// sensorManager.registerListener(orientListener, orientSensor,
		// SensorManager.SENSOR_DELAY_UI);
		// prefs = PreferenceManager.getDefaultSharedPreferences(this);
		powerManager = (PowerManager) getSystemService(Context.POWER_SERVICE);
		wakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK,
				"ObdReader");
		wakeLock.acquire();
		if (mChatService != null) {
			if (mChatService.getState() == BluetoothDemoService.STATE_NONE) {
				mChatService.start();
			}
		}
	}

	public boolean onCreateOptionsMenu(Menu menu) {
		getMenuInflater().inflate(R.menu.option_menu, menu);
		return true;
	}

	public boolean onOptionsItemSelected(MenuItem item) {
		Intent serverIntent = null;
		switch (item.getItemId()) {
		case R.id.secure_connect_scan:
			serverIntent = new Intent(this, DeviceListActivity.class);
			startActivityForResult(serverIntent, REQUEST_CONNECT_DEVICE_SECURE);
			return true;
		case R.id.insecure_connect_scan:
			// Launch the DeviceListActivity to see devices and do scan
			serverIntent = new Intent(this, DeviceListActivity.class);
			startActivityForResult(serverIntent,
					REQUEST_CONNECT_DEVICE_INSECURE);
			return true;
		case R.id.start_live_data:
			startLiveData();
			return true;
		case R.id.stop_live_data:
			stopLiveData();
			return true;
		}
		return false;
	}

	private void startLiveData() {
		Log.d(TAG, "Starting live data..");

		if (mCmdThread != null
				&& mChatService.getState() == BluetoothDemoService.STATE_CONNECTED) {
			autosend = true;
			mHandler.post(mQueueCommands);
		}
	}

	private void stopLiveData() {
		Log.d(TAG, "Stopping live data..");

		mHandler.removeCallbacks(mQueueCommands);
	}

	private final void setStatus(int resId) {
		final ActionBar actionBar = getActionBar();
		actionBar.setSubtitle(resId);
	}

	private final void setStatus(CharSequence subTitle) {
		final ActionBar actionBar = getActionBar();
		actionBar.setSubtitle(subTitle);
	}

	private class DemoHandler extends Handler {

		private String mDevicename;

		@Override
		public void handleMessage(Message msg) {
			switch (msg.what) {
			case DemoConstant.MESSAGE_STATE_CHANGE:

				switch (msg.arg1) {
				case BluetoothDemoService.STATE_CONNECTED:
					setStatus(getString(R.string.title_connected_to,
							mDevicename));
					break;
				case BluetoothDemoService.STATE_CONNECTING:
					setStatus(R.string.title_connecting);
					break;
				case BluetoothDemoService.STATE_LISTEN:
				case BluetoothDemoService.STATE_NONE:
					setStatus(R.string.title_not_connected);
					break;
				}
				break;
			case DemoConstant.MESSAGE_WRITE:
				// byte[] writeBuf = (byte[]) msg.obj;
				// String writeMessage = new String(writeBuf);
				break;
			case DemoConstant.MESSAGE_READ:
				// byte[] readBuf = (byte[]) msg.obj;
				// String readMessage = new String(readBuf, 0, msg.arg1);

				break;
			case DemoConstant.MESSAGE_DEVICE_NAME:
				// save the connected device's name
				mDevicename = msg.getData().getString(DemoConstant.DEVICE_NAME);
				Toast.makeText(getApplicationContext(),
						"Connected to " + mDevicename, Toast.LENGTH_SHORT)
						.show();
				break;
			case DemoConstant.MESSAGE_TOAST:
				Toast.makeText(getApplicationContext(),
						msg.getData().getString(DemoConstant.TOAST),
						Toast.LENGTH_SHORT).show();
				break;
			case DemoConstant.MESSAGE_UI:
				mListener.stateUpdate((ObdCommandJob) msg.obj);
				break;
			}
		}
	}

	public boolean onPrepareOptionsMenu(Menu menu) {

		MenuItem startItem = menu.findItem(R.id.start_live_data);
		MenuItem stopItem = menu.findItem(R.id.stop_live_data);

		if (mChatService != null
				&& mChatService.getState() == BluetoothDemoService.STATE_CONNECTED) {
			if (autosend) {
				startItem.setEnabled(false);
				stopItem.setEnabled(true);
			} else {
				stopItem.setEnabled(false);
				startItem.setEnabled(true);
			}
		} else {
			startItem.setEnabled(false);
			stopItem.setEnabled(false);
		}

		return true;
	}

	private void addTableRow(String key, String val) {
		TableLayout tl = (TableLayout) findViewById(R.id.data_table);
		TableRow tr = new TableRow(this);
		MarginLayoutParams params = new MarginLayoutParams(
				LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
		params.setMargins(TABLE_ROW_MARGIN, TABLE_ROW_MARGIN, TABLE_ROW_MARGIN,
				TABLE_ROW_MARGIN);
		tr.setLayoutParams(params);
		tr.setBackgroundColor(Color.BLACK);
		TextView name = new TextView(this);
		name.setGravity(Gravity.RIGHT);
		name.setText(key + ": ");
		TextView value = new TextView(this);
		value.setGravity(Gravity.LEFT);
		value.setText(val);
		tr.addView(name);
		tr.addView(value);
		tl.addView(tr, new TableLayout.LayoutParams(LayoutParams.WRAP_CONTENT,
				LayoutParams.WRAP_CONTENT));

		if (tl.getChildCount() > 10)
			tl.removeViewAt(0);
	}

	/**
	 *
	 */
	private Runnable mQueueCommands = new Runnable() {
		public void run() {
			/*
			 * If values are not default, then we have values to calculate MPG
			 */
			Log.d(TAG, "SPD:" + speed + ", MAF:" + maf + ", LTFT:" + ltft);
			if (speed > 1 && maf > 1 && ltft != 0) {
				FuelEconomyWithMAFObdCommand fuelEconCmd = new FuelEconomyWithMAFObdCommand(
						FuelType.DIESEL, speed, maf, ltft, false /* TODO */);
				TextView tvMpg = (TextView) findViewById(R.id.fuel_econ_text);
				String liters100km = String.format("%.2f",
						fuelEconCmd.getLitersPer100Km());
				tvMpg.setText("" + liters100km);
				Log.d(TAG, "FUELECON:" + liters100km);
			}

			if (mCmdThread != null)
				queueCommands();

			// run again in 2s
			mHandler.postDelayed(mQueueCommands, 2000);
		}
	};

	/**
	 *
	 */
	private void queueCommands() {
		final ObdCommandJob airTemp = new ObdCommandJob(new AmbientAirTemperatureObdCommand());
		final ObdCommandJob speed = new ObdCommandJob(new SpeedObdCommand());
		// final ObdCommandJob fuelEcon = new ObdCommandJob(
		// new FuelEconomyObdCommand());
		final ObdCommandJob rpm = new ObdCommandJob(new EngineRPMObdCommand());
		final ObdCommandJob maf = new ObdCommandJob(new MassAirFlowObdCommand());
		final ObdCommandJob fuelLevel = new ObdCommandJob(
				new FuelLevelObdCommand());
		final ObdCommandJob ltft1 = new ObdCommandJob(new FuelTrimObdCommand(
				FuelTrim.LONG_TERM_BANK_1));
		/*
		 * final ObdCommandJob ltft2 = new ObdCommandJob(new FuelTrimObdCommand(
		 * FuelTrim.LONG_TERM_BANK_2)); final ObdCommandJob stft1 = new
		 * ObdCommandJob(new FuelTrimObdCommand( FuelTrim.SHORT_TERM_BANK_1));
		 * final ObdCommandJob stft2 = new ObdCommandJob(new FuelTrimObdCommand(
		 * FuelTrim.SHORT_TERM_BANK_2)); final ObdCommandJob equiv = new
		 * ObdCommandJob(new CommandEquivRatioObdCommand());
		 */
		mCmdThread.addJobToQueue(airTemp);
		mCmdThread.addJobToQueue(speed);
		// mServiceConnection.addJobToQueue(fuelEcon);
		mCmdThread.addJobToQueue(rpm);
		mCmdThread.addJobToQueue(maf);
		mCmdThread.addJobToQueue(fuelLevel);
		// mServiceConnection.addJobToQueue(equiv);
		mCmdThread.addJobToQueue(ltft1);
		// mServiceConnection.addJobToQueue(ltft2);
		// mServiceConnection.addJobToQueue(stft1);
		// mServiceConnection.addJobToQueue(stft2);
	}
}


text:
using System;
using System.Threading.Tasks;
using MediatR;
using SFA.DAS.EmployerAccounts.Data;
using SFA.DAS.Validation;
using SFA.DAS.EmployerAccounts.Commands.AuditCommand;
using SFA.DAS.EmployerAccounts.Models;
using Entity = SFA.DAS.Audit.Types.Entity;
using SFA.DAS.EmployerAccounts.Extensions;

namespace SFA.DAS.EmployerAccounts.Queries.GetAccountTeamMembers
{
    public class GetAccountTeamMembersHandler : IAsyncRequestHandler<GetAccountTeamMembersQuery, GetAccountTeamMembersResponse>
    {
        private readonly IValidator<GetAccountTeamMembersQuery> _validator;
        private readonly IEmployerAccountTeamRepository _repository;
        private readonly IMembershipRepository _membershipRepository;
        private readonly IMediator _mediator;
        private readonly IUserContext _userContext;

        public GetAccountTeamMembersHandler(
            IValidator<GetAccountTeamMembersQuery> validator,
            IEmployerAccountTeamRepository repository,
            IMediator mediator,
            IMembershipRepository membershipRepository, IUserContext userContext)
        {
            _validator = validator;
            _repository = repository;
            _mediator = mediator;
            _membershipRepository = membershipRepository;
            _userContext = userContext;
        }

        public async Task<GetAccountTeamMembersResponse> Handle(GetAccountTeamMembersQuery message)
        {
            var validationResult = await _validator.ValidateAsync(message);

            if (!validationResult.IsValid())
            {
                if (validationResult.IsUnauthorized)
                {
                    throw new UnauthorizedAccessException("User not authorised");
                }

                throw new InvalidRequestException(validationResult.ValidationDictionary);
            }

            var accounts = await _repository.GetAccountTeamMembersForUserId(message.HashedAccountId, message.ExternalUserId);

            if (_userContext.IsSupportConsoleUser())
            {
                await AuditAccess(message);
            }

            return new GetAccountTeamMembersResponse { TeamMembers = accounts };
        }

        private async Task AuditAccess(GetAccountTeamMembersQuery message)
        {
            var caller = await _membershipRepository.GetCaller(message.HashedAccountId, message.ExternalUserId);

            await _mediator.SendAsync(new CreateAuditCommand
            {
                EasAuditMessage = new EasAuditMessage
                {
                    Category = "VIEW",
                    Description = $"Account {caller.AccountId} team members viewed",
                    AffectedEntity = new Entity { Type = "TeamMembers", Id = caller.AccountId.ToString() }
                }
            });
        }
    }
}


text:
package org.apache.kafka.streams.state;

import org.apache.kafka.common.annotation.InterfaceStability;
import org.apache.kafka.streams.KeyValue;
import org.apache.kafka.streams.processor.StateStore;

import java.util.List;

/**
 * A key-value store that supports put/get/delete and range queries.
 *
 * @param <K> The key type
 * @param <V> The value type
 */
@InterfaceStability.Unstable
public interface KeyValueStore<K, V> extends StateStore, ReadOnlyKeyValueStore<K, V> {

    /**
     * Update the value associated with this key
     *
     * @param key The key to associate the value to
     * @param value The value
     * @throws NullPointerException If null is used for key or value.
     */
    void put(K key, V value);

    /**
     * Update the value associated with this key, unless a value
     * is already associated with the key
     *
     * @param key The key to associate the value to
     * @param value The value
     * @return The old value or null if there is no such key.
     * @throws NullPointerException If null is used for key or value.
     */
    V putIfAbsent(K key, V value);

    /**
     * Update all the given key/value pairs
     *
     * @param entries A list of entries to put into the store.
     * @throws NullPointerException If null is used for any key or value.
     */
    void putAll(List<KeyValue<K, V>> entries);

    /**
     * Delete the value from the store (if there is one)
     *
     * @param key The key
     * @return The old value or null if there is no such key.
     * @throws NullPointerException If null is used for key.
     */
    V delete(K key);
}


text:
@setlocal
@echo off
rem $Id:$
rem
rem Windows BAT-equivalent to summa-storage.sh
rem

set BATLOCATION=%~dp0
pushd %BATLOCATION%
cd ..
set DEPLOY=%CD%
popd

set MAINCLASS=dk.statsbiblioteket.summa.search.api.tools.SearchTool
set DEFAULT_CONFIGURATION=%DEPLOY%/config/didyoumean    -tool.configuration.xml
set SECURITY_POLICY="%DEPLOY%/config/server.policy"
call %DEPLOY%\bin\generic_start.bat %*%

endlocal


text:
package org.kie.server.remote.rest.swagger;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;

import org.kie.server.services.api.KieServerApplicationComponentsService;
import org.kie.server.services.api.SupportedTransports;
import org.kie.server.services.swagger.SwaggerKieServerExtension;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import io.swagger.jaxrs.listing.SwaggerSerializers;

public class SwaggerRestApplicationComponentsService implements KieServerApplicationComponentsService {

	private static final String OWNER_EXTENSION = SwaggerKieServerExtension.EXTENSION_NAME;

	@Override
	public Collection<Object> getAppComponents(String extension, SupportedTransports type, Object... services) {
		// skip calls from other than owning extension
		if (!OWNER_EXTENSION.equals(extension)) {
			return Collections.emptyList();
		}

		List<Object> components = new ArrayList<Object>(2);
		// Swagger Resources
		components.add(new KieApiListingResource());
		components.add(new SwaggerSerializers());

		return components;
	}

}


text:
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Patient] (
		[PatientID]              [int] IDENTITY(1, 1) NOT NULL,
		[userName]               [nvarchar](60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[userPassword]           [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[user_hash]              [nvarchar](32) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[firstName]              [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[lastName]               [nvarchar](30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[phoneHome]              [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[phoneMobile]            [nvarchar](50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[email]                  [nvarchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[status]                 [nvarchar](25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[addressStreet]          [nvarchar](150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[addressCity]            [nvarchar](100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[addressState]           [int] NULL,
		[address_country]        [nvarchar](25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[address_postalcode]     [nvarchar](9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[user_preferences]       [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[pwd_last_changed]       [datetime] NULL,
		[lang]                   [nvarchar](10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[timezone_id]            [nvarchar](128) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[primary_physsician]     [int] NULL,
		[date_of_birth]          [date] NULL,
		[date_joined]            [date] NOT NULL,
		[picture]                [nvarchar](max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
		[meta_data]              [xml] NULL,
		[userRole]               [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[Patient]
	ADD
	CONSTRAINT [PK__Patient__970EC34674794A92]
	PRIMARY KEY
	CLUSTERED
	([PatientID])
	ON [PRIMARY]
GO
ALTER TABLE [dbo].[Patient]
	ADD
	CONSTRAINT [DF__Patient__date_jo__76619304]
	DEFAULT (getdate()) FOR [date_joined]
GO
ALTER TABLE [dbo].[Patient]
	ADD
	CONSTRAINT [DF_Patient_address_country]
	DEFAULT (N'USA') FOR [address_country]
GO
ALTER TABLE [dbo].[Patient]
	ADD
	CONSTRAINT [DF_Patient_userRole]
	DEFAULT ((1)) FOR [userRole]
GO
ALTER TABLE [dbo].[Patient]
	WITH CHECK
	ADD CONSTRAINT [FK_Patient_Physician]
	FOREIGN KEY ([primary_physsician]) REFERENCES [dbo].[HealthcareProvider] ([PhysicianID])
ALTER TABLE [dbo].[Patient]
	CHECK CONSTRAINT [FK_Patient_Physician]

GO
ALTER TABLE [dbo].[Patient]
	WITH CHECK
	ADD CONSTRAINT [FK_Patient_State]
	FOREIGN KEY ([addressState]) REFERENCES [dbo].[State] ([StateID])
ALTER TABLE [dbo].[Patient]
	CHECK CONSTRAINT [FK_Patient_State]

GO
ALTER TABLE [dbo].[Patient] SET (LOCK_ESCALATION = TABLE)
GO


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

<TITLE>
PMParams
</TITLE>

<META NAME="date" CONTENT="2014-05-30">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD

com.panacea.sdk

Class PMParams

java.lang.Object
  com.panacea.sdk.PMParams

public class PMParams
extends java.lang.Object

Used to pass input parameters to Panacea Web Calls

Author:

Cobi Interactive

Field Summary

private  java.util.Hashtable<java.lang.String,java.lang.String>
keysValues

Constructor Summary

PMParams()

Method Summary

 java.lang.String
get(java.lang.String key)

 java.lang.String
getURLParameters()

          Constructs the keys and values as URL parameters

 void
put(java.lang.String key,
    java.lang.String value)

Methods inherited from class java.lang.Object

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

Field Detail

keysValues

private java.util.Hashtable<java.lang.String,java.lang.String> keysValues

Constructor Detail

PMParams

public PMParams()

Method Detail

put

public void put(java.lang.String key,
                java.lang.String value)

get

public java.lang.String get(java.lang.String key)

getURLParameters

public java.lang.String getURLParameters()

Constructs the keys and values as URL parameters

Returns:
URL encoded parameter String

      Overview
      Package
    Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV CLASS
 NEXT CLASS

  FRAMES
 NO FRAMES

  All Classes

  SUMMARY: NESTED | FIELD | CONSTR | METHOD

DETAIL: FIELD | CONSTR | METHOD


text:
"use strict";

module.exports = function (remove, paths) {
  return paths.map(function (path) {
    return path.replace(remove + "/", "");
  });
};


text:
package com.github.jonathanxd.wcommands;

import com.github.jonathanxd.wcommands.command.holder.CommandHolder;
import com.github.jonathanxd.wcommands.commandstring.CommandStringParser;
import com.github.jonathanxd.wcommands.data.CommandData;
import com.github.jonathanxd.wcommands.exceptions.ErrorType;
import com.github.jonathanxd.wcommands.handler.ErrorHandler;
import com.github.jonathanxd.wcommands.handler.ProcessAction;
import com.github.jonathanxd.wcommands.processor.CommonProcessor;
import com.github.jonathanxd.wcommands.processor.Processor;
import com.github.jonathanxd.wcommands.ticket.RegistrationTicket;

import java.util.List;

/**
 * Created by jonathan on 27/02/16.
 */
public class WCommandCommon extends WCommand<List<CommandData<CommandHolder>>> {

    public WCommandCommon(Processor<List<CommandData<CommandHolder>>> processor) {
        this(processor, (e, d, l, v, r, k) -> {
            if (e != null)
                e.printStackTrace();
            return (e != null && e.getType().getExceptionType() != ErrorType.Type.ERROR) ? ProcessAction.CONTINUE : ProcessAction.STOP;
        });
    }

    public WCommandCommon() {
        this(new CommonProcessor());
    }

    public WCommandCommon(ErrorHandler<List<CommandData<CommandHolder>>> errorHandler) {
        this(new CommonProcessor(), errorHandler);
    }

    public WCommandCommon(Processor<List<CommandData<CommandHolder>>> processor, ErrorHandler<List<CommandData<CommandHolder>>> errorHandler) {
        super(processor, errorHandler);
    }

    public WCommandCommon(Processor<List<CommandData<CommandHolder>>> processor, ErrorHandler<List<CommandData<CommandHolder>>> errorHandler, CommandStringParser commandStringParser) {
        super(processor, errorHandler, commandStringParser);
    }

    /**
     * Export settings to other {@link WCommandCommon}
     */
    public void exportTo(WCommandCommon wCommandCommon) {
        wCommandCommon.importFrom(this);
    }

    /**
     * Import commands and interceptors from another {@link WCommandCommon}
     *
     * @param commandCommon {@link WCommandCommon} to import
     */
    public void importFrom(WCommandCommon commandCommon) {

        if (commandCommon == this)
            throw new UnsupportedOperationException("Cannot import from same WCommandCommon");

        commandCommon.getCommands().stream().filter(spec -> !this.getCommands().contains(spec)).forEach(spec -> this.getCommands().add(spec, RegistrationTicket.empty(this)));
        commandCommon.getInterceptors().stream().filter(invokeInterceptor -> !this.getInterceptors().contains(invokeInterceptor)).forEach(invokeInterceptor -> this.getInterceptors().add(invokeInterceptor));

    }
}


text:
/*-------------------------------------------------------------------------
  Copyright 2008 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
  the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/
// .NAME vtkPBGLMinimumSpanningTree - Minimum spanning tree of a
// distributed vtkGraph.
//
// .SECTION Description
// This VTK class uses the Parallel BGL minimum spanning tree
// generic algorithm to compute the minimum spanning tree of a weighted,
// undirected graph (a distributed vtkGraph).
//
// .SECTION See Also
// vtkGraph vtkPBGLGraphAdaptor vtkBoostGraphAdapter
//
// @deprecated Not maintained as of VTK 6.2 and will be removed eventually.

#ifndef vtkPBGLMinimumSpanningTree_h
#define vtkPBGLMinimumSpanningTree_h

#include "vtkInfovisParallelModule.h" // For export macro
#include "vtkStdString.h" // For string type
#include "vtkVariant.h" // For variant type

#include "vtkGraphAlgorithm.h"

class vtkSelection;

#if !defined(VTK_LEGACY_REMOVE)
class VTKINFOVISPARALLEL_EXPORT vtkPBGLMinimumSpanningTree : public vtkGraphAlgorithm
{
public:
  static vtkPBGLMinimumSpanningTree *New();
  vtkTypeMacro(vtkPBGLMinimumSpanningTree, vtkGraphAlgorithm);
  void PrintSelf(ostream& os, vtkIndent indent);

  // Description:
  // Set the name of the edge-weight input array, which must name an
  // array that is part of the edge data of the input graph and
  // contains numeric data. If the edge-weight array is not of type
  // vtkDoubleArray, the array will be copied into a temporary
  // vtkDoubleArray.
  vtkSetStringMacro(EdgeWeightArrayName);

  // Description:
  // Set the output selection type. The default is to use the
  // the set of minimum spanning tree edges "MINIMUM_SPANNING_TREE_EDGES". No
  // other options are defined.
  vtkSetStringMacro(OutputSelectionType);

protected:
  vtkPBGLMinimumSpanningTree();
  ~vtkPBGLMinimumSpanningTree();

  virtual int RequestData(
    vtkInformation *,
    vtkInformationVector **,
    vtkInformationVector *);

  virtual int FillInputPortInformation(
    int port, vtkInformation* info);

  virtual int FillOutputPortInformation(
    int port, vtkInformation* info);

private:
  char* EdgeWeightArrayName;
  char* OutputSelectionType;

  vtkPBGLMinimumSpanningTree(const vtkPBGLMinimumSpanningTree&);  // Not implemented.
  void operator=(const vtkPBGLMinimumSpanningTree&);  // Not implemented.
};

#endif //VTK_LEGACY_REMOVE
#endif


text:
package leader04.logic.test1;

import annotation.ZComponent;

@ZComponent
public class AbstractDao<T> {
	public boolean craeteDomainObj(T domainObj)
	{
		return true;
	}
	boolean deleteDomainObj(Integer objId)
	{
		return true;
	}
}


text:
class KeyFunction
{
public:
	virtual void Execute() const = 0;
};

template <class FunctionInstance>
class InputHelper : public KeyFunction
{
public:
	InputHelper()    // constructor
	{
		function = 0;
	}

	typedef void (FunctionInstance::*FunctionPointer)(int Param);

	virtual void Execute(int Param) const
	{
		if (function) (cInst->*function)(Param);
	}

	void SetCallback(FunctionInstance  *cInstancePointer,
		FunctionPointer   pFunctionPointer)
	{
		cInst = cInstancePointer;
		function = pFunctionPointer;
	}

private:
	FunctionInstance  *cInst;
	FunctionPointer  function;
};


text:
// -----------------------------------------------------------------------
// <copyright file="ZeroWidthEvaluator.cs" company="(none)">
//   Copyright © 2014 John Gietzen.  All Rights Reserved.
//   This source is subject to the MIT license.
//   Please see license.md for more information.
// </copyright>
// -----------------------------------------------------------------------

namespace Pegasus.Compiler
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics.CodeAnalysis;
    using System.Globalization;
    using System.Linq;
    using Pegasus.Expressions;

    /// <summary>
    /// Performs zero-width evaluation services for Pegasus <see cref="Grammar">Grammars</see>.
    /// </summary>
    public static class ZeroWidthEvaluator
    {
        /// <summary>
        /// Evaluates the expressions in a Pegasus <see cref="Grammar"/> to determine which of them are zero-width.
        /// </summary>
        /// <param name="grammar">The <see cref="Grammar"/> to evaluate.</param>
        /// <returns>A <see cref="Dictionary{TKey, TValue}"/> detailing the whether each expression in the grammar is zero-width.</returns>
        public static Dictionary<Expression, bool> Evaluate(Grammar grammar)
        {
            var zeroWidth = new Dictionary<Expression, bool?>();
            var walker = new ZeroWidthWalker(grammar, zeroWidth);

            do
            {
                walker.WalkGrammar(grammar);
            }
            while (walker.Changed);

            return zeroWidth.ToDictionary(x => x.Key, x => x.Value ?? false);
        }

        private class ZeroWidthWalker : ExpressionTreeWalker
        {
            private readonly Dictionary<string, Rule> rules;
            private readonly Dictionary<Expression, bool?> zeroWidth;
            private bool changed;

            public ZeroWidthWalker(Grammar grammar, Dictionary<Expression, bool?> zeroWidth)
            {
                this.rules = grammar.Rules.ToDictionary(r => r.Identifier.Name);
                this.zeroWidth = zeroWidth;
            }

            public bool Changed
            {
                get { return this.changed; }
            }

            public override void WalkExpression(Expression expression)
            {
                bool? starting;
                if (!this.zeroWidth.TryGetValue(expression, out starting))
                {
                    this.zeroWidth[expression] = starting;
                }

                base.WalkExpression(expression);
                this.changed = this.changed || starting != this.zeroWidth[expression];
            }

            public override void WalkGrammar(Grammar grammar)
            {
                this.changed = false;
                base.WalkGrammar(grammar);
            }

            protected override void WalkAndCodeExpression(AndCodeExpression andCodeExpression)
            {
                this.zeroWidth[andCodeExpression] = true;
            }

            protected override void WalkAndExpression(AndExpression andExpression)
            {
                base.WalkAndExpression(andExpression);

                this.zeroWidth[andExpression] = true;
            }

            protected override void WalkChoiceExpression(ChoiceExpression choiceExpression)
            {
                base.WalkChoiceExpression(choiceExpression);

                bool? result = false;
                foreach (var e in choiceExpression.Choices)
                {
                    result |= this.zeroWidth[e];

                    if (result == true)
                    {
                        break;
                    }
                }

                this.zeroWidth[choiceExpression] = result;
            }

            protected override void WalkClassExpression(ClassExpression classExpression)
            {
                this.zeroWidth[classExpression] = false;
            }

            protected override void WalkCodeExpression(CodeExpression codeExpression)
            {
                switch (codeExpression.CodeType)
                {
                    case CodeType.Result:
                    case CodeType.State:
                        this.zeroWidth[codeExpression] = true;
                        break;

                    case CodeType.Error:
                        this.zeroWidth[codeExpression] = false;
                        break;

                    default:
                        throw new InvalidOperationException(string.Format(CultureInfo.CurrentCulture, "Unknown code type '{0}'.", codeExpression.CodeType));
                }
            }

            [SuppressMessage("Microsoft.Performance", "CA1820:TestForEmptyStringsUsingStringLength", Justification = "Empty strings and null strings are logically distinct in this method.")]
            protected override void WalkLiteralExpression(LiteralExpression literalExpression)
            {
                this.zeroWidth[literalExpression] = literalExpression.Value == string.Empty;
            }

            protected override void WalkNameExpression(NameExpression nameExpression)
            {
                bool? result;
                this.zeroWidth.TryGetValue(this.rules[nameExpression.Identifier.Name].Expression, out result);
                this.zeroWidth[nameExpression] = result;
            }

            protected override void WalkNotCodeExpression(NotCodeExpression notCodeExpression)
            {
                this.zeroWidth[notCodeExpression] = true;
            }

            protected override void WalkNotExpression(NotExpression notExpression)
            {
                base.WalkNotExpression(notExpression);

                this.zeroWidth[notExpression] = true;
            }

            protected override void WalkPrefixedExpression(PrefixedExpression prefixedExpression)
            {
                base.WalkPrefixedExpression(prefixedExpression);

                this.zeroWidth[prefixedExpression] = this.zeroWidth[prefixedExpression.Expression];
            }

            protected override void WalkRepetitionExpression(RepetitionExpression repetitionExpression)
            {
                base.WalkRepetitionExpression(repetitionExpression);

                bool? result;
                if (repetitionExpression.Quantifier.Min == 0)
                {
                    result = true;
                }
                else if (repetitionExpression.Quantifier.Min <= 1 || repetitionExpression.Quantifier.Delimiter == null)
                {
                    result = this.zeroWidth[repetitionExpression.Expression];
                }
                else
                {
                    result = this.zeroWidth[repetitionExpression.Expression] & this.zeroWidth[repetitionExpression.Quantifier.Delimiter];
                }

                this.zeroWidth[repetitionExpression] = result;
            }

            protected override void WalkSequenceExpression(SequenceExpression sequenceExpression)
            {
                base.WalkSequenceExpression(sequenceExpression);

                bool? result = true;
                foreach (var e in sequenceExpression.Sequence)
                {
                    result &= this.zeroWidth[e];

                    if (result == false)
                    {
                        break;
                    }
                }

                this.zeroWidth[sequenceExpression] = result;
            }

            protected override void WalkTypedExpression(TypedExpression typedExpression)
            {
                base.WalkTypedExpression(typedExpression);

                this.zeroWidth[typedExpression] = this.zeroWidth[typedExpression.Expression];
            }

            protected override void WalkWildcardExpression(WildcardExpression wildcardExpression)
            {
                base.WalkWildcardExpression(wildcardExpression);

                this.zeroWidth[wildcardExpression] = false;
            }
        }
    }
}


text:
<?php

namespace Ceeram\Blame\Controller;

use Ceeram\Blame\Event\LoggedInUserListener;

trait BlameTrait {

/**
 * {@inheritDoc}
 */
	public function loadModel($modelClass = null, $type = 'Table') {
		$model = parent::loadModel($modelClass, $type);
		$listener = new LoggedInUserListener($this->Auth);
		$model->eventManager()->attach($listener);
		return $model;
	}

}


text:
package org.apache.commons.lang3.time;

import java.text.DateFormat;
import java.text.Format;
import java.text.SimpleDateFormat;
import java.util.Arrays;
import java.util.Locale;
import java.util.TimeZone;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;

/**
 *
FormatCache is a cache and factory for {@link Format}s.

 *
 * @since 3.0
 */
// TODO: Before making public move from getDateTimeInstance(Integer,...) to int; or some other approach.
abstract class FormatCache<F extends Format> {

    /**
     * No date or no time.  Used in same parameters as DateFormat.SHORT or DateFormat.LONG
     */
    static final int NONE= -1;

    private final ConcurrentMap<MultipartKey, F> cInstanceCache
        = new ConcurrentHashMap<>(7);

    private static final ConcurrentMap<MultipartKey, String> cDateTimeInstanceCache
        = new ConcurrentHashMap<>(7);

    /**
     *
Gets a formatter instance using the default pattern in the
     * default timezone and locale.

     *
     * @return a date/time formatter
     */
    public F getInstance() {
        return getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT, TimeZone.getDefault(), Locale.getDefault());
    }

    /**
     *
Gets a formatter instance using the specified pattern, time zone
     * and locale.

     *
     * @param pattern  {@link java.text.SimpleDateFormat} compatible
     *  pattern, non-null
     * @param timeZone  the time zone, null means use the default TimeZone
     * @param locale  the locale, null means use the default Locale
     * @return a pattern based date/time formatter
     * @throws IllegalArgumentException if pattern is invalid
     *  or null
     */
    public F getInstance(final String pattern, TimeZone timeZone, Locale locale) {
        if (pattern == null) {
            throw new NullPointerException("pattern must not be null");
        }
        if (timeZone == null) {
            timeZone = TimeZone.getDefault();
        }
        if (locale == null) {
            locale = Locale.getDefault();
        }
        final MultipartKey key = new MultipartKey(pattern, timeZone, locale);
        F format = cInstanceCache.get(key);
        if (format == null) {
            format = createInstance(pattern, timeZone, locale);
            final F previousValue= cInstanceCache.putIfAbsent(key, format);
            if (previousValue != null) {
                // another thread snuck in and did the same work
                // we should return the instance that is in ConcurrentMap
                format= previousValue;
            }
        }
        return format;
    }

    /**
     *
Create a format instance using the specified pattern, time zone
     * and locale.

     *
     * @param pattern  {@link java.text.SimpleDateFormat} compatible pattern, this will not be null.
     * @param timeZone  time zone, this will not be null.
     * @param locale  locale, this will not be null.
     * @return a pattern based date/time formatter
     * @throws IllegalArgumentException if pattern is invalid
     *  or null
     */
    abstract protected F createInstance(String pattern, TimeZone timeZone, Locale locale);

    /**
     *
Gets a date/time formatter instance using the specified style,
     * time zone and locale.

     *
     * @param dateStyle  date style: FULL, LONG, MEDIUM, or SHORT, null indicates no date in format
     * @param timeStyle  time style: FULL, LONG, MEDIUM, or SHORT, null indicates no time in format
     * @param timeZone  optional time zone, overrides time zone of
     *  formatted date, null means use default Locale
     * @param locale  optional locale, overrides system locale
     * @return a localized standard date/time formatter
     * @throws IllegalArgumentException if the Locale has no date/time
     *  pattern defined
     */
    // This must remain private, see LANG-884
    private F getDateTimeInstance(final Integer dateStyle, final Integer timeStyle, final TimeZone timeZone, Locale locale) {
        if (locale == null) {
            locale = Locale.getDefault();
        }
        final String pattern = getPatternForStyle(dateStyle, timeStyle, locale);
        return getInstance(pattern, timeZone, locale);
    }

    /**
     *
Gets a date/time formatter instance using the specified style,
     * time zone and locale.

     *
     * @param dateStyle  date style: FULL, LONG, MEDIUM, or SHORT
     * @param timeStyle  time style: FULL, LONG, MEDIUM, or SHORT
     * @param timeZone  optional time zone, overrides time zone of
     *  formatted date, null means use default Locale
     * @param locale  optional locale, overrides system locale
     * @return a localized standard date/time formatter
     * @throws IllegalArgumentException if the Locale has no date/time
     *  pattern defined
     */
    // package protected, for access from FastDateFormat; do not make public or protected
    F getDateTimeInstance(final int dateStyle, final int timeStyle, final TimeZone timeZone, final Locale locale) {
        return getDateTimeInstance(Integer.valueOf(dateStyle), Integer.valueOf(timeStyle), timeZone, locale);
    }

    /**
     *
Gets a date formatter instance using the specified style,
     * time zone and locale.

     *
     * @param dateStyle  date style: FULL, LONG, MEDIUM, or SHORT
     * @param timeZone  optional time zone, overrides time zone of
     *  formatted date, null means use default Locale
     * @param locale  optional locale, overrides system locale
     * @return a localized standard date/time formatter
     * @throws IllegalArgumentException if the Locale has no date/time
     *  pattern defined
     */
    // package protected, for access from FastDateFormat; do not make public or protected
    F getDateInstance(final int dateStyle, final TimeZone timeZone, final Locale locale) {
        return getDateTimeInstance(Integer.valueOf(dateStyle), null, timeZone, locale);
    }

    /**
     *
Gets a time formatter instance using the specified style,
     * time zone and locale.

     *
     * @param timeStyle  time style: FULL, LONG, MEDIUM, or SHORT
     * @param timeZone  optional time zone, overrides time zone of
     *  formatted date, null means use default Locale
     * @param locale  optional locale, overrides system locale
     * @return a localized standard date/time formatter
     * @throws IllegalArgumentException if the Locale has no date/time
     *  pattern defined
     */
    // package protected, for access from FastDateFormat; do not make public or protected
    F getTimeInstance(final int timeStyle, final TimeZone timeZone, final Locale locale) {
        return getDateTimeInstance(null, Integer.valueOf(timeStyle), timeZone, locale);
    }

    /**
     *
Gets a date/time format for the specified styles and locale.

     *
     * @param dateStyle  date style: FULL, LONG, MEDIUM, or SHORT, null indicates no date in format
     * @param timeStyle  time style: FULL, LONG, MEDIUM, or SHORT, null indicates no time in format
     * @param locale  The non-null locale of the desired format
     * @return a localized standard date/time format
     * @throws IllegalArgumentException if the Locale has no date/time pattern defined
     */
    // package protected, for access from test code; do not make public or protected
    static String getPatternForStyle(final Integer dateStyle, final Integer timeStyle, final Locale locale) {
        final MultipartKey key = new MultipartKey(dateStyle, timeStyle, locale);

        String pattern = cDateTimeInstanceCache.get(key);
        if (pattern == null) {
            try {
                DateFormat formatter;
                if (dateStyle == null) {
                    formatter = DateFormat.getTimeInstance(timeStyle.intValue(), locale);
                }
                else if (timeStyle == null) {
                    formatter = DateFormat.getDateInstance(dateStyle.intValue(), locale);
                }
                else {
                    formatter = DateFormat.getDateTimeInstance(dateStyle.intValue(), timeStyle.intValue(), locale);
                }
                pattern = ((SimpleDateFormat)formatter).toPattern();
                final String previous = cDateTimeInstanceCache.putIfAbsent(key, pattern);
                if (previous != null) {
                    // even though it doesn't matter if another thread put the pattern
                    // it's still good practice to return the String instance that is
                    // actually in the ConcurrentMap
                    pattern= previous;
                }
            } catch (final ClassCastException ex) {
                throw new IllegalArgumentException("No date time pattern for locale: " + locale);
            }
        }
        return pattern;
    }

    // ----------------------------------------------------------------------
    /**
     *
Helper class to hold multi-part Map keys

     */
    private static class MultipartKey {
        private final Object[] keys;
        private int hashCode;

        /**
         * Constructs an instance of MultipartKey to hold the specified objects.
         * @param keys the set of objects that make up the key.  Each key may be null.
         */
        public MultipartKey(final Object... keys) {
            this.keys = keys;
        }

        /**
         * {@inheritDoc}
         */
        @Override
        public boolean equals(final Object obj) {
            // Eliminate the usual boilerplate because
            // this inner static class is only used in a generic ConcurrentHashMap
            // which will not compare against other Object types
            return Arrays.equals(keys, ((MultipartKey)obj).keys);
        }

        /**
         * {@inheritDoc}
         */
        @Override
        public int hashCode() {
            if(hashCode==0) {
                int rc= 0;
                for(final Object key : keys) {
                    if(key!=null) {
                        rc= rc*7 + key.hashCode();
                    }
                }
                hashCode= rc;
            }
            return hashCode;
        }
    }

}


text:
package com.vmware.vim25;

/**
* @author Steve Jin (http://www.doublecloud.org)
* @version 5.1
*/

public class ArrayOfVirtualMachineSerialInfo {
  public VirtualMachineSerialInfo[] VirtualMachineSerialInfo;

  public VirtualMachineSerialInfo[] getVirtualMachineSerialInfo() {
    return this.VirtualMachineSerialInfo;
  }

  public VirtualMachineSerialInfo getVirtualMachineSerialInfo(int i) {
    return this.VirtualMachineSerialInfo[i];
  }

  public void setVirtualMachineSerialInfo(VirtualMachineSerialInfo[] VirtualMachineSerialInfo) {
    this.VirtualMachineSerialInfo=VirtualMachineSerialInfo;
  }
}


text:
@interface ItemsViewController : CoreDataTableViewController

@property (nonatomic,strong) NSString *entityName;

@end


text:
require 'byebug'
require 'vcr'
# Require this file using `require "spec_helper"` to ensure that it is only
# loaded once.
#
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
RSpec.configure do |config|
  config.treat_symbols_as_metadata_keys_with_true_values = true
  config.run_all_when_everything_filtered = true
  config.filter_run :focus

  # Run specs in random order to surface order dependencies. If you find an
  # order dependency and want to debug it, you can fix the order by providing
  # the seed, which is printed after each run.
  #     --seed 1234
  config.order = 'random'
end

VCR.configure do |config|
  config.cassette_library_dir = 'spec/vcr'
  config.hook_into :webmock
end


text:
<?php
include_once($_SERVER['DOCUMENT_ROOT'].'/include/autoprepend.php');
/* [Begin patch] */
/* [End patch] */
if(file_exists($_SERVER['DOCUMENT_ROOT'].'/include/bo/class/job_experience.class.php')  && (strpos(__FILE__,'/include/bo/class/job_experience.class.php')===FALSE) ){
		include_once($_SERVER['DOCUMENT_ROOT'].'/include/bo/class/job_experience.class.php');
}else{
/*======================================

objet de BDD job_experience :: class job_experience

SQL mySQL:

DROP TABLE IF EXISTS job_experience;
CREATE TABLE job_experience
(
	job_id			int (11) PRIMARY KEY not null,
	job_libelle			int (11),
	job_statut			int not null,
	job_ordre			int (11)
)

SQL Oracle:

DROP TABLE job_experience
CREATE TABLE job_experience
(
	job_id			number (11) constraint job_pk PRIMARY KEY not null,
	job_libelle			number (11),
	job_statut			number not null,
	job_ordre			number (11)
)

<?xml version="1.0" encoding="ISO-8859-1" ?>
<class name="job_experience" libelle="Niveau d'expérience" prefix="job" display="libelle" abstract="libelle">
<item name="id" type="int" length="11" isprimary="true" notnull="true" default="-1" list="true" />
<item name="libelle" type="int" length="11" list="true" order="true" translate="reference"  />
<item name="statut" type="int" notnull="true" default="DEF_CODE_STATUT_DEFAUT" list="true" />
<item name="ordre" libelle="Ordre d'apparition" type="int" length="11" list="true" />
</class>

==========================================*/

class job_experience
{
var $inherited_list = array();
var $inherited = array();
var $id;
var $libelle;
var $statut;
var $ordre;

var $XML = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>
<class name=\"job_experience\" libelle=\"Niveau d'expérience\" prefix=\"job\" display=\"libelle\" abstract=\"libelle\">
<item name=\"id\" type=\"int\" length=\"11\" isprimary=\"true\" notnull=\"true\" default=\"-1\" list=\"true\" />
<item name=\"libelle\" type=\"int\" length=\"11\" list=\"true\" order=\"true\" translate=\"reference\"  />
<item name=\"statut\" type=\"int\" notnull=\"true\" default=\"DEF_CODE_STATUT_DEFAUT\" list=\"true\" />
<item name=\"ordre\" libelle=\"Ordre d'apparition\" type=\"int\" length=\"11\" list=\"true\" />
</class>";

var $XML_inherited = null;

var $sMySql = "CREATE TABLE job_experience
(
	job_id			int (11) PRIMARY KEY not null,
	job_libelle			int (11),
	job_statut			int not null,
	job_ordre			int (11)
)

";

// constructeur
function job_experience($id=null)
{
	if (istable(get_class($this)) == false){
		dbExecuteQuery($this->sMySql);
	}

	if($id!=null) {
		$tempThis = dbGetObjectFromPK(get_class($this), $id);
		foreach ($tempThis as $tempKey => $tempValue){
			$this->$tempKey = $tempValue;
		}
		$tempThis = null;
		if(array_key_exists('0',$this->inherited_list)){
			foreach($this->inherited_list as $class){
				if(!is_object($class))
					$this->inherited[$class] = dbGetObjectFromPK($class, $id);
			}
		}
	} else {
		$this->id = -1;
		$this->libelle = -1;
		$this->statut = DEF_CODE_STATUT_DEFAUT;
		$this->ordre = -1;
		if(array_key_exists('0',$this->inherited_list)){
			foreach($this->inherited_list as $class){
				if(!is_object($class))
					$this->inherited[$class] = new $class();
			}
		}
	}
}

// liste des champs de l'objet
function getListeChamps()
{
	// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp
	$laListeChamps[]=new dbChamp("Job_id", "entier", "get_id", "set_id");
	$laListeChamps[]=new dbChamp("Job_libelle", "entier", "get_libelle", "set_libelle");
	$laListeChamps[]=new dbChamp("Job_statut", "entier", "get_statut", "set_statut");
	$laListeChamps[]=new dbChamp("Job_ordre", "entier", "get_ordre", "set_ordre");
	return($laListeChamps);
}

// getters
function get_id() { return($this->id); }
function get_libelle() { return($this->libelle); }
function get_statut() { return($this->statut); }
function get_ordre() { return($this->ordre); }

// setters
function set_id($c_job_id) { return($this->id=$c_job_id); }
function set_libelle($c_job_libelle) { return($this->libelle=$c_job_libelle); }
function set_statut($c_job_statut) { return($this->statut=$c_job_statut); }
function set_ordre($c_job_ordre) { return($this->ordre=$c_job_ordre); }

// autres getters
function getGetterPK() { return("get_id"); }
function getSetterPK() { return("set_id"); }
function getFieldPK() { return("job_id"); }
// statut
function getGetterStatut() {return("get_statut"); }
function getFieldStatut() {return("job_statut"); }
//
function getTable() { return("job_experience"); }
function getClasse() { return("job_experience"); }
function getPrefix() { return("job"); }
function getDisplay() { return("libelle"); }
function getAbstract() { return("libelle"); }

} //class

// ecriture des fichiers
if (!is_dir($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience")){
	mkdir($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience");
	$list = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/list_job_experience.php", "w");
	$listContent = "<"."?php

\$"."script = explode('/',\$"."_SERVER['PHP_SELF']);
\$"."script = \$"."script[sizeof(\$"."script)-1];

if (is_file(\$"."_SERVER['DOCUMENT_ROOT'].'/include/bo/cms/prepend.'.\$"."script))
	require_once('include/bo/cms/prepend.'.\$"."script);

include('cms-inc/autoClass/list.php');
?".">";
	fwrite($list, $listContent);
	fclose($list);
	$maj = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/maj_job_experience.php", "w");
	$majContent = "<"."?php include('cms-inc/autoClass/maj.php'); ?".">";
	fwrite($maj, $majContent);
	fclose($maj);
	$show = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/show_job_experience.php", "w");
	$showContent = "<"."?php include('cms-inc/autoClass/show.php'); ?".">";
	fwrite($show, $showContent);
	fclose($show);
	$rss = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/rss_job_experience.php", "w");
	$rssContent = "<"."?php include('cms-inc/autoClass/rss.php'); ?".">";
	fwrite($rss, $rssContent);
	fclose($rss);
	$xml = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/xml_job_experience.php", "w");
	$xmlContent = "<"."?php include('cms-inc/autoClass/xml.php'); ?".">";
	fwrite($xml, $xmlContent);
	fclose($xml);
	$xmlxls = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/xlsx_job_experience.php", "w");
	$xmlxlsContent = "<"."?php include('cms-inc/autoClass/xlsx.php'); ?".">";
	fwrite($xmlxls, $xmlxlsContent);
	fclose($xmlxls);
	$export = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/export_job_experience.php", "w");
	$exportContent = "<"."?php include('cms-inc/autoClass/export.php'); ?".">";
	fwrite($export, $exportContent);
	fclose($export);
	$import = fopen($_SERVER['DOCUMENT_ROOT']."/backoffice/cms/job_experience/import_job_experience.php", "w");
	$importContent = "<"."?php include('cms-inc/autoClass/import.php'); ?".">";
	fwrite($import, $importContent);
	fclose($import);
}
}
?>


text:
using namespace msgf;

//---------------------------------------------------------
//		get Instrument
//---------------------------------------------------------
Instrument* InstrumentFactory::getInstrument( Part* pt, int instId )
{
	Instrument*	pinst = 0;

	switch (instId){
		//	instId = (16384 * Bank MSB) + (128 * Bank LSB) + Program Change Number

		//	VAS (virtual analog Synth)
		case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7:
		case 8: case 9: case 10: case 11: case 12: case 13: case 14: case 15:{
			pinst = new VasInstrument(pt,instId);
			break;
		}

		case 127: pinst = new InstrumentForCheck(pt,0); break;
		default: break;
	}

	return pinst;
}


text:
    Professions: adding,editing,removing

        Add professions

            <input type="text" value="" placeholder="Type profession name to search" class="form-control my-form-control"
                    ng-model="searchQuery">

        #
        Profession Name

        {{profession.id}}
        {{profession.name}}

            <button class="btn btn-danger btn-large btn-block" ng-click="professionsPageCtrl.showAModal($index)">
                Remove
            </button>

<my-goup-btn></my-goup-btn>