text:
using System;

namespace com.googlecode.lanterna
{
	///
	/// A 2-d position in 'terminal space'. Please note that the coordinates are 0-indexed, meaning 0x0 is the top left
	/// corner of the terminal. This object is immutable so you cannot change it after it has been created. Instead, you
	/// can easily create modified 'clones' by using the 'with' methods.
	///
	/// @author Martin
	///
	public class TerminalPosition : IComparable<TerminalPosition>
	{

		///
		/// Constant for the top-left corner (0x0)
		///
		public static readonly TerminalPosition TOP_LEFT_CORNER = new TerminalPosition(0, 0);
		///
		/// Constant for the 1x1 position (one offset in both directions from top-left)
		///
		public static readonly TerminalPosition OFFSET_1x1 = new TerminalPosition(1, 1);

		private readonly int row;
		private readonly int column;

		///
		/// Creates a new TerminalPosition object, which represents a location on the screen. There is no check to verify
		/// that the position you specified is within the size of the current terminal and you can specify negative positions
		/// as well.
		///
		/// <param name="column"> Column of the location, or the "x" coordinate, zero indexed (the first column is 0) </param>
		/// <param name="row"> Row of the location, or the "y" coordinate, zero indexed (the first row is 0) </param>
		public TerminalPosition(int column, int row)
		{
			this.row = row;
			this.column = column;
		}

		///
		/// Returns the index of the column this position is representing, zero indexed (the first column has index 0).
		/// <returns> Index of the column this position has </returns>
		public virtual int Column
		{
			get
			{
				return column;
			}
		}

		///
		/// Returns the index of the row this position is representing, zero indexed (the first row has index 0)
		/// <returns> Index of the row this position has </returns>
		public virtual int Row
		{
			get
			{
				return row;
			}
		}

		///
		/// Creates a new TerminalPosition object representing a position with the same column index as this but with a
		/// supplied row index.
		/// <param name="row"> Index of the row for the new position </param>
		/// <returns> A TerminalPosition object with the same column as this but with a specified row index </returns>
		public virtual TerminalPosition withRow(int row)
		{
			if (row == 0 && this.column == 0)
			{
				return TOP_LEFT_CORNER;
			}
			return new TerminalPosition(this.column, row);
		}

		///
		/// Creates a new TerminalPosition object representing a position with the same row index as this but with a
		/// supplied column index.
		/// <param name="column"> Index of the column for the new position </param>
		/// <returns> A TerminalPosition object with the same row as this but with a specified column index </returns>
		public virtual TerminalPosition withColumn(int column)
		{
			if (column == 0 && this.row == 0)
			{
				return TOP_LEFT_CORNER;
			}
			return new TerminalPosition(column, this.row);
		}

		///
		/// Creates a new TerminalPosition object representing a position on the same row, but with a column offset by a
		/// supplied value. Calling this method with delta 0 will return this, calling it with a positive delta will return
		/// a terminal position delta number of columns to the right and for negative numbers the same to the left.
		/// <param name="delta"> Column offset </param>
		/// <returns> New terminal position based off this one but with an applied offset </returns>
		public virtual TerminalPosition withRelativeColumn(int delta)
		{
			if (delta == 0)
			{
				return this;
			}
			return withColumn(column + delta);
		}

		///
		/// Creates a new TerminalPosition object representing a position on the same column, but with a row offset by a
		/// supplied value. Calling this method with delta 0 will return this, calling it with a positive delta will return
		/// a terminal position delta number of rows to the down and for negative numbers the same up.
		/// <param name="delta"> Row offset </param>
		/// <returns> New terminal position based off this one but with an applied offset </returns>
		public virtual TerminalPosition withRelativeRow(int delta)
		{
			if (delta == 0)
			{
				return this;
			}
			return withRow(row + delta);
		}

		///
		/// Creates a new TerminalPosition object that is 'translated' by an amount of rows and columns specified by another
		/// TerminalPosition. Same as calling
		/// withRelativeRow(translate.getRow()).withRelativeColumn(translate.getColumn())
		/// <param name="translate"> How many columns and rows to translate </param>
		/// <returns> New TerminalPosition that is the result of the original with added translation </returns>
		public virtual TerminalPosition withRelative(TerminalPosition translate)
		{
			return withRelative(translate.Column, translate.Row);
		}

