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
@krishna-acondy
krishna-acondy / query-options.ts
Created April 4, 2018 14:21
Query Options Type
export interface QueryBuilder {
toQueryMap: () => Map<string, string>;
toQueryString: () => string;
}
export class QueryOptions implements QueryBuilder {
public pageNumber: number;
public pageSize: number;
constructor() {
@t-palmer
t-palmer / web.config
Created March 27, 2018 21:09
Example IIS web.config file for Angular Router applications
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Angular Routes" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
import {MatDialogModule} from "@angular/material";
@NgModule({
declarations: [
...
CourseDialogComponent
],
imports: [
...
function subsequent<T>(
count: number,
operator: (source: Observable<T>) => Observable<T>
): (source: Observable<T>) => Observable<T> {
return (source: Observable<T>) => new Observable<T>(observer => {
const published = source.pipe(publish()) as ConnectableObservable<T>;
const concatenated = concat(
published.pipe(take(count)),
published.pipe(operator)
);
@baditaflorin
baditaflorin / 30_under_30_europe_linkedin_info_final.csv
Created February 3, 2018 18:01
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
@AlexanderBaggett
AlexanderBaggett / gist:d1504da93727a1778e8b5b3453946fc1
Last active March 24, 2026 03:15
Full win32 window from C# with Pinvoke
In this post, .net platform has this pinvoke mechanism where it is allowed that you call into the Native windows .
this is extremely useful when you have some 3rd party libraries or if you try to program against with the low-level windows APIS.
One of the typic application htat utilize the Lowe-level windows apis are those Native win32 applications. Where you creat a message pump with the necessary WNDCLASSEX to represent/register the window message pump and message handler process. What you will deal with the win32 applications include the following.
RegisterClassEx, CreateWindowEx, GetMessage(), TranslateMesage(), and DispatchMessage(...).
to be able to use the Window API, you have to declare tons of Structure and PInvoke Method, while you can find help from the Pinvoke.Net.
First, we will introduce some of the win32/user32 functions and their relative structure definitions.
# coding: utf-8
# # Object Detection Demo
# Welcome to the object detection inference walkthrough! This notebook will walk you step by step through the process of using a pre-trained model to detect objects in an image. Make sure to follow the [installation instructions](https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md) before you start.
# # Imports
# In[1]:
@davidsheardown
davidsheardown / Encryption.cs
Created December 8, 2017 09:41
.NET Core 2 Encrypt/Decrypt String
public static void Main(string[] args)
{
var content = "Example test";
var key = "E546C8DF278CD5931069B522E695D4F2";
var encrypted = EncryptString(content, key);
Console.WriteLine(encrypted);
var decrypted = DecryptString(encrypted, key);
Console.WriteLine(decrypted);
@emptyother
emptyother / Guid.ts
Last active July 4, 2023 21:00
GUID class for Typescript
class Guid {
public static newGuid(): Guid {
return new Guid(crypto.randomUUID());
// Old IE supported way:
/*return new Guid('xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, c => {
const r = Math.random() * 16 | 0;
const v = (c == 'x') ? r : (r & 0x3 | 0x8);
return v.toString(16);
}));*/
HOLY SMOKES! This one was very troublesome, but I figured it out after days of trying.
So, there are a lot of partial answers out there, but this should be complete. You cannot from what I have seen, include jquery-ui in your angular-cli and the index. The plugin inclusions will be overwritten and jquery as a global will be undefined. I couldn't get it to work by using just the angular-cli.json, but I did get it to work by only using index inclusion.
Here is what needs to be done to only use index script inclusion for jquery/jquery-ui.
1: Uninstall jquery and jquery-ui and remove it from the package.json
npm uninstall --save jquery jquery-ui
2: Delete the node_modules folder