text:
package api

import (
	"testing"

	"github.com/cilium/cilium/pkg/policy/api/kafka"

	. "gopkg.in/check.v1"
)

// Hook up gocheck into the "go test" runner.
func Test(t *testing.T) {
	TestingT(t)
}

type PolicyAPITestSuite struct{}

var _ = Suite(&PolicyAPITestSuite{})

func (s *PolicyAPITestSuite) TestHTTPEqual(c *C) {
	rule1 := PortRuleHTTP{Path: "/foo$", Method: "GET", Headers: []string{"X-Test: Foo"}}
	rule2 := PortRuleHTTP{Path: "/bar$", Method: "GET", Headers: []string{"X-Test: Foo"}}
	rule3 := PortRuleHTTP{Path: "/foo$", Method: "GET", Headers: []string{"X-Test: Bar"}}

	c.Assert(rule1.Equal(rule1), Equals, true)
	c.Assert(rule1.Equal(rule2), Equals, false)
	c.Assert(rule1.Equal(rule3), Equals, false)

	rules := L7Rules{
		HTTP: []PortRuleHTTP{rule1, rule2},
	}

	c.Assert(rule1.Exists(rules), Equals, true)
	c.Assert(rule2.Exists(rules), Equals, true)
	c.Assert(rule3.Exists(rules), Equals, false)
}

func (s *PolicyAPITestSuite) TestKafkaEqual(c *C) {
	rule1 := kafka.PortRule{APIVersion: "1", APIKey: "foo", Topic: "topic1"}
	rule2 := kafka.PortRule{APIVersion: "1", APIKey: "bar", Topic: "topic1"}
	rule3 := kafka.PortRule{APIVersion: "1", APIKey: "foo", Topic: "topic2"}

	c.Assert(rule1, Equals, rule1)
	c.Assert(rule1, Not(Equals), rule2)
	c.Assert(rule1, Not(Equals), rule3)

	rules := L7Rules{
		Kafka: []kafka.PortRule{rule1, rule2},
	}

	c.Assert(rule1.Exists(rules.Kafka), Equals, true)
	c.Assert(rule2.Exists(rules.Kafka), Equals, true)
	c.Assert(rule3.Exists(rules.Kafka), Equals, false)
}

func (s *PolicyAPITestSuite) TestL7Equal(c *C) {
	rule1 := PortRuleL7{"Path": "/foo$", "Method": "GET"}
	rule2 := PortRuleL7{"Path": "/bar$", "Method": "GET"}
	rule3 := PortRuleL7{"Path": "/foo$", "Method": "GET", "extra": ""}

	c.Assert(rule1.Equal(rule1), Equals, true)
	c.Assert(rule2.Equal(rule2), Equals, true)
	c.Assert(rule3.Equal(rule3), Equals, true)
	c.Assert(rule1.Equal(rule2), Equals, false)
	c.Assert(rule2.Equal(rule1), Equals, false)
	c.Assert(rule1.Equal(rule3), Equals, false)
	c.Assert(rule3.Equal(rule1), Equals, false)
	c.Assert(rule2.Equal(rule3), Equals, false)
	c.Assert(rule3.Equal(rule2), Equals, false)

	rules := L7Rules{
		L7Proto: "testing",
		L7:      []PortRuleL7{rule1, rule2},
	}

	c.Assert(rule1.Exists(rules), Equals, true)
	c.Assert(rule2.Exists(rules), Equals, true)
	c.Assert(rule3.Exists(rules), Equals, false)
}

func (s *PolicyAPITestSuite) TestValidateL4Proto(c *C) {
	c.Assert(L4Proto("TCP").Validate(), IsNil)
	c.Assert(L4Proto("UDP").Validate(), IsNil)
	c.Assert(L4Proto("ANY").Validate(), IsNil)
	c.Assert(L4Proto("TCP2").Validate(), Not(IsNil))
	c.Assert(L4Proto("t").Validate(), Not(IsNil))
}

func (s *PolicyAPITestSuite) TestParseL4Proto(c *C) {
	p, err := ParseL4Proto("tcp")
	c.Assert(p, Equals, ProtoTCP)
	c.Assert(err, IsNil)

	p, err = ParseL4Proto("Any")
	c.Assert(p, Equals, ProtoAny)
	c.Assert(err, IsNil)

	p, err = ParseL4Proto("")
	c.Assert(p, Equals, ProtoAny)
	c.Assert(err, IsNil)

	_, err = ParseL4Proto("foo2")
	c.Assert(err, Not(IsNil))
}


text:
DROP TABLE IF EXISTS products CASCADE;
DROP INDEX IF EXISTS idx_products_name;

redpajama_set_name: RedPajamaGithub


text:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CustomAuthenticationMvc.Helper;
using Microsoft.Web.Infrastructure.DynamicModuleHelper;

[assembly: PreApplicationStartMethod(typeof(SuppressFormsAuthenticationRedirectModule), "Register")]

namespace CustomAuthenticationMvc.Helper
{
    /// <summary>
    /// Prevents Forms Authentication Login Page Redirect for AJAX requests:
    /// http://haacked.com/archive/2011/10/04/prevent-forms-authentication-login-page-redirect-when-you-donrsquot-want.aspx
    /// </summary>
    public class SuppressFormsAuthenticationRedirectModule : IHttpModule
    {
        private static readonly object SuppressAuthenticationKey = new Object();

        public static void SuppressAuthenticationRedirect(HttpContext context)
        {
            context.Items[SuppressAuthenticationKey] = true;
        }

        public static void SuppressAuthenticationRedirect(HttpContextBase context)
        {
            context.Items[SuppressAuthenticationKey] = true;
        }

        public void Init(HttpApplication context)
        {
            context.PostReleaseRequestState += OnPostReleaseRequestState;
            context.EndRequest += OnEndRequest;
        }

        private void OnPostReleaseRequestState(object source, EventArgs args)
        {
            var context = (HttpApplication)source;
            var response = context.Response;
            var request = context.Request;

            if (response.StatusCode == 401 && (request.Headers["X-Requested-With"] == "XMLHttpRequest"
                || (request.AcceptTypes != null && request.AcceptTypes.Any(t => string.Compare(t, "application/json", true) == 0)))
            )
            {
                SuppressAuthenticationRedirect(context.Context);
            }
        }

        private void OnEndRequest(object source, EventArgs args)
        {
            var context = (HttpApplication)source;
            var response = context.Response;

            if (context.Context.Items.Contains(SuppressAuthenticationKey))
            {
                response.TrySkipIisCustomErrors = true;
                response.ClearContent();
                response.StatusCode = 401;
                response.RedirectLocation = null;
            }
        }

        public void Dispose()
        {
        }

        public static void Register()
        {
            DynamicModuleUtility.RegisterModule(
              typeof(SuppressFormsAuthenticationRedirectModule));
        }
    }
}


text:
package JDescriptors.fr.lip6.bof;
import java.io.Serializable;
import java.util.ArrayList;

public class DistanceCenters implements Serializable{
	/**
	 *
	 */
	private static final long serialVersionUID = 4787841838982732835L;
	public ArrayList<Integer> list;
    public ArrayList<Double> dist;

    /**
	 * @param list
	 * @param dist
	 */
	public DistanceCenters(ArrayList<Integer> l , ArrayList<Double> d) {

		this.list = l;
		this.dist = d;
	}

}


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

using FluentAutomation.Interfaces;

namespace FluentAutomation
{
    public class WbTstrTextAppendSyntaxProvider : ITextAppendSyntaxProvider
    {
        private readonly IActionSyntaxProvider _actionSyntaxProvider;
        private readonly ITextAppendSyntaxProvider _textAppendSyntaxProvider;
        private readonly ILogger _logger;

        internal WbTstrTextAppendSyntaxProvider(WbTstrActionSyntaxProvider actionSyntaxProvider, ITextAppendSyntaxProvider textAppendSyntaxProvider, ILogger logger)
        {
            _actionSyntaxProvider = actionSyntaxProvider;
            _textAppendSyntaxProvider = textAppendSyntaxProvider;
            _logger = logger;
        }

        /*-------------------------------------------------------------------*/

        public bool IsInDryRunMode
        {
            get
            {
                return FluentSettings.Current.IsDryRun;
            }
        }

        /*-------------------------------------------------------------------*/

        public ITextAppendSyntaxProvider WithoutEvents()
        {
            // Before
            _logger.LogMessage("Disable firing of key events.");

            // Execute
            if (!IsInDryRunMode)
            {
                _textAppendSyntaxProvider.WithoutEvents();
            }

            // After
            return this;
        }

        public IActionSyntaxProvider To(string selector)
        {
            return To(_actionSyntaxProvider.Find(selector));
        }

