<commit_before>//Logs all the action use for debugging 
var DEBUG = true;
//holds the imgages that will be used to displayed in the gallery 
var img1, img2, img3, numImg=7, currentImg=0;


var transform = ["transform", "msTransform", "webkitTransform", "mozTransform", "oTransform"];

$(document).ready(function(){
	img1 = $(".background>.img_container").children().eq(1);
	img2 = $(".background>.img_container").children().eq(0);
	
	
	
	adjustImage(img1);
	adjustImage(img2);
	
	
	//setInterval(img1.addClass("fadeOut").removeClass("fadeOut"), 5000);
	fadeIn();
	
})


function fadeIn(){
	img1.attr("src", getNewImage());
	adjustImage(img1);
	//adjustImage(img2);
	
	img1.removeClass("fadeOut").addClass("fadeIn");
	img2.removeClass("fadeIn").addClass("fadeOut");
	
	setTimeout(fadeOut, 6000);
	if(DEBUG) console.log("fadedIn");
}
function fadeOut(){
	img2.attr("src", getNewImage());
	
	adjustImage(img2);
	//adjustImage(img1);
	
	img2.removeClass("fadeOut").addClass("fadeIn");
	img1.removeClass("fadeIn").addClass("fadeOut");
	
	setTimeout(fadeIn, 6000);
	if(DEBUG) console.log("fadedOut");
	
}
//returns the next image
function getNewImage(){
	var imgpath = "";
	currentImg = (currentImg+1)%numImg;
	imgpath = "img/"+currentImg+".jpg";
	return imgpath;
}

//aligns the image
function adjustImage($img){
	containerheight =$(".container_slider").offset().top+$(".container_slider").outerHeight(true);
	
	if(DEBUG) console.log("container height is : ", containerheight);
	
	$(".background").css("height",containerheight);
	$(".background").css("width","100vw");
	
	var height = $img.height();
	var width = $img.width();
	
	
	var superheight = $(".background").height();
	var superwidth = $(".background").width();
	
	
	
	if(DEBUG) console.log("imgage size",height +"xx"+width);
	if(DEBUG) console.log("image contianer size", superheight +"xx"+superwidth);
	
	
	if(width>superwidth && (superheight > superwidth || height < superwidth) ){
		
		$img.css({"height":superheight+"px","width":"auto"});
		if(DEBUG) console.log("height is bigger: ",superheight);
	}
	else {
		$img.css({"width":superwidth+"px","height":"auto"});
		if(DEBUG) console.log("width is bigger", superwidth);
	}
	
	if(superwidth<width){
		var px = -1*(((width-superwidth)/2)/height)*100;
		$img.css("left",px+"%");
		if(DEBUG) console.log("moving image by "+px+"%");
	}else{
		$img.css("left","0%");
	}

	
	
}

function initsize(){
	containerheight =$(".container_slider").offset().top+$(".container_slider").outerHeight(true);
	if(DEBUG) console.log("container height is : ", containerheight);
	$(".background").css("height",containerheight);
	$(".background").css("width","100vw");
	
	var height = $img.height();
	var width = $img.width();
	
	
	var superheight = $(".background").height();
	var superwidth = $(".background").width();
	
	if(DEBUG) console.log("imgage size",height +"xx"+width);
	if(DEBUG) console.log("image contianer size", superheight +"xx"+superwidth);
}

$(window).resize(function() {
	adjustImage(img1);
	adjustImage(img2);
	
});
	





















<commit_msg>fixed black bars<commit_after>//Logs all the action use for debugging 
var DEBUG = true;
//holds the imgages that will be used to displayed in the gallery 
var img1, img2, img3, numImg=7, currentImg=0;


var transform = ["transform", "msTransform", "webkitTransform", "mozTransform", "oTransform"];

$(document).ready(function(){
	img1 = $(".background>.img_container").children().eq(1);
	img2 = $(".background>.img_container").children().eq(0);
	
	
	
	adjustImage(img1);
	adjustImage(img2);
	
	
	//setInterval(img1.addClass("fadeOut").removeClass("fadeOut"), 5000);
	fadeIn();
	
})


function fadeIn(){
	img1.attr("src", getNewImage());
	adjustImage(img1);
	//adjustImage(img2);
	
	img1.removeClass("fadeOut").addClass("fadeIn");
	img2.removeClass("fadeIn").addClass("fadeOut");
	
	setTimeout(fadeOut, 6000);
	if(DEBUG) console.log("fadedIn");
}
function fadeOut(){
	img2.attr("src", getNewImage());
	
	adjustImage(img2);
	//adjustImage(img1);
	
	img2.removeClass("fadeOut").addClass("fadeIn");
	img1.removeClass("fadeIn").addClass("fadeOut");
	
	setTimeout(fadeIn, 6000);
	if(DEBUG) console.log("fadedOut");
	
}
//returns the next image
function getNewImage(){
	var imgpath = "";
	currentImg = (currentImg+1)%numImg;
	imgpath = "img/"+currentImg+".jpg";
	return imgpath;
}

//aligns the image
function adjustImage($img){
	containerheight =$(".container_slider").offset().top+$(".container_slider").outerHeight(true);
	
	if(DEBUG) console.log("container height is : ", containerheight);
	
	$(".background").css("height",containerheight);
	$(".background").css("width","100vw");
	
	var height = $img.height();
	var width = $img.width();
	
	
	var superheight = $(".background").height();
	var superwidth = $(".background").width();
	
	
	
	if(DEBUG) console.log("imgage size",height +"xx"+width);
	if(DEBUG) console.log("image contianer size", superheight +"xx"+superwidth);
	
	
	if(height != superheight ){
		
		$img.css({"height":superheight+"px","width":"auto"});
		if(DEBUG) console.log("height is bigger: ",superheight);
	
		width = $img.width();
	}
	
	if(width<superwidth) {
		$img.css({"width":superwidth+"px","height":"auto"});
		//alert("ran");
		if(DEBUG) console.log("width is bigger", superwidth);
	}
	
	if(superwidth<width){
		var px = -1*(((width-superwidth)/2)/height)*100;
		$img.css("left",px+"%");
		if(DEBUG) console.log("moving image by "+px+"%");
	}else{
		$img.css("left","0%");
	}

	
	
}

function initsize(){
	containerheight =$(".container_slider").offset().top+$(".container_slider").outerHeight(true);
	if(DEBUG) console.log("container height is : ", containerheight);
	$(".background").css("height",containerheight);
	$(".background").css("width","100vw");
	
	var height = $img.height();
	var width = $img.width();
	
	
	var superheight = $(".background").height();
	var superwidth = $(".background").width();
	
	if(DEBUG) console.log("imgage size",height +"xx"+width);
	if(DEBUG) console.log("image contianer size", superheight +"xx"+superwidth);
}

$(window).resize(function() {
	adjustImage(img1);
	adjustImage(img2);
	
});
	













{'fraction_non_alphanumeric': 0.20885042455911168, 'fraction_numerical': 0.016002612671456563, 'mean_word_length': 5.4136125654450264, 'pattern_counts': {'":': 8, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, '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': '5258291', 'n_tokens_mistral': 2196, 'n_tokens_neox': 2005, 'n_words': 372}