		///
		/// Creates a new TerminalPosition object that is 'translated' by an amount of rows and columns specified by the two
		/// parameters. Same as calling
		/// withRelativeRow(deltaRow).withRelativeColumn(deltaColumn)
		/// <param name="deltaColumn"> How many columns to move from the current position in the new TerminalPosition </param>
		/// <param name="deltaRow"> How many rows to move from the current position in the new TerminalPosition </param>
		/// <returns> New TerminalPosition that is the result of the original position with added translation </returns>
		public virtual TerminalPosition withRelative(int deltaColumn, int deltaRow)
		{
			return withRelativeRow(deltaRow).withRelativeColumn(deltaColumn);
		}

		public virtual int CompareTo(TerminalPosition o)
		{
			if (row < o.row)
			{
				return -1;
			}
			else if (row == o.row)
			{
				if (column < o.column)
				{
					return -1;
				}
				else if (column == o.column)
				{
					return 0;
				}
			}
			return 1;
		}

		public override string ToString()
		{
			return "[" + column + ":" + row + "]";
		}

		public override int GetHashCode()
		{
			int hash = 3;
			hash = 23 * hash + this.row;
			hash = 23 * hash + this.column;
			return hash;
		}

		public virtual bool Equals(int columnIndex, int rowIndex)
		{
			return this.column == columnIndex && this.row == rowIndex;
		}

		public override bool Equals(object obj)
		{
			if (obj == null)
			{
				return false;
			}
			if (this.GetType() != obj.GetType())
			{
				return false;
			}
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final TerminalPosition other = (TerminalPosition) obj;
			TerminalPosition other = (TerminalPosition) obj;
			return this.row == other.row && this.column == other.column;
		}
	}

}


text:
package elasticbeanstalk

import (
	"github.com/dragonfax/aws-sdk-go/internal/features/shared"
	"github.com/dragonfax/aws-sdk-go/service/elasticbeanstalk"
	. "github.com/lsegal/gucumber"
)

var _ = shared.Imported

