text:
require_relative "../helper"

module Arel
  module Visitors
    class Oracle12Test < Arel::Spec
      before do
        @visitor = Oracle12.new Table.engine.connection
        @table = Table.new(:users)
      end

      def compile(node)
        @visitor.accept(node, Collectors::SQLString.new).value
      end

      it "modified except to be minus" do
        left = Nodes::SqlLiteral.new("SELECT * FROM users WHERE age > 10")
        right = Nodes::SqlLiteral.new("SELECT * FROM users WHERE age > 20")
        sql = compile Nodes::Except.new(left, right)
        _(sql).must_be_like %{
          ( SELECT * FROM users WHERE age > 10 MINUS SELECT * FROM users WHERE age > 20 )
        }
      end

      it "generates select options offset then limit" do
        stmt = Nodes::SelectStatement.new
        stmt.offset = Nodes::Offset.new(1)
        stmt.limit = Nodes::Limit.new(10)
        sql = compile(stmt)
        _(sql).must_be_like "SELECT OFFSET 1 ROWS FETCH FIRST 10 ROWS ONLY"
      end

      describe "locking" do
        it "generates ArgumentError if limit and lock are used" do
          stmt = Nodes::SelectStatement.new
          stmt.limit = Nodes::Limit.new(10)
          stmt.lock = Nodes::Lock.new(Arel.sql("FOR UPDATE"))
          assert_raises ArgumentError do
            compile(stmt)
          end
        end

        it "defaults to FOR UPDATE when locking" do
          node = Nodes::Lock.new(Arel.sql("FOR UPDATE"))
          _(compile(node)).must_be_like "FOR UPDATE"
        end
      end

      describe "Nodes::BindParam" do
        it "increments each bind param" do
          query = @table[:name].eq(Arel::Nodes::BindParam.new(1))
            .and(@table[:id].eq(Arel::Nodes::BindParam.new(1)))
          _(compile(query)).must_be_like %{
            "users"."name" = :a1 AND "users"."id" = :a2
          }
        end
      end

      describe "Nodes::IsNotDistinctFrom" do
        it "should construct a valid generic SQL statement" do
          test = Table.new(:users)[:name].is_not_distinct_from "Aaron Patterson"
          _(compile(test)).must_be_like %{
            DECODE("users"."name", 'Aaron Patterson', 0, 1) = 0
          }
        end

        it "should handle column names on both sides" do
          test = Table.new(:users)[:first_name].is_not_distinct_from Table.new(:users)[:last_name]
          _(compile(test)).must_be_like %{
            DECODE("users"."first_name", "users"."last_name", 0, 1) = 0
          }
        end

        it "should handle nil" do
          @table = Table.new(:users)
          val = Nodes.build_quoted(nil, @table[:active])
          sql = compile Nodes::IsNotDistinctFrom.new(@table[:name], val)
          _(sql).must_be_like %{ "users"."name" IS NULL }
        end
      end

      describe "Nodes::IsDistinctFrom" do
        it "should handle column names on both sides" do
          test = Table.new(:users)[:first_name].is_distinct_from Table.new(:users)[:last_name]
          _(compile(test)).must_be_like %{
            DECODE("users"."first_name", "users"."last_name", 0, 1) = 1
          }
        end

        it "should handle nil" do
          @table = Table.new(:users)
          val = Nodes.build_quoted(nil, @table[:active])
          sql = compile Nodes::IsDistinctFrom.new(@table[:name], val)
          _(sql).must_be_like %{ "users"."name" IS NOT NULL }
        end
      end
    end
  end
end


text:
@class FISound;

@interface Controller : UIViewController

@property(strong) FISound *sound;

- (IBAction) playSound;
- (IBAction) stopSound;

- (IBAction) updateSoundPitchFrom: (UISlider*) slider;

@end

redpajama_set_name: RedPajamaGithub


text:
import logging

from django.conf import settings
from django.contrib.gis.db.models.functions import Transform
from django.http import HttpResponse
from django.utils.functional import classproperty
from mapentity.views import (MapEntityList, MapEntityFormat, MapEntityDetail,
                             MapEntityDocument, MapEntityCreate, MapEntityUpdate, MapEntityDelete)

from geotrek.authent.decorators import same_structure_required
from geotrek.common.mixins.api import APIViewSet
from geotrek.common.mixins.forms import FormsetMixin
from geotrek.common.mixins.views import CustomColumnsMixin
from geotrek.common.viewsets import GeotrekMapentityViewSet
from geotrek.core.models import AltimetryMixin
from .filters import SignageFilterSet, BladeFilterSet
from .forms import SignageForm, BladeForm, LineFormset
from .models import Signage, Blade
from .serializers import (SignageSerializer, BladeSerializer,
                          SignageAPIGeojsonSerializer, CSVBladeSerializer, ZipBladeShapeSerializer,
                          SignageAPISerializer, BladeAPISerializer, BladeAPIGeojsonSerializer, SignageGeojsonSerializer,
                          BladeGeojsonSerializer)

logger = logging.getLogger(__name__)

class LineMixin(FormsetMixin):
    context_name = 'line_formset'
    formset_class = LineFormset

class SignageList(CustomColumnsMixin, MapEntityList):
    queryset = Signage.objects.existing()
    filterform = SignageFilterSet
    mandatory_columns = ['id', 'name']
    default_extra_columns = ['code', 'type', 'condition']
    searchable_columns = ['id', 'name', 'code']

class SignageFormatList(MapEntityFormat, SignageList):
    mandatory_columns = ['id']
    default_extra_columns = [
        'structure', 'name', 'code', 'type', 'condition', 'description',
        'implantation_year', 'published', 'date_insert',
        'date_update', 'cities', 'districts', 'areas', 'lat_value', 'lng_value',
        'printed_elevation', 'sealing', 'manager', 'uuid',
    ] + AltimetryMixin.COLUMNS

class SignageDetail(MapEntityDetail):
    queryset = Signage.objects.existing()

    def get_context_data(self, *args, **kwargs):
        context = super().get_context_data(*args, **kwargs)
        context['can_edit'] = self.get_object().same_structure(self.request.user)
        return context

class SignageDocument(MapEntityDocument):
    model = Signage

class SignageCreate(MapEntityCreate):
    model = Signage
    form_class = SignageForm

class SignageUpdate(MapEntityUpdate):
    queryset = Signage.objects.existing()
    form_class = SignageForm

    @same_structure_required('signage:signage_detail')
    def dispatch(self, *args, **kwargs):
        return super().dispatch(*args, **kwargs)

class SignageDelete(MapEntityDelete):
    model = Signage

    @same_structure_required('signage:signage_detail')
    def dispatch(self, *args, **kwargs):
        return super().dispatch(*args, **kwargs)

class SignageViewSet(GeotrekMapentityViewSet):
    model = Signage
    serializer_class = SignageSerializer
    geojson_serializer_class = SignageGeojsonSerializer
    filterset_class = SignageFilterSet
    mapentity_list_class = SignageList

    def get_queryset(self):
        qs = self.model.objects.existing()
        if self.format_kwarg == 'geojson':
            qs = qs.annotate(api_geom=Transform('geom', settings.API_SRID))
            qs = qs.only('id', 'name', 'published')
        else:
            qs = qs.select_related('structure', 'manager', 'sealing', 'type', 'condition')
        return qs

class SignageAPIViewSet(APIViewSet):
    model = Signage
    serializer_class = SignageAPISerializer
    geojson_serializer_class = SignageAPIGeojsonSerializer

    def get_queryset(self):
        return Signage.objects.existing().filter(published=True).annotate(api_geom=Transform("geom", settings.API_SRID))

class BladeDetail(MapEntityDetail):
    queryset = Blade.objects.all()

    def get_context_data(self, *args, **kwargs):
        context = super().get_context_data(*args, **kwargs)
        context['can_edit'] = self.get_object().signage.same_structure(self.request.user)
        return context

class BladeDocument(MapEntityDocument):
    model = Blade

class BladeCreate(LineMixin, MapEntityCreate):
    model = Blade
    form_class = BladeForm

    def get_signage(self):
        pk_infra = self.request.GET.get('signage')
        if pk_infra:
            try:
                return Signage.objects.existing().get(pk=pk_infra)
            except Signage.DoesNotExist:
                logger.warning("Intervention on unknown infrastructure %s" % pk_infra)
        return None

    def get_initial(self):
        """
        Returns the initial data to use for forms on this view.
        """
        initial = super().get_initial()
        signage = self.get_signage()
        initial['signage'] = signage
        return initial

    def get_success_url(self):
        return self.get_signage().get_detail_url()

class BladeUpdate(LineMixin, MapEntityUpdate):
    queryset = Blade.objects.all()
    form_class = BladeForm

    @same_structure_required('signage:blade_detail')
    def dispatch(self, *args, **kwargs):
        return super().dispatch(*args, **kwargs)

class BladeDelete(MapEntityDelete):
    model = Blade

    @same_structure_required('signage:blade_detail')
    def dispatch(self, *args, **kwargs):
        return super().dispatch(*args, **kwargs)

    def delete(self, request, *args, **kwargs):
        self.signage = self.get_object().signage
        return super().delete(request, args, kwargs)

    def get_success_url(self):
        return self.signage.get_detail_url()

class BladeList(CustomColumnsMixin, MapEntityList):
    queryset = Blade.objects.all()
    filterform = BladeFilterSet
    mandatory_columns = ['id', 'number']
    default_extra_columns = ['type', 'color', 'direction']
    searchable_columns = ['id', 'number']

    @classproperty
    def columns(cls):
        columns = super().columns
        if not settings.DIRECTION_ON_LINES_ENABLED:
            return columns
        columns.remove('direction')
        if 'direction' in cls.get_custom_columns():
            logger.warning(
                f"Ignoring entry 'direction' in COLUMNS_LISTS for view {cls.__name__} because the setting "
                "DIRECTION_ON_LINES is enabled."
            )
        return columns

class BladeFormatList(MapEntityFormat, BladeList):
    mandatory_columns = ['id']
    default_extra_columns = ['city', 'signage', 'printedelevation', 'bladecode', 'type', 'color', 'direction',
                             'condition', 'coordinates']
    columns_line = ['number', 'direction', 'text', 'distance_pretty', 'time_pretty', 'pictogram_name']

    def csv_view(self, request, context, **kwargs):
        serializer = CSVBladeSerializer()
        response = HttpResponse(content_type='text/csv')
        columns_line = self._adapt_direction_on_lines_visibility(self.columns_line)
        serializer.serialize(queryset=self.get_queryset(), stream=response,
                             model=self.get_model(), fields=self.columns, line_fields=columns_line,
                             ensure_ascii=True)
        return response

    def shape_view(self, request, context, **kwargs):
        serializer = ZipBladeShapeSerializer()
        response = HttpResponse(content_type='application/zip')
        serializer.serialize(queryset=self.get_queryset(), model=Blade,
                             stream=response, fields=self.columns)
        response['Content-length'] = str(len(response.content))
        return response

    @staticmethod
    def _adapt_direction_on_lines_visibility(columns):
        columns = columns.copy()
        if not settings.DIRECTION_ON_LINES_ENABLED and 'direction' in columns:
            columns.remove('direction')
        return columns

class BladeViewSet(GeotrekMapentityViewSet):
    model = Blade
    serializer_class = BladeSerializer
    geojson_serializer_class = BladeGeojsonSerializer
    filterset_class = BladeFilterSet
    mapentity_list_class = BladeList

    def get_queryset(self):
        qs = self.model.objects.all()
        if self.format_kwarg == 'geojson':
            qs = qs.only('id', 'number')
        return qs

class BladeAPIViewSet(APIViewSet):
    model = Blade
    serializer_class = BladeAPISerializer
    geojson_serializer_class = BladeAPIGeojsonSerializer

    def get_queryset(self):
        return Blade.objects.all().annotate(api_geom=Transform("signage__geom", settings.API_SRID))


