<commit_before>QB.init(24507, 'eskKgMVUc7nRSbq', 'UW6VdHKdAV8Jxc7',true);
$(document).ready(function(){
	QB.createSession({login: 'vladlukhanin', password: '<PASSWORD>'}, function(err, result){
	   if (err) { 
	        console.log('Something went wrong: ' + err);
	    } else {
	        console.log('Session created with id ' + result.id);
	 		var token = result.token;

	 		// get content images
	        QB.content.list({page:'1', per_page: '6'}, function(error, response){
	    	  	$.each(response.items, function(index, item){
	    	  		var cur = this.blob;
    					// response.items.length = response.total_entries;
	    	  		$('#pictures').append("<img src='http://api.quickblox.com/blobs/"+cur.id+"/download.xml?token="+token+"' alt='"+cur.name+"' class='animals img-responsive col-md-6 col-sm-6 col-xs-6' />");
	    	  	}); 
				  if (error) { 
		       		 console.log(error);
		    	  } else {
		    	  	console.log(response);	    	  	
		    	  }

				});
	    }
    });

		// $(window).scroll( function (e) {
		// 	var need_height = $(window).height();
		// 	if ($(document).scrollTop() > need_height) {
		//         alert('Элемент foo был прокручен... скроллирован... ну как там это называется то?!');
		// 	}
		// });
	
});

<commit_msg>initial version of content sample<commit_after>QB.init(24507, 'eskKgMVUc7nRSbq', 'UW6VdHKdAV8Jxc7',true);

var user_id;

$(document).ready(function(){
	QB.createSession({login: 'vladlukhanin', password: '<PASSWORD>'}, function(err, result){
	   if (err) { 
	        console.log('Something went wrong: ' + err);
	    } else {
	        console.log('Session created with id ' + result.id);
	 		var token = result.token;
	 			user_id = result.id;

	 		// get content images
	        QB.content.list({page:'1', per_page: '6'}, function(error, response){
	    	  	$.each(response.items, function(index, item){
	    	  		var cur = this.blob;
	    	  		$('#pictures').append("<img src='http://api.quickblox.com/blobs/"+cur.id+"/download.xml?token="+token+"' alt='"+cur.name+"' class='animals img-responsive col-md-6 col-sm-6 col-xs-6' />");
	    	  	}); 
				  if (error) { 
		       		 console.log(error);
		    	  } else {
		    	  	console.log(response);	    	  	
		    	  }

			});


			var files = $("input[type=file]")[0].files;

			QB.content.create({name: "Test file", content_type: "image/jpeg", 'public': true}, function(err, response){
				if (err) {
			        console.log(err);
			    } else {
			        // Response will contain blob ID.

			        var data = {
			            blob_id: response.id,
			            blob_owner: user_id
			        }

			    }
			});
	    }
    });

		$(window).scroll(function() {
		     if  ($(window).scrollTop() == $(document).height() - $(window).height()) 
		     {
		        alert("это сработало событие");
		     }
		});
	
});
{'fraction_non_alphanumeric': 0.184686281460475, 'fraction_numerical': 0.010280042538107055, 'mean_word_length': 2.316098707403055, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '487159', 'n_tokens_mistral': 1131, 'n_tokens_neox': 995, 'n_words': 169}