Skip to content

Instantly share code, notes, and snippets.

<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>
(function(someArguments) {
function1() {
//...someCode
}
})(arguments)
$(document).ready(function() {
function1(); // error
})
@philipusis
philipusis / gist:1bda4b5bceeb9919812655b589427b87
Created February 19, 2018 20:27
Styled components extend
//Способ 1
const CityForward = City.extend``;
//Способ 2
const CityWrapper = styled(City);
const CityForwardTwo = CityWrapper.extend``;
{
fieldId: <Number>,
groups: [<String>, <String>, ... ]
}
[
{
FieldId: <Number>,
FieldTitle: <String>,
Values: [
{
Title: <String>,
UsersCount: <Number>
},
{
[
{
InquirerId: <Number>,
QuestionIds: [<Number>, <Number>, ... ]
},
...
]
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 ,
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 October 30, 2017 17:09
Формат вывода для PlainText
{
userId: <Number>,
email: <string>,
name: <string>,
text: <string>
}
@philipusis
philipusis / gist:9732ed160a001e3d60a0088ed4491e99
Created October 30, 2017 17:07
Формат вывода для eNPS
{
promoters: <Number>,
neutrals: <Number>,
destructors: <Number>,
comments: [
{
userId: <Number>,
email: <string>,
name: <string>,
text: <string>,