text:
module D1(sumSquares) where

{-Duplicate function 'sumSquares' with a new name 'anotherFun',
  This refactoring only affects the current module.-}

sumSquares (x:xs) = sq x + sumSquares xs
  where
     sq x = x ^ pow
     pow =2

sumSquares [] = 0

anotherFun (x:xs) = sq x + anotherFun xs
  where
     sq x = x ^ pow
     pow =2

anotherFun [] = 0


text:
package de.sytm.httpserver.internal;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import de.sytm.httpserver.api.HTTPResponseCode;
import de.sytm.httpserver.api.Response;
import de.sytm.httpserver.internal.impl.FinalResponseImpl;

public final class Constants {

	private Constants() {
	}

	public static final String VERSION;
	public static final String SERVERADMINMAIL;
	public static final String HTML_PRESET;
	private static final String ERROR_PRESET;
	private static final String SERVER_ERROR_PRESET;
	public static final Response NO_CONTENT;
	public static final Response BAD_REQUEST;
	public static final Response UNAUTHORIZED;
	@Deprecated
	public static final Response PAYMENT_REQUIRED;
	public static final Response FORBIDDEN;
	public static final Response NOT_FOUND;
	public static final Response INTERNAL_ERROR;
	public static final Response NOT_IMPLEMENTED;
	public static final Response BAD_GATEWAY;
	public static final Response SERVICE_UNAVIABLE;
	public static final Response GATEWAY_TIMEOUT;
	public static final List<String> DEFAULT_INDEX_FILES;

