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
var checkboxList = this.$el.find('.b-filter-dialog__params').filter(':has(.selectall)'); | |
checkboxList.each((index, element) => { | |
var $element = $(element); | |
var allCheckbox = $element.find('.selectall'); | |
var regularCheckboxes = $element.find(':checkbox').not('.selectall'); | |
allCheckbox.click(function() { | |
regularCheckboxes.attr('checked', this.checked); | |
}); |
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
// SPRITES | |
// All icons receive the styles of the <i> tag with a base class | |
// of .i and are then given a unique class to add width, height, | |
// and background-position. Your resulting HTML will look like | |
// <i class="icon-inbox"></i>. | |
// For the white version of the icons, just add the .icon-white class: | |
// <i class="icon-inbox icon-white"></i> | |
[class^="icon-"], |
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
var | |
styleSheets = document.styleSheets, | |
totalStyleSheets = styleSheets.length, | |
totalRules = 0; | |
for (var j = 0; j < totalStyleSheets; j++){ | |
var | |
styleSheet = styleSheets[j], | |
rules = styleSheet.cssRules, | |
totalRulesInStylesheet = rules.length, |
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
<link rel="import" href="../topeka-elements/topeka-resources.html"> | |
<link rel="import" href="../topeka-elements/topeka-profile.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
#topeka_profile { | |
width: 300px; | |
height: 300px; |
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
CREATE FUNCTION [dbo].[is_fulltext_indexed]() | |
RETURNS BIT | |
AS | |
BEGIN | |
RETURN | |
CASE | |
WHEN (SELECT COUNT(*) FROM | |
(SELECT | |
FULLTEXTCATALOGPROPERTY(fc.[name],'PopulateStatus') AS PopulateStatus | |
FROM sys.fulltext_catalogs fc) t |
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
public string FirstName { get; set; } => public string FirstName { get; set; } | |
public string Surname { get; set; } => public string Surname { get; set; } | |
public int Age { get; private set; } => public int Age { get; private set; } | |
private Address Address { get; set; } => private Address Address { get; set; } |
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
public class InvoiceModelJavaScriptConverter : JavaScriptConverter | |
{ | |
public override object Deserialize(IDictionary<string, object> dictionary, Type type, | |
JavaScriptSerializer serializer) | |
{ | |
var members = new List<MemberInfo>(); | |
members.AddRange(type.GetFields()); | |
members.AddRange( | |
type.GetProperties().Where(p => p.CanRead && p.CanWrite && p.GetIndexParameters().Length == 0)); |
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
//Выбираем все строки, в которых содержатся хоть какие-то данные | |
var nonEmptyItems = | |
items.Where( | |
i => i.GetType() | |
.GetProperties() | |
.Any(p => !string.IsNullOrWhiteSpace(p.GetValue(i) as string))) | |
.ToList(); |