        public IActionSyntaxProvider To(ElementProxy element)
        {
            // Before
            string selector = (element != null && element.Element != null) ? element.Element.Selector ?? "?" : "?";
            _logger.LogMessage("Append text to text in element with selector: {0}", selector);

            // Execute
            if (!IsInDryRunMode)
            {
                _textAppendSyntaxProvider.To(element);
            }

            // After
            return _actionSyntaxProvider;
        }
    }
}


text:
from ..abstract_command import AbstractModelCommand

class Command(AbstractModelCommand):
    help = 'Creates new basic identity for existing principal.'

    def add_command_arguments(self, parser):
        principal_parser = parser.add_mutually_exclusive_group(required=True)
        principal_parser.add_argument(
            '--principal-id',
            type=int,
            metavar='0',
            help='Integer identifier to select principal by.')
        principal_parser.add_argument(
            '--principal-uuid',
            type=str,
            metavar='"{00000000-0000-0000-0000-000000000000}"',
            help='UUID to select principal by.')
        principal_parser.add_argument(
            '--principal-email',
            type=str,
            metavar='"johndoe@example.com"',
            help='Email address to select principal by.')
        principal_parser.add_argument(
            '--principal-phone',
            type=str,
            metavar='"+1-541-754-3010"',
            help='Phone number to select principal by.')

        directory_parser = parser.add_mutually_exclusive_group(required=False)
        directory_parser.add_argument(
            '--directory-id',
            type=int,
            metavar='0',
            help='Integer identifier to select principal by.')
        directory_parser.add_argument(
            '--directory-uuid',
            type=str,
            metavar='"{00000000-0000-0000-0000-000000000000}"',
            help='UUID to select principal by.')
        directory_parser.add_argument(
            '--directory-code',
            type=str,
            metavar='"internal"',
            help='Primary contact to select principal by.')

        parser.add_argument(
            '--new-uuid',
            type=str,
            metavar='"{00000000-0000-0000-0000-000000000000}"',
            help='UUID of basic credential.')
        parser.add_argument(
            '--new-username',
            type=str,
            metavar='j.doe',
            required=True,
            help='Unique username.')

    def handle_command(self, *args, **options):
        from ...models import BasicIdentity
        from ...models import BasicIdentityDirectory
        from ...models import Principal
        from uuid import UUID
        from uuid import uuid4

        directory = self.get_object(BasicIdentityDirectory.objects, options, 'directory_', BasicIdentityDirectory.get_auth_directory)
        principal = self.get_object(Principal.objects, options, 'principal_', None)

        basic_identity = BasicIdentity()
        basic_identity.uuid = UUID(options['new_uuid']) if options['new_uuid'] else uuid4()
        basic_identity.principal = principal
        basic_identity.directory = directory
        basic_identity.username = options['new_username'].strip()
        basic_identity.save()

        return basic_identity


text:
#ifndef _CSR_MATRIX_ENVIRONMENT_H_
#define _CSR_MATRIX_ENVIRONMENT_H_

#include <gtest/gtest.h>
#include <clSPARSE.h>

#include "clsparse_environment.h"
#include <boost/numeric/ublas/vector.hpp>
#include <boost/numeric/ublas/matrix_sparse.hpp>
#include <boost/numeric/ublas/io.hpp>
using CLSE = ClSparseEnvironment;

namespace uBLAS = boost::numeric::ublas;

/**
 * @brief The CSREnvironment class will keep the input parameters for tests
 * They are list of paths to matrices in csr format in mtx files.
 */
class CSREnvironment: public ::testing::Environment
{
public:

    // We need this long declaration because index vector need to be cl_int.
    // Also it is more flexible for future use if we will start to play with
    // row_major / column_major or base indexing which is 0 for now.
    using sMatrixType = uBLAS::compressed_matrix<cl_float,  uBLAS::row_major, 0, uBLAS::unbounded_array<clsparseIdx_t> >;
    using dMatrixType = uBLAS::compressed_matrix<cl_double, uBLAS::row_major, 0, uBLAS::unbounded_array<clsparseIdx_t> >;

    explicit CSREnvironment( const std::string& path,
                             cl_double alpha, cl_double beta,
                             cl_command_queue queue,
                             cl_context context,
                             cl_bool read_explicit_zeroes = true ):
                             queue( queue ),
                             context( context )
    {
        file_name = path;
        clsparseStatus read_status = clsparseHeaderfromFile( &n_vals, &n_rows, &n_cols, file_name.c_str( ) );
        if( read_status )
        {
            exit( -3 );
        }

        clsparseInitCsrMatrix( &csrDMatrix );
        csrDMatrix.num_nonzeros = n_vals;
        csrDMatrix.num_rows = n_rows;
        csrDMatrix.num_cols = n_cols;

         //  Load single precision data from file; this API loads straight into GPU memory
        cl_int status;
        csrDMatrix.values = ::clCreateBuffer( context, CL_MEM_READ_ONLY,
                                              csrDMatrix.num_nonzeros * sizeof( cl_double ), NULL, &status );

        csrDMatrix.col_indices = ::clCreateBuffer( context, CL_MEM_READ_ONLY,
            csrDMatrix.num_nonzeros * sizeof( clsparseIdx_t ), NULL, &status);

        csrDMatrix.row_pointer = ::clCreateBuffer( context, CL_MEM_READ_ONLY,
            (csrDMatrix.num_rows + 1) * sizeof( clsparseIdx_t ), NULL, &status);

        clsparseStatus fileError = clsparseDCsrMatrixfromFile( &csrDMatrix, file_name.c_str( ), CLSE::control, read_explicit_zeroes );
        if( fileError != clsparseSuccess )
            throw std::runtime_error( "Could not read matrix market data from disk: " + file_name );

        clsparseCsrMetaCreate( &csrDMatrix, CLSE::control );

        //reassign the new matrix dimensions calculated clsparseCCsrMatrixFromFile to global variables
        n_vals = csrDMatrix.num_nonzeros;
        n_cols = csrDMatrix.num_cols;
        n_rows = csrDMatrix.num_rows;

        //  Download sparse matrix data to host
        //  First, create space on host to hold the data
        ublasDCsr = dMatrixType(n_rows, n_cols, n_vals);

        // This is nasty. Without that call ublasSCsr is not working correctly.
        ublasDCsr.complete_index1_data();

        // copy host matrix arrays to device;
        cl_int copy_status;

        copy_status = clEnqueueReadBuffer( queue, csrDMatrix.values, CL_TRUE, 0,
                                           csrDMatrix.num_nonzeros * sizeof( cl_double ),
                                           ublasDCsr.value_data().begin( ),
                                           0, NULL, NULL );

        copy_status = clEnqueueReadBuffer( queue, csrDMatrix.row_pointer, CL_TRUE, 0,
                                            ( csrDMatrix.num_rows + 1 ) * sizeof( clsparseIdx_t ),
                                            ublasDCsr.index1_data().begin(),
                                            0, NULL, NULL );

        copy_status = clEnqueueReadBuffer( queue, csrDMatrix.col_indices, CL_TRUE, 0,
                                            csrDMatrix.num_nonzeros * sizeof( clsparseIdx_t ),
                                            ublasDCsr.index2_data().begin(),
                                            0, NULL, NULL );

        // Create matrix in float precision on host;
        ublasSCsr = sMatrixType(n_rows, n_cols, n_vals);
        ublasSCsr.complete_index1_data();

        // Create matrix in single precision on device;
        // Init single precision matrix;
        clsparseInitCsrMatrix( &csrSMatrix );

        csrSMatrix.num_nonzeros = csrDMatrix.num_nonzeros;
        csrSMatrix.num_cols = csrDMatrix.num_cols;
        csrSMatrix.num_rows = csrDMatrix.num_rows;

        csrSMatrix.col_indices = csrDMatrix.col_indices;
        ::clRetainMemObject( csrSMatrix.col_indices );

        csrSMatrix.row_pointer = csrDMatrix.row_pointer;
        ::clRetainMemObject( csrSMatrix.row_pointer );

        // Don't use adaptive kernel in double precision yet.
        clsparseCsrMetaCreate( &csrSMatrix, CLSE::control );

        csrSMatrix.values = ::clCreateBuffer( context, CL_MEM_READ_ONLY,
                                              csrSMatrix.num_nonzeros * sizeof( cl_float ), NULL, &status );

        //cl_int cl_status;
        //cl_double* dvals = (cl_double*) ::clEnqueueMapBuffer(queue, csrDMatrix.values, CL_TRUE, CL_MAP_READ, 0, csrDMatrix.num_nonzeros * sizeof(cl_double), 0, nullptr, nullptr, &cl_status);

        // copy the double-precision values over into the single-precision array.
        for (clsparseIdx_t i = 0; i < ublasDCsr.value_data().size(); i++)
            ublasSCsr.value_data()[i] = static_cast<double>(ublasDCsr.value_data()[i]);
        for (clsparseIdx_t i = 0; i < ublasDCsr.index1_data().size(); i++)
            ublasSCsr.index1_data()[i] = static_cast<clsparseIdx_t>(ublasDCsr.index1_data()[i]);
        for (clsparseIdx_t i = 0; i < ublasDCsr.index2_data().size(); i++)
            ublasSCsr.index2_data()[i] = static_cast<clsparseIdx_t>(ublasDCsr.index2_data()[i]);

        // copy the values in single precision on host to single precision matrix container on the device
        copy_status = clEnqueueWriteBuffer( queue, csrSMatrix.values, CL_TRUE, 0,
                                            csrSMatrix.num_nonzeros * sizeof( cl_float ),
                                            ublasSCsr.value_data().begin( ),
                                            0, NULL, NULL);

        if( copy_status )
        {
            TearDown( );
            exit( -5 );
        }

        this->alpha = alpha;
        this->beta = beta;

    }

