Skip to content

Instantly share code, notes, and snippets.

@tech-andgar
tech-andgar / documCommentJava.txt
Created August 20, 2017 19:57
DOCUMENTATION COMMENT IN JAVA
Note: [Change name or description] -> []
/*
*<h3>LICENSE</h3>
* <p>
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
@tech-andgar
tech-andgar / documCommentCSharp.txt
Last active March 3, 2020 17:02
DOCUMENTATION COMMENT C#
<Change name or description> --> < >
//===========================================================================
// Copyright © 2017 <The Corporation.> All rights reserved.
//===========================================================================
// Namespace: <Class Namespace>
// Class: <Class Name>
// Description: <Description>
// Author: <Author> Create Date: <DateTime>
@tech-andgar
tech-andgar / documentCommentJava
Created August 20, 2017 20:08
Example Comment Documentation JAVA
/**
* <h1>Add Two Numbers!</h1>
* The AddNum program implements an application that
* simply adds two given integer numbers and Prints
* the output on the screen.
* <p>
* <b>Note:</b> Giving proper comments in your program makes it more
* user friendly and it is assumed as a high quality code.
*
* @author Zara Ali
@tech-andgar
tech-andgar / scriptFix15517.sql
Last active April 13, 2024 07:31
Fix Error 15517 SQL SERVER No se puede ejecutar como la entidad de seguridad de base de datos porque la entidad 'dbo' no existe, este tipo de entidad de seguridad no se puede suplantar o el usuario no tiene permiso.
USE [DB Name]
GO
EXEC dbo.sp_changedbowner @loginame = N'sa', @map = false
GO
select a.name [ENTIDAD],
b.name [CAMPOS],
c.name + '(' + CAST(c.length AS VARCHAR) + ')' AS [TIPO DE DATO],
case when b.isnullable=0 then 'NO' else 'SI' end [NULL],
case when d.name is null then '' else 'X' end [PK],
case when e.parent_object_id is null then '' else 'X' end [FK],
case when h.value is null then '' else h.value end [DESCRIPCIÓN]
from sysobjects as a
join syscolumns as b
on a.id = b.id
@tech-andgar
tech-andgar / dataDictionarySQLSERVER.sql
Created November 21, 2017 13:09
Diccionario de Datos SQL Server 2012 - 2017 (Original Link: https://www.youtube.com/watch?v=9b5UbZDFgHY)
select
d.object_id,
a.name [table], -- identificara la Tabla
b.name [column], -- identificara la columna
c.name [type], -- identificara el Tipo
CASE-- recibe el tipo de columna
--cuando c es numerico o c es decimal o c es Float entonces se precisa el numero
WHEN c.name = 'numeric' OR c.name = 'decimal' OR c.name = 'float' THEN b.precision
ELSE null
END [Precision],
@tech-andgar
tech-andgar / BlurWindowsForms.cs
Created November 26, 2017 07:24
Blur BackgroundImage in Windows Forms
using System.Drawing;
using System.Drawing.Imaging;
using BlurBackground;
...
...
...
namespace Project1
{
public partial class Form1 : Form
{
SELECT T.name AS tabla,
C.name AS columna,
TYP.name AS tipo,
CASE WHEN C.is_nullable=0 THEN 'Falso' ELSE 'Verdadero' END AS EsNulo,
CASE WHEN C.is_identity=0 THEN 'Falso' ELSE 'Verdadero' END AS EsAutonumerico,
CASE WHEN IND.is_unique=0 THEN 'Falso' ELSE 'Verdader' END AS EsUnico,
CASE WHEN IND.is_primary_key=0 THEN 'Falso' ELSE 'Verdadero' END AS EsPrimaryKey,
CASE WHEN F.parent_object_id IS NOT NULL THEN F.Tabla + '.' + F.Columna ELSE '' END AS FK,
COMTS.VALUE AS descripcion
,C.*
@tech-andgar
tech-andgar / dataDictionarySQLFull.sql
Created December 3, 2017 19:28
dataDictionarySQLFull
SELECT T.name AS tabla,
C.name AS columna,
TYP.name AS tipo,
CASE WHEN C.is_nullable=0 THEN 'Falso' ELSE 'Verdadero' END AS EsNulo,
CASE WHEN C.is_identity=0 THEN 'Falso' ELSE 'Verdadero' END AS EsAutonumerico,
CASE WHEN IND.is_unique=0 THEN 'Falso' ELSE 'Verdader' END AS EsUnico,
CASE WHEN IND.is_primary_key=0 THEN 'Falso' ELSE 'Verdadero' END AS EsPrimaryKey,
CASE WHEN F.parent_object_id IS NOT NULL THEN F.Tabla + '.' + F.Columna ELSE '' END AS FK,
COMTS.VALUE AS descripcion
,C.*
SELECT
d.[primary key],
d.[foreign key],
CASE
WHEN LEN(d.[column]) = 0 THEN d.[table]
ELSE ''
END AS [table],
d.[column],
CAST(d.[description] AS VARCHAR(MAX)) AS [description],
d.[data type],