UPDATE dept_manager set emp_no = (select emp_no from employees limit 1) where emp_no=110039;
UPDATE detalle_plantillas_factura dest,
(SELECT id_detalle_plantilla id, campo,X,Y,ancho,alto,tipo
FROM detalle_plantillas_factura WHERE id_plantilla_factura=102) src
SET
dest.campo=src.campo,
dest.x = src.x,
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* verificar sitios en linux | |
nano /etc/apache2/sites-enabled/000-default.conf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------------- Para usar archivo .pm con ruta relativa ------------------------------------------------------ | |
use FindBin qw($Bin); # /home/proyecto/scripts | |
use File::Basename qw(dirname); # /home/proyecto | |
use File::Spec::Functions qw(catdir); | |
use lib catdir(dirname($Bin),'reportes'); # /home/proyecto/reportes | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Primero habilitar | |
sudo a2enmod rewrite | |
# Configurar el siguiente archivo | |
sudo nano /etc/apache2/sites-available/000-default.conf | |
# Y agregar la siguiente linea al final del documento | |
<Directory "/var/www/html"> | |
AllowOverride All | |
</Directory> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"C:\Program Files (x86)\Atlassian\SourceTree\tools\putty\plink.exe" -ssh [email protected] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------------------------------- POST ------------------------------- | |
$.post(ruta,{ids:ids_movimientos},function(data, status, jqXHR){ | |
console.log(data); | |
console.log("status: "+status); | |
console.log(jqXHR); | |
},"json").fail(function(e) { | |
alert( e.responseText ); | |
}); | |
------------------------------- GET ------------------------------- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getALLROWSselected(id_grid){ | |
var rowindexes = $('#'+id_grid).jqxGrid('getselectedrowindexes'); | |
var allRow = new Array(); | |
for (var i = 0; i < rowindexes.length; i++) { | |
var datarow = $('#'+id_grid).jqxGrid('getrowdata', rowindexes[i]); | |
allRow.push(datarow); | |
} | |
return allRow; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Crea el evento para escuchar | |
$( "#id_ejemplo" ).on( "valido", function( event, mnsg ) { | |
console.log(mnsg); | |
}); | |
En otro archivo ó en el mismo despachas el evento | |
$( "#id_ejemplo" ).trigger( "valido", "ya termino de subir el archivo" ); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public function test(){ | |
$vector = ["hola", "como", "estan"]; | |
$this->test2($vector, function(){ | |
echo "soy un mensaje desde la funcion"; | |
},"el mensaje de arriba es el chido"); | |
} | |
public function test2($arr, $response, $mensaje){ | |
print_r($arr); | |
$response(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function basic( callback ){ | |
console.log( 'do something here' ); | |
var result = 'i am the result of `do something` to be past to the callback'; | |
// if callback exist execute it | |
callback && callback( result ); | |
} | |
function callbacks_with_call( arg1, arg2, callback ){ |