<commit_before>/*jslint devel: true*/
/*global perfis */

// variables
var project, beam, vk, mk, lbForm, section, steel, fyForm, fuForm, EForm;
var ml, d, bf, tw, tf, h, dl, area, ix, wx, rx, zx, iy, wy, ry, zy, rt, it, mesa, alma, cw, u;
var fy, fu, E, aw, gama, gama1, cb, kv, lb, kc, tr, beta1, a;
var lambV, lambpV, lambrV, vpl, vrd;
var mpl, lambA, lambpA, lambrA, mrA, mcrA, mrdA;
var lambM, lambpM, lambrM, mrM, mcrM, mrdM;
var lambT, lambpT, lambrT, mrT, mcrT, mrdT;
var vsd, msd, vrd, mrd, mrdOut, situationV, situationA, situationM, situationT, result;
var ratioCSV, ratioCSM, ratiopCSV, ratiopCSM;

var steelProp = [
    {
        "steelType": "ASTM A36/ MR250",
        "fy": 250,
        "fu": 400,
        "E": 200000
    },
    {
        "steelType": "ASTM A572 G50/ AR345",
        "fy": 345,
        "fu": 450,
        "E": 200000
    }
];

function processFormDS() {
    "use strict";
    var i, j;

    // Getting project values from HTML form inputs
        
    project = document.formDS.projectDS.value;
    /* if (project === "") {
        alert("Por favor preencha o campo Projeto.");
     console.log("Por favor preencha o campo Projeto.");
        return false;
    } */
    if (project === "") {
        project = "Exemplo 1";
    }
        
    beam = document.formDS.beamDS.value;
    /* if (beam === "") {
        alert("Por favor preencha o campo Viga.");
        console.log("Por favor preencha o campo Viga.");
        return false;
    } */
    if (beam === "") {
        beam = "V1";
    }
        
    vk = Number(document.formDS.vDS.value);
    if (document.formDS.vDS.value === "" || isNaN(vk)) {
        alert("Por favor preencha o campo Cortante com números.");
        console.log("Por favor preencha o campo Cortante.");
        return false;
    }
        
    mk = Number(document.formDS.mDS.value);
    if (document.formDS.mDS.value === "" || isNaN(mk)) {
        alert("Por favor preencha o campo Momento com números.");
        console.log("Por favor preencha o campo Momento.");
        return false;
    }
        
    lbForm = Number(document.formDS.lbDS.value);
    if (document.formDS.lbDS.value === "" || isNaN(lbForm)) {
        alert("Por favor preencha o campo Distância entre travamentos laterais com números.");
        console.log("Por favor preencha o campo Distância entre travamentos laterais com números.");
        return false;
    }
        
    steel = steelProp[Number(document.formDS.typeS.value)].steelType;
    gama = Number(document.formDS.gama.value);
    gama1 = Number(document.formDS.gama1.value);
    cb = Number(document.formDS.cb.value);
    
    for (i = 0; i < perfis.length; i += 1) { //Looping through our available sections
        section = perfis[i].bitola;
    
        // START OF FUNCTION TO SAVE CHECK EACH SECTION
        
        // Getting section properties

        ml = perfis[i].ml;
        d = perfis[i].d;
        bf = perfis[i].bf;
        tw = perfis[i].tw;
        tf = perfis[i].tf;
        h = perfis[i].h;
        dl = perfis[i].dl;
        area = perfis[i].area;
        ix = perfis[i].ix;
        wx = perfis[i].wx;
        rx = perfis[i].rx;
        zx = perfis[i].zx;
        iy = perfis[i].iy;
        wy = perfis[i].wy;
        ry = perfis[i].ry;
        zy = perfis[i].zy;
        rt = perfis[i].rt;
        it = perfis[i].it;
        mesa = perfis[i].mesa;
        alma = perfis[i].alma;
        cw = perfis[i].cw;
        u = perfis[i].u;

        // Getting values from steel properties array
        j = Number(document.getElementById("acos").value);

        fyForm = steelProp[j].fy;
        fuForm = steelProp[j].fu;
        EForm = steelProp[j].E;

        // Calculating kv
        if (((a / h) > 3) || ((a / h) > Math.pow(260 / (h / tw), 2)) || (document.getElementById("stiffeningCS").checked === true)) {
            kv = 5;
        } else {
            kv = 5 + 5 / (Math.pow(a / h, 2));
        }

        // Calculating parameters 
        aw = (d * tw) / 100;
        lb = lbForm * 100;
        fy = fyForm / 10;
        fu = fuForm / 10;
        E = EForm / 10;
        beta1 = (0.7 * fy * wx) / (E * it);
        kc = 4 / Math.sqrt(h / tw);
        tr = 0.3 * fy;

        // Shear Vrd
        lambV = h / tw;<commit_msg>Update scriptDS.js<commit_after>/*jslint devel: true*/
/*global perfis */

// variables
var project, beam, vk, mk, lbForm, section, steel, fyForm, fuForm, EForm;
var ml, d, bf, tw, tf, h, dl, area, ix, wx, rx, zx, iy, wy, ry, zy, rt, it, mesa, alma, cw, u;
var fy, fu, E, aw, gama, gama1, cb, kv, lb, kc, tr, beta1, a;
var lambV, lambpV, lambrV, vpl, vrd;
var mpl, lambA, lambpA, lambrA, mrA, mcrA, mrdA;
var lambM, lambpM, lambrM, mrM, mcrM, mrdM;
var lambT, lambpT, lambrT, mrT, mcrT, mrdT;
var vsd, msd, vrd, mrd, mrdOut, situationV, situationA, situationM, situationT, result;
var ratioCSV, ratioCSM, ratiopCSV, ratiopCSM;

var steelProp = [
    {
        "steelType": "ASTM A36/ MR250",
        "fy": 250,
        "fu": 400,
        "E": 200000
    },
    {
        "steelType": "ASTM A572 G50/ AR345",
        "fy": 345,
        "fu": 450,
        "E": 200000
    }
];

kv = 5; // "Enricejedor" not available Kv = 5 

function processFormDS() {
    "use strict";
    var i, j;

    // Getting project values from HTML form inputs
        
    project = document.formDS.projectDS.value;
    /* if (project === "") {
        alert("Por favor preencha o campo Projeto.");
     console.log("Por favor preencha o campo Projeto.");
        return false;
    } */
    if (project === "") {
        project = "Exemplo 1";
    }
        
    beam = document.formDS.beamDS.value;
    /* if (beam === "") {
        alert("Por favor preencha o campo Viga.");
        console.log("Por favor preencha o campo Viga.");
        return false;
    } */
    if (beam === "") {
        beam = "V1";
    }
        
    vk = Number(document.formDS.vDS.value);
    if (document.formDS.vDS.value === "" || isNaN(vk)) {
        alert("Por favor preencha o campo Cortante com números.");
        console.log("Por favor preencha o campo Cortante.");
        return false;
    }
        
    mk = Number(document.formDS.mDS.value);
    if (document.formDS.mDS.value === "" || isNaN(mk)) {
        alert("Por favor preencha o campo Momento com números.");
        console.log("Por favor preencha o campo Momento.");
        return false;
    }
        
    lbForm = Number(document.formDS.lbDS.value);
    if (document.formDS.lbDS.value === "" || isNaN(lbForm)) {
        alert("Por favor preencha o campo Distância entre travamentos laterais com números.");
        console.log("Por favor preencha o campo Distância entre travamentos laterais com números.");
        return false;
    }
        
    steel = steelProp[Number(document.formDS.typeS.value)].steelType;
    gama = Number(document.formDS.gama.value);
    gama1 = Number(document.formDS.gama1.value);
    cb = Number(document.formDS.cb.value);
    
    for (i = 0; i < perfis.length; i += 1) { //Looping through our available sections
        section = perfis[i].bitola;
    
        // START OF FUNCTION TO SAVE CHECK EACH SECTION
        
        // Getting section properties

        ml = perfis[i].ml;
        d = perfis[i].d;
        bf = perfis[i].bf;
        tw = perfis[i].tw;
        tf = perfis[i].tf;
        h = perfis[i].h;
        dl = perfis[i].dl;
        area = perfis[i].area;
        ix = perfis[i].ix;
        wx = perfis[i].wx;
        rx = perfis[i].rx;
        zx = perfis[i].zx;
        iy = perfis[i].iy;
        wy = perfis[i].wy;
        ry = perfis[i].ry;
        zy = perfis[i].zy;
        rt = perfis[i].rt;
        it = perfis[i].it;
        mesa = perfis[i].mesa;
        alma = perfis[i].alma;
        cw = perfis[i].cw;
        u = perfis[i].u;

        // Getting values from steel properties array
        j = Number(document.getElementById("acos").value);

        fyForm = steelProp[j].fy;
        fuForm = steelProp[j].fu;
        EForm = steelProp[j].E;
       
        // Calculating parameters 
        aw = (d * tw) / 100;
        lb = lbForm * 100;
        fy = fyForm / 10;
        fu = fuForm / 10;
        E = EForm / 10;
        beta1 = (0.7 * fy * wx) / (E * it);
        kc = 4 / Math.sqrt(h / tw);
        tr = 0.3 * fy;

        // Shear Vrd
        lambV = h / tw;
{'fraction_non_alphanumeric': 0.14947647129618485, 'fraction_numerical': 0.016488145384522805, 'mean_word_length': 1.945763913505849, 'pattern_counts': {'":': 16, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2838915', 'n_tokens_mistral': 3162, 'n_tokens_neox': 2973, 'n_words': 786}