text:
package v1

import (
	"bytes"
	"encoding/json"
	"errors"
	"fmt"

	"k8s.io/apimachinery/pkg/fields"
	"k8s.io/apimachinery/pkg/labels"
	"k8s.io/apimachinery/pkg/selection"
	"k8s.io/apimachinery/pkg/types"
)

// LabelSelectorAsSelector converts the LabelSelector api type into a struct that implements
// labels.Selector
// Note: This function should be kept in sync with the selector methods in pkg/labels/selector.go
func LabelSelectorAsSelector(ps *LabelSelector) (labels.Selector, error) {
	if ps == nil {
		return labels.Nothing(), nil
	}
	if len(ps.MatchLabels)+len(ps.MatchExpressions) == 0 {
		return labels.Everything(), nil
	}
	selector := labels.NewSelector()
	for k, v := range ps.MatchLabels {
		r, err := labels.NewRequirement(k, selection.Equals, []string{v})
		if err != nil {
			return nil, err
		}
		selector = selector.Add(*r)
	}
	for _, expr := range ps.MatchExpressions {
		var op selection.Operator
		switch expr.Operator {
		case LabelSelectorOpIn:
			op = selection.In
		case LabelSelectorOpNotIn:
			op = selection.NotIn
		case LabelSelectorOpExists:
			op = selection.Exists
		case LabelSelectorOpDoesNotExist:
			op = selection.DoesNotExist
		default:
			return nil, fmt.Errorf("%q is not a valid pod selector operator", expr.Operator)
		}
		r, err := labels.NewRequirement(expr.Key, op, append([]string(nil), expr.Values...))
		if err != nil {
			return nil, err
		}
		selector = selector.Add(*r)
	}
	return selector, nil
}

// LabelSelectorAsMap converts the LabelSelector api type into a map of strings, ie. the
// original structure of a label selector. Operators that cannot be converted into plain
// labels (Exists, DoesNotExist, NotIn, and In with more than one value) will result in
// an error.
func LabelSelectorAsMap(ps *LabelSelector) (map[string]string, error) {
	if ps == nil {
		return nil, nil
	}
	selector := map[string]string{}
	for k, v := range ps.MatchLabels {
		selector[k] = v
	}
	for _, expr := range ps.MatchExpressions {
		switch expr.Operator {
		case LabelSelectorOpIn:
			if len(expr.Values) != 1 {
				return selector, fmt.Errorf("operator %q without a single value cannot be converted into the old label selector format", expr.Operator)
			}
			// Should we do anything in case this will override a previous key-value pair?
			selector[expr.Key] = expr.Values[0]
		case LabelSelectorOpNotIn, LabelSelectorOpExists, LabelSelectorOpDoesNotExist:
			return selector, fmt.Errorf("operator %q cannot be converted into the old label selector format", expr.Operator)
		default:
			return selector, fmt.Errorf("%q is not a valid selector operator", expr.Operator)
		}
	}
	return selector, nil
}

// ParseToLabelSelector parses a string representing a selector into a LabelSelector object.
// Note: This function should be kept in sync with the parser in pkg/labels/selector.go
func ParseToLabelSelector(selector string) (*LabelSelector, error) {
	reqs, err := labels.ParseToRequirements(selector)
	if err != nil {
		return nil, fmt.Errorf("couldn't parse the selector string \"%s\": %v", selector, err)
	}

	labelSelector := &LabelSelector{
		MatchLabels:      map[string]string{},
		MatchExpressions: []LabelSelectorRequirement{},
	}
	for _, req := range reqs {
		var op LabelSelectorOperator
		switch req.Operator() {
		case selection.Equals, selection.DoubleEquals:
			vals := req.Values()
			if vals.Len() != 1 {
				return nil, fmt.Errorf("equals operator must have exactly one value")
			}
			val, ok := vals.PopAny()
			if !ok {
				return nil, fmt.Errorf("equals operator has exactly one value but it cannot be retrieved")
			}
			labelSelector.MatchLabels[req.Key()] = val
			continue
		case selection.In:
			op = LabelSelectorOpIn
		case selection.NotIn:
			op = LabelSelectorOpNotIn
		case selection.Exists:
			op = LabelSelectorOpExists
		case selection.DoesNotExist:
			op = LabelSelectorOpDoesNotExist
		case selection.GreaterThan, selection.LessThan:
			// Adding a separate case for these operators to indicate that this is deliberate
			return nil, fmt.Errorf("%q isn't supported in label selectors", req.Operator())
		default:
			return nil, fmt.Errorf("%q is not a valid label selector operator", req.Operator())
		}
		labelSelector.MatchExpressions = append(labelSelector.MatchExpressions, LabelSelectorRequirement{
			Key:      req.Key(),
			Operator: op,
			Values:   req.Values().List(),
		})
	}
	return labelSelector, nil
}

// SetAsLabelSelector converts the labels.Set object into a LabelSelector api object.
func SetAsLabelSelector(ls labels.Set) *LabelSelector {
	if ls == nil {
		return nil
	}

	selector := &LabelSelector{
		MatchLabels: make(map[string]string),
	}
	for label, value := range ls {
		selector.MatchLabels[label] = value
	}

	return selector
}

// FormatLabelSelector convert labelSelector into plain string
func FormatLabelSelector(labelSelector *LabelSelector) string {
	selector, err := LabelSelectorAsSelector(labelSelector)
	if err != nil {
		return "<error>"
	}

	l := selector.String()
	if len(l) == 0 {
		l = "<none>"
	}
	return l
}

func ExtractGroupVersions(l *APIGroupList) []string {
	var groupVersions []string
	for _, g := range l.Groups {
		for _, gv := range g.Versions {
			groupVersions = append(groupVersions, gv.GroupVersion)
		}
	}
	return groupVersions
}

// HasAnnotation returns a bool if passed in annotation exists
func HasAnnotation(obj ObjectMeta, ann string) bool {
	_, found := obj.Annotations[ann]
	return found
}

// SetMetaDataAnnotation sets the annotation and value
func SetMetaDataAnnotation(obj *ObjectMeta, ann string, value string) {
	if obj.Annotations == nil {
		obj.Annotations = make(map[string]string)
	}
	obj.Annotations[ann] = value
}

// SingleObject returns a ListOptions for watching a single object.
func SingleObject(meta ObjectMeta) ListOptions {
	return ListOptions{
		FieldSelector:   fields.OneTermEqualSelector("metadata.name", meta.Name).String(),
		ResourceVersion: meta.ResourceVersion,
	}
}

// NewDeleteOptions returns a DeleteOptions indicating the resource should
// be deleted within the specified grace period. Use zero to indicate
// immediate deletion. If you would prefer to use the default grace period,
// use &metav1.DeleteOptions{} directly.
func NewDeleteOptions(grace int64) *DeleteOptions {
	return &DeleteOptions{GracePeriodSeconds: &grace}
}

// NewPreconditionDeleteOptions returns a DeleteOptions with a UID precondition set.
func NewPreconditionDeleteOptions(uid string) *DeleteOptions {
	u := types.UID(uid)
	p := Preconditions{UID: &u}
	return &DeleteOptions{Preconditions: &p}
}

// NewUIDPreconditions returns a Preconditions with UID set.
func NewUIDPreconditions(uid string) *Preconditions {
	u := types.UID(uid)
	return &Preconditions{UID: &u}
}

// NewRVDeletionPrecondition returns a DeleteOptions with a ResourceVersion precondition set.
func NewRVDeletionPrecondition(rv string) *DeleteOptions {
	p := Preconditions{ResourceVersion: &rv}
	return &DeleteOptions{Preconditions: &p}
}

// HasObjectMetaSystemFieldValues returns true if fields that are managed by the system on ObjectMeta have values.
func HasObjectMetaSystemFieldValues(meta Object) bool {
	return !meta.GetCreationTimestamp().Time.IsZero() ||
		len(meta.GetUID()) != 0
}

// ResetObjectMetaForStatus forces the meta fields for a status update to match the meta fields
// for a pre-existing object. This is opt-in for new objects with Status subresource.
func ResetObjectMetaForStatus(meta, existingMeta Object) {
	meta.SetDeletionTimestamp(existingMeta.GetDeletionTimestamp())
	meta.SetGeneration(existingMeta.GetGeneration())
	meta.SetSelfLink(existingMeta.GetSelfLink())
	meta.SetLabels(existingMeta.GetLabels())
	meta.SetAnnotations(existingMeta.GetAnnotations())
	meta.SetFinalizers(existingMeta.GetFinalizers())
	meta.SetOwnerReferences(existingMeta.GetOwnerReferences())
	meta.SetManagedFields(existingMeta.GetManagedFields())
}

// MarshalJSON implements json.Marshaler
// MarshalJSON may get called on pointers or values, so implement MarshalJSON on value.
// http://stackoverflow.com/questions/21390979/custom-marshaljson-never-gets-called-in-go
func (f FieldsV1) MarshalJSON() ([]byte, error) {
	if f.Raw == nil {
		return []byte("null"), nil
	}
	return f.Raw, nil
}

// UnmarshalJSON implements json.Unmarshaler
func (f *FieldsV1) UnmarshalJSON(b []byte) error {
	if f == nil {
		return errors.New("metav1.Fields: UnmarshalJSON on nil pointer")
	}
	if !bytes.Equal(b, []byte("null")) {
		f.Raw = append(f.Raw[0:0], b...)
	}
	return nil
}

var _ json.Marshaler = FieldsV1{}
var _ json.Unmarshaler = &FieldsV1{}


text:
class Salticid::Group
  # A collection of hosts and other groups.

  attr_reader :name
  attr_accessor :parent
  attr_accessor :groups, :hosts

  def initialize(name, opts = {})
    @name = name.to_s
    @salticid = opts[:salticid]
    @parent = opts[:parent]
    @hosts = []
    @groups = []
  end

  def ==(other)
    self.class == other.class and
      self.name == other.name and
      self.parent == other.parent
  end

  # Runs the block in the context of each.
  def each_host(&block)
    hosts.each do |host|
      host.instance_exec &block
    end
  end

  # Finds all hosts (recursively) that are members of this group or subgroups.
  def hosts
    @hosts + @groups.map { |m|
      m.hosts
    }.flatten.uniq
  end

  # Creates a sub-group of this group.
  def group(name, &block)
    # Get group
    name = name.to_s
    group = @groups.find{|g| g.name == name}
    group ||= Salticid::Group.new(name, :salticid => @salticid, :parent => self)

    # Store
    @groups |= [group]

    # Run block
    if block
      group.instance_exec &block
    end

    group
  end

  # Adds a host (by name) to the group. Returns the host.
  def host(name)
    host = @salticid.host name
    host.groups |= [self]
    @hosts |= [host]
  end

  def inspect
    "#<Salticid::Group #{path}>"
  end

  # Unknown methods are resolved as groups, then hosts. Blocks are instance_exec'd in the found context.
  def method_missing(meth, &block)
    name = meth.to_s
    found = @groups.find { |g| g.name == name }
    found ||= @hosts.find { |h| h.name == name }

    unless found
      raise NoMethodError
    end

    if block
      found.instance_exec &block
    end

    found
  end

  def path
    if @parent
      @parent.path + '/' + @name
    else
      '/' + @name
    end
  end

  def to_s
    @name
  end

  def to_string
    h = "Group #{@name}:\n"
    h << "  Hosts:\n"
    h << hosts.map { |h| "    #{h}" }.join("\n")
  end
end

redpajama_set_name: RedPajamaGithub


text:
module.exports = Point;

var util = require('util');

var Geometry = require('./geometry');
var Types = require('./types');
var BinaryWriter = require('./binarywriter');
var ZigZag = require('./zigzag.js');

