<commit_before>var text4imagestyles={
    text:{fontSize:"28px",whiteSpace: "pre"}
}

var imgFromuti=function(uti)
{
    var utiParts = uti.split('.');
    return (pad(utiParts[0],3)+"/"+pad(utiParts[0],3)+"-"+pad(utiParts[1],4)+".jpg");
}
var pad=function (num, size) {
    var s = "000000000" + num;
    return s.substr(s.length-size);
}

var Text4ImageComponent=null;

var systemReady2=function() {
 Text4ImageComponent=React.createClass({
    prevImage:function(event){
        console.log("prevImage");
        ksa.prev({db:db,uti:this.props.uti,count:1},function(err,res){
            if(!err)text4imageFetch(res[0].uti);
        });
    },

    nextImage:function(event){
        console.log("nextImage");
        ksa.next({db:db,uti:this.props.uti,count:1},function(err,res){
            if(!err)text4imageFetch(res[0].uti);
        });
    },
    imagefilename:function(){
        return image_url_prefix + imgFromuti(this.props.uti);
        //this.props.uti
        //return "../adarsha_img/lijiang/001/001-127b.jpg";
        //return "images/001-001b.jpg";
    }
    ,resize:function(domnode){
        setTimeout(function(){
            domnode.iviewer("set_zoom", 100);
        },200)
    }
    ,componentDidMount:function() {
        var domnode=$(this.refs.imageviewer);
        domnode.iviewer({src:this.imagefilename(),zoom_max :1000,zoom_min:100,mousewheel: true});
        this.resize(domnode);
    }
    ,componentDidUpdate:function(){
        var domnode=$(this.refs.imageviewer);
        domnode.iviewer("loadImage",this.imagefilename());
        this.resize(domnode);
    }
    ,render:function(){
        return E("div",{},
            E("button",{className:"prevImage",onClick:this.prevImage},"prev"),
            E("button",{className:"nextImage",onClick:this.nextImage},"next"),
            E("br"),
            E("div",{className:"viewer",style:{height:"330px",width:"1280px"},ref:"imageviewer"}),
          //  E("image",{src:this.imagefilename()}),
            E("div",{style:text4imagestyles.text},this.props.uti,"\n",this.props.text)
        );
    }<commit_msg>img text className<commit_after>var text4imagestyles={
    text:{fontSize:"28px",whiteSpace: "pre"}
}

var imgFromuti=function(uti)
{
    var utiParts = uti.split('.');
    return (pad(utiParts[0],3)+"/"+pad(utiParts[0],3)+"-"+pad(utiParts[1],4)+".jpg");
}
var pad=function (num, size) {
    var s = "000000000" + num;
    return s.substr(s.length-size);
}

var Text4ImageComponent=null;

var systemReady2=function() {
 Text4ImageComponent=React.createClass({
    prevImage:function(event){
        console.log("prevImage");
        ksa.prev({db:db,uti:this.props.uti,count:1},function(err,res){
            if(!err)text4imageFetch(res[0].uti);
        });
    },

    nextImage:function(event){
        console.log("nextImage");
        ksa.next({db:db,uti:this.props.uti,count:1},function(err,res){
            if(!err)text4imageFetch(res[0].uti);
        });
    },
    imagefilename:function(){
        return image_url_prefix + imgFromuti(this.props.uti);
        //this.props.uti
        //return "../adarsha_img/lijiang/001/001-127b.jpg";
        //return "images/001-001b.jpg";
    }
    ,resize:function(domnode){
        setTimeout(function(){
            domnode.iviewer("set_zoom", 100);
        },200)
    }
    ,componentDidMount:function() {
        var domnode=$(this.refs.imageviewer);
        domnode.iviewer({src:this.imagefilename(),zoom_max :1000,zoom_min:100,mousewheel: true});
        this.resize(domnode);
    }
    ,componentDidUpdate:function(){
        var domnode=$(this.refs.imageviewer);
        domnode.iviewer("loadImage",this.imagefilename());
        this.resize(domnode);
    }
    ,render:function(){
        return E("div",{},
            E("button",{className:"prevImage",onClick:this.prevImage},"prev"),
            E("button",{className:"nextImage",onClick:this.nextImage},"next"),
            E("br"),
            E("div",{className:"viewer",style:{height:"330px",width:"1280px"},ref:"imageviewer"}),
          //  E("image",{src:this.imagefilename()}),
            //E("div",{style:text4imagestyles.text},this.props.uti,"\n",this.props.text)
            E("div",{className:"textBox"},this.props.uti,"\n",this.props.text)
        );
    }
{'fraction_non_alphanumeric': 0.19092185306504444, 'fraction_numerical': 0.029480580252690687, 'mean_word_length': 3.1788856304985336, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, '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': '6133198', 'n_tokens_mistral': 1499, 'n_tokens_neox': 1427, 'n_words': 141}