<commit_before>/*
 * jQuery Plus Slider 1.4.5
 * By <NAME>
 * http://css-plus.com
 * @jamygolden
 *
 * Copyright 2011
 * Free to use under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 */
( function( $ ) {

    $.plusSlider = function( el, options ) {

        // To avoid scope issues, use 'base' instead of 'this'
        // To reference this class from internal events and functions.
        var base = this;

        // Access to jQuery and DOM versions of element
        base.$el = $( el );
        base.el = el;

        // Add a reverse reference to the DOM object
        base.$el.data('plusSlider', base);
        
        base.init = function () {

            base.options = $.extend( {}, $.plusSlider.defaults, options );
            base.$el.addClass('plusslide-container').wrap('<div class="plusslider ' + base.$el.attr('id') + '" />');
            base.$wrap                  = base.$el.parent();
            base.$slides                = base.$el.children();
            base.$wrapContainer         = base.$wrap.parent();
            base.slideCount             = base.$slides.length;
            base.slideIndexCount        = base.slideCount - 1;
            base.sliderWidth            = 0;
            base.animating              = false;
            base.wrapContainerWidth     = base.$wrapContainer.width();
            base.wrapContainerHeight    = base.$wrapContainer.height();
            base.currentSlideIndex      = base.options.defaultSlide;
            base.$currentSlide          = base.$slides.eq( base.currentSlideIndex );
            base.currentSlideWidth      = base.$currentSlide.outerWidth();
            base.currentSlideHeight     = base.$currentSlide.outerHeight();
            // base.functions
            base.calculateSliderWidth   = function() {

                for ( var i = 0; i < base.slideCount; i++ ) {
                    if ( i == 0 ) base.sliderWidth = 0;
                    base.sliderWidth += base.$slides.eq( i ).outerWidth();
                };

            }; // base.calculateSliderWidth
            base.beginTimer             = function() {

                base.timer = window.setInterval( function () {
                    base.toSlide('next');
                }, base.options.displayTime);

            }; // base.beginTimer
            base.clearTimer             = function() {
                
                if ( base.timer) { // If the timer is set, clear it
                    window.clearInterval(base.timer);
                };

            }; // base.clearTimer
            base.setSliderDimensions    = function() {

                // Set values
                base.calculateSliderWidth();
                base.currentSlideWidth  = base.$currentSlide.outerWidth();
                base.currentSlideHeight = base.$currentSlide.outerHeight();
                // Values Set
                
                if ( base.options.fullWidth ) {

                    base.sliderWidth        = base.wrapContainerWidth * base.slideCount;
                    base.wrapContainerWidth = base.$wrapContainer.width();

                    base.$slides.width( base.wrapContainerWidth );
                    base.calculateSliderWidth();

                    base.$wrap.width( base.wrapContainerWidth ).height( base.currentSlideHeight );
                    base.$el.width( base.sliderWidth ).css('left', base.$currentSlide.position().left * -1 + 'px');

                } else if ( base.options.sliderType == 'slider' ) {

                    base.$wrap.width( base.currentSlideWidth );
                    base.$wrap.height( base.currentSlideHeight );

                }

            }; // base.setSliderDimensions
            base.toSlide                = function( slide ) {

                if ( base.animating == false ) {

                    // Set values
                    base.animating = true;
                    // Values set

                    // Handling of slide values
                    if ( slide === 'next' || slide === '' ) {

                        base.currentSlideIndex += 1;
                    
                    } else if ( slide === 'prev' ) {

                        base.currentSlideIndex -= 1;
                    
                    } else {

                        base.currentSlideIndex = slide;

                    }
                    // End Handling of slide values

                    // Disable first and last buttons on the first and last slide respectively
                    if ( ( base.options.disableLoop == 'first' || base.options.disableLoop == 'both' && base.currentSlideIndex < 0 ) || ( base.options.disableLoop == 'last' || base.options.disableLoop == 'both' && base.currentSlideIndex > base.slideIndexCount )) {
                         return;
                    }  // End Disable first and last buttons on the first and last slide respectively

                    // Handle possible slide values
                    if ( base.currentSlideIndex > base.slideIndexCount ) {

                        base.currentSlideIndex = 0;
                    
                    } else if ( base.currentSlideIndex < 0 ) {
<commit_msg>Fixed bug that occurs when you call toSlide from outside the slider and pass it a number-as-a-string (for example, I was pulling the slide index from an html attribute on my custom pagination controls, using the jquery .attr() function, which returns the attribute as a string, even though it's a number). Without explicitly casting the slide to an integer, the *next* time toSlide() is run the base.currentSlideIndex += 1 does a string concatenation (e.g. "01" or "12" or "23" etc.) instead of addition.<commit_after>/*
 * jQuery Plus Slider 1.4.5
 * By <NAME>
 * http://css-plus.com
 * @jamygolden
 *
 * Copyright 2011
 * Free to use under the MIT license.
 * http://www.opensource.org/licenses/mit-license.php
 */
( function( $ ) {

    $.plusSlider = function( el, options ) {

        // To avoid scope issues, use 'base' instead of 'this'
        // To reference this class from internal events and functions.
        var base = this;

        // Access to jQuery and DOM versions of element
        base.$el = $( el );
        base.el = el;

        // Add a reverse reference to the DOM object
        base.$el.data('plusSlider', base);
        
        base.init = function () {

            base.options = $.extend( {}, $.plusSlider.defaults, options );
            base.$el.addClass('plusslide-container').wrap('<div class="plusslider ' + base.$el.attr('id') + '" />');
            base.$wrap                  = base.$el.parent();
            base.$slides                = base.$el.children();
            base.$wrapContainer         = base.$wrap.parent();
            base.slideCount             = base.$slides.length;
            base.slideIndexCount        = base.slideCount - 1;
            base.sliderWidth            = 0;
            base.animating              = false;
            base.wrapContainerWidth     = base.$wrapContainer.width();
            base.wrapContainerHeight    = base.$wrapContainer.height();
            base.currentSlideIndex      = base.options.defaultSlide;
            base.$currentSlide          = base.$slides.eq( base.currentSlideIndex );
            base.currentSlideWidth      = base.$currentSlide.outerWidth();
            base.currentSlideHeight     = base.$currentSlide.outerHeight();
            // base.functions
            base.calculateSliderWidth   = function() {

                for ( var i = 0; i < base.slideCount; i++ ) {
                    if ( i == 0 ) base.sliderWidth = 0;
                    base.sliderWidth += base.$slides.eq( i ).outerWidth();
                };

            }; // base.calculateSliderWidth
            base.beginTimer             = function() {

                base.timer = window.setInterval( function () {
                    base.toSlide('next');
                }, base.options.displayTime);

            }; // base.beginTimer
            base.clearTimer             = function() {
                
                if ( base.timer) { // If the timer is set, clear it
                    window.clearInterval(base.timer);
                };

            }; // base.clearTimer
            base.setSliderDimensions    = function() {

                // Set values
                base.calculateSliderWidth();
                base.currentSlideWidth  = base.$currentSlide.outerWidth();
                base.currentSlideHeight = base.$currentSlide.outerHeight();
                // Values Set
                
                if ( base.options.fullWidth ) {

                    base.sliderWidth        = base.wrapContainerWidth * base.slideCount;
                    base.wrapContainerWidth = base.$wrapContainer.width();

                    base.$slides.width( base.wrapContainerWidth );
                    base.calculateSliderWidth();

                    base.$wrap.width( base.wrapContainerWidth ).height( base.currentSlideHeight );
                    base.$el.width( base.sliderWidth ).css('left', base.$currentSlide.position().left * -1 + 'px');

                } else if ( base.options.sliderType == 'slider' ) {

                    base.$wrap.width( base.currentSlideWidth );
                    base.$wrap.height( base.currentSlideHeight );

                }

            }; // base.setSliderDimensions
            base.toSlide                = function( slide ) {

                if ( base.animating == false ) {

                    // Set values
                    base.animating = true;
                    // Values set

                    // Handling of slide values
                    if ( slide === 'next' || slide === '' ) {

                        base.currentSlideIndex += 1;
                    
                    } else if ( slide === 'prev' ) {

                        base.currentSlideIndex -= 1;
                    
                    } else {

                        base.currentSlideIndex = parseInt(slide);

                    }
                    // End Handling of slide values

                    // Disable first and last buttons on the first and last slide respectively
                    if ( ( base.options.disableLoop == 'first' || base.options.disableLoop == 'both' && base.currentSlideIndex < 0 ) || ( base.options.disableLoop == 'last' || base.options.disableLoop == 'both' && base.currentSlideIndex > base.slideIndexCount )) {
                         return;
                    }  // End Disable first and last buttons on the first and last slide respectively

                    // Handle possible slide values
                    if ( base.currentSlideIndex > base.slideIndexCount ) {

                        base.currentSlideIndex = 0;
                    
                    } else if ( base.currentSlideIndex < 0 ) {

{'fraction_non_alphanumeric': 0.10890997880770294, 'fraction_numerical': 0.0039620381461347096, 'mean_word_length': 1.3912756113681428, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6924096', 'n_tokens_mistral': 2752, 'n_tokens_neox': 2564, 'n_words': 627}