	static {
		VERSION = "0.1.0";
		SERVERADMINMAIL = "admin@localhost";
		HTML_PRESET = "<!DOCTYPE html>%head%%body%";
		ERROR_PRESET = HTML_PRESET.replaceAll("%head%", "<title>%error_type%</title>")
				.replaceAll("%bodyparams%", "style=\"font-family: courier, fixed, monospace;\"").replaceAll("%body%",
						"
%error_type%

"
								+ "

%message_small%

Java HTTPServer "
								+ VERSION + "
");
		SERVER_ERROR_PRESET = HTML_PRESET.replaceAll("%head%", "<title>%error_type%</title>")
				.replaceAll("%bodyparams%", "style=\"font-family: courier, fixed, monospace;\"").replaceAll("%body%",
						"
%error_type%

"
								+ "

%message_small%

Please contact a server admin: " + SERVERADMINMAIL + "
Java HTTPServer " + VERSION
								+ "
");
		NO_CONTENT = new FinalResponseImpl(new HashMap<String, String>(), "", HTTPResponseCode.NO_CONTENT);
		BAD_REQUEST = new FinalResponseImpl(getDefaultHeaders(),
				ERROR_PRESET.replaceAll("%error_type%", "Error - 400").replaceAll("%message_small%", "Bad request!"),
				HTTPResponseCode.BAD_REQUEST);
		UNAUTHORIZED = new FinalResponseImpl(getDefaultHeaders(),
				ERROR_PRESET.replaceAll("%error_type%", "Error - 401").replaceAll("%message_small%", "Unauthorized!"),
				HTTPResponseCode.UNAUTHORIZED);
		PAYMENT_REQUIRED = new FinalResponseImpl(getDefaultHeaders(), ERROR_PRESET
				.replaceAll("%error_type%", "Error - 402").replaceAll("%message_small%", "Payment required!"),
				HTTPResponseCode.PAYMENT_REQUIRED);
		FORBIDDEN = new FinalResponseImpl(getDefaultHeaders(),
				ERROR_PRESET.replaceAll("%error_type%", "Error - 403").replaceAll("%message_small%", "Forbidden!"),
				HTTPResponseCode.FORBIDDEN);
		NOT_FOUND = new FinalResponseImpl(getDefaultHeaders(),
				ERROR_PRESET.replaceAll("%error_type%", "Error - 404").replaceAll("%message_small%", "Page not found!"),
				HTTPResponseCode.NOT_FOUND);
		INTERNAL_ERROR = new FinalResponseImpl(getDefaultHeaders(), SERVER_ERROR_PRESET
				.replaceAll("%error_type%", "Error - 500").replaceAll("%message_small%", "An internal Error occoured!"),
				HTTPResponseCode.INTERNAL_ERROR);
		NOT_IMPLEMENTED = new FinalResponseImpl(getDefaultHeaders(), ERROR_PRESET
				.replaceAll("%error_type%", "Error - 501").replaceAll("%message_small%", "Not implemented yet!"),
				HTTPResponseCode.NOT_IMPLEMENTED);
		BAD_GATEWAY = new FinalResponseImpl(getDefaultHeaders(), SERVER_ERROR_PRESET
				.replaceAll("%error_type%", "Error - 502").replaceAll("%message_small%", "Bad Gateway!"),
				HTTPResponseCode.BAD_GATEWAY);
		SERVICE_UNAVIABLE = new FinalResponseImpl(getDefaultHeaders(),
				SERVER_ERROR_PRESET.replaceAll("%error_type%", "Error - 503").replaceAll("%message_small%",
						"Service currently unaviable!"),
				HTTPResponseCode.SERVICE_UNAVIABLE);
		GATEWAY_TIMEOUT = new FinalResponseImpl(getDefaultHeaders(), SERVER_ERROR_PRESET
				.replaceAll("%error_type%", "Error - 504").replaceAll("%message_small%", "Gateway timeout!"),
				HTTPResponseCode.GATEWAY_TIMEOUT);
		List<String> indexfiles = new ArrayList<String>();
		indexfiles.add("index.html");
		indexfiles.add("index.htm");
		DEFAULT_INDEX_FILES = Collections.unmodifiableList(indexfiles);
	}

	private static Map<String, String> getDefaultHeaders() {
		Map<String, String> map = new HashMap<String, String>();
		map.put("Content-Type", "text/html");
		return map;
	}

	public static Response getMovedPermantly(String url) {
		Map<String, String> headers = new HashMap<String, String>();
		headers.put("Location", url);
		return new FinalResponseImpl(headers, "", HTTPResponseCode.MOVED_PERMANTLY);
	}
}


text:
package org.hisp.dhis.android.core.event;

public enum EventStatus {
    ACTIVE, COMPLETED, SCHEDULE, SKIPPED, @Deprecated VISITED, OVERDUE
}


text:
package org.eclipse.gef;

import org.eclipse.core.runtime.Assert;

import org.eclipse.draw2d.geometry.PrecisionRectangle;

/**
 * Combines multiple SnapToHelpers into one compound helper. The compound helper
 * deletages to multiple other helpers.
 *
 * @author Pratik Shah
 */
public class CompoundSnapToHelper extends SnapToHelper {

    private SnapToHelper[] delegates;

    /**
     * Constructs a compound snap to helper which will delegate to the provided
     * array of helpers. The first helper in the array has highest priority and
     * will be given the first opportunity to perform snapping.
     *
     * @since 3.0
     * @param delegates
     *            an array of helpers
     */
    public CompoundSnapToHelper(SnapToHelper delegates[]) {
        Assert.isTrue(delegates.length != 0);
        this.delegates = delegates;
    }

    /**
     * Gets the array of helpers.
     *
     * @return the array of helpers.
     * @since 3.4
     */
    protected SnapToHelper[] getDelegates() {
        return delegates;
    }

    /**
     * @see SnapToHelper#snapRectangle(Request, int, PrecisionRectangle,
     *      PrecisionRectangle)
     */
    @Override
    public int snapRectangle(Request request, int snapOrientation,
            PrecisionRectangle baseRect, PrecisionRectangle result) {
        for (int i = 0; i < getDelegates().length && snapOrientation != NONE; i++)
            snapOrientation = getDelegates()[i].snapRectangle(request,
                    snapOrientation, baseRect, result);
        return snapOrientation;
    }

}


text:
/*-------------------------------------------------------------------------
  Copyright 2008 Sandia Corporation.
  Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation,
  the U.S. Government retains certain rights in this software.
-------------------------------------------------------------------------*/

/// \file vtkQtChartSeriesSelection.h
/// \date March 14, 2008

#ifndef _vtkQtChartSeriesSelection_h
#define _vtkQtChartSeriesSelection_h

#include "vtkQtChartExport.h"
#include <QMap> // needed for return type
#include "vtkQtChartIndexRangeList.h" // needed for return type.

class vtkQtChartSeriesSelectionInternal;

/// \class vtkQtChartSeriesSelection
/// \brief
///   The vtkQtChartSeriesSelection class is used for series and point
///   selection.
class VTKQTCHART_EXPORT vtkQtChartSeriesSelection
{
public:
  enum SelectionType
    {
    NoSelection = 0, ///< No selection is made.
    SeriesSelection, ///< The selection contains series indexes.
    PointSelection   ///< The selection contains point indexes.
    };

public:
  vtkQtChartSeriesSelection();
  vtkQtChartSeriesSelection(const vtkQtChartSeriesSelection &other);
  ~vtkQtChartSeriesSelection();

  vtkQtChartSeriesSelection &operator=(const vtkQtChartSeriesSelection &other);

  /// \brief
  ///   Gets whether or not the selection is empty.
  /// \return
  ///   True if the selection is empty.
  bool isEmpty() const;

  /// \brief
  ///   Gets the selection type.
  /// \return
  ///   The selection type.
  SelectionType getType() const;

  /// Clears the selection lists.
  bool clear();

  /// \name Series Selection Methods
  //@{
  /// \brief
  ///   Gets the list of selected series ranges.
  /// \return
  ///   A reference to the list of selected series ranges.
  const vtkQtChartIndexRangeList &getSeries() const;

  /// \brief
  ///   Sets the list of selected series ranges.
  /// \param series The new list of selected series ranges.
  /// \return
  ///   True if the selection was modified.
  bool setSeries(const vtkQtChartIndexRangeList &series);

  /// \brief
  ///   Sets the list of selected series ranges.
  /// \param first The first series index in the range.
  /// \param last The last series index in the range.
  /// \return
  ///   True if the selection was modified.
  bool setSeries(int first, int last);

  /// \brief
  ///   Adds the list of series ranges to the selection.
  /// \param series The list of selected series ranges to add.
  /// \return
  ///   True if the selection was modified.
  bool addSeries(const vtkQtChartIndexRangeList &series);

  /// \brief
  ///   Adds the series index range to the selection.
  /// \param first The first series index in the range.
  /// \param last The last series index in the range.
  /// \return
  ///   True if the selection was modified.
  bool addSeries(int first, int last);

  /// \brief
  ///   Subtracts the list of series ranges from the selection.
  /// \param series The list of selected series ranges to subtract.
  /// \return
  ///   True if the selection was modified.
  bool subtractSeries(const vtkQtChartIndexRangeList &series);

  /// \brief
  ///   Subtracts the series index range from the selection.
  /// \param first The first series index in the range.
  /// \param last The last series index in the range.
  /// \return
  ///   True if the selection was modified.
  bool subtractSeries(int first, int last);

  /// \brief
  ///   Selects unique series from the given list and the selection.
  /// \param series The list of series ranges.
  /// \return
  ///   True if the selection was modified.
  bool xorSeries(const vtkQtChartIndexRangeList &series);

  /// \brief
  ///   Selects unique series from the given range and the selection.
  /// \param first The first series index in the range.
  /// \param last The last series index in the range.
  /// \return
  ///   True if the selection was modified.
  bool xorSeries(int first, int last);

  /// \brief
  ///   Trims the selected series to the given bounds.
  /// \param minimum The minimum series index.
  /// \param maximum The maximum series index.
  void limitSeries(int minimum, int maximum);

  /// \brief
  ///   Adds the offset to all the series greater than or equal to
  ///   the given series.
  /// \param first The starting series index.
  /// \param offset The offset to add to the indexes.
  /// \return
  ///   True if the selection was modified.
  bool offsetSeries(int first, int offset);
  //@}

  /// \name Point Selection Methods
  //@{
  /// \brief
  ///   Gets the list of selected point ranges.
  /// \return
  ///   A reference to the list of selected point ranges.
  const QMap<int, vtkQtChartIndexRangeList> &getPoints() const;

  /// \brief
  ///   Sets the list of selected point ranges.
  /// \param points The new list of selected point ranges.
  /// \return
  ///   True if the selection was modified.
  bool setPoints(const QMap<int, vtkQtChartIndexRangeList> &points);

  /// \brief
  ///   Sets the list of selected point ranges.
  /// \param series The series index.
  /// \param indexes The list of point ranges.
  /// \return
  ///   True if the selection was modified.
  bool setPoints(int series, const vtkQtChartIndexRangeList &indexes);

  /// \brief
  ///   Adds the list of point ranges to the selection.
  /// \param points The list of selected point ranges to add.
  /// \return
  ///   True if the selection was modified.
  bool addPoints(const QMap<int, vtkQtChartIndexRangeList> &points);

  /// \brief
  ///   Adds the list of point ranges to the selection.
  /// \param series The series index.
  /// \param indexes The list of point ranges.
  /// \return
  ///   True if the selection was modified.
  bool addPoints(int series, const vtkQtChartIndexRangeList &indexes);

  /// \brief
  ///   Subtracts the list of point ranges from the selection.
  /// \param points The list of selected point ranges to subtract.
  /// \return
  ///   True if the selection was modified.
  bool subtractPoints(const QMap<int, vtkQtChartIndexRangeList> &points);

  /// \brief
  ///   Subtracts the list of point ranges from the selection.
  /// \param series The series index.
  /// \param indexes The list of point ranges.
  /// \return
  ///   True if the selection was modified.
  bool subtractPoints(int series, const vtkQtChartIndexRangeList &indexes);

  /// \brief
  ///   Subtracts all the selected points in the given series from
  ///   the selection.
  /// \param first The first series in the range.
  /// \param last The last series in the range.
  /// \return
  ///   True if the selection was modified.
  bool subtractPoints(int first, int last);

  /// \brief
  ///   Selects unique points from the given list and the selection.
  /// \param points The list of point ranges.
  /// \return
  ///   True if the selection was modified.
  bool xorPoints(const QMap<int, vtkQtChartIndexRangeList> &points);

  /// \brief
  ///   Selects unique points from the given list and the selection.
  /// \param series The series index.
  /// \param indexes The list of point ranges.
  /// \return
  ///   True if the selection was modified.
  bool xorPoints(int series, const vtkQtChartIndexRangeList &indexes);

  /// \brief
  ///   Trims the selected point indexes for the given series.
  /// \param series The series index.
  /// \param minimum The minimum point index.
  /// \param maximum The maximum point index.
  void limitPoints(int series, int minimum, int maximum);
  //@}

private:
  vtkQtChartSeriesSelectionInternal *Internal; ///< Stores the selection lists.
};

#endif


text:
package org.uberfire.ext.security.management.client.editor.user;

import org.jboss.errai.security.shared.api.Group;
import org.jboss.errai.security.shared.api.Role;
import org.jboss.errai.security.shared.api.identity.User;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.ArgumentCaptor;
import org.mockito.Mock;
import org.mockito.invocation.InvocationOnMock;
import org.mockito.runners.MockitoJUnitRunner;
import org.mockito.stubbing.Answer;
import org.uberfire.ext.security.management.api.UserManager;
import org.uberfire.ext.security.management.api.validation.EntityValidator;
import org.uberfire.ext.security.management.client.ClientUserSystemManager;

import javax.validation.ConstraintViolation;
import java.util.*;

import static org.junit.Assert.*;
import static org.mockito.Mockito.*;

@RunWith(MockitoJUnitRunner.class)
public class UserEditorDriverTest {

    @Mock
    ClientUserSystemManager userSystemManager;

    private UserEditorDriver tested;

    @Before
    public void setup() {
        tested = new UserEditorDriver(userSystemManager);
    }

    @Test
    public void testCreateUser() {

        final User u = mock(User.class);
        final ArgumentCaptor<String> idCaptor =  ArgumentCaptor.forClass(String.class);
        doAnswer(new Answer<User>() {
            @Override
            public User answer(InvocationOnMock invocationOnMock) throws Throwable {
                final String idArgument = idCaptor.getValue();
                when(u.getIdentifier()).thenReturn(idArgument);
                return u;
            }
        }).when(userSystemManager).createUser(idCaptor.capture());

        doAnswer(new Answer<Collection<UserManager.UserAttribute>>() {
            @Override
            public Collection<UserManager.UserAttribute> answer(InvocationOnMock invocationOnMock) throws Throwable {
                Collection<UserManager.UserAttribute> attributes = new ArrayList<UserManager.UserAttribute>();
                UserManager.UserAttribute a1 = mockUserAttribute("a1", "v1", true, true);
                UserManager.UserAttribute a2 = mockUserAttribute("a2", "v2", false, true);
                UserManager.UserAttribute a3 = mockUserAttribute("a3", "v3", true, false);
                UserManager.UserAttribute a4 = mockUserAttribute("a4", "v4", false, false);
                attributes.add(a1);
                attributes.add(a2);
                attributes.add(a3);
                attributes.add(a4);
                return attributes;
            }
        }).when(userSystemManager).getUserSupportedAttributes();

        String id = "user1";
        User user = tested.createNewUser(id);
        assertEquals(user, u);
        assertEquals(user.getIdentifier(), u.getIdentifier());
        verify(user, times(1)).setProperty(anyString(), anyString());

    }

    @Test
    public void testShow() {
        final User user = mock(User.class);
        final UserEditor userEditor = mock(UserEditor.class);
        final UserAttributesEditor attributesEditor = mock(UserAttributesEditor.class);
        final UserAssignedGroupsExplorer groupsExplorer = mock(UserAssignedGroupsExplorer.class);
        final UserAssignedRolesExplorer rolesExplorer = mock(UserAssignedRolesExplorer.class);
        when(userEditor.attributesEditor()).thenReturn(attributesEditor);
        when(userEditor.groupsExplorer()).thenReturn(groupsExplorer);
        when(userEditor.rolesExplorer()).thenReturn(rolesExplorer);
        tested.isFlushed = true;
        tested.isEditMode = true;
        tested.show(user, userEditor);
        assertEquals(user, tested.user);
        assertEquals(userEditor, tested.userEditor);
        assertFalse(tested.isFlushed);
        assertFalse(tested.isEditMode);
        verify(userEditor, times(1)).show(user);
        verify(attributesEditor, times(1)).show(user);
        verify(groupsExplorer, times(1)).show(user);
        verify(rolesExplorer, times(1)).show(user);
        verify(userEditor, times(0)).edit(user);
        verify(attributesEditor, times(0)).edit(user);
        verify(groupsExplorer, times(0)).edit(user);
        verify(rolesExplorer, times(0)).edit(user);
        verify(userEditor, times(0)).flush();
        verify(attributesEditor, times(0)).flush();
        verify(groupsExplorer, times(0)).flush();
        verify(rolesExplorer, times(0)).flush();
    }

    @Test
    public void testEdit() {
        final User user = mock(User.class);
        final UserEditor userEditor = mock(UserEditor.class);
        final UserAttributesEditor attributesEditor = mock(UserAttributesEditor.class);
        final UserAssignedGroupsExplorer groupsExplorer = mock(UserAssignedGroupsExplorer.class);
        final UserAssignedRolesExplorer rolesExplorer = mock(UserAssignedRolesExplorer.class);
        when(userEditor.attributesEditor()).thenReturn(attributesEditor);
        when(userEditor.groupsExplorer()).thenReturn(groupsExplorer);
        when(userEditor.rolesExplorer()).thenReturn(rolesExplorer);
        tested.isFlushed = true;
        tested.isEditMode = false;
        tested.edit(user, userEditor);
        assertEquals(user, tested.user);
        assertEquals(userEditor, tested.userEditor);
        assertFalse(tested.isFlushed);
        assertTrue(tested.isEditMode);
        verify(userEditor, times(1)).edit(user);
        verify(attributesEditor, times(1)).edit(user);
        verify(groupsExplorer, times(1)).edit(user);
        verify(rolesExplorer, times(1)).edit(user);
        verify(userEditor, times(0)).show(user);
        verify(attributesEditor, times(0)).show(user);
        verify(groupsExplorer, times(0)).show(user);
        verify(rolesExplorer, times(0)).show(user);
        verify(userEditor, times(0)).flush();
        verify(attributesEditor, times(0)).flush();
        verify(groupsExplorer, times(0)).flush();
        verify(rolesExplorer, times(0)).flush();
    }

    @Test
    public void testFlush() {
        final User user = mock(User.class);
        final Set<Role> roles = new HashSet<Role>();
        when(user.getRoles()).thenReturn(roles);
        final UserEditor userEditor = mock(UserEditor.class);
        final UserAttributesEditor attributesEditor = mock(UserAttributesEditor.class);
        final UserAssignedGroupsExplorer groupsExplorer = mock(UserAssignedGroupsExplorer.class);
        final UserAssignedRolesExplorer rolesExplorer = mock(UserAssignedRolesExplorer.class);
        when(userEditor.identifier()).thenReturn("user1");
        when(userEditor.attributesEditor()).thenReturn(attributesEditor);
        final Map<String, String> attributes = new HashMap<String, String>();
        when(attributesEditor.getValue()).thenReturn(attributes);
        final Set<Group> groups = new HashSet<Group>();
        when(userEditor.groupsExplorer()).thenReturn(groupsExplorer);
        when(groupsExplorer.getValue()).thenReturn(groups);
        final Set<Role> _roles = new HashSet<Role>();
        when(userEditor.rolesExplorer()).thenReturn(rolesExplorer);
        when(rolesExplorer.getValue()).thenReturn(_roles);
        final EntityValidator<User> userEntityValidator = mock(EntityValidator.class);
        when(userSystemManager.usersValidator()).thenReturn(userEntityValidator);
        final Set<ConstraintViolation<User>> violations = mock(Set.class);
        when(violations.isEmpty()).thenReturn(true);
        when(userEntityValidator.validate(any(User.class))).thenReturn(violations);
        tested.user = user;
        tested.userEditor = userEditor;
        tested.isFlushed = false;
        tested.isEditMode = true;

        tested.flush();
        User result = tested.getValue();

        verify(userEditor, times(1)).flush();
        verify(attributesEditor, times(1)).flush();
        verify(groupsExplorer, times(1)).flush();
        verify(rolesExplorer, times(1)).flush();
        verify(attributesEditor, times(1)).getValue();
        verify(groupsExplorer, times(1)).getValue();
        verify(rolesExplorer, times(1)).getValue();
        verify(userEntityValidator, times(1)).validate(any(User.class));
        assertEquals("user1", result.getIdentifier());
        assertEquals(roles, result.getRoles());
        assertEquals(groups, result.getGroups());
        assertEquals(_roles, result.getRoles());
        assertEquals(attributes, result.getProperties());
    }

    private UserManager.UserAttribute mockUserAttribute(String name, String defaultValue,
                                                        boolean isMandatory,
                                                        boolean isEditable) {

        UserManager.UserAttribute attr = mock(UserManager.UserAttribute.class);
        when(attr.getName()).thenReturn(name);
        when(attr.getDefaultValue()).thenReturn(defaultValue);
        when(attr.isMandatory()).thenReturn(isMandatory);
        when(attr.isEditable()).thenReturn(isEditable);
        return attr;
    }

}


text:
export type ContactType = {
	title: string,
	phoneNumber?: string,
	buttonText: string,
	buttonLink?: string,
	category: string,
	image?: string,
	text: string,
	synopsis: string,
}


text:
package org.apache.camel.component.aws.ddb;

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

import com.amazonaws.services.dynamodbv2.model.AttributeValue;
import com.amazonaws.services.dynamodbv2.model.KeysAndAttributes;
import org.apache.camel.Exchange;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.support.DefaultExchange;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;

public class BatchGetItemsCommandTest {

    private BatchGetItemsCommand command;
    private AmazonDDBClientMock ddbClient;
    private DdbConfiguration configuration;
    private Exchange exchange;

    @BeforeEach
    public void setUp() {
        ddbClient = new AmazonDDBClientMock();
        configuration = new DdbConfiguration();
        exchange = new DefaultExchange(new DefaultCamelContext());
        command = new BatchGetItemsCommand(ddbClient, configuration, exchange);
    }

    @Test
    public void execute() {
        Map<String, AttributeValue> key = new HashMap<>();
        key.put("1", new AttributeValue("Key_1"));
        Map<String, AttributeValue> unprocessedKey = new HashMap<>();
        unprocessedKey.put("1", new AttributeValue("UNPROCESSED_KEY"));
        Map<String, KeysAndAttributes> keysAndAttributesMap = new HashMap<>();
        KeysAndAttributes keysAndAttributes = new KeysAndAttributes().withKeys(key);
        keysAndAttributesMap.put("DOMAIN1", keysAndAttributes);
        exchange.getIn().setHeader(DdbConstants.BATCH_ITEMS, keysAndAttributesMap);

        command.execute();

        assertEquals(keysAndAttributesMap, ddbClient.batchGetItemRequest.getRequestItems());

        List<Map<String, AttributeValue>> batchResponse = (List<Map<String, AttributeValue>>) exchange.getIn()
                .getHeader(DdbConstants.BATCH_RESPONSE, Map.class).get("DOMAIN1");
        AttributeValue value = batchResponse.get(0).get("attrName");

        KeysAndAttributes unProcessedAttributes = (KeysAndAttributes) exchange.getIn().getHeader(
                DdbConstants.UNPROCESSED_KEYS, Map.class).get("DOMAIN1");
        Map<String, AttributeValue> next = unProcessedAttributes.getKeys().iterator().next();

        assertEquals(new AttributeValue("attrValue"), value);
        assertEquals(unprocessedKey, next);
    }
}


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

<title>com.tailf.cdb (CONF API Version 6.6)</title>
<meta name="date" content="2018-03-02">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">

com.tailf.cdb

Interfaces

CdbCLIDiffIterate

CdbDiffIterate

Classes

Cdb

CdbPhase

CdbProto

CdbSession

CdbSubscription

CdbTxId

Enums

CdbDBType

CdbGetModificationFlag

CdbLockType

CdbNotificationType

CdbSubscrConfigFlag

CdbSubscriptionFlagType

CdbSubscriptionSyncType

CdbSubscriptionType

Exceptions

CdbException

CdbExtendedException


text:
package com.tjm.rpr;

import java.util.Locale;
import java.util.regex.Pattern;

import android.app.AlertDialog;
import android.app.AlertDialog.Builder;
import android.content.Context;
import android.net.ConnectivityManager;
import android.net.NetworkInfo;

public class Utilities {
	public static String insertCharacterToString(String string, int position, char character) {
		if(position >= string.length()) return null;
		return string.substring(0,position) + character + string.substring(position);
	}

	public static int[] valueOfStringDate(String date) {
		int[] dateObject = new int[3];
		String[] brokenUpDate = date.split(" ");

		brokenUpDate[0] = brokenUpDate[0].trim().replaceAll(",", "").replace(".", "").toLowerCase(Locale.US);
		brokenUpDate[1] = brokenUpDate[1].trim().replaceAll(",", "").replace(".", "").toLowerCase(Locale.US);
		brokenUpDate[2] = brokenUpDate[2].trim().replaceAll(",", "").replace(".", "").toLowerCase(Locale.US);

		//Handling metric date format
		if(Pattern.matches("[a-zA-Z]+", brokenUpDate[1])) {
			String tmp = brokenUpDate[0];
			brokenUpDate[0] = brokenUpDate[1];
			brokenUpDate[1] = tmp;
		}

		if(brokenUpDate[0].contains("jan") || brokenUpDate[0].contains("ene")) {
			dateObject[0] = 0;
		}else if(brokenUpDate[0].contains("feb")) {
			dateObject[0] = 1;
		}else if(brokenUpDate[0].contains("mar")) {
			dateObject[0] = 2;
		}else if(brokenUpDate[0].contains("apr")) {
			dateObject[0] = 3;
		}else if(brokenUpDate[0].contains("may")) {
			dateObject[0] = 4;
		}else if(brokenUpDate[0].contains("jun")) {
			dateObject[0] = 5;
		}else if(brokenUpDate[0].contains("jul")) {
			dateObject[0] = 6;
		}else if(brokenUpDate[0].contains("aug")) {
			dateObject[0] = 7;
		}else if(brokenUpDate[0].contains("sept")) {
			dateObject[0] = 8;
		}else if(brokenUpDate[0].contains("oct")) {
			dateObject[0] = 9;
		}else if(brokenUpDate[0].contains("nov")) {
			dateObject[0] = 10;
		}else if(brokenUpDate[0].contains("dec")) {
			dateObject[0] = 11;
		}

		dateObject[1] = Integer.valueOf(brokenUpDate[1]);
		dateObject[2] = Integer.valueOf(brokenUpDate[2]);

		return dateObject;
	}

	public static String getDataFromXmlTag(String startTag, String result) {
		String data = "";
		String closeTag = Utilities.insertCharacterToString(startTag, 1, '/');
		int tagSize = closeTag.length();
		int subPtr = 0;

		if(result.trim().length() > 0) {
			while(!result.substring(subPtr,subPtr+tagSize).equalsIgnoreCase(closeTag)) {
				subPtr++;
				if(subPtr+tagSize >= result.length()) break;
			}

			if(subPtr < result.length()) {
				data = result.substring(startTag.length(), subPtr);
			}
		}

		return data;
	}

	public static boolean hasNetworkConnected(Context context) {
		ConnectivityManager connManager = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE);
		NetworkInfo mWifi = connManager.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
		NetworkInfo mMobile = connManager.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);

		return mWifi.isConnected() || mMobile.isConnected();
	}