func init() {
	Before("@elasticbeanstalk", func() {
		World["client"] = elasticbeanstalk.New(nil)
	})
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace AppBundle\DependencyInjection\EventsLogService;

use AppBundle\Entity\EventsLog;
use AppBundle\Entity\File;
use AppBundle\Entity\Visitor;
use Doctrine\ORM\EntityManager;

/**
 * Class EventsLogService
 * @package AppBundle\DependencyInjection\ExportService
 */
class EventsLogService
{

    const EDIT_EVENT = 'edit';
    const CREATE_EVENT = 'create';

    /** @var  EntityManager */
    private $entityManager;

    public function __construct(EntityManager $entityManager)
    {
        $this->entityManager = $entityManager;
    }

    /**
     * @param $d2visitorId
     * @param $userId
     * @param Visitor $visitorOld
     * @param $eventType
     */
    public function saveEvent2DB($d2visitorId,$userId,$visitorOld=null,$eventType){
        $eventsLog = new EventsLog();
        $eventsLog->setD2visitorId($d2visitorId);
        $eventsLog->setUserId($userId);
        $eventsLog->setDate(new \DateTime(date('Y-m-d H:i:s')));
        $eventsLog->setEventType($eventType);
        if($visitorOld){
            /** @var File $file */
            $file = $this->entityManager->getRepository('AppBundle:File')->find($visitorOld->getTypeFileId());
            $visitorOld->setTypeFileId($file->getNumber());
            $eventsLog->setObject($visitorOld);
        }else{
            $eventsLog->setObject($this->getVisitorObject($d2visitorId));
        }

        $this->entityManager->persist($eventsLog);
        $this->entityManager->flush($eventsLog);
    }

    private function getVisitorObject($d2visitorId){
       $visitorData =  $this->entityManager->getRepository('AppBundle:Design2Visitor')->searchById($d2visitorId);
        /** @var Visitor $visitor */
       $visitor = array_shift($visitorData[0]);
       $fNumber = array_shift($visitorData[0]);
       $visitor->setTypeFileId($fNumber);
       return $visitor;
    }

}


text:
var assetline = angular.module('assetline', [
  'ngRoute'
]);

assetline.config(function($routeProvider){
  $routeProvider
  .when('/', {
    templateUrl: 'partials/popular',
    controller: 'popularCtrl'
  })
  .when('/new', {
    templateUrl: 'partials/new_package',
    controller: 'newPackageCtrl'
  })
  .when('/new_lib', {
    templateUrl: 'partials/new_lib',
    controller: 'newLibCtrl'
  });
});

assetline.factory('Packages', function(){
  var packagesService = {};
  packagesService.list = []

  return packagesService;
});

assetline.controller('popularCtrl', function($scope, $http, Packages){
  $scope.query;

  $http.get('/packages').success(function(data){
    Packages.list = data.packages;
    $scope.packages = data.packages;
  });

  $scope.namesForPackage = function(pack){
    var names = [];
    angular.forEach(pack.libs, function(lib){
      if(lib.version) {
        names.push(lib.name + '#' + lib.version);
      }
      else
        names.push(lib.name);
    });
    return names.join(', ');
  };
});

assetline.controller('newLibCtrl', function($scope, $http){
  $scope.newLib = {};
  $scope.types = ['JS', 'CSS'];
  $scope.editLib;

  $http.get('/libs').success(function(data){
    $scope.libs = data.libs;
  });

  $scope.submit = function(){
    $http.post('/libs', $scope.newLib).success(function(data){
      $scope.lib = data.lib;
      $scope.libs.push(data.lib);
      $scope.newLib = {};
    });
  };

  $scope.delete = function(lib){
    $http.delete('/libs/' + lib._id);
    $scope.libs = $scope.libs.filter(function(item){
      return item._id !== lib._id;
    });
  };

  $scope.edit = function(lib){
    $scope.editLib = angular.copy(lib);
  };

  $scope.cancelEdit = function(){
    $scope.editLib = null;
    $scope.original = null;
  };

  $scope.update = function(lib){
    $http.put('/libs/' + lib._id, lib).success(function(data){
      $scope.cancelEdit();
    });
  };
});

assetline.controller('newPackageCtrl', function($rootScope, $scope, $http, Packages){
  $scope.libs = [];

  $http.get('/libs').success(function(data){
    $scope.libs = data.libs;
  });

  $scope.create = function(){
    var package = {
      libs: $scope.selectedLibs()
    };

    $scope.queryLib = '';

    $http.post('/packages', package).success(function(data){
      $rootScope.$broadcast('packaged-created');
      Packages.list.push(data);
    }).error(function(err){
      alert(err);
    });

    $rootScope.$broadcast('packaged-pushed');

    $scope.unselectPreviousLibs();
  };

  $scope.selectedLibs = function(){
    return $scope.libs.filter(function(lib) {
      return lib.selected;
    });
  };

  $scope.unselectPreviousLibs = function(){
    angular.forEach($scope.selectedLibs(), function(lib) {
      return lib.selected = false;
    });
  };
});

assetline.filter('startFrom', function() {
  return function(input, start) {
    if(input) {
      start = +start; //parse to int
      return input.slice(start);
    };
    return [];
  };
});

assetline.filter('withHost', function($location) {
  return function(input) {
    var absUrl = $location.absUrl().replace(/\/\#\/$/, '');
    return absUrl + '/' + input;
  };
});

assetline.directive('pleaseWaitDialog', function($rootScope){
  return {
    restrict: 'E',
    replace: true,
    templateUrl: '/partials/loading',
    link: function(scope, elm){
      $rootScope.$on('packaged-pushed', function(){
        elm.modal();
      });

      $rootScope.$on('packaged-created', function(){
        elm.modal('hide');
      });
    }
  };
});

assetline.directive('packageCreationModal', function(){
  return {
    restrict: 'E',
    replace: true,
    templateUrl: '/partials/new_package',
    link: function(scope, elm){
      $('#myModal').on('shown.bs.modal', function () {
        $('.search-input.form-control').focus();
      });

      $('#myModal').on('hidden.bs.modal', function () {
        scope.$apply(function(){
          scope.queryLib = '';
        });
      });
    },
    controller: function($scope){
      $scope.currentPage = 0;
      $scope.pageSize = 10;
      $scope.maxSize = 5;

      $scope.$watch('queryLib', function(){
        $scope.currentPage = 0;
        $scope.numberOfPages();
      });

      $scope.numberOfPages = function() {
        if(!$scope.filtered)
          return 0;
        return Math.ceil($scope.filtered.length/$scope.pageSize);
      };

      $scope.goBackOnePage = function() {
        if ($scope.currentPage > 0) {
          $scope.currentPage--;
        };
      };

      $scope.goForwardOnePage = function() {
        if ($scope.currentPage + 1 < $scope.numberOfPages()) {
          $scope.currentPage++;
        };
      };

      $scope.isFirstPage = function() {
        return ($scope.currentPage === 0);
      };

      $scope.isLastPage = function() {
        return ($scope.currentPage === $scope.numberOfPages() - 1);
      };

      $scope.advancePageInSteps = function(steps) {
        $scope.currentPage += steps;
      };

      $scope.goToPage = function(page) {
        if(page == 'first') {
          $scope.currentPage = 0;
        }
        if(page == 'last') {
          $scope.currentPage = $scope.numberOfPages() - 1;
        }
      };
    }
  };
});

assetline.directive('copyToClipboard', function($compile){
  var copiedNotificationTpl = angular.element('
' +
    '<button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button>' +
    'The package url is in your clipboard. Happy Hacking!' +
  '
');

  var notificationElm;

  return {
    restrict: 'E',
    replace: true,
    scope: {
      value: '@text'
    },
    template: '<button class="copy-button btn btn-primary"' +
      'data-clipboard-text="{{value}}"' +
      'data-copied-hint="copied!"' +
      'title="copy to clipboard">' +
      'Copy Url' +
    '</button>',
    controller: function($scope){
      notificationElm = $compile(copiedNotificationTpl)($scope);
      $('body').prepend(notificationElm);
    },
    link: function(scope, elm){
      var clip = new ZeroClipboard(
        elm, {moviePath: "/js/ZeroClipboard.swf"}
      );

      var hideNotification = function(){
        notificationElm.removeClass('in');
      };

      clip.on('load', function(client){
        client.on('complete', function(client, args){
          notificationElm.addClass('in');
          setTimeout(hideNotification, 2000);
        });
      });
    }
  };
});


text:
<?php

namespace WordFilter;

class WordFilter
{
    public static $badWordsFile = "badwords.json";

    public $regEx;
    public $words = array();

    public static function create($wordsFile = "badwords.json")
    {
        $words = @file_get_contents(__DIR__ . "/{$wordsFile}");
        if ($words === false) {
            $words = "[]";
        }
        $words = json_decode($words, true);

        return new Static($words);
    }

    // pass in array of words
    public function __construct($wordlist)
    {
        if (is_array($wordlist)) {
            $this->words = $wordlist;
        }
        $this->rebuildRegex();
    }

    public function rebuildRegex()
    {
        $this->regEx = '/' . strtolower(implode('|', $this->words)) . '/';
    }

    public function blacklisted($string)
    {
        return !!preg_match($this->regEx, $string);
    }

    public function addWords($words)
    {
        $this->words = array_keys(
            array_merge(
                array_flip($words),
                array_flip($this->words)
            )
        );
        $this->rebuildRegex();
    }

    public function removeWord($word)
    {
        $wordLookup = array_flip($this->words);
        if (isset($wordLookup[$word])) {
            unset($wordLookup[$word]);
            $this->words = array_keys($wordLookup);
            $this->rebuildRegex();
        }
    }

    public function clearList()
    {
        $this->words = array();
        $this->rebuildRegex();
    }
}


text:
				<select id="ddljobtypes">
					<option value="0" selected="">All Job types</option>
				</select>

				<select id="ddlemployees">
					<option value="0" selected="">All Employees</option>
				</select>

			<input class="form-control" placeholder="Select Date " type="text"
				 >