    void SetUp( )
    {

        // Prepare data to it's default state

    }

    //cleanup
    void TearDown( )
    {

    }

    std::string getFileName()
    {
        return file_name;
    }

    ~CSREnvironment()
    {
        //release buffers;
        ::clReleaseMemObject( csrSMatrix.values );
        ::clReleaseMemObject( csrSMatrix.col_indices );
        ::clReleaseMemObject( csrSMatrix.row_pointer );
        ::clReleaseMemObject( csrDMatrix.values );
        ::clReleaseMemObject( csrDMatrix.col_indices );
        ::clReleaseMemObject( csrDMatrix.row_pointer );
        clsparseCsrMetaDelete( &csrSMatrix );
        clsparseCsrMetaDelete( &csrDMatrix );

        //bring csrSMatrix csrDMatrix to its initial state
        clsparseInitCsrMatrix( &csrSMatrix );
        clsparseInitCsrMatrix( &csrDMatrix );

    }

    static sMatrixType ublasSCsr;
    static dMatrixType ublasDCsr;

    static clsparseIdx_t n_rows, n_cols, n_vals;

    //cl buffers for above matrix definition;

    static clsparseCsrMatrix csrSMatrix;
    static clsparseCsrMatrix csrDMatrix;

    static cl_double alpha, beta;
    static std::string file_name;

private:
    cl_command_queue queue;
    cl_context context;

};

#endif //_CSR_MATRIX_ENVIRONMENT_H_


text:
/*
 * Licensed under MIT (https://github.com/ligoj/ligoj/blob/master/LICENSE)
 */
package org.ligoj.bootstrap.core.validation;

import org.hibernate.validator.parameternameprovider.ParanamerParameterNameProvider;

import com.thoughtworks.paranamer.AdaptiveParanamer;
import com.thoughtworks.paranamer.BytecodeReadingParanamer;
import com.thoughtworks.paranamer.CachingParanamer;
import com.thoughtworks.paranamer.DefaultParanamer;

/**
 * JAX-RS name provider exploiting JAX-RS annotations to give the parameter name. Useful for end-user feedback and
 * validation.
 */
public class JaxRsParameterNameProvider extends ParanamerParameterNameProvider {

	/**
	 * Default constructor using a custom annotation paranamer as first-priority provider.
	 */
	public JaxRsParameterNameProvider() {
		super(new CachingParanamer(new AdaptiveParanamer(new JaxRsAnnotationParanamer(), new DefaultParanamer(), new BytecodeReadingParanamer())));
	}

}


text:
import {ReactiveDict} from 'meteor/reactive-dict';
import {Mongo} from 'meteor/mongo';
import {FlowRouter} from 'meteor/kadira:flow-router';
import {Template} from 'meteor/templating';
import {_} from 'meteor/underscore';
import {Vendors} from '../../api/vendors/vendors.js';
import { Meteor } from 'meteor/meteor';

Template.Vendor_Home_Page.onCreated(function onCreated() {
  this.autorun(() => {
    this.subscribe('Vendors');
  });

  GoogleMaps.ready('map', function (map) {

    Vendors.find().observe({

      added: function (document) {
        var icon = 'http://maps.google.com/mapfiles/ms/icons/red-dot.png';
        if (document._id == Vendors.findOne(FlowRouter.getParam('_id'))._id) {
          icon = 'http://maps.google.com/mapfiles/ms/icons/blue-dot.png';
        }
        var marker = new google.maps.Marker({
          draggable: false,
          animation: google.maps.Animation.DROP,
          position: new google.maps.LatLng(document.latitude, document.longitude),
          title: document.name,
          map: map.instance,
          id: document._id,
          icon: icon
        });

        var name = document.name;
        var description = document.description;

        var contentString =
            '
' + name + '
' +
            '
' + description + '
';

        var infowindow = new google.maps.InfoWindow({
          content: contentString
        });

        marker.addListener('click', function () {
          infowindow.open(map, marker);
        });

      }
    });
  });
});

Template.Vendor_Home_Page.helpers({
  'vendorImage': function () {
    const vendor = Vendors.findOne(FlowRouter.getParam('_id'));
    return vendor.image;
  },

  vendorField(fieldName) {
    const vendor = Vendors.findOne(FlowRouter.getParam('_id'));
    return vendor[fieldName];
  },

  vendorHours(field){
    const vendor = Vendors.findOne(FlowRouter.getParam('_id'));
    return vendor.hours[field];

  },
  VendorsList() {
    return Vendors.find();
  },

  mapOptions: function () {
    if (GoogleMaps.loaded()) {
      const vendor = Vendors.findOne(FlowRouter.getParam('_id'));
      return {
        center: new google.maps.LatLng(vendor.latitude, vendor.longitude),
        zoom: 17
      };
    }
  },
  isOpen(){
    const day = new Date();
    const currHour = day.getHours();
    const currMin = day.getMinutes();
    const weekday = ['sunday', 'monday', 'tuesday', 'wednesday', 'thursday', 'friday', 'saturday'];
    const today = weekday[day.getDay()];//string of current day of week
    const vendor = Vendors.findOne(FlowRouter.getParam('_id'));

    if (day.getDay() == 0 || day.getDay() == 6) return false;
    else {

      let hours = vendor.hours[today].split("-");
      let open = hours[0].split(":");
      let close = hours[1].split(":");

      let openTime = [open[0], open[1].substring(0, 2)];
      let closeTime = [close[0], close[1].substring(0, 2)];
      /* changes times to 24hours */
      if (open[1].substring(2, 4) == 'pm') {
        if(open[0]==12)
          openTime[0] = 12;
        else
          openTime[0] = parseInt(open[0]) + 12;
      }
      if (close[1].substring(2, 4) == 'pm') {
        if(close[0]==12)
          closeTime[0] = 12;
        else
        closeTime[0] = parseInt(close[0]) + 12;
      }
  console.log(closeTime);
      console.log(openTime);
      if (currHour == openTime[0]) {
        if (currMin >= openTime[1])
          return true;
        else return false;
      }
      else
        if (currHour == closeTime[0]) {
          if (currMin >= closeTime[1])
            return false;
          else return true;
        }

        else
          if (currHour > openTime[0] && currHour < closeTime[0])
            return true;
          else return false;
    }
  },
  isFavorite(){
    const vendor = Vendors.findOne(FlowRouter.getParam('_id'));

    const userID = Meteor.userId();
    if( _.contains(vendor['favorite'], userID)){
      return true;
    }
    else return false;

  },
  averageRating(){
    const vendorID=FlowRouter.getParam('_id');
    const vendor = Vendors.findOne(vendorID);
    const numReviews = vendor['reviews'].length-1;
    if(numReviews <1) return 0;
    else {
      var totalRate =0;
      _.each(vendor['reviews'], function(num){
        totalRate = totalRate + num.rating;
      });

      var avgRate = parseInt(Math.round(totalRate / numReviews));
      return avgRate;
    }

  },
  reviewCount(){
    const vendorID=FlowRouter.getParam('_id');
    const vendor = Vendors.findOne(vendorID);
    const numReviews = vendor['reviews'].length-1;
    return numReviews;
  },
  userRating(){
    const vendorID=FlowRouter.getParam('_id');
    const vendor = Vendors.findOne(vendorID);
    const userID = Meteor.userId();

    const userReview =  _.find(vendor['reviews'], function(num){
      return num.user== userID;
    });

    if(userReview != null) return userReview.rating;
    else return 0;

  },

});
Template.Vendor_Home_Page.events({

  'click .update-favorite-button'(event, instance) {
    const vendorID=FlowRouter.getParam('_id');
    const vendor = Vendors.findOne(vendorID);
    const userID = Meteor.userId();
    if( _.contains(vendor['favorite'], userID)){
      vendor['favorite'].pop(userID);
      console.log("removed");
    }
    else vendor['favorite'].push(userID);
    Vendors.update(vendorID, { $set: vendor });
    //return to home page
    FlowRouter.go('Home_Page');
  },

  'click .submit-rating': function (event) {
    event.preventDefault();
    var value = $('.ui.rating').rating('get rating');
    const vendorID=FlowRouter.getParam('_id');
    const vendor = Vendors.findOne(vendorID);
    const userID = Meteor.userId();

    const userReview =  _.find(vendor['reviews'], function(num){
      return num.user== userID;
    });
    console.log("the user's review: ");
    console.log(userReview);
    if(userReview != null) vendor['reviews'].pop(userReview);
    const newReview= {user:userID, rating: value[1]};
    console.log("new value" + value[1]);
    vendor['reviews'].push(newReview);

    // console.log(vendor['reviews']);
    Vendors.update(vendorID, { $set: vendor });
    // return to home page
    FlowRouter.go('Home_Page');
  },

});
Meteor.startup(function () {
  GoogleMaps.load({ key: 'AIzaSyDmoMBN4kRbUeOzHIacLxerbY50amm9EnA' });

});