	public static AlertDialog createConnectionIssueDialog(Context context) {
		Builder dBuilder = new Builder(context);
		dBuilder.setMessage(context.getString(R.string.no_network_connection));
		dBuilder.setTitle(context.getString(R.string.no_network_connection_title));
		return dBuilder.create();
	}
}


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

-->
<config>
    <modules>
        <Mage_GoogleCheckout>
            <version>1.6.0.1</version>
        </Mage_GoogleCheckout>
    </modules>
    <global>
        <models>
            <googlecheckout>
                <class>Mage_GoogleCheckout_Model</class>
            </googlecheckout>
        </models>
    </global>
    <default>
        <payment>
            <googlecheckout>
                <active>1</active>
                <model>googlecheckout/payment</model>
            </googlecheckout>
        </payment>
    </default>
</config>


text:
var Skype = require('./index');

var skype = new Skype({start: true});

skype.on('received message', function(msg) {
  console.log('%s: %s', msg.from, msg.body);
});

skype.on('online status change', function(user) {
  console.log('%s changed his status to %s', user.username, user.onlineStatus);
});

skype.on('ready', function() {
  skype.chatMessage('', 'Hello!');
});


text:
using System;
using System.IO;
using System.Windows;
using SimpleLoggingSystem;
using TwitchCSharp.Clients;

namespace SimpleTwitchHelper
{
    public class Globals
    {
        public const string CreateAuthKeyLink = "https://twitch.michael-lohr.net/sth";
        public const string TwitchLink = "http://www.twitch.tv/";
        public const string TweetLink = "https://twitter.com/intent/tweet?text=";
        public const string ChatPopupUrl = "http://www.twitch.tv/{0}/chat?popout=";
        public const string ClientId = "mghb8yk4nts6btvb56d65n3wknryalg";
        public const int PullDataRate = 10;

        public static readonly string AppdataPath = Environment.GetFolderPath(Environment.SpecialFolder.ApplicationData);
        public static readonly string MyFolderPath = Path.Combine(AppdataPath, "SimpleTwitchHelper");
        public static readonly string ConfigFile = Path.Combine(MyFolderPath, "config.yml");
        public static readonly string CountdownFile = Path.Combine(MyFolderPath, "countdown.txt");
        public static readonly string LogFile = Path.Combine(MyFolderPath, "log.txt");

        public static Logger Logger;
        public static Config Config;
        public static TwitchAuthenticatedClient Client;

        public static TMIApi.TMIApi TmiApi = new TMIApi.TMIApi();
        public static TwitchStatus Status = new TwitchStatus();
    }
}


text:
galpy.orbit.Orbit.integrate
=============================

.. automethod:: galpy.orbit.Orbit.integrate


text:
<?php
include('../session.php');

//return json data for mysql tables

if (isset($_GET['transaction'])){
	// movements
	$sql_query = "SELECT CONCAT('[', GROUP_CONCAT(JSON_OBJECT('mov_id', mov_id, 'cat_id', cat_id, 'val', val, 'dat_mov', dat_mov, 'usr_mov', usr_mov, 'note', note) ORDER BY dat_mov desc),']') as value FROM mov";
	$sql_exec = mysqli_query($db, $sql_query);
	$sql_row = mysqli_fetch_array($sql_exec, MYSQLI_ASSOC);

	header('Content-Type: application/json');
	echo $sql_row['value'];
}elseif(isset($_GET['categories'])){
	// categories
	$sql_query = "SELECT CONCAT('[', GROUP_CONCAT(JSON_OBJECT('cat_id', cat_id, 'cat_name', cat_name, 'parent_id', parent_cat, 'income', case when income='S' then TRUE ELSE FALSE end, 'num_mov', num_mov, 'color', concat('#',color), 'keyword', keyword)),']') as value FROM cat";
	$sql_exec = mysqli_query($db, $sql_query);
	$sql_row = mysqli_fetch_array($sql_exec, MYSQLI_ASSOC);

	header('Content-Type: application/json');
	echo $sql_row['value'];
}elseif(isset($_GET['users'])){
	// users
	$sql_query = "SELECT CONCAT('[', GROUP_CONCAT(JSON_OBJECT('usr_id', usr_id, 'email', email, 'tms_upd', tms_upd, 'admin', case when admin='S' then TRUE ELSE FALSE end, 'valid', case when valid='S' then TRUE ELSE FALSE end, 'color', concat('#',color))),']') as value FROM user";
	$sql_exec = mysqli_query($db, $sql_query);
	$sql_row = mysqli_fetch_array($sql_exec, MYSQLI_ASSOC);

	header('Content-Type: application/json');
	echo $sql_row['value'];
}

?>


text:
Much of the initial take on this topic is coming from *Elasticsearch:
The Definitive Guide* from O'Reilly.

## Overview

Elasticsearch is a distributed document store; it stores/retrieves complex data structures serialized as JSON documents in real time.

All data in every field in a document is indexed by default.

## Vocabulary

**node** -- A running instance of Elasticsearch.

**cluster** -- A group of *nodes* with the same `cluster.name` working
together to share data and provide failover and scale.

**master node** -- One node in the cluster which manages cluster-wide
changes.

**Index (n)** -- A place to store related documents. Technically a
logical namespace that points to one or more physical *shards*. The
number of primary shards is fixed at index creation.

**Index (v)** -- To store a document in an index so it can be
retrieved and querried. Like an `INSERT` in SQL. Indexing replaces
existing copies with new copies.

