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
SELECT | |
fk.name 'FK Name', | |
tp.name 'Parent table', | |
cp.name, cp.column_id, | |
tr.name 'Refrenced table', | |
cr.name, cr.column_id | |
FROM | |
sys.foreign_keys fk | |
INNER JOIN | |
sys.tables tp ON fk.parent_object_id = tp.object_id |
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 tabelas CURSOR FOR | |
SELECT TABLE_NAME | |
FROM INFORMATION_SCHEMA.TABLES | |
OPEN tabelas | |
DECLARE @tablename sysname | |
FETCH NEXT FROM tabelas INTO @tablename | |
WHILE (@@FETCH_STATUS <> -1) BEGIN | |
IF (@@FETCH_STATUS <> -2) BEGIN | |
IF LEFT(@tablename,3)<>'TS_' BEGIN | |
SELECT @tablename = RTRIM(@tablename) |
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
------------------------------------------------------------------------------------------ | |
- CRIANDO TABELA DE TESTES | |
------------------------------------------------------------------------------------------ | |
CREATE TABLE TB_CADUNICO ( |
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 @TableName VARCHAR(MAX) = 'NewsItem' -- Replace 'NewsItem' with your table name | |
DECLARE @TableSchema VARCHAR(MAX) = 'Markets' -- Replace 'Markets' with your schema name | |
DECLARE @result varchar(max) = '' | |
SET @result = @result + 'using System;' + CHAR(13) + CHAR(13) | |
IF (@TableSchema IS NOT NULL) | |
BEGIN | |
SET @result = @result + 'namespace ' + @TableSchema + CHAR(13) + '{' + CHAR(13) | |
END |
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 @TableSchema VARCHAR(MAX) = 'Models' | |
DECLARE tables_cursor CURSOR FOR | |
SELECT TABLE_NAME | |
FROM INFORMATION_SCHEMA.TABLES | |
OPEN tables_cursor | |
DECLARE @TableName VARCHAR(MAX) = '' |
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
namespace EfAndCpf | |
{ | |
public class Email | |
{ | |
public string EmailValue { get; private set; } | |
private Email() | |
{ | |
} |
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
public class AllowCrossSiteJsonAttribute : ActionFilterAttribute | |
{ | |
public override void OnActionExecuting(ActionExecutingContext filterContext) | |
{ | |
filterContext.RequestContext.HttpContext.Response.AddHeader("Access-Control-Allow-Origin", "*"); | |
base.OnActionExecuting(filterContext); | |
} | |
} |
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
open System | |
open System.Data | |
open System.IO | |
open System.Text.RegularExpressions | |
type DeathTypes = | |
| MOD_UNKNOWN=1 | MOD_SHOTGUN=2 | MOD_GAUNTLET=3 | MOD_MACHINEGUN=4 | |
| MOD_GRENADE_SPLASH=5 | MOD_ROCKET=6 | MOD_ROCKET_SPLASH=7 | MOD_PLASMA=8 | |
| MOD_PLASMA_SPLASH=9 | MOD_RAILGUN=10 | MOD_LIGHTNING=11 | MOD_BFG=12 | |
| MOD_BFG_SPLASH=13 | MOD_WATER=14 | MOD_SLIME=15 | MOD_LAVA=16 |
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
class Jogada { | |
constructor(_tipo, jogador){ | |
if (!(jogador instanceof Jogador)) | |
throw {type:"jp_argument", message:"argumento de tipo invalido"}; | |
this.tipo = _tipo; | |
this.jogador = jogador; |
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
class Jogada { | |
constructor(_tipo, jogador){ | |
if (!(jogador instanceof Jogador)) | |
throw {type:"jp_argument", message:"argumento de tipo invalido"}; | |
this.tipo = _tipo; | |
this.jogador = jogador; | |
this.ganhaDe = []; |
OlderNewer