text:
/*jslint node: true, vars: true, white: true */
"use strict";

module.exports = function(eveApiGroup) {
	eveApiGroup.addroute('/units', function(req, db, apiMasks, responseFn) {

		var queryParams = {
			fields: apiMasks.unitMask.getFields(req.query.fields)
		};

		db.eve.getAllUnits(queryParams, responseFn);
	});

	eveApiGroup.addroute('/units/:unitID', function(req, db, apiMasks, responseFn) {
		var queryParams = {
			fields: apiMasks.unitMask.getFields(req.query.fields),
			unitID: req.params.unitID
		};

		db.eve.getUnitByID(queryParams, responseFn);
	});
};


text:
using System;
using System.Windows;
using System.Windows.Controls;
using FileQuery.Wpf.ViewModels;

namespace FileQuery.Controls
{
    /// <summary>
    /// Interaction logic for SearchPathItem.xaml
    /// </summary>
    public partial class SearchPathItem : UserControl
    {
        private SearchPathItemViewModel ViewModel
        {
            get { return DataContext as SearchPathItemViewModel; }
        }

        public SearchPathItem()
        {
            InitializeComponent();
        }

        private void Browse_Click(object sender, RoutedEventArgs e)
        {
            if (ViewModel.IsResultsFile)
            {
                SelectFile();
            }
            else
            {
                SelectFolder();
            }
        }

        private void SelectFile()
        {
            var dlg = new System.Windows.Forms.OpenFileDialog();
            dlg.DefaultExt = "txt";
            dlg.CheckFileExists = true;
            dlg.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ViewModel.PathValue = dlg.FileName;
            }
        }

        private void SelectFolder()
        {
            var dlg = new System.Windows.Forms.FolderBrowserDialog();
            dlg.SelectedPath = ViewModel.PathValue;
            if (dlg.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                ViewModel.PathValue = dlg.SelectedPath;
            }
        }

        private void Delete_Click(object sender, RoutedEventArgs e)
        {
            // This will cause the item to be deleted
            ViewModel.RemoveItem = true;
        }
    }
}


text:
layout: bidder
title: FairTrade
description: FairTrade Bidder Adapter
pbjs: true
biddercode: fairtrade
---

### Bid Params

{: .table .table-bordered .table-striped }
| Name        | Scope    | Description                                                                                | Example   | Type      |
|-------------|----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------|-----------|
| `uid`       | required | Represents the FairTrade bidder system Ad Slot ID associated with the respective div id from the site page.                                                                                | `5`       | `integer` |
| `priceType` | optional | Can take the values `gross` or `net`, default value is `net`. Net represents the header bid price with the header bidder margin already extracted. Gross price does contain the FairTrade bidder margin within. | `'gross'` | `string`  |


text:
<?php

/**
 * @namespace
 */
namespace Zend\XmlRpc\Client;

/** Zend_XmlRpc_Client_Exception */
require_once 'Zend/XmlRpc/Client/Exception.php';

/**
 * Thrown by Zend_XmlRpc_Client when an XML-RPC fault response is returned.
 *
 * @category   Zend
 * @package    Zend_XmlRpc
 * @subpackage Client
 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class FaultException extends Exception
{}


text:
<extends:http.layouts.error code="400" title="[[Bad Request]]"/>

<block:message>
    [[You sent invalid request to this page. Please contact the webmaster, for additional information.]]
</block:message>


text:
package com.flipkart.flux.api;

/**
 * DTO class for transferring task generated event and execution data
 * @author shyam.akirala
 */
public class EventAndExecutionData {

    private VersionedEventData versionedEventData;

    private ExecutionUpdateData executionUpdateData;

    /** Constructors*/
	/* For use by Jackson for deserialization*/
    public EventAndExecutionData() {}

    public EventAndExecutionData(VersionedEventData versionedEventData, ExecutionUpdateData executionUpdateData) {
        this.versionedEventData = versionedEventData;
        this.executionUpdateData = executionUpdateData;
    }

    /** Accessors*/
    public VersionedEventData getVersionedEventData() {
        return versionedEventData;
    }
    public ExecutionUpdateData getExecutionUpdateData() {
        return executionUpdateData;
    }
}


text:
///////////////////////////////////////////////////////////////////////////////
// Win32GL Specific
///////////////////////////////////////////////////////////////////////////////

#pragma once

#include <ork/concurrent_queue.hpp>
#include <ork/file/file.h>
#include "gfxenv.h"
#include "gl.h"

///////////////////////////////////////////////////////////////////////////////
#include "glslfxi.h"
/////////////////////////////

#include "texman.h"
#include "rtgroup.h"

///////////////////////////////////////////////////////////////////////////////

namespace ork { namespace lev2 {

void OpenGlGfxTargetInit();

class GfxTargetGL;

namespace dxt { struct DDS_HEADER; }

struct GlFboObject
{
	static const int kmaxrt = RtGroup::kmaxmrts;
	GLuint mFBOMaster;
	GLuint mDSBO;
	GLuint mTEX[kmaxrt];
	GlFboObject();
    ~GlFboObject();
};

int GetGlError( void );

//////////////////////////////////////////////////////////////////////

class GlTextureInterface;

///////////////////////////////////////////////////////////////////////////////

class GlRasterStateInterface : public RasterStateInterface
{
	void BindRasterState( const SRasterState &rState, bool bForce ) override;

	void SetZWriteMask( bool bv ) override;
	void SetRGBAWriteMask( bool rgb, bool a ) override;
	void SetBlending( EBlending eVal ) override;
	void SetDepthTest( EDepthTest eVal ) override;
	void SetCullTest( ECullTest eVal ) override;
	void SetScissorTest( EScissorTest eVal ) override;

};

///////////////////////////////////////////////////////////////////////////////

class GlMatrixStackInterface : public MatrixStackInterface
{
	CMatrix4 Ortho( float left, float right, float top, float bottom, float fnear, float ffar ); // virtual
	CMatrix4 Frustum( float left, float right, float top, float bottom, float zn, float zf ); // virtual

public:

	GlMatrixStackInterface( GfxTarget& target );
};

///////////////////////////////////////////////////////////////////////////////

class GlGeometryBufferInterface: public GeometryBufferInterface
{

public:

	GlGeometryBufferInterface( GfxTargetGL& target );

private:
	///////////////////////////////////////////////////////////////////////
	// VtxBuf Interface

	void* LockVB( VertexBufferBase& VBuf, int ivbase, int icount ) final;
	void UnLockVB( VertexBufferBase& VBuf ) final;

	const void* LockVB( const VertexBufferBase& VBuf, int ivbase=0, int icount=0 ) final;
	void UnLockVB( const VertexBufferBase& VBuf ) final;

	void ReleaseVB( VertexBufferBase& VBuf ) final;

	//

	void*LockIB ( IndexBufferBase& VBuf, int ivbase, int icount ) final;
	void UnLockIB ( IndexBufferBase& VBuf ) final;

	const void* LockIB ( const IndexBufferBase& VBuf, int ibase=0, int icount=0 ) final;
	void UnLockIB ( const IndexBufferBase& VBuf ) final;

	void ReleaseIB( IndexBufferBase& VBuf ) final;

	//

	bool BindStreamSources( const VertexBufferBase& VBuf, const IndexBufferBase& IBuf );
	bool BindVertexStreamSource( const VertexBufferBase& VBuf );
	void BindVertexDeclaration( EVtxStreamFormat efmt );

