Skip to content

Instantly share code, notes, and snippets.

View web.config
<system.webServer>
<rewrite>
<rules>
<rule name="redirrect to https" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTPS}" pattern="^OFF$" />
</conditions>
<action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" />
</rule>
View gist:4508f6e585b1aa9bcb890dfb576bfe68
(function(someArguments) {
function1() {
//...someCode
}
})(arguments)
$(document).ready(function() {
function1(); // error
})
View gist:1bda4b5bceeb9919812655b589427b87
//Способ 1
const CityForward = City.extend``;
//Способ 2
const CityWrapper = styled(City);
const CityForwardTwo = CityWrapper.extend``;
View gist:5469a66db5c13beb5fbf56621fd01883
[
{
FieldId: <Number>,
FieldTitle: <String>,
Values: [
{
Title: <String>,
UsersCount: <Number>
},
{
View gist:b42e07521a61e68653ca59bdb5478436
[
{
InquirerId: <Number>,
QuestionIds: [<Number>, <Number>, ... ]
},
...
]
View gist:585e1f4d3c3f3436a641aa72f4560ea4
lambda_method(Closure , IEnumerable`1 , IEnumerable`1 , ResolutionContext )\r\n
AutoMapper.Mapper.AutoMapper.IMapper.Map[TSource,TDestination](TSource source)\r\n
AutoMapper.Mapper.Map[TSource,TDestination](TSource source)\r\n
OnlySystem.Utils.MapperHelper.Map[TSrc,TDst](IEnumerable`1 src)
C:\\Users\\Philip\\Source\\Workspaces\\OnlySystem\\only-system\\OnlySystem\\Utils\\MapperHelper.cs:строка 17\r\n
OnlySystem.Controllers.SurveyController.GetAnalysisData(IEnumerable`1 groups, IDictionary`2 mainFilters, IDictionary`2 secondaryFilters, IDictionary`2 inquirersDictionary)
C:\\Users\\Philip\\Source\\Workspaces\\OnlySystem\\only-system\\OnlySystem\\Controllers\\SurveyController.cs:строка 2780\r\n
OnlySystem.Controllers.SurveyController.GetData(AnalysisSimpleFilterJsonModel[] filters, DateRange[] dates, AnalysisInquirerFilterJsonModel[] inquirers)
C:\\Users\\Philip\\Source\\Workspaces\\OnlySystem\\only-system\\OnlySystem\\Controllers\\SurveyController.cs:строка 2765\r\n
lambda_method(Closure ,
View gist:a8d984009f645c570bc9c6efa4c27acf
public List<SectionGraphItemModel> GetInquirerProgress(int inquirerId)
{
var inquirer = _context.Inquirer.AsNoTracking().First(x => x.InquirerId == inquirerId);
var sections = inquirer.InquirerSection.OrderBy(x => x.Ordering).ToList();
var questions = sections.SelectMany(x => x.Question).ToList();
var answers = questions.SelectMany(x => x.Answer).ToList();
var userAnswers = answers.SelectMany(x => x.UserAnswerXRef).ToList();
List<SectionGraphItemModel> sectionGraphItems = sections.Select(sect => {
@philipusis
philipusis / gist:97fdf414b94240a5b47a665ff48c9082
Created Oct 30, 2017
Формат вывода для PlainText
View gist:97fdf414b94240a5b47a665ff48c9082
{
userId: <Number>,
email: <string>,
name: <string>,
text: <string>
}
@philipusis
philipusis / gist:9732ed160a001e3d60a0088ed4491e99
Created Oct 30, 2017
Формат вывода для eNPS
View gist:9732ed160a001e3d60a0088ed4491e99
{
promoters: <Number>,
neutrals: <Number>,
destructors: <Number>,
comments: [
{
userId: <Number>,
email: <string>,
name: <string>,
text: <string>,