Posts

Showing posts from 2015

Sumar dos columnas en un Tabular Form

Image
El siguiente código de Javascript recibirá 3 parámetros, el id de la fila que se sumará, las dos columnas que se sumarán y la columna donde se guardará el resultado. function sumaTabularForm(id, c1,c2,c3){ //suma dos columnas de un tabular form (c1, c2) // y el resultado lo almacena en una columna (c3) //c1, c2, Columnas que se van a sumar //c3 Columna en la que se almacena el resultado // Obtener la fila en la que se realiza la operación var row= id.slice(4); // Obtener los valores como números. var val1 = document.getElementById("f"+c1+"_"+row); var val2 = document.getElementById("f"+c2+"_"+row); // sumar (restar multiplicar o lo que quieran hacer con las columnas...) var total = val1 + val2; //Asignar el resultado en la columna de respuesta. document.getElementById("f"+c3+"_"+row).value = total; } Ahora en la columna del taublar form colocaremos el llamado a la función de JavaScript. para ello colocamos la sigui

Change Owner and Group of Folder and Subfolders with commandLine

Image
[Skip if you are busy] I wanted to share my music with my brother's user account, but I didn't want to make a copy of that or move it, then I created a group called publicmedia changed the permissions of the folder 'Music' and assigned it to the group publicmedia, but I had to do it for every single sub folder in the folder Music. To change the permissions is easy by using the option "change Permissions for Enclosed Files", but it didn't change the group, then I searched and this is what I found [Here is the important] The next command will change the group and the owner of a folder, by using the option -R it does recursively for every subfolder inside chown -R snipercat:publicmedia Music [IMPORTANT!] If the owner of the folder enabled the option to encrypt the folder, this will not work unless the owner of the folder logged in before, you have to set it off, try with this How to Disable Home Folder Encryption After Installing Ubuntu . sourc