using System.Collections.Generic;
using System.Linq;
namespace Web.Utility.Extensions
{
public static class IEnumerableExtensions
{
public static IEnumerable<(T item, int index)> WithIndex<T>(this IEnumerable<T> self) => self?.Select((item, index) => (item, index)) ?? new List<(T, int)>();
}
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 @temp as table ( | |
DayDate date not null, | |
Inventory int null | |
) | |
insert into @temp | |
values | |
('01-01-2022', 1234), | |
('02-01-2022', null), | |
('03-01-2022', null), |
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
-- https://dataedo.com/kb/query/azure-sql/list-of-tables-by-their-size | |
-- Get table sizes from Azure SQL database | |
select schema_name(tab.schema_id) + '.' + tab.name as [table], | |
cast(sum(spc.used_pages * 8)/1024.00/1024.00 as numeric(36, 2)) as used_gb, | |
cast(sum(spc.total_pages * 8)/1024.00/1024.00 as numeric(36, 2)) as allocated_gb | |
from sys.tables tab | |
inner join sys.indexes ind | |
on tab.object_id = ind.object_id | |
inner join sys.partitions part | |
on ind.object_id = part.object_id and ind.index_id = part.index_id |
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
from telethon import TelegramClient, events | |
api_id = 123456 | |
api_hash = '<someHash>' | |
channel = '@someChannel' | |
client = TelegramClient('session', api_id, api_hash) | |
@client.on(events.NewMessage(chats=channel)) | |
async def my_event_handler(event): |
-- Create Login
CREATE LOGIN ApplicationUser
WITH PASSWORD = 'foo secured password';
-- Preconditions:
-- Connected to Azure SQL specific database
--------------------------------------------
-- Create User
install Azure CLI
https://docs.microsoft.com/en-us/cli/azure/install-azure-cli
install devops extension
az extension add --name azure-devops
https://medium.com/touch4it/end-to-end-testing-with-puppeteer-and-jest-ec8198145321
-
Install NodeJS
-
Prepare project