**Inverted Index** -- an index (like a B-Tree index in Relational)
that allows searching and improves search speeds. Fields without an
inverted index are not searchable.

**shards** -- conatiners into which documents are partitioned which
can be spread across multiple nodes. These are balanced across the
nodes in a cluster to spread the indexing and search load. These are
also duplicated to provide redundancy. Technically a single instances
of Lucene, so each shard is a complete search engine in itself. Shards
can be *primary* or *replica*. Each document belongs to a single
primary shard. Replicas are just copies of primary shards.

**Document** -- a top-level, or root object that is serialized into
JSON and stored in Elasticsearch under a unique ID. Consists of both
data and metadata fields. Documments are **immutable**; udating an
existing document is done by reindexing or replacing it.

I found this diagram to be useful:

```
Relational DB => Databases => Tables => Rows      => Columns.
Elasticsearch => Indices   => Types  => Documents => Fields.
```

A *cluster* can contain multiple *indices* which in turn contain
multipe *types* which hold multiple *documents* each having multiple
*fields*.

Index is **highly overloaded** in Elasticsearch.

## Behavior

Users may talk to any node in the cluster; each node knows where each
document lives and can forward the request to the nodes that hold the
data. The node communicated with manages the process of gathering up
the response to return to the user.

Because each shard is a full search engine, you can horizontally scale
your cluster so that each shard is on a single machine and it will
consume all the resources.

