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
USE [YourDataBaseName] | |
GO | |
/****** Object: StoredProcedure [dbo].[SqlTableToCSharpClass] Script Date: 4/10/2022 11:51:07 PM ******/ | |
SET ANSI_NULLS ON | |
GO | |
SET QUOTED_IDENTIFIER ON | |
GO |
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
{ | |
"name": "@ckeditor/ckeditor5-build-classic-mds", | |
"version": "0.1.0", | |
"description": "The classic editor build of CKEditor 5 – the best browser-based rich text editor.", | |
"keywords": [ | |
"ckeditor5-build", | |
"ckeditor", | |
"ckeditor5", | |
"ckeditor 5", | |
"wysiwyg", |
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
static getPagination(currentPage: number, totalPages: number): string[] { | |
const delta = 2, | |
left = currentPage - delta, | |
right = currentPage + delta + 1, | |
range: number[] = [], | |
rangeString: string[] = []; | |
let tmp = 0; | |
for (let i = 1; i <= totalPages; i++) { | |
if (i == 1 || i == totalPages || i >= left && i < right) { |
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
export interface GroupByModel { | |
key: any; | |
value: any[]; | |
} | |
export class Utility { | |
static groupBy(xs: any, f: Function): any[] { | |
const groupByObjects = xs.reduce((r: any, v: any, i: any, a: any, k = f(v)) => ((r[k] || (r[k] = [])).push(v), r), {}); | |
const groupByModels: GroupByModel[] = []; | |
for (const obj in groupByObjects) { |
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
<?xml version="1.0" encoding="utf-8"?> | |
<CodeSnippets xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"> | |
<CodeSnippet Format="1.0.0"> | |
<Header> | |
<SnippetTypes> | |
<SnippetType>Expansion</SnippetType> | |
</SnippetTypes> | |
<Title>method</Title> | |
<Author>Mohammad Dayyan</Author> | |
<Description>Code snippet for method</Description> |
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
static convertModelToFormData(model: any, form: FormData = null, namespace = ''): FormData { | |
let formData = form || new FormData(); | |
for (let propertyName in model) { | |
if (!model.hasOwnProperty(propertyName) || model[propertyName] == undefined) continue; | |
let formKey = namespace ? `${namespace}[${propertyName}]` : propertyName; | |
if (model[propertyName] instanceof Date) { | |
formData.append(formKey, this.dateTimeToString(model[propertyName])); | |
} | |
else if (model[propertyName] instanceof Array) { | |
model[propertyName].forEach((element, index) => { |