function Point(x, y, z, m) {
    Geometry.call(this);

    this.x = x;
    this.y = y;
    this.z = z;
    this.m = m;

    this.hasZ = typeof this.z !== 'undefined';
    this.hasM = typeof this.m !== 'undefined';
}

util.inherits(Point, Geometry);

Point.Z = function (x, y, z) {
    var point = new Point(x, y, z);
    point.hasZ = true;
    return point;
};

Point.M = function (x, y, m) {
    var point = new Point(x, y, undefined, m);
    point.hasM = true;
    return point;
};

Point.ZM = function (x, y, z, m) {
    var point = new Point(x, y, z, m);
    point.hasZ = true;
    point.hasM = true;
    return point;
};

Point._parseWkt = function (value, options) {
    var point = new Point();
    point.srid = options.srid;
    point.hasZ = options.hasZ;
    point.hasM = options.hasM;

    if (value.isMatch(['EMPTY']))
        return point;

    value.expectGroupStart();

    var coordinate = value.matchCoordinate(options);

    point.x = coordinate.x;
    point.y = coordinate.y;
    point.z = coordinate.z;
    point.m = coordinate.m;

    value.expectGroupEnd();

    return point;
};

Point._parseWkb = function (value, options) {
    var point = Point._readWkbPoint(value, options);
    point.srid = options.srid;
    return point;
};

Point._readWkbPoint = function (value, options) {
    return new Point(value.readDouble(), value.readDouble(),
        options.hasZ ? value.readDouble() : undefined,
        options.hasM ? value.readDouble() : undefined);
};

Point._parseTwkb = function (value, options) {
    var point = new Point();
    point.hasZ = options.hasZ;
    point.hasM = options.hasM;

    if (options.isEmpty)
        return point;

    point.x = ZigZag.decode(value.readVarInt()) / options.precisionFactor;
    point.y = ZigZag.decode(value.readVarInt()) / options.precisionFactor;
    point.z = options.hasZ ? ZigZag.decode(value.readVarInt()) / options.zPrecisionFactor : undefined;
    point.m = options.hasM ? ZigZag.decode(value.readVarInt()) / options.mPrecisionFactor : undefined;

    return point;
};

Point._readTwkbPoint = function (value, options, previousPoint) {
    previousPoint.x += ZigZag.decode(value.readVarInt()) / options.precisionFactor;
    previousPoint.y += ZigZag.decode(value.readVarInt()) / options.precisionFactor;

    if (options.hasZ)
        previousPoint.z += ZigZag.decode(value.readVarInt()) / options.zPrecisionFactor;
    if (options.hasM)
        previousPoint.m += ZigZag.decode(value.readVarInt()) / options.mPrecisionFactor;

    return new Point(previousPoint.x, previousPoint.y, previousPoint.z, previousPoint.m);
};

Point._parseGeoJSON = function (value) {
    return Point._readGeoJSONPoint(value.coordinates);
};

Point._readGeoJSONPoint = function (coordinates) {
    if (coordinates.length === 0)
        return new Point();

    if (coordinates.length > 2)
        return new Point(coordinates[0], coordinates[1], coordinates[2]);

    return new Point(coordinates[0], coordinates[1]);
};

Point.prototype.toWkt = function () {
    if (typeof this.x === 'undefined' && typeof this.y === 'undefined' &&
        typeof this.z === 'undefined' && typeof this.m === 'undefined')
        return this._getWktType(Types.wkt.Point, true);

    return this._getWktType(Types.wkt.Point, false) + '(' + this._getWktCoordinate(this) + ')';
};

Point.prototype.toWkb = function (parentOptions) {
    var wkb = new BinaryWriter(this._getWkbSize());

    wkb.writeInt8(1);

    if (typeof this.x === 'undefined' && typeof this.y === 'undefined') {
        this._writeWkbType(wkb, Types.wkb.MultiPoint, parentOptions);
        wkb.writeUInt32LE(0);
    }
    else {
        this._writeWkbType(wkb, Types.wkb.Point, parentOptions);
        this._writeWkbPoint(wkb);
    }

    return wkb.buffer;
};

Point.prototype._writeWkbPoint = function (wkb) {
    wkb.writeDoubleLE(this.x);
    wkb.writeDoubleLE(this.y);

    if (this.hasZ)
        wkb.writeDoubleLE(this.z);
    if (this.hasM)
        wkb.writeDoubleLE(this.m);
};

Point.prototype.toTwkb = function () {
    var twkb = new BinaryWriter(0, true);

    var precision = Geometry.getTwkbPrecision(5, 0, 0);
    var isEmpty = typeof this.x === 'undefined' && typeof this.y === 'undefined';

    this._writeTwkbHeader(twkb, Types.wkb.Point, precision, isEmpty);

    if (!isEmpty)
        this._writeTwkbPoint(twkb, precision, new Point(0, 0, 0, 0));

    return twkb.buffer;
};

Point.prototype._writeTwkbPoint = function (twkb, precision, previousPoint) {
    var x = this.x * precision.xyFactor;
    var y = this.y * precision.xyFactor;
    var z = this.z * precision.zFactor;
    var m = this.m * precision.mFactor;

    twkb.writeVarInt(ZigZag.encode(x - previousPoint.x));
    twkb.writeVarInt(ZigZag.encode(y - previousPoint.y));
    if (this.hasZ)
        twkb.writeVarInt(ZigZag.encode(z - previousPoint.z));
    if (this.hasM)
        twkb.writeVarInt(ZigZag.encode(m - previousPoint.m));

    previousPoint.x = x;
    previousPoint.y = y;
    previousPoint.z = z;
    previousPoint.m = m;
};

Point.prototype._getWkbSize = function () {
    if (typeof this.x === 'undefined' && typeof this.y === 'undefined')
        return 1 + 4 + 4;

    var size = 1 + 4 + 8 + 8;

    if (this.hasZ)
        size += 8;
    if (this.hasM)
        size += 8;

    return size;
};

Point.prototype.toGeoJSON = function (options) {
    var geoJSON = Geometry.prototype.toGeoJSON.call(this, options);
    geoJSON.type = Types.geoJSON.Point;

    if (typeof this.x === 'undefined' && typeof this.y === 'undefined')
        geoJSON.coordinates = [];
    else if (typeof this.z !== 'undefined')
        geoJSON.coordinates = [this.x, this.y, this.z];
    else
        geoJSON.coordinates = [this.x, this.y];

    return geoJSON;
};


text:
package io.pravega.controller.server.health;

import io.pravega.common.cluster.Cluster;
import io.pravega.common.cluster.Host;
import io.pravega.controller.fault.ControllerClusterListener;
import io.pravega.controller.fault.FailoverSweeper;
import io.pravega.controller.server.ControllerServiceConfig;
import io.pravega.controller.server.impl.ControllerServiceConfigImpl;
import io.pravega.controller.task.Stream.TxnSweeper;
import io.pravega.controller.task.TaskSweeper;
import io.pravega.shared.health.Health;
import io.pravega.shared.health.Status;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.ScheduledExecutorService;

import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;

/**
 * Unit tests for ClusterListenerHealthContributor
 */
public class ClusterListenerHealthContributorTest {
    private ControllerClusterListener  clusterListener;
    private ClusterListenerHealthContributor contributor;
    private Health.HealthBuilder builder;

    @Before
    public void setup() {
        Host host = mock(Host.class);
        Cluster cluster = mock(Cluster.class);
        ScheduledExecutorService executor = mock(ScheduledExecutorService.class);
        ControllerServiceConfig serviceConfig = mock(ControllerServiceConfigImpl.class);
        TaskSweeper taskSweeper = mock(TaskSweeper.class);
        TxnSweeper txnSweeper = mock(TxnSweeper.class);
        List<FailoverSweeper> failoverSweepers = new ArrayList<>();
        failoverSweepers.add(taskSweeper);
        failoverSweepers.add(txnSweeper);

        doReturn(true).when(serviceConfig).isControllerClusterListenerEnabled();
        clusterListener = spy(new ControllerClusterListener(host, cluster, executor, failoverSweepers));
        doReturn(true).when(clusterListener).isReady();
        contributor = new ClusterListenerHealthContributor("clusterlistener", clusterListener);
        builder = Health.builder().name("clusterlistener");
    }

    @After
    public void tearDown() {
        contributor.close();
    }

    @Test
    public void testHealthCheck() throws Exception {
        clusterListener.startAsync();
        clusterListener.awaitRunning();
        Status status = contributor.doHealthCheck(builder);
        Assert.assertEquals(Status.UP, status);
        clusterListener.stopAsync();
        clusterListener.awaitTerminated();
        status = contributor.doHealthCheck(builder);
        Assert.assertEquals(Status.DOWN, status);
    }
}


text:
#include "ABI42_0_0EventQueue.h"

#include "ABI42_0_0EventEmitter.h"

namespace ABI42_0_0facebook {
namespace ABI42_0_0React {

EventQueue::EventQueue(
    EventPipe eventPipe,
    StatePipe statePipe,
    std::unique_ptr<EventBeat> eventBeat)
    : eventPipe_(std::move(eventPipe)),
      statePipe_(std::move(statePipe)),
      eventBeat_(std::move(eventBeat)) {
  eventBeat_->setBeatCallback(
      std::bind(&EventQueue::onBeat, this, std::placeholders::_1));
}

void EventQueue::enqueueEvent(const RawEvent &rawEvent) const {
  {
    std::lock_guard<std::mutex> lock(queueMutex_);
    eventQueue_.push_back(rawEvent);
  }

  onEnqueue();
}

void EventQueue::enqueueStateUpdate(const StateUpdate &stateUpdate) const {
  {
    std::lock_guard<std::mutex> lock(queueMutex_);
    stateUpdateQueue_.push_back(stateUpdate);
  }

  onEnqueue();
}

void EventQueue::onEnqueue() const {
  // Default implementation does nothing.
}

void EventQueue::onBeat(jsi::Runtime &runtime) const {
  flushEvents(runtime);
  flushStateUpdates();
}

void EventQueue::flushEvents(jsi::Runtime &runtime) const {
  std::vector<RawEvent> queue;

  {
    std::lock_guard<std::mutex> lock(queueMutex_);

    if (eventQueue_.size() == 0) {
      return;
    }

    queue = std::move(eventQueue_);
    eventQueue_.clear();
  }

  {
    std::lock_guard<std::mutex> lock(EventEmitter::DispatchMutex());

    for (const auto &event : queue) {
      if (event.eventTarget) {
        event.eventTarget->retain(runtime);
      }
    }
  }

  for (const auto &event : queue) {
    eventPipe_(
        runtime, event.eventTarget.get(), event.type, event.payloadFactory);
  }

  // No need to lock `EventEmitter::DispatchMutex()` here.
  // The mutex protects from a situation when the `instanceHandle` can be
  // deallocated during accessing, but that's impossible at this point because
  // we have a strong pointer to it.
  for (const auto &event : queue) {
    if (event.eventTarget) {
      event.eventTarget->release(runtime);
    }
  }
}

void EventQueue::flushStateUpdates() const {
  std::vector<StateUpdate> stateUpdateQueue;

  {
    std::lock_guard<std::mutex> lock(queueMutex_);

    if (stateUpdateQueue_.size() == 0) {
      return;
    }

    stateUpdateQueue = std::move(stateUpdateQueue_);
    stateUpdateQueue_.clear();
  }

  for (const auto &stateUpdate : stateUpdateQueue) {
    statePipe_(stateUpdate);
  }
}

} // namespace ABI42_0_0React
} // namespace ABI42_0_0facebook


text:
# JavaScript

