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
ext install ms-vscode.csharp (C#) | |
{ | |
"editor.multiCursorModifier": "ctrlCmd", | |
"editor.links": false, | |
"workbench.colorCustomizations": { | |
"editor.findMatchBackground": "#ff0000", | |
"editor.findMatchHighlightBackground": "#40ccc5", | |
"editor.selectionHighlightBackground": "#e7e416" |
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
<Window x:Class="WPFDemo.MainWindow" | |
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" | |
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" | |
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" | |
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" | |
xmlns:local="clr-namespace:WPFDemo" | |
mc:Ignorable="d" | |
Title="WPF Demo" Height="450" Width="500" | |
FontSize="18" FontFamily="Segoe UI"> | |
<Grid> |
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
-- find tables by name | |
SELECT * | |
FROM sys.objects | |
WHERE type = 'U' | |
AND [name] LIKE '%xxx%' | |
ORDER BY 1 | |
-- find tables with specified column | |
SELECT DISTINCT o.name | |
FROM sys.columns c |
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
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<title></title> | |
<!-- TODO ref cdn here and at the bottom --> | |
<link href="css/bootstrap.min.css" rel="stylesheet" /> | |
</head> | |
<body> |
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
-- USER SQL | |
CREATE USER <UserName> IDENTIFIED BY <password> | |
DEFAULT TABLESPACE "RED_METADATA" | |
TEMPORARY TABLESPACE "TEMP"; | |
-- ROLES | |
GRANT "RESOURCE" TO <UserName> ; | |
ALTER USER <UserName> DEFAULT ROLE "RESOURCE"; | |
Note: All alpha characters in the user name should be in caps |
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
---------------------------------------------------------------------------------------------------- | |
-- <<< system tables >>> | |
---------------------------------------------------------------------------------------------------- | |
-- get RED meta data tables | |
SELECT * | |
FROM sys.objects | |
WHERE (name LIKE 'ws_%' or name LIKE 'dss_%ac%' ) | |
AND type = 'U' | |
ORDER BY 1 |
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
DECLARE @startDate DATETIME = '20130703' | |
DECLARE @endDate DATETIME = '20140703' | |
IF ((MONTH(@endDate) * 100 + DAY(@endDate)) - (MONTH(@startDate) * 100 + DAY(@startDate))) >= 0 | |
SELECT DATEDIFF(YEAR,@startDate, @endDate) | |
ELSE | |
SELECT DATEDIFF(YEAR,@startDate, @endDate) - 1 |