	void DrawPrimitive( const VertexBufferBase& VBuf, EPrimitiveType eType=EPRIM_NONE, int ivbase = 0, int ivcount = 0 ) final;
	void DrawIndexedPrimitive( const VertexBufferBase& VBuf, const IndexBufferBase& IdxBuf, EPrimitiveType eType=EPRIM_NONE, int ivbase = 0, int ivcount = 0 ) final;
	void DrawPrimitiveEML( const VertexBufferBase& VBuf, EPrimitiveType eType=EPRIM_NONE, int ivbase = 0, int ivcount = 0 ) final;
	void DrawIndexedPrimitiveEML( const VertexBufferBase& VBuf, const IndexBufferBase& IdxBuf, EPrimitiveType eType=EPRIM_NONE, int ivbase = 0, int ivcount = 0 ) final;

	GfxTargetGL& mTargetGL;

	uint32_t mLastComponentMask;

	void DoBeginFrame() final { mLastComponentMask=0; }
	//virtual void DoEndFrame() {}

};

///////////////////////////////////////////////////////////////////////////////

class GlFrameBufferInterface : public FrameBufferInterface
{
public:

	GlFrameBufferInterface( GfxTargetGL& mTarget );
	~GlFrameBufferInterface();

	virtual void	SetRtGroup( RtGroup* Base );
	void SetAsRenderTarget();

	void InitializeContext( GfxBuffer* pBuf );

	///////////////////////////////////////////////////////

	virtual void	Clear( const CColor4 &rCol, float fdepth );

	virtual void	SetViewport( int iX, int iY, int iW, int iH );
	virtual void	SetScissor( int iX, int iY, int iW, int iH );

	virtual void	PushScissor( const SRect &rScissorRect );
	virtual SRect&	PopScissor( void );

	//////////////////////////////////////////////
	// Capture Interface

	virtual void	Capture( const RtGroup& inpbuf, int irt, const Path& pth );
	//virtual void	Capture( GfxBuffer& inpbuf, CaptureBuffer& buffer );
	virtual bool	CaptureToTexture( const CaptureBuffer& capbuf, Texture& tex ) { return false; }
	virtual void	GetPixel( const CVector4 &rAt, GetPixelContext& ctx );

	//////////////////////////////////////////////

	virtual void	ForceFlush( void );
	virtual void	DoBeginFrame( void );
	virtual void	DoEndFrame( void );

	//////////////////////////////////////////////

	void SetColorFBObject( GLuint fbo ) { muColorFBObject=fbo; }
	GLuint GetColorFBObject() const { return muColorFBObject; }

	void SetDepthFBObject( GLuint fbo ) { muDepthFBObject=fbo; }
	GLuint GetDepthFBObject() const { return muDepthFBObject; }

protected:

    void DestroyRtGroup( RtGroup* Base ) final;

	GfxTargetGL& mTargetGL;
	GLuint muColorFBObject;
	GLuint muDepthFBObject;
	int miCurScissorX;
	int miCurScissorY;
	int miCurScissorW;
	int miCurScissorH;

};

struct GLTextureObject;

class VdsTextureAnimation : public TextureAnimationBase
{
public:
    VdsTextureAnimation(const Path& pth);
    ~VdsTextureAnimation();  // virtual
    void UpdateTexture( TextureInterface* txi, Texture* ptex, TextureAnimationInst* ptexanim ); // virtual
    float GetLengthOfTime( void ) const; // virtual

    void* ReadFromFrameCache( int iframe, int isize );

    int miW, miH;
    int miNumFrames;
    CFile* mpFile;
    std::string mPath;
    dxt::DDS_HEADER* mpDDSHEADER;
    int miFrameBaseSize;
    int miFrameBaseOffset;
    int miFileLength;

    std::map<int,int> mFrameCache;
    static const int kframecachesize = 60;
    void* mFrameBuffers[kframecachesize];
private:
    void UpdateFBO(GLTextureObject&glto,float ftime);
};

#if defined(_DARWIN)
class QuartzComposerTextureAnimation : public TextureAnimationBase
{
public:
	QuartzComposerTextureAnimation(Objc::Object qcr);
	void UpdateTexture( TextureInterface* txi, Texture* ptex, TextureAnimationInst* ptexanim ); // virtual
	float GetLengthOfTime( void ) const; // virtual
	~QuartzComposerTextureAnimation();  // virtual
private:
//	float			mfQtzTime;
	Objc::Object	mQCRenderer;
	void UpdateQtzFBO(GLTextureObject&glto,float ftime);
};
#endif

struct GLTextureObject
{
	GLuint			mObject;
	GLuint			mFbo;
	GLuint			mDbo;
	GLenum			mTarget;

	GLTextureObject() : mObject(0), mFbo(0), mDbo(0), mTarget(GL_NONE) {} //, mfQtzTime(0.0f) {}

//	void UpdateQtzFBO();

};

class PboSet
{
public:

	PboSet( int isize );
	~PboSet();
	GLuint Get();

private:

	static const int knumpbos = 1;
	GLuint mPBOS[knumpbos];
	int miCurIndex;
};

struct GlTexLoadReq
{
	Texture *ptex;
	dxt::DDS_HEADER* ddsh;
	GLTextureObject* pTEXOBJ;
	CFile* pTEXFILE;
};

class GlTextureInterface : public TextureInterface
{
public:

	void VRamUpload( Texture *pTex ) final;		// Load Texture Data onto card
	void VRamDeport( Texture *pTex ) final;		// Load Texture Data onto card
	void TexManInit( void ) final;
	bool DestroyTexture( Texture *ptex ) final;
	bool LoadTexture( const Path& fname, Texture *ptex ) final;
	void SaveTexture( const Path& fname, Texture *ptex )  final;
	void ApplySamplingMode( Texture *ptex ) final;
	void UpdateAnimatedTexture( Texture *ptex, TextureAnimationInst* tai )  final;
    void InitWithData( Texture *pTex, int w, int h, void* data ) final;

	void LoadDDSTextureMainThreadPart(const GlTexLoadReq& req);
	bool LoadDDSTexture( const Path& fname, Texture *ptex );
	bool LoadVDSTexture( const Path& fname, Texture *ptex );
	bool LoadQTZTexture( const Path& fname, Texture *ptex );

	GLuint GetPBO( int isize );

	GlTextureInterface( GfxTargetGL& tgt );

private:

	std::map<int,PboSet*> mPBOSets;
	GfxTargetGL& mTargetGL;
};

///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////

class GfxTargetGL : public GfxTarget
{
public:

	GfxTargetGL();
    ~GfxTargetGL() final;
    void SwapGLContext( CTXBASE *pCTFL );
    void MakeCurrentContext( void );
    static void GLinit();

private:

    void AttachGLContext( CTXBASE *pCTFL );

    void TakeThreadOwnership() final;
    void InitializeContext( GfxWindow *pWin, CTXBASE* pctxbase ) final; // make a window
    void InitializeContext( GfxBuffer *pBuf ) final;    // make an offscreen buffer

    void FxInit();

    //////////////////////////////////////////////
    // Interfaces
    //////////////////////////////////////////////

    FxInterface* DoFXI() final { return & mFxI; }
    RasterStateInterface* DoRSI() final { return & mRsI; }
    MatrixStackInterface* DoMTXI() final { return & mMtxI; }
    GeometryBufferInterface* DoGBI() final { return & mGbI; }
    FrameBufferInterface* DoFBI() final { return & mFbI; }
    TextureInterface* DoTXI() final { return & mTxI; }
    ImmInterface* DoIMI() final { return & mImm; }

    //////////////////////////////////////////////

    void DoSetSize( int ix, int iy, int iw, int ih ) final;
    void DoBeginFrame( void ) final {}
    void DoEndFrame( void ) final {}

	//////////////////////////////////////////////
	#if defined(_LINUX) || defined( OSX )
	//////////////////////////////////////////////

		void*			mhHWND;
		void*			mGLXContext;
		GfxTargetGL*	mpParentTarget;

		std::stack< void* >		mDCStack;
		std::stack< void* >		mGLRCStack;

	//////////////////////////////////////////////
	#endif
	//////////////////////////////////////////////

	static ork::mpmc_bounded_queue<void*> mLoadTokens;

	///////////////////////////////////////////////////////////////////////////
	// Rendering State Info

	EDepthTest			meCurDepthTest;

	///////////////////////////////////////////////////////////////////////////

	GlslFxInterface				mFxI;
	GlRasterStateInterface		mRsI;
	GlMatrixStackInterface		mMtxI;
	GlGeometryBufferInterface	mGbI;
	GlFrameBufferInterface		mFbI;
	GlTextureInterface			mTxI;
	ImmInterface                mImm;

