Skip to content

Instantly share code, notes, and snippets.

View uzbekdev1's full-sized avatar
🌴
On vacation

Elyor Latipov uzbekdev1

🌴
On vacation
View GitHub Profile
import {
Directive, TemplateRef, Input, ChangeDetectorRef, ViewContainerRef,
IterableDiffers, OnChanges, SimpleChanges, SimpleChange
} from '@angular/core';
import { NgFor } from "@angular/common";
import { NgForRow } from "@angular/common/src/directives/ng_for";
@Directive({
selector: '[ngFor][ngForIn]'
})
@uzbekdev1
uzbekdev1 / CasecadeDelete.sql
Created January 15, 2019 19:49 — forked from lionofdezert/CasecadeDelete.sql
Casecade Delete in SQL Server
USE AdventureWorks
GO
--============== Supporting function dbo.udfGetFullQualName
IF OBJECT_ID('dbo.udfGetFullQualName') IS NOT NULL
DROP FUNCTION dbo.udfGetFullQualName
GO
CREATE FUNCTION dbo.udfGetFullQualName ( @ObjectId INTEGER )
@uzbekdev1
uzbekdev1 / what-forces-layout.md
Created January 15, 2019 12:27 — forked from paulirish/what-forces-layout.md
What forces layout/reflow. The comprehensive list.

What forces layout / reflow

All of the below properties or methods, when requested/called in JavaScript, will trigger the browser to synchronously calculate the style and layout*. This is also called reflow or layout thrashing, and is common performance bottleneck.

Element

Box metrics
  • elem.offsetLeft, elem.offsetTop, elem.offsetWidth, elem.offsetHeight, elem.offsetParent
  • elem.clientLeft, elem.clientTop, elem.clientWidth, elem.clientHeight
  • elem.getClientRects(), elem.getBoundingClientRect()
@uzbekdev1
uzbekdev1 / CascadeDeleteAttribute.cs
Created January 10, 2019 22:28 — forked from tystol/CascadeDeleteAttribute.cs
Entity Framework CascadeDelete using Data Annotations
using System;
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
public class CascadeDeleteAttribute : Attribute { }
@uzbekdev1
uzbekdev1 / payone
Created December 30, 2018 08:10 — forked from otarza/payone
<form action="https://secure.pay1.de/client-api/" method="POST">
<input type="hidden" name="portalid" value="2000000">
<input type="hidden" name="aid" value="10000">
<input type="hidden" name="mode" value="test">
<input type="hidden" name="request" value="bankaccountcheck">
<input type="hidden" name="successurl" value="http://www.yoursite.com/success.php">
<input type="hidden" name="errorurl" value="http://www.yoursite.com/error.php">
<input type="hidden" name="hash" value="70eaec2a33fa1b4674c0b1ge5e982966">
<input type="hidden" name="responsetype" value="REDIRECT">
<input type="hidden" name="language" value="en">
@uzbekdev1
uzbekdev1 / sites.cleanup
Created November 20, 2018 09:20 — forked from yurifedoseev/sites.cleanup
Delete all sites from IIS express configuration
appcmd.exe list site /xml | appcmd delete site /in
import {MatDialogModule} from "@angular/material";
@NgModule({
declarations: [
...
CourseDialogComponent
],
imports: [
...
@uzbekdev1
uzbekdev1 / Leap code
Created October 18, 2018 12:42 — forked from IrisClasson/Leap code
Dispatcher.BeginInvoke versus Dispatcher.InvokeAsync
private void SetCanvas(UIElement image, Point point, bool allowkill)
{
Dispatcher.BeginInvoke(
new Action(
delegate
{
Canvas.SetTop(image, point.Y - (finger.ActualHeight/2));
Canvas.SetLeft(image, point.X - (finger.ActualWidth/2));
if (allowkill)
@uzbekdev1
uzbekdev1 / Startup.cs
Created October 11, 2018 08:15 — forked from wallymathieu/Startup.cs
HowTo register auth for swashbuckle with identity server on asp.net core
Namespace ProjectWithSwagger
{
public class Startup
{
// This method gets called by the runtime. Use this method to add services to the container
public void ConfigureServices(IServiceCollection services)
{
//....
services.ConfigureSwaggerGen(swaggerGen =>
{
@uzbekdev1
uzbekdev1 / 30_under_30_europe_linkedin_info_final.csv
Created October 5, 2018 06:41 — forked from baditaflorin/30_under_30_europe_linkedin_info_final.csv
Forbes 30 under 30 Europe 2018 list containing 384 persosns. For 308 of them there is also the LinkedIn profile, if they have.
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 3.
Category were the 30 under 30 person was selected,Forbes Name,Forbes Age,Forbes Country,Role in the Company,Company,Description,LinkedIn Profile,linkedin_name,Exact match between the name ?,Did I had o perform a manual searh to find the linkedin profile ?
30 Under 30 - Europe - Social Entrepreneurs,Margherita Pagani,29,Argentina,Founder, Impacton.org,"Pagani aims to create an encyclopedia of blueprints for of purpose-driven projects for impact investing. The Italian-born and Argentina-based entrepreneur believes works with universities, governments and private companies to co-design programs based on proven models.",https://www.linkedin.com/in/magheritapagani,Margherita Pagani - CEO and Founder - Impacton.org ,FALSE,NO
30 Under 30 - Europe - Media & Marketing,Mohamed Khairat,25,Australia,Cofounders, Egyptian Streets,"Amin and Khairat founded Egyptian Streets back in 2012, less than two years after the Arab Spring. The digital publication that strives to address challenging issues--such as sexual harassment an