This file contains 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
Add the next code in Key Bindings User | |
{ | |
"keys" : ["ctrl+shift+r"], | |
"command": "reindent" , | |
"args": { "single_line": false } | |
} |
This file contains 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
DECLARE @Numero_Pagina INT = 2, @Filas_x_Pagina INT = 5 | |
DECLARE @vDepNombre VARCHAR(500) = null, @iDepCodigoPadre INT = NULL, @Cantidad_Registros INT | |
SELECT iDepCodigo,vDepNombre,cDepEstado,iDepCodigoPadre | |
FROM gen.DEPENDENCIA AS U | |
--INNER JOIN XXXX AS MU ON U.CODX = MU.CODX | |
--INNER JOIN YYYYYY AS CU ON CU.CODY = U.CODY | |
--AND u.cDepEstado = 'A' | |
WHERE | |
(@vDepNombre is null OR U.vDepNombre like CONCAT('%',@vDepNombre,'%') ) | |
AND |
This file contains 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
var fechaString = '25/08/2016'; | |
function parsearFecha(stringDate){ | |
var arregloFEchas = stringDate.split("/"); | |
var fecha = new Date(arregloFEchas[2] + '/' + arregloFEchas[1] + '/' + arregloFEchas[0]); | |
var dia = fecha.getDate(); | |
var mes = fecha.getMonth() + 1; | |
var anio = fecha.getFullYear(); | |
var tiempo = 30; |
This file contains 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 validaDNI(dni){ | |
var ex_regular_dni; | |
ex_regular_dni = /^\d{8}(?:[-\s]\d{4})?$/; | |
if(ex_regular_dni.test (dni) == true){ | |
alert('Dni corresponde'); | |
}else{ | |
alert('Dni erroneo, formato no válido'); | |
} | |
} |
This file contains 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 isNumberKey(evt) | |
{ | |
var charCode = (evt.which) ? evt.which : event.keyCode | |
if (charCode > 31 && (charCode < 48 || charCode > 57)) | |
return false; | |
return true; | |
} | |
//Llamarlo | |
<input onkeypress="isNumberKey(evt)"/> |
This file contains 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
$("#cboObjetivo option:eq(1)").prop('selected', true);//eq(1) Indice de Opcion | |
$('#cboObjetivo').chosen(); | |
$('#cboObjetivo').trigger('chosen:updated'); | |
$('#cboObjetivo').change(); |
This file contains 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
@echo off | |
REM AUTHOR=Jose Vinces | |
REM #dsdfsd | |
set year=%date:~-4,4% | |
set month=%date:~-10,2% | |
set day=%date:~-7,2% | |
set hour=%time:~-11,2% | |
set hour=%hour: =0% | |
set min=%time:~-8,2% | |
set sharedMortifago="\\10.10.21.230\backups\WebS\" |
This file contains 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
@echo off | |
REM AUTHOR=Jose Vinces | |
REM #dsdfsd | |
set year=%date:~-4,4% | |
set month=%date:~-10,2% | |
set day=%date:~-7,2% | |
set hour=%time:~-11,2% | |
set hour=%hour: =0% | |
set min=%time:~-8,2% | |
set sharedMortifago="\\10.10.21.230\backups\WebS2\" |
This file contains 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
/* Drop all non-system stored procs */ | |
DECLARE @name VARCHAR(128) | |
DECLARE @SQL VARCHAR(254) | |
DECLARE @schem varchar(128) | |
DECLARE @CantidadIteraciones INT | |
--SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name]) | |
SELECT TOP 1 @schem = SCHEMA_NAME(schema_id), @name = [name] FROM sys.procedures ORDER BY [name] | |
SET @CantidadIteraciones = ( SELECT count(*) from sys.procedures ) | |
WHILE @CantidadIteraciones>0 |
This file contains 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
//Dependencias | |
import org.apache.struts2.StrutsStatics; | |
import javax.servlet.ServletResponse; | |
import javax.servlet.http.HttpServletResponse; | |
public String metodoprueba() throws Exception { | |
final String origen = "loginAccion.metodoprueba"; | |
HttpServletResponse httpResponse =ServletActionContext.getResponse(); | |
httpResponse.setHeader("Access-Control-Allow-Origin", "*"); | |
httpResponse.setHeader("Access-Control-Allow-Methods", "POST, GET, PUT, OPTIONS, DELETE"); |