## Security
[Web Documentation at Elastic](https://www.elastic.co/guide/en/x-pack/current/security-getting-started.html)

Security seems to be setup using X-Pack which must be installed on
every node. Users appear to be assigned **roles** via the API, which must update the `roles.yml` file (I think).

Security has multiple levels:

- User Authentication
- Authorization and Role Based Access Control (RBAC)
  - Secured Resource
  - Privilege
  - Permissions
  - Role: A named set of permissions.
  - User: Authenticated user.
- Node/Client Authentication and Channel Encryption
- Auditing


text:
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
	<modelVersion>4.0.0</modelVersion>

	<parent>
		<groupId>com.github.ledoyen</groupId>
		<artifactId>winter-reactor</artifactId>
		<version>1.1.0-SNAPSHOT</version>
	</parent>

	<packaging>maven-plugin</packaging>
	<artifactId>winter-maven-plugin</artifactId>

	<properties>
		<mavenVersion>2.2.1</mavenVersion>
		<maven.tools.version>3.5</maven.tools.version>

		<surefire.version>2.19.1</surefire.version>
	</properties>

	<dependencies>
		<dependency>
			<groupId>com.github.ledoyen</groupId>
			<artifactId>winter</artifactId>
			<version>${project.version}</version>
		</dependency>
		<dependency>
			<groupId>org.springframework.boot</groupId>
			<artifactId>spring-boot-loader-tools</artifactId>
			<version>1.4.1.RELEASE</version>
		</dependency>

		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-plugin-api</artifactId>
			<version>${mavenVersion}</version>
		</dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-descriptor</artifactId>
            <version>${mavenVersion}</version>
        </dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-artifact</artifactId>
			<version>${mavenVersion}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven</groupId>
			<artifactId>maven-project</artifactId>
			<version>${mavenVersion}</version>
		</dependency>
		<dependency>
			<groupId>org.apache.maven.plugin-tools</groupId>
			<artifactId>maven-plugin-annotations</artifactId>
			<scope>provided</scope>
			<version>${maven.tools.version}</version>
		</dependency>
        <dependency>
            <groupId>com.squareup</groupId>
            <artifactId>javapoet</artifactId>
            <version>1.9.0</version>
        </dependency>
    </dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
				<artifactId>maven-plugin-plugin</artifactId>
				<version>${maven.tools.version}</version>
				<configuration>
					<goalPrefix>winter</goalPrefix>
				</configuration>
				<executions>
					<execution>
						<id>generate-descriptor</id>
						<goals>
							<goal>descriptor</goal>
						</goals>
					</execution>
					<execution>
						<id>generated-helpmojo</id>
						<goals>
							<goal>helpmojo</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>
</project>


text:
[Full Changelog](https://github.com/oscarmcm/django-places/compare/v3.1.0...HEAD)

**Implemented enhancements:**

- Update fields.py for Django 3.0 [\#24](https://github.com/oscarmcm/django-places/pull/24) ([dryan](https://github.com/dryan))

**Closed issues:**

-  Deprecated Field.\_get\_val\_from\_obj\(\) [\#25](https://github.com/oscarmcm/django-places/issues/25)

## [v3.1.0](https://github.com/oscarmcm/django-places/tree/v3.1.0) (2018-10-30)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v3.0.0...v3.1.0)

**Implemented enhancements:**

- Support marker options and set marker as draggable [\#22](https://github.com/oscarmcm/django-places/pull/22) ([oscarmcm](https://github.com/oscarmcm))

**Fixed bugs:**

- Empty Map in admin [\#16](https://github.com/oscarmcm/django-places/issues/16)

## [v3.0.0](https://github.com/oscarmcm/django-places/tree/v3.0.0) (2018-10-29)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v2.0.0...v3.0.0)

**Implemented enhancements:**

- Load map-options settings [\#21](https://github.com/oscarmcm/django-places/pull/21) ([oscarmcm](https://github.com/oscarmcm))
- Add support for inline admin [\#20](https://github.com/oscarmcm/django-places/pull/20) ([oscarmcm](https://github.com/oscarmcm))

**Fixed bugs:**

- Multiple PlacesField\(\) Objects declaration in one Model clones data from one Object to the other. [\#14](https://github.com/oscarmcm/django-places/issues/14)
- Remove jquery geocomplete [\#19](https://github.com/oscarmcm/django-places/pull/19) ([oscarmcm](https://github.com/oscarmcm))

## [v2.0.0](https://github.com/oscarmcm/django-places/tree/v2.0.0) (2017-09-10)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.1.4...v2.0.0)

**Implemented enhancements:**

- Update for django 1.11 [\#12](https://github.com/oscarmcm/django-places/pull/12) ([pavillet](https://github.com/pavillet))

**Fixed bugs:**

- Django 1.11 not render widget [\#9](https://github.com/oscarmcm/django-places/issues/9)

## [v1.1.4](https://github.com/oscarmcm/django-places/tree/v1.1.4) (2017-05-08)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.1.3...v1.1.4)

**Fixed bugs:**

- undefined name Location [\#10](https://github.com/oscarmcm/django-places/issues/10)

## [v1.1.3](https://github.com/oscarmcm/django-places/tree/v1.1.3) (2017-05-07)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.1.2...v1.1.3)

**Fixed bugs:**

- Kwargs problem [\#8](https://github.com/oscarmcm/django-places/issues/8)
- Problems with djplaces [\#6](https://github.com/oscarmcm/django-places/issues/6)
- i18n support [\#3](https://github.com/oscarmcm/django-places/issues/3)

## [v1.1.2](https://github.com/oscarmcm/django-places/tree/v1.1.2) (2017-05-07)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.1.1...v1.1.2)

## [v1.1.1](https://github.com/oscarmcm/django-places/tree/v1.1.1) (2017-01-22)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.1.0...v1.1.1)

## [v1.1.0](https://github.com/oscarmcm/django-places/tree/v1.1.0) (2017-01-09)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.5...v1.1.0)

## [v1.0.5](https://github.com/oscarmcm/django-places/tree/v1.0.5) (2016-07-26)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.4...v1.0.5)

**Implemented enhancements:**

- Add own jquery to avoid conflicts and be able to used in admin and templates [\#5](https://github.com/oscarmcm/django-places/pull/5) ([darwing1210](https://github.com/darwing1210))

## [v1.0.4](https://github.com/oscarmcm/django-places/tree/v1.0.4) (2016-07-20)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.3...v1.0.4)

## [v1.0.3](https://github.com/oscarmcm/django-places/tree/v1.0.3) (2016-06-01)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.2...v1.0.3)

## [v1.0.2](https://github.com/oscarmcm/django-places/tree/v1.0.2) (2016-05-12)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.1...v1.0.2)

## [v1.0.1](https://github.com/oscarmcm/django-places/tree/v1.0.1) (2016-05-12)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/v1.0.0...v1.0.1)

**Fixed bugs:**

- Geocomplete is not a function [\#1](https://github.com/oscarmcm/django-places/issues/1)

**Merged pull requests:**

- Fixes \#1 Geocomplete is not a function [\#2](https://github.com/oscarmcm/django-places/pull/2) ([oscarmcm](https://github.com/oscarmcm))

## [v1.0.0](https://github.com/oscarmcm/django-places/tree/v1.0.0) (2016-04-28)

[Full Changelog](https://github.com/oscarmcm/django-places/compare/76c5eebb54bbffa7840162934b0086ce96a9eade...v1.0.0)

\* *This Changelog was automatically generated by [github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*


text:
from django import template
from django.conf import settings

register = template.Library()

@register.inclusion_tag("honeypot/honeypot_field.html")
def render_honeypot_field(field_name=None):
    """
    Renders honeypot field named field_name (defaults to HONEYPOT_FIELD_NAME).
    """
    if not field_name:
        field_name = settings.HONEYPOT_FIELD_NAME
    value = getattr(settings, "HONEYPOT_VALUE", "")
    if callable(value):
        value = value()
    return {"fieldname": field_name, "value": value}


text:
module Encodable
  autoload(:ActiveRecord, 'encodable/active_record')
  autoload(:Array, 'encodable/array')
end

if defined? ActiveRecord::Base
  ActiveRecord::Base.extend Encodable::ActiveRecord::ClassMethods
  ActiveRecord::Base.send :include, Encodable::ActiveRecord::InstanceMethods
  require 'encodable/array'
end


text:
class SearchController < ApplicationController
  include RoomHelper

  INTERSECTION_SEARCH_LIMIT = 3
  SEARCH_LIMIT = 20

  def index
    @rooms = search_from
  end

  def search
    if params[:search].blank? or params[:search][:message].blank?
      redirect_to :action => :index
      return
    end

    @query = params[:search][:message]
    @rooms = search_from
    @room_id = params[:room].blank? ? "" : params[:room][:id]
    if @room_id.blank?
      @results = Message.find_by_text(:text => @query, :rooms => Room.all_live(current_user), :limit => INTERSECTION_SEARCH_LIMIT)
    else
      find_room(@room_id, :not_auth => true) do
        @results = Message.find_by_text(:text => @query, :rooms => [ @room ], :limit => SEARCH_LIMIT)
      end
    end
  end

  def search_more
    @messages = []
    if params[:search_message].blank? or params[:room_id].blank?
      render :template => 'chat/messages', :layout => false
      return
    end

    @last_message_id = params[:id]
    @query = params[:search_message]
    @room_id = params[:room_id]
    find_room(@room_id, :not_auth => true) do
      @results = Message.find_by_text(:text => @query, :rooms => [ @room ], :limit => SEARCH_LIMIT, :message_id => @last_message_id)
      if @results.size > 0
        @messages = @results.first[:messages].reverse!
      end
    end
    render :template => 'chat/messages', :layout => false
  end

  private
  def search_from
    Room.all_live(current_user).map {|room| [room.title, room.id]}
  end
end


text:
cask "obsidian" do
  version "0.12.4"
  sha256 "4266a9dd98e433fdafaa1a251ba576d2935f8f5f7821e372845a2738073f6837"

  url "https://github.com/obsidianmd/obsidian-releases/releases/download/v#{version}/Obsidian-#{version}-universal.dmg",
      verified: "github.com/obsidianmd/"
  name "Obsidian"
  desc "Knowledge base that works on top of a local folder of plain text Markdown files"
  homepage "https://obsidian.md/"

  livecheck do
    url :url
    strategy :github_latest
  end

  auto_updates true

  app "Obsidian.app"

  zap trash: [
    "~/Library/Application Support/obsidian",
    "~/Library/Preferences/md.obsidian.plist",
    "~/Library/Saved Application State/md.obsidian.savedState",
  ]
end


text:
TOPHEMAN PLAYGROUND V2
======================

**This repository is DEPRECATED, please visit the new version at [topheman/playground](https://github.com/topheman/playground)**

## Intro

Try it at : [https://topheman-playground.herokuapp.com](https://topheman-playground.herokuapp.com/) (heroku instance).

Presentation : [http://slid.es/topheman/topheman-playground](http://slid.es/topheman/topheman-playground)

Once you snapped the QR-code with your phone, take control of the bouncing ball on your desktop screen, like a Wiimote, tilting your phone as you would do on a labyrinth game.

* Connect with multiple mobile devices
* Watch from multiple desktop/laptop screens

You can even use the devicemotion emulator to control the ball from your desktop.

Not a game, more of an experiment that could lead to a game …

Thanks to [remote-tilt](http://remote-tilt.com/) for the emulator.

![Topheman Playground](https://raw.github.com/topheman/playground2/master/app/public/src/css/img/topheman-playground-bandeau.png)

## Install

* `npm install`
* `node app.js 192.168.1.2:3000` (192.168.1.2:3000 being the public IP:PORT of your node server - port by default at 3000 - this is used to create the QR-Code)

OK for node v4 & v5

## Next

I coded the [v1](https://github.com/topheman/playground1) about a year ago, and now I decided to refactor it so that it could be a sort of a boilerplate for some other games.

Take it, make your own games and tell me about it !

## Notes

On their first version, heroku didn't provide WebSockets support, so socket.io fallbacked to xhr-polling. That's now fixed.

When you'll browse the code, you'll see that there is a connection/disconnetion routine on the sockets which makes sure to disconnect any mobile client which has more than one socket opened (to prevent multiple dead balls). This was a tricky part, playing with the express session and the socket.io handshake :-) …


text:
using System;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Threading;
using Microsoft.Web.Administration;

namespace WebStack.QA.Common.WebHost
{
    /// <summary>
    /// Helper of operating IIS
    /// </summary>
    public static class IISHelper
    {
        private static readonly int DefaultIISDelay = 999;

        static IISHelper()
        {
            // Read delay from app.config
            int intDelay;
            string strDelay = System.Configuration.ConfigurationManager.AppSettings["iis_delay"];
            if (strDelay == null || Int32.TryParse(strDelay, out intDelay))
            {
                intDelay = DefaultIISDelay;
            }

            SleepDelay = intDelay;
            BaseUrl = "http://localhost/";
            DefaultWebSiteFolder = @"c:\inetpub\wwwroot";
            DefaultWebSiteName = "Default Web Site";
        }

        public static string BaseUrl { get; set; }
        public static int SleepDelay { get; set; }
        public static string DefaultWebSiteFolder { get; set; }
        public static string DefaultWebSiteName { get; set; }

        /// <summary>
        /// Clean up the iis
        /// </summary>
        /// <param name="options">
        /// </param>
        public static void CleanupIIS(WebAppSetupOptions options)
        {
            using (ServerManager manager = new ServerManager())
            {
                Site site = manager.Sites[DefaultWebSiteName];

                Application app = site.Applications.Where((x, i) => x.Path == "/" + options.VirtualDirectory).FirstOrDefault();

                if (app != null)
                {
                    site.Applications.Remove(app);
                    manager.CommitChanges();
                }

                // TODO: Currently disabled for debugging purposes
                // RemoveDirectory(Path.Combine(options.IISRoot, options.vdirName));
            }
        }

        /// <summary>
        /// Set up a web site in IIS according to the given setup option
        /// </summary>
        /// <param name="options">
        /// the options
        /// </param>
        /// <returns>
        /// an url pointing to the new created site
        /// </returns>
        public static string SetupIIS(WebAppSetupOptions options)
        {
            if (options.NeedsGlobalAsax())
            {
                options.GenerateGlobalAsaxForCS();
            }

            using (ServerManager manager = new ServerManager())
            {
                Site site = manager.Sites[DefaultWebSiteName];

                // create site directory as well as bin directory
                string path = Path.Combine(DefaultWebSiteFolder, options.VirtualDirectory);
                EnsureDirectory(path);
                string binPath = Path.Combine(path, "Bin");
                EnsureDirectory(binPath);

                // list the required assemblies and copy
                string[] assembliesToAlwaysCopy = new string[]
                    {
                        Assembly.GetExecutingAssembly().Location, // this assembly
                    };

                foreach (var assembly in assembliesToAlwaysCopy)
                {
                    File.Copy(assembly, Path.Combine(binPath, Path.GetFileName(assembly)), true);
                }

                // generated all text based files. they are mostly configuration files.
                if (options.TextFiles != null)
                {
                    foreach (var textFileName in options.TextFiles.Keys)
                    {
                        var file = new FileInfo(Path.Combine(path, textFileName));
                        file.Directory.Create();
                        File.WriteAllText(file.FullName, options.TextFiles[textFileName]);
                    }
                }

                // copy all required binary files
                if (options.BinaryFiles != null)
                {
                    foreach (var file in options.BinaryFiles)
                    {
                        File.Copy(file, Path.Combine(binPath, Path.GetFileName(file)), true);
                    }
                }

                // add application to web site
                site.Applications.Add("/" + options.VirtualDirectory, path);
                manager.CommitChanges();

                Thread.Sleep(SleepDelay);

                return new Uri(new Uri(BaseUrl), options.VirtualDirectory).ToString();
            }
        }

        public static void EnableFormsAuthentication()
        {
            SetAuthenticationSection("mode", "Forms");
        }

        public static void ResetAuthentication()
        {
            SetAuthenticationSection("mode", "Windows");
        }

        private static void SetAuthenticationSection(string attributeName, string value)
        {
            using (ServerManager serverManager = new ServerManager())
            {
                Site site = serverManager.Sites.Where(s => s.Name == IISHelper.DefaultWebSiteName).Single();
                Configuration config = serverManager.GetWebConfiguration(site.Name);
                ConfigurationSection authenticationSection =
                             config.GetSection("system.web/authentication");

                authenticationSection.SetAttributeValue(attributeName, value);
                serverManager.CommitChanges();
            }
        }

        /// <summary>
        /// Create a directory based on the given path so as to ensure the directory always exists.
        /// </summary>
        /// <param name="path">
        /// path to the directory
        /// </param>
        private static void EnsureDirectory(string path)
        {
            if (!Directory.Exists(path))
            {
                Directory.CreateDirectory(path);
            }
        }

        /// <summary>
        /// Remove a directory including all files under it.
        /// </summary>
        /// <param name="path">
        /// path to the directory to be removed
        /// </param>
        private static void RemoveDirectory(string path)
        {
            if (Directory.Exists(path))
            {
                foreach (var file in Directory.GetFiles(path))
                {
                    File.Delete(file);
                }

                Directory.Delete(path, recursive: true);
            }
        }
    }
}


text:
package marathon

// ImageType represents the image format type
type ImageType string

const (
	// ImageTypeDocker is the docker format
	ImageTypeDocker ImageType = "DOCKER"

	// ImageTypeAppC is the appc format
	ImageTypeAppC ImageType = "APPC"
)

// PodContainerImage describes how to retrieve the container image
type PodContainerImage struct {
	Kind      ImageType `json:"kind,omitempty"`
	ID        string    `json:"id,omitempty"`
	ForcePull bool      `json:"forcePull,omitempty"`
}

// NewPodContainerImage creates an empty PodContainerImage
func NewPodContainerImage() *PodContainerImage {
	return &PodContainerImage{}
}

// SetKind sets the Kind of the image
func (i *PodContainerImage) SetKind(typ ImageType) *PodContainerImage {
	i.Kind = typ
	return i
}

// SetID sets the ID of the image
func (i *PodContainerImage) SetID(id string) *PodContainerImage {
	i.ID = id
	return i
}

// NewDockerPodContainerImage creates a docker PodContainerImage
func NewDockerPodContainerImage() *PodContainerImage {
	return NewPodContainerImage().SetKind(ImageTypeDocker)
}


text:
		African Art

Beads & Accessories

Currencies

Dolls

Masks & Head dresses

Seats

Statues

Textiles

Others

Asian objects

Asian textiles & bags

Fashion accessories

Ralli quilts


text:
/*************************************************************************/
/*  resource_saver_png.cpp                                               */
/*************************************************************************/
/*                       This file is part of:                           */
/*                           GODOT ENGINE                                */
/*                    http://www.godotengine.org                         */
/*************************************************************************/
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur.                 */
/*                                                                       */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the       */
/* "Software"), to deal in the Software without restriction, including   */
/* without limitation the rights to use, copy, modify, merge, publish,   */
/* distribute, sublicense, and/or sell copies of the Software, and to    */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions:                                             */
/*                                                                       */
/* The above copyright notice and this permission notice shall be        */
/* included in all copies or substantial portions of the Software.       */
/*                                                                       */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,       */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF    */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY  */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,  */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE     */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
/*************************************************************************/
#include "resource_saver_png.h"
#include "scene/resources/texture.h"
#include "drivers/png/png.h"
#include "os/file_access.h"

static void _write_png_data(png_structp png_ptr,png_bytep data, png_size_t p_length) {

	FileAccess *f = (FileAccess*)png_get_io_ptr(png_ptr);
	f->store_buffer( (const uint8_t*)data,p_length);
}

Error ResourceSaverPNG::save(const String &p_path,const RES& p_resource,uint32_t p_flags) {

	Ref<ImageTexture> texture=p_resource;

	ERR_FAIL_COND_V(!texture.is_valid(),ERR_INVALID_PARAMETER);
	ERR_EXPLAIN("Can't save empty texture as PNG");
	ERR_FAIL_COND_V(!texture->get_width() || !texture->get_height(),ERR_INVALID_PARAMETER);

	Image img = texture->get_data();
	if (img.get_format() > Image::FORMAT_INDEXED_ALPHA)
		img.decompress();

	ERR_FAIL_COND_V(img.get_format() > Image::FORMAT_INDEXED_ALPHA, ERR_INVALID_PARAMETER);

	png_structp png_ptr;
	png_infop info_ptr;
	png_bytep * row_pointers;

	/* initialize stuff */
	png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL);

	ERR_FAIL_COND_V(!png_ptr,ERR_CANT_CREATE);

	info_ptr = png_create_info_struct(png_ptr);

	ERR_FAIL_COND_V(!info_ptr,ERR_CANT_CREATE);

	if (setjmp(png_jmpbuf(png_ptr))) {
		ERR_FAIL_V(ERR_CANT_OPEN);
	}
	//change this
	Error err;
	FileAccess* f = FileAccess::open(p_path,FileAccess::WRITE,&err);
	if (err) {
		ERR_FAIL_V(err);
	}

	png_set_write_fn(png_ptr,f,_write_png_data,NULL);

	/* write header */
	if (setjmp(png_jmpbuf(png_ptr))) {
		ERR_FAIL_V(ERR_CANT_OPEN);
	}

	int pngf=0;
	int pngb=8;
	int cs=0;

	switch(img.get_format()) {

		case Image::FORMAT_GRAYSCALE: {

			pngf=PNG_COLOR_TYPE_GRAY;
			cs=1;
		} break;
		case Image::FORMAT_GRAYSCALE_ALPHA: {

			pngf=PNG_COLOR_TYPE_GRAY_ALPHA;
			cs=2;
		} break;
		case Image::FORMAT_RGB: {

			pngf=PNG_COLOR_TYPE_RGB;
			cs=3;
		} break;
		case Image::FORMAT_RGBA: {

			pngf=PNG_COLOR_TYPE_RGB_ALPHA;
			cs=4;
		} break;
		default: {

			if (img.detect_alpha()) {

				img.convert(Image::FORMAT_RGBA);
				pngf=PNG_COLOR_TYPE_RGB_ALPHA;
				cs=4;
			} else {

				img.convert(Image::FORMAT_RGB);
				pngf=PNG_COLOR_TYPE_RGB;
				cs=3;
			}

		}
	}

	int w = img.get_width();
	int h = img.get_height();
	png_set_IHDR(png_ptr, info_ptr, w,h,
		     8, pngf, PNG_INTERLACE_NONE,
		     PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);

	png_write_info(png_ptr, info_ptr);

	/* write bytes */
	if (setjmp(png_jmpbuf(png_ptr))) {
		memdelete(f);
		ERR_FAIL_V(ERR_CANT_OPEN);
	}

	DVector<uint8_t>::Read r = img.get_data().read();

	row_pointers = (png_bytep*)memalloc(sizeof(png_bytep)*h);
	for(int i=0;i<h;i++) {

		row_pointers[i]=(png_bytep)&r[i*w*cs];
	}
	png_write_image(png_ptr, row_pointers);

	memfree(row_pointers);

	/* end write */
	if (setjmp(png_jmpbuf(png_ptr))) {

		memdelete(f);
		ERR_FAIL_V(ERR_CANT_OPEN);
	}

	png_write_end(png_ptr, NULL);
	memdelete(f);

	/* cleanup heap allocation */

	return OK;
}

bool ResourceSaverPNG::recognize(const RES& p_resource) const {

	return (p_resource.is_valid() && p_resource->is_type("ImageTexture"));
}
void ResourceSaverPNG::get_recognized_extensions(const RES& p_resource,List<String> *p_extensions) const{

	if (p_resource->cast_to<Texture>()) {
		p_extensions->push_back("png");
	}

}


text:
'use strict';

var chai = require('chai');
var expect = chai.expect; // We are using the 'expect' style of Chai
var TrackerAsset = require('../src/js-tracker');

var tracker = new TrackerAsset();
tracker.HttpRequest = function(url, method, headers, body, success, error) {
    if (connected) {
        var result = JSON.parse('{' +
         '\"authToken\": \"5a26cb5ac8b102008b41472b5a30078bc8b102008b4147589108928341\", ' +
         '\"actor\": { \"account\": { \"homePage\": \"http://a2:3000/\", \"name\": \"Anonymous\"}, \"name\": \"test-animal-name\"}, ' +
         '\"playerAnimalName\": \"test-animal-name\", ' +
         '\"playerId\": \"5a30078bc8b102008b41475769103\", ' +
         '\"objectId\": \"http://a2:3000/api/proxy/gleaner/games/5a26cb5ac8b102008b41472a/5a26cb5ac8b102008b41472b\", ' +
         '\"session\": 1, ' +
         '\"firstSessionStarted\": \"2017-12-12T16:44:59.273Z\", ' +
         '\"currentSessionStarted\": \"2017-12-12T16:44:59.273Z\" ' +
         '}');

        netstorage += body;

        success(result);
    } else {
        error('Can\'t connect');
    }
};

var storage = [];
tracker.LocalStorage = {
    getItem: function(name) {
        return storage[name];
    },
    setItem: function(name, data) {
        storage[name] = data;
    }
};

var settings = {
    host: 'http://localhost/',
    port: 80,
    secure: false,
    trackingCode: 'test',
    userToken: '',
    max_flush: 4,
    batch_size: 10,
    backupStorage: true,
    debug: false,
    force_actor: true
};

var enqueueTrace01 = function() {
    return tracker.ActionTrace('accessed', 'gameobject', 'ObjectID');
};

var enqueueTrace02 = function() {
    tracker.setResponse('TheResponse');
    tracker.setScore(0.123);
    return tracker.ActionTrace('initialized', 'game', 'ObjectID2');
};

var enqueueTrace03 = function() {
    tracker.setResponse('AnotherResponse');
    tracker.setScore(123.456);
    tracker.setSuccess(false);
    tracker.setCompletion(true);
    tracker.setVar('extension1', 'value1');
    tracker.setVar('extension2', 'value2');
    tracker.setVar('extension3', 3);
    tracker.setVar('extension4', 4.56);
    return tracker.ActionTrace('selected', 'zone', 'ObjectID3');
};

var obsize = function(obj) {
    var size = 0, key;
    for (key in obj) {
        if (obj.hasOwnProperty(key)) {
            size++;
        }
    }
    return size;
};

var connected = true;
var netstorage = '';
var initTracker = function(callback) {
    tracker.Stop();
    netstorage = '';
    tracker.settings = settings;
    tracker.Start(callback);
};

describe('TrackerAsset Connection Tests', function() {
    it('TestCorrectActor', function() {
        initTracker(function() {
            expect(tracker.actor).not.to.equal(null);
            expect(tracker.actor.account).not.to.equal(null);
            expect(tracker.actor.name).to.equal('test-animal-name');
        });
    });

    it('TestTraceIncludesCorrectActor', function() {
        initTracker(function() {
            tracker.LocalStorage.setItem(tracker.backup_file, '');

            enqueueTrace01();
            tracker.Flush(function() {
                var text = netstorage;
                var file = JSON.parse(text);
                var tracejson = file[file.length - 1];

                expect(obsize(tracejson)).to.equal(4);
                expect(tracejson.actor.name).to.equal('test-animal-name');
            });
        });
    });

    it('TestTraceSendingSync', function() {
        initTracker(function() {
            tracker.LocalStorage.setItem(tracker.backup_file, '');

            enqueueTrace01();
            tracker.Flush(function() {
                var text = netstorage;
                var file = JSON.parse(text);
                var tracejson = file[file.length - 1];

                expect(obsize(tracejson)).to.equal(4);
                expect(tracejson.object.id).to.contain('ObjectID');
                expect(tracejson.object.definition.type).to.equal('https://w3id.org/xapi/seriousgames/activity-types/game-object');
                expect(tracejson.verb.id).to.equal('https://w3id.org/xapi/seriousgames/verbs/accessed');

                netstorage += ',';
                enqueueTrace02();
                enqueueTrace03();
                tracker.Flush(function() {
                    var text = '[' + netstorage + ']';
                    file = JSON.parse(text);

                    expect(obsize(file)).to.equal(2);
                    expect(obsize(file[0])).to.equal(1);
                    expect(obsize(file[1])).to.equal(2);
                });
            });
        });
    });

    it('TestBackupSync', function() {
        initTracker(function() {
            storage[settings.BackupFile] = '';

            tracker.LocalStorage.setItem(tracker.backup_file, '');

            enqueueTrace01();
            tracker.Flush(function() {
                netstorage += ',';
                enqueueTrace02();
                enqueueTrace03();
                tracker.Flush(function() {
                    var text = storage[tracker.backup_file];
                    var file = text.split('\n');
                    expect(file.length).to.equal(4);
                });
            });
        });
    });

    it('TestTraceSending_IntermitentConnection', function() {
        initTracker(function() {
            netstorage = '';
            enqueueTrace01();

            tracker.Flush(function() {
                var text = netstorage;
                var file = JSON.parse(text);
                var tracejson = file[file.length - 1];

                expect(obsize(tracejson)).to.equal(4);
                expect(tracejson.object.id).to.contain('ObjectID');
                expect(tracejson.object.definition.type).to.equal('https://w3id.org/xapi/seriousgames/activity-types/game-object');
                expect(tracejson.verb.id).to.equal('https://w3id.org/xapi/seriousgames/verbs/accessed');

                connected = false;
                enqueueTrace02();
                enqueueTrace03();

                tracker.Flush(function() {
                    var text = netstorage;
                    var file = JSON.parse(text);
                    expect(obsize(file)).to.equal(1);
                    connected = true;

                    netstorage += ',';

                    tracker.Flush(function() {
                        var text = netstorage;
                        text = '[' + text + ']';
                        var file = JSON.parse(text);

                        expect(obsize(file)).to.equal(2);
                        expect(obsize(file[0])).to.equal(1);
                        expect(obsize(file[1])).to.equal(2);
                    });
                });
            });
        });
    });

    it('TestBackupSync_IntermitentConnection', function() {
        initTracker(function() {
            netstorage = '';
            storage[tracker.backup_file] = '';

            enqueueTrace01();
            tracker.Flush(function() {
                var text = storage[tracker.backup_file];
                var file = text.split('\n');
                expect(file.length).to.equal(2);

                connected = false;

                enqueueTrace02();
                enqueueTrace03();
                tracker.Flush(function() {
                    var text = storage[tracker.backup_file];
                    var file = text.split('\n');
                    expect(file.length).to.equal(4);

                    connected = true;

                    tracker.Flush(function() {
                        var text = storage[tracker.backup_file];
                        var file = text.split('\n');
                        expect(file.length).to.equal(4);

                        connected = true;
                    });
                });
            });
        });
    });

    it('TestTraceSending_WithoutStart', function() {
        tracker.Stop();

        tracker.Accessible.Accessed('error');

        tracker.Flush(function(result, error) {
            expect(error).to.equal(true);
        });
    });

    it('TestTraceSendingStartFailed', function() {
        tracker.Stop();

        connected = false;

        initTracker(function() {
            netstorage = '';
            storage[tracker.backup_file] = '';

            enqueueTrace01();
            tracker.Flush(function() {
                expect(netstorage).to.equal('');
                expect(storage[tracker.backup_file]).to.not.equal('');

                connected = true;
                enqueueTrace02();
                enqueueTrace03();

                tracker.Flush(function() {
                    var text = netstorage;
                    text = netstorage.replace('][', '],[');
                    text = '[' + text + ']';

                    var file = JSON.parse(text);

                    expect(obsize(file)).to.equal(2);
                    expect(obsize(file[0])).to.equal(1);
                    expect(obsize(file[1])).to.equal(2);

                    var tracejson = file[0][0];

                    expect(obsize(tracejson)).to.equal(4);
                    expect(tracejson.object.id).to.contain('ObjectID');
                    expect(tracejson.object.definition.type).to.equal('https://w3id.org/xapi/seriousgames/activity-types/game-object');
                    expect(tracejson.verb.id).to.equal('https://w3id.org/xapi/seriousgames/verbs/accessed');

                    text = storage[tracker.backup_file];
                    file = text.split('\n');
                    expect(file.length).to.equal(4);
                });
            });
        });
    });

    it('TestEmptyQueueFlush', function() {
        connected = false;

        initTracker(function() {
            netstorage = '';
            storage[tracker.backup_file] = '';

            tracker.Flush(function() {
                expect(netstorage).to.equal('');

                tracker.Flush(function() {
                    expect(netstorage).to.equal('');

                    connected = true;
                    tracker.Flush(function() {
                        expect(netstorage).to.equal('');
                        connected = false;

                        enqueueTrace01();
                        tracker.Flush(function() {
                            tracker.Flush(function() {
                                connected = true;
                                tracker.Flush(function() {
                                    tracker.Flush(function() {
                                        var file = JSON.parse(netstorage);

                                        expect(file.length).to.equal(1);

                                        var backup = storage[tracker.backup_file].split('\n');
                                        expect(backup.length).to.equal(2);
                                    });
                                });
                            });
                        });
                    });
                });
            });
        });
    });
});


text:
package org.apache.hadoop.hbase.regionserver.idx.support;

/**
 * An interface for callback with a given argument type.
 *
 * @param <T> the argument type
 */
public interface Callback<T> {

    /**
     * Call this callback with the given argument
     *
     * @param arg the argument to use
     */
    void call(T arg);
}


text:
package org.eclipse.bpel.extensionssample.ui;

import java.net.MalformedURLException;
import java.net.URL;

import org.eclipse.bpel.extensionsample.model.ModelPackage;
import org.eclipse.bpel.extensionssample.ui.factories.ExtensionSampleUIAdapterFactory;
import org.eclipse.bpel.ui.util.BPELUtil;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

/**
 * The activator class controls the plug-in life cycle
 */
public class Activator extends AbstractUIPlugin {

	// The plug-in ID
	public static final String PLUGIN_ID = "org.eclipse.bpel.extensionssample.ui";

	// The shared instance
	private static Activator plugin;

	/**
	 * The constructor
	 */
	public Activator() {
		BPELUtil.registerAdapterFactory(ModelPackage.eINSTANCE, ExtensionSampleUIAdapterFactory.getInstance());
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
	 */
	public void start(BundleContext context) throws Exception {
		super.start(context);
		plugin = this;
	}

	/*
	 * (non-Javadoc)
	 * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
	 */
	public void stop(BundleContext context) throws Exception {
		plugin = null;
		super.stop(context);
	}

	/**
	 * Returns the shared instance
	 *
	 * @return the shared instance
	 */
	public static Activator getDefault() {
		return plugin;
	}

	@Override
	protected void initializeImageRegistry(ImageRegistry reg) {
		URL baseURL = getBundle().getEntry("/");
		createImageDescriptor(ExtensionSampleUIConstants.DEFAULT_ICON_16, baseURL);
		createImageDescriptor(ExtensionSampleUIConstants.DEFAULT_ICON_32, baseURL);
	}

	private void createImageDescriptor(String id, URL baseURL) {
		URL url = null;
		try {
			url = new URL(baseURL, "icons/" + id);
		} catch (MalformedURLException e) {
			getLog().log(new Status(IStatus.ERROR, PLUGIN_ID, e.getLocalizedMessage()));
		}
		ImageDescriptor descriptor = ImageDescriptor.createFromURL(url);
		getImageRegistry().put(id, descriptor);
	}

	public ImageDescriptor getImageDescriptor(String key) {
		return getImageRegistry().getDescriptor(key);
	}

}


text:
		Powered By indigo

		<%- locale(req, 'common.copyright', new Date().getFullYear()) %>


text:
package com.daeliin.components.cms.event;

import com.daeliin.components.persistence.resource.repository.ResourceRepository;
import org.junit.Test;

import static org.assertj.core.api.Assertions.assertThat;

public final class EventLogRepositoryTest {

    @Test
    public void shouldExtendResourceRepository() {
        assertThat(EventLogRepository.class.getSuperclass().getClass()).isEqualTo(ResourceRepository.class.getClass());
    }
}


text:
(scroll down for [English](#english))

Polski
------

**veCustomSearch** to plugin do edytora wizualnego (*VisualEditor*) Wikipedii. Umożliwia wstawianie zapamiętanych reguł w polach wyszukiwania i zamiany.

### Domyślne reguły ###

Domyślnie zawiera reguły do:

1. Poprawiania cudzysłowów na polskie.
2. Poprawiania spacji wokół znaków przestankowych (np. "abc , def" zamieni na "abc, def").

Reguły mogą nie być idealne, ale znalezione fragmenty są podświetlane na zielono co powinno ułatwić decyzję, czy wykonać zmiany czy nie.

### Sposób użycia ###

Na razie plugin jest w fazie alfa/beta. Docelowo za pewne będzie w Gadżetach.

* `veCustomSearch.loader.js` -- to przykładowy kod, który należy wstawić do swojego vector.js. Ważne! W przykładowym kodzie należy zmienić odpowiednio URL.
* `veCustomSearch.plugin.js` -- to kod pluginu, który należy wstawić do swojej przestrzeni nazw. Do tego ma prowadzić wspomniany URL.

### Budowanie projektu ###

#### Instalacja webpack ####

Do zbudowania projektu potrzebny jest `webpack`. Można go zainstalować z npm:
```bash
npm install webpack -g
```

Teraz możesz zrobić `checkout` tego repozytorium (a najlepiej jego forka)...

**...ale w systemie Windows** możesz napotkać na parę drobnych problemów:

1. Folder, w którym będziesz budować, nie może zawierać znaków specjalnych (w szczególności `!`, `(`, `)`).
2. Folder ten nie może być także łączem typu NTFS Junction, czy innym symlinkiem.
3. Musisz mieć ustawioną zmienną środowiskową `NODE_PATH`. Na Windows 7 i nowszych wystarczy odpalić `setx NODE_PATH %AppData%\npm\node_modules`. Może być konieczny restart, żeby wszystkie programy załapały nową zmienną.

#### Budowanie ####

Żeby zbudować wystarczy odpalić jedno polecenie:
```bash
webpack
```
To przetworzy pliki i utworzy nową wersję `veCustomSearch.plugin.js`.

Przy dłuższej pracy warto włączyć śledzenie zmian w plikach:
```bash
webpack --watch
```

English
-------

**veCustomSearch** is a plugin for the VisualEditor of Wikipedia. It allows to restore some search-replace rules in the search form.

### Default rules ###

Default rules are might currently be specific to Polish language, but it should be fairly easy to replace them (they are in `rules.js`).

### Usage ###

For now I consider this plugin alfa or maybe beta quality.

* `veCustomSearch.loader.js` -- this is an example code which you need to put in your `vector.js`. Note! Example code contains a plugin URL which you need to change appropriately.
* `veCustomSearch.plugin.js` -- this is a pre-compiled code of this plugin. This need to go somewhere in your user namespace. The URL from modified loader snippet need to point to this.

### Building this project ###

#### The webpack installation ####

You will need `webpack` to build this project. You can install it straight from npm:
```bash
npm install webpack -g
```

Now you can `checkout` this repository (or preferably it's fork)...

**...but when on Windows** you might stumble upon some quirks:

1. The folder in which you run the build must not contain any special characters (`!`, `(`, `)` in particular).
2. The folder also cannot be an NTFS Junction or any other symlink.
3. Additional `NODE_PATH` variable might be required. On Windows 7 and later you can simply run `setx NODE_PATH %AppData%\npm\node_modules`. A reboot might be required so that all programs see the new environment variable.

#### Running build ####

To build the project you can simply run:
```bash
webpack
```
This will compile all source files into `veCustomSearch.plugin.js`.

When you plan to make more changes you can start a watch process like so:
```bash
webpack --watch
```


text:
<?php
/////////////////////////////////////////////////////////////////////////////////////
// xbtit - Bittorrent tracker/frontend
//
// Copyright (C) 2004 - 2015  Btiteam
//
//    This file is part of xbtit DT FM.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
//   1. Redistributions of source code must retain the above copyright notice,
//      this list of conditions and the following disclaimer.
//   2. Redistributions in binary form must reproduce the above copyright notice,
//      this list of conditions and the following disclaimer in the documentation
//      and/or other materials provided with the distribution.
//   3. The name of the author may not be used to endorse or promote products
//      derived from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
// IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
// TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
// LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
// NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
// EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
////////////////////////////////////////////////////////////////////////////////////

class poll {
  var $ID;
  var $pollerTitle;
  var $table_prefix;

  function poll() {
    global $TABLE_PREFIX;
    $this->ID='';
    $this->pollerTitle='';
    $this->table_prefix=$TABLE_PREFIX;
  }

  function setId($id) {
    $this->ID=$id;
  }

  function getDataById($id) {
    $res = do_sqlquery("select * from {$this->table_prefix}poller where ID='$id'");
    if($inf = mysqli_fetch_array($res)) {
      $this->ID = $inf['ID'];
      $this->pollerTitle = $inf['pollerTitle'];
      $this->active = $inf['active'];
    }
  }

  /* This method returns poller options as an associative array */
  function getOptionsAsArray() {
    $retArray = array();
    $res = do_sqlquery("select * from {$this->table_prefix}poller_option where pollerID='".$this->ID."' order by pollerOrder");
    while($inf = mysqli_fetch_array($res))
      $retArray[$inf['ID']] = array($inf['optionText'],$inf['pollerOrder']);
    return $retArray;
  }

  /* This method returns number of votes as an associative array */
  function getVotesAsArray() {
    $retArray = array();
    $res = do_sqlquery("select v.optionID,count(v.ID) as countVotes from {$this->table_prefix}poller_vote v,{$this->table_prefix}poller_option o where v.optionID = o.ID and o.pollerID = '".$this->ID."' group by v.optionID");
    while($inf = mysqli_fetch_array($res))
      $retArray[$inf['optionID']] = $inf['countVotes'];
    return $retArray;
  }

  /* Create new poller and return ID of new poller */
  function createNewPoller($pollerTitle,$userid,$active) {
    global $db,$DBDT;

    $pollerTitle=mysqli_real_escape_string($DBDT,$pollerTitle);

    if ($active == 'yes') {
      quickQuery("UPDATE {$this->table_prefix}poller SET active='no', endDate=UNIX_TIMESTAMP() WHERE poller.active='yes'");
      quickQuery("insert into {$this->table_prefix}poller(pollerTitle,starterID,active,startDate)values('$pollerTitle','$userid','yes',UNIX_TIMESTAMP())") or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
    } elseif  ($active == 'no')
      quickQuery("insert into {$this->table_prefix}poller(pollerTitle,endDate,starterID,active,startDate)values('$pollerTitle',UNIX_TIMESTAMP(),'$userid','no',UNIX_TIMESTAMP())") or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));

    $this->ID=((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res);
    return $this->ID;
  }

  /* Add poller options */
  function addPollerOption($optionText,$pollerOrder) {
   global $DBDT;
     $optionText=mysqli_real_escape_string($DBDT,$optionText);
     quickQuery("insert into {$this->table_prefix}poller_option(pollerID,optionText,pollerOrder)values('".$this->ID."','".$optionText."','".$pollerOrder."')") or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));

    return ((is_null($___mysqli_res = mysqli_insert_id($GLOBALS["___mysqli_ston"]))) ? false : $___mysqli_res);
  }

  /* Delete a poll, options in the poll and votes */
  function deletePoll($pollId) {
    quickQuery("delete from {$this->table_prefix}poller where ID='$pollId'");
    $res = do_sqlquery("select * from {$this->table_prefix}poller_option where pollerID='".$pollId."'");
    while($inf = mysqli_fetch_array($res)) {
      quickQuery("delete from {$this->table_prefix}poller_vote where optionID='".$inf['ID']."'");
      quickQuery("delete from {$this->table_prefix}poller_option where ID='".$inf['ID']."'");
    }
  }

  /* Updating poll title */
  function setPollerTitle($pollerTitle) {
   global $DBDT;
  $pollerTitle=mysqli_real_escape_string($DBDT,$pollerTitle);
    quickQuery("update {$this->table_prefix}poller set pollerTitle='$pollerTitle' where ID='".$this->ID."'");
  }

  function setPollerActive($pollerActive) {
    if ($pollerActive == 'yes')
      quickQuery("UPDATE {$this->table_prefix}poller SET endDate=UNIX_TIMESTAMP(), active='no' WHERE poller.active='yes'");
    quickQuery("UPDATE {$this->table_prefix}poller SET endDate='0', active='$pollerActive' WHERE ID='".$this->ID."'");
  }

  /* Update option label */
  function setOptionData($newText,$order,$optionId) {
   global $DBDT;
   $newText=mysqli_real_escape_string($DBDT,$newText);
    quickQuery("update {$this->table_prefix}poller_option set optionText='".$newText."',pollerOrder='$order' where ID='".$optionId."'");
  }

  /* Get position of the last option, i.e. to append a new option at the bottom of the list */
  function getMaxOptionOrder() {
    $res = do_sqlquery("select max(pollerOrder) as maxOrder from {$this->table_prefix}poller_option where pollerID='".$this->ID."'") or die(((is_object($GLOBALS["___mysqli_ston"])) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)));
    if($inf = mysqli_fetch_array($res))
      return $inf['maxOrder'];
    return 0;
  }
}
?>