	bool 						mTargetDrawableSizeDirty;
	void* DoBeginLoad(); // virtual
	void DoEndLoad(void*ploadtok); // virtual
    int mMajorVersion;
    int mMinorVersion;
    std::string mRendererString;

};

} } // ork::lev2

///////////////////////////////////////////////////////////////////////////////

#if ! defined(GL_RGBA16F)
#define GL_RGBA16F GL_RGBA16F_ARB
#endif

///////////////////////////////////////////////////////////////////////////////


text:
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/fb11e2e1d7554469853708d897a49dae)](https://www.codacy.com/app/ankitjain28may77/autoscroll-js?utm_source=github.com&utm_medium=referral&utm_content=ankitjain28may/autoscroll.js&utm_campaign=Badge_Grade)
[![npm](https://img.shields.io/npm/dt/autoscroll.js.svg)](https://www.npmjs.com/package/autoscroll.js)
[![Gitter](https://badges.gitter.im/ankitjain28may/autoscroll.js.svg)](https://gitter.im/ankitjain28may/autoscroll.js?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

# autoscroll.js

>Auto Scroll is a Jquery plugin which is used to auto-scroll your content smoothly .
It is less than 1KB when minified.

##How To use Auto Scroll

It is very easy to install, just copy and paste the autoscroll.js in your js root folder and then initialize its path
in your html file. It's better to initialize it in head tag.
```
<head>
 <script src="https://code.jquery.com/jquery-3.1.0.min.js" integrity="sha256-cCueBR6CsyA4/9szpPfrX3s49M9vUU5BgtiJj06wt/s=" crossorigin="anonymous"></script>

 <script src="path/to/autoscroll.js"></script>
</head>
```
*** Dependency : It depends on jquery. So initialize jquery before autoscroll.js***

# Download autoscroll.js
##Using npm

```
npm install autoscroll.js
```

##Install using bower

```
bower install autoscroll.js
```

#General Notes

##Initialize
###With jQuery

```js
$('element').scroller();
```

###With vanilla JavaScript

```js
var scroll = new Scroller('{"element" : element }');
```

###With HTML
Add a `data-config` attribute to your element and a class `scroller`. Options can be set in JSON in the value.

``` html
<div class="scroller" id="id-1" data-config='{ "amount": 150, "delay": 1500 }'>
  <div class="item"></div>
  <div class="item"></div>
  ...
</div>
```
Note: element can be id or class or any html tag

##Default options
```
{"amount" : 100 , "delay" : 2000 } //2000ms and 100px
```

##Add your options
```
{"amount" : 200 , "delay" : 1500 }
```

#Example
for a div tag having id named "id-1"
```
<div id="id-1"></div>
```
you can initialize it like this
```
$("#id-1").scroller('{"amount" : 150, "delay" : 1500 }');
```
OR
```
var scroll = new Scroller('{"element" : "#id-1", "amount" : 150, "delay" : 1500 }');
```
OR

By using HTML
``` html
<div class="scroller" id="id-1" data-config='{ "amount": 150, "delay": 1500 }'>
  <div class="item"></div>
  <div class="item"></div>
  ...
</div>
```
#License
Copyright (c) 2016 Ankit Jain - Released under the MIT License

Run this script in your browser...
Enjoy Cheers !!


text:
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="ArtifactsWorkspaceSettings">
    <artifacts-to-build>
      <artifact name="Website-Compressor:jar" />
    </artifacts-to-build>
  </component>
  <component name="ChangeListManager">
    <list default="true" id="c3b36c13-0bec-483c-ad1d-114fd724420f" name="Default" comment="" />
    <ignored path="Website-Compressor.iws" />
    <ignored path=".idea/workspace.xml" />
    <ignored path="$PROJECT_DIR$/out/" />
    <option name="EXCLUDED_CONVERTED_TO_IGNORED" value="true" />
    <option name="TRACKING_ENABLED" value="true" />
    <option name="SHOW_DIALOG" value="false" />
    <option name="HIGHLIGHT_CONFLICTS" value="true" />
    <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
    <option name="LAST_RESOLUTION" value="IGNORE" />
  </component>
  <component name="ChangesViewManager" flattened_view="true" show_ignored="false" />
  <component name="CreatePatchCommitExecutor">
    <option name="PATCH_PATH" value="" />
  </component>
  <component name="ExecutionTargetManager" SELECTED_TARGET="default_target" />
  <component name="FavoritesManager">
    <favorites_list name="Website-Compressor" />
  </component>
  <component name="FileEditorManager">
    <leaf SIDE_TABS_SIZE_LIMIT_KEY="450">
      <file leaf-file-name="CompressionResultDialog.java" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Compressor.java" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Main.form" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.form">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Main.java" pinned="false" current-in-tab="true">
        <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.17488264">
              <caret line="49" column="17" selection-start-line="49" selection-start-column="17" selection-end-line="49" selection-end-column="17" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="Utils.java" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Utils.java">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
      <file leaf-file-name="CompressionResultDialog.form" pinned="false" current-in-tab="false">
        <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.form">
          <provider selected="true" editor-type-id="text-editor">
            <state vertical-scroll-proportion="0.0">
              <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
              <folding />
            </state>
          </provider>
        </entry>
      </file>
    </leaf>
  </component>
  <component name="GradleLocalSettings">
    <option name="externalProjectsViewState">
      <projects_view />
    </option>
  </component>
  <component name="IdeDocumentHistory">
    <option name="CHANGED_PATHS">
      <list>
        <option value="$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java" />
      </list>
    </option>
  </component>
  <component name="ProjectFrameBounds">
    <option name="x" value="-11" />
    <option name="y" value="-11" />
    <option name="width" value="1942" />
    <option name="height" value="1046" />
  </component>
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
    <OptionsSetting value="true" id="Add" />
    <OptionsSetting value="true" id="Remove" />
    <OptionsSetting value="true" id="Checkout" />
    <OptionsSetting value="true" id="Update" />
    <OptionsSetting value="true" id="Status" />
    <OptionsSetting value="true" id="Edit" />
    <ConfirmationsSetting value="0" id="Add" />
    <ConfirmationsSetting value="0" id="Remove" />
  </component>
  <component name="ProjectView">
    <navigator currentView="ProjectPane" proportions="" version="1">
      <flattenPackages />
      <showMembers />
      <showModules />
      <showLibraryContents />
      <hideEmptyPackages />
      <abbreviatePackageNames />
      <autoscrollToSource />
      <autoscrollFromSource />
      <sortByType />
      <manualOrder />
      <foldersAlwaysOnTop value="true" />
    </navigator>
    <panes>
      <pane id="PackagesPane" />
      <pane id="ProjectPane">
        <subPane>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
          <PATH>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="Website-Compressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="src" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
            <PATH_ELEMENT>
              <option name="myItemId" value="websitecompressor" />
              <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
            </PATH_ELEMENT>
          </PATH>
        </subPane>
      </pane>
      <pane id="Scope" />
      <pane id="Scratches" />
    </panes>
  </component>
  <component name="PropertiesComponent">
    <property name="settings.editor.selected.configurable" value="preferences.lookFeel" />
    <property name="settings.editor.splitter.proportion" value="0.2" />
    <property name="last_opened_file_path" value="$USER_HOME$/Desktop" />
    <property name="project.structure.last.edited" value="Artifacts" />
    <property name="project.structure.proportion" value="0.0" />
    <property name="project.structure.side.proportion" value="0.2" />
  </component>
  <component name="RecentsManager">
    <key name="MoveFile.RECENT_KEYS">
      <recent name="C:\Users\Aditya\IdeaProjects\Website-Compressor" />
      <recent name="C:\Users\Aditya\IdeaProjects\Website-Compressor\src\in\adityaanand\websitecompressor" />
    </key>
  </component>
  <component name="RunManager" selected="Application.Main">
    <configuration default="false" name="Main" type="Application" factoryName="Application" temporary="true">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <option name="MAIN_CLASS_NAME" value="in.adityaanand.websitecompressor.Main" />
      <option name="VM_PARAMETERS" value="" />
      <option name="PROGRAM_PARAMETERS" value="" />
      <option name="WORKING_DIRECTORY" value="file://$PROJECT_DIR$" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" value="" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="Website-Compressor" />
      <envs />
      <RunnerSettings RunnerId="Run" />
      <ConfigurationWrapper RunnerId="Run" />
      <method />
    </configuration>
    <configuration default="true" type="Application" factoryName="Application">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="GradleRunConfiguration" factoryName="Gradle">
      <ExternalSystemSettings>
        <option name="executionName" />
        <option name="externalProjectPath" />
        <option name="externalSystemIdString" value="GRADLE" />
        <option name="scriptParameters" />
        <option name="taskDescriptions">
          <list />
        </option>
        <option name="taskNames">
          <list />
        </option>
        <option name="vmOptions" />
      </ExternalSystemSettings>
      <method />
    </configuration>
    <configuration default="true" type="JUnit" factoryName="JUnit">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="singleModule" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <configuration default="true" type="JUnitTestDiscovery" factoryName="JUnit Test Discovery" changeList="All">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="TEST_OBJECT" value="class" />
      <option name="VM_PARAMETERS" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="singleModule" />
      </option>
      <envs />
      <patterns />
      <method />
    </configuration>
    <configuration default="true" type="JarApplication" factoryName="JAR Application">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="Java Scratch" factoryName="Java Scratch">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <option name="SCRATCH_FILE_ID" value="0" />
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="ENABLE_SWING_INSPECTOR" value="false" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="JetRunConfigurationType" factoryName="Kotlin">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <option name="MAIN_CLASS_NAME" />
      <option name="VM_PARAMETERS" />
      <option name="PROGRAM_PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <module name="Website-Compressor" />
      <envs />
      <method />
    </configuration>
    <configuration default="true" type="TestNG" factoryName="TestNG">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="singleModule" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <configuration default="true" type="TestNGTestDiscovery" factoryName="TestNG Test Discovery" changeList="All">
      <extension name="coverage" enabled="false" merge="false" sample_coverage="true" runner="idea" />
      <module name="" />
      <option name="ALTERNATIVE_JRE_PATH_ENABLED" value="false" />
      <option name="ALTERNATIVE_JRE_PATH" />
      <option name="SUITE_NAME" />
      <option name="PACKAGE_NAME" />
      <option name="MAIN_CLASS_NAME" />
      <option name="METHOD_NAME" />
      <option name="GROUP_NAME" />
      <option name="TEST_OBJECT" value="CLASS" />
      <option name="VM_PARAMETERS" />
      <option name="PARAMETERS" />
      <option name="WORKING_DIRECTORY" />
      <option name="OUTPUT_DIRECTORY" />
      <option name="ANNOTATION_TYPE" />
      <option name="ENV_VARIABLES" />
      <option name="PASS_PARENT_ENVS" value="true" />
      <option name="TEST_SEARCH_SCOPE">
        <value defaultName="singleModule" />
      </option>
      <option name="USE_DEFAULT_REPORTERS" value="false" />
      <option name="PROPERTIES_FILE" />
      <envs />
      <properties />
      <listeners />
      <method />
    </configuration>
    <list size="1">
      <item index="0" class="java.lang.String" itemvalue="Application.Main" />
    </list>
    <recent_temporary>
      <list size="1">
        <item index="0" class="java.lang.String" itemvalue="Application.Main" />
      </list>
    </recent_temporary>
  </component>
  <component name="ShelveChangesManager" show_recycled="false" />
  <component name="SvnConfiguration">
    <configuration />
  </component>
  <component name="TaskManager">
    <task active="true" id="Default" summary="Default task">
      <changelist id="c3b36c13-0bec-483c-ad1d-114fd724420f" name="Default" comment="" />
      <created>1451382338274</created>
      <option name="number" value="Default" />
      <updated>1451382338274</updated>
    </task>
    <servers />
  </component>
  <component name="ToolWindowManager">
    <frame x="-11" y="-11" width="1942" height="1046" extended-state="6" />
    <editor active="false" />
    <layout>
      <window_info id="Palette" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
      <window_info id="Palette	" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
      <window_info id="Maven Projects" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
      <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="0" side_tool="false" content_ui="combo" />
      <window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="UI Designer" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
      <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
      <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
      <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
      <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
      <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.08998875" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
      <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
      <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
      <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" show_stripe_button="true" weight="0.4" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
    </layout>
  </component>
  <component name="Vcs.Log.UiProperties">
    <option name="RECENTLY_FILTERED_USER_GROUPS">
      <collection />
    </option>
    <option name="RECENTLY_FILTERED_BRANCH_GROUPS">
      <collection />
    </option>
  </component>
  <component name="VcsContentAnnotationSettings">
    <option name="myLimit" value="2678400000" />
  </component>
  <component name="XDebuggerManager">
    <breakpoint-manager />
    <watches-manager />
  </component>
  <component name="antWorkspaceConfiguration">
    <option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
    <option name="FILTER_TARGETS" value="false" />
  </component>
  <component name="editorHistoryManager">
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Utils.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Utils.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/WebsiteFiles.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResult.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Utils.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/WebsiteFiles.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResult.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Utils.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/WebsiteFiles.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResult.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Compressor.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResult.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.69948184">
          <caret line="39" column="51" selection-start-line="39" selection-start-column="51" selection-end-line="39" selection-end-column="51" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/WebsiteFiles.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
      <provider editor-type-id="ui-designer">
        <state />
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Main.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.17488264">
          <caret line="49" column="17" selection-start-line="49" selection-start-column="17" selection-end-line="49" selection-end-column="17" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/Utils.java">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
    </entry>
    <entry file="file://$PROJECT_DIR$/src/in/adityaanand/websitecompressor/CompressionResultDialog.form">
      <provider selected="true" editor-type-id="text-editor">
        <state vertical-scroll-proportion="0.0">
          <caret line="0" column="0" selection-start-line="0" selection-start-column="0" selection-end-line="0" selection-end-column="0" />
          <folding />
        </state>
      </provider>
      <provider editor-type-id="ui-designer">
        <state />
      </provider>
    </entry>
  </component>
  <component name="masterDetails">
    <states>
      <state key="ArtifactsStructureConfigurable.UI">
        <settings>
          <artifact-editor />
          <last-edited>Website-Compressor:jar</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
                <option value="0.5" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="GlobalLibrariesConfigurable.UI">
        <settings>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="JdkListConfigurable.UI">
        <settings>
          <last-edited>1.8</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ModuleStructureConfigurable.UI">
        <settings>
          <last-edited>Website-Compressor</last-edited>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
                <option value="0.6" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
      <state key="ProjectLibrariesConfigurable.UI">
        <settings>
          <splitter-proportions>
            <option name="proportions">
              <list>
                <option value="0.2" />
              </list>
            </option>
          </splitter-proportions>
        </settings>
      </state>
    </states>
  </component>
</project>


text:
package com.mongodb;

import org.bson.BSONException;
import org.bson.io.OutputBuffer;
import org.bson.types.BSONTimestamp;
import org.bson.types.Binary;
import org.bson.types.ObjectId;

import java.util.Stack;

import static org.bson.util.Assertions.*;

class BSONBinaryWriter extends BSONWriter {
    private final BSONBinaryWriterSettings binaryWriterSettings;

    private final OutputBuffer buffer;
    private final Stack<Integer> maxDocumentSizeStack = new Stack<Integer>();
    private Mark mark;

    public BSONBinaryWriter(final OutputBuffer buffer) {
        this(new BSONWriterSettings(), new BSONBinaryWriterSettings(), buffer);
    }

    public BSONBinaryWriter(final BSONWriterSettings settings, final BSONBinaryWriterSettings binaryWriterSettings,
                            final OutputBuffer buffer) {
        super(settings);
        this.binaryWriterSettings = binaryWriterSettings;
        this.buffer = buffer;
        maxDocumentSizeStack.push(binaryWriterSettings.getMaxDocumentSize());
    }

    @Override
    public void close() {
        super.close();
    }

    /**
     * Gets the output buffer that is backing this instance.
     *
     * @return the buffer
     */
    public OutputBuffer getBuffer() {
        return buffer;
    }

    @Override
    public void flush() {
    }

    @Override
    protected Context getContext() {
        return (Context) super.getContext();
    }

    @Override
    public void writeBinaryData(final Binary binary) {
        checkPreconditions("writeBinaryData", State.VALUE);

        buffer.write(BSONType.BINARY.getValue());
        writeCurrentName();

        int totalLen = binary.length();

        if (binary.getType() == BSONBinarySubType.OldBinary.getValue()) {
            totalLen += 4;
        }

        buffer.writeInt(totalLen);
        buffer.write(binary.getType());
        if (binary.getType() == BSONBinarySubType.OldBinary.getValue()) {
            buffer.writeInt(totalLen - 4);
        }
        buffer.write(binary.getData());

        setState(getNextState());
    }

    @Override
    public void writeBoolean(final boolean value) {
        checkPreconditions("writeBoolean", State.VALUE);

        buffer.write(BSONType.BOOLEAN.getValue());
        writeCurrentName();
        buffer.write(value ? 1 : 0);

        setState(getNextState());
    }

    @Override
    public void writeDateTime(final long value) {
        checkPreconditions("writeDateTime", State.VALUE);

        buffer.write(BSONType.DATE_TIME.getValue());
        writeCurrentName();
        buffer.writeLong(value);

        setState(getNextState());
    }

    @Override
    public void writeDouble(final double value) {
        checkPreconditions("writeDouble", State.VALUE);

        buffer.write(BSONType.DOUBLE.getValue());
        writeCurrentName();
        buffer.writeDouble(value);

        setState(getNextState());
    }

    @Override
    public void writeInt32(final int value) {
        checkPreconditions("writeInt32", State.VALUE);

        buffer.write(BSONType.INT32.getValue());
        writeCurrentName();
        buffer.writeInt(value);

        setState(getNextState());
    }

    @Override
    public void writeInt64(final long value) {
        checkPreconditions("writeInt64", State.VALUE);

        buffer.write(BSONType.INT64.getValue());
        writeCurrentName();
        buffer.writeLong(value);

        setState(getNextState());
    }

    @Override
    public void writeJavaScript(final String code) {
        checkPreconditions("writeJavaScript", State.VALUE);

        buffer.write(BSONType.JAVASCRIPT.getValue());
        writeCurrentName();
        buffer.writeString(code);

        setState(getNextState());
    }

    @Override
    public void writeJavaScriptWithScope(final String code) {
        checkPreconditions("writeJavaScriptWithScope", State.VALUE);

        buffer.write(BSONType.JAVASCRIPT_WITH_SCOPE.getValue());
        writeCurrentName();
        setContext(new Context(getContext(), BSONContextType.JAVASCRIPT_WITH_SCOPE, buffer.getPosition()));
        buffer.writeInt(0);
        buffer.writeString(code);

        setState(State.SCOPE_DOCUMENT);
    }

    @Override
    public void writeMaxKey() {
        checkPreconditions("writeMaxKey", State.VALUE);

        buffer.write(BSONType.MAX_KEY.getValue());
        writeCurrentName();

        setState(getNextState());
    }

    @Override
    public void writeMinKey() {
        checkPreconditions("writeMinKey", State.VALUE);

        buffer.write(BSONType.MIN_KEY.getValue());
        writeCurrentName();

        setState(getNextState());
    }

    @Override
    public void writeNull() {
        checkPreconditions("writeNull", State.VALUE);

        buffer.write(BSONType.NULL.getValue());
        writeCurrentName();

        setState(getNextState());
    }

    @Override
    public void writeObjectId(final ObjectId objectId) {
        checkPreconditions("writeObjectId", State.VALUE);

        buffer.write(BSONType.OBJECT_ID.getValue());
        writeCurrentName();

        buffer.write(objectId.toByteArray());
        setState(getNextState());
    }

    @Override
    public void writeString(final String value) {
        checkPreconditions("writeString", State.VALUE);

        buffer.write(BSONType.STRING.getValue());
        writeCurrentName();
        buffer.writeString(value);

        setState(getNextState());
    }

    @Override
    public void writeSymbol(final String value) {
        checkPreconditions("writeSymbol", State.VALUE);

        buffer.write(BSONType.SYMBOL.getValue());
        writeCurrentName();
        buffer.writeString(value);

        setState(getNextState());
        //To change body of implemented methods use File | Settings | File Templates.
    }

    @Override
    public void writeTimestamp(final BSONTimestamp value) {
        checkPreconditions("writeTimestamp", State.VALUE);

        buffer.write(BSONType.TIMESTAMP.getValue());
        writeCurrentName();
        buffer.writeInt(value.getInc());
        buffer.writeInt(value.getTime());

        setState(getNextState());
    }

    @Override
    public void writeUndefined() {
        checkPreconditions("writeUndefined", State.VALUE);

        buffer.write(BSONType.UNDEFINED.getValue());
        writeCurrentName();

        setState(getNextState());
    }

    @Override
    public void writeStartArray() {
        checkPreconditions("writeStartArray", State.VALUE);

        super.writeStartArray();
        buffer.write(BSONType.ARRAY.getValue());
        writeCurrentName();
        setContext(new Context(getContext(), BSONContextType.ARRAY, buffer.getPosition()));
        buffer.writeInt(0); // reserve space for size

        setState(State.VALUE);
    }

    @Override
    public void writeStartDocument() {
        checkPreconditions("writeStartDocument", State.INITIAL, State.VALUE, State.SCOPE_DOCUMENT, State.DONE);

        super.writeStartDocument();
        if (getState() == State.VALUE) {
            buffer.write(BSONType.DOCUMENT.getValue());
            writeCurrentName();
        }
        setContext(new Context(getContext(), BSONContextType.DOCUMENT, buffer.getPosition()));
        buffer.writeInt(0); // reserve space for size

        setState(State.NAME);
    }

    @Override
    public void writeEndArray() {
        checkPreconditions("writeEndArray", State.VALUE);

        if (getContext().getContextType() != BSONContextType.ARRAY) {
            throwInvalidContextType("WriteEndArray", getContext().getContextType(), BSONContextType.ARRAY);
        }

        super.writeEndArray();
        buffer.write(0);
        backpatchSize(); // size of document

        setContext(getContext().getParentContext());
        setState(getNextState());
    }

    @Override
    public void writeEndDocument() {
        checkPreconditions("writeEndDocument", State.NAME);

        BSONContextType contextType = getContext().getContextType();

        if (contextType != BSONContextType.DOCUMENT && contextType != BSONContextType.SCOPE_DOCUMENT) {
            throwInvalidContextType("WriteEndDocument", contextType, BSONContextType.DOCUMENT, BSONContextType.SCOPE_DOCUMENT);
        }

        super.writeEndDocument();
        buffer.write(0);
        backpatchSize(); // size of document

        setContext(getContext().getParentContext());
        if (getContext() == null) {
            setState(State.DONE);
        }
        else {
            if (getContext().getContextType() == BSONContextType.JAVASCRIPT_WITH_SCOPE) {
                backpatchSize(); // size of the JavaScript with scope value
                setContext(getContext().getParentContext());
            }
            setState(getNextState());
        }
    }

    public void encodeDocument(final DBEncoder encoder, final DBObject dbObject) {
        checkPreconditions("writeStartDocument", State.INITIAL, State.VALUE, State.SCOPE_DOCUMENT, State.DONE);
        isTrue("state is VALUE", getState() == State.VALUE);
        isTrue("context not null", getContext() != null);
        isTrue("context is not JAVASCRIPT_WITH_SCOPE", getContext().getContextType() != BSONContextType.JAVASCRIPT_WITH_SCOPE);

        buffer.write(BSONType.DOCUMENT.getValue());
        writeCurrentName();

        int startPos = buffer.getPosition();
        encoder.writeObject(buffer, dbObject);
        throwIfSizeExceedsLimit(buffer.getPosition() - startPos);

        setState(getNextState());
    }

    public void pushMaxDocumentSize(final int maxDocumentSize) {
        maxDocumentSizeStack.push(maxDocumentSize);
    }

    public void popMaxDocumentSize() {
        maxDocumentSizeStack.pop();
    }

    public void mark() {
        mark = new Mark();
    }

    public void reset() {
        if (mark == null) {
            throw new IllegalStateException("Can not reset without first marking");
        }

        mark.reset();
        mark = null;
    }

    private void writeCurrentName() {
        if (getContext().getContextType() == BSONContextType.ARRAY) {
            buffer.writeCString(Integer.toString(getContext().index++));
        }
        else {
            buffer.writeCString(getName());
        }
    }

    private void backpatchSize() {
        final int size = buffer.getPosition() - getContext().startPosition;
        throwIfSizeExceedsLimit(size);
        buffer.backpatchSize(size);
    }

    private void throwIfSizeExceedsLimit(final int size) {
        if (size > maxDocumentSizeStack.peek()) {
            final String message = String.format("Size %d is larger than MaxDocumentSize %d.",
                                                 buffer.getPosition() - getContext().startPosition,
                                                 binaryWriterSettings.getMaxDocumentSize());
            throw new MongoInternalException(message);
        }
    }

    public class Context extends BSONWriter.Context {
        private final int startPosition;
        private int index; // used when contextType is an array

        public Context(final Context parentContext, final BSONContextType contextType, final int startPosition) {
            super(parentContext, contextType);
            this.startPosition = startPosition;
        }

        public Context(final Context from) {
            super(from);
            startPosition = from.startPosition;
            index = from.index;
        }

        @Override
        public Context getParentContext() {
            return (Context) super.getParentContext();
        }

        @Override
        public Context copy() {
            return new Context(this);
        }
    }

    protected class Mark extends BSONWriter.Mark {
        private final int position;

        protected Mark() {
            this.position = buffer.getPosition();
        }

        protected void reset() {
            super.reset();
            buffer.truncateToPosition(mark.position);
        }
    }
}