## Editor
- Use 2 spaces indentation (no tabs)
- Use utf-8 charset
- Use LF (`\n`) for end of lines (see [`Wikipedia`](http://en.wikipedia.org/wiki/Newline))

This config is available in a [`.editorconfig`](.editorconfig)

## Linters
We use [`jshint`](http://jshint.com/) and [`eslint`](http://eslint.org/).

Make sur your code pass the both with [`.jshintrc`](.jshintrc) and [`.eslintrc`](.eslintrc).
There is many plugins to run those linter while saving on your favorite editor.

## Line length
Line length must be 80 characters or less.

## Strict mode
Always declare `'use strict';` at the top of your files.

If the file may be required by external code, bind it into a closure for example :
```javascript
// bad
'use strict';
…

// good
/*eslint-disable strict */
(function() {
  'use strict';
  …
})();
```

## Naming conventions
- Use English only.
- Use camelCase for objects, functions, instances.
  ```javascript
  // bad
  var MYUSER = {}
    , user_uuid = ''
  ;

  // good
  var myUser = {}
    , userUuid = ''
  ;
  ```
- Use PascalCase for constructors or classes
  ```javascript
  // bad
  var user = new userObject();

  // god
  var user = new UserObject();
  ```

## Literal syntax
```javascript
// bad
var item = new Object();

// good
var item = {};

// bad
var items = new Array();

// good
var items = [];
```

## Strings
Use single quotes `''` for strings.
```javascript
// bad
var name = "Bob";

// good
var name = 'Bob';
```

## Leading commas
```javascript
// bad
var user = {
  firstName: 'Robert',
  lastName: 'MARTIN',
  role: 'admin',
  createdAt: '2015-04-14'
}

// good
var user = {
  firstName: 'Robert'
  , lastName: 'MARTIN'
  , role: 'admin'
  , createdAt: '2015-04-14'
}
```

# License
OpenDena coding-style is under the MIT license. Please see
[`LICENSE`](LICENSE)


text:
package org.spoofax.jsglr2.parser.result;

import java.util.Collection;

import org.spoofax.jsglr.client.imploder.ITokens;
import org.spoofax.jsglr2.messages.Message;
import org.spoofax.jsglr2.parseforest.IParseForest;
import org.spoofax.jsglr2.parser.AbstractParseState;

public abstract class ParseResult<ParseForest extends IParseForest> {

    public final AbstractParseState<?, ?> parseState;
    public Collection<Message> messages;

    ParseResult(AbstractParseState<?, ?> parseState, Collection<Message> messages) {
        this.parseState = parseState;
        this.messages = messages;
    }

    public abstract boolean isSuccess();

    public void postProcessMessages(ITokens tokens) {
        messages = parseState.postProcessMessages(messages, tokens);
    }

}


text:
import {Config} from './config';
import {inject} from 'aurelia-framework';

@inject(Config)
export class SortValueConverter {

  constructor(config) {
    this.config = config;
  }

  /**
   * @param {*[]} array - an array that is to be sorted
   * @param {object} options - which alters the behavior of sort
   * @param {boolean} [options.ignoreCase=true] - to sort case insensitively
   * @param {string} [options.property] - name of the property to sort
   * @param {string} [options.method='alphanumeric'] - the method to sort with
   *
   * @returns {*[]} which is sorted according to the options provided
   */
  toView(array, options = {}) {
    let value;

    options = Object.assign(this.config.defaults, options);

    value = options.valueFn ? options.valueFn(options) : this.valueFn(options);

    return array.sort((a, b) => this.config.methods[options.method](value(a), value(b)));
  }

  valueFn(options) {
    let value;

    if (options.value) {
      return options.value;
    }

    if (options.property) {
      value = obj => obj[options.property];
    } else {
      value = v => v;
    }

    if (options.ignoreCase === true) {
      let oldValue = value;

      value = v => {
        let d = oldValue(v);

        return d.toLowerCase ? d.toLowerCase() : d;
      };
    }

    return value;
  }

}


text:
ACCEPTED

#### According to
International Plant Names Index

#### Published in
null

#### Original name
Arenaria monosperma F.N.Williams

### Remarks
null


text:
import re

import pytest

from paasta_tools.cli.cli import main

def test_paasta_version(capfd):
    with pytest.raises(SystemExit) as excinfo:
        main(('-V',))
    assert excinfo.value.code == 0
    out, err = capfd.readouterr()
    assert re.match('^paasta-tools \d+\.\d+\.\d+\n$', out)


text:
/*

Posts parameters

*/

import { Injected } from 'meteor/meteorhacks:inject-initial';
import moment from 'moment';
import { addCallback } from 'meteor/vulcan:core';

// Add 'after' and 'before' properties to terms which can be used to limit posts in time.
function addTimeParameter (parameters, terms, apolloClient) {

  // console.log('// addTimeParameter')

  if (typeof parameters.selector.postedAt === 'undefined') {

    let postedAt = {}, mAfter, mBefore, startOfDay, endOfDay, clientTimezoneOffset, serverTimezoneOffset, timeDifference;

    /*

    If we're on the client, add the time difference between client and server

    Example: client is on Japanese time (+9 hours),
    server on UCT (Greenwich) time (+0 hours), for a total difference of +9 hours.

    So the time '00:00, UCT' is equivalent to '09:00, JST'.

    So if we want to express the timestamp '00:00, UCT' on the client,
    we *add* 9 hours to '00:00, JST' on the client to get '09:00, JST' and
    sync up both times.

    */

    if (Meteor.isClient) {
      clientTimezoneOffset = -1 * new Date().getTimezoneOffset();
      serverTimezoneOffset = -1 * Injected.obj('serverTimezoneOffset').offset;
      timeDifference = clientTimezoneOffset - serverTimezoneOffset;

      // console.log('client time:'+clientTimezoneOffset);
      // console.log('server time:'+serverTimezoneOffset);
      // console.log('difference: '+timeDifference);
    }

    if (terms.after) {

      // console.log('// after: '+terms.after);

      mAfter = moment(terms.after, 'YYYY-MM-DD');
      startOfDay = mAfter.startOf('day');

        // console.log('// normal      ', mAfter.toDate(), mAfter.valueOf());
        // console.log('// startOfDay  ', startOfDay.toDate(), startOfDay.valueOf());

      if (Meteor.isClient) {
        startOfDay.add(timeDifference, 'minutes');
        // console.log('// after add   ', startOfDay.toDate(), startOfDay.valueOf());
        // note: on the client, dates are stored as strings,
        // so use strings for MongoDB filtering options too
        postedAt.$gte = startOfDay.toISOString();
      } else {
        postedAt.$gte = startOfDay.toDate();
      }

    }

    if (terms.before) {

      mBefore = moment(terms.before, 'YYYY-MM-DD');
      endOfDay = mBefore.endOf('day');

      if (Meteor.isClient) {
        endOfDay.add(timeDifference, 'minutes');
        postedAt.$lt = endOfDay.toISOString();
      } else {
        postedAt.$lt = endOfDay.toDate();
      }

    }

    if (!_.isEmpty(postedAt)) {
      parameters.selector.postedAt = postedAt;
    }

  }

  return parameters;
}
addCallback('posts.parameters', addTimeParameter);


text:
extern int futex_atomic_op_inuser(int encoded_op, int __user *uaddr);

#endif
#endif


text:
package com.github.gregwhitaker.catnap.core.query.processor;

import com.github.gregwhitaker.catnap.core.query.model.Query;
import com.github.gregwhitaker.catnap.core.util.ClassUtil;

import java.beans.PropertyDescriptor;
import java.util.ArrayList;
import java.util.List;

public class NullQueryProcessor extends SortableQueryProcessor {

    @Override
    public boolean supports(Class<? extends Query<?>> query) {
        return (query == null);
    }

    @Override
    public <T> List<Property<T>> processInternal(Query query, T instance, Class<T> instanceClazz) {
        List<Property<T>> properties = new ArrayList<Property<T>>();

        //No query specified so we need to return all fields
        for (PropertyDescriptor descriptor : ClassUtil.getReadableProperties(instanceClazz)) {
            if (!ignoreProperty(descriptor)) {
                properties.add(new CatnapProperty<T>(instance, descriptor));
            }
        }

        return properties;
    }
}


text:
namespace SimpleInjector.PartialTrustConsole
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Reflection;
    using Microsoft.VisualStudio.TestTools.UnitTesting;

    /// The TestRunner.
    public class TestRunner : MarshalByRefObject
    {
        /// Runs all tests in the supplied assembly.
        /// <param name="testAssemblyName">The name of the assembly that contains the tests to run.</param>
        public void Run(string testAssemblyName, bool verboseOutput)
        {
            var testClasses =
                from type in Assembly.Load(AssemblyName.GetAssemblyName(testAssemblyName)).GetExportedTypes()
                where type.GetCustomAttribute(typeof(TestClassAttribute)) != null
                select type;

            int tests = 0;
            var failedTests = new List<MethodInfo>();

            foreach (var testClass in testClasses)
            {
                if (verboseOutput)
                {
                    Console.WriteLine(testClass.FullName + ":");
                }

                var results = this.RunTestMethods(testClass, verboseOutput);
                tests += results.Item1;
                failedTests.AddRange(results.Item2);
            }

            Console.WriteLine();

            var old = Console.ForegroundColor;

            if (failedTests.Any())
            {
                Console.ForegroundColor = ConsoleColor.Red;

                Console.WriteLine(@"
                    ******    ****    ****  **
                    **      **    **   **   **
                    ***     ********   **   **
                    **      **    **   **   **
                    **      **    **  ****  ******
                ");
            }
            else if (tests > 0)
            {
                Console.ForegroundColor = ConsoleColor.Green;

                Console.WriteLine(@"
                      ****    **  **
                    **    **  ** **
                    **    **  ****
                    **    **  ** **
                      ****    **  **
                ");
            }
            else
            {
                Console.ForegroundColor = ConsoleColor.Red;

                Console.WriteLine("No tests executed!!!");
            }

            Console.ForegroundColor = old;

            Console.WriteLine();

            Console.WriteLine("Tests {0}. Failed {1}. Succeeded {2}.", tests, failedTests.Count, tests - failedTests.Count);

            if (failedTests.Any())
            {
                PrintFailedTests(failedTests);
            }
        }

        private static void PrintFailedTests(List<MethodInfo> failedTests)
        {
            Console.WriteLine();
            Console.WriteLine();
            Console.WriteLine("List of failed tests:");

            var old = Console.ForegroundColor;

            try
            {
                Console.ForegroundColor = ConsoleColor.Red;

                foreach (var failedTest in failedTests)
                {
                    Console.WriteLine("{0}.{1}", failedTest.DeclaringType.Name, failedTest.Name);
                }
            }
            finally
            {
                Console.ForegroundColor = old;
            }
        }

        private Tuple<int, List<MethodInfo>> RunTestMethods(Type testClass, bool verboseOutput)
        {
            var testMethods =
                from method in testClass.GetMethods()
                where method.GetCustomAttribute(typeof(TestMethodAttribute)) != null
                select method;

            var failedTests = new List<MethodInfo>();

            foreach (var testMethod in testMethods)
            {
                if (verboseOutput)
                {
                    Console.WriteLine("  * " + testMethod.Name);
                }

                if (!this.RunTestMethod(testMethod))
                {
                    failedTests.Add(testMethod);
                }
            }

            return Tuple.Create(testMethods.Count(), failedTests);
        }

        private bool RunTestMethod(MethodInfo testMethod)
        {
            try
            {
                var testClass = Activator.CreateInstance(testMethod.DeclaringType);

                testMethod.Invoke(testClass, new object[0]);

                return true;
            }
            catch (Exception ex)
            {
                Console.WriteLine(testMethod.DeclaringType.FullName + "." + testMethod.Name + " failed: ");
                Console.WriteLine(ex.Message);
                Console.WriteLine(ex);
                Console.WriteLine();

                return false;
            }
        }
    }
}


text:
package org.elasticsearch.rest;

import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.common.settings.Settings;
import org.elasticsearch.node.Node;
import org.elasticsearch.test.ESIntegTestCase;
import org.elasticsearch.test.rest.client.http.HttpResponse;
import org.junit.Test;

import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ALLOW_ORIGIN;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ALLOW_CREDENTIALS;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ALLOW_METHODS;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_CORS_ENABLED;
import static org.elasticsearch.http.netty.NettyHttpServerTransport.SETTING_HTTP_COMPRESSION;
import static org.elasticsearch.test.ESIntegTestCase.ClusterScope;
import static org.elasticsearch.test.ESIntegTestCase.Scope;
import static org.hamcrest.Matchers.*;
import static org.hamcrest.Matchers.is;

/**
 * Test CORS where the allow origin value is a regular expression.
 */
@ClusterScope(scope = Scope.SUITE, numDataNodes = 1)
public class CorsRegexIT extends ESIntegTestCase {

    protected static final ESLogger logger = Loggers.getLogger(CorsRegexIT.class);

    @Override
    protected Settings nodeSettings(int nodeOrdinal) {
        return Settings.settingsBuilder()
                .put(super.nodeSettings(nodeOrdinal))
                .put(SETTING_CORS_ALLOW_ORIGIN, "/https?:\\/\\/localhost(:[0-9]+)?/")
                .put(SETTING_CORS_ALLOW_CREDENTIALS, true)
                .put(SETTING_CORS_ALLOW_METHODS, "get, options, post")
                .put(SETTING_CORS_ENABLED, true)
                .put(Node.HTTP_ENABLED, true)
                .put(SETTING_HTTP_COMPRESSION, randomBoolean())
                .build();
    }

    @Test
    public void testThatRegularExpressionWorksOnMatch() throws Exception {
        String corsValue = "http://localhost:9200";
        HttpResponse response = httpClient().method("GET").path("/").addHeader("User-Agent", "Mozilla Bar").addHeader("Origin", corsValue).execute();
        assertResponseWithOriginheader(response, corsValue);

        corsValue = "https://localhost:9200";
        response = httpClient().method("GET").path("/").addHeader("User-Agent", "Mozilla Bar").addHeader("Origin", corsValue).execute();
        assertResponseWithOriginheader(response, corsValue);
        assertThat(response.getHeaders(), hasKey("Access-Control-Allow-Credentials"));
        assertThat(response.getHeaders().get("Access-Control-Allow-Credentials"), is("true"));
    }

    @Test
    public void testThatRegularExpressionReturnsForbiddenOnNonMatch() throws Exception {
        HttpResponse response = httpClient().method("GET").path("/").addHeader("User-Agent", "Mozilla Bar").addHeader("Origin", "http://evil-host:9200").execute();
        // a rejected origin gets a FORBIDDEN - 403
        assertThat(response.getStatusCode(), is(403));
        assertThat(response.getHeaders(), not(hasKey("Access-Control-Allow-Origin")));
    }

    @Test
    public void testThatSendingNoOriginHeaderReturnsNoAccessControlHeader() throws Exception {
        HttpResponse response = httpClient().method("GET").path("/").addHeader("User-Agent", "Mozilla Bar").execute();
        assertThat(response.getStatusCode(), is(200));
        assertThat(response.getHeaders(), not(hasKey("Access-Control-Allow-Origin")));
    }

    @Test
    public void testThatRegularExpressionIsNotAppliedWithoutCorrectBrowserOnMatch() throws Exception {
        HttpResponse response = httpClient().method("GET").path("/").execute();
        assertThat(response.getStatusCode(), is(200));
        assertThat(response.getHeaders(), not(hasKey("Access-Control-Allow-Origin")));
    }

    @Test
    public void testThatPreFlightRequestWorksOnMatch() throws Exception {
        String corsValue = "http://localhost:9200";
        HttpResponse response = httpClient().method("OPTIONS")
                                    .path("/")
                                    .addHeader("User-Agent", "Mozilla Bar")
                                    .addHeader("Origin", corsValue)
                                    .addHeader("Access-Control-Request-Method", "GET")
                                    .execute();
        assertResponseWithOriginheader(response, corsValue);
        assertThat(response.getHeaders(), hasKey("Access-Control-Allow-Methods"));
    }

    @Test
    public void testThatPreFlightRequestReturnsNullOnNonMatch() throws Exception {
        HttpResponse response = httpClient().method("OPTIONS")
                                    .path("/")
                                    .addHeader("User-Agent", "Mozilla Bar")
                                    .addHeader("Origin", "http://evil-host:9200")
                                    .addHeader("Access-Control-Request-Method", "GET")
                                    .execute();
        // a rejected origin gets a FORBIDDEN - 403
        assertThat(response.getStatusCode(), is(403));
        assertThat(response.getHeaders(), not(hasKey("Access-Control-Allow-Origin")));
        assertThat(response.getHeaders(), not(hasKey("Access-Control-Allow-Methods")));
    }

    protected static void assertResponseWithOriginheader(HttpResponse response, String expectedCorsHeader) {
        assertThat(response.getStatusCode(), is(200));
        assertThat(response.getHeaders(), hasKey("Access-Control-Allow-Origin"));
        assertThat(response.getHeaders().get("Access-Control-Allow-Origin"), is(expectedCorsHeader));
    }

}


text:
import zstackwoodpecker.test_state as ts_header
import os
TestAction = ts_header.TestAction
def path():

    return dict(initial_formation="template5", checking_point=1, faild_point=100000, path_list=[
		[TestAction.add_image, 'image1', 'root', os.environ.get('isoForVmUrl')],
		[TestAction.create_vm_by_image, 'image1', 'iso', 'vm1', 'cluster=cluster1'],
		[TestAction.create_vm_backup, 'vm1', 'vm1-backup1'],
		[TestAction.create_mini_vm, 'vm2', 'cluster=cluster1', 'flag=thick'],
		[TestAction.create_mini_vm, 'vm3', 'cluster=cluster2'],
		[TestAction.resize_volume, 'vm3', 5*1024*1024],
		[TestAction.poweroff_only, 'cluster=cluster2'],
		[TestAction.create_volume, 'volume1', 'cluster=cluster1', 'flag=scsi'],
		[TestAction.attach_volume, 'vm2', 'volume1'],
		[TestAction.detach_volume, 'volume1'],
		[TestAction.create_volume, 'volume2', 'cluster=cluster2', 'flag=scsi'],
		[TestAction.delete_volume, 'volume2'],
		[TestAction.add_image, 'image2', 'root', 'http://172.20.1.28/mirror/diskimages/centos_vdbench.qcow2'],
		[TestAction.start_vm, 'vm3'],
		[TestAction.create_vm_backup, 'vm3', 'vm3-backup2'],
		[TestAction.stop_vm, 'vm3'],
		[TestAction.use_vm_backup, 'vm3-backup2'],
		[TestAction.delete_image, 'image1'],
		[TestAction.recover_image, 'image1'],
		[TestAction.delete_image, 'image2'],
		[TestAction.expunge_image, 'image2'],
		[TestAction.attach_volume, 'vm1', 'volume1'],
		[TestAction.create_volume_backup, 'volume1', 'volume1-backup3'],
		[TestAction.change_vm_ha, 'vm3'],
		[TestAction.poweroff_only, 'cluster=cluster1'],
		[TestAction.resize_volume, 'vm2', 5*1024*1024],
		[TestAction.detach_volume, 'volume1'],
		[TestAction.recover_volume, 'volume2'],
		[TestAction.attach_volume, 'vm2', 'volume1'],
		[TestAction.start_vm, 'vm2'],
		[TestAction.create_volume_backup, 'volume1', 'volume1-backup4'],
		[TestAction.stop_vm, 'vm2'],
		[TestAction.use_volume_backup, 'volume1-backup4'],
		[TestAction.start_vm, 'vm1'],
		[TestAction.stop_vm, 'vm1'],
		[TestAction.delete_volume, 'volume2'],
		[TestAction.expunge_volume, 'volume2'],
		[TestAction.reboot_vm, 'vm3'],
		[TestAction.create_volume, 'volume3', 'cluster=cluster2', 'flag=scsi'],
		[TestAction.attach_volume, 'vm3', 'volume3'],
		[TestAction.create_volume_backup, 'volume3', 'volume3-backup5'],
		[TestAction.resize_data_volume, 'volume1', 5*1024*1024],
		[TestAction.poweroff_only, 'cluster=cluster2'],
		[TestAction.use_vm_backup, 'vm1-backup1'],
])

'''
The final status:
Running:['vm3']
Stopped:['vm1', 'vm2']
Enadbled:['vm1-backup1', 'vm3-backup2', 'volume1-backup3', 'volume1-backup4', 'volume3-backup5', 'image1']
attached:['volume1', 'volume3']
Detached:[]
Deleted:[]
Expunged:['volume2', 'image2']
Ha:['vm3']
Group:
	vm_backup2:['vm3-backup2']---vm3@
	vm_backup1:['vm1-backup1']---vm1@
'''


text:
<?php
namespace Eduardokum\LaravelBoleto\Boleto\Banco;

use Eduardokum\LaravelBoleto\Boleto\AbstractBoleto;
use Eduardokum\LaravelBoleto\CalculoDV;
use Eduardokum\LaravelBoleto\Contracts\Boleto\Boleto as BoletoContract;
use Eduardokum\LaravelBoleto\Util;

class Itau extends AbstractBoleto implements BoletoContract
{

    /**
     * Local de pagamento
     *
     * @var string
     */
    protected $localPagamento = 'Até o vencimento, preferencialmente no Itaú';

    /**
     * Código do banco
     *
     * @var string
     */
    protected $codigoBanco = self::COD_BANCO_ITAU;
    /**
     * Variáveis adicionais.
     *
     * @var array
     */
    public $variaveis_adicionais = [
        'carteira_nome' => '',
    ];
    /**
     * Define as carteiras disponíveis para este banco
     *
     * @var array
     */
    protected $carteiras = ['112', '115', '188', '109', '121', '180', '110', '111'];
    /**
     * Espécie do documento, coódigo para remessa
     *
     * @var string
     */
    protected $especiesCodigo = [
        'DM' => '01',
        'NP' => '02',
        'NS' => '03',
        'ME' => '04',
        'REC' => '05',
        'CT' => '06',
        'CS' => '07',
        'DS' => '08',
        'LC' => '09',
        'ND' => '13',
        'CDA' => '15',
        'EC' => '16',
        'CPS' => '17',
    ];
    /**
     * Seta dias para baixa automática
     *
     * @param int $baixaAutomatica
     *
     * @return $this
     * @throws \Exception
     */
    public function setDiasBaixaAutomatica($baixaAutomatica)
    {
        if ($this->getDiasProtesto() > 0) {
            throw new \Exception('Você deve usar dias de protesto ou dias de baixa, nunca os 2');
        }
        $baixaAutomatica = (int) $baixaAutomatica;
        $this->diasBaixaAutomatica = $baixaAutomatica > 0 ? $baixaAutomatica : 0;
        return $this;
    }

    /**
     * Gera o Nosso Número.
     *
     * @return string
     * @throws \Exception
     */
    protected function gerarNossoNumero()
    {
        $numero_boleto = Util::numberFormatGeral($this->getNumero(), 8);
        $carteira = Util::numberFormatGeral($this->getCarteira(), 3);
        $agencia = Util::numberFormatGeral($this->getAgencia(), 4);
        $conta = Util::numberFormatGeral($this->getConta(), 5);
        $dv = CalculoDV::itauNossoNumero($agencia, $conta, $carteira, $numero_boleto);
        return $numero_boleto . $dv;
    }
    /**
     * Método que retorna o nosso numero usado no boleto. alguns bancos possuem algumas diferenças.
     *
     * @return string
     */
    public function getNossoNumeroBoleto()
    {
        return $this->getCarteira() . '/' . substr_replace($this->getNossoNumero(), '-', -1, 0);
    }
    /**
     * Método para gerar o código da posição de 20 a 44
     *
     * @return string
     * @throws \Exception
     */
    protected function getCampoLivre()
    {
        if ($this->campoLivre) {
            return $this->campoLivre;
        }

        $campoLivre = Util::numberFormatGeral($this->getCarteira(), 3);
        $campoLivre .= Util::numberFormatGeral($this->getNossoNumero(), 9);
        $campoLivre .= Util::numberFormatGeral($this->getAgencia(), 4);
        $campoLivre .= Util::numberFormatGeral($this->getConta(), 5);
        $campoLivre .= CalculoDV::itauContaCorrente($this->getAgencia(), $this->getConta());
        $campoLivre .= '000';

        return $this->campoLivre = $campoLivre;
    }

    /**
     * Método onde qualquer boleto deve extender para gerar o código da posição de 20 a 44
     *
     * @param $campoLivre
     *
     * @return array
     */
    public static function parseCampoLivre($campoLivre) {
        return [
            'convenio' => null,
            'agenciaDv' => null,
            'codigoCliente' => null,
            'carteira' => substr($campoLivre, 0, 3),
            'nossoNumero' => substr($campoLivre, 3, 8),
            'nossoNumeroDv' => substr($campoLivre, 11, 1),
            'nossoNumeroFull' => substr($campoLivre, 3, 9),
            'agencia' => substr($campoLivre, 12, 4),
            'contaCorrente' => substr($campoLivre, 16, 5),
            'contaCorrenteDv' => substr($campoLivre, 21, 1),
        ];
    }
}


text:
'use strict';
var meow = require('meow');
var prompt = require('prompt');
var jenkinsNotifier = require('./jenkins-notifier');

var cli = meow({
    help: [
        'Basic unstable job notifier (URL, username and password entered via prompt)',
        '	jenkins-notify',
        'Start jenkins-notifier with prefilled values (checks every 5 seconds)',
        '	jenkins-notify http://jenkins.location username',
        'Configure check interval to 10 seconds (set last parameter)',
        '	jenkins-notify http://jenkins.loc username 10'
    ]
});

var urlInput = cli.input[0],
    username = cli.input[1],
    interval = cli.input[2] ? (parseInt(cli.input[2]) * 1000) : 5000;

if (cli.input.length < 2) {
    var schema = {
        properties: {
            url: {
                description: 'Enter Jenkins URL:'
            },
            username: {
                description: 'Enter Jenkins username:'
            },
            password: {
                description: 'Enter Jenkins password:',
                hidden: true
            }
        }
    }
}
else {
    var schema = {
        properties: {
            password: {
                description: 'Enter Jenkins password:',
                hidden: true
            }
        }
    }
}

prompt.message = '';
prompt.delimiter = '';
prompt.start();

prompt.get(schema, function(err, result) {
    if (!result) {
        return void console.log('\nYou have to enter your data.');
    }

    var password = result.password;
    if (cli.input.length < 2) {
        urlInput = result.url;
        username = result.username;
    }

    if (!username || !password || !urlInput) {
        return void console.log('You forgot your username, password or Jenkins URL.');
    }

    jenkinsNotifier(username, password, urlInput, interval);
});


text: - Fixed an issue where the integration failed to parse reserved **Whois** string.


text:
'use strict'

const R = require('ramda')

/**
 * Simplified version of sails/lib/hooks/blueprints/actionUtil
 * see: https://github.com/balderdashy/sails/blob/b4eed1775d01f436b263362180eb3f8447af1b87/lib/hooks/blueprints/actionUtil.js#L302
 */
// function parseController (req) {
//   return || req.options.controller
// }

/**
 * Query the Controller that is being acted upon, and set it on the req object.
 */
module.exports = function ControllerPolicy (req, res, next) {
  let controllerCache = sails.hooks.waterauth._controllerCache
  req.options.controllerIdentity = req.options.controller

  if (R.isEmpty(req.options.controllerIdentity)) {
    return next()
  }

  req.options.controllerDefinition = sails.controllers[req.options.controllerIdentity]
  req.controller = controllerCache[req.options.controllerIdentity]
  req.ctrlProperty = req.options.action

  if (R.is(Object, req.controller) && !R.isNil(req.controller.id)) {
    return next()
  }

  sails.log.warn('Controller [', req.options.controllerIdentity, '] not found in controller cache')

  // if the controller is not found in the cache for some reason, get it from the database
  sails.models.controller.findOne({ identity: req.options.controllerIdentity })
  .then(controller => {
    if (!R.is(Object, controller)) {
      req.options.unknownController = true

      controller = sails.controllers[req.options.controllerIdentity]
    }

    req.controller = controller
    next()
  })
  .catch(next)
}

// module.exports = function ControllerPolicy (req, res, next) {
//   if (req.options) {
//     if (req.options.controller && req.options.action) {
//       req.controller = req.options.controller
//       req.property = req.options.action
//       req.calledAction = `${req.options.controller}.${req.options.action}`
//     }
//   }
//   next()
// }


text:
![tvOS-UI](https://img.shields.io/badge/tvOS-UI%20%2F%20UX-orange.svg)
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)

`tvProgress` is an easy way of displaying the progress of an ongoing task on tvOS.

`tvProgress` is inspired by [SVProgressHUD](https://github.com/SVProgressHUD/SVProgressHUD). This library is specifically designed for tvOS and fully respects Apple design and interface guidelines regarding tvOS. It is written using Swift 3.0.

![tvProgress](http://f.cl.ly/items/1x2r2z2w3e2i2v011M2k/firstloader_1-2.gif)
![tvProgress](http://f.cl.ly/items/2d1R441V2C471S1B0B3i/thirdloader-2.gif)

## Demo

Try `tvProgress` with the demo project available in this repo.

## Installation

### Carthage

[Carthage](https://github.com/Carthage/Carthage) is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with [Homebrew](http://brew.sh/) using the following command:

```bash
$ brew update
$ brew install carthage
```

To integrate `tvProgress` into your Xcode project using Carthage, specify it in your `Cartfile`:

```
github "sweebi/tvProgress"
```

Run `carthage update` to build the framework and drag the built `tvProgress.framework` (in Carthage/Build/tvOS folder) into your Xcode project (Linked Frameworks and Libraries in `Targets`).

### Manually

* Drag the `tvProgress.xcodeproj` file into your project.
* Add the `tvProgress` framework into `Embedded Binaries`.
* Near `Run` button, select `Manage scheme`.
* Select your app scheme.
* Click on `Edit`.
* Select `Build` on the left menu.
* Uncheck `Find Implicit Dependencies`. This will prevent Xcode from compiling library each time you compile your app.

## Usage

(see sample Xcode project in `/Demo`)

`tvProgress` is created as a singleton (i.e. it doesn't need to be explicitly allocated and instantiated; you directly call `tvProgress.method`).

**tvProgress usage will block the user while loading content. Use it when you need to.**

Using tvProgress is very easy. You can use it doing some very simple operations such as :

```swift
tvProgress.show()
//add your code here
tvProgress.dismiss()
```

You can test if `tvProgress` is visble with the following property :
```swift
public var isVisible: Bool { get }
```

### Showing the HUD

You can show the status of indeterminate tasks using this method:

```swift
public static func show(_ status: String? = .none, contentView: UIView? = .none, loaderType lt: tvLoaderType? = .none, style: tvProgressStyle? = .none, withBlurView addBlurView: Bool = true, menuButtonDidPress: (() -> Void)? = .none, playButtonDidPress: (() -> Void)? = .none, andWithMarginTextSize marge: CGFloat = 400, completion: (() -> Void)? = .none) -> Void
```

Each parameter is optional.
You can either :
* simply call `show()` method to display a simple animation
* specify a status to display a text
* specify a contentView to display the loader on a specific UIView
* specify a loader to change the animation using `tvLoaderType` enum
* specify a style using `tvProgressStyle` enum
* specify if you want the background Blur View via the addBlurView parameter
* specify a closure to be executed when the user press the `Menu` button while `tvProgress` is displayed
* specify a closure to be executed when the user press the `Play/Pause` button while `tvProgress` is displayed

### Showing a progress animation

```swift
static public func showProgress(_ progress: Double = 0, status: String? = .none, contentView: UIView? = .none, progressType pt: tvProgressType? = .none, style: tvProgressStyle? = .none, withBlurView addBlurView: Bool = true, menuButtonDidPress: (() -> Void)? = .none, playButtonDidPress: (() -> Void)? = .none, andWithMarginTextSize marge: CGFloat = 400, completion: (() -> Void)? = .none) -> Void
```

Each parameter is optional.
You can either :
* simply call `showProgress()` method to display a simple progress animation
* specify the progress value (must be between 0 and 1)
* specify a status to display a text
* specify a contentView to display the loader on a specific UIView
* specify a loader to change the animation using `tvProgressType` enum
* specify a style using `tvProgressStyle` enum
* specify if you want the background Blur View via the addBlurView parameter
* specify a closure to be executed when the user press the `Menu` button while `tvProgress` is displayed
* specify a closure to be executed when the user press the `Play/Pause` button while `tvProgress` is displayed

### Dismissing the HUD

The HUD can be dismissed using:

```swift
public static func dismiss(delay: Double = 0) -> Void
```

`Delay` parameter is optional.

### Displaying Success or Error

If your loading success or fails, you can display a message that gives information about what happened to the user.

```swift
public static func showSuccessWithStatus(_ status: String? = .none, andSuccessImage successImage: UIImage? = .none, andStyle style: tvProgressStyle? = .none, andAction action: (label: String, closure: ((Void) -> Void))? = .none, menuButtonDidPress: (() -> Void)? = .none, playButtonDidPress: (() -> Void)? = .none, andWithMarginTextSize marge: CGFloat = 400, completion: (() -> Void)? = .none) -> Void
public static func showErrorWithStatus(_ status: String? = .none, andErrorImage errorImage: UIImage? = .none, andStyle style: tvProgressStyle? = .none, andAction action: (label: String, closure: ((Void) -> Void))? = .none, menuButtonDidPress: (() -> Void)? = .none, playButtonDidPress: (() -> Void)? = .none, andWithMarginTextSize marge: CGFloat = 400, completion: (() -> Void)? = .none) -> Void
```

As it was for showing and dismissing `tvProgress`, each parameter is optional so that you can fully customize your success or error displaying.
Following parameters are specific to success / error display :
* You can specify an image to be displayed instead of the default image
* You can specify an `action`. This action is a tuple that contains a label and a closure. If you specify an `action`, the label will be use to generate a button while the closure will be executed when the user presses the button.

If you specify and `action`, `tvProgress` won't dismiss. You have to call the dismiss method in your closure. If you don't specify an `action`, `tvProgress` will automatically dismiss the same way [SVProgressHUD](https://github.com/SVProgressHUD/SVProgressHUD) handles it, that means computing a display time considering the message to be displayed length or 5 seconds if no message is present.

## Customization

We just saw that customization is available in every `tvProgress` method call. You also can globally customize `tvProgress` using the following properties :

```swift
public var loaderType: tvLoaderType!
public var progressType: tvProgressType!
public var style: tvProgressStyle!
public var font: UIFont!
public var successImage: UIImage!
public var errorImage: UIImage!
public var minimumDismissDuration: Double!
public var fadeInAnimationDuration: Double!
public var fadeOutAnimationDuration: Double!
```

Each of these properties has to be called on `tvProgress.sharedInstance`

### tvProgressStyle Enum

`tvProgressStyle` is an enum that allows you to customize the appearance of `tvProgress`

```swift
public enum tvProgressStyle {
    case dark
    case light
    case custom(mainColor: UIColor, secondaryColor: UIColor, blurStyle: UIBlurEffectStyle)
}
```

* dark style displays `tvProgress` on a dark blurStyle background
* light style displays `tvProgress` on a light blurStyle background
* custom allows you to specify mainColor, secondaryColor and a UIBlurEffectStyle

### tvLoaderType Enum

`tvLoaderType` is an enum that allows you to customize the appearance of the loader when `tvProgress` is displayed.

```swift
public enum tvLoaderType {
    case default()
    case androidStyle()
    case custom(cl: tvLoaderAnimatable.Type)
}
```

The enum has 3 different cases :
* `default` case that allows you to display a simple animated circle
* `androidStyle` case that allows you to display a animated circle which start point is moving
* `custom` case is here to allow you to add your own animation. You have to pass a parameter that is a class type confirming to `tvLoaderAnimatable` protocol.

### tvProgressType Enum

`tvProgressType` is an enum that allows you to customize the appearance of the progress animation when `tvProgress` is displayed.

```swift
public enum tvProgressType {
    case flatCircle()
    case custom(cp: tvProgressAnimatable.Type)
}
```

The enum has 2 different cases :
* `flatCircle` case that allows you to display a simple animated circle
* `custom` case is here to allow you to add your own animation. You have to pass a parameter that is a class type confirming to `tvProgressAnimatable` protocol.

### tvLoaderAnimatable Protocol

You can implement your own class to customize the loader appearance. You can refer to the `Demo` app to see how you can implement your own tvLoaderAnimatable class.

```swift
public protocol tvLoaderAnimatable: class {
    init()
    func configureWithStyle(style: tvProgressStyle) -> (view: UIView, completion: () -> Void)
}
```

`configureWithStyle` method is the main method you have to implement. This is where you are going to create a view that is animated. You have to return a tuple that contains the view and a closure. The closure will allow us to remove animations when we dismiss `tvProgress`.

### tvProgressAnimatable Protocol

You can implement your own class to customize the progress animation appearance. You can refer to the `Demo` app to see how you can implement your own tvProgressAnimatable class.

```swift
public protocol tvProgressAnimatable: tvLoaderAnimatable {
    func updateProgress(progress: Double) -> Void
}
```

`updateProgress` method is called when a progress animation is already show with the `tvProgress.showProgress` method. You can update your current progress animation view with the new progress value.

## Contributing to this project

If you have feature requests or bug reports, feel free to help out by sending pull requests or by [creating new issues](https://github.com/sweebi/tvProgress/issues/new).

## License

`tvProgress` is distributed under the terms and conditions of the [MIT license](https://github.com/sweebi/tvProgress/blob/master/LICENSE). The success and error icons are made by [Freepik](http://www.freepik.com) from [Flaticon](http://www.flaticon.com) and are licensed under [Creative Commons BY 3.0](http://creativecommons.org/licenses/by/3.0/).

## Credits

`tvProgress` is brought to you by [Cédric Eugeni](https://github.com/CedricEugeni), [Antoine Cormery](https://github.com/legomanfish) and [contributors to the project](https://github.com/sweebi/tvProgress/graphs/contributors). If you're using `tvProgress` in your project, attribution would be very appreciated.


text:
/*
  Test that we are cycling the servers we are creating during testing.
*/

#include <config.h>

#include <libtest/test.hpp>
#include <libmemcached/memcached.h>

using namespace libtest;

#ifndef __INTEL_COMPILER
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif

static std::string executable;

static test_return_t quiet_test(void *)
{
  const char *args[]= { "-q", 0 };

  test_compare(EXIT_FAILURE, exec_cmdline(executable, args, true));

  return TEST_SUCCESS;
}

static test_return_t help_test(void *)
{
  const char *args[]= { "-h", 0 };

  test_compare(EXIT_SUCCESS, exec_cmdline(executable, args, true));

  return TEST_SUCCESS;
}

static test_return_t ascii_test(void *)
{
  char buffer[1024];
  snprintf(buffer, sizeof(buffer), "%d", int(default_port()));
  const char *args[]= { "-p", buffer, " -a ", 0 };

  test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);

  return TEST_SUCCESS;
}

static test_return_t binary_test(void *)
{
  char buffer[1024];
  snprintf(buffer, sizeof(buffer), "%d", int(default_port()));
  const char *args[]= { "-p", buffer, " -b ", 0 };

  test_true(exec_cmdline(executable, args, true) <= EXIT_FAILURE);

  return TEST_SUCCESS;
}

test_st memcapable_tests[] ={
  {"--quiet", 0, quiet_test},
  {"-h", 0, help_test},
  {"-a, ascii", 0, ascii_test},
  {"-b, binary", 0, binary_test},
  {0, 0, 0}
};

collection_st collection[] ={
  {"memcapable", 0, 0, memcapable_tests },
  {0, 0, 0, 0}
};

static void *world_create(server_startup_st& servers, test_return_t& error)
{
  if (libtest::has_memcached() == false)
  {
    error= TEST_SKIPPED;
    return NULL;
  }

  if (server_startup(servers, "memcached", libtest::default_port(), 0, NULL) == false)
  {
    error= TEST_FAILURE;
  }

  return &servers;
}

void get_world(Framework *world)
{
  executable= "./clients/memcapable";
  world->collections(collection);
  world->create(world_create);
}


text:
$packageName = 'firefox-nightly'
$softwareVersion = '61.0.1.2018040712-alpha' -Replace "^(\d+)\.(\d+)\.(\d+)[^-]+-([a-z]).*",'$1.$2$4$3'
$softwareName = "Nightly $softwareVersion*"
$installerType = 'exe'
$silentArgs = '/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /SP-'
$validExitCodes = @(0)

[array]$key = Get-UninstallRegistryKey -SoftwareName $softwareName

$key | ForEach-Object {
  Uninstall-ChocolateyPackage -PackageName $packageName `
                              -FileType $installerType `
                              -SilentArgs $($silentArgs) `
                              -File $($_.UninstallString.Replace('"','')) `
                              -ValidExitCodes $validExitCodes
}


text:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function

import tensorflow as tf
from tensorforce import util
from tensorforce.core.preprocessors import Preprocessor

class RunningStandardize(Preprocessor):
    """
    Standardize state w.r.t past states.
    Subtract mean and divide by standard deviation of sequence of past states.
    Based on https://www.johndcook.com/blog/standard_deviation/.
    """

    def __init__(
        self,
        shape,
        reset_after_batch=True,
        scope='running_standardize',
        summary_labels=()
    ):
        self.reset_after_batch = reset_after_batch
        # The op that resets our stats variables.
        self.reset_op = None
        super(RunningStandardize, self).__init__(shape=shape, scope=scope, summary_labels=summary_labels)

    def tf_reset(self):
        if self.reset_after_batch:
            return [self.reset_op]

    def tf_process(self, tensor):
        count = tf.get_variable(
            name='count',
            dtype=util.tf_dtype('float'),
            initializer=0.0,
            trainable=False
        )
        mean_estimate = tf.get_variable(
            name='mean-estimate',
            shape=self.shape,
            dtype=util.tf_dtype('float'),
            initializer=tf.zeros_initializer(),
            trainable=False
        )
        variance_sum_estimate = tf.get_variable(
            name='variance-sum-estimate',
            shape=self.shape,
            dtype=util.tf_dtype('float'),
            initializer=tf.zeros_initializer(),
            trainable=False
        )
        self.reset_op = tf.variables_initializer([count, mean_estimate, variance_sum_estimate], name='reset-op')

        assignment = tf.assign_add(ref=count, value=1.0)

        with tf.control_dependencies(control_inputs=(assignment,)):
            # Mean update
            mean = tf.reduce_sum(input_tensor=(tensor - mean_estimate), axis=0)  # reduce_mean?
            assignment = tf.assign_add(ref=mean_estimate, value=(mean / count))

        with tf.control_dependencies(control_inputs=(assignment,)):

            def first_run():
                # No meaningful mean and variance yet.
                return tensor

            def later_run():
                # Variance update
                variance = tf.reduce_sum(input_tensor=((tensor - mean_estimate) * mean), axis=0)  # reduce_mean?
                assignment = tf.assign_add(ref=variance_sum_estimate, value=variance)
                with tf.control_dependencies(control_inputs=(assignment,)):
                    variance_estimate = variance_sum_estimate / (count - 1.0)
                    # Standardize tensor
                    return (tensor - mean_estimate) / tf.maximum(x=tf.sqrt(x=variance_estimate), y=util.epsilon)

            return tf.cond(pred=(count > 1.0), true_fn=later_run, false_fn=first_run)


text:
package org.dbmaintain.database;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import static org.apache.commons.lang.StringUtils.isBlank;

/**
 * @author Tim Ducheyne
 * @author Filip Neven
 */
public class DatabaseInfo {

    private String name;
    private String dialect;
    private String driverClassName;
    private String url;
    private String userName;
    private String password;
    private String defaultSchemaName;
    private Set<String> schemaNames;
    private boolean disabled;
    private boolean defaultDatabase;

    public DatabaseInfo(String name, String dialect, String driverClassName, String url, String userName, String password, List<String> schemaNames, boolean disabled, boolean defaultDatabase) {
        this.name = name;
        this.dialect = dialect;
        this.driverClassName = driverClassName;
        this.url = url;
        this.userName = userName;
        if (password == null) {
            this.password = "";
        } else {
            this.password = password;
        }
        if (!schemaNames.isEmpty()) {
            this.defaultSchemaName = schemaNames.get(0);
        }
        this.schemaNames = new HashSet<String>(schemaNames);
        this.disabled = disabled;
        this.defaultDatabase = defaultDatabase;
    }

    public void validateFull() {
        if (isBlank(driverClassName)) {
            throw new DatabaseException(createValidationErrorMessage("no driver class name defined."));
        }
        if (isBlank(url)) {
            throw new DatabaseException(createValidationErrorMessage("no database url defined."));
        }
        if (isBlank(userName)) {
            throw new DatabaseException(createValidationErrorMessage("no database user name defined."));
        }
        validateMinimal();
    }

    public void validateMinimal() {
        if (schemaNames == null || schemaNames.isEmpty()) {
            throw new DatabaseException(createValidationErrorMessage("no schema name(s) defined."));
        }
    }

    private String createValidationErrorMessage(String reason) {
        if (isBlank(name)) {
            return "Invalid database configuration: " + reason;
        }
        return "Invalid database configuration for database with name " + name + ": " + reason;
    }

    public boolean hasName(String name) {
        if (this.name == null && name == null) {
            return true;
        }
        return this.name != null && this.name.equals(name);
    }

    public String getName() {
        return name;
    }

    public String getDialect() {
        return dialect;
    }

    public String getDriverClassName() {
        return driverClassName;
    }

    public String getUrl() {
        return url;
    }

    public String getUserName() {
        return userName;
    }

    public String getPassword() {
        return password;
    }

    public String getDefaultSchemaName() {
        return defaultSchemaName;
    }

    public Set<String> getSchemaNames() {
        return schemaNames;
    }

    public boolean isDisabled() {
        return disabled;
    }

    public boolean isDefaultDatabase() {
        return defaultDatabase;
    }
}


text:
<?xml version='1.0' encoding='UTF-8' standalone='no'?>
<doxygen xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="compound.xsd" version="1.8.2">
  <compounddef id="d7/d19/struct_lookup_info" kind="struct" prot="public">
    <compoundname>LookupInfo</compoundname>
      <sectiondef kind="public-attrib">
      <memberdef kind="variable" id="d7/d19/struct_lookup_info_1ab45ec9bb9bd250c808f84055cfb1b523" prot="public" static="no" mutable="no">
        <type><ref refid="d1/dcf/class_class_def" kindref="compound">ClassDef</ref> *</type>
        <definition>ClassDef* LookupInfo::classDef</definition>
        <argsstring></argsstring>
        <name>classDef</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="83" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="83" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="d7/d19/struct_lookup_info_1a4d3180e6758e0a88e96f6ec5f80c07ec" prot="public" static="no" mutable="no">
        <type><ref refid="da/d09/class_member_def" kindref="compound">MemberDef</ref> *</type>
        <definition>MemberDef* LookupInfo::typeDef</definition>
        <argsstring></argsstring>
        <name>typeDef</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="84" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="84" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="d7/d19/struct_lookup_info_1ab6109313beafe89f7d42431f8da344fb" prot="public" static="no" mutable="no">
        <type>QCString</type>
        <definition>QCString LookupInfo::templSpec</definition>
        <argsstring></argsstring>
        <name>templSpec</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="85" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="85" bodyend="-1"/>
      </memberdef>
      <memberdef kind="variable" id="d7/d19/struct_lookup_info_1a55af5dfe2282dcc19615ac1e0ace76ff" prot="public" static="no" mutable="no">
        <type>QCString</type>
        <definition>QCString LookupInfo::resolvedType</definition>
        <argsstring></argsstring>
        <name>resolvedType</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="86" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="86" bodyend="-1"/>
      </memberdef>
      </sectiondef>
      <sectiondef kind="public-func">
      <memberdef kind="function" id="d7/d19/struct_lookup_info_1a36ba7b2f4cf22657857f4d4b52643ffe" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type></type>
        <definition>LookupInfo::LookupInfo</definition>
        <argsstring>()</argsstring>
        <name>LookupInfo</name>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="80" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="80" bodyend="80"/>
      </memberdef>
      <memberdef kind="function" id="d7/d19/struct_lookup_info_1ad8c8472ab08313b27106fe293803dca7" prot="public" static="no" const="no" explicit="no" inline="yes" virt="non-virtual">
        <type></type>
        <definition>LookupInfo::LookupInfo</definition>
        <argsstring>(ClassDef *cd, MemberDef *td, QCString ts, QCString rt)</argsstring>
        <name>LookupInfo</name>
        <param>
          <type><ref refid="d1/dcf/class_class_def" kindref="compound">ClassDef</ref> *</type>
          <declname>cd</declname>
        </param>
        <param>
          <type><ref refid="da/d09/class_member_def" kindref="compound">MemberDef</ref> *</type>
          <declname>td</declname>
        </param>
        <param>
          <type>QCString</type>
          <declname>ts</declname>
        </param>
        <param>
          <type>QCString</type>
          <declname>rt</declname>
        </param>
        <briefdescription>
        </briefdescription>
        <detaileddescription>
        </detaileddescription>
        <inbodydescription>
        </inbodydescription>
        <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="82" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="81" bodyend="82"/>
      </memberdef>
      </sectiondef>
    <briefdescription>
    </briefdescription>
    <detaileddescription>
    </detaileddescription>
    <collaborationgraph>
      <node id="3675">
        LookupInfo
        <link refid="d7/d19/struct_lookup_info"/>
        <childnode refid="3676" relation="usage">
          <edgelabel>typeDef</edgelabel>
        </childnode>
        <childnode refid="3679" relation="usage">
          <edgelabel>classDef</edgelabel>
        </childnode>
      </node>
      <node id="3677">
        Definition
        <link refid="d5/dcc/class_definition"/>
        <childnode refid="3678" relation="public-inheritance">
        </childnode>
      </node>
      <node id="3679">
        ClassDef
        <link refid="d1/dcf/class_class_def"/>
        <childnode refid="3677" relation="public-inheritance">
        </childnode>
      </node>
      <node id="3676">
        MemberDef
        <link refid="da/d09/class_member_def"/>
        <childnode refid="3677" relation="public-inheritance">
        </childnode>
      </node>
      <node id="3678">
        DefinitionIntf
        <link refid="d9/d4a/class_definition_intf"/>
      </node>
    </collaborationgraph>
    <location file="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" line="79" bodyfile="C:/Users/Mat/Projects/doxygraph/examples/doxygen-1.8.4/src/doxygen.h" bodystart="78" bodyend="87"/>
    <listofallmembers>
      <member refid="d7/d19/struct_lookup_info_1ab45ec9bb9bd250c808f84055cfb1b523" prot="public" virt="non-virtual"><scope>LookupInfo</scope><name>classDef</name></member>
      <member refid="d7/d19/struct_lookup_info_1a36ba7b2f4cf22657857f4d4b52643ffe" prot="public" virt="non-virtual"><scope>LookupInfo</scope><name>LookupInfo</name></member>
      <member refid="d7/d19/struct_lookup_info_1ad8c8472ab08313b27106fe293803dca7" prot="public" virt="non-virtual"><scope>LookupInfo</scope><name>LookupInfo</name></member>
      <member refid="d7/d19/struct_lookup_info_1a55af5dfe2282dcc19615ac1e0ace76ff" prot="public" virt="non-virtual"><scope>LookupInfo</scope><name>resolvedType</name></member>
      <member refid="d7/d19/struct_lookup_info_1ab6109313beafe89f7d42431f8da344fb" prot="public" virt="non-virtual"><scope>LookupInfo</scope><name>templSpec</name></member>
      <member refid="d7/d19/struct_lookup_info_1a4d3180e6758e0a88e96f6ec5f80c07ec" prot="public" virt="non-virtual"><scope>LookupInfo</scope><name>typeDef</name></member>
    </listofallmembers>
  </compounddef>
</doxygen>


text:
<?php
/**
 * Created by PhpStorm.
 * User: rem
 * Date: 29.12.2014
 * Time: 11:50
 */

namespace app\repositories;

use Yii;
use app\models\Host;
use app\abstracts\Repository;

class HostRepository extends Repository
{
    public function findHost($id)
    {
        $query = Host::find()
                    ->where(['id' => $id]);

        return Yii::$app->dbCache->get($query, Yii::$app->params['maxCacheTime'])->one();
    }
}


text:
Occupation: Firmware Engineer, Refrigeration

Place of Dwelling: Milwaukee, WI


text:
.. image:: https://img.shields.io/travis/django-fluent/fluentcms-googlemaps/master.svg?branch=master
    :target: http://travis-ci.org/django-fluent/fluentcms-googlemaps
.. image:: https://img.shields.io/pypi/v/fluentcms-googlemaps.svg
    :target: https://pypi.python.org/pypi/fluentcms-googlemaps/
.. image:: https://img.shields.io/pypi/l/fluentcms-googlemaps.svg
    :target: https://pypi.python.org/pypi/fluentcms-googlemaps/
.. image:: https://img.shields.io/codecov/c/github/django-fluent/fluentcms-googlemaps/master.svg
    :target: https://codecov.io/github/django-fluent/fluentcms-googlemaps?branch=master

fluentcms-googlemaps
====================

A plugin for django-fluent-contents_ to show a Google Maps widget on a website.

This plugin is a work in progress.
It's already used in production, just know that there are two main area's that need improval:

* Use a better GeoPosition widget (e.g. by using a lightbox/popup)
* Make cluster icons configurable.

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

First install the module, preferably in a virtual environment. It can be installed from PyPI::

    pip install fluentcms-googlemaps

**NOTE:** On Django 1.11, you'll have to install the following package first:

.. code-block:: bash

    pip -e git+https://github.com/philippbosch/django-geoposition.git@django-1.11#egg=django-geoposition

Since django-geoposition_ doesn't have a Django 1.11 compatible release yet.

Backend Configuration
---------------------

First make sure the project is configured for django-fluent-contents_.

Then add the following settings:

.. code-block:: python

    INSTALLED_APPS += (
        'geoposition',
        'fluentcms_googlemaps',
    )

    GOOGLE_MAPS_API_KEY = None  # Might be needed to define this.

Add the following to ``urls.py``:

.. code-block:: python

    urlpatterns = [
        ...

        url(r'^api/googlemaps/', include('fluentcms_googlemaps.urls')),
    ]

The database tables can be created afterwards:

.. code-block:: bash

    ./manage.py migrate

Now, the ``MapPlugin`` can be added to your ``PlaceholderField``
and ``PlaceholderEditorAdmin`` admin screens.

Frontend Configuration
----------------------

Make sure that all plugin media files are exposed by django-fluent-contents_:

.. code-block:: html+django

    {% load fluent_contents_tags %}

    {% render_content_items_media %}

This tag should be placed at the bottom of the page, after all plugins are rendered.
For more configuration options - e.g. integration with django-compressor -
see the `template tag documentation <https://django-fluent-contents.readthedocs.io/en/latest/templatetags.html#frontend-media>`_.

CSS Code
~~~~~~~~

The stylesheet code is purposefully left out, since authors typically like to provide their own styling.

JavaScript Code
~~~~~~~~~~~~~~~

No configuration is required for the JavaScript integration.

By default, the plugin includes all required JavaScript code.

If needed, the includes resources can be changed by using the following settings:

.. code-block:: python

    MAP_MARKERWITHLABEL_JS = "fluentcms_googlemaps/vendor/markerwithlabel.js"
    MAP_MARKERCLUSTERER_JS = "fluentcms_googlemaps/vendor/markerclusterer_compiled.js"
    MAPPLUGIN_JS = "fluentcms_googlemaps/js/mapplugin.js"
    MAPSEARCH_JS = "fluentcms_googlemaps/js/mapsearch.js"

    FLUENTCMS_GOOGLEMAPS_JS = (
        MAP_MARKERWITHLABEL_JS,
        MAP_MARKERCLUSTERER_JS,
        MAPPLUGIN_JS,
    )

    FLUENTCMS_GOOGLEMAPS_CSS = {}

If a value is defined as ``None``, it will be excluded from the frontend media.

HTML code
~~~~~~~~~

If needed, the HTML code can be overwritten by redefining ``fluentcms_googlemaps/maps/default.html``.
Also, you can create additional map styles and define these in ``FLUENTCMS_GOOGLEMAPS_STYLES``.
The default is:

.. code-block:: python

    FLUENTCMS_GOOGLEMAPS_STYLES = (
        ('default', {
            'title': _("Default"),
            'template': "fluentcms_googlemaps/maps/default.html",
        }),
        ('search', {
            'title': _("Search field"),
            'template': "fluentcms_googlemaps/maps/search.html",
            'extra_js': (
                MAPSEARCH_JS,   # = "fluentcms_googlemaps/js/mapsearch.js" unless MAPSEARCH_JS is redefined
            ),
        }),
    )

By default, the following templates are looked up:

* A explicitly defined ``template`` option in the ``FLUENTCMS_GOOGLEMAPS_STYLES``.
* A template named: ``fluentcms_googlemaps/maps/{style}.html``.
* The default; ``fluentcms_googlemaps/maps/default.html``.

Importing data
--------------

Marker data can be imported from CSV files, and receive geocoding too.
The ``import_markers`` command can be called with custom templates to map the CSV file data to marker fields.
For example:

.. code-block:: bash

    manage.py import_markers /stores.csv  --title='{{Name}}' --group=1 --geocode='{{Address}} {{Zipcode}} {{City}} {{County}}' --geocoder=google --description="
{{Address}}
{{Zipcode}} {{City}}
{% if County == 'NL'%}The Netherlands{% else %}{{County}}{% endif %}
"

It's recommended to add ``--dry-run`` first until all fields are properly filled.
The markers are created in a single transaction at the end of all parsing.

Contributing
------------

If you like this module, forked it, or would like to improve it, please let us know!
Pull requests are welcome too. :-)

.. _django-geoposition: https://github.com/philippbosch/django-geoposition
.. _django-fluent-contents: https://github.com/django-fluent/django-fluent-contents


text:
<?php
/**
 * Created by ra on 6/13/2015.
 */

//logo
td_demo_media::add_image_to_media_gallery('td_pic_logo',                'http://demo_content.tagdiv.com/Newspaper_6/sport/sport-logo.png');

td_demo_media::add_image_to_media_gallery('td_pic_3',                   "http://demo_content.tagdiv.com/Newspaper_6/sport/3.jpg");
td_demo_media::add_image_to_media_gallery('td_pic_4',                   "http://demo_content.tagdiv.com/Newspaper_6/sport/4.jpg");


text:
    <waltz-page-header icon="users"
                       name="Custom Role">

Home

System Admin

Custom Role

    </waltz-page-header>

            Roles

                    Name
                    Description
                    Key
                    Custom role

                        <input type="checkbox" disabled="true" ng-checked="role.isCustom">

    <waltz-section name="Create Custom Role">

Custom roles can be used to restrict certain features in Waltz that allow dynamic role selection (i.e. allocations, assessment definitions)

        <form class="form-horizontal"
              ng-submit="ctrl.createRole(ctrl.roleName, ctrl.roleDescription)">

                    Role Key

                    <input type="text"
                           class="form-control"
                           disabled="true"
                           ng-model="ctrl.roleKey"
                           placeholder="Role Key preview">

                    Role Name

                    <input type="text"
                           class="form-control"
                           ng-model="ctrl.roleName"
                           required="true"
                           ng-change="ctrl.transformKey()"
                           placeholder="Role Name">

                    Role Description

                    <input type="text"
                           class="form-control"
                           required="true"
                           ng-model="ctrl.roleDescription"
                           placeholder="Role Description">

                    <button type="submit"
                            class="btn btn-success">
                        Save Changes
                    </button>

        </form>
    </waltz-section>


text:
package io.tetrapod.core.storage;

import java.io.*;

import io.tetrapod.raft.Command;

public class DelEntityCommand implements Command<TetrapodStateMachine> {

   public static final int COMMAND_ID = TetrapodStateMachine.DEL_ENTITY_COMMAND_ID;

   private int entityId;

   public DelEntityCommand() {}

   public DelEntityCommand(int entityId) {
      this.entityId = entityId;
   }

   @Override
   public void applyTo(TetrapodStateMachine state) {
      state.delEntity(entityId);
   }

   @Override
   public void write(DataOutputStream out) throws IOException {
      out.writeInt(entityId);
   }

   @Override
   public void read(DataInputStream in, int fileVersion) throws IOException {
      entityId = in.readInt();
   }

   @Override
   public int getCommandType() {
      return COMMAND_ID;
   }

   @Override
   public String toString() {
      return "DelEntityCommand(" + entityId + ")";
   }

   public static void register(TetrapodStateMachine state) {
      state.registerCommand(COMMAND_ID, () -> new DelEntityCommand());
   }

   public int getEntityId() {
      return entityId;
   }

}


text:
package com.crawljax.plugins.testilizer.casestudies.photogallery.instrumentedtests;

//import java.util.regex.Pattern;
import java.util.concurrent.TimeUnit;
import org.junit.*;
import static org.junit.Assert.*;
//import static org.hamcrest.CoreMatchers.*;
import org.openqa.selenium.*;
import org.openqa.selenium.firefox.FirefoxDriver;

//import org.openqa.selenium.support.ui.Select;
public class HomePageTest {

    private WebDriver driver;

    private StringBuffer verificationErrors = new StringBuffer();

    @Before
    public void setUp() throws Exception {
        driver = new FirefoxDriver();
        driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
    }

    @Test
    public void testHomePage() throws Exception {
        driver.get("http://localhost:8888/phormer331/");
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOn();
        assertTrue(isElementPresent(By.cssSelector("div#Granny")));
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getAssertion("assertTrue(isElementPresent(By.cssSelector(\"div#Granny\")))");
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOff();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getWebElement(driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(By.linkText("Stories"))), "click", "").click();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOn();
        assertTrue(driver.getCurrentUrl().matches("^http://localhost:8888/[\\s\\S]*mode=stories$"));
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getAssertion("assertTrue(driver.getCurrentUrl().matches(\"^http://localhost:8888/[\\\\s\\\\S]*mode=stories$\"))");
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOff();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getWebElement(driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(By.partialLinkText("Default Category"))), "click", "").click();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOn();
        assertTrue(driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(By.cssSelector("div.midInfo"))).getText().matches("^[\\s\\S]*category[\\s\\S]*$"));
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getAssertion("assertTrue(driver.findElement(By.cssSelector(\"div.midInfo\")).getText().matches(\"^[\\\\s\\\\S]*category[\\\\s\\\\S]*$\"))");
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOff();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getWebElement(driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(By.partialLinkText("Default Story"))), "click", "").click();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOn();
        assertTrue(driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(By.cssSelector("div.midInfo"))).getText().matches("^[\\s\\S]*story[\\s\\S]*$"));
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getAssertion("assertTrue(driver.findElement(By.cssSelector(\"div.midInfo\")).getText().matches(\"^[\\\\s\\\\S]*story[\\\\s\\\\S]*$\"))");
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOff();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getWebElement(driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(By.linkText("SlideShow"))), "click", "").click();
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOn();
        assertTrue(driver.getTitle().matches("^SlideShow[\\s\\S]*$"));
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getAssertion("assertTrue(driver.getTitle().matches(\"^SlideShow[\\\\s\\\\S]*$\"))");
        com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.assertionModeOff();
    }

    @After
    public void tearDown() throws Exception {
        driver.quit();
        String verificationErrorString = verificationErrors.toString();
        if (!"".equals(verificationErrorString)) {
            fail(verificationErrorString);
        }
    }

    private boolean isElementPresent(By by) {
        try {
            driver.findElement(com.crawljax.plugins.testilizer.seleniuminstrumentor.SeleniumInstrumentor.getBy(by));
            return true;
        } catch (NoSuchElementException e) {
            return false;
        }
    }
}


text:
package com.nowellpoint.handler.dataimport;

import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;

import org.codehaus.jackson.map.ObjectMapper;
import org.hibernate.Session;

import com.nowellpoint.handler.dataimport.config.Entities;
import com.nowellpoint.handler.dataimport.config.Entity;
import com.nowellpoint.handler.dataimport.config.EntityMapping;
import com.nowellpoint.handler.dataimport.exception.DataImportException;
import com.nowellpoint.handler.dataimport.mysql.TableImporter;
import com.nowellpoint.handler.dataimport.sforce.DataExporter;
import com.nowellpoint.handler.dataimport.task.ImportTask;
import com.sforce.soap.partner.PartnerConnection;
import com.sforce.ws.ConnectionException;

public class DataImporter {

	private Long organizationId;
	private Long userId;
	private String mappingFile;
	private PartnerConnection connection;
	private String outputDirectory;
	private EntityManagerFactory emf;

	public DataImporter(String mappingFile, Long organizationId, Long userId, PartnerConnection connection, EntityManagerFactory emf, String outputDirectory) {
		this.mappingFile = mappingFile;
		this.organizationId = organizationId;
		this.userId = userId;
		this.connection = connection;
		this.emf = emf;
		this.outputDirectory = outputDirectory;
	}

	public void runFullImport() {
		ObjectMapper om = new ObjectMapper();
		try {
			EntityMapping mapping = om.readValue(mappingFile, EntityMapping.class);
			for (Entities entities : mapping.getEntities()) {
				String type = entities.getType();
				Entity entity = entities.getEntity();

				createDataFile(type, entity);

				if (entity.getPreImport() != null && entity.getPreImport().trim().length() > 0) {
					if (Class.forName(entity.getPreImport()).getSuperclass().isAssignableFrom(ImportTask.class)) {
						ImportTask task = (ImportTask) Class.forName(entity.getPostImport()).newInstance();
						task.run(emf, connection, entity);
					}
				}

				if (entity.getDefaultValues() == null) {
					entity.setDefaultValues(new HashMap<String, String>());
				}

				entity.getDefaultValues().put("CREATED_BY_ID", String.valueOf(userId));
				entity.getDefaultValues().put("LAST_MODIFIED_BY_ID", String.valueOf(userId));
				entity.getDefaultValues().put("ORGANIZATION_ID", String.valueOf(organizationId));
				entity.getDefaultValues().put("CREATION_DATE", "SYSDATE()");
				entity.getDefaultValues().put("LAST_UPDATE_DATE", "SYSDATE()");
				entity.getDefaultValues().put("VERSION", String.valueOf(1));

				importDataFile(entity);

				if (entity.getPostImport() != null && entity.getPostImport().trim().length() > 0) {
					if (Class.forName(entity.getPostImport()).getSuperclass().isAssignableFrom(ImportTask.class)) {
						ImportTask task = (ImportTask) Class.forName(entity.getPostImport()).newInstance();
						task.run(emf, connection, entity);
					}
				}

				deleteDataFile(entity.getDataFile());
			}
		} catch (Exception e) {
			throw new DataImportException(e);
		}
	}

	private void createDataFile(String type, Entity entity) throws IOException, ConnectionException {
		DataExporter exporter = new DataExporter();
		String query = buildQuery(entity.getSobject(), entity.getFields(), entity.getWhereClause());
		String fileName = outputDirectory.concat("/" + type + "_" + organizationId + ".csv");
		int size = exporter.createFile(connection, fileName, getDelimiter(), getEnclosedBy(), query);
		entity.setQueryResultSize(size);
		entity.setDataFile(fileName);
	}

	private void importDataFile(Entity entity) {
		String importString = buildImportString(entity.getDataFile(), entity.getTable(), entity.getFields(), entity.getDefaultValues());
		TableImporter work = new TableImporter();
		work.setImportStatement(importString);

		EntityManager em = emf.createEntityManager();
		Session session = em.unwrap(Session.class);
		session.doWork(work);

		entity.setRecordsImported(work.getRecordCount());
	}

	private String buildQuery(String sobject, Map<String,String> fields, String whereClause) {
		StringBuffer sb = new StringBuffer();
		sb.append("Select ");
		int i = 0;
		for (String field : fields.values()) {
			sb.append(field);
			if (++i < fields.values().size()) {
				sb.append(", ");
			}
		}
		sb.append(" From ");
		sb.append(sobject);
		if (whereClause != null && whereClause.trim().length() > 0) {
			sb.append(" Where ");
			sb.append(whereClause.trim());
		}
		return sb.toString();
	}

	private String buildImportString(String infile, String table, Map<String, String> fields, Map<String, String> defaultValues) {
		StringBuffer sb = new StringBuffer();
		sb.append("LOAD DATA LOCAL INFILE '");
		sb.append(infile);
		sb.append("' INTO TABLE ");
		sb.append(table);
		sb.append(" FIELDS TERMINATED BY '");
		sb.append(getDelimiter());
		sb.append("' ENCLOSED BY '");
		sb.append(getEnclosedBy());
		sb.append("' LINES TERMINATED BY '");
		sb.append(System.getProperty("line.separator"));
		sb.append("' IGNORE 1 LINES ");
		sb.append("(");
		int i = 0;
		for (String field : fields.keySet()) {
			sb.append(field);
			if (++i < fields.size()) {
				sb.append(", ");
			}
		}
		i = 0;
		sb.append(") ");
		if (defaultValues != null && defaultValues.isEmpty() == false) {
			sb.append("SET ");
			Set<String> fieldSet = defaultValues.keySet();
			for (String field : fieldSet) {
				sb.append(field);
				sb.append(" = ");
				sb.append(defaultValues.get(field));
				if (++i < defaultValues.size()) {
					sb.append(", ");
				}
			}
		}
		return sb.toString();
	}

	private void deleteDataFile(String dataFile) {
		File file = new File(dataFile);
		file.delete();
	}

	private char getDelimiter() {
		return ',';
	}

	private char getEnclosedBy() {
		return '"';
	}
}


text:
img { visibility: hidden !important; }
img.cat { visibility: visible !important; }