Skip to content

Instantly share code, notes, and snippets.

Avatar

Alexey Solonets alexeysolonets

  • Microsoft
  • Moscow
View GitHub Profile
@alexeysolonets
alexeysolonets / UniqueStringsTestMethodBody.cs
Created Aug 4, 2016
List of unique strings in C# (List, HashSet, SortedSet)
View UniqueStringsTestMethodBody.cs
var sw = new System.Diagnostics.Stopwatch();
var iterations = 1000000;
var items = new List<string>() { "one", "one", "two", "one", "zero", "two" };
sw.Start();
for (var i = 0; i < iterations; i++)
{
var uniqueItems = items
.Where((item, index) => items.IndexOf(item) == index)
.ToList();
View Paging.js
/**
Automatically bind PagingToolbar to a grid's store
*/
Ext.define('Ext.ux.toolbar.Paging', {
override: 'Ext.toolbar.Paging',
listeners: {
added: function (me) {
var grid = me.up('grid'),
store;
View TopHotelsRu_Comments_Expand
// ==UserScript==
// @name Expand TopHotels.ru comments
// @namespace http://alexeysolonets.ru/
// @version 0.1
// @description Expand hotel comments on same page
// @match http://tophotels.ru/main/hotel/*
// @copyright 2014+, Alexey Solonets
// ==/UserScript==
$(function() {
You can’t perform that action at this time.