From f41ae7e53615f920b7f208072f60cad17ccb6962 Mon Sep 17 00:00:00 2001 From: BarminaA Date: Tue, 26 Apr 2022 13:02:26 +0400 Subject: [PATCH 001/122] #58 - Add TS storage --- .../ru/ulstu/extractor/model/TimeSeries.java | 39 ++++++++++++++++ .../extractor/model/TimeSeriesValue.java | 43 ++++++++++++++++++ .../db/changelog-20220422_120000-schema.xml | 44 +++++++++++++++++++ src/main/resources/db/changelog-master.xml | 1 + 4 files changed, 127 insertions(+) create mode 100644 src/main/java/ru/ulstu/extractor/model/TimeSeries.java create mode 100644 src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java create mode 100644 src/main/resources/db/changelog-20220422_120000-schema.xml diff --git a/src/main/java/ru/ulstu/extractor/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/model/TimeSeries.java new file mode 100644 index 0000000..2d90523 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/model/TimeSeries.java @@ -0,0 +1,39 @@ +package ru.ulstu.extractor.model; + +import org.hibernate.annotations.Fetch; +import org.hibernate.annotations.FetchMode; + +import javax.persistence.*; +import java.util.ArrayList; +import java.util.List; + +@Entity +public class TimeSeries extends BaseEntity { + private String name; + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) + @JoinColumn(name = "time_series_id") + @Fetch(FetchMode.SUBSELECT) + private List values = new ArrayList<>(); + + + public TimeSeries(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public List getValues() { + return values; + } + + public void setValues(List values) { + this.values = values; + } + +} diff --git a/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java b/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java new file mode 100644 index 0000000..544db71 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java @@ -0,0 +1,43 @@ +package ru.ulstu.extractor.model; + +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.ManyToOne; +import java.util.Date; + +@Entity +public class TimeSeriesValue extends BaseEntity { + private Date date; + private Integer value; + @ManyToOne(fetch = FetchType.LAZY) + private TimeSeries timeSeries; + + public TimeSeriesValue(Date date, Integer value) { + this.date = date; + this.value = value; + } + + public Date getDate() { + return date; + } + + public Integer getValue() { + return value; + } + + public void setDate(Date date) { + this.date = date; + } + + public void setValue(Integer value) { + this.value = value; + } + + public TimeSeries getTimeSeriesType() { + return timeSeries; + } + + public void setTimeSeriesType(TimeSeries timeSeries) { + this.timeSeries = timeSeries; + } +} diff --git a/src/main/resources/db/changelog-20220422_120000-schema.xml b/src/main/resources/db/changelog-20220422_120000-schema.xml new file mode 100644 index 0000000..bec0b8d --- /dev/null +++ b/src/main/resources/db/changelog-20220422_120000-schema.xml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog-master.xml b/src/main/resources/db/changelog-master.xml index 514d679..b9c9b69 100644 --- a/src/main/resources/db/changelog-master.xml +++ b/src/main/resources/db/changelog-master.xml @@ -12,4 +12,5 @@ + -- 2.34.1 From 9a38056a94f5709c46bc4c82968b20b07d455833 Mon Sep 17 00:00:00 2001 From: BarminaA Date: Wed, 8 Jun 2022 15:44:53 +0400 Subject: [PATCH 002/122] #58-add AbstractTSExtractor --- .../extractor/model/TimeSeriesValue.java | 3 +- .../repository/TimeSeriesRepository.java | 10 +++ .../repository/TimeSeriesValueRepository.java | 13 ++++ .../extractor/service/TimeSeriesService.java | 75 +++++++++++++++++++ .../extractor/ts/AbstractTSExtractor.java | 28 +++++++ .../java/ru/ulstu/extractor/ts/AuthorTS.java | 34 +++++++++ 6 files changed, 162 insertions(+), 1 deletion(-) create mode 100644 src/main/java/ru/ulstu/extractor/repository/TimeSeriesRepository.java create mode 100644 src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java create mode 100644 src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/AuthorTS.java diff --git a/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java b/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java index 544db71..f4daaf4 100644 --- a/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java +++ b/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java @@ -12,7 +12,8 @@ public class TimeSeriesValue extends BaseEntity { @ManyToOne(fetch = FetchType.LAZY) private TimeSeries timeSeries; - public TimeSeriesValue(Date date, Integer value) { + public TimeSeriesValue(TimeSeries timeSeries, Date date, Integer value) { + this.timeSeries = timeSeries; this.date = date; this.value = value; } diff --git a/src/main/java/ru/ulstu/extractor/repository/TimeSeriesRepository.java b/src/main/java/ru/ulstu/extractor/repository/TimeSeriesRepository.java new file mode 100644 index 0000000..e324774 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/repository/TimeSeriesRepository.java @@ -0,0 +1,10 @@ +package ru.ulstu.extractor.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import ru.ulstu.extractor.model.TimeSeries; + +import java.util.Optional; + +public interface TimeSeriesRepository extends JpaRepository { + Optional findByName(String name); +} diff --git a/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java b/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java new file mode 100644 index 0000000..8289b55 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java @@ -0,0 +1,13 @@ +package ru.ulstu.extractor.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import ru.ulstu.extractor.model.TimeSeries; +import ru.ulstu.extractor.model.TimeSeriesValue; + +import java.util.List; + +public interface TimeSeriesValueRepository extends JpaRepository { + TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name); + + List findTimeSeriesValueById(Integer repositoryId); +} diff --git a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java new file mode 100644 index 0000000..1054ce9 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2021 Anton Romanov - All Rights Reserved + * You may use, distribute and modify this code, please write to: romanov73@gmail.com. + */ + +package ru.ulstu.extractor.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.model.BaseEntity; +import ru.ulstu.extractor.model.TimeSeries; +import ru.ulstu.extractor.model.TimeSeriesValue; +import ru.ulstu.extractor.repository.TimeSeriesRepository; +import ru.ulstu.extractor.repository.TimeSeriesValueRepository; + +import java.util.Date; +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +@Service +public class TimeSeriesService { + private final static Logger LOG = LoggerFactory.getLogger(TimeSeriesService.class); + private final TimeSeriesRepository timeSeriesRepository; + private final TimeSeriesValueRepository timeSeriesValueRepository; + + + public TimeSeriesService(TimeSeriesRepository timeSeriesRepository, TimeSeriesValueRepository timeSeriesValueRepository) { + this.timeSeriesRepository = timeSeriesRepository; + this.timeSeriesValueRepository = timeSeriesValueRepository; + } + + public TimeSeries save(TimeSeries timeSeries, List timeSeriesValues) { + LOG.debug("Start save {} time series with {} time series values ", timeSeries.getName(), timeSeriesValues.size()); + List timeSeriesValuesToRemoveIds = timeSeries.getValues().stream().map(BaseEntity::getId).collect(Collectors.toList()); + timeSeries.setValues(timeSeriesValues); + LOG.debug("Save time series {} ", timeSeries.getName()); + timeSeries = timeSeriesRepository.save(timeSeries); + LOG.debug("Clear {} ime series values ", timeSeriesValuesToRemoveIds.size()); + return timeSeries; + } + + public TimeSeries findOrCreate(String timeSeriesName) { + Optional maybeTimeSeries = timeSeriesRepository.findByName(timeSeriesName); + if (maybeTimeSeries.isPresent()) { + LOG.debug("TimeSeries {} exists.", maybeTimeSeries.get().getName()); + return maybeTimeSeries.get(); + } + return timeSeriesRepository.save(new TimeSeries(timeSeriesName)); + } + + public List save(List timeSeriesValues) { + return timeSeriesValues.stream() + .map(timeSeriesValue -> { + timeSeriesValue.setValue((timeSeriesValue.getValue())); + timeSeriesValue.setDate((timeSeriesValue.getDate())); + return timeSeriesValueRepository.save(timeSeriesValue); + }).collect(Collectors.toList()); + } + + public void addTimeSeriesValue(String timeSeriesName, Date date, Integer value) { + LOG.debug("Start add time series values to {} time series values ", timeSeriesName); + TimeSeries timeSeries = findOrCreate(timeSeriesName); + timeSeriesValueRepository.save(new TimeSeriesValue(timeSeries, date, value)); + } + + public TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name) { + return timeSeriesValueRepository.findByTimeSeriesAndName(timeSeries, name); + } + + public List findAll() { + return timeSeriesValueRepository.findAll(); + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java new file mode 100644 index 0000000..e211df7 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java @@ -0,0 +1,28 @@ +package ru.ulstu.extractor.ts; + +public abstract class AbstractTSExtractor { + private String name; + private int value; + + public abstract void getAbstractTSName(); + + public abstract void addPoint(int value); + + public abstract void addTS(String name, int value); + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public int getValue() { + return value; + } + + public void setValue(int value) { + this.value = value; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java new file mode 100644 index 0000000..ef7014f --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java @@ -0,0 +1,34 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class AuthorTS extends AbstractTSExtractor { + private static String name = "AuthorTimeSeries"; + private static TimeSeriesService timeSeriesService; + + public static void setTimeSeriesService(TimeSeriesService timeSeriesService) { + AuthorTS.timeSeriesService = timeSeriesService; + } + + @Override + public void getAbstractTSName() { + timeSeriesService.findOrCreate(name); + } + + @Override + public void addPoint(int value) { + + } + + @Override + public void addTS(String name, int value) { + + } + + @Override + public String getName() { + return name; + } +} -- 2.34.1 From 5426253b390b4afe267124673bc96f768a1d534f Mon Sep 17 00:00:00 2001 From: BarminaA Date: Tue, 14 Jun 2022 16:19:41 +0400 Subject: [PATCH 003/122] #58-add new TS classes --- .../extractor/ts/AbstractTSExtractor.java | 26 +++++++------------ .../java/ru/ulstu/extractor/ts/AuthorTS.java | 25 +++++------------- .../ulstu/extractor/ts/AuthorsCommentTS.java | 23 ++++++++++++++++ .../extractor/ts/AuthorsCompletedIssueTS.java | 23 ++++++++++++++++ .../ru/ulstu/extractor/ts/AuthorsIssueTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/BranchTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/ClassTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/CommitsTS.java | 23 ++++++++++++++++ .../ru/ulstu/extractor/ts/DependenceTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/EntityTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/FileTS.java | 23 ++++++++++++++++ .../ru/ulstu/extractor/ts/InterfaceTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/IssuesTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/ProcessTS.java | 23 ++++++++++++++++ .../java/ru/ulstu/extractor/ts/StarTS.java | 23 ++++++++++++++++ 15 files changed, 316 insertions(+), 34 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/ts/AuthorsCommentTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/AuthorsCompletedIssueTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/AuthorsIssueTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/BranchTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/ClassTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/CommitsTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/DependenceTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/EntityTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/FileTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/InterfaceTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/IssuesTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/ProcessTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/StarTS.java diff --git a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java index e211df7..e460ba4 100644 --- a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java +++ b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java @@ -1,28 +1,22 @@ package ru.ulstu.extractor.ts; +import ru.ulstu.extractor.model.TimeSeriesValue; +import ru.ulstu.extractor.service.TimeSeriesService; + +import java.util.List; + public abstract class AbstractTSExtractor { - private String name; - private int value; - public abstract void getAbstractTSName(); + public abstract String getTSName(); - public abstract void addPoint(int value); + public abstract TimeSeriesService getTimeSeriesService(); - public abstract void addTS(String name, int value); - - public String getName() { - return name; + public void addPoint(int value) { } - public void setName(String name) { - this.name = name; + public void addTS(List values) { + getTimeSeriesService().findOrCreate(getTSName()); } - public int getValue() { - return value; - } - public void setValue(int value) { - this.value = value; - } } diff --git a/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java index ef7014f..a25a835 100644 --- a/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/AuthorTS.java @@ -5,30 +5,19 @@ import ru.ulstu.extractor.service.TimeSeriesService; @Component public class AuthorTS extends AbstractTSExtractor { - private static String name = "AuthorTimeSeries"; - private static TimeSeriesService timeSeriesService; + private final TimeSeriesService timeSeriesService; - public static void setTimeSeriesService(TimeSeriesService timeSeriesService) { - AuthorTS.timeSeriesService = timeSeriesService; + public AuthorTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; } @Override - public void getAbstractTSName() { - timeSeriesService.findOrCreate(name); + public String getTSName() { + return "Количество Авторов"; } @Override - public void addPoint(int value) { - - } - - @Override - public void addTS(String name, int value) { - - } - - @Override - public String getName() { - return name; + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; } } diff --git a/src/main/java/ru/ulstu/extractor/ts/AuthorsCommentTS.java b/src/main/java/ru/ulstu/extractor/ts/AuthorsCommentTS.java new file mode 100644 index 0000000..0a2feea --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/AuthorsCommentTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class AuthorsCommentTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public AuthorsCommentTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество коммитов авторов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/AuthorsCompletedIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/AuthorsCompletedIssueTS.java new file mode 100644 index 0000000..d6df385 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/AuthorsCompletedIssueTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class AuthorsCompletedIssueTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество выполненных issues авторов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/AuthorsIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/AuthorsIssueTS.java new file mode 100644 index 0000000..a780b4f --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/AuthorsIssueTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class AuthorsIssueTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public AuthorsIssueTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество issues авторов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/BranchTS.java new file mode 100644 index 0000000..6f6200c --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/BranchTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class BranchTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public BranchTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество веток"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/ClassTS.java b/src/main/java/ru/ulstu/extractor/ts/ClassTS.java new file mode 100644 index 0000000..4d68d4c --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/ClassTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class ClassTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public ClassTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество классов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java new file mode 100644 index 0000000..af15290 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class CommitsTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public CommitsTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество коммитов во времени"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/DependenceTS.java b/src/main/java/ru/ulstu/extractor/ts/DependenceTS.java new file mode 100644 index 0000000..0df8357 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/DependenceTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class DependenceTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public DependenceTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество зависимостей"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/EntityTS.java b/src/main/java/ru/ulstu/extractor/ts/EntityTS.java new file mode 100644 index 0000000..dc687bf --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/EntityTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class EntityTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public EntityTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество сущностей"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/FileTS.java new file mode 100644 index 0000000..5325dd4 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/FileTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class FileTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public FileTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество файлов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/InterfaceTS.java b/src/main/java/ru/ulstu/extractor/ts/InterfaceTS.java new file mode 100644 index 0000000..9899c64 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/InterfaceTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class InterfaceTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public InterfaceTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество интерфейсов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/IssuesTS.java new file mode 100644 index 0000000..e565172 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/IssuesTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class IssuesTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public IssuesTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество issues созданных во времени"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return null; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/ProcessTS.java b/src/main/java/ru/ulstu/extractor/ts/ProcessTS.java new file mode 100644 index 0000000..03198fa --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/ProcessTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class ProcessTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public ProcessTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество процессов"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/StarTS.java new file mode 100644 index 0000000..839e039 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/StarTS.java @@ -0,0 +1,23 @@ +package ru.ulstu.extractor.ts; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.service.TimeSeriesService; + +@Component +public class StarTS extends AbstractTSExtractor { + private final TimeSeriesService timeSeriesService; + + public StarTS(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @Override + public String getTSName() { + return "Количество звезд"; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } +} -- 2.34.1 From 08751b94523a3e85664665d5c52219a45c3efb1d Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 17 Jun 2022 16:33:53 +0400 Subject: [PATCH 004/122] #58 -- add scheduler --- .../extractor/GitExtractorApplication.java | 2 + .../extractor/branch/BranchRepository.java | 21 ++++++ .../{service => branch}/BranchService.java | 16 ++++- .../controller/BranchController.java | 14 ++-- .../controller/GitIndexingController.java | 2 +- .../extractor/controller/RepoController.java | 2 +- .../controller/RepositoryController.java | 14 ++-- .../controller/StatisticController.java | 2 +- .../GitRepositoryRepository.java} | 4 +- .../GitRepositoryService.java | 37 +++++----- .../controller/StructuralUnitController.java | 2 +- .../ulstu/extractor/loader/GitScheduler.java | 69 +++++++++++++++++++ .../repository/BranchRepository.java | 13 ---- .../repository/TimeSeriesValueRepository.java | 7 +- .../extractor/service/FilteringService.java | 12 ++-- .../ulstu/extractor/service/IndexService.java | 16 +++-- .../extractor/service/TimeSeriesService.java | 8 +-- .../extractor/ts/AbstractTSExtractor.java | 17 +++-- .../java/ru/ulstu/extractor/ts/CommitsTS.java | 11 ++- 19 files changed, 186 insertions(+), 83 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/branch/BranchRepository.java rename src/main/java/ru/ulstu/extractor/{service => branch}/BranchService.java (78%) rename src/main/java/ru/ulstu/extractor/{repository/RepositoryRepository.java => gitrepository/GitRepositoryRepository.java} (53%) rename src/main/java/ru/ulstu/extractor/{service => gitrepository}/GitRepositoryService.java (91%) create mode 100644 src/main/java/ru/ulstu/extractor/loader/GitScheduler.java delete mode 100644 src/main/java/ru/ulstu/extractor/repository/BranchRepository.java diff --git a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java index 425424f..f9a272d 100644 --- a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java +++ b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java @@ -2,8 +2,10 @@ package ru.ulstu.extractor; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.scheduling.annotation.EnableScheduling; @SpringBootApplication +@EnableScheduling public class GitExtractorApplication { public static void main(String[] args) { SpringApplication.run(GitExtractorApplication.class, args); diff --git a/src/main/java/ru/ulstu/extractor/branch/BranchRepository.java b/src/main/java/ru/ulstu/extractor/branch/BranchRepository.java new file mode 100644 index 0000000..6034cb3 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/branch/BranchRepository.java @@ -0,0 +1,21 @@ +package ru.ulstu.extractor.branch; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import ru.ulstu.extractor.model.Branch; +import ru.ulstu.extractor.model.Repository; + +import java.util.List; + +public interface BranchRepository extends JpaRepository { + Branch findByRepositoryAndName(Repository repository, String name); + + @Query("select count(c) from Commit c LEFT JOIN c.branch b LEFT JOIN Repository r where r.id = ?1 AND b.name = ?2") + int getCommitsCount(Integer repositoryId, String name); + + List findByRepositoryId(Integer repositoryId); + + Page findByRepository(Repository repository, Pageable pageable); +} diff --git a/src/main/java/ru/ulstu/extractor/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/BranchService.java similarity index 78% rename from src/main/java/ru/ulstu/extractor/service/BranchService.java rename to src/main/java/ru/ulstu/extractor/branch/BranchService.java index 8ce9353..8cae8e6 100644 --- a/src/main/java/ru/ulstu/extractor/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/BranchService.java @@ -3,16 +3,19 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.service; +package ru.ulstu.extractor.branch; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.model.BaseEntity; import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.model.Repository; -import ru.ulstu.extractor.repository.BranchRepository; +import ru.ulstu.extractor.service.CommitService; import java.util.List; import java.util.stream.Collectors; @@ -29,6 +32,7 @@ public class BranchService { this.commitService = commitService; } + @Transactional public Branch save(Branch branch, List commits) { LOG.debug("Start save {} branch with {} commits ", branch.getName(), commits.size()); List commitsToRemoveIds = branch.getCommits().stream().map(BaseEntity::getId).collect(Collectors.toList()); @@ -52,6 +56,14 @@ public class BranchService { return branchRepository.findByRepositoryAndName(repository, branchName); } + public int getCommitsCount(Integer repositoryId, String branchName) { + return branchRepository.getCommitsCount(repositoryId, branchName); + } + + public Page findByRepository(Repository repository, Pageable pageable) { + return branchRepository.findByRepository(repository, pageable); + } + public List findAll() { return branchRepository.findAll(); } diff --git a/src/main/java/ru/ulstu/extractor/controller/BranchController.java b/src/main/java/ru/ulstu/extractor/controller/BranchController.java index 5e0f845..64ccecc 100644 --- a/src/main/java/ru/ulstu/extractor/controller/BranchController.java +++ b/src/main/java/ru/ulstu/extractor/controller/BranchController.java @@ -9,8 +9,8 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; -import ru.ulstu.extractor.repository.BranchRepository; -import ru.ulstu.extractor.repository.RepositoryRepository; +import ru.ulstu.extractor.branch.BranchRepository; +import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import springfox.documentation.annotations.ApiIgnore; import static ru.ulstu.extractor.controller.Route.DELETE_BRANCH; @@ -19,11 +19,11 @@ import static ru.ulstu.extractor.controller.Route.LIST_REPOSITORY_BRANCHES; @Controller @ApiIgnore public class BranchController { - private final RepositoryRepository repositoryRepository; + private final GitRepositoryRepository gitRepositoryRepository; private final BranchRepository branchRepository; - public BranchController(RepositoryRepository repositoryRepository, BranchRepository branchRepository) { - this.repositoryRepository = repositoryRepository; + public BranchController(GitRepositoryRepository gitRepositoryRepository, BranchRepository branchRepository) { + this.gitRepositoryRepository = gitRepositoryRepository; this.branchRepository = branchRepository; } @@ -32,7 +32,7 @@ public class BranchController { Model model, @RequestParam int repositoryId) { model.addAttribute("branches", branchRepository.findByRepositoryId(repositoryId)); - model.addAttribute("repository", repositoryRepository.findById(repositoryId).get()); + model.addAttribute("repository", gitRepositoryRepository.findById(repositoryId).get()); return LIST_REPOSITORY_BRANCHES; } @@ -42,7 +42,7 @@ public class BranchController { @RequestParam Integer id) { branchRepository.deleteById(id); model.addAttribute("branches", branchRepository.findByRepositoryId(repositoryId)); - model.addAttribute("repository", repositoryRepository.findById(repositoryId).get()); + model.addAttribute("repository", gitRepositoryRepository.findById(repositoryId).get()); return LIST_REPOSITORY_BRANCHES; } } diff --git a/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java b/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java index ce2433f..3102ba5 100644 --- a/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java +++ b/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java @@ -15,10 +15,10 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import ru.ulstu.extractor.gitrepository.GitRepositoryService; import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.mvc.FilterForm; import ru.ulstu.extractor.model.mvc.RepoForm; -import ru.ulstu.extractor.service.GitRepositoryService; import ru.ulstu.extractor.service.IndexService; import springfox.documentation.annotations.ApiIgnore; diff --git a/src/main/java/ru/ulstu/extractor/controller/RepoController.java b/src/main/java/ru/ulstu/extractor/controller/RepoController.java index 9be6c93..847003d 100644 --- a/src/main/java/ru/ulstu/extractor/controller/RepoController.java +++ b/src/main/java/ru/ulstu/extractor/controller/RepoController.java @@ -12,8 +12,8 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import ru.ulstu.extractor.gitrepository.GitRepositoryService; import ru.ulstu.extractor.model.Commit; -import ru.ulstu.extractor.service.GitRepositoryService; import ru.ulstu.extractor.service.IndexService; import ru.ulstu.extractor.util.HttpUtils; diff --git a/src/main/java/ru/ulstu/extractor/controller/RepositoryController.java b/src/main/java/ru/ulstu/extractor/controller/RepositoryController.java index dd58781..ee5de82 100644 --- a/src/main/java/ru/ulstu/extractor/controller/RepositoryController.java +++ b/src/main/java/ru/ulstu/extractor/controller/RepositoryController.java @@ -9,7 +9,7 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; -import ru.ulstu.extractor.repository.RepositoryRepository; +import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import springfox.documentation.annotations.ApiIgnore; import static ru.ulstu.extractor.controller.Route.DELETE_INDEXED_REPOSITORY; @@ -18,23 +18,23 @@ import static ru.ulstu.extractor.controller.Route.LIST_INDEXED_REPOSITORIES; @Controller @ApiIgnore public class RepositoryController { - private final RepositoryRepository repositoryRepository; + private final GitRepositoryRepository gitRepositoryRepository; - public RepositoryController(RepositoryRepository repositoryRepository) { - this.repositoryRepository = repositoryRepository; + public RepositoryController(GitRepositoryRepository gitRepositoryRepository) { + this.gitRepositoryRepository = gitRepositoryRepository; } @GetMapping(LIST_INDEXED_REPOSITORIES) public String indexNewRepo(Model model) { - model.addAttribute("repositories", repositoryRepository.findAll()); + model.addAttribute("repositories", gitRepositoryRepository.findAll()); return LIST_INDEXED_REPOSITORIES; } @GetMapping(DELETE_INDEXED_REPOSITORY) public String deleteRepo(Model model, @RequestParam Integer id) { - repositoryRepository.deleteById(id); - model.addAttribute("repositories", repositoryRepository.findAll()); + gitRepositoryRepository.deleteById(id); + model.addAttribute("repositories", gitRepositoryRepository.findAll()); return "redirect:/" + LIST_INDEXED_REPOSITORIES; } } diff --git a/src/main/java/ru/ulstu/extractor/controller/StatisticController.java b/src/main/java/ru/ulstu/extractor/controller/StatisticController.java index e522c04..fd729ef 100644 --- a/src/main/java/ru/ulstu/extractor/controller/StatisticController.java +++ b/src/main/java/ru/ulstu/extractor/controller/StatisticController.java @@ -9,9 +9,9 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; +import ru.ulstu.extractor.branch.BranchService; import ru.ulstu.extractor.model.mvc.FilterForm; import ru.ulstu.extractor.repository.CommitRepository; -import ru.ulstu.extractor.service.BranchService; import ru.ulstu.extractor.service.FilteringService; import springfox.documentation.annotations.ApiIgnore; diff --git a/src/main/java/ru/ulstu/extractor/repository/RepositoryRepository.java b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java similarity index 53% rename from src/main/java/ru/ulstu/extractor/repository/RepositoryRepository.java rename to src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java index 21263f4..a94a59a 100644 --- a/src/main/java/ru/ulstu/extractor/repository/RepositoryRepository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java @@ -1,8 +1,8 @@ -package ru.ulstu.extractor.repository; +package ru.ulstu.extractor.gitrepository; import org.springframework.data.jpa.repository.JpaRepository; import ru.ulstu.extractor.model.Repository; -public interface RepositoryRepository extends JpaRepository { +public interface GitRepositoryRepository extends JpaRepository { Repository findByUrl(String url); } diff --git a/src/main/java/ru/ulstu/extractor/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java similarity index 91% rename from src/main/java/ru/ulstu/extractor/service/GitRepositoryService.java rename to src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java index 6f85552..61eebf9 100644 --- a/src/main/java/ru/ulstu/extractor/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java @@ -1,9 +1,4 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - -package ru.ulstu.extractor.service; +package ru.ulstu.extractor.gitrepository; import org.apache.commons.io.FileUtils; import org.eclipse.jgit.api.CreateBranchCommand; @@ -15,12 +10,13 @@ import org.eclipse.jgit.internal.storage.file.FileRepository; import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.ObjectLoader; import org.eclipse.jgit.lib.ObjectReader; -import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevCommit; import org.eclipse.jgit.treewalk.TreeWalk; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import ru.ulstu.extractor.heuristic.model.BusinessLogicUnit; import ru.ulstu.extractor.heuristic.model.EntityUnit; @@ -31,6 +27,7 @@ import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.model.FileChange; import ru.ulstu.extractor.model.LineChange; +import ru.ulstu.extractor.model.Repository; import java.io.ByteArrayOutputStream; import java.io.File; @@ -61,18 +58,20 @@ public class GitRepositoryService { private String customProjectsDir; private final ExecutorService executorService = Executors.newFixedThreadPool(4); private final ExecutorService executorServiceCommits = Executors.newFixedThreadPool(4); - private final StructuralUnitService structuralUnitService; + private final GitRepositoryRepository gitRepositoryRepository; - public GitRepositoryService(StructuralUnitService structuralUnitService) { + public GitRepositoryService(StructuralUnitService structuralUnitService, + GitRepositoryRepository gitRepositoryRepository) { this.structuralUnitService = structuralUnitService; + this.gitRepositoryRepository = gitRepositoryRepository; } public List getRemoteBranches(String url) throws GitAPIException, IOException { LOG.debug("Get remote branches of {}. Clone", url); cloneOrUpdateRepo(url); LOG.debug("Get remote branches of {}. Get branches", url); - Repository localRepo = new FileRepository(getProjectGitDirectory(url)); + org.eclipse.jgit.lib.Repository localRepo = new FileRepository(getProjectGitDirectory(url)); Git git = new Git(localRepo); List branches = git.branchList().setListMode(ListBranchCommand.ListMode.REMOTE) .call() @@ -88,7 +87,7 @@ public class GitRepositoryService { LOG.debug("Get local branches of {}. Clone", url); cloneOrUpdateRepo(url); LOG.debug("Get local branches of {}. Get branches", url); - Repository localRepo = new FileRepository(getProjectGitDirectory(url)); + org.eclipse.jgit.lib.Repository localRepo = new FileRepository(getProjectGitDirectory(url)); Git git = new Git(localRepo); List branches = git.branchList() .call() @@ -105,7 +104,7 @@ public class GitRepositoryService { if (needUpdate) { cloneOrUpdateRepo(repositoryUrl, branchName); } - Repository localRepo = new FileRepository(getProjectGitDirectory(repositoryUrl)); + org.eclipse.jgit.lib.Repository localRepo = new FileRepository(getProjectGitDirectory(repositoryUrl)); Git git = new Git(localRepo); List commits = new ArrayList<>(); @@ -144,7 +143,7 @@ public class GitRepositoryService { return list; } - private void checkoutBranch(String repositoryUrl, Git git, Repository localRepo, String branchName) throws GitAPIException, IOException { + private void checkoutBranch(String repositoryUrl, Git git, org.eclipse.jgit.lib.Repository localRepo, String branchName) throws GitAPIException, IOException { LOG.debug("Checkout branch {} {}", repositoryUrl, branchName); git.pull().call(); if (!localRepo.getBranch().equals(branchName)) { @@ -192,7 +191,7 @@ public class GitRepositoryService { private void cloneOrUpdateRepo(String repositoryUrl, String branchName) throws GitAPIException, IOException { Git git; - Repository localRepo; + org.eclipse.jgit.lib.Repository localRepo; if (projectDirExists(getProjectDirectoryFile(repositoryUrl))) { localRepo = new FileRepository(getProjectGitDirectory(repositoryUrl)); git = new Git(localRepo); @@ -240,7 +239,7 @@ public class GitRepositoryService { return file.exists(); } - private List findDiffBetweenTwoRevisions(RevCommit laterCommit, RevCommit earlierCommit, Repository localRepo) { + private List findDiffBetweenTwoRevisions(RevCommit laterCommit, RevCommit earlierCommit, org.eclipse.jgit.lib.Repository localRepo) { if (laterCommit == null || earlierCommit == null) { return null; } @@ -256,7 +255,7 @@ public class GitRepositoryService { return parseOutputDiff(output, localRepo, laterCommit); } - private List parseOutputDiff(String output, Repository repository, RevCommit commit) { + private List parseOutputDiff(String output, org.eclipse.jgit.lib.Repository repository, RevCommit commit) { List changes = new ArrayList<>(); String[] strings = output.split("\n"); FileChange fileChange = new FileChange(); @@ -322,7 +321,7 @@ public class GitRepositoryService { return changes; } - private String getContent(Repository repository, RevCommit commit, String path) { + private String getContent(org.eclipse.jgit.lib.Repository repository, RevCommit commit, String path) { try (TreeWalk treeWalk = TreeWalk.forPath(repository, path, commit.getTree())) { if (treeWalk != null) { ObjectId blobId = treeWalk.getObjectId(0); @@ -346,4 +345,8 @@ public class GitRepositoryService { } return Optional.empty(); } + + public Page findAll(Pageable pageable) { + return gitRepositoryRepository.findAll(pageable); + } } diff --git a/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java b/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java index 0939e08..ccedc05 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java @@ -11,10 +11,10 @@ import org.slf4j.LoggerFactory; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; +import ru.ulstu.extractor.gitrepository.GitRepositoryService; import ru.ulstu.extractor.heuristic.model.BusinessLogicUnit; import ru.ulstu.extractor.heuristic.model.EntityUnit; import ru.ulstu.extractor.heuristic.model.ResourceUnit; -import ru.ulstu.extractor.service.GitRepositoryService; import ru.ulstu.extractor.util.HttpUtils; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/java/ru/ulstu/extractor/loader/GitScheduler.java b/src/main/java/ru/ulstu/extractor/loader/GitScheduler.java new file mode 100644 index 0000000..4a16fdc --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/loader/GitScheduler.java @@ -0,0 +1,69 @@ +package ru.ulstu.extractor.loader; + +import org.eclipse.jgit.api.errors.GitAPIException; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.data.domain.Page; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.BranchService; +import ru.ulstu.extractor.gitrepository.GitRepositoryService; +import ru.ulstu.extractor.model.Branch; +import ru.ulstu.extractor.model.OffsetablePageRequest; +import ru.ulstu.extractor.model.Repository; +import ru.ulstu.extractor.service.IndexService; +import ru.ulstu.extractor.ts.AbstractTSExtractor; + +import java.io.IOException; +import java.util.List; + +@Service +public class GitScheduler { + private final static int DEFAULT_PAGE_SIZE = 100; + private final Logger log = LoggerFactory.getLogger(GitScheduler.class); + private final GitRepositoryService gitRepositoryService; + private final BranchService branchService; + private final IndexService indexService; + private final List tsExtractors; + + public GitScheduler(GitRepositoryService gitRepositoryService, + BranchService branchService, + IndexService indexService, + List tsExtractors) { + this.gitRepositoryService = gitRepositoryService; + this.branchService = branchService; + this.indexService = indexService; + this.tsExtractors = tsExtractors; + } + + @Scheduled(cron = "* */5 * * * *") + public void getCommitsCount() { + log.debug("Load commits count started"); + int repositoryPageNumber = 0; + Page repositoryPage; + do { + int branchPageNumber = 0; + repositoryPage = gitRepositoryService.findAll( + new OffsetablePageRequest(repositoryPageNumber, DEFAULT_PAGE_SIZE)); + Page branchPage; + for (Repository repository : repositoryPage.getContent()) { + do { + branchPage = branchService.findByRepository(repository, + new OffsetablePageRequest(branchPageNumber, DEFAULT_PAGE_SIZE)); + for (Branch branch : branchPage.getContent()) { + try { + indexService.index(repository.getUrl(), branch.getName()); + tsExtractors.forEach(tsExtractor -> tsExtractor.addPoint(repository.getId(), branch.getName())); + } catch (GitAPIException | IOException ex) { + log.warn(ex.getMessage()); + ex.printStackTrace(); + } + } + branchPageNumber++; + } while (!branchPage.isEmpty()); + } + repositoryPageNumber++; + } while (!repositoryPage.isEmpty()); + log.debug("Load commits count finished"); + } +} diff --git a/src/main/java/ru/ulstu/extractor/repository/BranchRepository.java b/src/main/java/ru/ulstu/extractor/repository/BranchRepository.java deleted file mode 100644 index d16b1a2..0000000 --- a/src/main/java/ru/ulstu/extractor/repository/BranchRepository.java +++ /dev/null @@ -1,13 +0,0 @@ -package ru.ulstu.extractor.repository; - -import org.springframework.data.jpa.repository.JpaRepository; -import ru.ulstu.extractor.model.Branch; -import ru.ulstu.extractor.model.Repository; - -import java.util.List; - -public interface BranchRepository extends JpaRepository { - Branch findByRepositoryAndName(Repository repository, String name); - - List findByRepositoryId(Integer repositoryId); -} diff --git a/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java b/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java index 8289b55..cad99ca 100644 --- a/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java +++ b/src/main/java/ru/ulstu/extractor/repository/TimeSeriesValueRepository.java @@ -1,13 +1,10 @@ package ru.ulstu.extractor.repository; import org.springframework.data.jpa.repository.JpaRepository; -import ru.ulstu.extractor.model.TimeSeries; import ru.ulstu.extractor.model.TimeSeriesValue; -import java.util.List; - public interface TimeSeriesValueRepository extends JpaRepository { - TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name); + //TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name); - List findTimeSeriesValueById(Integer repositoryId); + //List findTimeSeriesValueById(Integer repositoryId); } diff --git a/src/main/java/ru/ulstu/extractor/service/FilteringService.java b/src/main/java/ru/ulstu/extractor/service/FilteringService.java index 221f133..51802aa 100644 --- a/src/main/java/ru/ulstu/extractor/service/FilteringService.java +++ b/src/main/java/ru/ulstu/extractor/service/FilteringService.java @@ -9,10 +9,10 @@ import com.sun.istack.NotNull; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.repository.AuthorRepository; import ru.ulstu.extractor.repository.CommitRepository; -import ru.ulstu.extractor.repository.RepositoryRepository; import java.util.List; import java.util.Map; @@ -21,20 +21,20 @@ import java.util.Map; public class FilteringService { private final AuthorRepository authorRepository; private final CommitRepository commitRepository; - private final RepositoryRepository repositoryRepository; + private final GitRepositoryRepository gitRepositoryRepository; public FilteringService(AuthorRepository authorRepository, CommitRepository commitRepository, - RepositoryRepository repositoryRepository) { + GitRepositoryRepository gitRepositoryRepository) { this.authorRepository = authorRepository; this.commitRepository = commitRepository; - this.repositoryRepository = repositoryRepository; + this.gitRepositoryRepository = gitRepositoryRepository; } public List getRepositoryAuthors(@NotNull String repositoryUrl, @NotNull String branchName) { return authorRepository.findByRepositoryAndBranch( - repositoryRepository.findByUrl(repositoryUrl), + gitRepositoryRepository.findByUrl(repositoryUrl), branchName ); } @@ -51,7 +51,7 @@ public class FilteringService { Pageable pageable) { return commitRepository.findByRepositoryAndBranch( pageable, - repositoryRepository.findByUrl(repositoryUrl), + gitRepositoryRepository.findByUrl(repositoryUrl), branchName, author, filter, diff --git a/src/main/java/ru/ulstu/extractor/service/IndexService.java b/src/main/java/ru/ulstu/extractor/service/IndexService.java index 3cd9644..86f9454 100644 --- a/src/main/java/ru/ulstu/extractor/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/service/IndexService.java @@ -10,10 +10,13 @@ import org.eclipse.jgit.api.errors.GitAPIException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import ru.ulstu.extractor.branch.BranchService; +import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; +import ru.ulstu.extractor.gitrepository.GitRepositoryService; import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.model.Repository; -import ru.ulstu.extractor.repository.RepositoryRepository; import java.io.IOException; import java.util.Collections; @@ -24,21 +27,22 @@ public class IndexService { private final static Logger LOG = LoggerFactory.getLogger(IndexService.class); private final static int COMMITS_PAGE_SIZE = 10; private final GitRepositoryService gitRepositoryService; - private final RepositoryRepository repositoryRepository; + private final GitRepositoryRepository gitRepositoryRepository; private final BranchService branchService; public IndexService(GitRepositoryService gitRepositoryService, - RepositoryRepository repositoryRepository, + GitRepositoryRepository gitRepositoryRepository, BranchService branchService) { this.gitRepositoryService = gitRepositoryService; - this.repositoryRepository = repositoryRepository; + this.gitRepositoryRepository = gitRepositoryRepository; this.branchService = branchService; } + @Transactional public void index(@NotNull String repositoryUrl, @NotNull String branchName) throws GitAPIException, IOException { - Repository repository = repositoryRepository.findByUrl(repositoryUrl); + Repository repository = gitRepositoryRepository.findByUrl(repositoryUrl); if (repository == null) { - repository = repositoryRepository.save(new Repository(repositoryUrl)); + repository = gitRepositoryRepository.save(new Repository(repositoryUrl)); } Branch branch = branchService.findByRepositoryAndName(repository, branchName); if (branch == null) { diff --git a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java index 1054ce9..5653c3e 100644 --- a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java @@ -64,10 +64,10 @@ public class TimeSeriesService { TimeSeries timeSeries = findOrCreate(timeSeriesName); timeSeriesValueRepository.save(new TimeSeriesValue(timeSeries, date, value)); } - - public TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name) { - return timeSeriesValueRepository.findByTimeSeriesAndName(timeSeries, name); - } +// +// public TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name) { +// return timeSeriesValueRepository.findByTimeSeriesAndName(timeSeries, name); +// } public List findAll() { return timeSeriesValueRepository.findAll(); diff --git a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java index e460ba4..14271ee 100644 --- a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java +++ b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java @@ -1,22 +1,21 @@ package ru.ulstu.extractor.ts; -import ru.ulstu.extractor.model.TimeSeriesValue; import ru.ulstu.extractor.service.TimeSeriesService; -import java.util.List; +import java.util.Date; public abstract class AbstractTSExtractor { public abstract String getTSName(); + public abstract int getNewTSValue(Integer repositoryId, String branchName); + public abstract TimeSeriesService getTimeSeriesService(); - public void addPoint(int value) { + public void addPoint(Integer repositoryId, String branchName) { + getTimeSeriesService().addTimeSeriesValue( + String.format("%s %s %s", getTSName(), repositoryId, branchName), + new Date(), + getNewTSValue(repositoryId, branchName)); } - - public void addTS(List values) { - getTimeSeriesService().findOrCreate(getTSName()); - } - - } diff --git a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java index af15290..a50f988 100644 --- a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java @@ -1,14 +1,18 @@ package ru.ulstu.extractor.ts; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.BranchService; import ru.ulstu.extractor.service.TimeSeriesService; @Component public class CommitsTS extends AbstractTSExtractor { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; - public CommitsTS(TimeSeriesService timeSeriesService) { + public CommitsTS(TimeSeriesService timeSeriesService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; } @Override @@ -16,6 +20,11 @@ public class CommitsTS extends AbstractTSExtractor { return "Количество коммитов во времени"; } + @Override + public int getNewTSValue(Integer repositoryId, String branchName) { + return branchService.getCommitsCount(repositoryId, branchName); + } + @Override public TimeSeriesService getTimeSeriesService() { return timeSeriesService; -- 2.34.1 From 4f8d25e56e07304261e90ce98efe48e70d755e38 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 20 Jun 2022 23:45:40 +0400 Subject: [PATCH 005/122] #58 -- add tests, add time series mapper --- build.gradle | 1 + .../ru/ulstu/extractor/model/TimeSeries.java | 13 ++- .../extractor/model/TimeSeriesValue.java | 13 ++- .../extractor/ts/TimeSeriesDateMapper.java | 59 ++++++++++ .../java/ru/ulstu/TimeSeriesMapperTest.java | 103 ++++++++++++++++++ 5 files changed, 186 insertions(+), 3 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java create mode 100644 src/test/java/ru/ulstu/TimeSeriesMapperTest.java diff --git a/build.gradle b/build.gradle index 1d713ee..04deaca 100644 --- a/build.gradle +++ b/build.gradle @@ -61,6 +61,7 @@ dependencies { implementation group: 'commons-io', name: 'commons-io', version: '2.6' implementation group: 'net.sourceforge.htmlunit', name: 'htmlunit', version: '2.35.0' implementation group: 'com.github.javaparser', name: 'javaparser-core', version: '3.20.2' + implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.12.0' implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0' diff --git a/src/main/java/ru/ulstu/extractor/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/model/TimeSeries.java index 2d90523..d04db07 100644 --- a/src/main/java/ru/ulstu/extractor/model/TimeSeries.java +++ b/src/main/java/ru/ulstu/extractor/model/TimeSeries.java @@ -3,7 +3,11 @@ package ru.ulstu.extractor.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; -import javax.persistence.*; +import javax.persistence.CascadeType; +import javax.persistence.Entity; +import javax.persistence.FetchType; +import javax.persistence.JoinColumn; +import javax.persistence.OneToMany; import java.util.ArrayList; import java.util.List; @@ -15,11 +19,18 @@ public class TimeSeries extends BaseEntity { @Fetch(FetchMode.SUBSELECT) private List values = new ArrayList<>(); + public TimeSeries() { + } public TimeSeries(String name) { this.name = name; } + public TimeSeries(String name, List values) { + this.name = name; + this.values = values; + } + public String getName() { return name; } diff --git a/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java b/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java index f4daaf4..3efd621 100644 --- a/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java +++ b/src/main/java/ru/ulstu/extractor/model/TimeSeriesValue.java @@ -12,6 +12,15 @@ public class TimeSeriesValue extends BaseEntity { @ManyToOne(fetch = FetchType.LAZY) private TimeSeries timeSeries; + public TimeSeriesValue() { + } + + public TimeSeriesValue(Date date, Integer value) { + this.timeSeries = timeSeries; + this.date = date; + this.value = value; + } + public TimeSeriesValue(TimeSeries timeSeries, Date date, Integer value) { this.timeSeries = timeSeries; this.date = date; @@ -34,11 +43,11 @@ public class TimeSeriesValue extends BaseEntity { this.value = value; } - public TimeSeries getTimeSeriesType() { + public TimeSeries getTimeSeries() { return timeSeries; } - public void setTimeSeriesType(TimeSeries timeSeries) { + public void setTimeSeries(TimeSeries timeSeries) { this.timeSeries = timeSeries; } } diff --git a/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java b/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java new file mode 100644 index 0000000..d192b53 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java @@ -0,0 +1,59 @@ +package ru.ulstu.extractor.ts; + +import org.apache.commons.lang3.time.DateUtils; +import ru.ulstu.extractor.model.TimeSeries; +import ru.ulstu.extractor.model.TimeSeriesValue; + +import java.util.Calendar; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** + * Класс для регулировки дискретности временного ряда. + * Можно создать временной ряд с точками с секундными отметками, затем суммировать значения, + * применив одно из значений TimeSeriesInterval + */ +public class TimeSeriesDateMapper { + + public TimeSeries mapTimeSeriesToInterval(TimeSeriesInterval timeSeriesInterval, TimeSeries timeSeries) { + List trimmedTimeSeriesValues = timeSeries.getValues() + .stream() + .map(timeSeriesValue -> new TimeSeriesValue(trimTo(timeSeriesInterval, timeSeriesValue.getDate()), + timeSeriesValue.getValue())) + .collect(Collectors.toList()); + Map groupedTimeSeriesValues = trimmedTimeSeriesValues + .stream() + .collect(Collectors.groupingBy(TimeSeriesValue::getDate, + Collectors.summingInt(TimeSeriesValue::getValue))); + + return new TimeSeries(timeSeries.getName(), groupedTimeSeriesValues.entrySet() + .stream() + .map(e -> new TimeSeriesValue(e.getKey(), e.getValue())) + .collect(Collectors.toList())); + } + + private Date trimTo(TimeSeriesInterval timeSeriesInterval, Date date) { + return DateUtils.truncate(date, timeSeriesInterval.calendarField); + } + + /** + * Интервальность временного ряда при преобразовании + */ + public enum TimeSeriesInterval { + SECOND(Calendar.SECOND), + MINUTE(Calendar.MINUTE), + HOUR(Calendar.HOUR_OF_DAY), + DAY(Calendar.DAY_OF_MONTH), + WEEK(Calendar.WEEK_OF_MONTH), + MONTH(Calendar.MONTH), + YEAR(Calendar.YEAR); + + private final int calendarField; + + TimeSeriesInterval(int calendarField) { + this.calendarField = calendarField; + } + } +} diff --git a/src/test/java/ru/ulstu/TimeSeriesMapperTest.java b/src/test/java/ru/ulstu/TimeSeriesMapperTest.java new file mode 100644 index 0000000..91030f9 --- /dev/null +++ b/src/test/java/ru/ulstu/TimeSeriesMapperTest.java @@ -0,0 +1,103 @@ +package ru.ulstu; + +import org.junit.Assert; +import org.junit.Test; +import ru.ulstu.extractor.model.TimeSeries; +import ru.ulstu.extractor.model.TimeSeriesValue; +import ru.ulstu.extractor.ts.TimeSeriesDateMapper; + +import java.util.Arrays; +import java.util.Calendar; +import java.util.GregorianCalendar; + +public class TimeSeriesMapperTest { + @Test + public void testMappingByDay() { + Calendar c1 = GregorianCalendar.getInstance(); + c1.set(2020, 5, 1, 1, 1, 1); + Calendar c2 = GregorianCalendar.getInstance(); + c2.set(2020, 5, 2, 2, 1, 1); + TimeSeries timeSeries = new TimeSeries("Тестовый", + Arrays.asList(new TimeSeriesValue(c1.getTime(), 10), + new TimeSeriesValue(c2.getTime(), 10))); + TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); + timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); + Assert.assertEquals(1, timeSeries.getValues().size()); + Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + } + + @Test + public void testMappingByDayDifferent() { + Calendar c1 = GregorianCalendar.getInstance(); + c1.set(2020, 5, 1, 1, 1, 1); + Calendar c2 = GregorianCalendar.getInstance(); + c2.set(2020, 5, 2, 1, 1, 1); + TimeSeries timeSeries = new TimeSeries("Тестовый", + Arrays.asList(new TimeSeriesValue(c1.getTime(), 10), + new TimeSeriesValue(c2.getTime(), 10))); + TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); + timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); + Assert.assertEquals(1, timeSeries.getValues().size()); + Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + } + + @Test + public void testMappingByMonth() { + Calendar c1 = GregorianCalendar.getInstance(); + c1.set(2020, 5, 1, 1, 1, 1); + Calendar c2 = GregorianCalendar.getInstance(); + c2.set(2020, 5, 2, 1, 1, 1); + TimeSeries timeSeries = new TimeSeries("Тестовый", + Arrays.asList(new TimeSeriesValue(c1.getTime(), 10), + new TimeSeriesValue(c2.getTime(), 10))); + TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); + timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); + Assert.assertEquals(1, timeSeries.getValues().size()); + Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + } + + @Test + public void testMappingByMonthDifferent() { + Calendar c1 = GregorianCalendar.getInstance(); + c1.set(2020, 5, 1, 1, 1, 1); + Calendar c2 = GregorianCalendar.getInstance(); + c2.set(2020, 6, 2, 1, 1, 1); + TimeSeries timeSeries = new TimeSeries("Тестовый", + Arrays.asList(new TimeSeriesValue(c1.getTime(), 10), + new TimeSeriesValue(c2.getTime(), 10))); + TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); + timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); + Assert.assertEquals(2, timeSeries.getValues().size()); + Assert.assertEquals(Integer.valueOf(10), timeSeries.getValues().get(0).getValue()); + } + + @Test + public void testMappingByYear() { + Calendar c1 = GregorianCalendar.getInstance(); + c1.set(2020, 5, 1, 1, 1, 1); + Calendar c2 = GregorianCalendar.getInstance(); + c2.set(2020, 5, 2, 1, 1, 1); + TimeSeries timeSeries = new TimeSeries("Тестовый", + Arrays.asList(new TimeSeriesValue(c1.getTime(), 10), + new TimeSeriesValue(c2.getTime(), 10))); + TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); + timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.YEAR, timeSeries); + Assert.assertEquals(1, timeSeries.getValues().size()); + Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + } + + @Test + public void testMappingByYearDifferent() { + Calendar c1 = GregorianCalendar.getInstance(); + c1.set(2020, 5, 1, 1, 1, 1); + Calendar c2 = GregorianCalendar.getInstance(); + c2.set(2021, 5, 2, 1, 1, 1); + TimeSeries timeSeries = new TimeSeries("Тестовый", + Arrays.asList(new TimeSeriesValue(c1.getTime(), 10), + new TimeSeriesValue(c2.getTime(), 10))); + TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); + timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.YEAR, timeSeries); + Assert.assertEquals(2, timeSeries.getValues().size()); + Assert.assertEquals(Integer.valueOf(10), timeSeries.getValues().get(0).getValue()); + } +} -- 2.34.1 From 156cdbc67230bbbfc16f2e9c5a78224d750056d2 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 21 Jun 2022 00:51:52 +0400 Subject: [PATCH 006/122] #58 -- save time series on indexing --- .../BranchController.java | 3 +- .../ulstu/extractor/branch/BranchService.java | 10 --- .../ulstu/extractor/loader/GitScheduler.java | 69 ------------------- .../repository/CommitRepository.java | 3 + .../extractor/service/CommitService.java | 5 ++ .../ulstu/extractor/service/IndexService.java | 10 ++- .../extractor/service/TimeSeriesService.java | 21 +++--- .../extractor/ts/AbstractTSExtractor.java | 21 ------ .../ts/AbstractTimeSeriesCreator.java | 22 ++++++ .../java/ru/ulstu/extractor/ts/CommitsTS.java | 23 ++++--- .../extractor/ts/TimeSeriesDateMapper.java | 15 ++-- 11 files changed, 75 insertions(+), 127 deletions(-) rename src/main/java/ru/ulstu/extractor/{controller => branch}/BranchController.java (95%) delete mode 100644 src/main/java/ru/ulstu/extractor/loader/GitScheduler.java delete mode 100644 src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/AbstractTimeSeriesCreator.java diff --git a/src/main/java/ru/ulstu/extractor/controller/BranchController.java b/src/main/java/ru/ulstu/extractor/branch/BranchController.java similarity index 95% rename from src/main/java/ru/ulstu/extractor/controller/BranchController.java rename to src/main/java/ru/ulstu/extractor/branch/BranchController.java index 64ccecc..47f823e 100644 --- a/src/main/java/ru/ulstu/extractor/controller/BranchController.java +++ b/src/main/java/ru/ulstu/extractor/branch/BranchController.java @@ -3,13 +3,12 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.controller; +package ru.ulstu.extractor.branch; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; -import ru.ulstu.extractor.branch.BranchRepository; import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import springfox.documentation.annotations.ApiIgnore; diff --git a/src/main/java/ru/ulstu/extractor/branch/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/BranchService.java index 8cae8e6..e047bcb 100644 --- a/src/main/java/ru/ulstu/extractor/branch/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/BranchService.java @@ -7,8 +7,6 @@ package ru.ulstu.extractor.branch; import org.slf4j.Logger; import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.model.BaseEntity; @@ -56,14 +54,6 @@ public class BranchService { return branchRepository.findByRepositoryAndName(repository, branchName); } - public int getCommitsCount(Integer repositoryId, String branchName) { - return branchRepository.getCommitsCount(repositoryId, branchName); - } - - public Page findByRepository(Repository repository, Pageable pageable) { - return branchRepository.findByRepository(repository, pageable); - } - public List findAll() { return branchRepository.findAll(); } diff --git a/src/main/java/ru/ulstu/extractor/loader/GitScheduler.java b/src/main/java/ru/ulstu/extractor/loader/GitScheduler.java deleted file mode 100644 index 4a16fdc..0000000 --- a/src/main/java/ru/ulstu/extractor/loader/GitScheduler.java +++ /dev/null @@ -1,69 +0,0 @@ -package ru.ulstu.extractor.loader; - -import org.eclipse.jgit.api.errors.GitAPIException; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.data.domain.Page; -import org.springframework.scheduling.annotation.Scheduled; -import org.springframework.stereotype.Service; -import ru.ulstu.extractor.branch.BranchService; -import ru.ulstu.extractor.gitrepository.GitRepositoryService; -import ru.ulstu.extractor.model.Branch; -import ru.ulstu.extractor.model.OffsetablePageRequest; -import ru.ulstu.extractor.model.Repository; -import ru.ulstu.extractor.service.IndexService; -import ru.ulstu.extractor.ts.AbstractTSExtractor; - -import java.io.IOException; -import java.util.List; - -@Service -public class GitScheduler { - private final static int DEFAULT_PAGE_SIZE = 100; - private final Logger log = LoggerFactory.getLogger(GitScheduler.class); - private final GitRepositoryService gitRepositoryService; - private final BranchService branchService; - private final IndexService indexService; - private final List tsExtractors; - - public GitScheduler(GitRepositoryService gitRepositoryService, - BranchService branchService, - IndexService indexService, - List tsExtractors) { - this.gitRepositoryService = gitRepositoryService; - this.branchService = branchService; - this.indexService = indexService; - this.tsExtractors = tsExtractors; - } - - @Scheduled(cron = "* */5 * * * *") - public void getCommitsCount() { - log.debug("Load commits count started"); - int repositoryPageNumber = 0; - Page repositoryPage; - do { - int branchPageNumber = 0; - repositoryPage = gitRepositoryService.findAll( - new OffsetablePageRequest(repositoryPageNumber, DEFAULT_PAGE_SIZE)); - Page branchPage; - for (Repository repository : repositoryPage.getContent()) { - do { - branchPage = branchService.findByRepository(repository, - new OffsetablePageRequest(branchPageNumber, DEFAULT_PAGE_SIZE)); - for (Branch branch : branchPage.getContent()) { - try { - indexService.index(repository.getUrl(), branch.getName()); - tsExtractors.forEach(tsExtractor -> tsExtractor.addPoint(repository.getId(), branch.getName())); - } catch (GitAPIException | IOException ex) { - log.warn(ex.getMessage()); - ex.printStackTrace(); - } - } - branchPageNumber++; - } while (!branchPage.isEmpty()); - } - repositoryPageNumber++; - } while (!repositoryPage.isEmpty()); - log.debug("Load commits count finished"); - } -} diff --git a/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java b/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java index a1845b4..8bf5e98 100644 --- a/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java +++ b/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java @@ -39,4 +39,7 @@ public interface CommitRepository extends JpaRepository { List getCommitTimeEntityStatistic(@Param("branchId") Integer branchId, @Param("author") String author); void deleteByBranchIsNull(); + + @Query("SELECT b.commits FROM Branch b WHERE b.name = ?2 and b.repository.id = ?1") + List findByRepositoryIdAndBranchName(Integer repositoryId, String name); } diff --git a/src/main/java/ru/ulstu/extractor/service/CommitService.java b/src/main/java/ru/ulstu/extractor/service/CommitService.java index ed75ee1..8da7bda 100644 --- a/src/main/java/ru/ulstu/extractor/service/CommitService.java +++ b/src/main/java/ru/ulstu/extractor/service/CommitService.java @@ -49,6 +49,11 @@ public class CommitService { updateQuery = String.format(updateQuery, String.join(",", commitIds)); jdbcTemplate.update(updateQuery, branchId); } + + + public List findByRepositoryIdAndName(Integer repositoryId, String branchName) { + return commitRepository.findByRepositoryIdAndBranchName(repositoryId, branchName); + } } diff --git a/src/main/java/ru/ulstu/extractor/service/IndexService.java b/src/main/java/ru/ulstu/extractor/service/IndexService.java index 86f9454..875f357 100644 --- a/src/main/java/ru/ulstu/extractor/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/service/IndexService.java @@ -10,13 +10,13 @@ import org.eclipse.jgit.api.errors.GitAPIException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.branch.BranchService; import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import ru.ulstu.extractor.gitrepository.GitRepositoryService; import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.model.Repository; +import ru.ulstu.extractor.ts.AbstractTimeSeriesCreator; import java.io.IOException; import java.util.Collections; @@ -29,16 +29,18 @@ public class IndexService { private final GitRepositoryService gitRepositoryService; private final GitRepositoryRepository gitRepositoryRepository; private final BranchService branchService; + private final List timeSeriesCreators; public IndexService(GitRepositoryService gitRepositoryService, GitRepositoryRepository gitRepositoryRepository, - BranchService branchService) { + BranchService branchService, + List timeSeriesCreators) { this.gitRepositoryService = gitRepositoryService; this.gitRepositoryRepository = gitRepositoryRepository; this.branchService = branchService; + this.timeSeriesCreators = timeSeriesCreators; } - @Transactional public void index(@NotNull String repositoryUrl, @NotNull String branchName) throws GitAPIException, IOException { Repository repository = gitRepositoryRepository.findByUrl(repositoryUrl); if (repository == null) { @@ -60,6 +62,8 @@ public class IndexService { commitsTo += COMMITS_PAGE_SIZE; commits = gitRepositoryService.getCommits(repositoryUrl, branchName, commitsFrom, commitsTo, false); } + Integer repositoryId = repository.getId(); + timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchName)); LOG.debug("Complete indexing {} branch", branchName); } } diff --git a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java index 5653c3e..30a8327 100644 --- a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java @@ -13,6 +13,7 @@ import ru.ulstu.extractor.model.TimeSeries; import ru.ulstu.extractor.model.TimeSeriesValue; import ru.ulstu.extractor.repository.TimeSeriesRepository; import ru.ulstu.extractor.repository.TimeSeriesValueRepository; +import ru.ulstu.extractor.ts.TimeSeriesDateMapper; import java.util.Date; import java.util.List; @@ -24,21 +25,23 @@ public class TimeSeriesService { private final static Logger LOG = LoggerFactory.getLogger(TimeSeriesService.class); private final TimeSeriesRepository timeSeriesRepository; private final TimeSeriesValueRepository timeSeriesValueRepository; - + private final TimeSeriesDateMapper.TimeSeriesInterval timeSeriesInterval = TimeSeriesDateMapper.TimeSeriesInterval.HOUR; public TimeSeriesService(TimeSeriesRepository timeSeriesRepository, TimeSeriesValueRepository timeSeriesValueRepository) { this.timeSeriesRepository = timeSeriesRepository; this.timeSeriesValueRepository = timeSeriesValueRepository; } - public TimeSeries save(TimeSeries timeSeries, List timeSeriesValues) { - LOG.debug("Start save {} time series with {} time series values ", timeSeries.getName(), timeSeriesValues.size()); + public TimeSeries save(String timeSeriesName, List timeSeriesValues) { + LOG.debug("Start save {} time series with {} time series values ", timeSeriesName, timeSeriesValues.size()); + final TimeSeries timeSeries = findOrCreate(timeSeriesName); List timeSeriesValuesToRemoveIds = timeSeries.getValues().stream().map(BaseEntity::getId).collect(Collectors.toList()); + timeSeriesValues.forEach(v -> v.setTimeSeries(timeSeries)); timeSeries.setValues(timeSeriesValues); LOG.debug("Save time series {} ", timeSeries.getName()); - timeSeries = timeSeriesRepository.save(timeSeries); + TimeSeries savedTimeSeries = timeSeriesRepository.save(timeSeries); LOG.debug("Clear {} ime series values ", timeSeriesValuesToRemoveIds.size()); - return timeSeries; + return savedTimeSeries; } public TimeSeries findOrCreate(String timeSeriesName) { @@ -64,12 +67,12 @@ public class TimeSeriesService { TimeSeries timeSeries = findOrCreate(timeSeriesName); timeSeriesValueRepository.save(new TimeSeriesValue(timeSeries, date, value)); } -// -// public TimeSeriesValue findByTimeSeriesAndName(TimeSeries timeSeries, String name) { -// return timeSeriesValueRepository.findByTimeSeriesAndName(timeSeries, name); -// } public List findAll() { return timeSeriesValueRepository.findAll(); } + + public TimeSeriesDateMapper.TimeSeriesInterval getTimeSeriesInterval() { + return timeSeriesInterval; + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java b/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java deleted file mode 100644 index 14271ee..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/AbstractTSExtractor.java +++ /dev/null @@ -1,21 +0,0 @@ -package ru.ulstu.extractor.ts; - -import ru.ulstu.extractor.service.TimeSeriesService; - -import java.util.Date; - -public abstract class AbstractTSExtractor { - - public abstract String getTSName(); - - public abstract int getNewTSValue(Integer repositoryId, String branchName); - - public abstract TimeSeriesService getTimeSeriesService(); - - public void addPoint(Integer repositoryId, String branchName) { - getTimeSeriesService().addTimeSeriesValue( - String.format("%s %s %s", getTSName(), repositoryId, branchName), - new Date(), - getNewTSValue(repositoryId, branchName)); - } -} diff --git a/src/main/java/ru/ulstu/extractor/ts/AbstractTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/AbstractTimeSeriesCreator.java new file mode 100644 index 0000000..2cc9f4f --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/AbstractTimeSeriesCreator.java @@ -0,0 +1,22 @@ +package ru.ulstu.extractor.ts; + +import ru.ulstu.extractor.model.TimeSeriesValue; +import ru.ulstu.extractor.service.TimeSeriesService; + +import java.util.List; + +public abstract class AbstractTimeSeriesCreator { + + public abstract String getTimeSeriesName(); + + public abstract List getTimeSeriesValues(Integer repositoryId, String branchName); + + public abstract TimeSeriesService getTimeSeriesService(); + + public void addTimeSeries(Integer repositoryId, String branchName) { + getTimeSeriesService().save( + String.format("%s %s %s", getTimeSeriesName(), repositoryId, branchName), + TimeSeriesDateMapper.mapTimeSeriesToInterval(getTimeSeriesService().getTimeSeriesInterval(), + getTimeSeriesValues(repositoryId, branchName))); + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java index a50f988..6a2b6f2 100644 --- a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java @@ -1,28 +1,35 @@ package ru.ulstu.extractor.ts; import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.BranchService; +import ru.ulstu.extractor.model.TimeSeriesValue; +import ru.ulstu.extractor.service.CommitService; import ru.ulstu.extractor.service.TimeSeriesService; +import java.util.List; +import java.util.stream.Collectors; + @Component -public class CommitsTS extends AbstractTSExtractor { +public class CommitsTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final BranchService branchService; + private final CommitService commitService; public CommitsTS(TimeSeriesService timeSeriesService, - BranchService branchService) { + CommitService commitService) { this.timeSeriesService = timeSeriesService; - this.branchService = branchService; + this.commitService = commitService; } @Override - public String getTSName() { + public String getTimeSeriesName() { return "Количество коммитов во времени"; } @Override - public int getNewTSValue(Integer repositoryId, String branchName) { - return branchService.getCommitsCount(repositoryId, branchName); + public List getTimeSeriesValues(Integer repositoryId, String branchName) { + return commitService.findByRepositoryIdAndName(repositoryId, branchName) + .stream() + .map(c -> new TimeSeriesValue(c.getDate(), 1)) + .collect(Collectors.toList()); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java b/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java index d192b53..19298a0 100644 --- a/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java +++ b/src/main/java/ru/ulstu/extractor/ts/TimeSeriesDateMapper.java @@ -17,8 +17,8 @@ import java.util.stream.Collectors; */ public class TimeSeriesDateMapper { - public TimeSeries mapTimeSeriesToInterval(TimeSeriesInterval timeSeriesInterval, TimeSeries timeSeries) { - List trimmedTimeSeriesValues = timeSeries.getValues() + public static List mapTimeSeriesToInterval(TimeSeriesInterval timeSeriesInterval, List timeSeriesValues) { + List trimmedTimeSeriesValues = timeSeriesValues .stream() .map(timeSeriesValue -> new TimeSeriesValue(trimTo(timeSeriesInterval, timeSeriesValue.getDate()), timeSeriesValue.getValue())) @@ -28,13 +28,18 @@ public class TimeSeriesDateMapper { .collect(Collectors.groupingBy(TimeSeriesValue::getDate, Collectors.summingInt(TimeSeriesValue::getValue))); - return new TimeSeries(timeSeries.getName(), groupedTimeSeriesValues.entrySet() + return groupedTimeSeriesValues.entrySet() .stream() .map(e -> new TimeSeriesValue(e.getKey(), e.getValue())) - .collect(Collectors.toList())); + .collect(Collectors.toList()); } - private Date trimTo(TimeSeriesInterval timeSeriesInterval, Date date) { + public static TimeSeries mapTimeSeriesToInterval(TimeSeriesInterval timeSeriesInterval, TimeSeries timeSeries) { + timeSeries.setValues(mapTimeSeriesToInterval(timeSeriesInterval, timeSeries.getValues())); + return timeSeries; + } + + private static Date trimTo(TimeSeriesInterval timeSeriesInterval, Date date) { return DateUtils.truncate(date, timeSeriesInterval.calendarField); } -- 2.34.1 From a7add46348bf4f3a4bb0556ec4eb79377d88d3d0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 21 Jun 2022 10:39:53 +0400 Subject: [PATCH 007/122] #58 -- fix models naming, refactor --- .../extractor/branch/BranchRepository.java | 21 --------- .../{ => controller}/BranchController.java | 7 +-- .../extractor/{ => branch}/model/Branch.java | 19 ++++---- .../branch/repository/BranchRepository.java | 21 +++++++++ .../branch/{ => service}/BranchService.java | 13 +++--- .../extractor/{ => commit}/model/Commit.java | 1 + .../model/CommitAuthorStatistic.java | 2 +- .../model/CommitEntityStatistic.java | 2 +- .../model/CommitTimeStatistic.java | 2 +- .../model/CommitUrlStatistic.java | 2 +- .../commit/repository/CommitRepository.java | 45 +++++++++++++++++++ .../{ => commit}/service/CommitService.java | 5 ++- .../controller/GitIndexingController.java | 2 +- .../controller/StatisticController.java | 4 +- .../GitRepositoryRepository.java | 6 +-- .../gitrepository/GitRepositoryService.java | 6 +-- .../model/GitRepository.java} | 10 +++-- .../repository/AuthorRepository.java | 6 +-- .../repository/CommitRepository.java | 45 ------------------- .../extractor/service/FilteringService.java | 2 +- .../ulstu/extractor/service/IndexService.java | 18 ++++---- .../extractor/service/TimeSeriesService.java | 2 +- .../java/ru/ulstu/extractor/ts/CommitsTS.java | 3 +- .../db/changelog-20220621_120000-schema.xml | 11 +++++ src/main/resources/db/changelog-master.xml | 1 + src/main/resources/templates/statistic.html | 2 +- 26 files changed, 140 insertions(+), 118 deletions(-) delete mode 100644 src/main/java/ru/ulstu/extractor/branch/BranchRepository.java rename src/main/java/ru/ulstu/extractor/branch/{ => controller}/BranchController.java (85%) rename src/main/java/ru/ulstu/extractor/{ => branch}/model/Branch.java (70%) create mode 100644 src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java rename src/main/java/ru/ulstu/extractor/branch/{ => service}/BranchService.java (81%) rename src/main/java/ru/ulstu/extractor/{ => commit}/model/Commit.java (98%) rename src/main/java/ru/ulstu/extractor/{ => commit}/model/CommitAuthorStatistic.java (90%) rename src/main/java/ru/ulstu/extractor/{ => commit}/model/CommitEntityStatistic.java (90%) rename src/main/java/ru/ulstu/extractor/{ => commit}/model/CommitTimeStatistic.java (92%) rename src/main/java/ru/ulstu/extractor/{ => commit}/model/CommitUrlStatistic.java (89%) create mode 100644 src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java rename src/main/java/ru/ulstu/extractor/{ => commit}/service/CommitService.java (92%) rename src/main/java/ru/ulstu/extractor/{model/Repository.java => gitrepository/model/GitRepository.java} (51%) delete mode 100644 src/main/java/ru/ulstu/extractor/repository/CommitRepository.java create mode 100644 src/main/resources/db/changelog-20220621_120000-schema.xml diff --git a/src/main/java/ru/ulstu/extractor/branch/BranchRepository.java b/src/main/java/ru/ulstu/extractor/branch/BranchRepository.java deleted file mode 100644 index 6034cb3..0000000 --- a/src/main/java/ru/ulstu/extractor/branch/BranchRepository.java +++ /dev/null @@ -1,21 +0,0 @@ -package ru.ulstu.extractor.branch; - -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; -import ru.ulstu.extractor.model.Branch; -import ru.ulstu.extractor.model.Repository; - -import java.util.List; - -public interface BranchRepository extends JpaRepository { - Branch findByRepositoryAndName(Repository repository, String name); - - @Query("select count(c) from Commit c LEFT JOIN c.branch b LEFT JOIN Repository r where r.id = ?1 AND b.name = ?2") - int getCommitsCount(Integer repositoryId, String name); - - List findByRepositoryId(Integer repositoryId); - - Page findByRepository(Repository repository, Pageable pageable); -} diff --git a/src/main/java/ru/ulstu/extractor/branch/BranchController.java b/src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java similarity index 85% rename from src/main/java/ru/ulstu/extractor/branch/BranchController.java rename to src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java index 47f823e..22432bd 100644 --- a/src/main/java/ru/ulstu/extractor/branch/BranchController.java +++ b/src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java @@ -3,12 +3,13 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.branch; +package ru.ulstu.extractor.branch.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; +import ru.ulstu.extractor.branch.repository.BranchRepository; import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import springfox.documentation.annotations.ApiIgnore; @@ -30,7 +31,7 @@ public class BranchController { public String indexBranch( Model model, @RequestParam int repositoryId) { - model.addAttribute("branches", branchRepository.findByRepositoryId(repositoryId)); + model.addAttribute("branches", branchRepository.findByGitRepositoryId(repositoryId)); model.addAttribute("repository", gitRepositoryRepository.findById(repositoryId).get()); return LIST_REPOSITORY_BRANCHES; } @@ -40,7 +41,7 @@ public class BranchController { @RequestParam int repositoryId, @RequestParam Integer id) { branchRepository.deleteById(id); - model.addAttribute("branches", branchRepository.findByRepositoryId(repositoryId)); + model.addAttribute("branches", branchRepository.findByGitRepositoryId(repositoryId)); model.addAttribute("repository", gitRepositoryRepository.findById(repositoryId).get()); return LIST_REPOSITORY_BRANCHES; } diff --git a/src/main/java/ru/ulstu/extractor/model/Branch.java b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java similarity index 70% rename from src/main/java/ru/ulstu/extractor/model/Branch.java rename to src/main/java/ru/ulstu/extractor/branch/model/Branch.java index 30c30dd..6837771 100644 --- a/src/main/java/ru/ulstu/extractor/model/Branch.java +++ b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java @@ -3,10 +3,13 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.branch.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; +import ru.ulstu.extractor.gitrepository.model.GitRepository; +import ru.ulstu.extractor.model.BaseEntity; +import ru.ulstu.extractor.model.Commit; import javax.persistence.CascadeType; import javax.persistence.Entity; @@ -22,7 +25,7 @@ public class Branch extends BaseEntity { private String name; @ManyToOne - private Repository repository; + private GitRepository gitRepository; @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY) @JoinColumn(name = "branch_id") @@ -36,8 +39,8 @@ public class Branch extends BaseEntity { this.name = name; } - public Branch(Repository repository, String branchName) { - this.repository = repository; + public Branch(GitRepository gitRepository, String branchName) { + this.gitRepository = gitRepository; this.name = branchName; } @@ -49,12 +52,12 @@ public class Branch extends BaseEntity { this.name = name; } - public Repository getRepository() { - return repository; + public GitRepository getGitRepository() { + return gitRepository; } - public void setRepository(Repository repository) { - this.repository = repository; + public void setGitRepository(GitRepository gitRepository) { + this.gitRepository = gitRepository; } public List getCommits() { diff --git a/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java b/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java new file mode 100644 index 0000000..af14f53 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java @@ -0,0 +1,21 @@ +package ru.ulstu.extractor.branch.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.model.GitRepository; + +import java.util.List; + +public interface BranchRepository extends JpaRepository { + Branch findByGitRepositoryAndName(GitRepository gitRepository, String name); + + @Query("select count(c) from Commit c LEFT JOIN c.branch b LEFT JOIN GitRepository r where r.id = ?1 AND b.name = ?2") + int getCommitsCount(Integer repositoryId, String name); + + List findByGitRepositoryId(Integer repositoryId); + + Page findByGitRepository(GitRepository gitRepository, Pageable pageable); +} diff --git a/src/main/java/ru/ulstu/extractor/branch/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java similarity index 81% rename from src/main/java/ru/ulstu/extractor/branch/BranchService.java rename to src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index e047bcb..3d6fd28 100644 --- a/src/main/java/ru/ulstu/extractor/branch/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -3,17 +3,18 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.branch; +package ru.ulstu.extractor.branch.service; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.repository.BranchRepository; +import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.model.BaseEntity; -import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.Commit; -import ru.ulstu.extractor.model.Repository; -import ru.ulstu.extractor.service.CommitService; import java.util.List; import java.util.stream.Collectors; @@ -50,8 +51,8 @@ public class BranchService { return branch; } - public Branch findByRepositoryAndName(Repository repository, String branchName) { - return branchRepository.findByRepositoryAndName(repository, branchName); + public Branch findByRepositoryAndName(GitRepository gitRepository, String branchName) { + return branchRepository.findByGitRepositoryAndName(gitRepository, branchName); } public List findAll() { diff --git a/src/main/java/ru/ulstu/extractor/model/Commit.java b/src/main/java/ru/ulstu/extractor/commit/model/Commit.java similarity index 98% rename from src/main/java/ru/ulstu/extractor/model/Commit.java rename to src/main/java/ru/ulstu/extractor/commit/model/Commit.java index daf9087..699ff94 100644 --- a/src/main/java/ru/ulstu/extractor/model/Commit.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/Commit.java @@ -7,6 +7,7 @@ package ru.ulstu.extractor.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; +import ru.ulstu.extractor.branch.model.Branch; import javax.persistence.CascadeType; import javax.persistence.Entity; diff --git a/src/main/java/ru/ulstu/extractor/model/CommitAuthorStatistic.java b/src/main/java/ru/ulstu/extractor/commit/model/CommitAuthorStatistic.java similarity index 90% rename from src/main/java/ru/ulstu/extractor/model/CommitAuthorStatistic.java rename to src/main/java/ru/ulstu/extractor/commit/model/CommitAuthorStatistic.java index 5587cb2..c3d98f4 100644 --- a/src/main/java/ru/ulstu/extractor/model/CommitAuthorStatistic.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/CommitAuthorStatistic.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.commit.model; public class CommitAuthorStatistic { private String author; diff --git a/src/main/java/ru/ulstu/extractor/model/CommitEntityStatistic.java b/src/main/java/ru/ulstu/extractor/commit/model/CommitEntityStatistic.java similarity index 90% rename from src/main/java/ru/ulstu/extractor/model/CommitEntityStatistic.java rename to src/main/java/ru/ulstu/extractor/commit/model/CommitEntityStatistic.java index 61dc428..2a1a677 100644 --- a/src/main/java/ru/ulstu/extractor/model/CommitEntityStatistic.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/CommitEntityStatistic.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.commit.model; public class CommitEntityStatistic { private Boolean entity; diff --git a/src/main/java/ru/ulstu/extractor/model/CommitTimeStatistic.java b/src/main/java/ru/ulstu/extractor/commit/model/CommitTimeStatistic.java similarity index 92% rename from src/main/java/ru/ulstu/extractor/model/CommitTimeStatistic.java rename to src/main/java/ru/ulstu/extractor/commit/model/CommitTimeStatistic.java index a9ca75c..4cdb369 100644 --- a/src/main/java/ru/ulstu/extractor/model/CommitTimeStatistic.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/CommitTimeStatistic.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.commit.model; public class CommitTimeStatistic { private final static String DATE_TEMPLATE = "%s.%s"; diff --git a/src/main/java/ru/ulstu/extractor/model/CommitUrlStatistic.java b/src/main/java/ru/ulstu/extractor/commit/model/CommitUrlStatistic.java similarity index 89% rename from src/main/java/ru/ulstu/extractor/model/CommitUrlStatistic.java rename to src/main/java/ru/ulstu/extractor/commit/model/CommitUrlStatistic.java index 3eb4b37..c075074 100644 --- a/src/main/java/ru/ulstu/extractor/model/CommitUrlStatistic.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/CommitUrlStatistic.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.commit.model; public class CommitUrlStatistic { private String url; diff --git a/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java b/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java new file mode 100644 index 0000000..d0558d8 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java @@ -0,0 +1,45 @@ +/* + * Copyright (C) 2021 Anton Romanov - All Rights Reserved + * You may use, distribute and modify this code, please write to: romanov73@gmail.com. + */ + +package ru.ulstu.extractor.commit.repository; + +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.query.Param; +import ru.ulstu.extractor.commit.model.CommitAuthorStatistic; +import ru.ulstu.extractor.commit.model.CommitEntityStatistic; +import ru.ulstu.extractor.commit.model.CommitTimeStatistic; +import ru.ulstu.extractor.commit.model.CommitUrlStatistic; +import ru.ulstu.extractor.gitrepository.model.GitRepository; +import ru.ulstu.extractor.model.Commit; + +import java.util.List; + +public interface CommitRepository extends JpaRepository { + @Query("SELECT DISTINCT c FROM Commit c LEFT JOIN c.branch b LEFT JOIN c.fileChanges f LEFT JOIN c.author a LEFT JOIN b.gitRepository r WHERE r = :repository AND b.name = :branchName AND (:author IS NULL OR :author = '' OR a.name = :author) AND (:filter IS NULL OR :filter = '' OR lower(c.message) LIKE lower(concat('%', :filter,'%'))) AND (:entity IS NULL OR f.containsEntity = :entity)") + Page findByRepositoryAndBranch(Pageable pageable, @Param("repository") GitRepository gitRepository, @Param("branchName") String branchName, @Param("author") String author, @Param("filter") String filter, @Param("entity") Boolean entity); + + @Query("SELECT new ru.ulstu.extractor.commit.model.CommitAuthorStatistic(c.author.name, COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a WHERE (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by c.author.name") + List getCommitAuthorStatistic(@Param("branchId") Integer branchId, @Param("author") String author); + + @Query("SELECT new ru.ulstu.extractor.commit.model.CommitUrlStatistic(c.branch.gitRepository.url, COUNT(DISTINCT c.hash)) FROM Commit c GROUP by c.branch.gitRepository.url") + List getCommitUrlStatistic(); + + @Query("SELECT new ru.ulstu.extractor.commit.model.CommitTimeStatistic(extract(month FROM c.date) as month, extract(year FROM c.date) as year, COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a WHERE (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by extract(month from c.date), extract(year from c.date) ORDER by extract(year from c.date), extract(month from c.date)") + List getCommitTimeStatistic(@Param("branchId") Integer branchId, @Param("author") String author); + + @Query("SELECT new ru.ulstu.extractor.commit.model.CommitEntityStatistic(f.containsEntity, COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a LEFT JOIN c.fileChanges f WHERE (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by f.containsEntity") + List getCommitEntityStatistic(@Param("branchId") Integer branchId, @Param("author") String author); + + @Query("SELECT new ru.ulstu.extractor.commit.model.CommitTimeStatistic(EXTRACT(MONTH FROM c.date), EXTRACT(YEAR FROM c.date), COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a LEFT JOIN c.fileChanges f WHERE f.containsEntity = true AND (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by extract(month from c.date), extract(year from c.date) ORDER by extract(year from c.date), extract(month from c.date)") + List getCommitTimeEntityStatistic(@Param("branchId") Integer branchId, @Param("author") String author); + + void deleteByBranchIsNull(); + + @Query("SELECT b.commits FROM Branch b WHERE b.name = ?2 and b.gitRepository.id = ?1") + List findByRepositoryIdAndBranchName(Integer repositoryId, String name); +} diff --git a/src/main/java/ru/ulstu/extractor/service/CommitService.java b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java similarity index 92% rename from src/main/java/ru/ulstu/extractor/service/CommitService.java rename to src/main/java/ru/ulstu/extractor/commit/service/CommitService.java index 8da7bda..fd1c449 100644 --- a/src/main/java/ru/ulstu/extractor/service/CommitService.java +++ b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java @@ -3,12 +3,13 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.service; +package ru.ulstu.extractor.commit.service; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.commit.repository.CommitRepository; import ru.ulstu.extractor.model.Commit; -import ru.ulstu.extractor.repository.CommitRepository; +import ru.ulstu.extractor.service.AuthorService; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java b/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java index 3102ba5..7708a1f 100644 --- a/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java +++ b/src/main/java/ru/ulstu/extractor/controller/GitIndexingController.java @@ -15,8 +15,8 @@ import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.gitrepository.GitRepositoryService; -import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.mvc.FilterForm; import ru.ulstu.extractor.model.mvc.RepoForm; import ru.ulstu.extractor.service.IndexService; diff --git a/src/main/java/ru/ulstu/extractor/controller/StatisticController.java b/src/main/java/ru/ulstu/extractor/controller/StatisticController.java index fd729ef..771a5a0 100644 --- a/src/main/java/ru/ulstu/extractor/controller/StatisticController.java +++ b/src/main/java/ru/ulstu/extractor/controller/StatisticController.java @@ -9,9 +9,9 @@ import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; -import ru.ulstu.extractor.branch.BranchService; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.repository.CommitRepository; import ru.ulstu.extractor.model.mvc.FilterForm; -import ru.ulstu.extractor.repository.CommitRepository; import ru.ulstu.extractor.service.FilteringService; import springfox.documentation.annotations.ApiIgnore; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java index a94a59a..ae9e821 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryRepository.java @@ -1,8 +1,8 @@ package ru.ulstu.extractor.gitrepository; import org.springframework.data.jpa.repository.JpaRepository; -import ru.ulstu.extractor.model.Repository; +import ru.ulstu.extractor.gitrepository.model.GitRepository; -public interface GitRepositoryRepository extends JpaRepository { - Repository findByUrl(String url); +public interface GitRepositoryRepository extends JpaRepository { + GitRepository findByUrl(String url); } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java index 61eebf9..f05a91a 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/GitRepositoryService.java @@ -18,16 +18,16 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.heuristic.model.BusinessLogicUnit; import ru.ulstu.extractor.heuristic.model.EntityUnit; import ru.ulstu.extractor.heuristic.model.ResourceUnit; import ru.ulstu.extractor.heuristic.service.StructuralUnitService; import ru.ulstu.extractor.model.Author; -import ru.ulstu.extractor.model.Branch; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.model.FileChange; import ru.ulstu.extractor.model.LineChange; -import ru.ulstu.extractor.model.Repository; import java.io.ByteArrayOutputStream; import java.io.File; @@ -346,7 +346,7 @@ public class GitRepositoryService { return Optional.empty(); } - public Page findAll(Pageable pageable) { + public Page findAll(Pageable pageable) { return gitRepositoryRepository.findAll(pageable); } } diff --git a/src/main/java/ru/ulstu/extractor/model/Repository.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java similarity index 51% rename from src/main/java/ru/ulstu/extractor/model/Repository.java rename to src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java index 651bfca..edabd3e 100644 --- a/src/main/java/ru/ulstu/extractor/model/Repository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java @@ -1,15 +1,17 @@ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.gitrepository.model; + +import ru.ulstu.extractor.model.BaseEntity; import javax.persistence.Entity; @Entity -public class Repository extends BaseEntity { +public class GitRepository extends BaseEntity { private String url; - public Repository() { + public GitRepository() { } - public Repository(String repositoryUrl) { + public GitRepository(String repositoryUrl) { url = repositoryUrl; } diff --git a/src/main/java/ru/ulstu/extractor/repository/AuthorRepository.java b/src/main/java/ru/ulstu/extractor/repository/AuthorRepository.java index 26b5f45..0ae8a20 100644 --- a/src/main/java/ru/ulstu/extractor/repository/AuthorRepository.java +++ b/src/main/java/ru/ulstu/extractor/repository/AuthorRepository.java @@ -8,14 +8,14 @@ package ru.ulstu.extractor.repository; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.model.Author; -import ru.ulstu.extractor.model.Repository; import java.util.List; public interface AuthorRepository extends JpaRepository { - @Query("SELECT DISTINCT a.name FROM Commit c, Repository r, Branch b, Author a WHERE c.author = a AND c.branch = b AND r = b.repository AND (:repository IS NULL OR r = :repository) AND (:branchName IS NULL OR :branchName = '' OR b.name = :branchName) AND a.name IS NOT NULL AND a.name <> '' ORDER BY a.name") - List findByRepositoryAndBranch(@Param("repository") Repository repository, @Param("branchName") String branchName); + @Query("SELECT DISTINCT a.name FROM Commit c, GitRepository r, Branch b, Author a WHERE c.author = a AND c.branch = b AND r = b.gitRepository AND (:repository IS NULL OR r = :repository) AND (:branchName IS NULL OR :branchName = '' OR b.name = :branchName) AND a.name IS NOT NULL AND a.name <> '' ORDER BY a.name") + List findByRepositoryAndBranch(@Param("repository") GitRepository gitRepository, @Param("branchName") String branchName); List findByName(String name); diff --git a/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java b/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java deleted file mode 100644 index 8bf5e98..0000000 --- a/src/main/java/ru/ulstu/extractor/repository/CommitRepository.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - -package ru.ulstu.extractor.repository; - -import org.springframework.data.domain.Page; -import org.springframework.data.domain.Pageable; -import org.springframework.data.jpa.repository.JpaRepository; -import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.query.Param; -import ru.ulstu.extractor.model.Commit; -import ru.ulstu.extractor.model.CommitAuthorStatistic; -import ru.ulstu.extractor.model.CommitEntityStatistic; -import ru.ulstu.extractor.model.CommitTimeStatistic; -import ru.ulstu.extractor.model.CommitUrlStatistic; -import ru.ulstu.extractor.model.Repository; - -import java.util.List; - -public interface CommitRepository extends JpaRepository { - @Query("SELECT DISTINCT c FROM Commit c LEFT JOIN c.branch b LEFT JOIN c.fileChanges f LEFT JOIN c.author a LEFT JOIN b.repository r WHERE r = :repository AND b.name = :branchName AND (:author IS NULL OR :author = '' OR a.name = :author) AND (:filter IS NULL OR :filter = '' OR lower(c.message) LIKE lower(concat('%', :filter,'%'))) AND (:entity IS NULL OR f.containsEntity = :entity)") - Page findByRepositoryAndBranch(Pageable pageable, @Param("repository") Repository repository, @Param("branchName") String branchName, @Param("author") String author, @Param("filter") String filter, @Param("entity") Boolean entity); - - @Query("SELECT new ru.ulstu.extractor.model.CommitAuthorStatistic(c.author.name, COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a WHERE (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by c.author.name") - List getCommitAuthorStatistic(@Param("branchId") Integer branchId, @Param("author") String author); - - @Query("SELECT new ru.ulstu.extractor.model.CommitUrlStatistic(c.branch.repository.url, COUNT(DISTINCT c.hash)) FROM Commit c GROUP by c.branch.repository.url") - List getCommitUrlStatistic(); - - @Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(extract(month FROM c.date) as month, extract(year FROM c.date) as year, COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a WHERE (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by extract(month from c.date), extract(year from c.date) ORDER by extract(year from c.date), extract(month from c.date)") - List getCommitTimeStatistic(@Param("branchId") Integer branchId, @Param("author") String author); - - @Query("SELECT new ru.ulstu.extractor.model.CommitEntityStatistic(f.containsEntity, COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a LEFT JOIN c.fileChanges f WHERE (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by f.containsEntity") - List getCommitEntityStatistic(@Param("branchId") Integer branchId, @Param("author") String author); - - @Query("SELECT new ru.ulstu.extractor.model.CommitTimeStatistic(EXTRACT(MONTH FROM c.date), EXTRACT(YEAR FROM c.date), COUNT(DISTINCT c.hash)) FROM Commit c LEFT JOIN c.branch LEFT JOIN c.author a LEFT JOIN c.fileChanges f WHERE f.containsEntity = true AND (:branchId IS NULL OR c.branch.id = :branchId) AND (:author IS NULL OR :author = '' OR a.name = :author) GROUP by extract(month from c.date), extract(year from c.date) ORDER by extract(year from c.date), extract(month from c.date)") - List getCommitTimeEntityStatistic(@Param("branchId") Integer branchId, @Param("author") String author); - - void deleteByBranchIsNull(); - - @Query("SELECT b.commits FROM Branch b WHERE b.name = ?2 and b.repository.id = ?1") - List findByRepositoryIdAndBranchName(Integer repositoryId, String name); -} diff --git a/src/main/java/ru/ulstu/extractor/service/FilteringService.java b/src/main/java/ru/ulstu/extractor/service/FilteringService.java index 51802aa..ddeda0c 100644 --- a/src/main/java/ru/ulstu/extractor/service/FilteringService.java +++ b/src/main/java/ru/ulstu/extractor/service/FilteringService.java @@ -9,10 +9,10 @@ import com.sun.istack.NotNull; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.commit.repository.CommitRepository; import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.repository.AuthorRepository; -import ru.ulstu.extractor.repository.CommitRepository; import java.util.List; import java.util.Map; diff --git a/src/main/java/ru/ulstu/extractor/service/IndexService.java b/src/main/java/ru/ulstu/extractor/service/IndexService.java index 875f357..d5415e2 100644 --- a/src/main/java/ru/ulstu/extractor/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/service/IndexService.java @@ -10,12 +10,12 @@ import org.eclipse.jgit.api.errors.GitAPIException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; -import ru.ulstu.extractor.branch.BranchService; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.gitrepository.GitRepositoryRepository; import ru.ulstu.extractor.gitrepository.GitRepositoryService; -import ru.ulstu.extractor.model.Branch; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.model.Commit; -import ru.ulstu.extractor.model.Repository; import ru.ulstu.extractor.ts.AbstractTimeSeriesCreator; import java.io.IOException; @@ -42,13 +42,13 @@ public class IndexService { } public void index(@NotNull String repositoryUrl, @NotNull String branchName) throws GitAPIException, IOException { - Repository repository = gitRepositoryRepository.findByUrl(repositoryUrl); - if (repository == null) { - repository = gitRepositoryRepository.save(new Repository(repositoryUrl)); + GitRepository gitRepository = gitRepositoryRepository.findByUrl(repositoryUrl); + if (gitRepository == null) { + gitRepository = gitRepositoryRepository.save(new GitRepository(repositoryUrl)); } - Branch branch = branchService.findByRepositoryAndName(repository, branchName); + Branch branch = branchService.findByRepositoryAndName(gitRepository, branchName); if (branch == null) { - branch = new Branch(repository, branchName); + branch = new Branch(gitRepository, branchName); } branchService.save(branch, Collections.emptyList()); int commitsFrom = 0; @@ -62,7 +62,7 @@ public class IndexService { commitsTo += COMMITS_PAGE_SIZE; commits = gitRepositoryService.getCommits(repositoryUrl, branchName, commitsFrom, commitsTo, false); } - Integer repositoryId = repository.getId(); + Integer repositoryId = gitRepository.getId(); timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchName)); LOG.debug("Complete indexing {} branch", branchName); } diff --git a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java index 30a8327..644f6aa 100644 --- a/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/service/TimeSeriesService.java @@ -40,7 +40,7 @@ public class TimeSeriesService { timeSeries.setValues(timeSeriesValues); LOG.debug("Save time series {} ", timeSeries.getName()); TimeSeries savedTimeSeries = timeSeriesRepository.save(timeSeries); - LOG.debug("Clear {} ime series values ", timeSeriesValuesToRemoveIds.size()); + LOG.debug("Clear {} time series values ", timeSeriesValuesToRemoveIds.size()); return savedTimeSeries; } diff --git a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java index 6a2b6f2..8f7dae0 100644 --- a/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/CommitsTS.java @@ -1,8 +1,8 @@ package ru.ulstu.extractor.ts; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.model.TimeSeriesValue; -import ru.ulstu.extractor.service.CommitService; import ru.ulstu.extractor.service.TimeSeriesService; import java.util.List; @@ -26,6 +26,7 @@ public class CommitsTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeriesValues(Integer repositoryId, String branchName) { + //TODO: добавить постраничное чтение return commitService.findByRepositoryIdAndName(repositoryId, branchName) .stream() .map(c -> new TimeSeriesValue(c.getDate(), 1)) diff --git a/src/main/resources/db/changelog-20220621_120000-schema.xml b/src/main/resources/db/changelog-20220621_120000-schema.xml new file mode 100644 index 0000000..2df5c58 --- /dev/null +++ b/src/main/resources/db/changelog-20220621_120000-schema.xml @@ -0,0 +1,11 @@ + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog-master.xml b/src/main/resources/db/changelog-master.xml index b9c9b69..e2afa54 100644 --- a/src/main/resources/db/changelog-master.xml +++ b/src/main/resources/db/changelog-master.xml @@ -13,4 +13,5 @@ + diff --git a/src/main/resources/templates/statistic.html b/src/main/resources/templates/statistic.html index e89c1a8..2ad0eb2 100644 --- a/src/main/resources/templates/statistic.html +++ b/src/main/resources/templates/statistic.html @@ -193,7 +193,7 @@ ",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("vbscript",function(e){return{aliases:["vbs"],cI:!0,k:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},i:"//",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C(/'/,/$/,{r:0}),e.CNM]}});hljs.registerLanguage("vbscript-html",function(r){return{sL:"xml",c:[{b:"<%",e:"%>",sL:"vbscript"}]}});hljs.registerLanguage("typescript",function(e){var r={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"};return{aliases:["ts"],k:r,c:[{cN:"meta",b:/^\s*['"]use strict['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+e.IR+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:e.IR},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:["self",e.CLCM,e.CBCM]}]}]}],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:r,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/%/,r:0},{bK:"constructor",e:/\{/,eE:!0,c:["self",{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}]},{b:/module\./,k:{built_in:"module"},r:0},{bK:"module",e:/\{/,eE:!0},{bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bnf",function(e){return{c:[{cN:"attribute",b://},{b:/::=/,starts:{e:/$/,c:[{b://},e.CLCM,e.CBCM,e.ASM,e.QSM]}}]}});hljs.registerLanguage("moonscript",function(e){var t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},r="[A-Za-z$_][0-9A-Za-z$_]*",s={cN:"subst",b:/#\{/,e:/}/,k:t},a=[e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'/,e:/'/,c:[e.BE]},{b:/"/,e:/"/,c:[e.BE,s]}]},{cN:"built_in",b:"@__"+e.IR},{b:"@"+e.IR},{b:e.IR+"\\\\"+e.IR}];s.c=a;var c=e.inherit(e.TM,{b:r}),n="(\\(.*\\))?\\s*\\B[-=]>",i={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(a)}]};return{aliases:["moon"],k:t,i:/\/\*/,c:a.concat([e.C("--","$"),{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+n,e:"[-=]>",rB:!0,c:[c,i]},{b:/[\(,:=]\s*/,r:0,c:[{cN:"function",b:n,e:"[-=]>",rB:!0,c:[i]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[c]},c]},{cN:"name",b:r+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("fsharp",function(e){var t={b:"<",e:">",c:[e.inherit(e.TM,{b:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],k:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",i:/\/\*/,c:[{cN:"keyword",b:/\b(yield|return|let|do)!/},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},{cN:"string",b:'"""',e:'"""'},e.C("\\(\\*","\\*\\)"),{cN:"class",bK:"type",e:"\\(|=|$",eE:!0,c:[e.UTM,t]},{cN:"meta",b:"\\[<",e:">\\]",r:10},{cN:"symbol",b:"\\B('[A-Za-z])\\b",c:[e.BE]},e.CLCM,e.inherit(e.QSM,{i:null}),e.CNM]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},t.TM]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",a="\\]=*\\]",r={b:t,e:a,c:["self"]},n=[e.C("--(?!"+t+")","$"),e.C("--"+t,a,{c:[r],r:10})];return{l:e.UIR,k:{literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstringmodule next pairs pcall print rawequal rawget rawset require select setfenvsetmetatable tonumber tostring type unpack xpcall arg selfcoroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},c:n.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:n}].concat(n)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:a,c:[r],r:5}])}});hljs.registerLanguage("erlang",function(e){var r="[a-z'][a-zA-Z0-9_']*",c="("+r+":"+r+"|"+r+")",b={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.C("%","$"),n={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},a={b:"fun\\s+"+r+"/\\d+"},d={b:c+"\\(",e:"\\)",rB:!0,r:0,c:[{b:c,r:0},{b:"\\(",e:"\\)",eW:!0,rE:!0,r:0}]},o={b:"{",e:"}",r:0},t={b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0},f={b:"[A-Z][a-zA-Z0-9_]*",r:0},l={b:"#"+e.UIR,r:0,rB:!0,c:[{b:"#"+e.UIR,r:0},{b:"{",e:"}",r:0}]},s={bK:"fun receive if try case",e:"end",k:b};s.c=[i,a,e.inherit(e.ASM,{cN:""}),s,d,e.QSM,n,o,t,f,l];var u=[i,a,s,d,e.QSM,n,o,t,f,l];d.c[1].c=u,o.c=u,l.c[1].c=u;var h={cN:"params",b:"\\(",e:"\\)",c:u};return{aliases:["erl"],k:b,i:"(",rB:!0,i:"\\(|#|//|/\\*|\\\\|:|;",c:[h,e.inherit(e.TM,{b:r})],starts:{e:";|\\.",k:b,c:u}},i,{b:"^-",e:"\\.",r:0,eE:!0,rB:!0,l:"-"+e.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",c:[h]},n,e.QSM,l,t,f,o,{b:/\.$/}]}});hljs.registerLanguage("htmlbars",function(e){var a="action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",t={i:/\}\}/,b:/[a-zA-Z0-9_]+=/,rB:!0,r:0,c:[{cN:"attr",b:/[a-zA-Z0-9_]+/}]},i=({i:/\}\}/,b:/\)/,e:/\)/,c:[{b:/[a-zA-Z\.\-]+/,k:{built_in:a},starts:{eW:!0,r:0,c:[e.QSM]}}]},{eW:!0,r:0,k:{keyword:"as",built_in:a},c:[e.QSM,t,e.NM]});return{cI:!0,sL:"xml",c:[e.C("{{!(--)?","(--)?}}"),{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[{cN:"name",b:/[a-zA-Z\.\-]+/,k:{"builtin-name":a},starts:i}]},{cN:"template-variable",b:/\{\{[a-zA-Z][a-zA-Z\-]+/,e:/\}\}/,k:{keyword:"as",built_in:a},c:[e.QSM]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("haml",function(s){return{cI:!0,c:[{cN:"meta",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},s.C("^\\s*(!=#|=#|-#|/).*$",!1,{r:0}),{b:"^\\s*(-|=|!=)(?!#)",starts:{e:"\\n",sL:"ruby"}},{cN:"tag",b:"^\\s*%",c:[{cN:"selector-tag",b:"\\w+"},{cN:"selector-id",b:"#[\\w-]+"},{cN:"selector-class",b:"\\.[\\w-]+"},{b:"{\\s*",e:"\\s*}",c:[{b:":\\w+\\s*=>",e:",\\s+",rB:!0,eW:!0,c:[{cN:"attr",b:":\\w+"},s.ASM,s.QSM,{b:"\\w+",r:0}]}]},{b:"\\(\\s*",e:"\\s*\\)",eE:!0,c:[{b:"\\w+\\s*=",e:"\\s+",rB:!0,eW:!0,c:[{cN:"attr",b:"\\w+",r:0},s.ASM,s.QSM,{b:"\\w+",r:0}]}]}]},{b:"^\\s*[=~]\\s*"},{b:"#{",starts:{e:"}",sL:"ruby"}}]}});hljs.registerLanguage("mizar",function(e){return{k:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",c:[e.C("::","$")]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("django",function(e){var t={b:/\|[A-Za-z]+:?/,k:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},c:[e.QSM,e.ASM]};return{aliases:["jinja"],cI:!0,sL:"xml",c:[e.C(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.C(/\{#/,/#}/),{cN:"template-tag",b:/\{%/,e:/%}/,c:[{cN:"name",b:/\w+/,k:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{eW:!0,k:"in by as",c:[t],r:0}}]},{cN:"template-variable",b:/\{\{/,e:/}}/,c:[t]}]}});hljs.registerLanguage("avrasm",function(r){return{cI:!0,l:"\\.?"+r.IR,k:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},c:[r.CBCM,r.C(";","$",{r:0}),r.CNM,r.BNM,{cN:"number",b:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},r.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"symbol",b:"^[A-Za-z0-9_.$]+:"},{cN:"meta",b:"#",e:"$"},{cN:"subst",b:"@[0-9]+"}]}});hljs.registerLanguage("q",function(e){var s={keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],k:s,l:/(`?)[A-Za-z0-9_]+\b/,c:[e.CLCM,e.QSM,e.CNM]}});hljs.registerLanguage("brainfuck",function(r){var n={cN:"literal",b:"[\\+\\-]",r:0};return{aliases:["bf"],c:[r.C("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{rE:!0,r:0}),{cN:"title",b:"[\\[\\]]",r:0},{cN:"string",b:"[\\.,]",r:0},{b:/\+\+|\-\-/,rB:!0,c:[n]},n]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("excel",function(E){return{aliases:["xlsx","xls"],cI:!0,l:/[a-zA-Z][\w\.]*/,k:{built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},c:[{b:/^=/,e:/[^=]/,rE:!0,i:/=/,r:10},{cN:"symbol",b:/\b[A-Z]{1,2}\d+\b/,e:/[^\d]/,eE:!0,r:0},{cN:"symbol",b:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,r:0},E.BE,E.QSM,{cN:"number",b:E.NR+"(%)?",r:0},E.C(/\bN\(/,/\)/,{eB:!0,eE:!0,i:/\n/})]}});hljs.registerLanguage("aspectj",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",i="get set args call";return{k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"aspect",e:/[{;=]/,eE:!0,i:/[:;"\[\]]/,c:[{bK:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UTM,{b:/\([^\)]*/,e:/[)]+/,k:t+" "+i,eE:!1}]},{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,r:0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"pointcut after before around throwing returning",e:/[)]/,eE:!1,i:/["\[\]]/,c:[{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]}]},{b:/[:]/,rB:!0,e:/[{;]/,r:0,eE:!1,k:t,i:/["\[\]]/,c:[{b:e.UIR+"\\s*\\(",k:t+" "+i,r:0},e.QSM]},{bK:"new throw",r:0},{cN:"function",b:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,rB:!0,e:/[{;=]/,k:t,eE:!0,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,r:0,k:t,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},e.CNM,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("yaml",function(e){var b="true false yes no null",a="^[ \\-]*",r="[a-zA-Z_][\\w\\-]*",t={cN:"attr",v:[{b:a+r+":"},{b:a+'"'+r+'":'},{b:a+"'"+r+"':"}]},c={cN:"template-variable",v:[{b:"{{",e:"}}"},{b:"%{",e:"}"}]},l={cN:"string",r:0,v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/\S+/}],c:[e.BE,c]};return{cI:!0,aliases:["yml","YAML","yaml"],c:[t,{cN:"meta",b:"^---s*$",r:10},{cN:"string",b:"[\\|>] *$",rE:!0,c:l.c,e:t.v[0].b},{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0,r:0},{cN:"type",b:"!!"+e.UIR},{cN:"meta",b:"&"+e.UIR+"$"},{cN:"meta",b:"\\*"+e.UIR+"$"},{cN:"bullet",b:"^ *-",r:0},e.HCM,{bK:b,k:{literal:b}},e.CNM,l]}});hljs.registerLanguage("tap",function(b){return{cI:!0,c:[b.HCM,{cN:"meta",v:[{b:"^TAP version (\\d+)$"},{b:"^1\\.\\.(\\d+)$"}]},{b:"(s+)?---$",e:"\\.\\.\\.$",sL:"yaml",r:0},{cN:"number",b:" (\\d+) "},{cN:"symbol",v:[{b:"^ok"},{b:"^not ok"}]}]}});hljs.registerLanguage("stan",function(e){return{c:[e.HCM,e.CLCM,e.CBCM,{b:e.UIR,l:e.UIR,k:{name:"for in while repeat until if then else",symbol:"bernoulli bernoulli_logit binomial binomial_logit beta_binomial hypergeometric categorical categorical_logit ordered_logistic neg_binomial neg_binomial_2 neg_binomial_2_log poisson poisson_log multinomial normal exp_mod_normal skew_normal student_t cauchy double_exponential logistic gumbel lognormal chi_square inv_chi_square scaled_inv_chi_square exponential inv_gamma weibull frechet rayleigh wiener pareto pareto_type_2 von_mises uniform multi_normal multi_normal_prec multi_normal_cholesky multi_gp multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet lkj_corr lkj_corr_cholesky wishart inv_wishart","selector-tag":"int real vector simplex unit_vector ordered positive_ordered row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix cov_matrix",title:"functions model data parameters quantities transformed generated",literal:"true false"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0}]}});hljs.registerLanguage("ebnf",function(a){var e=a.C(/\(\*/,/\*\)/),t={cN:"attribute",b:/^[ ]*[a-zA-Z][a-zA-Z-]*([\s-]+[a-zA-Z][a-zA-Z]*)*/},r={cN:"meta",b:/\?.*\?/},b={b:/=/,e:/;/,c:[e,r,a.ASM,a.QSM]};return{i:/\S/,c:[e,t,b]}});hljs.registerLanguage("scheme",function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",r="(\\-|\\+)?\\d+([./]\\d+)?",a=r+"[+\\-]"+r+"i",i={"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},n={cN:"meta",b:"^#!",e:"$"},c={cN:"literal",b:"(#t|#f|#\\\\"+t+"|#\\\\.)"},l={cN:"number",v:[{b:r,r:0},{b:a,r:0},{b:"#b[0-1]+(/[0-1]+)?"},{b:"#o[0-7]+(/[0-7]+)?"},{b:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},s=e.QSM,o=[e.C(";","$",{r:0}),e.C("#\\|","\\|#")],u={b:t,r:0},p={cN:"symbol",b:"'"+t},d={eW:!0,r:0},m={v:[{b:/'/},{b:"`"}],c:[{b:"\\(",e:"\\)",c:["self",c,s,l,u,p]}]},g={cN:"name",b:t,l:t,k:i},h={b:/lambda/,eW:!0,rB:!0,c:[g,{b:/\(/,e:/\)/,endsParent:!0,c:[u]}]},b={v:[{b:"\\(",e:"\\)"},{b:"\\[",e:"\\]"}],c:[h,g,d]};return d.c=[c,l,s,u,p,m,b].concat(o),{i:/\S/,c:[n,l,s,p,m,b].concat(o)}});hljs.registerLanguage("mipsasm",function(s){return{cI:!0,aliases:["mips"],l:"\\.?"+s.IR,k:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},c:[{cN:"keyword",b:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(.hb)?|jr(.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs.[sd]|add.[sd]|alnv.ps|bc1[ft]l?|c.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et]).[sd]|(ceil|floor|round|trunc).[lw].[sd]|cfc1|cvt.d.[lsw]|cvt.l.[dsw]|cvt.ps.s|cvt.s.[dlw]|cvt.s.p[lu]|cvt.w.[dls]|div.[ds]|ldx?c1|luxc1|lwx?c1|madd.[sd]|mfc1|mov[fntz]?.[ds]|msub.[sd]|mth?c1|mul.[ds]|neg.[ds]|nmadd.[ds]|nmsub.[ds]|p[lu][lu].ps|recip.fmt|r?sqrt.[ds]|sdx?c1|sub.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",e:"\\s"},s.C("[;#]","$"),s.CBCM,s.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"title",b:"\\|",e:"\\|",i:"\\n",r:0},{cN:"number",v:[{b:"0x[0-9a-f]+"},{b:"\\b-?\\d+"}],r:0},{cN:"symbol",v:[{b:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{b:"^\\s*[0-9]+:"},{b:"[0-9]+[bf]"}],r:0}],i:"/"}});hljs.registerLanguage("purebasic",function(e){var r={cN:"string",b:'(~)?"',e:'"',i:"\\n"},t={cN:"symbol",b:"#[a-zA-Z_]\\w*\\$?"};return{aliases:["pb","pbi"],k:"And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro NewList Not Or ProcedureReturn Protected Prototype PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion Swap To Wend While With XIncludeFile XOr Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL",c:[e.C(";","$",{r:0}),{cN:"function",b:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",e:"\\(",eE:!0,rB:!0,c:[{cN:"keyword",b:"(Procedure|Declare)(C|CDLL|DLL)?",eE:!0},{cN:"type",b:"\\.\\w*"},e.UTM]},r,t]}});hljs.registerLanguage("jboss-cli",function(e){var a={b:/[\w-]+ *=/,rB:!0,r:0,c:[{cN:"attr",b:/[\w-]+/}]},r={cN:"params",b:/\(/,e:/\)/,c:[a],r:0},o={cN:"function",b:/:[\w\-.]+/,r:0},t={cN:"string",b:/\B(([\/.])[\w\-.\/=]+)+/},c={cN:"params",b:/--[\w\-=\/]+/};return{aliases:["wildfly-cli"],l:"[a-z-]+",k:{keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},c:[e.HCM,e.QSM,c,o,t,r]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("tex",function(c){var e={cN:"tag",b:/\\/,r:0,c:[{cN:"name",v:[{b:/[a-zA-Zа-яА-я]+[*]?/},{b:/[^a-zA-Zа-яА-я0-9]/}],starts:{eW:!0,r:0,c:[{cN:"string",v:[{b:/\[/,e:/\]/},{b:/\{/,e:/\}/}]},{b:/\s*=\s*/,eW:!0,r:0,c:[{cN:"number",b:/-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/}]}]}}]};return{c:[e,{cN:"formula",c:[e],r:0,v:[{b:/\$\$/,e:/\$\$/},{b:/\$/,e:/\$/}]},c.C("%","$",{r:0})]}});hljs.registerLanguage("profile",function(e){return{c:[e.CNM,{b:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",e:":",eE:!0},{b:"(ncalls|tottime|cumtime)",e:"$",k:"ncalls tottime|10 cumtime|10 filename",r:10},{b:"function calls",e:"$",c:[e.CNM],r:10},e.ASM,e.QSM,{cN:"string",b:"\\(",e:"\\)$",eB:!0,eE:!0,r:0}]}});hljs.registerLanguage("gherkin",function(e){return{aliases:["feature"],k:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",c:[{cN:"symbol",b:"\\*",r:0},{cN:"meta",b:"@[^@\\s]+"},{b:"\\|",e:"\\|\\w*$",c:[{cN:"string",b:"[^|]+"}]},{cN:"variable",b:"<",e:">"},e.HCM,{cN:"string",b:'"""',e:'"""'},e.QSM]}});hljs.registerLanguage("smalltalk",function(e){var s="[a-z][a-zA-Z0-9_]*",a={cN:"string",b:"\\$.{1}"},r={cN:"symbol",b:"#"+e.UIR};return{aliases:["st"],k:"self super nil true false thisContext",c:[e.C('"','"'),e.ASM,{cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},{b:s+":",r:0},e.CNM,r,a,{b:"\\|[ ]*"+s+"([ ]+"+s+")*[ ]*\\|",rB:!0,e:/\|/,i:/\S/,c:[{b:"(\\|[ ]*)?"+s}]},{b:"\\#\\(",e:"\\)",c:[e.ASM,a,e.CNM,r]}]}});hljs.registerLanguage("arduino",function(e){var t=e.getLanguage("cpp").exports;return{k:{keyword:"boolean byte word string String array "+t.k.keyword,built_in:"setup loop while catch for if do goto try switch case else default break continue return KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",literal:"DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW"},c:[t.preprocessor,e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM]}});hljs.registerLanguage("mathematica",function(e){return{aliases:["mma"],l:"(\\$|\\b)"+e.IR+"\\b",k:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", -c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}});hljs.registerLanguage("roboconf",function(a){var e="[a-zA-Z-_][^\\n{]+\\{",n={cN:"attribute",b:/[a-zA-Z-_]+/,e:/\s*:/,eE:!0,starts:{e:";",r:0,c:[{cN:"variable",b:/\.[a-zA-Z-_]+/},{cN:"keyword",b:/\(optional\)/}]}};return{aliases:["graph","instances"],cI:!0,k:"import",c:[{b:"^facet "+e,e:"}",k:"facet",c:[n,a.HCM]},{b:"^\\s*instance of "+e,e:"}",k:"name count channels instance-data instance-state instance of",i:/\S/,c:["self",n,a.HCM]},{b:"^"+e,e:"}",c:[n,a.HCM]},a.HCM]}});hljs.registerLanguage("vim",function(e){return{l:/[!#@\w]+/,k:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},i:/;/,c:[e.NM,e.ASM,{cN:"string",b:/"(\\"|\n\\|[^"\n])*"/},e.C('"',"$"),{cN:"variable",b:/[bwtglsav]:[\w\d_]*/},{cN:"function",bK:"function function!",e:"$",r:0,c:[e.TM,{cN:"params",b:"\\(",e:"\\)"}]},{cN:"symbol",b:/<[\w-]+>/}]}});hljs.registerLanguage("julia",function(e){var r={keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",a={l:t,k:r,i:/<\//},n={cN:"number",b:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,r:0},o={cN:"string",b:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={cN:"subst",b:/\$\(/,e:/\)/,k:r},l={cN:"variable",b:"\\$"+t},c={cN:"string",c:[e.BE,i,l],v:[{b:/\w*"""/,e:/"""\w*/,r:10},{b:/\w*"/,e:/"\w*/}]},s={cN:"string",c:[e.BE,i,l],b:"`",e:"`"},d={cN:"meta",b:"@"+t},u={cN:"comment",v:[{b:"#=",e:"=#",r:10},{b:"#",e:"$"}]};return a.c=[n,o,c,s,d,u,e.HCM,{cN:"keyword",b:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{b:/<:/}],i.c=a.c,a});hljs.registerLanguage("julia-repl",function(a){return{c:[{cN:"meta",b:/^julia>/,r:10,starts:{e:/^(?![ ]{6})/,sL:"julia"},aliases:["jldoctest"]}]}});hljs.registerLanguage("d",function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},r="(0|[1-9][\\d_]*)",a="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",i="0[bB][01_]+",n="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",_="0[xX]"+n,c="([eE][+-]?"+a+")",d="("+a+"(\\.\\d*|"+c+")|\\d+\\."+a+a+"|\\."+r+c+"?)",o="(0[xX]("+n+"\\."+n+"|\\.?"+n+")[pP][+-]?"+a+")",s="("+r+"|"+i+"|"+_+")",l="("+o+"|"+d+")",u="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",b={cN:"number",b:"\\b"+s+"(L|u|U|Lu|LU|uL|UL)?",r:0},f={cN:"number",b:"\\b("+l+"([fF]|L|i|[fF]i|Li)?|"+s+"(i|[fF]i|Li))",r:0},g={cN:"string",b:"'("+u+"|.)",e:"'",i:"."},h={b:u,r:0},p={cN:"string",b:'"',c:[h],e:'"[cwd]?'},m={cN:"string",b:'[rq]"',e:'"[cwd]?',r:5},w={cN:"string",b:"`",e:"`[cwd]?"},N={cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10},A={cN:"string",b:'q"\\{',e:'\\}"'},F={cN:"meta",b:"^#!",e:"$",r:5},y={cN:"meta",b:"#(line)",e:"$",r:5},L={cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"},v=e.C("\\/\\+","\\+\\/",{c:["self"],r:10});return{l:e.UIR,k:t,c:[e.CLCM,e.CBCM,v,N,p,m,w,A,f,b,g,F,y,L]}});hljs.registerLanguage("scilab",function(e){var s=[e.CNM,{cN:"string",b:"'|\"",e:"'|\"",c:[e.BE,{b:"''"}]}];return{aliases:["sci"],l:/%?\w+/,k:{keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},i:'("|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)"}]},{b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{b:"\\[",e:"\\]'*[\\.']*",r:0,c:s},e.C("//","$")].concat(s)}});hljs.registerLanguage("lisp",function(b){var e="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",c="\\|[^]*?\\|",r="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",a={cN:"meta",b:"^#!",e:"$"},l={cN:"literal",b:"\\b(t{1}|nil)\\b"},n={cN:"number",v:[{b:r,r:0},{b:"#(b|B)[0-1]+(/[0-1]+)?"},{b:"#(o|O)[0-7]+(/[0-7]+)?"},{b:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{b:"#(c|C)\\("+r+" +"+r,e:"\\)"}]},i=b.inherit(b.QSM,{i:null}),t=b.C(";","$",{r:0}),s={b:"\\*",e:"\\*"},u={cN:"symbol",b:"[:&]"+e},d={b:e,r:0},f={b:c},m={b:"\\(",e:"\\)",c:["self",l,i,n,d]},o={c:[n,i,s,u,m,d],v:[{b:"['`]\\(",e:"\\)"},{b:"\\(quote ",e:"\\)",k:{name:"quote"}},{b:"'"+c}]},v={v:[{b:"'"+e},{b:"#'"+e+"(::"+e+")*"}]},N={b:"\\(\\s*",e:"\\)"},A={eW:!0,r:0};return N.c=[{cN:"name",v:[{b:e},{b:c}]},A],A.c=[o,v,N,l,n,i,t,s,u,f,d],{i:/\S/,c:[n,a,l,i,t,o,v,N,d]}});hljs.registerLanguage("xquery",function(e){var t="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",a="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",s={b:/\$[a-zA-Z0-9\-]+/},n={cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},r={cN:"string",v:[{b:/"/,e:/"/,c:[{b:/""/,r:0}]},{b:/'/,e:/'/,c:[{b:/''/,r:0}]}]},i={cN:"meta",b:"%\\w+"},c={cN:"comment",b:"\\(:",e:":\\)",r:10,c:[{cN:"doctag",b:"@\\w+"}]},o={b:"{",e:"}"},l=[s,r,n,c,i,o];return o.c=l,{aliases:["xpath","xq"],cI:!1,l:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,i:/(proc)|(abstract)|(extends)|(until)|(#)/,k:{keyword:t,literal:a},c:l}});hljs.registerLanguage("csp",function(r){return{cI:!1,l:"[a-zA-Z][a-zA-Z0-9_-]*",k:{keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},c:[{cN:"string",b:"'",e:"'"},{cN:"attribute",b:"^Content",e:":",eE:!0}]}});hljs.registerLanguage("twig",function(e){var t={cN:"params",b:"\\(",e:"\\)"},a="attribute block constant cycle date dump include max min parent random range source template_from_string",r={bK:a,k:{name:a},r:0,c:[t]},c={b:/\|[A-Za-z_]+:?/,k:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",c:[r]},s="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return s=s+" "+s.split(" ").map(function(e){return"end"+e}).join(" "),{aliases:["craftcms"],cI:!0,sL:"xml",c:[e.C(/\{#/,/#}/),{cN:"template-tag",b:/\{%/,e:/%}/,c:[{cN:"name",b:/\w+/,k:s,starts:{eW:!0,c:[c,r],r:0}}]},{cN:"template-variable",b:/\{\{/,e:/}}/,c:["self",c,r]}]}});hljs.registerLanguage("accesslog",function(T){return{c:[{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+\\b",r:0},{cN:"string",b:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',e:'"',k:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",i:"\\n",r:10},{cN:"string",b:/\[/,e:/\]/,i:"\\n"},{cN:"string",b:'"',e:'"',i:"\\n"}]}});hljs.registerLanguage("smali",function(t){var s=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],e=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],r=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],c:[{cN:"string",b:'"',e:'"',r:0},t.C("#","$",{r:0}),{cN:"keyword",v:[{b:"\\s*\\.end\\s[a-zA-Z0-9]*"},{b:"^[ ]*\\.[a-zA-Z]*",r:0},{b:"\\s:[a-zA-Z_0-9]*",r:0},{b:"\\s("+r.join("|")+")"}]},{cN:"built_in",v:[{b:"\\s("+s.join("|")+")\\s"},{b:"\\s("+s.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",r:10},{b:"\\s("+e.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",r:10}]},{cN:"class",b:"L[^(;:\n]*;",r:0},{b:"[vp][0-9]+"}]}});hljs.registerLanguage("rsl",function(e){return{k:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},i:"\\<:\-,()$\[\]_.{}!+%^]+)+/,r:0}]};return{aliases:["gms"],cI:!0,k:a,c:[e.C(/^\$ontext/,/^\$offtext/),{cN:"meta",b:"^\\$[a-z0-9]+",e:"$",rB:!0,c:[{cN:"meta-keyword",b:"^\\$[a-z0-9]+"}]},e.C("^\\*","$"),e.CLCM,e.CBCM,e.QSM,e.ASM,{bK:"set sets parameter parameters variable variables scalar scalars equation equations",e:";",c:[e.C("^\\*","$"),e.CLCM,e.CBCM,e.QSM,e.ASM,i,l]},{bK:"table",e:";",rB:!0,c:[{bK:"table",e:"$",c:[l]},e.C("^\\*","$"),e.CLCM,e.CBCM,e.QSM,e.ASM,e.CNM]},{cN:"function",b:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,rB:!0,c:[{cN:"title",b:/^[a-z0-9_]+/},o,r]},e.CNM,r]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("thrift",function(e){var t="bool byte i16 i32 i64 double string binary";return{k:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},c:[e.QSM,e.NM,e.CLCM,e.CBCM,{cN:"class",bK:"struct enum service exception",e:/\{/,i:/\n/,c:[e.inherit(e.TM,{starts:{eW:!0,eE:!0}})]},{b:"\\b(set|list|map)\\s*<",e:">",k:t,c:["self"]}]}});hljs.registerLanguage("gradle",function(e){return{cI:!0,k:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.NM,e.RM]}});hljs.registerLanguage("cmake",function(e){return{aliases:["cmake.in"],cI:!0,k:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or equal less greater strless strgreater strequal matches"},c:[{cN:"variable",b:"\\${",e:"}"},e.HCM,e.QSM,e.NM]}});hljs.registerLanguage("inform7",function(e){var r="\\[",o="\\]";return{aliases:["i7"],cI:!0,k:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},c:[{cN:"string",b:'"',e:'"',r:0,c:[{cN:"subst",b:r,e:o}]},{cN:"section",b:/^(Volume|Book|Part|Chapter|Section|Table)\b/,e:"$"},{b:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,e:":",c:[{b:"\\(This",e:"\\)"}]},{cN:"comment",b:r,e:o,c:["self"]}]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},t={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},r=e.inherit(t,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},c=e.inherit(a,{i:/\n/}),n={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,c]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},c]});a.c=[s,n,t,e.ASM,e.QSM,e.CNM,e.CBCM],c.c=[o,n,r,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,n,t,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("clojure-repl",function(e){return{c:[{cN:"meta",b:/^([\w.-]+|\s*#_)=>/,starts:{e:/$/,sL:"clojure"}}]}});hljs.registerLanguage("zephir",function(e){var i={cN:"string",c:[e.BE],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["zep"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e.CBCM,i,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,n]}});hljs.registerLanguage("nsis",function(e){var t={cN:"variable",b:/\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/},i={cN:"variable",b:/\$+{[\w\.:-]+}/},n={cN:"variable",b:/\$+\w+/,i:/\(\){}/},r={cN:"variable",b:/\$+\([\w\^\.:-]+\)/},o={cN:"params",b:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},l={cN:"keyword",b:/\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)/},s={cN:"subst",b:/\$(\\[nrt]|\$)/},a={cN:"class",b:/\w+\:\:\w+/},S={cN:"string",v:[{b:'"',e:'"'},{b:"'",e:"'"},{b:"`",e:"`"}],i:/\n/,c:[s,t,i,n,r]};return{cI:!1,k:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib"},c:[e.HCM,e.CBCM,e.C(";","$",{r:0}),{cN:"function",bK:"Function PageEx Section SectionGroup",e:"$"},S,l,i,n,r,o,a,e.NM]}});hljs.registerLanguage("sqf",function(e){var t=e.getLanguage("cpp").exports,a={cN:"variable",b:/\b_+[a-zA-Z_]\w*/},o={cN:"title",b:/[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/},r={cN:"string",v:[{b:'"',e:'"',c:[{b:'""',r:0}]},{b:"'",e:"'",c:[{b:"''",r:0}]}]};return{aliases:["sqf"],cI:!0,k:{keyword:"case catch default do else exit exitWith for forEach from if switch then throw to try waitUntil while with",built_in:"abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem addSwitchableUnit addTeamMember addToRemainsCollector addUniform addVehicle addVest addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem addWeaponPool addWeaponTurret agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airportSide AISFinishHeal alive all3DENEntities allControls allCurators allCutLayers allDead allDeadMen allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn allowSprint allPlayers allSites allTurrets allUnits allUnitsUAV allVariables ammo and animate animateDoor animateSource animationNames animationPhase animationSourcePhase animationState append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor behaviour benchmark binocular blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend canUnloadInCombat canVehicleCargo captive captiveNum cbChecked cbSetChecked ceil channelEnabled cheatsEnabled checkAIFeature checkVisibility civilian className clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool clientOwner closeDialog closeDisplay closeOverlay collapseObjectTree collect3DENHistory combatMode commandArtilleryFire commandChat commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop commandSuppressiveFire commandTarget commandWatch comment commitOverlay compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName configNull configProperties configSourceAddonList configSourceMod configSourceModList connectTerminalToUAV controlNull controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown create3DENComposition create3DENEntity createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine createMissionDisplay createMPCampaignDisplay createSimpleObject createSimpleTask createSite createSoundSource createTask createTeam createTrigger createUnit createVehicle createVehicleCrew createVehicleLocal crew ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPosition ctrlSetScale ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlType ctrlVisible curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected curatorWaypointCost current3DENOperation currentChannel currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorObject cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg delete3DENEntities deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts diag_activeSQSScripts diag_captureFrame diag_captureSlowFrame diag_codePerformance diag_drawMode diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_list diag_log diag_logSlowFrame diag_mergeConfigFile diag_recordTurretLimits diag_tickTime diag_toggle dialog diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction directSay disableAI disableCollisionWith disableConversation disableDebriefingStats disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayNull displayParent displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire doFire doFollow doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon drawRectangle driver drop east echo edit3DENMissionAttributes editObject editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature enableAimPrecision enableAttack enableAudioFeature enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot enableDebriefingStats enableDiagLegend enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights enableIRLasers enableMimics enablePersonTurret enableRadio enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation enableSimulationGlobal enableStamina enableTeamSwitch enableUAVConnectability enableUAVWaypoints enableVehicleCargo endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp expectedDestination exportJIPMessages eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition findEmptyPositionReady findNearestEnemy finishMissionInit finite fire fireAtTarget firstBackpack flag flagOwner flagSide flagTexture fleeing floor flyInHeight flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent forEachMemberTeam format formation formationDirection formationLeader formationMembers formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew gearIDCAmmoCount gearSlotAmmoCount gearSlotData get3DENActionState get3DENAttribute get3DENCamera get3DENConnections get3DENEntity get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLayerEntities get3DENLinesVisible get3DENMissionAttribute get3DENMouseOver get3DENSelected getAimingCoef getAllHitPointsDamage getAllOwnedMines getAmmoCargo getAnimAimPrecision getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState getClientStateNumber getConnectedUAV getCustomAimingCoef getDammage getDescription getDir getDirVisual getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset getFatigue getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue getMissionDLCs getMissionLayerEntities getModelInfo getMousePosition getNumber getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPilotCameraDirection getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget getPlayerChannel getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getRelDir getRelPos getRemoteSensorsDisabled getRepairCargo getResolution getShadowDistance getShotParents getSlingLoad getSpeed getStamina getStatValue getSuppression getTerrainHeightASL getText getUnitLoadout getUnitTrait getVariable getVehicleCargo getWeaponCargo getWeaponSway getWPPos glanceAt globalChat globalRadio goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits groupSelectUnit grpNull gunner gusts halt handgunItems handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups importance in inArea inAreaArray incapacitatedState independent inflame inflamed inGameUISetEventHandler inheritsFrom initAmbientLife inPolygon inputAction inRangeOfArtillery insertEditorObject intersect is3DEN is3DENMultiplayer isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDedicated isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll isEqualTypeAny isEqualTypeArray isEqualTypeParams isFilePatchingEnabled isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLightOn isLocalized isManualFire isMarkedForCollection isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP isServer isShowing3DIcons isSprintAllowed isStaminaEnabled isSteamMission isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUniformAllowed isVehicleCargo isWalking isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle libraryCredits libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed linearConversion lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith linkItem list listObjects ln lnbAddArray lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue lnbSize lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform loadVest local localize locationNull locationPosition lock lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockIdentity lockTurret lockWP log logEntities logNetwork logNetworkTerminate lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText markerType max members menuAction menuAdd menuChecked menuClear menuCollapse menuData menuDelete menuEnable menuEnabled menuExpand menuHover menuPicture menuSetAction menuSetCheck menuSetData menuSetPicture menuSetValue menuShortcut menuShortcutText menuSize menuSort menuText menuURL menuValue min mineActive mineDetectedBy missionConfigFile missionDifficulty missionName missionNamespace missionStart missionVersion mod modelToWorld modelToWorldVisual modParams moonIntensity moonPhase morale move move3DENCamera moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems not numberToDate objectCurators objectFromNetId objectParent objNull objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch openCuratorInterface openDLCPage openMap openYoutubeVideo opfor or orderGetIn overcast overcastForecast owner param params parseNumber parseText parsingNamespace particlesQuality pi pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon primaryWeaponItems primaryWeaponMagazine priority private processDiaryLink productVersion profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack pushBackUnique putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl remoteExec remoteExecCall remove3DENConnection remove3DENEventHandler remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon removeWeaponGlobal removeWeaponTurret requiredVersion resetCamShake resetSubgroupDirection resistance resize resources respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadAt roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scriptNull scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer set3DENLinesVisible set3DENMissionAttributes set3DENModelsVisible set3DENObjectType set3DENSelected setAccTime setAirportSide setAmmo setAmmoCargo setAnimSpeedCoef setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTi setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setCustomAimCoef setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon setDropInterval setEditorMode setEditorObjectScope setEffectCondition setFace setFaceAnimation setFatigue setFlagOwner setFlagSide setFlagTexture setFog setFormation setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setLeader setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial setObjectMaterialGlobal setObjectProxy setObjectTexture setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom setPilotCameraDirection setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect setPitch setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo setShadowDistance setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits setTargetAge setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat setUserActionText setVariable setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleCargo setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars setVehicleVarName setVelocity setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWaves setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointForceBehaviour setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap shownPad shownRadio shownScoretable shownUAVFeed shownWarrant shownWatch showPad showRadio showScoretable showSubtitles showUAVFeed showWarrant showWatch showWaypoint showWaypoints side sideAmbientLife sideChat sideEmpty sideEnemy sideFriendly sideLogic sideRadio sideUnknown simpleTasks simulationEnabled simulCloudDensity simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth switchableUnits switchAction switchCamera switchGesture switchLight switchMove synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan targetKnowledge targetsAggregate targetsQuery taskAlwaysVisible taskChildren taskCompleted taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskNull taskParent taskResult taskState taskType teamMember teamMemberNull teamName teams teamSwitch teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL text textLog textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toFixed toLower toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerStatements triggerText triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetPictureColorDisabled tvSetPictureColorSelected tvSetPictureRight tvSetPictureRightColor tvSetPictureRightColorDisabled tvSetPictureRightColorSelected tvSetText tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvTooltip tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitAimPosition unitAimPositionVisual unitBackpack unitIsUAV unitPos unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAISteeringComponent useAudioTimeForMoves vectorAdd vectorCos vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized vectorUp vectorUpVisual vehicle vehicleCargoEnabled vehicleChat vehicleRadio vehicles vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD west WFSideText wind",literal:"true false nil"},c:[e.CLCM,e.CBCM,e.NM,a,o,r,t.preprocessor],i:/#/}});hljs.registerLanguage("dsconfig",function(e){var i={cN:"string",b:/"/,e:/"/},r={cN:"string",b:/'/,e:/'/},s={cN:"string",b:"[\\w-?]+:\\w+",e:"\\W",r:0},t={cN:"string",b:"\\w+-?\\w+",e:"\\W",r:0};return{k:"dsconfig",c:[{cN:"keyword",b:"^dsconfig",e:"\\s",eE:!0,r:10},{cN:"built_in",b:"(list|create|get|set|delete)-(\\w+)",e:"\\s",eE:!0,i:"!@#$%^&*()",r:10},{cN:"built_in",b:"--(\\w+)",e:"\\s",eE:!0},i,r,s,t,e.HCM]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("erb",function(e){return{sL:"xml",c:[e.C("<%#","%>"),{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0}]}});hljs.registerLanguage("gauss",function(e){var t={keyword:"and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin strtrim sylvester",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS"},a={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[{cN:"meta-string",b:'"',e:'"',i:"\\n"}]},e.CLCM,e.CBCM]},r=e.UIR+"\\s*\\(?",o=[{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.CNM,e.CLCM,e.CBCM]}];return{aliases:["gss"],cI:!0,k:t,i:"(\\{[%#]|[%#]\\})",c:[e.CNM,e.CLCM,e.CBCM,e.C("@","@"),a,{cN:"string",b:'"',e:'"',c:[e.BE]},{cN:"function",bK:"proc keyword",e:";",eE:!0,k:t,c:[{b:r,rB:!0,c:[e.UTM],r:0},e.CNM,e.CLCM,e.CBCM,a].concat(o)},{cN:"function",bK:"fn",e:";",eE:!0,k:t,c:[{b:r+e.IR+"\\)?\\s*\\=\\s*",rB:!0,c:[e.UTM],r:0},e.CNM,e.CLCM,e.CBCM].concat(o)},{cN:"function",b:"\\bexternal (proc|keyword|fn)\\s+",e:";",eE:!0,k:t,c:[{b:r,rB:!0,c:[e.UTM],r:0},e.CLCM,e.CBCM]},{cN:"function",b:"\\bexternal (matrix|string|array|sparse matrix|struct "+e.IR+")\\s+",e:";",eE:!0,k:t,c:[e.CLCM,e.CBCM]}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("handlebars",function(e){var a={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],cI:!0,sL:"xml",c:[e.C("{{!(--)?","(--)?}}"),{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,k:a,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{\{/,e:/\}\}/,k:a}]}});hljs.registerLanguage("mercury",function(e){var i={keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},r=e.C("%","$"),t={cN:"number",b:"0'.\\|0[box][0-9a-fA-F]*"},_=e.inherit(e.ASM,{r:0}),n=e.inherit(e.QSM,{r:0}),a={cN:"subst",b:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",r:0};n.c.push(a);var o={cN:"built_in",v:[{b:"<=>"},{b:"<=",r:0},{b:"=>",r:0},{b:"/\\\\"},{b:"\\\\/"}]},l={cN:"built_in",v:[{b:":-\\|-->"},{b:"=",r:0}]};return{aliases:["m","moo"],k:i,c:[o,l,r,e.CBCM,t,e.NM,_,n,{b:/:-/}]}});hljs.registerLanguage("dns",function(d){return{aliases:["bind","zone"],k:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},c:[d.C(";","$",{r:0}),{cN:"meta",b:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{cN:"number",b:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{cN:"number",b:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},d.inherit(d.NM,{b:/\b\d+[dhwm]?/})]}});hljs.registerLanguage("pony",function(e){var r={keyword:"actor addressof and as be break class compile_error compile_intrinsicconsume continue delegate digestof do else elseif embed end errorfor fun if ifdef in interface is isnt lambda let match new not objector primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},t={cN:"string",b:'"""',e:'"""',r:10},c={cN:"string",b:'"',e:'"',c:[e.BE]},i={cN:"string",b:"'",e:"'",c:[e.BE],r:0},n={cN:"type",b:"\\b_?[A-Z][\\w]*",r:0},s={b:e.IR+"'",r:0},a={cN:"class",bK:"class actor",e:"$",c:[e.TM,e.CLCM]},o={cN:"function",bK:"new fun",e:"=>",c:[e.TM,{b:/\(/,e:/\)/,c:[n,s,e.CNM,e.CBCM]},{b:/:/,eW:!0,c:[n]},e.CLCM]};return{k:r,c:[a,o,n,t,c,i,s,e.CNM,e.CLCM,e.CBCM]}});hljs.registerLanguage("leaf",function(e){return{c:[{cN:"function",b:"#+[A-Za-z_0-9]*\\(",e:" {",rB:!0,eE:!0,c:[{cN:"keyword",b:"#+"},{cN:"title",b:"[A-Za-z_][A-Za-z_0-9]*"},{cN:"params",b:"\\(",e:"\\)",endsParent:!0,c:[{cN:"string",b:'"',e:'"'},{cN:"variable",b:"[A-Za-z_][A-Za-z_0-9]*"}]}]}]}});hljs.registerLanguage("dust",function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],cI:!0,sL:"xml",c:[{cN:"template-tag",b:/\{[#\/]/,e:/\}/,i:/;/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{/,e:/\}/,i:/;/,k:t}]}});hljs.registerLanguage("erlang-repl",function(e){return{k:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"meta",b:"^[0-9]+> ",r:10},e.C("%","$"),{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},e.ASM,e.QSM,{b:"\\?(::)?([A-Z]\\w*(::)?)+"},{b:"->"},{b:"ok"},{b:"!"},{b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{b:"[A-Z][a-zA-Z0-9_']*",r:0}]}});hljs.registerLanguage("r",function(e){var r="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[e.HCM,{b:r,l:r,k:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[e.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}});hljs.registerLanguage("delphi",function(e){var r="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",t=[e.CLCM,e.C(/\{/,/\}/,{r:0}),e.C(/\(\*/,/\*\)/,{r:10})],a={cN:"meta",v:[{b:/\{\$/,e:/\}/},{b:/\(\*\$/,e:/\*\)/}]},c={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]},i={cN:"string",b:/(#\d+)+/},o={b:e.IR+"\\s*=\\s*class\\s*\\(",rB:!0,c:[e.TM]},n={cN:"function",bK:"function constructor destructor procedure",e:/[:;]/,k:"function constructor|10 destructor|10 procedure|10",c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:r,c:[c,i,a].concat(t)},a].concat(t)};return{aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],cI:!0,k:r,i:/"|\$[G-Zg-z]|\/\*|<\/|\|/,c:[c,i,e.NM,o,n,a].concat(t)}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("dart",function(e){var t={cN:"subst",b:"\\$\\{",e:"}",k:"true false null this is new super"},r={cN:"string",v:[{b:"r'''",e:"'''"},{b:'r"""',e:'"""'},{b:"r'",e:"'",i:"\\n"},{b:'r"',e:'"',i:"\\n"},{b:"'''",e:"'''",c:[e.BE,t]},{b:'"""',e:'"""',c:[e.BE,t]},{b:"'",e:"'",i:"\\n",c:[e.BE,t]},{b:'"',e:'"',i:"\\n",c:[e.BE,t]}]};t.c=[e.CNM,r];var n={keyword:"assert async await break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch sync this throw true try var void while with yield abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{k:n,c:[r,e.C("/\\*\\*","\\*/",{sL:"markdown"}),e.C("///","$",{sL:"markdown"}),e.CLCM,e.CBCM,{cN:"class",bK:"class interface",e:"{",eE:!0,c:[{bK:"extends implements"},e.UTM]},e.CNM,{cN:"meta",b:"@[A-Za-z]+"},{b:"=>"}]}});hljs.registerLanguage("step21",function(e){var i="[A-Z_][A-Z0-9_.]*",r={keyword:"HEADER ENDSEC DATA"},t={cN:"meta",b:"ISO-10303-21;",r:10},n={cN:"meta",b:"END-ISO-10303-21;",r:10};return{aliases:["p21","step","stp"],cI:!0,l:i,k:r,c:[t,n,e.CLCM,e.CBCM,e.C("/\\*\\*!","\\*/"),e.CNM,e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"'",e:"'"},{cN:"symbol",v:[{b:"#",e:"\\d+",i:"\\W"}]}]}});hljs.registerLanguage("cos",function(e){var t={cN:"string",v:[{b:'"',e:'"',c:[{b:'""',r:0}]}]},r={cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",r:0},s="property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii";return{cI:!0,aliases:["cos","cls"],k:s,c:[r,t,e.CLCM,e.CBCM,{cN:"comment",b:/;/,e:"$",r:0},{cN:"built_in",b:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{cN:"built_in",b:/\$\$\$[a-zA-Z]+/},{cN:"built_in",b:/%[a-z]+(?:\.[a-z]+)*/},{cN:"symbol",b:/\^%?[a-zA-Z][\w]*/},{cN:"keyword",b:/##class|##super|#define|#dim/},{b:/&sql\(/,e:/\)/,eB:!0,eE:!0,sL:"sql"},{b:/&(js|jscript|javascript)/,eB:!0,eE:!0,sL:"javascript"},{b:/&html<\s*\s*>/,sL:"xml"}]}});hljs.registerLanguage("maxima",function(e){var t="if then else elseif for thru do while unless step in and or not",a="true false unknown inf minf ind und %e %i %pi %phi %gamma",r=" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",i="_ __ %|0 %%|0";return{l:"[A-Za-z_%][0-9A-Za-z_%]*",k:{keyword:t,literal:a,built_in:r,symbol:i},c:[{cN:"comment",b:"/\\*",e:"\\*/",c:["self"]},e.QSM,{cN:"number",r:0,v:[{b:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{b:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",r:10},{b:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{b:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],i:/@/}});hljs.registerLanguage("crystal",function(e){function b(e,b){var r=[{b:e,e:b}];return r[0].c=r,r}var r="(_[uif](8|16|32|64))?",c="[a-zA-Z_]\\w*[!?=]?",i="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",s={keyword:"abstract alias as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},t={cN:"subst",b:"#{",e:"}",k:s},a={cN:"template-variable",v:[{b:"\\{\\{",e:"\\}\\}"},{b:"\\{%",e:"%\\}"}],k:s},l={cN:"string",c:[e.BE,t],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%w?\\(",e:"\\)",c:b("\\(","\\)")},{b:"%w?\\[",e:"\\]",c:b("\\[","\\]")},{b:"%w?{",e:"}",c:b("{","}")},{b:"%w?<",e:">",c:b("<",">")},{b:"%w?/",e:"/"},{b:"%w?%",e:"%"},{b:"%w?-",e:"-"},{b:"%w?\\|",e:"\\|"},{b:/<<-\w+$/,e:/^\s*\w+$/}],r:0},u={cN:"string",v:[{b:"%q\\(",e:"\\)",c:b("\\(","\\)")},{b:"%q\\[",e:"\\]",c:b("\\[","\\]")},{b:"%q{",e:"}",c:b("{","}")},{b:"%q<",e:">",c:b("<",">")},{b:"%q/",e:"/"},{b:"%q%",e:"%"},{b:"%q-",e:"-"},{b:"%q\\|",e:"\\|"},{b:/<<-'\w+'$/,e:/^\s*\w+$/}],r:0},_={b:"("+i+")\\s*",c:[{cN:"regexp",c:[e.BE,t],v:[{b:"//[a-z]*",r:0},{b:"/",e:"/[a-z]*"},{b:"%r\\(",e:"\\)",c:b("\\(","\\)")},{b:"%r\\[",e:"\\]",c:b("\\[","\\]")},{b:"%r{",e:"}",c:b("{","}")},{b:"%r<",e:">",c:b("<",">")},{b:"%r/",e:"/"},{b:"%r%",e:"%"},{b:"%r-",e:"-"},{b:"%r\\|",e:"\\|"}]}],r:0},o={cN:"regexp",c:[e.BE,t],v:[{b:"%r\\(",e:"\\)",c:b("\\(","\\)")},{b:"%r\\[",e:"\\]",c:b("\\[","\\]")},{b:"%r{",e:"}",c:b("{","}")},{b:"%r<",e:">",c:b("<",">")},{b:"%r/",e:"/"},{b:"%r%",e:"%"},{b:"%r-",e:"-"},{b:"%r\\|",e:"\\|"}],r:0},w={cN:"meta",b:"@\\[",e:"\\]",c:[e.inherit(e.QSM,{cN:"meta-string"})]},f=[a,l,u,_,o,w,e.HCM,{cN:"class",bK:"class module struct",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<"}]},{cN:"class",bK:"lib enum union",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],r:10},{cN:"function",bK:"def",e:/\B\b/,c:[e.inherit(e.TM,{b:n,endsParent:!0})]},{cN:"function",bK:"fun macro",e:/\B\b/,c:[e.inherit(e.TM,{b:n,endsParent:!0})],r:5},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[l,{b:n}],r:0},{cN:"number",v:[{b:"\\b0b([01_]*[01])"+r},{b:"\\b0o([0-7_]*[0-7])"+r},{b:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+r},{b:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+r}],r:0}];return t.c=f,a.c=f.slice(1),{aliases:["cr"],l:c,k:s,c:f}});hljs.registerLanguage("ocaml",function(e){return{aliases:["ml"],k:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:"\\[(\\|\\|)?\\]|\\(\\)",r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*",r:0},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("processing",function(e){return{k:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw",built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM]}});hljs.registerLanguage("1c",function(s){var x="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",o="далее ",m="возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",t=o+m,l="загрузитьизфайла ",e="вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ",n=l+e,a="разделительстраниц разделительстрок символтабуляции ",d="ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ",i="acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ",c="wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",r=a+d+i+c,p="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ",b="автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы ",w="виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ",h="авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ",j="использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ",z="отображениевремениэлементовпланировщика ",f="типфайлаформатированногодокумента ",k="обходрезультатазапроса типзаписизапроса ",u="видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ",y="доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ",N="типизмеренияпостроителязапроса ",g="видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ",E="wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson ",M="видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных ",_="важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения ",v="режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ",A="расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии ",C="кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip ",L="звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ",Z="направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ",$="httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений ",q="важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",B=p+b+w+h+j+z+f+k+u+y+N+g+E+M+_+v+A+C+L+Z+$+q,I="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ",P="comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",T=I+P,W="null истина ложь неопределено",D=s.inherit(s.NM),F={cN:"string",b:'"|\\|',e:'"|$',c:[{b:'""'}]},G={b:"'",e:"'",eB:!0,eE:!0,c:[{cN:"number",b:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},H=s.inherit(s.CLCM),J={cN:"meta",l:x,b:"#|&",e:"$",k:{"meta-keyword":t+n},c:[H]},K={cN:"symbol",b:"~",e:";|:",eE:!0},O={cN:"function",l:x,v:[{b:"процедура|функция",e:"\\)",k:"процедура функция"},{b:"конецпроцедуры|конецфункции",k:"конецпроцедуры конецфункции"}],c:[{b:"\\(",e:"\\)",endsParent:!0,c:[{cN:"params",l:x,b:x,e:",",eE:!0,eW:!0,k:{keyword:"знач",literal:W},c:[D,F,G]},H]},s.inherit(s.TM,{b:x})]};return{cI:!0,l:x,k:{keyword:t,built_in:r,"class":B,type:T,literal:W},c:[J,O,H,K,D,F,G]}});hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",i={cN:"variable",b:"(\\$"+t+")\\b"},r={cN:"number",b:"#[0-9A-Fa-f]+"};({cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{eW:!0,eE:!0,c:[r,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"meta",b:"!important"}]}});return{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,{cN:"selector-id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"selector-class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"selector-attr",b:"\\[",e:"\\]",i:"$"},{cN:"selector-tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},i,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{b:":",e:";",c:[i,r,e.CSSNM,e.QSM,e.ASM,{cN:"meta",b:"!important"}]},{b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[i,e.QSM,e.ASM,r,e.CSSNM,{b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("mojolicious",function(e){return{sL:"xml",c:[{cN:"meta",b:"^__(END|DATA)__$"},{b:"^\\s*%{1,2}={0,2}",e:"$",sL:"perl"},{b:"<%{1,2}={0,2}",e:"={0,1}%>",sL:"perl",eB:!0,eE:!0}]}});hljs.registerLanguage("lsl",function(E){var T={cN:"subst",b:/\\[tn"\\]/},e={cN:"string",b:'"',e:'"',c:[T]},A={cN:"number",b:E.CNR},R={cN:"literal",v:[{b:"\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{b:"\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{b:"\\b(?:FALSE|TRUE)\\b"},{b:"\\b(?:ZERO_ROTATION)\\b"},{b:"\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b"},{b:"\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b"}]},O={cN:"built_in",b:"\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{i:":",c:[e,{cN:"comment",v:[E.C("//","$"),E.C("/\\*","\\*/")]},A,{cN:"section",v:[{b:"\\b(?:state|default)\\b"},{b:"\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b"}]},O,R,{cN:"type",b:"\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}});hljs.registerLanguage("dos",function(e){var r=e.C(/^\s*@?rem\b/,/$/,{r:10}),t={cN:"symbol",b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",r:0};return{aliases:["bat","cmd"],cI:!0,i:/\/\*/,k:{keyword:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",built_in:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del"},c:[{cN:"variable",b:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{cN:"function",b:t.b,e:"goto:eof",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),r]},{cN:"number",b:"\\b\\d+",r:0},r]}});hljs.registerLanguage("puppet",function(e){var s={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},r=e.C("#","$"),a="([A-Za-z_]|::)(\\w|::)*",i=e.inherit(e.TM,{b:a}),o={cN:"variable",b:"\\$"+a},t={cN:"string",c:[e.BE,o],v:[{b:/'/,e:/'/},{b:/"/,e:/"/}]};return{aliases:["pp"],c:[r,o,t,{bK:"class",e:"\\{|;",i:/=/,c:[i,r]},{bK:"define",e:/\{/,c:[{cN:"section",b:e.IR,endsParent:!0}]},{b:e.IR+"\\s+\\{",rB:!0,e:/\S/,c:[{cN:"keyword",b:e.IR},{b:/\{/,e:/\}/,k:s,r:0,c:[t,r,{b:"[a-zA-Z_]+\\s*=>",rB:!0,e:"=>",c:[{cN:"attr",b:e.IR}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},o]}],r:0}]}});hljs.registerLanguage("swift",function(e){var i={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},t={cN:"type",b:"\\b[A-Z][\\wÀ-ʸ']*",r:0},n=e.C("/\\*","\\*/",{c:["self"]}),r={cN:"subst",b:/\\\(/,e:"\\)",k:i,c:[]},a={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0},o=e.inherit(e.QSM,{c:[r,e.BE]});return r.c=[a],{k:i,c:[o,e.CLCM,n,t,a,{cN:"function",bK:"func",e:"{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{b://},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:i,c:["self",a,o,e.CBCM,{b:":"}],i:/["']/}],i:/\[|%/},{cN:"class",bK:"struct protocol class extension enum",k:i,e:"\\{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{cN:"meta",b:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{bK:"import",e:/$/,c:[e.CLCM,n]}]}});hljs.registerLanguage("gcode",function(N){var e="[A-Z_][A-Z0-9_.]*",c="\\%",E="IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR",i={cN:"meta",b:"([O])([0-9]+)"},n=[N.CLCM,N.CBCM,N.C(/\(/,/\)/),N.inherit(N.CNM,{b:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+N.CNR}),N.inherit(N.ASM,{i:null}),N.inherit(N.QSM,{i:null}),{cN:"name",b:"([G])([0-9]+\\.?[0-9]?)"},{cN:"name",b:"([M])([0-9]+\\.?[0-9]?)"},{cN:"attr",b:"(VC|VS|#)",e:"(\\d+)"},{cN:"attr",b:"(VZOFX|VZOFY|VZOFZ)"},{cN:"built_in",b:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",e:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{cN:"symbol",v:[{b:"N",e:"\\d+",i:"\\W"}]}];return{aliases:["nc"],cI:!0,l:e,k:E,c:[{cN:"meta",b:c},i].concat(n)}});hljs.registerLanguage("ceylon",function(e){var a="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",t="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",s="doc by license see throws tagged",n={cN:"subst",eB:!0,eE:!0,b:/``/,e:/``/,k:a,r:10},r=[{cN:"string",b:'"""',e:'"""',r:10},{cN:"string",b:'"',e:'"',c:[n]},{cN:"string",b:"'",e:"'"},{cN:"number",b:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",r:0}];return n.c=r,{k:{keyword:a+" "+t,meta:s},i:"\\$[^01]|#[^0-9a-fA-F]",c:[e.CLCM,e.C("/\\*","\\*/",{c:["self"]}),{cN:"meta",b:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(r)}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("dockerfile",function(e){return{aliases:["docker"],cI:!0,k:"from maintainer expose env arg user onbuild stopsignal",c:[e.HCM,e.ASM,e.QSM,e.NM,{bK:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{e:/[^\\]\n/,sL:"bash"}}],i:"",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:i.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[s,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[s]},s]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("protobuf",function(e){return{k:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},c:[e.QSM,e.NM,e.CLCM,{cN:"class",bK:"message enum service",e:/\{/,i:/\n/,c:[e.inherit(e.TM,{starts:{eW:!0,eE:!0}})]},{cN:"function",bK:"rpc",e:/;/,eE:!0,k:"rpc returns"},{b:/^\s*[A-Z_]+/,e:/\s*=/,eE:!0}]}});hljs.registerLanguage("matlab",function(e){var a=[e.CNM,{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]}],s={r:0,c:[{b:/'['\.]*/}]};return{k:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},i:'(//|"|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[e.UTM,{cN:"params",v:[{b:"\\(",e:"\\)"},{b:"\\[",e:"\\]"}]}]},{b:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,rB:!0,r:0,c:[{b:/[a-zA-Z_][a-zA-Z_0-9]*/,r:0},s.c[0]]},{b:"\\[",e:"\\]",c:a,r:0,starts:s},{b:"\\{",e:/}/,c:a,r:0,starts:s},{b:/\)/,r:0,starts:s},e.C("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.C("\\%","$")].concat(a)}});hljs.registerLanguage("irpf90",function(e){var t={cN:"params",b:"\\(",e:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"};return{cI:!0,k:n,i:/\/\*/,c:[e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{cN:"string",r:0}),{cN:"function",bK:"subroutine function program",i:"[${=\\n]",c:[e.UTM,t]},e.C("!","$",{r:0}),e.C("begin_doc","end_doc",{r:10}),{cN:"number",b:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",r:0}]}});hljs.registerLanguage("kotlin",function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit initinterface annotation data sealed internal infix operator out by constructor super trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={cN:"keyword",b:/\b(break|continue|return|this)\b/,starts:{c:[{cN:"symbol",b:/@\w+/}]}},i={cN:"symbol",b:e.UIR+"@"},n={cN:"subst",b:"\\${",e:"}",c:[e.ASM,e.CNM]},a={cN:"variable",b:"\\$"+e.UIR},c={cN:"string",v:[{b:'"""',e:'"""',c:[a,n]},{b:"'",e:"'",i:/\n/,c:[e.BE]},{b:'"',e:'"',i:/\n/,c:[e.BE,a,n]}]},s={cN:"meta",b:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UIR+")?"},o={cN:"meta",b:"@"+e.UIR,c:[{b:/\(/,e:/\)/,c:[e.inherit(c,{cN:"meta-string"})]}]};return{k:t,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,r,i,s,o,{cN:"function",bK:"fun",e:"[(]|$",rB:!0,eE:!0,k:t,i:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,r:5,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"type",b://,k:"reified",r:0},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:t,r:0,c:[{b:/:/,e:/[=,\/]/,eW:!0,c:[{cN:"type",b:e.UIR},e.CLCM,e.CBCM],r:0},e.CLCM,e.CBCM,s,o,c,e.CNM]},e.CBCM]},{cN:"class",bK:"class interface trait",e:/[:\{(]|$/,eE:!0,i:"extends implements",c:[{bK:"public protected internal private constructor"},e.UTM,{cN:"type",b://,eB:!0,eE:!0,r:0},{cN:"type",b:/[,:]\s*/,e:/[<\(,]|$/,eB:!0,rE:!0},s,o]},c,{cN:"meta",b:"^#!/usr/bin/env",e:"$",i:"\n"},e.CNM]}});hljs.registerLanguage("crmsh",function(t){var e="primitive rsc_template",r="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",s="property rsc_defaults op_defaults",a="params meta operations op rule attributes utilization",i="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",o="number string",n="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],cI:!0,k:{keyword:a+" "+i+" "+o,literal:n},c:[t.HCM,{bK:"node",starts:{e:"\\s*([\\w_-]+:)?",starts:{cN:"title",e:"\\s*[\\$\\w_][\\w_-]*"}}},{bK:e,starts:{cN:"title",e:"\\s*[\\$\\w_][\\w_-]*",starts:{e:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{b:"\\b("+r.split(" ").join("|")+")\\s+",k:r,starts:{cN:"title",e:"[\\$\\w_][\\w_-]*"}},{bK:s,starts:{cN:"title",e:"\\s*([\\w_-]+:)?"}},t.QSM,{cN:"meta",b:"(ocf|systemd|service|lsb):[\\w_:-]+",r:0},{cN:"number",b:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",r:0},{cN:"literal",b:"[-]?(infinity|inf)",r:0},{cN:"attr",b:/([A-Za-z\$_\#][\w_-]+)=/,r:0},{cN:"tag",b:"",r:0}]}});hljs.registerLanguage("haskell",function(e){var i={v:[e.C("--","$"),e.C("{-","-}",{c:["self"]})]},a={cN:"meta",b:"{-#",e:"#-}"},l={cN:"meta",b:"^#",e:"$"},c={cN:"type",b:"\\b[A-Z][\\w']*",r:0},n={b:"\\(",e:"\\)",i:'"',c:[a,l,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"}),i]},s={b:"{",e:"}",c:n.c};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{bK:"module",e:"where",k:"module where",c:[n,i],i:"\\W\\.|;"},{b:"\\bimport\\b",e:"$",k:"import qualified as hiding",c:[n,i],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[c,n,i]},{cN:"class",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[a,c,n,s,i]},{bK:"default",e:"$",c:[c,n,i]},{bK:"infix infixl infixr",e:"$",c:[e.CNM,i]},{b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[c,e.QSM,i]},{cN:"meta",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},a,l,e.QSM,e.CNM,c,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),i,{b:"->|<-"}]}});hljs.registerLanguage("flix",function(e){var t={cN:"string",b:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={cN:"string",v:[{b:'"',e:'"'}]},n={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/},c={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[n]};return{k:{literal:"true false",keyword:"case class def else enum if impl import in lat rel index let match namespace switch type yield with"},c:[e.CLCM,e.CBCM,t,i,c,e.CNM]}});hljs.registerLanguage("scala",function(e){var t={cN:"meta",b:"@[A-Za-z]+"},a={cN:"subst",v:[{b:"\\$[A-Za-z0-9_]+"},{b:"\\${",e:"}"}]},r={cN:"string",v:[{b:'"',e:'"',i:"\\n",c:[e.BE]},{b:'"""',e:'"""',r:10},{b:'[a-z]+"',e:'"',i:"\\n",c:[e.BE,a]},{cN:"string",b:'[a-z]+"""',e:'"""',c:[a],r:10}]},c={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},i={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},s={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},n={cN:"class",bK:"class object trait type",e:/[:={\[\n;]/,eE:!0,c:[{bK:"extends with",r:10},{b:/\[/,e:/\]/,eB:!0,eE:!0,r:0,c:[i]},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,r:0,c:[i]},s]},l={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[s]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,r,c,i,l,n,e.CNM,t]}});hljs.registerLanguage("powershell",function(e){var t={b:"`[\\s\\S]",r:0},o={cN:"variable",v:[{b:/\$[\w\d][\w\d_:]*/}]},r={cN:"literal",b:/\$(null|true|false)\b/},n={cN:"string",v:[{b:/"/,e:/"/},{b:/@"/,e:/^"@/}],c:[t,o,{cN:"variable",b:/\$[A-z]/,e:/[^A-z]/}]},a={cN:"string",v:[{b:/'/,e:/'/},{b:/@'/,e:/^'@/}]},i={cN:"doctag",v:[{b:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{b:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},s=e.inherit(e.C(null,null),{v:[{b:/#/,e:/$/},{b:/<#/,e:/#>/}],c:[i]});return{aliases:["ps"],l:/-?[A-z\.\-]+/,cI:!0,k:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning Add-MDTPersistentDrive Disable-MDTMonitorService Enable-MDTMonitorService Get-MDTDeploymentShareStatistics Get-MDTMonitorData Get-MDTOperatingSystemCatalog Get-MDTPersistentDrive Import-MDTApplication Import-MDTDriver Import-MDTOperatingSystem Import-MDTPackage Import-MDTTaskSequence New-MDTDatabase Remove-MDTMonitorData Remove-MDTPersistentDrive Restore-MDTPersistentDrive Set-MDTMonitorData Test-MDTDeploymentShare Test-MDTMonitorData Update-MDTDatabaseSchema Update-MDTDeploymentShare Update-MDTLinkedDS Update-MDTMedia Update-MDTMedia Add-VamtProductKey Export-VamtData Find-VamtManagedMachine Get-VamtConfirmationId Get-VamtProduct Get-VamtProductKey Import-VamtData Initialize-VamtData Install-VamtConfirmationId Install-VamtProductActivation Install-VamtProductKey Update-VamtProduct",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[t,e.NM,n,a,r,o,s]}});hljs.registerLanguage("cal",function(e){var r="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",t="false true",c=[e.CLCM,e.C(/\{/,/\}/,{r:0}),e.C(/\(\*/,/\*\)/,{r:10})],n={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]},o={cN:"string",b:/(#\d+)+/},a={cN:"number",b:"\\b\\d+(\\.\\d+)?(DT|D|T)",r:0},i={cN:"string",b:'"',e:'"'},d={cN:"function",bK:"procedure",e:/[:;]/,k:"procedure|10",c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:r,c:[n,o]}].concat(c)},s={cN:"class",b:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",rB:!0,c:[e.TM,d]};return{cI:!0,k:{keyword:r,literal:t},i:/\/\*/,c:[n,o,a,i,e.NM,s,d]}});hljs.registerLanguage("openscad",function(e){var r={cN:"keyword",b:"\\$(f[asn]|t|vp[rtd]|children)"},n={cN:"literal",b:"false|true|PI|undef"},o={cN:"number",b:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",r:0},i=e.inherit(e.QSM,{i:null}),t={cN:"meta",k:{"meta-keyword":"include use"},b:"include|use <",e:">"},s={cN:"params",b:"\\(",e:"\\)",c:["self",o,i,r,n]},c={b:"[*!#%]",r:0},a={cN:"function",bK:"module function",e:"\\=|\\{",c:[s,e.UTM]};return{aliases:["scad"],k:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},c:[e.CLCM,e.CBCM,o,t,i,r,c,a]}});hljs.registerLanguage("dts",function(e){var a={cN:"string",v:[e.inherit(e.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},c={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:e.CNR}],r:0},b={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[e.inherit(a,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},a,e.CLCM,e.CBCM]},i={cN:"variable",b:"\\&[a-z\\d_]*\\b"},r={cN:"meta-keyword",b:"/[a-z][a-z\\d-]*/"},d={cN:"symbol",b:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},n={cN:"params",b:"<",e:">",c:[c,i]},s={cN:"class",b:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,e:/[{;=]/,rB:!0,eE:!0},t={cN:"class",b:"/\\s*{",e:"};",r:10,c:[i,r,d,s,n,e.CLCM,e.CBCM,c,a]};return{k:"",c:[t,i,r,d,s,n,e.CLCM,e.CBCM,c,a,b,{b:e.IR+"::",k:""}]}});hljs.registerLanguage("sml",function(e){return{aliases:["ml"],k:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:/\[(\|\|)?\]|\(\)/,r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*"},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}});hljs.registerLanguage("verilog",function(e){var n={keyword:"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor",literal:"null",built_in:"$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale $bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat $realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson $assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff $assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk $fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control $coverage_get $coverage_save $set_coverage_db_name $rose $stable $past $rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display $coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename $unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow $floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning $dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh $tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random $dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array $async$nand$array $async$or$array $async$nor$array $sync$and$array $sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf $async$and$plane $async$nand$plane $async$or$plane $async$nor$plane $sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system $display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo $write $readmemb $readmemh $writememh $value$plusargs $dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit $writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb $dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall $dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo $fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh $swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb $fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat $sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror"};return{aliases:["v","sv","svh"],cI:!1,k:n,l:/[\w\$]+/,c:[e.CBCM,e.CLCM,e.QSM,{cN:"number",c:[e.BE],v:[{b:"\\b((\\d+'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{b:"\\B(('(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{b:"\\b([0-9_])+",r:0}]},{cN:"variable",v:[{b:"#\\((?!parameter).+\\)"},{b:"\\.\\w+",r:0}]},{cN:"meta",b:"`",e:"$",k:{"meta-keyword":"define __FILE__ __LINE__ begin_keywords celldefine default_nettype define else elsif end_keywords endcelldefine endif ifdef ifndef include line nounconnected_drive pragma resetall timescale unconnected_drive undef undefineall"},r:0}]}});hljs.registerLanguage("hsp",function(e){return{cI:!0,l:/[\w\._]+/,k:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop",c:[e.CLCM,e.CBCM,e.QSM,e.ASM,{cN:"string",b:'{"',e:'"}',c:[e.BE]},e.C(";","$",{r:0}),{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},c:[e.inherit(e.QSM,{cN:"meta-string"}),e.NM,e.CNM,e.CLCM,e.CBCM]},{cN:"symbol",b:"^\\*(\\w+|@)"},e.NM,e.CNM]}});hljs.registerLanguage("rib",function(e){return{k:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",i:""}]}});hljs.registerLanguage("elixir",function(e){var r="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",b="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",c={cN:"subst",b:"#\\{",e:"}",l:r,k:b},a={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/}]},i={cN:"function",bK:"def defp defmacro",e:/\B\b/,c:[e.inherit(e.TM,{b:r,endsParent:!0})]},l=e.inherit(i,{cN:"class",bK:"defimpl defmodule defprotocol defrecord",e:/\bdo\b|$|;/}),s=[a,e.HCM,l,i,{cN:"symbol",b:":(?!\\s)",c:[a,{b:n}],r:0},{cN:"symbol",b:r+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"->"},{b:"("+e.RSR+")\\s*",c:[e.HCM,{cN:"regexp",i:"\\n",c:[e.BE,c],v:[{b:"/",e:"/[a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];return c.c=s,{l:r,k:b,c:s}});hljs.registerLanguage("asciidoc",function(e){return{aliases:["adoc"],c:[e.C("^/{4,}\\n","\\n/{4,}$",{r:10}),e.C("^//","$",{r:0}),{cN:"title",b:"^\\.\\w.*$"},{b:"^[=\\*]{4,}\\n",e:"\\n^[=\\*]{4,}$",r:10},{cN:"section",r:10,v:[{b:"^(={1,5}) .+?( \\1)?$"},{b:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{cN:"meta",b:"^:.+?:",e:"\\s",eE:!0,r:10},{cN:"meta",b:"^\\[.+?\\]$",r:0},{cN:"quote",b:"^_{4,}\\n",e:"\\n_{4,}$",r:10},{cN:"code",b:"^[\\-\\.]{4,}\\n",e:"\\n[\\-\\.]{4,}$",r:10},{b:"^\\+{4,}\\n",e:"\\n\\+{4,}$",c:[{b:"<",e:">",sL:"xml",r:0}],r:10},{cN:"bullet",b:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{cN:"symbol",b:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",r:10},{cN:"strong",b:"\\B\\*(?![\\*\\s])",e:"(\\n{2}|\\*)",c:[{b:"\\\\*\\w",r:0}]},{cN:"emphasis",b:"\\B'(?!['\\s])",e:"(\\n{2}|')",c:[{b:"\\\\'\\w",r:0}],r:0},{cN:"emphasis",b:"_(?![_\\s])",e:"(\\n{2}|_)",r:0},{cN:"string",v:[{b:"``.+?''"},{b:"`.+?'"}]},{cN:"code",b:"(`.+?`|\\+.+?\\+)",r:0},{cN:"code",b:"^[ \\t]",e:"$",r:0},{b:"^'{3,}[ \\t]*$",r:10},{b:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",rB:!0,c:[{b:"(link|image:?):",r:0},{cN:"link",b:"\\w",e:"[^\\[]+",r:0},{cN:"string",b:"\\[",e:"\\]",eB:!0,eE:!0,r:0}],r:10}]}});hljs.registerLanguage("capnproto",function(t){return{aliases:["capnp"],k:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},c:[t.QSM,t.NM,t.HCM,{cN:"meta",b:/@0x[\w\d]{16};/,i:/\n/},{cN:"symbol",b:/@\d+\b/},{cN:"class",bK:"struct enum",e:/\{/,i:/\n/,c:[t.inherit(t.TM,{starts:{eW:!0,eE:!0}})]},{cN:"class",bK:"interface",e:/\{/,i:/\n/,c:[t.inherit(t.TM,{starts:{eW:!0,eE:!0}})]}]}});hljs.registerLanguage("makefile",function(e){var i={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%%$#]",starts:{e:"$",sL:"bash"}}]}});hljs.registerLanguage("oxygene",function(e){var r="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",t=e.C("{","}",{r:0}),a=e.C("\\(\\*","\\*\\)",{r:10}),n={cN:"string",b:"'",e:"'",c:[{b:"''"}]},o={cN:"string",b:"(#\\d+)+"},i={cN:"function",bK:"function constructor destructor procedure method",e:"[:;]",k:"function constructor|10 destructor|10 procedure|10 method|10",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",k:r,c:[n,o]},t,a]};return{cI:!0,l:/\.?\w+/,k:r,i:'("|\\$[G-Zg-z]|\\/\\*||->)',c:[t,a,e.CLCM,n,o,e.NM,i,{cN:"class",b:"=\\bclass\\b",e:"end;",k:r,c:[n,o,t,a,e.CLCM,i]}]}});hljs.registerLanguage("autoit",function(e){var t="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",r="True False And Null Not Or",i="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",l={v:[e.C(";","$",{r:0}),e.C("#cs","#ce"),e.C("#comments-start","#comments-end")]},n={b:"\\$[A-z0-9_]+"},o={cN:"string",v:[{b:/"/,e:/"/,c:[{b:/""/,r:0}]},{b:/'/,e:/'/,c:[{b:/''/,r:0}]}]},a={v:[e.BNM,e.CNM]},S={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},c:[{b:/\\\n/,r:0},{bK:"include",k:{"meta-keyword":"include"},e:"$",c:[o,{cN:"meta-string",v:[{b:"<",e:">"},{b:/"/,e:/"/,c:[{b:/""/,r:0}]},{b:/'/,e:/'/,c:[{b:/''/,r:0}]}]}]},o,l]},C={cN:"symbol",b:"@[A-z0-9_]+"},s={cN:"function",bK:"Func",e:"$",i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:[n,o,a]}]};return{cI:!0,i:/\/\*/,k:{keyword:t,built_in:i,literal:r},c:[l,n,o,a,S,C,s]}});hljs.registerLanguage("axapta",function(e){return{k:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM,{cN:"meta",b:"#",e:"$"},{cN:"class",bK:"class interface",e:"{",eE:!0,i:":",c:[{bK:"extends implements"},e.UTM]}]}});hljs.registerLanguage("qml",function(r){var e={keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4dPromise"},t="[a-zA-Z_][a-zA-Z0-9\\._]*",a={cN:"keyword",b:"\\bproperty\\b",starts:{cN:"string",e:"(:|=|;|,|//|/\\*|$)",rE:!0}},n={cN:"keyword",b:"\\bsignal\\b",starts:{cN:"string",e:"(\\(|:|=|;|,|//|/\\*|$)",rE:!0}},o={cN:"attribute",b:"\\bid\\s*:",starts:{cN:"string",e:t,rE:!1}},i={b:t+"\\s*:",rB:!0,c:[{cN:"attribute",b:t,e:"\\s*:",eE:!0,r:0}],r:0},c={b:t+"\\s*{",e:"{",rB:!0,r:0,c:[r.inherit(r.TM,{b:t})]};return{aliases:["qt"],cI:!1,k:e,c:[{cN:"meta",b:/^\s*['"]use (strict|asm)['"]/},r.ASM,r.QSM,{cN:"string",b:"`",e:"`",c:[r.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},r.CLCM,r.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:r.CNR}],r:0},{b:"("+r.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[r.CLCM,r.CBCM,r.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},n,a,{cN:"function",bK:"function",e:/\{/,eE:!0,c:[r.inherit(r.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[r.CLCM,r.CBCM]}],i:/\[|%/},{b:"\\."+r.IR,r:0},o,i,c],i:/#/}});hljs.registerLanguage("subunit",function(s){var r={cN:"string",b:"\\[\n(multipart)?",e:"\\]\n"},t={cN:"string",b:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},e={cN:"string",b:"(\\+|-)\\d+"},c={cN:"keyword",r:10,v:[{b:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{b:"^progress(:?)(\\s+)?(pop|push)?"},{b:"^tags:"},{b:"^time:"}]};return{cI:!0,c:[r,t,e,c]}});hljs.registerLanguage("vala",function(t){return{k:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},c:[{cN:"class",bK:"class interface namespace",e:"{",eE:!0,i:"[^,:\\n\\s\\.]",c:[t.UTM]},t.CLCM,t.CBCM,{cN:"string",b:'"""',e:'"""',r:5},t.ASM,t.QSM,t.CNM,{cN:"meta",b:"^#",e:"$",r:2}]}});hljs.registerLanguage("hy",function(e){var t={"builtin-name":"!= % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},i="a-zA-Z_\\-!.?+*=<>&#'",a="["+i+"]["+i+"0-9/;:]*",r="[-+]?\\d+(\\.\\d+)?",o={cN:"meta",b:"^#!",e:"$"},s={b:a,r:0},n={cN:"number",b:r,r:0},l=e.inherit(e.QSM,{i:null}),c=e.C(";","$",{r:0}),d={cN:"literal",b:/\b([Tt]rue|[Ff]alse|nil|None)\b/},p={b:"[\\[\\{]",e:"[\\]\\}]"},m={cN:"comment",b:"\\^"+a},u=e.C("\\^\\{","\\}"),f={cN:"symbol",b:"[:]{1,2}"+a},h={b:"\\(",e:"\\)"},b={eW:!0,r:0},g={k:t,l:a,cN:"name",b:a,starts:b},y=[h,l,m,u,c,f,p,n,d,s];return h.c=[e.C("comment",""),g,b],b.c=y,p.c=y,{aliases:["hylang"],i:/\S/,c:[o,h,l,m,u,c,f,p,n,d]}});hljs.registerLanguage("glsl",function(e){return{k:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBufferiimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},i:'"',c:[e.CLCM,e.CBCM,e.CNM,{cN:"meta",b:"#",e:"$"}]}});hljs.registerLanguage("pf",function(t){var o={cN:"variable",b:/\$[\w\d#@][\w\d_]*/},e={cN:"variable",b:/<(?!\/)/,e:/>/};return{aliases:["pf.conf"],l:/[a-z0-9_<>-]+/,k:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},c:[t.HCM,t.NM,t.QSM,o,e]}});hljs.registerLanguage("vbnet",function(e){return{aliases:["vb"],cI:!0,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C("'","$",{rB:!0,c:[{cN:"doctag",b:"'''|",c:[e.PWM]},{cN:"doctag",b:"",c:[e.PWM]}]}),e.CNM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elseif end region externalsource"}}]}});hljs.registerLanguage("coq",function(e){return{k:{keyword:"_ as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies DependentDerive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},c:[e.QSM,e.C("\\(\\*","\\*\\)"),e.CNM,{cN:"type",eB:!0,b:"\\|\\s*",e:"\\w+"},{b:/[-=]>/}]}}); \ No newline at end of file +!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/&/g,"&").replace(//g,">")}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return w(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||w(i))return i}function o(e){var n,t={},r=Array.prototype.slice.call(arguments,1);for(n in e)t[n]=e[n];return r.forEach(function(e){for(n in e)t[n]=e[n]}),t}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){s+=""}function c(e){("start"===e.event?o:u)(e.node)}for(var l=0,s="",f=[];e.length||r.length;){var g=i();if(s+=n(a.substring(l,g[0].offset)),l=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===l);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return s+n(a.substr(l))}function l(e){return e.v&&!e.cached_variants&&(e.cached_variants=e.v.map(function(n){return o(e,{v:null},n)})),e.cached_variants||e.eW&&[o(e)]||[e]}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var o={},u=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");o[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?u("keyword",a.k):x(a.k).forEach(function(e){u(e,a.k[e])}),a.k=o}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]),a.c=Array.prototype.concat.apply([],a.c.map(function(e){return l("self"===e?a:e)})),a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var c=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=c.length?t(c.join("|"),!0):{exec:function(){return null}}}}r(e)}function f(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function l(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function p(e,n,t,r){var a=r?"":I.classPrefix,i='',i+n+o}function h(){var e,t,r,a;if(!E.k)return n(k);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(k);r;)a+=n(k.substring(t,r.index)),e=l(E,r),e?(B+=e[1],a+=p(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(k);return a+n(k.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!y[E.sL])return n(k);var t=e?f(E.sL,k,!0,x[E.sL]):g(k,E.sL.length?E.sL:void 0);return E.r>0&&(B+=t.r),e&&(x[E.sL]=t.top),p(t.language,t.value,!1,!0)}function b(){L+=null!=E.sL?d():h(),k=""}function v(e){L+=e.cN?p(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(k+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?k+=n:(t.eB&&(k+=n),b(),t.rB||t.eB||(k=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?k+=n:(a.rE||a.eE||(k+=n),b(),a.eE&&(k=n));do E.cN&&(L+=C),E.skip||(B+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return k+=n,n.length||1}var N=w(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var R,E=i||N,x={},L="";for(R=E;R!==N;R=R.parent)R.cN&&(L=p(R.cN,"",!0)+L);var k="",B=0;try{for(var M,j,O=0;;){if(E.t.lastIndex=O,M=E.t.exec(t),!M)break;j=m(t.substring(O,M.index),M[0]),O=M.index+j}for(m(t.substr(O)),R=E;R.parent;R=R.parent)R.cN&&(L+=C);return{r:B,value:L,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function g(e,t){t=t||I.languages||x(y);var r={r:0,value:n(e)},a=r;return t.filter(w).forEach(function(n){var t=f(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function p(e){return I.tabReplace||I.useBR?e.replace(M,function(e,n){return I.useBR&&"\n"===e?"
":I.tabReplace?n.replace(/\t/g,I.tabReplace):""}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function d(e){var n,t,r,o,l,s=i(e);a(s)||(I.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(//g,"\n")):n=e,l=n.textContent,r=s?f(s,l,!0):g(l),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),l)),r.value=p(r.value),e.innerHTML=r.value,e.className=h(e.className,s,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function b(e){I=o(I,e)}function v(){if(!v.called){v.called=!0;var e=document.querySelectorAll("pre code");E.forEach.call(e,d)}}function m(){addEventListener("DOMContentLoaded",v,!1),addEventListener("load",v,!1)}function N(n,t){var r=y[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function R(){return x(y)}function w(e){return e=(e||"").toLowerCase(),y[e]||y[L[e]]}var E=[],x=Object.keys,y={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C="
",I={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};return e.highlight=f,e.highlightAuto=g,e.fixMarkup=p,e.highlightBlock=d,e.configure=b,e.initHighlighting=v,e.initHighlightingOnLoad=m,e.registerLanguage=N,e.listLanguages=R,e.getLanguage=w,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("nimrod",function(t){return{aliases:["nim"],k:{keyword:"addr and as asm bind block break case cast const continue converter discard distinct div do elif else end enum except export finally for from generic if import in include interface is isnot iterator let macro method mixin mod nil not notin object of or out proc ptr raise ref return shl shr static template try tuple type using var when while with without xor yield",literal:"shared guarded stdin stdout stderr result true false",built_in:"int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float float32 float64 bool char string cstring pointer expr stmt void auto any range array openarray varargs seq set clong culong cchar cschar cshort cint csize clonglong cfloat cdouble clongdouble cuchar cushort cuint culonglong cstringarray semistatic"},c:[{cN:"meta",b:/{\./,e:/\.}/,r:10},{cN:"string",b:/[a-zA-Z]\w*"/,e:/"/,c:[{b:/""/}]},{cN:"string",b:/([a-zA-Z]\w*)?"""/,e:/"""/},t.QSM,{cN:"type",b:/\b[A-Z]\w+\b/,r:0},{cN:"number",r:0,v:[{b:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/},{b:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/},{b:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/},{b:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/}]},t.HCM]}});hljs.registerLanguage("basic",function(E){return{cI:!0,i:"^.",l:"[a-zA-Z][a-zA-Z0-9_$%!#]*",k:{keyword:"ABS ASC AND ATN AUTO|0 BEEP BLOAD|10 BSAVE|10 CALL CALLS CDBL CHAIN CHDIR CHR$|10 CINT CIRCLE CLEAR CLOSE CLS COLOR COM COMMON CONT COS CSNG CSRLIN CVD CVI CVS DATA DATE$ DEFDBL DEFINT DEFSNG DEFSTR DEF|0 SEG USR DELETE DIM DRAW EDIT END ENVIRON ENVIRON$ EOF EQV ERASE ERDEV ERDEV$ ERL ERR ERROR EXP FIELD FILES FIX FOR|0 FRE GET GOSUB|10 GOTO HEX$ IF|0 THEN ELSE|0 INKEY$ INP INPUT INPUT# INPUT$ INSTR IMP INT IOCTL IOCTL$ KEY ON OFF LIST KILL LEFT$ LEN LET LINE LLIST LOAD LOC LOCATE LOF LOG LPRINT USING LSET MERGE MID$ MKDIR MKD$ MKI$ MKS$ MOD NAME NEW NEXT NOISE NOT OCT$ ON OR PEN PLAY STRIG OPEN OPTION BASE OUT PAINT PALETTE PCOPY PEEK PMAP POINT POKE POS PRINT PRINT] PSET PRESET PUT RANDOMIZE READ REM RENUM RESET|0 RESTORE RESUME RETURN|0 RIGHT$ RMDIR RND RSET RUN SAVE SCREEN SGN SHELL SIN SOUND SPACE$ SPC SQR STEP STICK STOP STR$ STRING$ SWAP SYSTEM TAB TAN TIME$ TIMER TROFF TRON TO USR VAL VARPTR VARPTR$ VIEW WAIT WHILE WEND WIDTH WINDOW WRITE XOR"},c:[E.QSM,E.C("REM","$",{r:10}),E.C("'","$",{r:0}),{cN:"symbol",b:"^[0-9]+ ",r:10},{cN:"number",b:"\\b([0-9]+[0-9edED.]*[#!]?)",r:0},{cN:"number",b:"(&[hH][0-9a-fA-F]{1,4})"},{cN:"number",b:"(&[oO][0-7]{1,6})"}]}});hljs.registerLanguage("ldif",function(e){return{c:[{cN:"attribute",b:"^dn",e:": ",eE:!0,starts:{e:"$",r:0},r:10},{cN:"attribute",b:"^\\w",e:": ",eE:!0,starts:{e:"$",r:0}},{cN:"literal",b:"^-",e:"$"},e.HCM]}});hljs.registerLanguage("xl",function(e){var t="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",o={keyword:"if then else do while until for loop import with is as where when by data constant integer real text name boolean symbol infix prefix postfix block tree",literal:"true false nil",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons "+t},a={cN:"string",b:'"',e:'"',i:"\\n"},r={cN:"string",b:"'",e:"'",i:"\\n"},i={cN:"string",b:"<<",e:">>"},l={cN:"number",b:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?"},n={bK:"import",e:"$",k:o,c:[a]},s={cN:"function",b:/[a-z][^\n]*->/,rB:!0,e:/->/,c:[e.inherit(e.TM,{starts:{eW:!0,k:o}})]};return{aliases:["tao"],l:/[a-zA-Z][a-zA-Z0-9_?]*/,k:o,c:[e.CLCM,e.CBCM,a,r,i,s,n,l,e.NM]}});hljs.registerLanguage("ada",function(e){var r="\\d(_|\\d)*",t="[eE][-+]?"+r,s=r+"(\\."+r+")?("+t+")?",n="\\w+",a=r+"#"+n+"(\\."+n+")?#("+t+")?",i="\\b("+a+"|"+s+")",c="[A-Za-z](_?[A-Za-z0-9.])*",o="[]{}%#'\"",b=e.C("--","$"),d={b:"\\s+:\\s+",e:"\\s*(:=|;|\\)|=>|$)",i:o,c:[{bK:"loop for declare others",endsParent:!0},{cN:"keyword",bK:"not null constant access function procedure in out aliased exception"},{cN:"type",b:c,endsParent:!0,r:0}]};return{cI:!0,k:{keyword:"abort else new return abs elsif not reverse abstract end accept entry select access exception of separate aliased exit or some all others subtype and for out synchronized array function overriding at tagged generic package task begin goto pragma terminate body private then if procedure type case in protected constant interface is raise use declare range delay limited record when delta loop rem while digits renames with do mod requeue xor",literal:"True False"},c:[b,{cN:"string",b:/"/,e:/"/,c:[{b:/""/,r:0}]},{cN:"string",b:/'.'/},{cN:"number",b:i,r:0},{cN:"symbol",b:"'"+c},{cN:"title",b:"(\\bwith\\s+)?(\\bprivate\\s+)?\\bpackage\\s+(\\bbody\\s+)?",e:"(is|$)",k:"package body",eB:!0,eE:!0,i:o},{b:"(\\b(with|overriding)\\s+)?\\b(function|procedure)\\s+",e:"(\\bis|\\bwith|\\brenames|\\)\\s*;)",k:"overriding function procedure with is renames return",rB:!0,c:[b,{cN:"title",b:"(\\bwith\\s+)?\\b(function|procedure)\\s+",e:"(\\(|\\s+|$)",eB:!0,eE:!0,i:o},d,{cN:"type",b:"\\breturn\\s+",e:"(\\s+|;|$)",k:"return",eB:!0,eE:!0,endsParent:!0,i:o}]},{cN:"type",b:"\\b(sub)?type\\s+",e:"\\s+",k:"type",eB:!0,i:o},d]}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("taggerscript",function(e){var c={cN:"comment",b:/\$noop\(/,e:/\)/,c:[{b:/\(/,e:/\)/,c:["self",{b:/\\./}]}],r:10},r={cN:"keyword",b:/\$(?!noop)[a-zA-Z][_a-zA-Z0-9]*/,e:/\(/,eE:!0},a={cN:"variable",b:/%[_a-zA-Z0-9:]*/,e:"%"},b={cN:"symbol",b:/\\./};return{c:[c,r,a,b]}});hljs.registerLanguage("prolog",function(c){var b={b:/[a-z][A-Za-z0-9_]*/,r:0},r={cN:"symbol",v:[{b:/[A-Z][a-zA-Z0-9_]*/},{b:/_[A-Za-z0-9_]*/}],r:0},e={b:/\(/,e:/\)/,r:0},n={b:/\[/,e:/\]/},a={cN:"comment",b:/%/,e:/$/,c:[c.PWM]},t={cN:"string",b:/`/,e:/`/,c:[c.BE]},g={cN:"string",b:/0\'(\\\'|.)/},s={cN:"string",b:/0\'\\s/},o={b:/:-/},N=[b,r,e,o,n,a,c.CBCM,c.QSM,c.ASM,t,g,s,c.CNM];return e.c=N,n.c=N,{c:N.concat([{b:/\.$/}])}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b://,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("python",function(e){var r={keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},b={cN:"meta",b:/^(>>>|\.\.\.) /},c={cN:"subst",b:/\{/,e:/\}/,k:r,i:/#/},a={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[b],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[b],r:10},{b:/(fr|rf|f)'''/,e:/'''/,c:[b,c]},{b:/(fr|rf|f)"""/,e:/"""/,c:[b,c]},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},{b:/(fr|rf|f)'/,e:/'/,c:[c]},{b:/(fr|rf|f)"/,e:/"/,c:[c]},e.ASM,e.QSM]},s={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},i={cN:"params",b:/\(/,e:/\)/,c:["self",b,s,a]};return c.c=[a,s,b],{aliases:["py","gyp"],k:r,i:/(<\/|->|\?)|=>/,c:[b,s,a,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,i,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("applescript",function(e){var t=e.inherit(e.QSM,{i:""}),r={cN:"params",b:"\\(",e:"\\)",c:["self",e.CNM,t]},i=e.C("--","$"),o=e.C("\\(\\*","\\*\\)",{c:["self",i]}),n=[i,o,e.HCM];return{aliases:["osascript"],k:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",literal:"AppleScript false linefeed return pi quote result space tab true",built_in:"alias application boolean class constant date file integer list number real record string text activate beep count delay launch log offset read round run say summarize write character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},c:[t,e.CNM,{cN:"built_in",b:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{cN:"literal",b:"\\b(text item delimiters|current application|missing value)\\b"},{cN:"keyword",b:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference)|POSIX file|POSIX path|(date|time) string|quoted form)\\b"},{bK:"on",i:"[${=;\\n]",c:[e.UTM,r]}].concat(n),i:"//|->|=>|\\[\\["}});hljs.registerLanguage("stylus",function(e){var t={cN:"variable",b:"\\$"+e.IR},o={cN:"number",b:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})"},i=["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"],r=["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"],n=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],a="[\\.\\s\\n\\[\\:,]",l=["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-dbRule","column-dbRule-color","column-dbRule-style","column-dbRule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"],d=["\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)","(\\bdef\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"];return{aliases:["styl"],cI:!1,k:"if else for in",i:"("+d.join("|")+")",c:[e.QSM,e.ASM,e.CLCM,e.CBCM,o,{b:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+a,rB:!0,c:[{cN:"selector-class",b:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{b:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+a,rB:!0,c:[{cN:"selector-id",b:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{b:"\\b("+n.join("|")+")"+a,rB:!0,c:[{cN:"selector-tag",b:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{b:"&?:?:\\b("+r.join("|")+")"+a},{b:"@("+i.join("|")+")\\b"},t,e.CSSNM,e.NM,{cN:"function",b:"^[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",i:"[\\n]",rB:!0,c:[{cN:"title",b:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{cN:"params",b:/\(/,e:/\)/,c:[o,t,e.ASM,e.CSSNM,e.NM,e.QSM]}]},{cN:"attribute",b:"\\b("+l.reverse().join("|")+")\\b",starts:{e:/;|$/,c:[o,t,e.ASM,e.QSM,e.CSSNM,e.NM,e.CBCM],i:/\./,r:0}}]}});hljs.registerLanguage("tcl",function(e){return{aliases:["tk"],k:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",c:[e.C(";[ \\t]*#","$"),e.C("^[ \\t]*#","$"),{bK:"proc",e:"[\\{]",eE:!0,c:[{cN:"title",b:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",e:"[ \\t\\n\\r]",eW:!0,eE:!0}]},{eE:!0,v:[{b:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",e:"[^a-zA-Z0-9_\\}\\$]"},{b:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",e:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{cN:"string",c:[e.BE],v:[e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},{cN:"number",v:[e.BNM,e.CNM]}]}});hljs.registerLanguage("elm",function(e){var i={v:[e.C("--","$"),e.C("{-","-}",{c:["self"]})]},t={cN:"type",b:"\\b[A-Z][\\w']*",r:0},c={b:"\\(",e:"\\)",i:'"',c:[{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},i]},n={b:"{",e:"}",c:c.c};return{k:"let in if then else case of where module import exposing type alias as infix infixl infixr port effect command subscription",c:[{bK:"port effect module",e:"exposing",k:"port effect module where command subscription exposing",c:[c,i],i:"\\W\\.|;"},{b:"import",e:"$",k:"import as exposing",c:[c,i],i:"\\W\\.|;"},{b:"type",e:"$",k:"type alias",c:[t,c,n,i]},{bK:"infix infixl infixr",e:"$",c:[e.CNM,i]},{b:"port",e:"$",k:"port",c:[i]},e.QSM,e.CNM,t,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),i,{b:"->|<-"}],i:/;/}});hljs.registerLanguage("fortran",function(e){var t={cN:"params",b:"\\(",e:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"};return{cI:!0,aliases:["f90","f95"],k:n,i:/\/\*/,c:[e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{cN:"string",r:0}),{cN:"function",bK:"subroutine function program",i:"[${=\\n]",c:[e.UTM,t]},e.C("!","$",{r:0}),{cN:"number",b:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",r:0}]}});hljs.registerLanguage("livecodeserver",function(e){var r={b:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",r:0},t=[e.CBCM,e.HCM,e.C("--","$"),e.C("[^:]//","$")],a=e.inherit(e.TM,{v:[{b:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{b:"\\b_[a-z0-9\\-]+"}]}),o=e.inherit(e.TM,{b:"\\b([A-Za-z0-9_\\-]+)\\b"});return{cI:!1,k:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",literal:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},c:[r,{cN:"keyword",b:"\\bend\\sif\\b"},{cN:"function",bK:"function",e:"$",c:[r,o,e.ASM,e.QSM,e.BNM,e.CNM,a]},{cN:"function",b:"\\bend\\s+",e:"$",k:"end",c:[o,a],r:0},{bK:"command on",e:"$",c:[r,o,e.ASM,e.QSM,e.BNM,e.CNM,a]},{cN:"meta",v:[{b:"<\\?(rev|lc|livecode)",r:10},{b:"<\\?"},{b:"\\?>"}]},e.ASM,e.QSM,e.BNM,e.CNM,a].concat(t),i:";$|^\\[|^=|&|{"}});hljs.registerLanguage("nix",function(e){var r={keyword:"rec with let in inherit assert if else then",literal:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},t={cN:"subst",b:/\$\{/,e:/}/,k:r},i={b:/[a-zA-Z0-9-_]+(\s*=)/,rB:!0,r:0,c:[{cN:"attr",b:/\S+/}]},s={cN:"string",c:[t],v:[{b:"''",e:"''"},{b:'"',e:'"'}]},a=[e.NM,e.HCM,e.CBCM,s,i];return t.c=a,{aliases:["nixos"],k:r,c:a}});hljs.registerLanguage("actionscript",function(e){var a="[a-zA-Z_$][a-zA-Z0-9_$]*",t="([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",c={cN:"rest_arg",b:"[.]{3}",e:a,r:10};return{aliases:["as"],k:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},c:[e.ASM,e.QSM,e.CLCM,e.CBCM,e.CNM,{cN:"class",bK:"package",e:"{",c:[e.TM]},{cN:"class",bK:"class interface",e:"{",eE:!0,c:[{bK:"extends implements"},e.TM]},{cN:"meta",bK:"import include",e:";",k:{"meta-keyword":"import include"}},{cN:"function",bK:"function",e:"[{;]",eE:!0,i:"\\S",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",c:[e.ASM,e.QSM,e.CLCM,e.CBCM,c]},{b:":\\s*"+t}]},e.METHOD_GUARD],i:/#/}});hljs.registerLanguage("vhdl",function(e){var r="\\d(_|\\d)*",t="[eE][-+]?"+r,n=r+"(\\."+r+")?("+t+")?",o="\\w+",i=r+"#"+o+"(\\."+o+")?#("+t+")?",a="\\b("+i+"|"+n+")";return{cI:!0,k:{keyword:"abs access after alias all and architecture array assert assume assume_guarantee attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",built_in:"boolean bit character integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_logic std_logic_vector unsigned signed boolean_vector integer_vector std_ulogic std_ulogic_vector unresolved_unsigned u_unsigned unresolved_signed u_signedreal_vector time_vector",literal:"false true note warning error failure line text side width"},i:"{",c:[e.CBCM,e.C("--","$"),e.QSM,{cN:"number",b:a,r:0},{cN:"string",b:"'(U|X|0|1|Z|W|L|H|-)'",c:[e.BE]},{cN:"symbol",b:"'[A-Za-z](_?[A-Za-z0-9])*",c:[e.BE]}]}});hljs.registerLanguage("haxe",function(e){var t="Int Float String Bool Dynamic Void Array ";return{aliases:["hx"],k:{keyword:"break case cast catch continue default do dynamic else enum extern for function here if import in inline never new override package private get set public return static super switch this throw trace try typedef untyped using var while "+t,built_in:"trace this",literal:"true false null _"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"},{cN:"subst",b:"\\$",e:"\\W}"}]},e.QSM,e.CLCM,e.CBCM,e.CNM,{cN:"meta",b:"@:",e:"$"},{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elseif end error"}},{cN:"type",b:":[ ]*",e:"[^A-Za-z0-9_ \\->]",eB:!0,eE:!0,r:0},{cN:"type",b:":[ ]*",e:"\\W",eB:!0,eE:!0},{cN:"type",b:"new *",e:"\\W",eB:!0,eE:!0},{cN:"class",bK:"enum",e:"\\{",c:[e.TM]},{cN:"class",bK:"abstract",e:"[\\{$]",c:[{cN:"type",b:"\\(",e:"\\)",eB:!0,eE:!0},{cN:"type",b:"from +",e:"\\W",eB:!0,eE:!0},{cN:"type",b:"to +",e:"\\W",eB:!0,eE:!0},e.TM],k:{keyword:"abstract from to"}},{cN:"class",b:"\\b(class|interface) +",e:"[\\{$]",eE:!0,k:"class interface",c:[{cN:"keyword",b:"\\b(extends|implements) +",k:"extends implements",c:[{cN:"type",b:e.IR,r:0}]},e.TM]},{cN:"function",bK:"function",e:"\\(",eE:!0,i:"\\S",c:[e.TM]}],i:/<\//}});hljs.registerLanguage("lasso",function(e){var r="[a-zA-Z_][\\w.]*",a="<\\?(lasso(script)?|=)",t="\\]|\\?>",n={literal:"true false none minimal full all void and or not bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else fail_if fail_ifnot fail if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},i=e.C("",{r:0}),s={cN:"meta",b:"\\[noprocess\\]",starts:{e:"\\[/noprocess\\]",rE:!0,c:[i]}},l={cN:"meta",b:"\\[/noprocess|"+a},o={cN:"symbol",b:"'"+r+"'"},c=[e.CLCM,e.CBCM,e.inherit(e.CNM,{b:e.CNR+"|(-?infinity|NaN)\\b"}),e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"`",e:"`"},{v:[{b:"[#$]"+r},{b:"#",e:"\\d+",i:"\\W"}]},{cN:"type",b:"::\\s*",e:r,i:"\\W"},{cN:"params",v:[{b:"-(?!infinity)"+r,r:0},{b:"(\\.\\.\\.)"}]},{b:/(->|\.)\s*/,r:0,c:[o]},{cN:"class",bK:"define",rE:!0,e:"\\(|=>",c:[e.inherit(e.TM,{b:r+"(=(?!>))?|[-+*/%](?!>)"})]}];return{aliases:["ls","lassoscript"],cI:!0,l:r+"|&[lg]t;",k:n,c:[{cN:"meta",b:t,r:0,starts:{e:"\\[|"+a,rE:!0,r:0,c:[i]}},s,l,{cN:"meta",b:"\\[no_square_brackets",starts:{e:"\\[/no_square_brackets\\]",l:r+"|&[lg]t;",k:n,c:[{cN:"meta",b:t,r:0,starts:{e:"\\[noprocess\\]|"+a,rE:!0,c:[i]}},s,l].concat(c)}},{cN:"meta",b:"\\[",r:0},{cN:"meta",b:"^#!",e:"lasso9$",r:10}].concat(c)}});hljs.registerLanguage("go",function(e){var t={keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",literal:"true false iota nil",built_in:"append cap close complex copy imag len make new panic print println real recover delete"};return{aliases:["golang"],k:t,i:"]",e:"[;{}]"},{b:t,e:"{"}],rB:!0,rE:!0,i:"[<='$\"]",r:0,c:[e.CLCM,e.CBCM,o,b("keyword","all\\b"),b("variable","@{"+r+"}"),b("selector-tag",t+"%?",0),b("selector-id","#"+t),b("selector-class","\\."+t,0),b("selector-tag","&",0),{cN:"selector-attr",b:"\\[",e:"\\]"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"\\(",e:"\\)",c:i},{b:"!important"}]};return a.push(e.CLCM,e.CBCM,l,C,u,p),{cI:!0,i:"[=>'/<($\"]",c:a}});hljs.registerLanguage("monkey",function(e){var n={cN:"number",r:0,v:[{b:"[$][a-fA-F0-9]+"},e.NM]};return{cI:!0,k:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw import",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},i:/\/\*/,c:[e.C("#rem","#end"),e.C("'","$",{r:0}),{cN:"function",bK:"function method",e:"[(=:]|$",i:/\n/,c:[e.UTM]},{cN:"class",bK:"class interface",e:"$",c:[{bK:"extends implements"},e.UTM]},{cN:"built_in",b:"\\b(self|super)\\b"},{cN:"meta",b:"\\s*#",e:"$",k:{"meta-keyword":"if else elseif endif end then"}},{cN:"meta",b:"^\\s*strict\\b"},{bK:"alias",e:"=",c:[e.UTM]},e.QSM,n]}});hljs.registerLanguage("clojure",function(e){var t={"builtin-name":"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},r="a-zA-Z_\\-!.?+*=<>&#'",n="["+r+"]["+r+"0-9/;:]*",a="[-+]?\\d+(\\.\\d+)?",o={b:n,r:0},s={cN:"number",b:a,r:0},c=e.inherit(e.QSM,{i:null}),i=e.C(";","$",{r:0}),d={cN:"literal",b:/\b(true|false|nil)\b/},l={b:"[\\[\\{]",e:"[\\]\\}]"},m={cN:"comment",b:"\\^"+n},p=e.C("\\^\\{","\\}"),u={cN:"symbol",b:"[:]{1,2}"+n},f={b:"\\(",e:"\\)"},h={eW:!0,r:0},y={k:t,l:n,cN:"name",b:n,starts:h},b=[f,c,m,p,i,u,l,s,d,o];return f.c=[e.C("comment",""),y,h],h.c=b,l.c=b,p.c=[l],{aliases:["clj"],i:/\S/,c:[f,c,m,p,i,u,l,s,d]}});hljs.registerLanguage("routeros",function(e){var r="foreach do while for if from to step else on-error and or not in",i="global local beep delay put len typeof pick log time set find environment terminal error execute parse resolve toarray tobool toid toip toip6 tonum tostr totime",o="add remove enable disable set get print export edit find run debug error info warning",t="true false yes no nothing nil null",s="traffic-flow traffic-generator firewall scheduler aaa accounting address-list address align area bandwidth-server bfd bgp bridge client clock community config connection console customer default dhcp-client dhcp-server discovery dns e-mail ethernet filter firewall firmware gps graphing group hardware health hotspot identity igmp-proxy incoming instance interface ip ipsec ipv6 irq l2tp-server lcd ldp logging mac-server mac-winbox mangle manual mirror mme mpls nat nd neighbor network note ntp ospf ospf-v3 ovpn-server page peer pim ping policy pool port ppp pppoe-client pptp-server prefix profile proposal proxy queue radius resource rip ripng route routing screen script security-profiles server service service-port settings shares smb sms sniffer snmp snooper socks sstp-server system tool tracking type upgrade upnp user-manager users user vlan secret vrrp watchdog web-access wireless pptp pppoe lan wan layer7-protocol lease simple raw",n={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},p={cN:"string",b:/"/,e:/"/,c:[e.BE,n,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["routeros","mikrotik"],cI:!0,l:/:?[\w-]+/,k:{literal:t,keyword:r+" :"+r.split(" ").join(" :")+" :"+i.split(" ").join(" :")},c:[{v:[{b:/^@/,e:/$/},{b:/\/\*/,e:/\*\//},{b:/%%/,e:/$/},{b:/^'/,e:/$/},{b:/^\s*\/[\w-]+=/,e:/$/},{b:/\/\//,e:/$/},{b:/^\[\\]$/},{b:/<\//,e:/>/},{b:/^facet /,e:/\}/},{b:"^1\\.\\.(\\d+)$",e:/$/}],i:/./},e.C("^#","$"),p,a,n,{b:/[\w-]+\=([^\s\{\}\[\]\(\)]+)/,r:0,rB:!0,c:[{cN:"attribute",b:/[^=]+/},{b:/=/,eW:!0,r:0,c:[p,a,n,{cN:"literal",b:"\\b("+t.split(" ").join("|")+")\\b"},{b:/("[^"]*"|[^\s\{\}\[\]]+)/}]}]},{cN:"number",b:/\*[0-9a-fA-F]+/},{b:"\\b("+o.split(" ").join("|")+")([\\s[(]|])",rB:!0,c:[{cN:"builtin-name",b:/\w+/}]},{cN:"built_in",v:[{b:"(\\.\\./|/|\\s)(("+s.split(" ").join("|")+");?\\s)+",r:10},{b:/\.\./}]}]}});hljs.registerLanguage("clean",function(e){return{aliases:["clean","icl","dcl"],k:{keyword:"if let in with where case of class instance otherwise implementation definition system module from import qualified as special code inline foreign export ccall stdcall generic derive infix infixl infixr",literal:"True False"},c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM,{b:"->|<-[|:]?|::|#!?|>>=|\\{\\||\\|\\}|:==|=:|\\.\\.|<>|`"}]}});hljs.registerLanguage("golo",function(e){return{k:{keyword:"println readln print import module function local return let var while for foreach times in case when match with break continue augment augmentation each find filter reduce if then else otherwise try catch finally raise throw orIfNull DynamicObject|10 DynamicVariable struct Observable map set vector list array",literal:"true false null"},c:[e.HCM,e.QSM,e.CNM,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("livescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},s="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",n=e.inherit(e.TM,{b:s}),i={cN:"subst",b:/#\{/,e:/}/,k:t},r={cN:"subst",b:/#[A-Za-z$_]/,e:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,k:t},c=[e.BNM,{cN:"number",b:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",r:0,starts:{e:"(\\s*/)?",r:0}},{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,i,r]},{b:/"/,e:/"/,c:[e.BE,i,r]},{b:/\\/,e:/(\s|$)/,eE:!0}]},{cN:"regexp",v:[{b:"//",e:"//[gim]*",c:[i,e.HCM]},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+s},{b:"``",e:"``",eB:!0,eE:!0,sL:"javascript"}];i.c=c;var a={cN:"params",b:"\\(",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(c)}]};return{aliases:["ls"],k:t,i:/\/\*/,c:c.concat([e.C("\\/\\*","\\*\\/"),e.HCM,{cN:"function",c:[n,a],rB:!0,v:[{b:"("+s+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",e:"\\->\\*?"},{b:"("+s+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",e:"[-~]{1,2}>\\*?"},{b:"("+s+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",e:"!?[-~]{1,2}>\\*?"}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[n]},n]},{b:s+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"|$)",e:">",k:{name:"style"},c:[t],starts:{e:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"|$)",e:">",k:{name:"script"},c:[t],starts:{e:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("vbscript",function(e){return{aliases:["vbs"],cI:!0,k:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},i:"//",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C(/'/,/$/,{r:0}),e.CNM]}});hljs.registerLanguage("vbscript-html",function(r){return{sL:"xml",c:[{b:"<%",e:"%>",sL:"vbscript"}]}});hljs.registerLanguage("typescript",function(e){var r={keyword:"in if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract as from extends async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void Promise"};return{aliases:["ts"],k:r,c:[{cN:"meta",b:/^\s*['"]use strict['"]/},e.ASM,e.QSM,{cN:"string",b:"`",e:"`",c:[e.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},e.CLCM,e.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+e.IR+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:e.IR},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:["self",e.CLCM,e.CBCM]}]}]}],r:0},{cN:"function",b:"function",e:/[\{;]/,eE:!0,k:r,c:["self",e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}],i:/%/,r:0},{bK:"constructor",e:/\{/,eE:!0,c:["self",{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:r,c:[e.CLCM,e.CBCM],i:/["'\(]/}]},{b:/module\./,k:{built_in:"module"},r:0},{bK:"module",e:/\{/,eE:!0},{bK:"interface",e:/\{/,eE:!0,k:"interface extends"},{b:/\$[(.]/},{b:"\\."+e.IR,r:0},{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bnf",function(e){return{c:[{cN:"attribute",b://},{b:/::=/,starts:{e:/$/,c:[{b://},e.CLCM,e.CBCM,e.ASM,e.QSM]}}]}});hljs.registerLanguage("moonscript",function(e){var t={keyword:"if then not for in while do return else elseif break continue switch and or unless when class extends super local import export from using",literal:"true false nil",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},r="[A-Za-z$_][0-9A-Za-z$_]*",s={cN:"subst",b:/#\{/,e:/}/,k:t},a=[e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'/,e:/'/,c:[e.BE]},{b:/"/,e:/"/,c:[e.BE,s]}]},{cN:"built_in",b:"@__"+e.IR},{b:"@"+e.IR},{b:e.IR+"\\\\"+e.IR}];s.c=a;var c=e.inherit(e.TM,{b:r}),n="(\\(.*\\))?\\s*\\B[-=]>",i={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:t,c:["self"].concat(a)}]};return{aliases:["moon"],k:t,i:/\/\*/,c:a.concat([e.C("--","$"),{cN:"function",b:"^\\s*"+r+"\\s*=\\s*"+n,e:"[-=]>",rB:!0,c:[c,i]},{b:/[\(,:=]\s*/,r:0,c:[{cN:"function",b:n,e:"[-=]>",rB:!0,c:[i]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[c]},c]},{cN:"name",b:r+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("fsharp",function(e){var t={b:"<",e:">",c:[e.inherit(e.TM,{b:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],k:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",i:/\/\*/,c:[{cN:"keyword",b:/\b(yield|return|let|do)!/},{cN:"string",b:'@"',e:'"',c:[{b:'""'}]},{cN:"string",b:'"""',e:'"""'},e.C("\\(\\*","\\*\\)"),{cN:"class",bK:"type",e:"\\(|=|$",eE:!0,c:[e.UTM,t]},{cN:"meta",b:"\\[<",e:">\\]",r:10},{cN:"symbol",b:"\\B('[A-Za-z])\\b",c:[e.BE]},e.CLCM,e.inherit(e.QSM,{i:null}),e.CNM]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:/<[^\n>]*>/,e:/$/,i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return and or not",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]},{cN:"class",bK:"class struct",e:/[{;:]/,c:[{b://,c:["self"]},t.TM]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("lua",function(e){var t="\\[=*\\[",a="\\]=*\\]",r={b:t,e:a,c:["self"]},n=[e.C("--(?!"+t+")","$"),e.C("--"+t,a,{c:[r],r:10})];return{l:e.UIR,k:{literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstringmodule next pairs pcall print rawequal rawget rawset require select setfenvsetmetatable tonumber tostring type unpack xpcall arg selfcoroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},c:n.concat([{cN:"function",bK:"function",e:"\\)",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{cN:"params",b:"\\(",eW:!0,c:n}].concat(n)},e.CNM,e.ASM,e.QSM,{cN:"string",b:t,e:a,c:[r],r:5}])}});hljs.registerLanguage("erlang",function(e){var r="[a-z'][a-zA-Z0-9_']*",c="("+r+":"+r+"|"+r+")",b={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.C("%","$"),n={cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},a={b:"fun\\s+"+r+"/\\d+"},d={b:c+"\\(",e:"\\)",rB:!0,r:0,c:[{b:c,r:0},{b:"\\(",e:"\\)",eW:!0,rE:!0,r:0}]},o={b:"{",e:"}",r:0},t={b:"\\b_([A-Z][A-Za-z0-9_]*)?",r:0},f={b:"[A-Z][a-zA-Z0-9_]*",r:0},l={b:"#"+e.UIR,r:0,rB:!0,c:[{b:"#"+e.UIR,r:0},{b:"{",e:"}",r:0}]},s={bK:"fun receive if try case",e:"end",k:b};s.c=[i,a,e.inherit(e.ASM,{cN:""}),s,d,e.QSM,n,o,t,f,l];var u=[i,a,s,d,e.QSM,n,o,t,f,l];d.c[1].c=u,o.c=u,l.c[1].c=u;var h={cN:"params",b:"\\(",e:"\\)",c:u};return{aliases:["erl"],k:b,i:"(",rB:!0,i:"\\(|#|//|/\\*|\\\\|:|;",c:[h,e.inherit(e.TM,{b:r})],starts:{e:";|\\.",k:b,c:u}},i,{b:"^-",e:"\\.",r:0,eE:!0,rB:!0,l:"-"+e.IR,k:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",c:[h]},n,e.QSM,l,t,f,o,{b:/\.$/}]}});hljs.registerLanguage("htmlbars",function(e){var a="action collection component concat debugger each each-in else get hash if input link-to loc log mut outlet partial query-params render textarea unbound unless with yield view",t={i:/\}\}/,b:/[a-zA-Z0-9_]+=/,rB:!0,r:0,c:[{cN:"attr",b:/[a-zA-Z0-9_]+/}]},i=({i:/\}\}/,b:/\)/,e:/\)/,c:[{b:/[a-zA-Z\.\-]+/,k:{built_in:a},starts:{eW:!0,r:0,c:[e.QSM]}}]},{eW:!0,r:0,k:{keyword:"as",built_in:a},c:[e.QSM,t,e.NM]});return{cI:!0,sL:"xml",c:[e.C("{{!(--)?","(--)?}}"),{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[{cN:"name",b:/[a-zA-Z\.\-]+/,k:{"builtin-name":a},starts:i}]},{cN:"template-variable",b:/\{\{[a-zA-Z][a-zA-Z\-]+/,e:/\}\}/,k:{keyword:"as",built_in:a},c:[e.QSM]}]}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+"|unless)\\s*",k:"unless",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",u="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",w=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+u+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(w).concat(d)}});hljs.registerLanguage("haml",function(s){return{cI:!0,c:[{cN:"meta",b:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",r:10},s.C("^\\s*(!=#|=#|-#|/).*$",!1,{r:0}),{b:"^\\s*(-|=|!=)(?!#)",starts:{e:"\\n",sL:"ruby"}},{cN:"tag",b:"^\\s*%",c:[{cN:"selector-tag",b:"\\w+"},{cN:"selector-id",b:"#[\\w-]+"},{cN:"selector-class",b:"\\.[\\w-]+"},{b:"{\\s*",e:"\\s*}",c:[{b:":\\w+\\s*=>",e:",\\s+",rB:!0,eW:!0,c:[{cN:"attr",b:":\\w+"},s.ASM,s.QSM,{b:"\\w+",r:0}]}]},{b:"\\(\\s*",e:"\\s*\\)",eE:!0,c:[{b:"\\w+\\s*=",e:"\\s+",rB:!0,eW:!0,c:[{cN:"attr",b:"\\w+",r:0},s.ASM,s.QSM,{b:"\\w+",r:0}]}]}]},{b:"^\\s*[=~]\\s*"},{b:"#{",starts:{e:"}",sL:"ruby"}}]}});hljs.registerLanguage("mizar",function(e){return{k:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",c:[e.C("::","$")]}});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("django",function(e){var t={b:/\|[A-Za-z]+:?/,k:{name:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone"},c:[e.QSM,e.ASM]};return{aliases:["jinja"],cI:!0,sL:"xml",c:[e.C(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.C(/\{#/,/#}/),{cN:"template-tag",b:/\{%/,e:/%}/,c:[{cN:"name",b:/\w+/,k:{name:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim"},starts:{eW:!0,k:"in by as",c:[t],r:0}}]},{cN:"template-variable",b:/\{\{/,e:/}}/,c:[t]}]}});hljs.registerLanguage("avrasm",function(r){return{cI:!0,l:"\\.?"+r.IR,k:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",meta:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},c:[r.CBCM,r.C(";","$",{r:0}),r.CNM,r.BNM,{cN:"number",b:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},r.QSM,{cN:"string",b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"},{cN:"symbol",b:"^[A-Za-z0-9_.$]+:"},{cN:"meta",b:"#",e:"$"},{cN:"subst",b:"@[0-9]+"}]}});hljs.registerLanguage("q",function(e){var s={keyword:"do while select delete by update from",literal:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",type:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"};return{aliases:["k","kdb"],k:s,l:/(`?)[A-Za-z0-9_]+\b/,c:[e.CLCM,e.QSM,e.CNM]}});hljs.registerLanguage("brainfuck",function(r){var n={cN:"literal",b:"[\\+\\-]",r:0};return{aliases:["bf"],c:[r.C("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{rE:!0,r:0}),{cN:"title",b:"[\\[\\]]",r:0},{cN:"string",b:"[\\.,]",r:0},{b:/\+\+|\-\-/,rB:!0,c:[n]},n]}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("excel",function(E){return{aliases:["xlsx","xls"],cI:!0,l:/[a-zA-Z][\w\.]*/,k:{built_in:"ABS ACCRINT ACCRINTM ACOS ACOSH ACOT ACOTH AGGREGATE ADDRESS AMORDEGRC AMORLINC AND ARABIC AREAS ASC ASIN ASINH ATAN ATAN2 ATANH AVEDEV AVERAGE AVERAGEA AVERAGEIF AVERAGEIFS BAHTTEXT BASE BESSELI BESSELJ BESSELK BESSELY BETADIST BETA.DIST BETAINV BETA.INV BIN2DEC BIN2HEX BIN2OCT BINOMDIST BINOM.DIST BINOM.DIST.RANGE BINOM.INV BITAND BITLSHIFT BITOR BITRSHIFT BITXOR CALL CEILING CEILING.MATH CEILING.PRECISE CELL CHAR CHIDIST CHIINV CHITEST CHISQ.DIST CHISQ.DIST.RT CHISQ.INV CHISQ.INV.RT CHISQ.TEST CHOOSE CLEAN CODE COLUMN COLUMNS COMBIN COMBINA COMPLEX CONCAT CONCATENATE CONFIDENCE CONFIDENCE.NORM CONFIDENCE.T CONVERT CORREL COS COSH COT COTH COUNT COUNTA COUNTBLANK COUNTIF COUNTIFS COUPDAYBS COUPDAYS COUPDAYSNC COUPNCD COUPNUM COUPPCD COVAR COVARIANCE.P COVARIANCE.S CRITBINOM CSC CSCH CUBEKPIMEMBER CUBEMEMBER CUBEMEMBERPROPERTY CUBERANKEDMEMBER CUBESET CUBESETCOUNT CUBEVALUE CUMIPMT CUMPRINC DATE DATEDIF DATEVALUE DAVERAGE DAY DAYS DAYS360 DB DBCS DCOUNT DCOUNTA DDB DEC2BIN DEC2HEX DEC2OCT DECIMAL DEGREES DELTA DEVSQ DGET DISC DMAX DMIN DOLLAR DOLLARDE DOLLARFR DPRODUCT DSTDEV DSTDEVP DSUM DURATION DVAR DVARP EDATE EFFECT ENCODEURL EOMONTH ERF ERF.PRECISE ERFC ERFC.PRECISE ERROR.TYPE EUROCONVERT EVEN EXACT EXP EXPON.DIST EXPONDIST FACT FACTDOUBLE FALSE|0 F.DIST FDIST F.DIST.RT FILTERXML FIND FINDB F.INV F.INV.RT FINV FISHER FISHERINV FIXED FLOOR FLOOR.MATH FLOOR.PRECISE FORECAST FORECAST.ETS FORECAST.ETS.CONFINT FORECAST.ETS.SEASONALITY FORECAST.ETS.STAT FORECAST.LINEAR FORMULATEXT FREQUENCY F.TEST FTEST FV FVSCHEDULE GAMMA GAMMA.DIST GAMMADIST GAMMA.INV GAMMAINV GAMMALN GAMMALN.PRECISE GAUSS GCD GEOMEAN GESTEP GETPIVOTDATA GROWTH HARMEAN HEX2BIN HEX2DEC HEX2OCT HLOOKUP HOUR HYPERLINK HYPGEOM.DIST HYPGEOMDIST IF|0 IFERROR IFNA IFS IMABS IMAGINARY IMARGUMENT IMCONJUGATE IMCOS IMCOSH IMCOT IMCSC IMCSCH IMDIV IMEXP IMLN IMLOG10 IMLOG2 IMPOWER IMPRODUCT IMREAL IMSEC IMSECH IMSIN IMSINH IMSQRT IMSUB IMSUM IMTAN INDEX INDIRECT INFO INT INTERCEPT INTRATE IPMT IRR ISBLANK ISERR ISERROR ISEVEN ISFORMULA ISLOGICAL ISNA ISNONTEXT ISNUMBER ISODD ISREF ISTEXT ISO.CEILING ISOWEEKNUM ISPMT JIS KURT LARGE LCM LEFT LEFTB LEN LENB LINEST LN LOG LOG10 LOGEST LOGINV LOGNORM.DIST LOGNORMDIST LOGNORM.INV LOOKUP LOWER MATCH MAX MAXA MAXIFS MDETERM MDURATION MEDIAN MID MIDBs MIN MINIFS MINA MINUTE MINVERSE MIRR MMULT MOD MODE MODE.MULT MODE.SNGL MONTH MROUND MULTINOMIAL MUNIT N NA NEGBINOM.DIST NEGBINOMDIST NETWORKDAYS NETWORKDAYS.INTL NOMINAL NORM.DIST NORMDIST NORMINV NORM.INV NORM.S.DIST NORMSDIST NORM.S.INV NORMSINV NOT NOW NPER NPV NUMBERVALUE OCT2BIN OCT2DEC OCT2HEX ODD ODDFPRICE ODDFYIELD ODDLPRICE ODDLYIELD OFFSET OR PDURATION PEARSON PERCENTILE.EXC PERCENTILE.INC PERCENTILE PERCENTRANK.EXC PERCENTRANK.INC PERCENTRANK PERMUT PERMUTATIONA PHI PHONETIC PI PMT POISSON.DIST POISSON POWER PPMT PRICE PRICEDISC PRICEMAT PROB PRODUCT PROPER PV QUARTILE QUARTILE.EXC QUARTILE.INC QUOTIENT RADIANS RAND RANDBETWEEN RANK.AVG RANK.EQ RANK RATE RECEIVED REGISTER.ID REPLACE REPLACEB REPT RIGHT RIGHTB ROMAN ROUND ROUNDDOWN ROUNDUP ROW ROWS RRI RSQ RTD SEARCH SEARCHB SEC SECH SECOND SERIESSUM SHEET SHEETS SIGN SIN SINH SKEW SKEW.P SLN SLOPE SMALL SQL.REQUEST SQRT SQRTPI STANDARDIZE STDEV STDEV.P STDEV.S STDEVA STDEVP STDEVPA STEYX SUBSTITUTE SUBTOTAL SUM SUMIF SUMIFS SUMPRODUCT SUMSQ SUMX2MY2 SUMX2PY2 SUMXMY2 SWITCH SYD T TAN TANH TBILLEQ TBILLPRICE TBILLYIELD T.DIST T.DIST.2T T.DIST.RT TDIST TEXT TEXTJOIN TIME TIMEVALUE T.INV T.INV.2T TINV TODAY TRANSPOSE TREND TRIM TRIMMEAN TRUE|0 TRUNC T.TEST TTEST TYPE UNICHAR UNICODE UPPER VALUE VAR VAR.P VAR.S VARA VARP VARPA VDB VLOOKUP WEBSERVICE WEEKDAY WEEKNUM WEIBULL WEIBULL.DIST WORKDAY WORKDAY.INTL XIRR XNPV XOR YEAR YEARFRAC YIELD YIELDDISC YIELDMAT Z.TEST ZTEST"},c:[{b:/^=/,e:/[^=]/,rE:!0,i:/=/,r:10},{cN:"symbol",b:/\b[A-Z]{1,2}\d+\b/,e:/[^\d]/,eE:!0,r:0},{cN:"symbol",b:/[A-Z]{0,2}\d*:[A-Z]{0,2}\d*/,r:0},E.BE,E.QSM,{cN:"number",b:E.NR+"(%)?",r:0},E.C(/\bN\(/,/\)/,{eB:!0,eE:!0,i:/\n/})]}});hljs.registerLanguage("aspectj",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",i="get set args call";return{k:t,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"aspect",e:/[{;=]/,eE:!0,i:/[:;"\[\]]/,c:[{bK:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UTM,{b:/\([^\)]*/,e:/[)]+/,k:t+" "+i,eE:!1}]},{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,r:0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"pointcut after before around throwing returning",e:/[)]/,eE:!1,i:/["\[\]]/,c:[{b:e.UIR+"\\s*\\(",rB:!0,c:[e.UTM]}]},{b:/[:]/,rB:!0,e:/[{;]/,r:0,eE:!1,k:t,i:/["\[\]]/,c:[{b:e.UIR+"\\s*\\(",k:t+" "+i,r:0},e.QSM]},{bK:"new throw",r:0},{cN:"function",b:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,rB:!0,e:/[{;=]/,k:t,eE:!0,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,r:0,k:t,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},e.CNM,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("yaml",function(e){var b="true false yes no null",a="^[ \\-]*",r="[a-zA-Z_][\\w\\-]*",t={cN:"attr",v:[{b:a+r+":"},{b:a+'"'+r+'":'},{b:a+"'"+r+"':"}]},c={cN:"template-variable",v:[{b:"{{",e:"}}"},{b:"%{",e:"}"}]},l={cN:"string",r:0,v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/\S+/}],c:[e.BE,c]};return{cI:!0,aliases:["yml","YAML","yaml"],c:[t,{cN:"meta",b:"^---s*$",r:10},{cN:"string",b:"[\\|>] *$",rE:!0,c:l.c,e:t.v[0].b},{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0,r:0},{cN:"type",b:"!!"+e.UIR},{cN:"meta",b:"&"+e.UIR+"$"},{cN:"meta",b:"\\*"+e.UIR+"$"},{cN:"bullet",b:"^ *-",r:0},e.HCM,{bK:b,k:{literal:b}},e.CNM,l]}});hljs.registerLanguage("tap",function(b){return{cI:!0,c:[b.HCM,{cN:"meta",v:[{b:"^TAP version (\\d+)$"},{b:"^1\\.\\.(\\d+)$"}]},{b:"(s+)?---$",e:"\\.\\.\\.$",sL:"yaml",r:0},{cN:"number",b:" (\\d+) "},{cN:"symbol",v:[{b:"^ok"},{b:"^not ok"}]}]}});hljs.registerLanguage("stan",function(e){return{c:[e.HCM,e.CLCM,e.CBCM,{b:e.UIR,l:e.UIR,k:{name:"for in while repeat until if then else",symbol:"bernoulli bernoulli_logit binomial binomial_logit beta_binomial hypergeometric categorical categorical_logit ordered_logistic neg_binomial neg_binomial_2 neg_binomial_2_log poisson poisson_log multinomial normal exp_mod_normal skew_normal student_t cauchy double_exponential logistic gumbel lognormal chi_square inv_chi_square scaled_inv_chi_square exponential inv_gamma weibull frechet rayleigh wiener pareto pareto_type_2 von_mises uniform multi_normal multi_normal_prec multi_normal_cholesky multi_gp multi_gp_cholesky multi_student_t gaussian_dlm_obs dirichlet lkj_corr lkj_corr_cholesky wishart inv_wishart","selector-tag":"int real vector simplex unit_vector ordered positive_ordered row_vector matrix cholesky_factor_corr cholesky_factor_cov corr_matrix cov_matrix",title:"functions model data parameters quantities transformed generated",literal:"true false"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0}]}});hljs.registerLanguage("ebnf",function(a){var e=a.C(/\(\*/,/\*\)/),t={cN:"attribute",b:/^[ ]*[a-zA-Z][a-zA-Z-]*([\s-]+[a-zA-Z][a-zA-Z]*)*/},r={cN:"meta",b:/\?.*\?/},b={b:/=/,e:/;/,c:[e,r,a.ASM,a.QSM]};return{i:/\S/,c:[e,t,b]}});hljs.registerLanguage("scheme",function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",r="(\\-|\\+)?\\d+([./]\\d+)?",a=r+"[+\\-]"+r+"i",i={"builtin-name":"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"},n={cN:"meta",b:"^#!",e:"$"},c={cN:"literal",b:"(#t|#f|#\\\\"+t+"|#\\\\.)"},l={cN:"number",v:[{b:r,r:0},{b:a,r:0},{b:"#b[0-1]+(/[0-1]+)?"},{b:"#o[0-7]+(/[0-7]+)?"},{b:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},s=e.QSM,o=[e.C(";","$",{r:0}),e.C("#\\|","\\|#")],u={b:t,r:0},p={cN:"symbol",b:"'"+t},d={eW:!0,r:0},m={v:[{b:/'/},{b:"`"}],c:[{b:"\\(",e:"\\)",c:["self",c,s,l,u,p]}]},g={cN:"name",b:t,l:t,k:i},h={b:/lambda/,eW:!0,rB:!0,c:[g,{b:/\(/,e:/\)/,endsParent:!0,c:[u]}]},b={v:[{b:"\\(",e:"\\)"},{b:"\\[",e:"\\]"}],c:[h,g,d]};return d.c=[c,l,s,u,p,m,b].concat(o),{i:/\S/,c:[n,l,s,p,m,b].concat(o)}});hljs.registerLanguage("mipsasm",function(s){return{cI:!0,aliases:["mips"],l:"\\.?"+s.IR,k:{meta:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .ltorg ",built_in:"$0 $1 $2 $3 $4 $5 $6 $7 $8 $9 $10 $11 $12 $13 $14 $15 $16 $17 $18 $19 $20 $21 $22 $23 $24 $25 $26 $27 $28 $29 $30 $31 zero at v0 v1 a0 a1 a2 a3 a4 a5 a6 a7 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 s0 s1 s2 s3 s4 s5 s6 s7 s8 k0 k1 gp sp fp ra $f0 $f1 $f2 $f2 $f4 $f5 $f6 $f7 $f8 $f9 $f10 $f11 $f12 $f13 $f14 $f15 $f16 $f17 $f18 $f19 $f20 $f21 $f22 $f23 $f24 $f25 $f26 $f27 $f28 $f29 $f30 $f31 Context Random EntryLo0 EntryLo1 Context PageMask Wired EntryHi HWREna BadVAddr Count Compare SR IntCtl SRSCtl SRSMap Cause EPC PRId EBase Config Config1 Config2 Config3 LLAddr Debug DEPC DESAVE CacheErr ECC ErrorEPC TagLo DataLo TagHi DataHi WatchLo WatchHi PerfCtl PerfCnt "},c:[{cN:"keyword",b:"\\b(addi?u?|andi?|b(al)?|beql?|bgez(al)?l?|bgtzl?|blezl?|bltz(al)?l?|bnel?|cl[oz]|divu?|ext|ins|j(al)?|jalr(.hb)?|jr(.hb)?|lbu?|lhu?|ll|lui|lw[lr]?|maddu?|mfhi|mflo|movn|movz|move|msubu?|mthi|mtlo|mul|multu?|nop|nor|ori?|rotrv?|sb|sc|se[bh]|sh|sllv?|slti?u?|srav?|srlv?|subu?|sw[lr]?|xori?|wsbh|abs.[sd]|add.[sd]|alnv.ps|bc1[ft]l?|c.(s?f|un|u?eq|[ou]lt|[ou]le|ngle?|seq|l[et]|ng[et]).[sd]|(ceil|floor|round|trunc).[lw].[sd]|cfc1|cvt.d.[lsw]|cvt.l.[dsw]|cvt.ps.s|cvt.s.[dlw]|cvt.s.p[lu]|cvt.w.[dls]|div.[ds]|ldx?c1|luxc1|lwx?c1|madd.[sd]|mfc1|mov[fntz]?.[ds]|msub.[sd]|mth?c1|mul.[ds]|neg.[ds]|nmadd.[ds]|nmsub.[ds]|p[lu][lu].ps|recip.fmt|r?sqrt.[ds]|sdx?c1|sub.[ds]|suxc1|swx?c1|break|cache|d?eret|[de]i|ehb|mfc0|mtc0|pause|prefx?|rdhwr|rdpgpr|sdbbp|ssnop|synci?|syscall|teqi?|tgei?u?|tlb(p|r|w[ir])|tlti?u?|tnei?|wait|wrpgpr)",e:"\\s"},s.C("[;#]","$"),s.CBCM,s.QSM,{cN:"string",b:"'",e:"[^\\\\]'",r:0},{cN:"title",b:"\\|",e:"\\|",i:"\\n",r:0},{cN:"number",v:[{b:"0x[0-9a-f]+"},{b:"\\b-?\\d+"}],r:0},{cN:"symbol",v:[{b:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{b:"^\\s*[0-9]+:"},{b:"[0-9]+[bf]"}],r:0}],i:"/"}});hljs.registerLanguage("purebasic",function(e){var r={cN:"string",b:'(~)?"',e:'"',i:"\\n"},t={cN:"symbol",b:"#[a-zA-Z_]\\w*\\$?"};return{aliases:["pb","pbi"],k:"And As Break CallDebugger Case CompilerCase CompilerDefault CompilerElse CompilerEndIf CompilerEndSelect CompilerError CompilerIf CompilerSelect Continue Data DataSection EndDataSection Debug DebugLevel Default Define Dim DisableASM DisableDebugger DisableExplicit Else ElseIf EnableASM EnableDebugger EnableExplicit End EndEnumeration EndIf EndImport EndInterface EndMacro EndProcedure EndSelect EndStructure EndStructureUnion EndWith Enumeration Extends FakeReturn For Next ForEach ForEver Global Gosub Goto If Import ImportC IncludeBinary IncludeFile IncludePath Interface Macro NewList Not Or ProcedureReturn Protected Prototype PrototypeC Read ReDim Repeat Until Restore Return Select Shared Static Step Structure StructureUnion Swap To Wend While With XIncludeFile XOr Procedure ProcedureC ProcedureCDLL ProcedureDLL Declare DeclareC DeclareCDLL DeclareDLL",c:[e.C(";","$",{r:0}),{cN:"function",b:"\\b(Procedure|Declare)(C|CDLL|DLL)?\\b",e:"\\(",eE:!0,rB:!0,c:[{cN:"keyword",b:"(Procedure|Declare)(C|CDLL|DLL)?",eE:!0},{cN:"type",b:"\\.\\w*"},e.UTM]},r,t]}});hljs.registerLanguage("jboss-cli",function(e){var a={b:/[\w-]+ *=/,rB:!0,r:0,c:[{cN:"attr",b:/[\w-]+/}]},r={cN:"params",b:/\(/,e:/\)/,c:[a],r:0},o={cN:"function",b:/:[\w\-.]+/,r:0},t={cN:"string",b:/\B(([\/.])[\w\-.\/=]+)+/},c={cN:"params",b:/--[\w\-=\/]+/};return{aliases:["wildfly-cli"],l:"[a-z-]+",k:{keyword:"alias batch cd clear command connect connection-factory connection-info data-source deploy deployment-info deployment-overlay echo echo-dmr help history if jdbc-driver-info jms-queue|20 jms-topic|20 ls patch pwd quit read-attribute read-operation reload rollout-plan run-batch set shutdown try unalias undeploy unset version xa-data-source",literal:"true false"},c:[e.HCM,e.QSM,c,o,t,r]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("tex",function(c){var e={cN:"tag",b:/\\/,r:0,c:[{cN:"name",v:[{b:/[a-zA-Zа-яА-я]+[*]?/},{b:/[^a-zA-Zа-яА-я0-9]/}],starts:{eW:!0,r:0,c:[{cN:"string",v:[{b:/\[/,e:/\]/},{b:/\{/,e:/\}/}]},{b:/\s*=\s*/,eW:!0,r:0,c:[{cN:"number",b:/-?\d*\.?\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?/}]}]}}]};return{c:[e,{cN:"formula",c:[e],r:0,v:[{b:/\$\$/,e:/\$\$/},{b:/\$/,e:/\$/}]},c.C("%","$",{r:0})]}});hljs.registerLanguage("profile",function(e){return{c:[e.CNM,{b:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",e:":",eE:!0},{b:"(ncalls|tottime|cumtime)",e:"$",k:"ncalls tottime|10 cumtime|10 filename",r:10},{b:"function calls",e:"$",c:[e.CNM],r:10},e.ASM,e.QSM,{cN:"string",b:"\\(",e:"\\)$",eB:!0,eE:!0,r:0}]}});hljs.registerLanguage("gherkin",function(e){return{aliases:["feature"],k:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",c:[{cN:"symbol",b:"\\*",r:0},{cN:"meta",b:"@[^@\\s]+"},{b:"\\|",e:"\\|\\w*$",c:[{cN:"string",b:"[^|]+"}]},{cN:"variable",b:"<",e:">"},e.HCM,{cN:"string",b:'"""',e:'"""'},e.QSM]}});hljs.registerLanguage("smalltalk",function(e){var s="[a-z][a-zA-Z0-9_]*",a={cN:"string",b:"\\$.{1}"},r={cN:"symbol",b:"#"+e.UIR};return{aliases:["st"],k:"self super nil true false thisContext",c:[e.C('"','"'),e.ASM,{cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},{b:s+":",r:0},e.CNM,r,a,{b:"\\|[ ]*"+s+"([ ]+"+s+")*[ ]*\\|",rB:!0,e:/\|/,i:/\S/,c:[{b:"(\\|[ ]*)?"+s}]},{b:"\\#\\(",e:"\\)",c:[e.ASM,a,e.CNM,r]}]}});hljs.registerLanguage("arduino",function(e){var t=e.getLanguage("cpp").exports;return{k:{keyword:"boolean byte word string String array "+t.k.keyword,built_in:"setup loop while catch for if do goto try switch case else default break continue return KeyboardController MouseController SoftwareSerial EthernetServer EthernetClient LiquidCrystal RobotControl GSMVoiceCall EthernetUDP EsploraTFT HttpClient RobotMotor WiFiClient GSMScanner FileSystem Scheduler GSMServer YunClient YunServer IPAddress GSMClient GSMModem Keyboard Ethernet Console GSMBand Esplora Stepper Process WiFiUDP GSM_SMS Mailbox USBHost Firmata PImage Client Server GSMPIN FileIO Bridge Serial EEPROM Stream Mouse Audio Servo File Task GPRS WiFi Wire TFT GSM SPI SD runShellCommandAsynchronously analogWriteResolution retrieveCallingNumber printFirmwareVersion analogReadResolution sendDigitalPortPair noListenOnLocalhost readJoystickButton setFirmwareVersion readJoystickSwitch scrollDisplayRight getVoiceCallStatus scrollDisplayLeft writeMicroseconds delayMicroseconds beginTransmission getSignalStrength runAsynchronously getAsynchronously listenOnLocalhost getCurrentCarrier readAccelerometer messageAvailable sendDigitalPorts lineFollowConfig countryNameWrite runShellCommand readStringUntil rewindDirectory readTemperature setClockDivider readLightSensor endTransmission analogReference detachInterrupt countryNameRead attachInterrupt encryptionType readBytesUntil robotNameWrite readMicrophone robotNameRead cityNameWrite userNameWrite readJoystickY readJoystickX mouseReleased openNextFile scanNetworks noInterrupts digitalWrite beginSpeaker mousePressed isActionDone mouseDragged displayLogos noAutoscroll addParameter remoteNumber getModifiers keyboardRead userNameRead waitContinue processInput parseCommand printVersion readNetworks writeMessage blinkVersion cityNameRead readMessage setDataMode parsePacket isListening setBitOrder beginPacket isDirectory motorsWrite drawCompass digitalRead clearScreen serialEvent rightToLeft setTextSize leftToRight requestFrom keyReleased compassRead analogWrite interrupts WiFiServer disconnect playMelody parseFloat autoscroll getPINUsed setPINUsed setTimeout sendAnalog readSlider analogRead beginWrite createChar motorsStop keyPressed tempoWrite readButton subnetMask debugPrint macAddress writeGreen randomSeed attachGPRS readString sendString remotePort releaseAll mouseMoved background getXChange getYChange answerCall getResult voiceCall endPacket constrain getSocket writeJSON getButton available connected findUntil readBytes exitValue readGreen writeBlue startLoop IPAddress isPressed sendSysex pauseMode gatewayIP setCursor getOemKey tuneWrite noDisplay loadImage switchPIN onRequest onReceive changePIN playFile noBuffer parseInt overflow checkPIN knobRead beginTFT bitClear updateIR bitWrite position writeRGB highByte writeRed setSpeed readBlue noStroke remoteIP transfer shutdown hangCall beginSMS endWrite attached maintain noCursor checkReg checkPUK shiftOut isValid shiftIn pulseIn connect println localIP pinMode getIMEI display noBlink process getBand running beginSD drawBMP lowByte setBand release bitRead prepare pointTo readRed setMode noFill remove listen stroke detach attach noTone exists buffer height bitSet circle config cursor random IRread setDNS endSMS getKey micros millis begin print write ready flush width isPIN blink clear press mkdir rmdir close point yield image BSSID click delay read text move peek beep rect line open seek fill size turn stop home find step tone sqrt RSSI SSID end bit tan cos sin pow map abs max min get run put",literal:"DIGITAL_MESSAGE FIRMATA_STRING ANALOG_MESSAGE REPORT_DIGITAL REPORT_ANALOG INPUT_PULLUP SET_PIN_MODE INTERNAL2V56 SYSTEM_RESET LED_BUILTIN INTERNAL1V1 SYSEX_START INTERNAL EXTERNAL DEFAULT OUTPUT INPUT HIGH LOW"},c:[t.preprocessor,e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM]}});hljs.registerLanguage("mathematica",function(e){return{aliases:["mma"],l:"(\\$|\\b)"+e.IR+"\\b",k:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber", +c:[{cN:"comment",b:/\(\*/,e:/\*\)/},e.ASM,e.QSM,e.CNM,{b:/\{/,e:/\}/,i:/:/}]}});hljs.registerLanguage("roboconf",function(a){var e="[a-zA-Z-_][^\\n{]+\\{",n={cN:"attribute",b:/[a-zA-Z-_]+/,e:/\s*:/,eE:!0,starts:{e:";",r:0,c:[{cN:"variable",b:/\.[a-zA-Z-_]+/},{cN:"keyword",b:/\(optional\)/}]}};return{aliases:["graph","instances"],cI:!0,k:"import",c:[{b:"^facet "+e,e:"}",k:"facet",c:[n,a.HCM]},{b:"^\\s*instance of "+e,e:"}",k:"name count channels instance-data instance-state instance of",i:/\S/,c:["self",n,a.HCM]},{b:"^"+e,e:"}",c:[n,a.HCM]},a.HCM]}});hljs.registerLanguage("vim",function(e){return{l:/[!#@\w]+/,k:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu go gr grepa gu gv ha helpf helpg helpt hi hid his ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf quita qa rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"synIDtrans atan2 range matcharg did_filetype asin feedkeys xor argv complete_check add getwinposx getqflist getwinposy screencol clearmatches empty extend getcmdpos mzeval garbagecollect setreg ceil sqrt diff_hlID inputsecret get getfperm getpid filewritable shiftwidth max sinh isdirectory synID system inputrestore winline atan visualmode inputlist tabpagewinnr round getregtype mapcheck hasmapto histdel argidx findfile sha256 exists toupper getcmdline taglist string getmatches bufnr strftime winwidth bufexists strtrans tabpagebuflist setcmdpos remote_read printf setloclist getpos getline bufwinnr float2nr len getcmdtype diff_filler luaeval resolve libcallnr foldclosedend reverse filter has_key bufname str2float strlen setline getcharmod setbufvar index searchpos shellescape undofile foldclosed setqflist buflisted strchars str2nr virtcol floor remove undotree remote_expr winheight gettabwinvar reltime cursor tabpagenr finddir localtime acos getloclist search tanh matchend rename gettabvar strdisplaywidth type abs py3eval setwinvar tolower wildmenumode log10 spellsuggest bufloaded synconcealed nextnonblank server2client complete settabwinvar executable input wincol setmatches getftype hlID inputsave searchpair or screenrow line settabvar histadd deepcopy strpart remote_peek and eval getftime submatch screenchar winsaveview matchadd mkdir screenattr getfontname libcall reltimestr getfsize winnr invert pow getbufline byte2line soundfold repeat fnameescape tagfiles sin strwidth spellbadword trunc maparg log lispindent hostname setpos globpath remote_foreground getchar synIDattr fnamemodify cscope_connection stridx winbufnr indent min complete_add nr2char searchpairpos inputdialog values matchlist items hlexists strridx browsedir expand fmod pathshorten line2byte argc count getwinvar glob foldtextresult getreg foreground cosh matchdelete has char2nr simplify histget searchdecl iconv winrestcmd pumvisible writefile foldlevel haslocaldir keys cos matchstr foldtext histnr tan tempname getcwd byteidx getbufvar islocked escape eventhandler remote_send serverlist winrestview synstack pyeval prevnonblank readfile cindent filereadable changenr exp"},i:/;/,c:[e.NM,e.ASM,{cN:"string",b:/"(\\"|\n\\|[^"\n])*"/},e.C('"',"$"),{cN:"variable",b:/[bwtglsav]:[\w\d_]*/},{cN:"function",bK:"function function!",e:"$",r:0,c:[e.TM,{cN:"params",b:"\\(",e:"\\)"}]},{cN:"symbol",b:/<[\w-]+>/}]}});hljs.registerLanguage("julia",function(e){var r={keyword:"in isa where baremodule begin break catch ccall const continue do else elseif end export false finally for function global if import importall let local macro module quote return true try using while type immutable abstract bitstype typealias ",literal:"true false ARGS C_NULL DevNull ENDIAN_BOM ENV I Inf Inf16 Inf32 Inf64 InsertionSort JULIA_HOME LOAD_PATH MergeSort NaN NaN16 NaN32 NaN64 PROGRAM_FILE QuickSort RoundDown RoundFromZero RoundNearest RoundNearestTiesAway RoundNearestTiesUp RoundToZero RoundUp STDERR STDIN STDOUT VERSION catalan e|0 eu|0 eulergamma golden im nothing pi γ π φ ",built_in:"ANY AbstractArray AbstractChannel AbstractFloat AbstractMatrix AbstractRNG AbstractSerializer AbstractSet AbstractSparseArray AbstractSparseMatrix AbstractSparseVector AbstractString AbstractUnitRange AbstractVecOrMat AbstractVector Any ArgumentError Array AssertionError Associative Base64DecodePipe Base64EncodePipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError BufferStream CachingPool CapturedException CartesianIndex CartesianRange Cchar Cdouble Cfloat Channel Char Cint Cintmax_t Clong Clonglong ClusterManager Cmd CodeInfo Colon Complex Complex128 Complex32 Complex64 CompositeException Condition ConjArray ConjMatrix ConjVector Cptrdiff_t Cshort Csize_t Cssize_t Cstring Cuchar Cuint Cuintmax_t Culong Culonglong Cushort Cwchar_t Cwstring DataType Date DateFormat DateTime DenseArray DenseMatrix DenseVecOrMat DenseVector Diagonal Dict DimensionMismatch Dims DirectIndexString Display DivideError DomainError EOFError EachLine Enum Enumerate ErrorException Exception ExponentialBackOff Expr Factorization FileMonitor Float16 Float32 Float64 Function Future GlobalRef GotoNode HTML Hermitian IO IOBuffer IOContext IOStream IPAddr IPv4 IPv6 IndexCartesian IndexLinear IndexStyle InexactError InitError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException InvalidStateException Irrational KeyError LabelNode LinSpace LineNumberNode LoadError LowerTriangular MIME Matrix MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode NullException Nullable Number ObjectIdDict OrdinalRange OutOfMemoryError OverflowError Pair ParseError PartialQuickSort PermutedDimsArray Pipe PollingFileWatcher ProcessExitedException Ptr QuoteNode RandomDevice Range RangeIndex Rational RawFD ReadOnlyMemoryError Real ReentrantLock Ref Regex RegexMatch RemoteChannel RemoteException RevString RoundingMode RowVector SSAValue SegmentationFault SerializationState Set SharedArray SharedMatrix SharedVector Signed SimpleVector Slot SlotNumber SparseMatrixCSC SparseVector StackFrame StackOverflowError StackTrace StepRange StepRangeLen StridedArray StridedMatrix StridedVecOrMat StridedVector String SubArray SubString SymTridiagonal Symbol Symmetric SystemError TCPSocket Task Text TextDisplay Timer Tridiagonal Tuple Type TypeError TypeMapEntry TypeMapLevel TypeName TypeVar TypedSlot UDPSocket UInt UInt128 UInt16 UInt32 UInt64 UInt8 UndefRefError UndefVarError UnicodeError UniformScaling Union UnionAll UnitRange Unsigned UpperTriangular Val Vararg VecElement VecOrMat Vector VersionNumber Void WeakKeyDict WeakRef WorkerConfig WorkerPool "},t="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",a={l:t,k:r,i:/<\//},n={cN:"number",b:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,r:0},o={cN:"string",b:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={cN:"subst",b:/\$\(/,e:/\)/,k:r},l={cN:"variable",b:"\\$"+t},c={cN:"string",c:[e.BE,i,l],v:[{b:/\w*"""/,e:/"""\w*/,r:10},{b:/\w*"/,e:/"\w*/}]},s={cN:"string",c:[e.BE,i,l],b:"`",e:"`"},d={cN:"meta",b:"@"+t},u={cN:"comment",v:[{b:"#=",e:"=#",r:10},{b:"#",e:"$"}]};return a.c=[n,o,c,s,d,u,e.HCM,{cN:"keyword",b:"\\b(((abstract|primitive)\\s+)type|(mutable\\s+)?struct)\\b"},{b:/<:/}],i.c=a.c,a});hljs.registerLanguage("julia-repl",function(a){return{c:[{cN:"meta",b:/^julia>/,r:10,starts:{e:/^(?![ ]{6})/,sL:"julia"},aliases:["jldoctest"]}]}});hljs.registerLanguage("d",function(e){var t={keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},r="(0|[1-9][\\d_]*)",a="(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)",i="0[bB][01_]+",n="([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)",_="0[xX]"+n,c="([eE][+-]?"+a+")",d="("+a+"(\\.\\d*|"+c+")|\\d+\\."+a+a+"|\\."+r+c+"?)",o="(0[xX]("+n+"\\."+n+"|\\.?"+n+")[pP][+-]?"+a+")",s="("+r+"|"+i+"|"+_+")",l="("+o+"|"+d+")",u="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",b={cN:"number",b:"\\b"+s+"(L|u|U|Lu|LU|uL|UL)?",r:0},f={cN:"number",b:"\\b("+l+"([fF]|L|i|[fF]i|Li)?|"+s+"(i|[fF]i|Li))",r:0},g={cN:"string",b:"'("+u+"|.)",e:"'",i:"."},h={b:u,r:0},p={cN:"string",b:'"',c:[h],e:'"[cwd]?'},m={cN:"string",b:'[rq]"',e:'"[cwd]?',r:5},w={cN:"string",b:"`",e:"`[cwd]?"},N={cN:"string",b:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',r:10},A={cN:"string",b:'q"\\{',e:'\\}"'},F={cN:"meta",b:"^#!",e:"$",r:5},y={cN:"meta",b:"#(line)",e:"$",r:5},L={cN:"keyword",b:"@[a-zA-Z_][a-zA-Z_\\d]*"},v=e.C("\\/\\+","\\+\\/",{c:["self"],r:10});return{l:e.UIR,k:t,c:[e.CLCM,e.CBCM,v,N,p,m,w,A,f,b,g,F,y,L]}});hljs.registerLanguage("scilab",function(e){var s=[e.CNM,{cN:"string",b:"'|\"",e:"'|\"",c:[e.BE,{b:"''"}]}];return{aliases:["sci"],l:/%?\w+/,k:{keyword:"abort break case clear catch continue do elseif else endfunction end for function global if pause return resume select try then while",literal:"%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp error exec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isempty isinfisnan isvector lasterror length load linspace list listfiles log10 log2 log max min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand real round sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tan type typename warning zeros matrix"},i:'("|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)"}]},{b:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",e:"",r:0},{b:"\\[",e:"\\]'*[\\.']*",r:0,c:s},e.C("//","$")].concat(s)}});hljs.registerLanguage("lisp",function(b){var e="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",c="\\|[^]*?\\|",r="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",a={cN:"meta",b:"^#!",e:"$"},l={cN:"literal",b:"\\b(t{1}|nil)\\b"},n={cN:"number",v:[{b:r,r:0},{b:"#(b|B)[0-1]+(/[0-1]+)?"},{b:"#(o|O)[0-7]+(/[0-7]+)?"},{b:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{b:"#(c|C)\\("+r+" +"+r,e:"\\)"}]},i=b.inherit(b.QSM,{i:null}),t=b.C(";","$",{r:0}),s={b:"\\*",e:"\\*"},u={cN:"symbol",b:"[:&]"+e},d={b:e,r:0},f={b:c},m={b:"\\(",e:"\\)",c:["self",l,i,n,d]},o={c:[n,i,s,u,m,d],v:[{b:"['`]\\(",e:"\\)"},{b:"\\(quote ",e:"\\)",k:{name:"quote"}},{b:"'"+c}]},v={v:[{b:"'"+e},{b:"#'"+e+"(::"+e+")*"}]},N={b:"\\(\\s*",e:"\\)"},A={eW:!0,r:0};return N.c=[{cN:"name",v:[{b:e},{b:c}]},A],A.c=[o,v,N,l,n,i,t,s,u,f,d],{i:/\S/,c:[n,a,l,i,t,o,v,N,d]}});hljs.registerLanguage("xquery",function(e){var t="for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",a="false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute",s={b:/\$[a-zA-Z0-9\-]+/},n={cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},r={cN:"string",v:[{b:/"/,e:/"/,c:[{b:/""/,r:0}]},{b:/'/,e:/'/,c:[{b:/''/,r:0}]}]},i={cN:"meta",b:"%\\w+"},c={cN:"comment",b:"\\(:",e:":\\)",r:10,c:[{cN:"doctag",b:"@\\w+"}]},o={b:"{",e:"}"},l=[s,r,n,c,i,o];return o.c=l,{aliases:["xpath","xq"],cI:!1,l:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,i:/(proc)|(abstract)|(extends)|(until)|(#)/,k:{keyword:t,literal:a},c:l}});hljs.registerLanguage("csp",function(r){return{cI:!1,l:"[a-zA-Z][a-zA-Z0-9_-]*",k:{keyword:"base-uri child-src connect-src default-src font-src form-action frame-ancestors frame-src img-src media-src object-src plugin-types report-uri sandbox script-src style-src"},c:[{cN:"string",b:"'",e:"'"},{cN:"attribute",b:"^Content",e:":",eE:!0}]}});hljs.registerLanguage("twig",function(e){var t={cN:"params",b:"\\(",e:"\\)"},a="attribute block constant cycle date dump include max min parent random range source template_from_string",r={bK:a,k:{name:a},r:0,c:[t]},c={b:/\|[A-Za-z_]+:?/,k:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",c:[r]},s="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return s=s+" "+s.split(" ").map(function(e){return"end"+e}).join(" "),{aliases:["craftcms"],cI:!0,sL:"xml",c:[e.C(/\{#/,/#}/),{cN:"template-tag",b:/\{%/,e:/%}/,c:[{cN:"name",b:/\w+/,k:s,starts:{eW:!0,c:[c,r],r:0}}]},{cN:"template-variable",b:/\{\{/,e:/}}/,c:["self",c,r]}]}});hljs.registerLanguage("accesslog",function(T){return{c:[{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+\\b",r:0},{cN:"string",b:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',e:'"',k:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",i:"\\n",r:10},{cN:"string",b:/\[/,e:/\]/,i:"\\n"},{cN:"string",b:'"',e:'"',i:"\\n"}]}});hljs.registerLanguage("smali",function(t){var s=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"],e=["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"],r=["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"];return{aliases:["smali"],c:[{cN:"string",b:'"',e:'"',r:0},t.C("#","$",{r:0}),{cN:"keyword",v:[{b:"\\s*\\.end\\s[a-zA-Z0-9]*"},{b:"^[ ]*\\.[a-zA-Z]*",r:0},{b:"\\s:[a-zA-Z_0-9]*",r:0},{b:"\\s("+r.join("|")+")"}]},{cN:"built_in",v:[{b:"\\s("+s.join("|")+")\\s"},{b:"\\s("+s.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",r:10},{b:"\\s("+e.join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",r:10}]},{cN:"class",b:"L[^(;:\n]*;",r:0},{b:"[vp][0-9]+"}]}});hljs.registerLanguage("rsl",function(e){return{k:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},i:"\\<:\-,()$\[\]_.{}!+%^]+)+/,r:0}]};return{aliases:["gms"],cI:!0,k:a,c:[e.C(/^\$ontext/,/^\$offtext/),{cN:"meta",b:"^\\$[a-z0-9]+",e:"$",rB:!0,c:[{cN:"meta-keyword",b:"^\\$[a-z0-9]+"}]},e.C("^\\*","$"),e.CLCM,e.CBCM,e.QSM,e.ASM,{bK:"set sets parameter parameters variable variables scalar scalars equation equations",e:";",c:[e.C("^\\*","$"),e.CLCM,e.CBCM,e.QSM,e.ASM,i,l]},{bK:"table",e:";",rB:!0,c:[{bK:"table",e:"$",c:[l]},e.C("^\\*","$"),e.CLCM,e.CBCM,e.QSM,e.ASM,e.CNM]},{cN:"function",b:/^[a-z][a-z0-9_,\-+' ()$]+\.{2}/,rB:!0,c:[{cN:"title",b:/^[a-z0-9_]+/},o,r]},e.CNM,r]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("thrift",function(e){var t="bool byte i16 i32 i64 double string binary";return{k:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},c:[e.QSM,e.NM,e.CLCM,e.CBCM,{cN:"class",bK:"struct enum service exception",e:/\{/,i:/\n/,c:[e.inherit(e.TM,{starts:{eW:!0,eE:!0}})]},{b:"\\b(set|list|map)\\s*<",e:">",k:t,c:["self"]}]}});hljs.registerLanguage("gradle",function(e){return{cI:!0,k:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.NM,e.RM]}});hljs.registerLanguage("cmake",function(e){return{aliases:["cmake.in"],cI:!0,k:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or equal less greater strless strgreater strequal matches"},c:[{cN:"variable",b:"\\${",e:"}"},e.HCM,e.QSM,e.NM]}});hljs.registerLanguage("inform7",function(e){var r="\\[",o="\\]";return{aliases:["i7"],cI:!0,k:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of dbRule"},c:[{cN:"string",b:'"',e:'"',r:0,c:[{cN:"subst",b:r,e:o}]},{cN:"section",b:/^(Volume|Book|Part|Chapter|Section|Table)\b/,e:"$"},{b:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,e:":",c:[{b:"\\(This",e:"\\)"}]},{cN:"comment",b:r,e:o,c:["self"]}]}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long nameof object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},t={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},r=e.inherit(t,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},c=e.inherit(a,{i:/\n/}),n={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,c]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},c]});a.c=[s,n,t,e.ASM,e.QSM,e.CNM,e.CBCM],c.c=[o,n,r,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,n,t,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:""}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{cN:"meta",b:"^\\s*\\[",eB:!0,e:"\\]",eE:!0,c:[{cN:"meta-string",b:/"/,e:/"/}]},{bK:"new return throw await else",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("clojure-repl",function(e){return{c:[{cN:"meta",b:/^([\w.-]+|\s*#_)=>/,starts:{e:/$/,sL:"clojure"}}]}});hljs.registerLanguage("zephir",function(e){var i={cN:"string",c:[e.BE],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},n={v:[e.BNM,e.CNM]};return{aliases:["zep"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",c:[e.CLCM,e.HCM,e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:"<<<['\"]?\\w+['\"]?$",e:"^\\w+;",c:[e.BE]},{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",e.CBCM,i,n]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},i,n]}});hljs.registerLanguage("nsis",function(e){var t={cN:"variable",b:/\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)/},i={cN:"variable",b:/\$+{[\w\.:-]+}/},n={cN:"variable",b:/\$+\w+/,i:/\(\){}/},r={cN:"variable",b:/\$+\([\w\^\.:-]+\)/},o={cN:"params",b:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},l={cN:"keyword",b:/\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)/},s={cN:"subst",b:/\$(\\[nrt]|\$)/},a={cN:"class",b:/\w+\:\:\w+/},S={cN:"string",v:[{b:'"',e:'"'},{b:"'",e:"'"},{b:"`",e:"`"}],i:/\n/,c:[s,t,i,n,r]};return{cI:!1,k:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both bottom bzip2 colored components current custom directory false force hide highest ifdiff ifnewer instfiles lastused leave left license listonly lzma nevershow none normal notset off on open print right show silent silentlog smooth textonly top true try un.components un.custom un.directory un.instfiles un.license uninstConfirm user Win10 Win7 Win8 WinVista zlib"},c:[e.HCM,e.CBCM,e.C(";","$",{r:0}),{cN:"function",bK:"Function PageEx Section SectionGroup",e:"$"},S,l,i,n,r,o,a,e.NM]}});hljs.registerLanguage("sqf",function(e){var t=e.getLanguage("cpp").exports,a={cN:"variable",b:/\b_+[a-zA-Z_]\w*/},o={cN:"title",b:/[a-zA-Z][a-zA-Z0-9]+_fnc_\w*/},r={cN:"string",v:[{b:'"',e:'"',c:[{b:'""',r:0}]},{b:"'",e:"'",c:[{b:"''",r:0}]}]};return{aliases:["sqf"],cI:!0,k:{keyword:"case catch default do else exit exitWith for forEach from if switch then throw to try waitUntil while with",built_in:"abs accTime acos action actionIDs actionKeys actionKeysImages actionKeysNames actionKeysNamesArray actionName actionParams activateAddons activatedAddons activateKey add3DENConnection add3DENEventHandler add3DENLayer addAction addBackpack addBackpackCargo addBackpackCargoGlobal addBackpackGlobal addCamShake addCuratorAddons addCuratorCameraArea addCuratorEditableObjects addCuratorEditingArea addCuratorPoints addEditorObject addEventHandler addGoggles addGroupIcon addHandgunItem addHeadgear addItem addItemCargo addItemCargoGlobal addItemPool addItemToBackpack addItemToUniform addItemToVest addLiveStats addMagazine addMagazineAmmoCargo addMagazineCargo addMagazineCargoGlobal addMagazineGlobal addMagazinePool addMagazines addMagazineTurret addMenu addMenuItem addMissionEventHandler addMPEventHandler addMusicEventHandler addOwnedMine addPlayerScores addPrimaryWeaponItem addPublicVariableEventHandler addRating addResources addScore addScoreSide addSecondaryWeaponItem addSwitchableUnit addTeamMember addToRemainsCollector addUniform addVehicle addVest addWaypoint addWeapon addWeaponCargo addWeaponCargoGlobal addWeaponGlobal addWeaponItem addWeaponPool addWeaponTurret agent agents AGLToASL aimedAtTarget aimPos airDensityRTD airportSide AISFinishHeal alive all3DENEntities allControls allCurators allCutLayers allDead allDeadMen allDisplays allGroups allMapMarkers allMines allMissionObjects allow3DMode allowCrewInImmobile allowCuratorLogicIgnoreAreas allowDamage allowDammage allowFileOperations allowFleeing allowGetIn allowSprint allPlayers allSites allTurrets allUnits allUnitsUAV allVariables ammo and animate animateDoor animateSource animationNames animationPhase animationSourcePhase animationState append apply armoryPoints arrayIntersect asin ASLToAGL ASLToATL assert assignAsCargo assignAsCargoIndex assignAsCommander assignAsDriver assignAsGunner assignAsTurret assignCurator assignedCargo assignedCommander assignedDriver assignedGunner assignedItems assignedTarget assignedTeam assignedVehicle assignedVehicleRole assignItem assignTeam assignToAirport atan atan2 atg ATLToASL attachedObject attachedObjects attachedTo attachObject attachTo attackEnabled backpack backpackCargo backpackContainer backpackItems backpackMagazines backpackSpaceFor behaviour benchmark binocular blufor boundingBox boundingBoxReal boundingCenter breakOut breakTo briefingName buildingExit buildingPos buttonAction buttonSetAction cadetMode call callExtension camCommand camCommit camCommitPrepared camCommitted camConstuctionSetParams camCreate camDestroy cameraEffect cameraEffectEnableHUD cameraInterest cameraOn cameraView campaignConfigFile camPreload camPreloaded camPrepareBank camPrepareDir camPrepareDive camPrepareFocus camPrepareFov camPrepareFovRange camPreparePos camPrepareRelPos camPrepareTarget camSetBank camSetDir camSetDive camSetFocus camSetFov camSetFovRange camSetPos camSetRelPos camSetTarget camTarget camUseNVG canAdd canAddItemToBackpack canAddItemToUniform canAddItemToVest cancelSimpleTaskDestination canFire canMove canSlingLoad canStand canSuspend canUnloadInCombat canVehicleCargo captive captiveNum cbChecked cbSetChecked ceil channelEnabled cheatsEnabled checkAIFeature checkVisibility civilian className clearAllItemsFromBackpack clearBackpackCargo clearBackpackCargoGlobal clearGroupIcons clearItemCargo clearItemCargoGlobal clearItemPool clearMagazineCargo clearMagazineCargoGlobal clearMagazinePool clearOverlay clearRadio clearWeaponCargo clearWeaponCargoGlobal clearWeaponPool clientOwner closeDialog closeDisplay closeOverlay collapseObjectTree collect3DENHistory combatMode commandArtilleryFire commandChat commander commandFire commandFollow commandFSM commandGetOut commandingMenu commandMove commandRadio commandStop commandSuppressiveFire commandTarget commandWatch comment commitOverlay compile compileFinal completedFSM composeText configClasses configFile configHierarchy configName configNull configProperties configSourceAddonList configSourceMod configSourceModList connectTerminalToUAV controlNull controlsGroupCtrl copyFromClipboard copyToClipboard copyWaypoints cos count countEnemy countFriendly countSide countType countUnknown create3DENComposition create3DENEntity createAgent createCenter createDialog createDiaryLink createDiaryRecord createDiarySubject createDisplay createGearDialog createGroup createGuardedPoint createLocation createMarker createMarkerLocal createMenu createMine createMissionDisplay createMPCampaignDisplay createSimpleObject createSimpleTask createSite createSoundSource createTask createTeam createTrigger createUnit createVehicle createVehicleCrew createVehicleLocal crew ctrlActivate ctrlAddEventHandler ctrlAngle ctrlAutoScrollDelay ctrlAutoScrollRewind ctrlAutoScrollSpeed ctrlChecked ctrlClassName ctrlCommit ctrlCommitted ctrlCreate ctrlDelete ctrlEnable ctrlEnabled ctrlFade ctrlHTMLLoaded ctrlIDC ctrlIDD ctrlMapAnimAdd ctrlMapAnimClear ctrlMapAnimCommit ctrlMapAnimDone ctrlMapCursor ctrlMapMouseOver ctrlMapScale ctrlMapScreenToWorld ctrlMapWorldToScreen ctrlModel ctrlModelDirAndUp ctrlModelScale ctrlParent ctrlParentControlsGroup ctrlPosition ctrlRemoveAllEventHandlers ctrlRemoveEventHandler ctrlScale ctrlSetActiveColor ctrlSetAngle ctrlSetAutoScrollDelay ctrlSetAutoScrollRewind ctrlSetAutoScrollSpeed ctrlSetBackgroundColor ctrlSetChecked ctrlSetEventHandler ctrlSetFade ctrlSetFocus ctrlSetFont ctrlSetFontH1 ctrlSetFontH1B ctrlSetFontH2 ctrlSetFontH2B ctrlSetFontH3 ctrlSetFontH3B ctrlSetFontH4 ctrlSetFontH4B ctrlSetFontH5 ctrlSetFontH5B ctrlSetFontH6 ctrlSetFontH6B ctrlSetFontHeight ctrlSetFontHeightH1 ctrlSetFontHeightH2 ctrlSetFontHeightH3 ctrlSetFontHeightH4 ctrlSetFontHeightH5 ctrlSetFontHeightH6 ctrlSetFontHeightSecondary ctrlSetFontP ctrlSetFontPB ctrlSetFontSecondary ctrlSetForegroundColor ctrlSetModel ctrlSetModelDirAndUp ctrlSetModelScale ctrlSetPosition ctrlSetScale ctrlSetStructuredText ctrlSetText ctrlSetTextColor ctrlSetTooltip ctrlSetTooltipColorBox ctrlSetTooltipColorShade ctrlSetTooltipColorText ctrlShow ctrlShown ctrlText ctrlTextHeight ctrlType ctrlVisible curatorAddons curatorCamera curatorCameraArea curatorCameraAreaCeiling curatorCoef curatorEditableObjects curatorEditingArea curatorEditingAreaType curatorMouseOver curatorPoints curatorRegisteredObjects curatorSelected curatorWaypointCost current3DENOperation currentChannel currentCommand currentMagazine currentMagazineDetail currentMagazineDetailTurret currentMagazineTurret currentMuzzle currentNamespace currentTask currentTasks currentThrowable currentVisionMode currentWaypoint currentWeapon currentWeaponMode currentWeaponTurret currentZeroing cursorObject cursorTarget customChat customRadio cutFadeOut cutObj cutRsc cutText damage date dateToNumber daytime deActivateKey debriefingText debugFSM debugLog deg delete3DENEntities deleteAt deleteCenter deleteCollection deleteEditorObject deleteGroup deleteIdentity deleteLocation deleteMarker deleteMarkerLocal deleteRange deleteResources deleteSite deleteStatus deleteTeam deleteVehicle deleteVehicleCrew deleteWaypoint detach detectedMines diag_activeMissionFSMs diag_activeScripts diag_activeSQFScripts diag_activeSQSScripts diag_captureFrame diag_captureSlowFrame diag_codePerformance diag_drawMode diag_enable diag_enabled diag_fps diag_fpsMin diag_frameNo diag_list diag_log diag_logSlowFrame diag_mergeConfigFile diag_recordTurretLimits diag_tickTime diag_toggle dialog diarySubjectExists didJIP didJIPOwner difficulty difficultyEnabled difficultyEnabledRTD difficultyOption direction directSay disableAI disableCollisionWith disableConversation disableDebriefingStats disableNVGEquipment disableRemoteSensors disableSerialization disableTIEquipment disableUAVConnectability disableUserInput displayAddEventHandler displayCtrl displayNull displayParent displayRemoveAllEventHandlers displayRemoveEventHandler displaySetEventHandler dissolveTeam distance distance2D distanceSqr distributionRegion do3DENAction doArtilleryFire doFire doFollow doFSM doGetOut doMove doorPhase doStop doSuppressiveFire doTarget doWatch drawArrow drawEllipse drawIcon drawIcon3D drawLine drawLine3D drawLink drawLocation drawPolygon drawRectangle driver drop east echo edit3DENMissionAttributes editObject editorSetEventHandler effectiveCommander emptyPositions enableAI enableAIFeature enableAimPrecision enableAttack enableAudioFeature enableCamShake enableCaustics enableChannel enableCollisionWith enableCopilot enableDebriefingStats enableDiagLegend enableEndDialog enableEngineArtillery enableEnvironment enableFatigue enableGunLights enableIRLasers enableMimics enablePersonTurret enableRadio enableReload enableRopeAttach enableSatNormalOnDetail enableSaving enableSentences enableSimulation enableSimulationGlobal enableStamina enableTeamSwitch enableUAVConnectability enableUAVWaypoints enableVehicleCargo endLoadingScreen endMission engineOn enginesIsOnRTD enginesRpmRTD enginesTorqueRTD entities estimatedEndServerTime estimatedTimeLeft evalObjectArgument everyBackpack everyContainer exec execEditorScript execFSM execVM exp expectedDestination exportJIPMessages eyeDirection eyePos face faction fadeMusic fadeRadio fadeSound fadeSpeech failMission fillWeaponsFromPool find findCover findDisplay findEditorObject findEmptyPosition findEmptyPositionReady findNearestEnemy finishMissionInit finite fire fireAtTarget firstBackpack flag flagOwner flagSide flagTexture fleeing floor flyInHeight flyInHeightASL fog fogForecast fogParams forceAddUniform forcedMap forceEnd forceMap forceRespawn forceSpeed forceWalk forceWeaponFire forceWeatherChange forEachMember forEachMemberAgent forEachMemberTeam format formation formationDirection formationLeader formationMembers formationPosition formationTask formatText formLeader freeLook fromEditor fuel fullCrew gearIDCAmmoCount gearSlotAmmoCount gearSlotData get3DENActionState get3DENAttribute get3DENCamera get3DENConnections get3DENEntity get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLayerEntities get3DENLinesVisible get3DENMissionAttribute get3DENMouseOver get3DENSelected getAimingCoef getAllHitPointsDamage getAllOwnedMines getAmmoCargo getAnimAimPrecision getAnimSpeedCoef getArray getArtilleryAmmo getArtilleryComputerSettings getArtilleryETA getAssignedCuratorLogic getAssignedCuratorUnit getBackpackCargo getBleedingRemaining getBurningValue getCameraViewDirection getCargoIndex getCenterOfMass getClientState getClientStateNumber getConnectedUAV getCustomAimingCoef getDammage getDescription getDir getDirVisual getDLCs getEditorCamera getEditorMode getEditorObjectScope getElevationOffset getFatigue getFriend getFSMVariable getFuelCargo getGroupIcon getGroupIconParams getGroupIcons getHideFrom getHit getHitIndex getHitPointDamage getItemCargo getMagazineCargo getMarkerColor getMarkerPos getMarkerSize getMarkerType getMass getMissionConfig getMissionConfigValue getMissionDLCs getMissionLayerEntities getModelInfo getMousePosition getNumber getObjectArgument getObjectChildren getObjectDLC getObjectMaterials getObjectProxy getObjectTextures getObjectType getObjectViewDistance getOxygenRemaining getPersonUsedDLCs getPilotCameraDirection getPilotCameraPosition getPilotCameraRotation getPilotCameraTarget getPlayerChannel getPlayerScores getPlayerUID getPos getPosASL getPosASLVisual getPosASLW getPosATL getPosATLVisual getPosVisual getPosWorld getRelDir getRelPos getRemoteSensorsDisabled getRepairCargo getResolution getShadowDistance getShotParents getSlingLoad getSpeed getStamina getStatValue getSuppression getTerrainHeightASL getText getUnitLoadout getUnitTrait getVariable getVehicleCargo getWeaponCargo getWeaponSway getWPPos glanceAt globalChat globalRadio goggles goto group groupChat groupFromNetId groupIconSelectable groupIconsVisible groupId groupOwner groupRadio groupSelectedUnits groupSelectUnit grpNull gunner gusts halt handgunItems handgunMagazine handgunWeapon handsHit hasInterface hasPilotCamera hasWeapon hcAllGroups hcGroupParams hcLeader hcRemoveAllGroups hcRemoveGroup hcSelected hcSelectGroup hcSetGroup hcShowBar hcShownBar headgear hideBody hideObject hideObjectGlobal hideSelection hint hintC hintCadet hintSilent hmd hostMission htmlLoad HUDMovementLevels humidity image importAllGroups importance in inArea inAreaArray incapacitatedState independent inflame inflamed inGameUISetEventHandler inheritsFrom initAmbientLife inPolygon inputAction inRangeOfArtillery insertEditorObject intersect is3DEN is3DENMultiplayer isAbleToBreathe isAgent isArray isAutoHoverOn isAutonomous isAutotest isBleeding isBurning isClass isCollisionLightOn isCopilotEnabled isDedicated isDLCAvailable isEngineOn isEqualTo isEqualType isEqualTypeAll isEqualTypeAny isEqualTypeArray isEqualTypeParams isFilePatchingEnabled isFlashlightOn isFlatEmpty isForcedWalk isFormationLeader isHidden isInRemainsCollector isInstructorFigureEnabled isIRLaserOn isKeyActive isKindOf isLightOn isLocalized isManualFire isMarkedForCollection isMultiplayer isMultiplayerSolo isNil isNull isNumber isObjectHidden isObjectRTD isOnRoad isPipEnabled isPlayer isRealTime isRemoteExecuted isRemoteExecutedJIP isServer isShowing3DIcons isSprintAllowed isStaminaEnabled isSteamMission isStreamFriendlyUIEnabled isText isTouchingGround isTurnedOut isTutHintsEnabled isUAVConnectable isUAVConnected isUniformAllowed isVehicleCargo isWalking isWeaponDeployed isWeaponRested itemCargo items itemsWithMagazines join joinAs joinAsSilent joinSilent joinString kbAddDatabase kbAddDatabaseTargets kbAddTopic kbHasTopic kbReact kbRemoveTopic kbTell kbWasSaid keyImage keyName knowsAbout land landAt landResult language laserTarget lbAdd lbClear lbColor lbCurSel lbData lbDelete lbIsSelected lbPicture lbSelection lbSetColor lbSetCurSel lbSetData lbSetPicture lbSetPictureColor lbSetPictureColorDisabled lbSetPictureColorSelected lbSetSelectColor lbSetSelectColorRight lbSetSelected lbSetTooltip lbSetValue lbSize lbSort lbSortByValue lbText lbValue leader leaderboardDeInit leaderboardGetRows leaderboardInit leaveVehicle libraryCredits libraryDisclaimers lifeState lightAttachObject lightDetachObject lightIsOn lightnings limitSpeed linearConversion lineBreak lineIntersects lineIntersectsObjs lineIntersectsSurfaces lineIntersectsWith linkItem list listObjects ln lnbAddArray lnbAddColumn lnbAddRow lnbClear lnbColor lnbCurSelRow lnbData lnbDeleteColumn lnbDeleteRow lnbGetColumnsPosition lnbPicture lnbSetColor lnbSetColumnsPos lnbSetCurSelRow lnbSetData lnbSetPicture lnbSetText lnbSetValue lnbSize lnbText lnbValue load loadAbs loadBackpack loadFile loadGame loadIdentity loadMagazine loadOverlay loadStatus loadUniform loadVest local localize locationNull locationPosition lock lockCameraTo lockCargo lockDriver locked lockedCargo lockedDriver lockedTurret lockIdentity lockTurret lockWP log logEntities logNetwork logNetworkTerminate lookAt lookAtPos magazineCargo magazines magazinesAllTurrets magazinesAmmo magazinesAmmoCargo magazinesAmmoFull magazinesDetail magazinesDetailBackpack magazinesDetailUniform magazinesDetailVest magazinesTurret magazineTurretAmmo mapAnimAdd mapAnimClear mapAnimCommit mapAnimDone mapCenterOnCamera mapGridPosition markAsFinishedOnSteam markerAlpha markerBrush markerColor markerDir markerPos markerShape markerSize markerText markerType max members menuAction menuAdd menuChecked menuClear menuCollapse menuData menuDelete menuEnable menuEnabled menuExpand menuHover menuPicture menuSetAction menuSetCheck menuSetData menuSetPicture menuSetValue menuShortcut menuShortcutText menuSize menuSort menuText menuURL menuValue min mineActive mineDetectedBy missionConfigFile missionDifficulty missionName missionNamespace missionStart missionVersion mod modelToWorld modelToWorldVisual modParams moonIntensity moonPhase morale move move3DENCamera moveInAny moveInCargo moveInCommander moveInDriver moveInGunner moveInTurret moveObjectToEnd moveOut moveTime moveTo moveToCompleted moveToFailed musicVolume name nameSound nearEntities nearestBuilding nearestLocation nearestLocations nearestLocationWithDubbing nearestObject nearestObjects nearestTerrainObjects nearObjects nearObjectsReady nearRoads nearSupplies nearTargets needReload netId netObjNull newOverlay nextMenuItemIndex nextWeatherChange nMenuItems not numberToDate objectCurators objectFromNetId objectParent objNull objStatus onBriefingGroup onBriefingNotes onBriefingPlan onBriefingTeamSwitch onCommandModeChanged onDoubleClick onEachFrame onGroupIconClick onGroupIconOverEnter onGroupIconOverLeave onHCGroupSelectionChanged onMapSingleClick onPlayerConnected onPlayerDisconnected onPreloadFinished onPreloadStarted onShowNewObject onTeamSwitch openCuratorInterface openDLCPage openMap openYoutubeVideo opfor or orderGetIn overcast overcastForecast owner param params parseNumber parseText parsingNamespace particlesQuality pi pickWeaponPool pitch pixelGrid pixelGridBase pixelGridNoUIScale pixelH pixelW playableSlotsNumber playableUnits playAction playActionNow player playerRespawnTime playerSide playersNumber playGesture playMission playMove playMoveNow playMusic playScriptedMission playSound playSound3D position positionCameraToWorld posScreenToWorld posWorldToScreen ppEffectAdjust ppEffectCommit ppEffectCommitted ppEffectCreate ppEffectDestroy ppEffectEnable ppEffectEnabled ppEffectForceInNVG precision preloadCamera preloadObject preloadSound preloadTitleObj preloadTitleRsc preprocessFile preprocessFileLineNumbers primaryWeapon primaryWeaponItems primaryWeaponMagazine priority private processDiaryLink productVersion profileName profileNamespace profileNameSteam progressLoadingScreen progressPosition progressSetPosition publicVariable publicVariableClient publicVariableServer pushBack pushBackUnique putWeaponPool queryItemsPool queryMagazinePool queryWeaponPool rad radioChannelAdd radioChannelCreate radioChannelRemove radioChannelSetCallSign radioChannelSetLabel radioVolume rain rainbow random rank rankId rating rectangular registeredTasks registerTask reload reloadEnabled remoteControl remoteExec remoteExecCall remove3DENConnection remove3DENEventHandler remove3DENLayer removeAction removeAll3DENEventHandlers removeAllActions removeAllAssignedItems removeAllContainers removeAllCuratorAddons removeAllCuratorCameraAreas removeAllCuratorEditingAreas removeAllEventHandlers removeAllHandgunItems removeAllItems removeAllItemsWithMagazines removeAllMissionEventHandlers removeAllMPEventHandlers removeAllMusicEventHandlers removeAllOwnedMines removeAllPrimaryWeaponItems removeAllWeapons removeBackpack removeBackpackGlobal removeCuratorAddons removeCuratorCameraArea removeCuratorEditableObjects removeCuratorEditingArea removeDrawIcon removeDrawLinks removeEventHandler removeFromRemainsCollector removeGoggles removeGroupIcon removeHandgunItem removeHeadgear removeItem removeItemFromBackpack removeItemFromUniform removeItemFromVest removeItems removeMagazine removeMagazineGlobal removeMagazines removeMagazinesTurret removeMagazineTurret removeMenuItem removeMissionEventHandler removeMPEventHandler removeMusicEventHandler removeOwnedMine removePrimaryWeaponItem removeSecondaryWeaponItem removeSimpleTask removeSwitchableUnit removeTeamMember removeUniform removeVest removeWeapon removeWeaponGlobal removeWeaponTurret requiredVersion resetCamShake resetSubgroupDirection resistance resize resources respawnVehicle restartEditorCamera reveal revealMine reverse reversedMouseY roadAt roadsConnectedTo roleDescription ropeAttachedObjects ropeAttachedTo ropeAttachEnabled ropeAttachTo ropeCreate ropeCut ropeDestroy ropeDetach ropeEndPosition ropeLength ropes ropeUnwind ropeUnwound rotorsForcesRTD rotorsRpmRTD round runInitScript safeZoneH safeZoneW safeZoneWAbs safeZoneX safeZoneXAbs safeZoneY save3DENInventory saveGame saveIdentity saveJoysticks saveOverlay saveProfileNamespace saveStatus saveVar savingEnabled say say2D say3D scopeName score scoreSide screenshot screenToWorld scriptDone scriptName scriptNull scudState secondaryWeapon secondaryWeaponItems secondaryWeaponMagazine select selectBestPlaces selectDiarySubject selectedEditorObjects selectEditorObject selectionNames selectionPosition selectLeader selectMax selectMin selectNoPlayer selectPlayer selectRandom selectWeapon selectWeaponTurret sendAUMessage sendSimpleCommand sendTask sendTaskResult sendUDPMessage serverCommand serverCommandAvailable serverCommandExecutable serverName serverTime set set3DENAttribute set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLayer set3DENLinesVisible set3DENMissionAttributes set3DENModelsVisible set3DENObjectType set3DENSelected setAccTime setAirportSide setAmmo setAmmoCargo setAnimSpeedCoef setAperture setApertureNew setArmoryPoints setAttributes setAutonomous setBehaviour setBleedingRemaining setCameraInterest setCamShakeDefParams setCamShakeParams setCamUseTi setCaptive setCenterOfMass setCollisionLight setCombatMode setCompassOscillation setCuratorCameraAreaCeiling setCuratorCoef setCuratorEditingAreaType setCuratorWaypointCost setCurrentChannel setCurrentTask setCurrentWaypoint setCustomAimCoef setDamage setDammage setDate setDebriefingText setDefaultCamera setDestination setDetailMapBlendPars setDir setDirection setDrawIcon setDropInterval setEditorMode setEditorObjectScope setEffectCondition setFace setFaceAnimation setFatigue setFlagOwner setFlagSide setFlagTexture setFog setFormation setFormationTask setFormDir setFriend setFromEditor setFSMVariable setFuel setFuelCargo setGroupIcon setGroupIconParams setGroupIconsSelectable setGroupIconsVisible setGroupId setGroupIdGlobal setGroupOwner setGusts setHideBehind setHit setHitIndex setHitPointDamage setHorizonParallaxCoef setHUDMovementLevels setIdentity setImportance setLeader setLightAmbient setLightAttenuation setLightBrightness setLightColor setLightDayLight setLightFlareMaxDistance setLightFlareSize setLightIntensity setLightnings setLightUseFlare setLocalWindParams setMagazineTurretAmmo setMarkerAlpha setMarkerAlphaLocal setMarkerBrush setMarkerBrushLocal setMarkerColor setMarkerColorLocal setMarkerDir setMarkerDirLocal setMarkerPos setMarkerPosLocal setMarkerShape setMarkerShapeLocal setMarkerSize setMarkerSizeLocal setMarkerText setMarkerTextLocal setMarkerType setMarkerTypeLocal setMass setMimic setMousePosition setMusicEffect setMusicEventHandler setName setNameSound setObjectArguments setObjectMaterial setObjectMaterialGlobal setObjectProxy setObjectTexture setObjectTextureGlobal setObjectViewDistance setOvercast setOwner setOxygenRemaining setParticleCircle setParticleClass setParticleFire setParticleParams setParticleRandom setPilotCameraDirection setPilotCameraRotation setPilotCameraTarget setPilotLight setPiPEffect setPitch setPlayable setPlayerRespawnTime setPos setPosASL setPosASL2 setPosASLW setPosATL setPosition setPosWorld setRadioMsg setRain setRainbow setRandomLip setRank setRectangular setRepairCargo setShadowDistance setShotParents setSide setSimpleTaskAlwaysVisible setSimpleTaskCustomData setSimpleTaskDescription setSimpleTaskDestination setSimpleTaskTarget setSimpleTaskType setSimulWeatherLayers setSize setSkill setSlingLoad setSoundEffect setSpeaker setSpeech setSpeedMode setStamina setStaminaScheme setStatValue setSuppression setSystemOfUnits setTargetAge setTaskResult setTaskState setTerrainGrid setText setTimeMultiplier setTitleEffect setTriggerActivation setTriggerArea setTriggerStatements setTriggerText setTriggerTimeout setTriggerType setType setUnconscious setUnitAbility setUnitLoadout setUnitPos setUnitPosWeak setUnitRank setUnitRecoilCoefficient setUnitTrait setUnloadInCombat setUserActionText setVariable setVectorDir setVectorDirAndUp setVectorUp setVehicleAmmo setVehicleAmmoDef setVehicleArmor setVehicleCargo setVehicleId setVehicleLock setVehiclePosition setVehicleTiPars setVehicleVarName setVelocity setVelocityTransformation setViewDistance setVisibleIfTreeCollapsed setWaves setWaypointBehaviour setWaypointCombatMode setWaypointCompletionRadius setWaypointDescription setWaypointForceBehaviour setWaypointFormation setWaypointHousePosition setWaypointLoiterRadius setWaypointLoiterType setWaypointName setWaypointPosition setWaypointScript setWaypointSpeed setWaypointStatements setWaypointTimeout setWaypointType setWaypointVisible setWeaponReloadingTime setWind setWindDir setWindForce setWindStr setWPPos show3DIcons showChat showCinemaBorder showCommandingMenu showCompass showCuratorCompass showGPS showHUD showLegend showMap shownArtilleryComputer shownChat shownCompass shownCuratorCompass showNewEditorObject shownGPS shownHUD shownMap shownPad shownRadio shownScoretable shownUAVFeed shownWarrant shownWatch showPad showRadio showScoretable showSubtitles showUAVFeed showWarrant showWatch showWaypoint showWaypoints side sideAmbientLife sideChat sideEmpty sideEnemy sideFriendly sideLogic sideRadio sideUnknown simpleTasks simulationEnabled simulCloudDensity simulCloudOcclusion simulInClouds simulWeatherSync sin size sizeOf skill skillFinal skipTime sleep sliderPosition sliderRange sliderSetPosition sliderSetRange sliderSetSpeed sliderSpeed slingLoadAssistantShown soldierMagazines someAmmo sort soundVolume spawn speaker speed speedMode splitString sqrt squadParams stance startLoadingScreen step stop stopEngineRTD stopped str sunOrMoon supportInfo suppressFor surfaceIsWater surfaceNormal surfaceType swimInDepth switchableUnits switchAction switchCamera switchGesture switchLight switchMove synchronizedObjects synchronizedTriggers synchronizedWaypoints synchronizeObjectsAdd synchronizeObjectsRemove synchronizeTrigger synchronizeWaypoint systemChat systemOfUnits tan targetKnowledge targetsAggregate targetsQuery taskAlwaysVisible taskChildren taskCompleted taskCustomData taskDescription taskDestination taskHint taskMarkerOffset taskNull taskParent taskResult taskState taskType teamMember teamMemberNull teamName teams teamSwitch teamSwitchEnabled teamType terminate terrainIntersect terrainIntersectASL text textLog textLogFormat tg time timeMultiplier titleCut titleFadeOut titleObj titleRsc titleText toArray toFixed toLower toString toUpper triggerActivated triggerActivation triggerArea triggerAttachedVehicle triggerAttachObject triggerAttachVehicle triggerStatements triggerText triggerTimeout triggerTimeoutCurrent triggerType turretLocal turretOwner turretUnit tvAdd tvClear tvCollapse tvCount tvCurSel tvData tvDelete tvExpand tvPicture tvSetCurSel tvSetData tvSetPicture tvSetPictureColor tvSetPictureColorDisabled tvSetPictureColorSelected tvSetPictureRight tvSetPictureRightColor tvSetPictureRightColorDisabled tvSetPictureRightColorSelected tvSetText tvSetTooltip tvSetValue tvSort tvSortByValue tvText tvTooltip tvValue type typeName typeOf UAVControl uiNamespace uiSleep unassignCurator unassignItem unassignTeam unassignVehicle underwater uniform uniformContainer uniformItems uniformMagazines unitAddons unitAimPosition unitAimPositionVisual unitBackpack unitIsUAV unitPos unitReady unitRecoilCoefficient units unitsBelowHeight unlinkItem unlockAchievement unregisterTask updateDrawIcon updateMenuItem updateObjectTree useAISteeringComponent useAudioTimeForMoves vectorAdd vectorCos vectorCrossProduct vectorDiff vectorDir vectorDirVisual vectorDistance vectorDistanceSqr vectorDotProduct vectorFromTo vectorMagnitude vectorMagnitudeSqr vectorMultiply vectorNormalized vectorUp vectorUpVisual vehicle vehicleCargoEnabled vehicleChat vehicleRadio vehicles vehicleVarName velocity velocityModelSpace verifySignature vest vestContainer vestItems vestMagazines viewDistance visibleCompass visibleGPS visibleMap visiblePosition visiblePositionASL visibleScoretable visibleWatch waves waypointAttachedObject waypointAttachedVehicle waypointAttachObject waypointAttachVehicle waypointBehaviour waypointCombatMode waypointCompletionRadius waypointDescription waypointForceBehaviour waypointFormation waypointHousePosition waypointLoiterRadius waypointLoiterType waypointName waypointPosition waypoints waypointScript waypointsEnabledUAV waypointShow waypointSpeed waypointStatements waypointTimeout waypointTimeoutCurrent waypointType waypointVisible weaponAccessories weaponAccessoriesCargo weaponCargo weaponDirection weaponInertia weaponLowered weapons weaponsItems weaponsItemsCargo weaponState weaponsTurret weightRTD west WFSideText wind",literal:"true false nil"},c:[e.CLCM,e.CBCM,e.NM,a,o,r,t.preprocessor],i:/#/}});hljs.registerLanguage("dsconfig",function(e){var i={cN:"string",b:/"/,e:/"/},r={cN:"string",b:/'/,e:/'/},s={cN:"string",b:"[\\w-?]+:\\w+",e:"\\W",r:0},t={cN:"string",b:"\\w+-?\\w+",e:"\\W",r:0};return{k:"dsconfig",c:[{cN:"keyword",b:"^dsconfig",e:"\\s",eE:!0,r:10},{cN:"built_in",b:"(list|create|get|set|delete)-(\\w+)",e:"\\s",eE:!0,i:"!@#$%^&*()",r:10},{cN:"built_in",b:"--(\\w+)",e:"\\s",eE:!0},i,r,s,t,e.HCM]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:""},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});hljs.registerLanguage("erb",function(e){return{sL:"xml",c:[e.C("<%#","%>"),{b:"<%[%=-]?",e:"[%-]?%>",sL:"ruby",eB:!0,eE:!0}]}});hljs.registerLanguage("gauss",function(e){var t={keyword:"and bool break call callexe checkinterrupt clear clearg closeall cls comlog compile continue create debug declare delete disable dlibrary dllcall do dos ed edit else elseif enable end endfor endif endp endo errorlog errorlogat expr external fn for format goto gosub graph if keyword let lib library line load loadarray loadexe loadf loadk loadm loadp loads loadx local locate loopnextindex lprint lpwidth lshow matrix msym ndpclex new not open or output outwidth plot plotsym pop prcsn print printdos proc push retp return rndcon rndmod rndmult rndseed run save saveall screen scroll setarray show sparse stop string struct system trace trap threadfor threadendfor threadbegin threadjoin threadstat threadend until use while winprint",built_in:"abs acf aconcat aeye amax amean AmericanBinomCall AmericanBinomCall_Greeks AmericanBinomCall_ImpVol AmericanBinomPut AmericanBinomPut_Greeks AmericanBinomPut_ImpVol AmericanBSCall AmericanBSCall_Greeks AmericanBSCall_ImpVol AmericanBSPut AmericanBSPut_Greeks AmericanBSPut_ImpVol amin amult annotationGetDefaults annotationSetBkd annotationSetFont annotationSetLineColor annotationSetLineStyle annotationSetLineThickness annualTradingDays arccos arcsin areshape arrayalloc arrayindex arrayinit arraytomat asciiload asclabel astd astds asum atan atan2 atranspose axmargin balance band bandchol bandcholsol bandltsol bandrv bandsolpd bar base10 begwind besselj bessely beta box boxcox cdfBeta cdfBetaInv cdfBinomial cdfBinomialInv cdfBvn cdfBvn2 cdfBvn2e cdfCauchy cdfCauchyInv cdfChic cdfChii cdfChinc cdfChincInv cdfExp cdfExpInv cdfFc cdfFnc cdfFncInv cdfGam cdfGenPareto cdfHyperGeo cdfLaplace cdfLaplaceInv cdfLogistic cdfLogisticInv cdfmControlCreate cdfMvn cdfMvn2e cdfMvnce cdfMvne cdfMvt2e cdfMvtce cdfMvte cdfN cdfN2 cdfNc cdfNegBinomial cdfNegBinomialInv cdfNi cdfPoisson cdfPoissonInv cdfRayleigh cdfRayleighInv cdfTc cdfTci cdfTnc cdfTvn cdfWeibull cdfWeibullInv cdir ceil ChangeDir chdir chiBarSquare chol choldn cholsol cholup chrs close code cols colsf combinate combinated complex con cond conj cons ConScore contour conv convertsatostr convertstrtosa corrm corrms corrvc corrx corrxs cos cosh counts countwts crossprd crout croutp csrcol csrlin csvReadM csvReadSA cumprodc cumsumc curve cvtos datacreate datacreatecomplex datalist dataload dataloop dataopen datasave date datestr datestring datestrymd dayinyr dayofweek dbAddDatabase dbClose dbCommit dbCreateQuery dbExecQuery dbGetConnectOptions dbGetDatabaseName dbGetDriverName dbGetDrivers dbGetHostName dbGetLastErrorNum dbGetLastErrorText dbGetNumericalPrecPolicy dbGetPassword dbGetPort dbGetTableHeaders dbGetTables dbGetUserName dbHasFeature dbIsDriverAvailable dbIsOpen dbIsOpenError dbOpen dbQueryBindValue dbQueryClear dbQueryCols dbQueryExecPrepared dbQueryFetchAllM dbQueryFetchAllSA dbQueryFetchOneM dbQueryFetchOneSA dbQueryFinish dbQueryGetBoundValue dbQueryGetBoundValues dbQueryGetField dbQueryGetLastErrorNum dbQueryGetLastErrorText dbQueryGetLastInsertID dbQueryGetLastQuery dbQueryGetPosition dbQueryIsActive dbQueryIsForwardOnly dbQueryIsNull dbQueryIsSelect dbQueryIsValid dbQueryPrepare dbQueryRows dbQuerySeek dbQuerySeekFirst dbQuerySeekLast dbQuerySeekNext dbQuerySeekPrevious dbQuerySetForwardOnly dbRemoveDatabase dbRollback dbSetConnectOptions dbSetDatabaseName dbSetHostName dbSetNumericalPrecPolicy dbSetPort dbSetUserName dbTransaction DeleteFile delif delrows denseToSp denseToSpRE denToZero design det detl dfft dffti diag diagrv digamma doswin DOSWinCloseall DOSWinOpen dotfeq dotfeqmt dotfge dotfgemt dotfgt dotfgtmt dotfle dotflemt dotflt dotfltmt dotfne dotfnemt draw drop dsCreate dstat dstatmt dstatmtControlCreate dtdate dtday dttime dttodtv dttostr dttoutc dtvnormal dtvtodt dtvtoutc dummy dummybr dummydn eig eigh eighv eigv elapsedTradingDays endwind envget eof eqSolve eqSolvemt eqSolvemtControlCreate eqSolvemtOutCreate eqSolveset erf erfc erfccplx erfcplx error etdays ethsec etstr EuropeanBinomCall EuropeanBinomCall_Greeks EuropeanBinomCall_ImpVol EuropeanBinomPut EuropeanBinomPut_Greeks EuropeanBinomPut_ImpVol EuropeanBSCall EuropeanBSCall_Greeks EuropeanBSCall_ImpVol EuropeanBSPut EuropeanBSPut_Greeks EuropeanBSPut_ImpVol exctsmpl exec execbg exp extern eye fcheckerr fclearerr feq feqmt fflush fft ffti fftm fftmi fftn fge fgemt fgets fgetsa fgetsat fgetst fgt fgtmt fileinfo filesa fle flemt floor flt fltmt fmod fne fnemt fonts fopen formatcv formatnv fputs fputst fseek fstrerror ftell ftocv ftos ftostrC gamma gammacplx gammaii gausset gdaAppend gdaCreate gdaDStat gdaDStatMat gdaGetIndex gdaGetName gdaGetNames gdaGetOrders gdaGetType gdaGetTypes gdaGetVarInfo gdaIsCplx gdaLoad gdaPack gdaRead gdaReadByIndex gdaReadSome gdaReadSparse gdaReadStruct gdaReportVarInfo gdaSave gdaUpdate gdaUpdateAndPack gdaVars gdaWrite gdaWrite32 gdaWriteSome getarray getdims getf getGAUSShome getmatrix getmatrix4D getname getnamef getNextTradingDay getNextWeekDay getnr getorders getpath getPreviousTradingDay getPreviousWeekDay getRow getscalar3D getscalar4D getTrRow getwind glm gradcplx gradMT gradMTm gradMTT gradMTTm gradp graphprt graphset hasimag header headermt hess hessMT hessMTg hessMTgw hessMTm hessMTmw hessMTT hessMTTg hessMTTgw hessMTTm hessMTw hessp hist histf histp hsec imag indcv indexcat indices indices2 indicesf indicesfn indnv indsav integrate1d integrateControlCreate intgrat2 intgrat3 inthp1 inthp2 inthp3 inthp4 inthpControlCreate intquad1 intquad2 intquad3 intrleav intrleavsa intrsect intsimp inv invpd invswp iscplx iscplxf isden isinfnanmiss ismiss key keyav keyw lag lag1 lagn lapEighb lapEighi lapEighvb lapEighvi lapgEig lapgEigh lapgEighv lapgEigv lapgSchur lapgSvdcst lapgSvds lapgSvdst lapSvdcusv lapSvds lapSvdusv ldlp ldlsol linSolve listwise ln lncdfbvn lncdfbvn2 lncdfmvn lncdfn lncdfn2 lncdfnc lnfact lngammacplx lnpdfmvn lnpdfmvt lnpdfn lnpdft loadd loadstruct loadwind loess loessmt loessmtControlCreate log loglog logx logy lower lowmat lowmat1 ltrisol lu lusol machEpsilon make makevars makewind margin matalloc matinit mattoarray maxbytes maxc maxindc maxv maxvec mbesselei mbesselei0 mbesselei1 mbesseli mbesseli0 mbesseli1 meanc median mergeby mergevar minc minindc minv miss missex missrv moment momentd movingave movingaveExpwgt movingaveWgt nextindex nextn nextnevn nextwind ntos null null1 numCombinations ols olsmt olsmtControlCreate olsqr olsqr2 olsqrmt ones optn optnevn orth outtyp pacf packedToSp packr parse pause pdfCauchy pdfChi pdfExp pdfGenPareto pdfHyperGeo pdfLaplace pdfLogistic pdfn pdfPoisson pdfRayleigh pdfWeibull pi pinv pinvmt plotAddArrow plotAddBar plotAddBox plotAddHist plotAddHistF plotAddHistP plotAddPolar plotAddScatter plotAddShape plotAddTextbox plotAddTS plotAddXY plotArea plotBar plotBox plotClearLayout plotContour plotCustomLayout plotGetDefaults plotHist plotHistF plotHistP plotLayout plotLogLog plotLogX plotLogY plotOpenWindow plotPolar plotSave plotScatter plotSetAxesPen plotSetBar plotSetBarFill plotSetBarStacked plotSetBkdColor plotSetFill plotSetGrid plotSetLegend plotSetLineColor plotSetLineStyle plotSetLineSymbol plotSetLineThickness plotSetNewWindow plotSetTitle plotSetWhichYAxis plotSetXAxisShow plotSetXLabel plotSetXRange plotSetXTicInterval plotSetXTicLabel plotSetYAxisShow plotSetYLabel plotSetYRange plotSetZAxisShow plotSetZLabel plotSurface plotTS plotXY polar polychar polyeval polygamma polyint polymake polymat polymroot polymult polyroot pqgwin previousindex princomp printfm printfmt prodc psi putarray putf putvals pvCreate pvGetIndex pvGetParNames pvGetParVector pvLength pvList pvPack pvPacki pvPackm pvPackmi pvPacks pvPacksi pvPacksm pvPacksmi pvPutParVector pvTest pvUnpack QNewton QNewtonmt QNewtonmtControlCreate QNewtonmtOutCreate QNewtonSet QProg QProgmt QProgmtInCreate qqr qqre qqrep qr qre qrep qrsol qrtsol qtyr qtyre qtyrep quantile quantiled qyr qyre qyrep qz rank rankindx readr real reclassify reclassifyCuts recode recserar recsercp recserrc rerun rescale reshape rets rev rfft rffti rfftip rfftn rfftnp rfftp rndBernoulli rndBeta rndBinomial rndCauchy rndChiSquare rndCon rndCreateState rndExp rndGamma rndGeo rndGumbel rndHyperGeo rndi rndKMbeta rndKMgam rndKMi rndKMn rndKMnb rndKMp rndKMu rndKMvm rndLaplace rndLCbeta rndLCgam rndLCi rndLCn rndLCnb rndLCp rndLCu rndLCvm rndLogNorm rndMTu rndMVn rndMVt rndn rndnb rndNegBinomial rndp rndPoisson rndRayleigh rndStateSkip rndu rndvm rndWeibull rndWishart rotater round rows rowsf rref sampleData satostrC saved saveStruct savewind scale scale3d scalerr scalinfnanmiss scalmiss schtoc schur searchsourcepath seekr select selif seqa seqm setdif setdifsa setvars setvwrmode setwind shell shiftr sin singleindex sinh sleep solpd sortc sortcc sortd sorthc sorthcc sortind sortindc sortmc sortr sortrc spBiconjGradSol spChol spConjGradSol spCreate spDenseSubmat spDiagRvMat spEigv spEye spLDL spline spLU spNumNZE spOnes spreadSheetReadM spreadSheetReadSA spreadSheetWrite spScale spSubmat spToDense spTrTDense spTScalar spZeros sqpSolve sqpSolveMT sqpSolveMTControlCreate sqpSolveMTlagrangeCreate sqpSolveMToutCreate sqpSolveSet sqrt statements stdc stdsc stocv stof strcombine strindx strlen strput strrindx strsect strsplit strsplitPad strtodt strtof strtofcplx strtriml strtrimr strtrunc strtruncl strtruncpad strtruncr submat subscat substute subvec sumc sumr surface svd svd1 svd2 svdcusv svds svdusv sysstate tab tan tanh tempname threadBegin threadEnd threadEndFor threadFor threadJoin threadStat time timedt timestr timeutc title tkf2eps tkf2ps tocart todaydt toeplitz token topolar trapchk trigamma trimr trunc type typecv typef union unionsa uniqindx uniqindxsa unique uniquesa upmat upmat1 upper utctodt utctodtv utrisol vals varCovMS varCovXS varget vargetl varmall varmares varput varputl vartypef vcm vcms vcx vcxs vec vech vecr vector vget view viewxyz vlist vnamecv volume vput vread vtypecv wait waitc walkindex where window writer xlabel xlsGetSheetCount xlsGetSheetSize xlsGetSheetTypes xlsMakeRange xlsReadM xlsReadSA xlsWrite xlsWriteM xlsWriteSA xpnd xtics xy xyz ylabel ytics zeros zeta zlabel ztics cdfEmpirical dot h5create h5open h5read h5readAttribute h5write h5writeAttribute ldl plotAddErrorBar plotAddSurface plotCDFEmpirical plotSetColormap plotSetContourLabels plotSetLegendFont plotSetTextInterpreter plotSetXTicCount plotSetYTicCount plotSetZLevels powerm strjoin strtrim sylvester",literal:"DB_AFTER_LAST_ROW DB_ALL_TABLES DB_BATCH_OPERATIONS DB_BEFORE_FIRST_ROW DB_BLOB DB_EVENT_NOTIFICATIONS DB_FINISH_QUERY DB_HIGH_PRECISION DB_LAST_INSERT_ID DB_LOW_PRECISION_DOUBLE DB_LOW_PRECISION_INT32 DB_LOW_PRECISION_INT64 DB_LOW_PRECISION_NUMBERS DB_MULTIPLE_RESULT_SETS DB_NAMED_PLACEHOLDERS DB_POSITIONAL_PLACEHOLDERS DB_PREPARED_QUERIES DB_QUERY_SIZE DB_SIMPLE_LOCKING DB_SYSTEM_TABLES DB_TABLES DB_TRANSACTIONS DB_UNICODE DB_VIEWS"},a={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"define definecs|10 undef ifdef ifndef iflight ifdllcall ifmac ifos2win ifunix else endif lineson linesoff srcfile srcline"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[{cN:"meta-string",b:'"',e:'"',i:"\\n"}]},e.CLCM,e.CBCM]},r=e.UIR+"\\s*\\(?",o=[{cN:"params",b:/\(/,e:/\)/,k:t,r:0,c:[e.CNM,e.CLCM,e.CBCM]}];return{aliases:["gss"],cI:!0,k:t,i:"(\\{[%#]|[%#]\\})",c:[e.CNM,e.CLCM,e.CBCM,e.C("@","@"),a,{cN:"string",b:'"',e:'"',c:[e.BE]},{cN:"function",bK:"proc keyword",e:";",eE:!0,k:t,c:[{b:r,rB:!0,c:[e.UTM],r:0},e.CNM,e.CLCM,e.CBCM,a].concat(o)},{cN:"function",bK:"fn",e:";",eE:!0,k:t,c:[{b:r+e.IR+"\\)?\\s*\\=\\s*",rB:!0,c:[e.UTM],r:0},e.CNM,e.CLCM,e.CBCM].concat(o)},{cN:"function",b:"\\bexternal (proc|keyword|fn)\\s+",e:";",eE:!0,k:t,c:[{b:r,rB:!0,c:[e.UTM],r:0},e.CLCM,e.CBCM]},{cN:"function",b:"\\bexternal (matrix|string|array|sparse matrix|struct "+e.IR+")\\s+",e:";",eE:!0,k:t,c:[e.CLCM,e.CBCM]}]}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:""}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("handlebars",function(e){var a={"builtin-name":"each in with if else unless bindattr action collection debugger log outlet template unbound view yield"};return{aliases:["hbs","html.hbs","html.handlebars"],cI:!0,sL:"xml",c:[e.C("{{!(--)?","(--)?}}"),{cN:"template-tag",b:/\{\{[#\/]/,e:/\}\}/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,k:a,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{\{/,e:/\}\}/,k:a}]}});hljs.registerLanguage("mercury",function(e){var i={keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",meta:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},r=e.C("%","$"),t={cN:"number",b:"0'.\\|0[box][0-9a-fA-F]*"},_=e.inherit(e.ASM,{r:0}),n=e.inherit(e.QSM,{r:0}),a={cN:"subst",b:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",r:0};n.c.push(a);var o={cN:"built_in",v:[{b:"<=>"},{b:"<=",r:0},{b:"=>",r:0},{b:"/\\\\"},{b:"\\\\/"}]},l={cN:"built_in",v:[{b:":-\\|-->"},{b:"=",r:0}]};return{aliases:["m","moo"],k:i,c:[o,l,r,e.CBCM,t,e.NM,_,n,{b:/:-/}]}});hljs.registerLanguage("dns",function(d){return{aliases:["bind","zone"],k:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},c:[d.C(";","$",{r:0}),{cN:"meta",b:/^\$(TTL|GENERATE|INCLUDE|ORIGIN)\b/},{cN:"number",b:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))\\b"},{cN:"number",b:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\\b"},d.inherit(d.NM,{b:/\b\d+[dhwm]?/})]}});hljs.registerLanguage("pony",function(e){var r={keyword:"actor addressof and as be break class compile_error compile_intrinsicconsume continue delegate digestof do else elseif embed end errorfor fun if ifdef in interface is isnt lambda let match new not objector primitive recover repeat return struct then trait try type until use var where while with xor",meta:"iso val tag trn box ref",literal:"this false true"},t={cN:"string",b:'"""',e:'"""',r:10},c={cN:"string",b:'"',e:'"',c:[e.BE]},i={cN:"string",b:"'",e:"'",c:[e.BE],r:0},n={cN:"type",b:"\\b_?[A-Z][\\w]*",r:0},s={b:e.IR+"'",r:0},a={cN:"class",bK:"class actor",e:"$",c:[e.TM,e.CLCM]},o={cN:"function",bK:"new fun",e:"=>",c:[e.TM,{b:/\(/,e:/\)/,c:[n,s,e.CNM,e.CBCM]},{b:/:/,eW:!0,c:[n]},e.CLCM]};return{k:r,c:[a,o,n,t,c,i,s,e.CNM,e.CLCM,e.CBCM]}});hljs.registerLanguage("leaf",function(e){return{c:[{cN:"function",b:"#+[A-Za-z_0-9]*\\(",e:" {",rB:!0,eE:!0,c:[{cN:"keyword",b:"#+"},{cN:"title",b:"[A-Za-z_][A-Za-z_0-9]*"},{cN:"params",b:"\\(",e:"\\)",endsParent:!0,c:[{cN:"string",b:'"',e:'"'},{cN:"variable",b:"[A-Za-z_][A-Za-z_0-9]*"}]}]}]}});hljs.registerLanguage("dust",function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],cI:!0,sL:"xml",c:[{cN:"template-tag",b:/\{[#\/]/,e:/\}/,i:/;/,c:[{cN:"name",b:/[a-zA-Z\.-]+/,starts:{eW:!0,r:0,c:[e.QSM]}}]},{cN:"template-variable",b:/\{/,e:/\}/,i:/;/,k:t}]}});hljs.registerLanguage("erlang-repl",function(e){return{k:{built_in:"spawn spawn_link self",keyword:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},c:[{cN:"meta",b:"^[0-9]+> ",r:10},e.C("%","$"),{cN:"number",b:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",r:0},e.ASM,e.QSM,{b:"\\?(::)?([A-Z]\\w*(::)?)+"},{b:"->"},{b:"ok"},{b:"!"},{b:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",r:0},{b:"[A-Z][a-zA-Z0-9_']*",r:0}]}});hljs.registerLanguage("r",function(e){var r="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{c:[e.HCM,{b:r,l:r,k:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},r:0},{cN:"number",b:"0[xX][0-9a-fA-F]+[Li]?\\b",r:0},{cN:"number",b:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",r:0},{cN:"number",b:"\\d+\\.(?!\\d)(?:i\\b)?",r:0},{cN:"number",b:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{cN:"number",b:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",r:0},{b:"`",e:"`",r:0},{cN:"string",c:[e.BE],v:[{b:'"',e:'"'},{b:"'",e:"'"}]}]}});hljs.registerLanguage("delphi",function(e){var r="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure absolute reintroduce operator as is abstract alias assembler bitpacked break continue cppdecl cvar enumerator experimental platform deprecated unimplemented dynamic export far16 forward generic helper implements interrupt iochecks local name nodefault noreturn nostackframe oldfpccall otherwise saveregisters softfloat specialize strict unaligned varargs ",t=[e.CLCM,e.C(/\{/,/\}/,{r:0}),e.C(/\(\*/,/\*\)/,{r:10})],a={cN:"meta",v:[{b:/\{\$/,e:/\}/},{b:/\(\*\$/,e:/\*\)/}]},c={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]},i={cN:"string",b:/(#\d+)+/},o={b:e.IR+"\\s*=\\s*class\\s*\\(",rB:!0,c:[e.TM]},n={cN:"function",bK:"function constructor destructor procedure",e:/[:;]/,k:"function constructor|10 destructor|10 procedure|10",c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:r,c:[c,i,a].concat(t)},a].concat(t)};return{aliases:["dpr","dfm","pas","pascal","freepascal","lazarus","lpr","lfm"],cI:!0,k:r,i:/"|\$[G-Zg-z]|\/\*|<\/|\|/,c:[c,i,e.NM,o,n,a].concat(t)}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("dart",function(e){var t={cN:"subst",b:"\\$\\{",e:"}",k:"true false null this is new super"},r={cN:"string",v:[{b:"r'''",e:"'''"},{b:'r"""',e:'"""'},{b:"r'",e:"'",i:"\\n"},{b:'r"',e:'"',i:"\\n"},{b:"'''",e:"'''",c:[e.BE,t]},{b:'"""',e:'"""',c:[e.BE,t]},{b:"'",e:"'",i:"\\n",c:[e.BE,t]},{b:'"',e:'"',i:"\\n",c:[e.BE,t]}]};t.c=[e.CNM,r];var n={keyword:"assert async await break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch sync this throw true try var void while with yield abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"};return{k:n,c:[r,e.C("/\\*\\*","\\*/",{sL:"markdown"}),e.C("///","$",{sL:"markdown"}),e.CLCM,e.CBCM,{cN:"class",bK:"class interface",e:"{",eE:!0,c:[{bK:"extends implements"},e.UTM]},e.CNM,{cN:"meta",b:"@[A-Za-z]+"},{b:"=>"}]}});hljs.registerLanguage("step21",function(e){var i="[A-Z_][A-Z0-9_.]*",r={keyword:"HEADER ENDSEC DATA"},t={cN:"meta",b:"ISO-10303-21;",r:10},n={cN:"meta",b:"END-ISO-10303-21;",r:10};return{aliases:["p21","step","stp"],cI:!0,l:i,k:r,c:[t,n,e.CLCM,e.CBCM,e.C("/\\*\\*!","\\*/"),e.CNM,e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null}),{cN:"string",b:"'",e:"'"},{cN:"symbol",v:[{b:"#",e:"\\d+",i:"\\W"}]}]}});hljs.registerLanguage("cos",function(e){var t={cN:"string",v:[{b:'"',e:'"',c:[{b:'""',r:0}]}]},r={cN:"number",b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)",r:0},s="property parameter class classmethod clientmethod extends as break catch close continue do d|0 else elseif for goto halt hang h|0 if job j|0 kill k|0 lock l|0 merge new open quit q|0 read r|0 return set s|0 tcommit throw trollback try tstart use view while write w|0 xecute x|0 zkill znspace zn ztrap zwrite zw zzdump zzwrite print zbreak zinsert zload zprint zremove zsave zzprint mv mvcall mvcrt mvdim mvprint zquit zsync ascii";return{cI:!0,aliases:["cos","cls"],k:s,c:[r,t,e.CLCM,e.CBCM,{cN:"comment",b:/;/,e:"$",r:0},{cN:"built_in",b:/(?:\$\$?|\.\.)\^?[a-zA-Z]+/},{cN:"built_in",b:/\$\$\$[a-zA-Z]+/},{cN:"built_in",b:/%[a-z]+(?:\.[a-z]+)*/},{cN:"symbol",b:/\^%?[a-zA-Z][\w]*/},{cN:"keyword",b:/##class|##super|#define|#dim/},{b:/&sql\(/,e:/\)/,eB:!0,eE:!0,sL:"sql"},{b:/&(js|jscript|javascript)/,eB:!0,eE:!0,sL:"javascript"},{b:/&html<\s*\s*>/,sL:"xml"}]}});hljs.registerLanguage("maxima",function(e){var t="if then else elseif for thru do while unless step in and or not",a="true false unknown inf minf ind und %e %i %pi %phi %gamma",r=" abasep abs absint absolute_real_time acos acosh acot acoth acsc acsch activate addcol add_edge add_edges addmatrices addrow add_vertex add_vertices adjacency_matrix adjoin adjoint af agd airy airy_ai airy_bi airy_dai airy_dbi algsys alg_type alias allroots alphacharp alphanumericp amortization %and annuity_fv annuity_pv antid antidiff AntiDifference append appendfile apply apply1 apply2 applyb1 apropos args arit_amortization arithmetic arithsum array arrayapply arrayinfo arraymake arraysetapply ascii asec asech asin asinh askinteger asksign assoc assoc_legendre_p assoc_legendre_q assume assume_external_byte_order asympa at atan atan2 atanh atensimp atom atvalue augcoefmatrix augmented_lagrangian_method av average_degree backtrace bars barsplot barsplot_description base64 base64_decode bashindices batch batchload bc2 bdvac belln benefit_cost bern bernpoly bernstein_approx bernstein_expand bernstein_poly bessel bessel_i bessel_j bessel_k bessel_simplify bessel_y beta beta_incomplete beta_incomplete_generalized beta_incomplete_regularized bezout bfallroots bffac bf_find_root bf_fmin_cobyla bfhzeta bfloat bfloatp bfpsi bfpsi0 bfzeta biconnected_components bimetric binomial bipartition block blockmatrixp bode_gain bode_phase bothcoef box boxplot boxplot_description break bug_report build_info|10 buildq build_sample burn cabs canform canten cardinality carg cartan cartesian_product catch cauchy_matrix cbffac cdf_bernoulli cdf_beta cdf_binomial cdf_cauchy cdf_chi2 cdf_continuous_uniform cdf_discrete_uniform cdf_exp cdf_f cdf_gamma cdf_general_finite_discrete cdf_geometric cdf_gumbel cdf_hypergeometric cdf_laplace cdf_logistic cdf_lognormal cdf_negative_binomial cdf_noncentral_chi2 cdf_noncentral_student_t cdf_normal cdf_pareto cdf_poisson cdf_rank_sum cdf_rayleigh cdf_signed_rank cdf_student_t cdf_weibull cdisplay ceiling central_moment cequal cequalignore cf cfdisrep cfexpand cgeodesic cgreaterp cgreaterpignore changename changevar chaosgame charat charfun charfun2 charlist charp charpoly chdir chebyshev_t chebyshev_u checkdiv check_overlaps chinese cholesky christof chromatic_index chromatic_number cint circulant_graph clear_edge_weight clear_rules clear_vertex_label clebsch_gordan clebsch_graph clessp clesspignore close closefile cmetric coeff coefmatrix cograd col collapse collectterms columnop columnspace columnswap columnvector combination combine comp2pui compare compfile compile compile_file complement_graph complete_bipartite_graph complete_graph complex_number_p components compose_functions concan concat conjugate conmetderiv connected_components connect_vertices cons constant constantp constituent constvalue cont2part content continuous_freq contortion contour_plot contract contract_edge contragrad contrib_ode convert coord copy copy_file copy_graph copylist copymatrix cor cos cosh cot coth cov cov1 covdiff covect covers crc24sum create_graph create_list csc csch csetup cspline ctaylor ct_coordsys ctransform ctranspose cube_graph cuboctahedron_graph cunlisp cv cycle_digraph cycle_graph cylindrical days360 dblint deactivate declare declare_constvalue declare_dimensions declare_fundamental_dimensions declare_fundamental_units declare_qty declare_translated declare_unit_conversion declare_units declare_weights decsym defcon define define_alt_display define_variable defint defmatch defrule defstruct deftaylor degree_sequence del delete deleten delta demo demoivre denom depends derivdegree derivlist describe desolve determinant dfloat dgauss_a dgauss_b dgeev dgemm dgeqrf dgesv dgesvd diag diagmatrix diag_matrix diagmatrixp diameter diff digitcharp dimacs_export dimacs_import dimension dimensionless dimensions dimensions_as_list direct directory discrete_freq disjoin disjointp disolate disp dispcon dispform dispfun dispJordan display disprule dispterms distrib divide divisors divsum dkummer_m dkummer_u dlange dodecahedron_graph dotproduct dotsimp dpart draw draw2d draw3d drawdf draw_file draw_graph dscalar echelon edge_coloring edge_connectivity edges eigens_by_jacobi eigenvalues eigenvectors eighth einstein eivals eivects elapsed_real_time elapsed_run_time ele2comp ele2polynome ele2pui elem elementp elevation_grid elim elim_allbut eliminate eliminate_using ellipse elliptic_e elliptic_ec elliptic_eu elliptic_f elliptic_kc elliptic_pi ematrix empty_graph emptyp endcons entermatrix entertensor entier equal equalp equiv_classes erf erfc erf_generalized erfi errcatch error errormsg errors euler ev eval_string evenp every evolution evolution2d evundiff example exp expand expandwrt expandwrt_factored expint expintegral_chi expintegral_ci expintegral_e expintegral_e1 expintegral_ei expintegral_e_simplify expintegral_li expintegral_shi expintegral_si explicit explose exponentialize express expt exsec extdiff extract_linear_equations extremal_subset ezgcd %f f90 facsum factcomb factor factorfacsum factorial factorout factorsum facts fast_central_elements fast_linsolve fasttimes featurep fernfale fft fib fibtophi fifth filename_merge file_search file_type fillarray findde find_root find_root_abs find_root_error find_root_rel first fix flatten flength float floatnump floor flower_snark flush flush1deriv flushd flushnd flush_output fmin_cobyla forget fortran fourcos fourexpand fourier fourier_elim fourint fourintcos fourintsin foursimp foursin fourth fposition frame_bracket freeof freshline fresnel_c fresnel_s from_adjacency_matrix frucht_graph full_listify fullmap fullmapl fullratsimp fullratsubst fullsetify funcsolve fundamental_dimensions fundamental_units fundef funmake funp fv g0 g1 gamma gamma_greek gamma_incomplete gamma_incomplete_generalized gamma_incomplete_regularized gauss gauss_a gauss_b gaussprob gcd gcdex gcdivide gcfac gcfactor gd generalized_lambert_w genfact gen_laguerre genmatrix gensym geo_amortization geo_annuity_fv geo_annuity_pv geomap geometric geometric_mean geosum get getcurrentdirectory get_edge_weight getenv get_lu_factors get_output_stream_string get_pixel get_plot_option get_tex_environment get_tex_environment_default get_vertex_label gfactor gfactorsum ggf girth global_variances gn gnuplot_close gnuplot_replot gnuplot_reset gnuplot_restart gnuplot_start go Gosper GosperSum gr2d gr3d gradef gramschmidt graph6_decode graph6_encode graph6_export graph6_import graph_center graph_charpoly graph_eigenvalues graph_flow graph_order graph_periphery graph_product graph_size graph_union great_rhombicosidodecahedron_graph great_rhombicuboctahedron_graph grid_graph grind grobner_basis grotzch_graph hamilton_cycle hamilton_path hankel hankel_1 hankel_2 harmonic harmonic_mean hav heawood_graph hermite hessian hgfred hilbertmap hilbert_matrix hipow histogram histogram_description hodge horner hypergeometric i0 i1 %ibes ic1 ic2 ic_convert ichr1 ichr2 icosahedron_graph icosidodecahedron_graph icurvature ident identfor identity idiff idim idummy ieqn %if ifactors iframes ifs igcdex igeodesic_coords ilt image imagpart imetric implicit implicit_derivative implicit_plot indexed_tensor indices induced_subgraph inferencep inference_result infix info_display init_atensor init_ctensor in_neighbors innerproduct inpart inprod inrt integerp integer_partitions integrate intersect intersection intervalp intopois intosum invariant1 invariant2 inverse_fft inverse_jacobi_cd inverse_jacobi_cn inverse_jacobi_cs inverse_jacobi_dc inverse_jacobi_dn inverse_jacobi_ds inverse_jacobi_nc inverse_jacobi_nd inverse_jacobi_ns inverse_jacobi_sc inverse_jacobi_sd inverse_jacobi_sn invert invert_by_adjoint invert_by_lu inv_mod irr is is_biconnected is_bipartite is_connected is_digraph is_edge_in_graph is_graph is_graph_or_digraph ishow is_isomorphic isolate isomorphism is_planar isqrt isreal_p is_sconnected is_tree is_vertex_in_graph items_inference %j j0 j1 jacobi jacobian jacobi_cd jacobi_cn jacobi_cs jacobi_dc jacobi_dn jacobi_ds jacobi_nc jacobi_nd jacobi_ns jacobi_p jacobi_sc jacobi_sd jacobi_sn JF jn join jordan julia julia_set julia_sin %k kdels kdelta kill killcontext kostka kron_delta kronecker_product kummer_m kummer_u kurtosis kurtosis_bernoulli kurtosis_beta kurtosis_binomial kurtosis_chi2 kurtosis_continuous_uniform kurtosis_discrete_uniform kurtosis_exp kurtosis_f kurtosis_gamma kurtosis_general_finite_discrete kurtosis_geometric kurtosis_gumbel kurtosis_hypergeometric kurtosis_laplace kurtosis_logistic kurtosis_lognormal kurtosis_negative_binomial kurtosis_noncentral_chi2 kurtosis_noncentral_student_t kurtosis_normal kurtosis_pareto kurtosis_poisson kurtosis_rayleigh kurtosis_student_t kurtosis_weibull label labels lagrange laguerre lambda lambert_w laplace laplacian_matrix last lbfgs lc2kdt lcharp lc_l lcm lc_u ldefint ldisp ldisplay legendre_p legendre_q leinstein length let letrules letsimp levi_civita lfreeof lgtreillis lhs li liediff limit Lindstedt linear linearinterpol linear_program linear_regression line_graph linsolve listarray list_correlations listify list_matrix_entries list_nc_monomials listoftens listofvars listp lmax lmin load loadfile local locate_matrix_entry log logcontract log_gamma lopow lorentz_gauge lowercasep lpart lratsubst lreduce lriemann lsquares_estimates lsquares_estimates_approximate lsquares_estimates_exact lsquares_mse lsquares_residual_mse lsquares_residuals lsum ltreillis lu_backsub lucas lu_factor %m macroexpand macroexpand1 make_array makebox makefact makegamma make_graph make_level_picture makelist makeOrders make_poly_continent make_poly_country make_polygon make_random_state make_rgb_picture makeset make_string_input_stream make_string_output_stream make_transform mandelbrot mandelbrot_set map mapatom maplist matchdeclare matchfix mat_cond mat_fullunblocker mat_function mathml_display mat_norm matrix matrixmap matrixp matrix_size mattrace mat_trace mat_unblocker max max_clique max_degree max_flow maximize_lp max_independent_set max_matching maybe md5sum mean mean_bernoulli mean_beta mean_binomial mean_chi2 mean_continuous_uniform mean_deviation mean_discrete_uniform mean_exp mean_f mean_gamma mean_general_finite_discrete mean_geometric mean_gumbel mean_hypergeometric mean_laplace mean_logistic mean_lognormal mean_negative_binomial mean_noncentral_chi2 mean_noncentral_student_t mean_normal mean_pareto mean_poisson mean_rayleigh mean_student_t mean_weibull median median_deviation member mesh metricexpandall mgf1_sha1 min min_degree min_edge_cut minfactorial minimalPoly minimize_lp minimum_spanning_tree minor minpack_lsquares minpack_solve min_vertex_cover min_vertex_cut mkdir mnewton mod mode_declare mode_identity ModeMatrix moebius mon2schur mono monomial_dimensions multibernstein_poly multi_display_for_texinfo multi_elem multinomial multinomial_coeff multi_orbit multiplot_mode multi_pui multsym multthru mycielski_graph nary natural_unit nc_degree ncexpt ncharpoly negative_picture neighbors new newcontext newdet new_graph newline newton new_variable next_prime nicedummies niceindices ninth nofix nonarray noncentral_moment nonmetricity nonnegintegerp nonscalarp nonzeroandfreeof notequal nounify nptetrad npv nroots nterms ntermst nthroot nullity nullspace num numbered_boundaries numberp number_to_octets num_distinct_partitions numerval numfactor num_partitions nusum nzeta nzetai nzetar octets_to_number octets_to_oid odd_girth oddp ode2 ode_check odelin oid_to_octets op opena opena_binary openr openr_binary openw openw_binary operatorp opsubst optimize %or orbit orbits ordergreat ordergreatp orderless orderlessp orthogonal_complement orthopoly_recur orthopoly_weight outermap out_neighbors outofpois pade parabolic_cylinder_d parametric parametric_surface parg parGosper parse_string parse_timedate part part2cont partfrac partition partition_set partpol path_digraph path_graph pathname_directory pathname_name pathname_type pdf_bernoulli pdf_beta pdf_binomial pdf_cauchy pdf_chi2 pdf_continuous_uniform pdf_discrete_uniform pdf_exp pdf_f pdf_gamma pdf_general_finite_discrete pdf_geometric pdf_gumbel pdf_hypergeometric pdf_laplace pdf_logistic pdf_lognormal pdf_negative_binomial pdf_noncentral_chi2 pdf_noncentral_student_t pdf_normal pdf_pareto pdf_poisson pdf_rank_sum pdf_rayleigh pdf_signed_rank pdf_student_t pdf_weibull pearson_skewness permanent permut permutation permutations petersen_graph petrov pickapart picture_equalp picturep piechart piechart_description planar_embedding playback plog plot2d plot3d plotdf ploteq plsquares pochhammer points poisdiff poisexpt poisint poismap poisplus poissimp poissubst poistimes poistrim polar polarform polartorect polar_to_xy poly_add poly_buchberger poly_buchberger_criterion poly_colon_ideal poly_content polydecomp poly_depends_p poly_elimination_ideal poly_exact_divide poly_expand poly_expt poly_gcd polygon poly_grobner poly_grobner_equal poly_grobner_member poly_grobner_subsetp poly_ideal_intersection poly_ideal_polysaturation poly_ideal_polysaturation1 poly_ideal_saturation poly_ideal_saturation1 poly_lcm poly_minimization polymod poly_multiply polynome2ele polynomialp poly_normal_form poly_normalize poly_normalize_list poly_polysaturation_extension poly_primitive_part poly_pseudo_divide poly_reduced_grobner poly_reduction poly_saturation_extension poly_s_polynomial poly_subtract polytocompanion pop postfix potential power_mod powerseries powerset prefix prev_prime primep primes principal_components print printf printfile print_graph printpois printprops prodrac product properties propvars psi psubst ptriangularize pui pui2comp pui2ele pui2polynome pui_direct puireduc push put pv qput qrange qty quad_control quad_qag quad_qagi quad_qagp quad_qags quad_qawc quad_qawf quad_qawo quad_qaws quadrilateral quantile quantile_bernoulli quantile_beta quantile_binomial quantile_cauchy quantile_chi2 quantile_continuous_uniform quantile_discrete_uniform quantile_exp quantile_f quantile_gamma quantile_general_finite_discrete quantile_geometric quantile_gumbel quantile_hypergeometric quantile_laplace quantile_logistic quantile_lognormal quantile_negative_binomial quantile_noncentral_chi2 quantile_noncentral_student_t quantile_normal quantile_pareto quantile_poisson quantile_rayleigh quantile_student_t quantile_weibull quartile_skewness quit qunit quotient racah_v racah_w radcan radius random random_bernoulli random_beta random_binomial random_bipartite_graph random_cauchy random_chi2 random_continuous_uniform random_digraph random_discrete_uniform random_exp random_f random_gamma random_general_finite_discrete random_geometric random_graph random_graph1 random_gumbel random_hypergeometric random_laplace random_logistic random_lognormal random_negative_binomial random_network random_noncentral_chi2 random_noncentral_student_t random_normal random_pareto random_permutation random_poisson random_rayleigh random_regular_graph random_student_t random_tournament random_tree random_weibull range rank rat ratcoef ratdenom ratdiff ratdisrep ratexpand ratinterpol rational rationalize ratnumer ratnump ratp ratsimp ratsubst ratvars ratweight read read_array read_binary_array read_binary_list read_binary_matrix readbyte readchar read_hashed_array readline read_list read_matrix read_nested_list readonly read_xpm real_imagpart_to_conjugate realpart realroots rearray rectangle rectform rectform_log_if_constant recttopolar rediff reduce_consts reduce_order region region_boundaries region_boundaries_plus rem remainder remarray rembox remcomps remcon remcoord remfun remfunction remlet remove remove_constvalue remove_dimensions remove_edge remove_fundamental_dimensions remove_fundamental_units remove_plot_option remove_vertex rempart remrule remsym remvalue rename rename_file reset reset_displays residue resolvante resolvante_alternee1 resolvante_bipartite resolvante_diedrale resolvante_klein resolvante_klein3 resolvante_produit_sym resolvante_unitaire resolvante_vierer rest resultant return reveal reverse revert revert2 rgb2level rhs ricci riemann rinvariant risch rk rmdir rncombine romberg room rootscontract round row rowop rowswap rreduce run_testsuite %s save saving scalarp scaled_bessel_i scaled_bessel_i0 scaled_bessel_i1 scalefactors scanmap scatterplot scatterplot_description scene schur2comp sconcat scopy scsimp scurvature sdowncase sec sech second sequal sequalignore set_alt_display setdifference set_draw_defaults set_edge_weight setelmx setequalp setify setp set_partitions set_plot_option set_prompt set_random_state set_tex_environment set_tex_environment_default setunits setup_autoload set_up_dot_simplifications set_vertex_label seventh sexplode sf sha1sum sha256sum shortest_path shortest_weighted_path show showcomps showratvars sierpinskiale sierpinskimap sign signum similaritytransform simp_inequality simplify_sum simplode simpmetderiv simtran sin sinh sinsert sinvertcase sixth skewness skewness_bernoulli skewness_beta skewness_binomial skewness_chi2 skewness_continuous_uniform skewness_discrete_uniform skewness_exp skewness_f skewness_gamma skewness_general_finite_discrete skewness_geometric skewness_gumbel skewness_hypergeometric skewness_laplace skewness_logistic skewness_lognormal skewness_negative_binomial skewness_noncentral_chi2 skewness_noncentral_student_t skewness_normal skewness_pareto skewness_poisson skewness_rayleigh skewness_student_t skewness_weibull slength smake small_rhombicosidodecahedron_graph small_rhombicuboctahedron_graph smax smin smismatch snowmap snub_cube_graph snub_dodecahedron_graph solve solve_rec solve_rec_rat some somrac sort sparse6_decode sparse6_encode sparse6_export sparse6_import specint spherical spherical_bessel_j spherical_bessel_y spherical_hankel1 spherical_hankel2 spherical_harmonic spherical_to_xyz splice split sposition sprint sqfr sqrt sqrtdenest sremove sremovefirst sreverse ssearch ssort sstatus ssubst ssubstfirst staircase standardize standardize_inverse_trig starplot starplot_description status std std1 std_bernoulli std_beta std_binomial std_chi2 std_continuous_uniform std_discrete_uniform std_exp std_f std_gamma std_general_finite_discrete std_geometric std_gumbel std_hypergeometric std_laplace std_logistic std_lognormal std_negative_binomial std_noncentral_chi2 std_noncentral_student_t std_normal std_pareto std_poisson std_rayleigh std_student_t std_weibull stemplot stirling stirling1 stirling2 strim striml strimr string stringout stringp strong_components struve_h struve_l sublis sublist sublist_indices submatrix subsample subset subsetp subst substinpart subst_parallel substpart substring subvar subvarp sum sumcontract summand_to_rec supcase supcontext symbolp symmdifference symmetricp system take_channel take_inference tan tanh taylor taylorinfo taylorp taylor_simplifier taytorat tcl_output tcontract tellrat tellsimp tellsimpafter tentex tenth test_mean test_means_difference test_normality test_proportion test_proportions_difference test_rank_sum test_sign test_signed_rank test_variance test_variance_ratio tex tex1 tex_display texput %th third throw time timedate timer timer_info tldefint tlimit todd_coxeter toeplitz tokens to_lisp topological_sort to_poly to_poly_solve totaldisrep totalfourier totient tpartpol trace tracematrix trace_options transform_sample translate translate_file transpose treefale tree_reduce treillis treinat triangle triangularize trigexpand trigrat trigreduce trigsimp trunc truncate truncated_cube_graph truncated_dodecahedron_graph truncated_icosahedron_graph truncated_tetrahedron_graph tr_warnings_get tube tutte_graph ueivects uforget ultraspherical underlying_graph undiff union unique uniteigenvectors unitp units unit_step unitvector unorder unsum untellrat untimer untrace uppercasep uricci uriemann uvect vandermonde_matrix var var1 var_bernoulli var_beta var_binomial var_chi2 var_continuous_uniform var_discrete_uniform var_exp var_f var_gamma var_general_finite_discrete var_geometric var_gumbel var_hypergeometric var_laplace var_logistic var_lognormal var_negative_binomial var_noncentral_chi2 var_noncentral_student_t var_normal var_pareto var_poisson var_rayleigh var_student_t var_weibull vector vectorpotential vectorsimp verbify vers vertex_coloring vertex_connectivity vertex_degree vertex_distance vertex_eccentricity vertex_in_degree vertex_out_degree vertices vertices_to_cycle vertices_to_path %w weyl wheel_graph wiener_index wigner_3j wigner_6j wigner_9j with_stdout write_binary_data writebyte write_data writefile wronskian xreduce xthru %y Zeilberger zeroequiv zerofor zeromatrix zeromatrixp zeta zgeev zheev zlange zn_add_table zn_carmichael_lambda zn_characteristic_factors zn_determinant zn_factor_generators zn_invert_by_lu zn_log zn_mult_table absboxchar activecontexts adapt_depth additive adim aform algebraic algepsilon algexact aliases allbut all_dotsimp_denoms allocation allsym alphabetic animation antisymmetric arrays askexp assume_pos assume_pos_pred assumescalar asymbol atomgrad atrig1 axes axis_3d axis_bottom axis_left axis_right axis_top azimuth background background_color backsubst berlefact bernstein_explicit besselexpand beta_args_sum_to_integer beta_expand bftorat bftrunc bindtest border boundaries_array box boxchar breakup %c capping cauchysum cbrange cbtics center cflength cframe_flag cnonmet_flag color color_bar color_bar_tics colorbox columns commutative complex cone context contexts contour contour_levels cosnpiflag ctaypov ctaypt ctayswitch ctayvar ct_coords ctorsion_flag ctrgsimp cube current_let_rule_package cylinder data_file_name debugmode decreasing default_let_rule_package delay dependencies derivabbrev derivsubst detout diagmetric diff dim dimensions dispflag display2d|10 display_format_internal distribute_over doallmxops domain domxexpt domxmxops domxnctimes dontfactor doscmxops doscmxplus dot0nscsimp dot0simp dot1simp dotassoc dotconstrules dotdistrib dotexptsimp dotident dotscrules draw_graph_program draw_realpart edge_color edge_coloring edge_partition edge_type edge_width %edispflag elevation %emode endphi endtheta engineering_format_floats enhanced3d %enumer epsilon_lp erfflag erf_representation errormsg error_size error_syms error_type %e_to_numlog eval even evenfun evflag evfun ev_point expandwrt_denom expintexpand expintrep expon expop exptdispflag exptisolate exptsubst facexpand facsum_combine factlim factorflag factorial_expand factors_only fb feature features file_name file_output_append file_search_demo file_search_lisp file_search_maxima|10 file_search_tests file_search_usage file_type_lisp file_type_maxima|10 fill_color fill_density filled_func fixed_vertices flipflag float2bf font font_size fortindent fortspaces fpprec fpprintprec functions gamma_expand gammalim gdet genindex gensumnum GGFCFMAX GGFINFINITY globalsolve gnuplot_command gnuplot_curve_styles gnuplot_curve_titles gnuplot_default_term_command gnuplot_dumb_term_command gnuplot_file_args gnuplot_file_name gnuplot_out_file gnuplot_pdf_term_command gnuplot_pm3d gnuplot_png_term_command gnuplot_postamble gnuplot_preamble gnuplot_ps_term_command gnuplot_svg_term_command gnuplot_term gnuplot_view_args Gosper_in_Zeilberger gradefs grid grid2d grind halfangles head_angle head_both head_length head_type height hypergeometric_representation %iargs ibase icc1 icc2 icounter idummyx ieqnprint ifb ifc1 ifc2 ifg ifgi ifr iframe_bracket_form ifri igeowedge_flag ikt1 ikt2 imaginary inchar increasing infeval infinity inflag infolists inm inmc1 inmc2 intanalysis integer integervalued integrate_use_rootsof integration_constant integration_constant_counter interpolate_color intfaclim ip_grid ip_grid_in irrational isolate_wrt_times iterations itr julia_parameter %k1 %k2 keepfloat key key_pos kinvariant kt label label_alignment label_orientation labels lassociative lbfgs_ncorrections lbfgs_nfeval_max leftjust legend letrat let_rule_packages lfg lg lhospitallim limsubst linear linear_solver linechar linel|10 linenum line_type linewidth line_width linsolve_params linsolvewarn lispdisp listarith listconstvars listdummyvars lmxchar load_pathname loadprint logabs logarc logcb logconcoeffp logexpand lognegint logsimp logx logx_secondary logy logy_secondary logz lriem m1pbranch macroexpansion macros mainvar manual_demo maperror mapprint matrix_element_add matrix_element_mult matrix_element_transpose maxapplydepth maxapplyheight maxima_tempdir|10 maxima_userdir|10 maxnegex MAX_ORD maxposex maxpsifracdenom maxpsifracnum maxpsinegint maxpsiposint maxtayorder mesh_lines_color method mod_big_prime mode_check_errorp mode_checkp mode_check_warnp mod_test mod_threshold modular_linear_solver modulus multiplicative multiplicities myoptions nary negdistrib negsumdispflag newline newtonepsilon newtonmaxiter nextlayerfactor niceindicespref nm nmc noeval nolabels nonegative_lp noninteger nonscalar noun noundisp nouns np npi nticks ntrig numer numer_pbranch obase odd oddfun opacity opproperties opsubst optimprefix optionset orientation origin orthopoly_returns_intervals outative outchar packagefile palette partswitch pdf_file pfeformat phiresolution %piargs piece pivot_count_sx pivot_max_sx plot_format plot_options plot_realpart png_file pochhammer_max_index points pointsize point_size points_joined point_type poislim poisson poly_coefficient_ring poly_elimination_order polyfactor poly_grobner_algorithm poly_grobner_debug poly_monomial_order poly_primary_elimination_order poly_return_term_list poly_secondary_elimination_order poly_top_reduction_only posfun position powerdisp pred prederror primep_number_of_tests product_use_gamma program programmode promote_float_to_bigfloat prompt proportional_axes props psexpand ps_file radexpand radius radsubstflag rassociative ratalgdenom ratchristof ratdenomdivide rateinstein ratepsilon ratfac rational ratmx ratprint ratriemann ratsimpexpons ratvarswitch ratweights ratweyl ratwtlvl real realonly redraw refcheck resolution restart resultant ric riem rmxchar %rnum_list rombergabs rombergit rombergmin rombergtol rootsconmode rootsepsilon run_viewer same_xy same_xyz savedef savefactors scalar scalarmatrixp scale scale_lp setcheck setcheckbreak setval show_edge_color show_edges show_edge_type show_edge_width show_id show_label showtime show_vertex_color show_vertex_size show_vertex_type show_vertices show_weight simp simplified_output simplify_products simpproduct simpsum sinnpiflag solvedecomposes solveexplicit solvefactors solvenullwarn solveradcan solvetrigwarn space sparse sphere spring_embedding_depth sqrtdispflag stardisp startphi starttheta stats_numer stringdisp structures style sublis_apply_lambda subnumsimp sumexpand sumsplitfact surface surface_hide svg_file symmetric tab taylordepth taylor_logexpand taylor_order_coefficients taylor_truncate_polynomials tensorkill terminal testsuite_files thetaresolution timer_devalue title tlimswitch tr track transcompile transform transform_xy translate_fast_arrays transparent transrun tr_array_as_ref tr_bound_function_applyp tr_file_tty_messagesp tr_float_can_branch_complex tr_function_call_default trigexpandplus trigexpandtimes triginverses trigsign trivial_solutions tr_numer tr_optimize_max_loop tr_semicompile tr_state_vars tr_warn_bad_function_calls tr_warn_fexpr tr_warn_meval tr_warn_mode tr_warn_undeclared tr_warn_undefined_variable tstep ttyoff tube_extremes ufg ug %unitexpand unit_vectors uric uriem use_fast_arrays user_preamble usersetunits values vect_cross verbose vertex_color vertex_coloring vertex_partition vertex_size vertex_type view warnings weyl width windowname windowtitle wired_surface wireframe xaxis xaxis_color xaxis_secondary xaxis_type xaxis_width xlabel xlabel_secondary xlength xrange xrange_secondary xtics xtics_axis xtics_rotate xtics_rotate_secondary xtics_secondary xtics_secondary_axis xu_grid x_voxel xy_file xyplane xy_scale yaxis yaxis_color yaxis_secondary yaxis_type yaxis_width ylabel ylabel_secondary ylength yrange yrange_secondary ytics ytics_axis ytics_rotate ytics_rotate_secondary ytics_secondary ytics_secondary_axis yv_grid y_voxel yx_ratio zaxis zaxis_color zaxis_type zaxis_width zeroa zerob zerobern zeta%pi zlabel zlabel_rotate zlength zmin zn_primroot_limit zn_primroot_pretest",i="_ __ %|0 %%|0";return{l:"[A-Za-z_%][0-9A-Za-z_%]*",k:{keyword:t,literal:a,built_in:r,symbol:i},c:[{cN:"comment",b:"/\\*",e:"\\*/",c:["self"]},e.QSM,{cN:"number",r:0,v:[{b:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Ee][-+]?\\d+\\b"},{b:"\\b(\\d+|\\d+\\.|\\.\\d+|\\d+\\.\\d+)[Bb][-+]?\\d+\\b",r:10},{b:"\\b(\\.\\d+|\\d+\\.\\d+)\\b"},{b:"\\b(\\d+|0[0-9A-Za-z]+)\\.?\\b"}]}],i:/@/}});hljs.registerLanguage("crystal",function(e){function b(e,b){var r=[{b:e,e:b}];return r[0].c=r,r}var r="(_[uif](8|16|32|64))?",c="[a-zA-Z_]\\w*[!?=]?",i="!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",s={keyword:"abstract alias as as? asm begin break case class def do else elsif end ensure enum extend for fun if include instance_sizeof is_a? lib macro module next nil? of out pointerof private protected rescue responds_to? return require select self sizeof struct super then type typeof union uninitialized unless until when while with yield __DIR__ __END_LINE__ __FILE__ __LINE__",literal:"false nil true"},t={cN:"subst",b:"#{",e:"}",k:s},a={cN:"template-variable",v:[{b:"\\{\\{",e:"\\}\\}"},{b:"\\{%",e:"%\\}"}],k:s},l={cN:"string",c:[e.BE,t],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%w?\\(",e:"\\)",c:b("\\(","\\)")},{b:"%w?\\[",e:"\\]",c:b("\\[","\\]")},{b:"%w?{",e:"}",c:b("{","}")},{b:"%w?<",e:">",c:b("<",">")},{b:"%w?/",e:"/"},{b:"%w?%",e:"%"},{b:"%w?-",e:"-"},{b:"%w?\\|",e:"\\|"},{b:/<<-\w+$/,e:/^\s*\w+$/}],r:0},u={cN:"string",v:[{b:"%q\\(",e:"\\)",c:b("\\(","\\)")},{b:"%q\\[",e:"\\]",c:b("\\[","\\]")},{b:"%q{",e:"}",c:b("{","}")},{b:"%q<",e:">",c:b("<",">")},{b:"%q/",e:"/"},{b:"%q%",e:"%"},{b:"%q-",e:"-"},{b:"%q\\|",e:"\\|"},{b:/<<-'\w+'$/,e:/^\s*\w+$/}],r:0},_={b:"("+i+")\\s*",c:[{cN:"regexp",c:[e.BE,t],v:[{b:"//[a-z]*",r:0},{b:"/",e:"/[a-z]*"},{b:"%r\\(",e:"\\)",c:b("\\(","\\)")},{b:"%r\\[",e:"\\]",c:b("\\[","\\]")},{b:"%r{",e:"}",c:b("{","}")},{b:"%r<",e:">",c:b("<",">")},{b:"%r/",e:"/"},{b:"%r%",e:"%"},{b:"%r-",e:"-"},{b:"%r\\|",e:"\\|"}]}],r:0},o={cN:"regexp",c:[e.BE,t],v:[{b:"%r\\(",e:"\\)",c:b("\\(","\\)")},{b:"%r\\[",e:"\\]",c:b("\\[","\\]")},{b:"%r{",e:"}",c:b("{","}")},{b:"%r<",e:">",c:b("<",">")},{b:"%r/",e:"/"},{b:"%r%",e:"%"},{b:"%r-",e:"-"},{b:"%r\\|",e:"\\|"}],r:0},w={cN:"meta",b:"@\\[",e:"\\]",c:[e.inherit(e.QSM,{cN:"meta-string"})]},f=[a,l,u,_,o,w,e.HCM,{cN:"class",bK:"class module struct",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<"}]},{cN:"class",bK:"lib enum union",e:"$|;",i:/=/,c:[e.HCM,e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],r:10},{cN:"function",bK:"def",e:/\B\b/,c:[e.inherit(e.TM,{b:n,endsParent:!0})]},{cN:"function",bK:"fun macro",e:/\B\b/,c:[e.inherit(e.TM,{b:n,endsParent:!0})],r:5},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":",c:[l,{b:n}],r:0},{cN:"number",v:[{b:"\\b0b([01_]*[01])"+r},{b:"\\b0o([0-7_]*[0-7])"+r},{b:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+r},{b:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+r}],r:0}];return t.c=f,a.c=f.slice(1),{aliases:["cr"],l:c,k:s,c:f}});hljs.registerLanguage("ocaml",function(e){return{aliases:["ml"],k:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:"\\[(\\|\\|)?\\]|\\(\\)",r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*",r:0},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("processing",function(e){return{k:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw",built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM]}});hljs.registerLanguage("1c",function(s){var x="[A-Za-zА-Яа-яёЁ_][A-Za-zА-Яа-яёЁ_0-9]+",o="далее ",m="возврат вызватьисключение выполнить для если и из или иначе иначеесли исключение каждого конецесли конецпопытки конеццикла не новый перейти перем по пока попытка прервать продолжить тогда цикл экспорт ",t=o+m,l="загрузитьизфайла ",e="вебклиент вместо внешнеесоединение клиент конецобласти мобильноеприложениеклиент мобильноеприложениесервер наклиенте наклиентенасервере наклиентенасерверебезконтекста насервере насерверебезконтекста область перед после сервер толстыйклиентобычноеприложение толстыйклиентуправляемоеприложение тонкийклиент ",n=l+e,a="разделительстраниц разделительстрок символтабуляции ",d="ansitooem oemtoansi ввестивидсубконто ввестиперечисление ввестипериод ввестиплансчетов выбранныйплансчетов датагод датамесяц датачисло заголовоксистемы значениевстроку значениеизстроки каталогиб каталогпользователя кодсимв конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лог лог10 максимальноеколичествосубконто названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найтиссылки началопериодаби началостандартногоинтервала начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода обработкаожидания основнойжурналрасчетов основнойплансчетов основнойязык очиститьокносообщений периодстр получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта префиксавтонумерации пропись пустоезначение разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо симв создатьобъект статусвозврата стрколичествострок сформироватьпозициюдокумента счетпокоду текущеевремя типзначения типзначениястр установитьтана установитьтапо фиксшаблон шаблон ",i="acos asin atan base64значение base64строка cos exp log log10 pow sin sqrt tan xmlзначение xmlстрока xmlтип xmlтипзнч активноеокно безопасныйрежим безопасныйрежимразделенияданных булево ввестидату ввестизначение ввестистроку ввестичисло возможностьчтенияxml вопрос восстановитьзначение врег выгрузитьжурналрегистрации выполнитьобработкуоповещения выполнитьпроверкуправдоступа вычислить год данныеформывзначение дата день деньгода деньнедели добавитьмесяц заблокироватьданныедляредактирования заблокироватьработупользователя завершитьработусистемы загрузитьвнешнююкомпоненту закрытьсправку записатьjson записатьxml записатьдатуjson записьжурналарегистрации заполнитьзначениясвойств запроситьразрешениепользователя запуститьприложение запуститьсистему зафиксироватьтранзакцию значениевданныеформы значениевстрокувнутр значениевфайл значениезаполнено значениеизстрокивнутр значениеизфайла изxmlтипа импортмоделиxdto имякомпьютера имяпользователя инициализироватьпредопределенныеданные информацияобошибке каталогбиблиотекимобильногоустройства каталогвременныхфайлов каталогдокументов каталогпрограммы кодироватьстроку кодлокализацииинформационнойбазы кодсимвола командасистемы конецгода конецдня конецквартала конецмесяца конецминуты конецнедели конецчаса конфигурациябазыданныхизмененадинамически конфигурацияизменена копироватьданныеформы копироватьфайл краткоепредставлениеошибки лев макс местноевремя месяц мин минута монопольныйрежим найти найтинедопустимыесимволыxml найтиокнопонавигационнойссылке найтипомеченныенаудаление найтипоссылкам найтифайлы началогода началодня началоквартала началомесяца началоминуты началонедели началочаса начатьзапросразрешенияпользователя начатьзапускприложения начатькопированиефайла начатьперемещениефайла начатьподключениевнешнейкомпоненты начатьподключениерасширенияработыскриптографией начатьподключениерасширенияработысфайлами начатьпоискфайлов начатьполучениекаталогавременныхфайлов начатьполучениекаталогадокументов начатьполучениерабочегокаталогаданныхпользователя начатьполучениефайлов начатьпомещениефайла начатьпомещениефайлов начатьсозданиедвоичныхданныхизфайла начатьсозданиекаталога начатьтранзакцию начатьудалениефайлов начатьустановкувнешнейкомпоненты начатьустановкурасширенияработыскриптографией начатьустановкурасширенияработысфайлами неделягода необходимостьзавершениясоединения номерсеансаинформационнойбазы номерсоединенияинформационнойбазы нрег нстр обновитьинтерфейс обновитьнумерациюобъектов обновитьповторноиспользуемыезначения обработкапрерыванияпользователя объединитьфайлы окр описаниеошибки оповестить оповеститьобизменении отключитьобработчикзапросанастроекклиенталицензирования отключитьобработчикожидания отключитьобработчикоповещения открытьзначение открытьиндекссправки открытьсодержаниесправки открытьсправку открытьформу открытьформумодально отменитьтранзакцию очиститьжурналрегистрации очиститьнастройкипользователя очиститьсообщения параметрыдоступа перейтипонавигационнойссылке переместитьфайл подключитьвнешнююкомпоненту подключитьобработчикзапросанастроекклиенталицензирования подключитьобработчикожидания подключитьобработчикоповещения подключитьрасширениеработыскриптографией подключитьрасширениеработысфайлами подробноепредставлениеошибки показатьвводдаты показатьвводзначения показатьвводстроки показатьвводчисла показатьвопрос показатьзначение показатьинформациюобошибке показатьнакарте показатьоповещениепользователя показатьпредупреждение полноеимяпользователя получитьcomобъект получитьxmlтип получитьадреспоместоположению получитьблокировкусеансов получитьвремязавершенияспящегосеанса получитьвремязасыпанияпассивногосеанса получитьвремяожиданияблокировкиданных получитьданныевыбора получитьдополнительныйпараметрклиенталицензирования получитьдопустимыекодылокализации получитьдопустимыечасовыепояса получитьзаголовокклиентскогоприложения получитьзаголовоксистемы получитьзначенияотборажурналарегистрации получитьидентификаторконфигурации получитьизвременногохранилища получитьимявременногофайла получитьимяклиенталицензирования получитьинформациюэкрановклиента получитьиспользованиежурналарегистрации получитьиспользованиесобытияжурналарегистрации получитькраткийзаголовокприложения получитьмакетоформления получитьмаскувсефайлы получитьмаскувсефайлыклиента получитьмаскувсефайлысервера получитьместоположениепоадресу получитьминимальнуюдлинупаролейпользователей получитьнавигационнуюссылку получитьнавигационнуюссылкуинформационнойбазы получитьобновлениеконфигурациибазыданных получитьобновлениепредопределенныхданныхинформационнойбазы получитьобщиймакет получитьобщуюформу получитьокна получитьоперативнуюотметкувремени получитьотключениебезопасногорежима получитьпараметрыфункциональныхопцийинтерфейса получитьполноеимяпредопределенногозначения получитьпредставлениянавигационныхссылок получитьпроверкусложностипаролейпользователей получитьразделительпути получитьразделительпутиклиента получитьразделительпутисервера получитьсеансыинформационнойбазы получитьскоростьклиентскогосоединения получитьсоединенияинформационнойбазы получитьсообщенияпользователю получитьсоответствиеобъектаиформы получитьсоставстандартногоинтерфейсаodata получитьструктурухранениябазыданных получитьтекущийсеансинформационнойбазы получитьфайл получитьфайлы получитьформу получитьфункциональнуюопцию получитьфункциональнуюопциюинтерфейса получитьчасовойпоясинформационнойбазы пользователиос поместитьвовременноехранилище поместитьфайл поместитьфайлы прав праводоступа предопределенноезначение представлениекодалокализации представлениепериода представлениеправа представлениеприложения представлениесобытияжурналарегистрации представлениечасовогопояса предупреждение прекратитьработусистемы привилегированныйрежим продолжитьвызов прочитатьjson прочитатьxml прочитатьдатуjson пустаястрока рабочийкаталогданныхпользователя разблокироватьданныедляредактирования разделитьфайл разорватьсоединениесвнешнимисточникомданных раскодироватьстроку рольдоступна секунда сигнал символ скопироватьжурналрегистрации смещениелетнеговремени смещениестандартноговремени соединитьбуферыдвоичныхданных создатькаталог создатьфабрикуxdto сокрл сокрлп сокрп сообщить состояние сохранитьзначение сохранитьнастройкипользователя сред стрдлина стрзаканчиваетсяна стрзаменить стрнайти стрначинаетсяс строка строкасоединенияинформационнойбазы стрполучитьстроку стрразделить стрсоединить стрсравнить стрчисловхождений стрчислострок стршаблон текущаядата текущаядатасеанса текущаяуниверсальнаядата текущаяуниверсальнаядатавмиллисекундах текущийвариантинтерфейсаклиентскогоприложения текущийвариантосновногошрифтаклиентскогоприложения текущийкодлокализации текущийрежимзапуска текущийязык текущийязыксистемы тип типзнч транзакцияактивна трег удалитьданныеинформационнойбазы удалитьизвременногохранилища удалитьобъекты удалитьфайлы универсальноевремя установитьбезопасныйрежим установитьбезопасныйрежимразделенияданных установитьблокировкусеансов установитьвнешнююкомпоненту установитьвремязавершенияспящегосеанса установитьвремязасыпанияпассивногосеанса установитьвремяожиданияблокировкиданных установитьзаголовокклиентскогоприложения установитьзаголовоксистемы установитьиспользованиежурналарегистрации установитьиспользованиесобытияжурналарегистрации установитькраткийзаголовокприложения установитьминимальнуюдлинупаролейпользователей установитьмонопольныйрежим установитьнастройкиклиенталицензирования установитьобновлениепредопределенныхданныхинформационнойбазы установитьотключениебезопасногорежима установитьпараметрыфункциональныхопцийинтерфейса установитьпривилегированныйрежим установитьпроверкусложностипаролейпользователей установитьрасширениеработыскриптографией установитьрасширениеработысфайлами установитьсоединениесвнешнимисточникомданных установитьсоответствиеобъектаиформы установитьсоставстандартногоинтерфейсаodata установитьчасовойпоясинформационнойбазы установитьчасовойпояссеанса формат цел час часовойпояс часовойпояссеанса число числопрописью этоадресвременногохранилища ",c="wsссылки библиотекакартинок библиотекамакетовоформлениякомпоновкиданных библиотекастилей бизнеспроцессы внешниеисточникиданных внешниеобработки внешниеотчеты встроенныепокупки главныйинтерфейс главныйстиль документы доставляемыеуведомления журналыдокументов задачи информацияобинтернетсоединении использованиерабочейдаты историяработыпользователя константы критерииотбора метаданные обработки отображениерекламы отправкадоставляемыхуведомлений отчеты панельзадачос параметрзапуска параметрысеанса перечисления планывидоврасчета планывидовхарактеристик планыобмена планысчетов полнотекстовыйпоиск пользователиинформационнойбазы последовательности проверкавстроенныхпокупок рабочаядата расширенияконфигурации регистрыбухгалтерии регистрынакопления регистрырасчета регистрысведений регламентныезадания сериализаторxdto справочники средствагеопозиционирования средствакриптографии средствамультимедиа средстваотображениярекламы средствапочты средствателефонии фабрикаxdto файловыепотоки фоновыезадания хранилищанастроек хранилищевариантовотчетов хранилищенастроекданныхформ хранилищеобщихнастроек хранилищепользовательскихнастроекдинамическихсписков хранилищепользовательскихнастроекотчетов хранилищесистемныхнастроек ",r=a+d+i+c,p="webцвета windowsцвета windowsшрифты библиотекакартинок рамкистиля символы цветастиля шрифтыстиля ",b="автоматическоесохранениеданныхформывнастройках автонумерациявформе автораздвижениесерий анимациядиаграммы вариантвыравниванияэлементовизаголовков вариантуправлениявысотойтаблицы вертикальнаяпрокруткаформы вертикальноеположение вертикальноеположениеэлемента видгруппыформы виддекорацииформы виддополненияэлементаформы видизмененияданных видкнопкиформы видпереключателя видподписейкдиаграмме видполяформы видфлажка влияниеразмеранапузырекдиаграммы горизонтальноеположение горизонтальноеположениеэлемента группировкаколонок группировкаподчиненныхэлементовформы группыиэлементы действиеперетаскивания дополнительныйрежимотображения допустимыедействияперетаскивания интервалмеждуэлементамиформы использованиевывода использованиеполосыпрокрутки используемоезначениеточкибиржевойдиаграммы историявыборапривводе источникзначенийоситочекдиаграммы источникзначенияразмерапузырькадиаграммы категориягруппыкоманд максимумсерий начальноеотображениедерева начальноеотображениесписка обновлениетекстаредактирования ориентациядендрограммы ориентациядиаграммы ориентацияметокдиаграммы ориентацияметоксводнойдиаграммы ориентацияэлементаформы отображениевдиаграмме отображениевлегендедиаграммы отображениегруппыкнопок отображениезаголовкашкалыдиаграммы отображениезначенийсводнойдиаграммы отображениезначенияизмерительнойдиаграммы отображениеинтерваладиаграммыганта отображениекнопки отображениекнопкивыбора отображениеобсужденийформы отображениеобычнойгруппы отображениеотрицательныхзначенийпузырьковойдиаграммы отображениепанелипоиска отображениеподсказки отображениепредупрежденияприредактировании отображениеразметкиполосырегулирования отображениестраницформы отображениетаблицы отображениетекстазначениядиаграммыганта отображениеуправленияобычнойгруппы отображениефигурыкнопки палитрацветовдиаграммы поведениеобычнойгруппы поддержкамасштабадендрограммы поддержкамасштабадиаграммыганта поддержкамасштабасводнойдиаграммы поисквтаблицепривводе положениезаголовкаэлементаформы положениекартинкикнопкиформы положениекартинкиэлементаграфическойсхемы положениекоманднойпанелиформы положениекоманднойпанелиэлементаформы положениеопорнойточкиотрисовки положениеподписейкдиаграмме положениеподписейшкалызначенийизмерительнойдиаграммы положениесостоянияпросмотра положениестрокипоиска положениетекстасоединительнойлинии положениеуправленияпоиском положениешкалывремени порядокотображенияточекгоризонтальнойгистограммы порядоксерийвлегендедиаграммы размеркартинки расположениезаголовкашкалыдиаграммы растягиваниеповертикалидиаграммыганта режимавтоотображениясостояния режимвводастроктаблицы режимвыборанезаполненного режимвыделениядаты режимвыделениястрокитаблицы режимвыделениятаблицы режимизмененияразмера режимизменениясвязанногозначения режимиспользованиядиалогапечати режимиспользованияпараметракоманды режиммасштабированияпросмотра режимосновногоокнаклиентскогоприложения режимоткрытияокнаформы режимотображениявыделения режимотображениягеографическойсхемы режимотображениязначенийсерии режимотрисовкисеткиграфическойсхемы режимполупрозрачностидиаграммы режимпробеловдиаграммы режимразмещениянастранице режимредактированияколонки режимсглаживаниядиаграммы режимсглаживанияиндикатора режимсписказадач сквозноевыравнивание сохранениеданныхформывнастройках способзаполнениятекстазаголовкашкалыдиаграммы способопределенияограничивающегозначениядиаграммы стандартнаягруппакоманд стандартноеоформление статусоповещенияпользователя стильстрелки типаппроксимациилиниитрендадиаграммы типдиаграммы типединицышкалывремени типимпортасерийслоягеографическойсхемы типлиниигеографическойсхемы типлиниидиаграммы типмаркерагеографическойсхемы типмаркерадиаграммы типобластиоформления типорганизацииисточникаданныхгеографическойсхемы типотображениясериислоягеографическойсхемы типотображенияточечногообъектагеографическойсхемы типотображенияшкалыэлементалегендыгеографическойсхемы типпоискаобъектовгеографическойсхемы типпроекциигеографическойсхемы типразмещенияизмерений типразмещенияреквизитовизмерений типрамкиэлементауправления типсводнойдиаграммы типсвязидиаграммыганта типсоединениязначенийпосериямдиаграммы типсоединенияточекдиаграммы типсоединительнойлинии типстороныэлементаграфическойсхемы типформыотчета типшкалырадарнойдиаграммы факторлиниитрендадиаграммы фигуракнопки фигурыграфическойсхемы фиксациявтаблице форматдняшкалывремени форматкартинки ширинаподчиненныхэлементовформы ",w="виддвижениябухгалтерии виддвижениянакопления видпериодарегистрарасчета видсчета видточкимаршрутабизнеспроцесса использованиеагрегатарегистранакопления использованиегруппиэлементов использованиережимапроведения использованиесреза периодичностьагрегатарегистранакопления режимавтовремя режимзаписидокумента режимпроведениядокумента ",h="авторегистрацияизменений допустимыйномерсообщения отправкаэлементаданных получениеэлементаданных ",j="использованиерасшифровкитабличногодокумента ориентациястраницы положениеитоговколоноксводнойтаблицы положениеитоговстроксводнойтаблицы положениетекстаотносительнокартинки расположениезаголовкагруппировкитабличногодокумента способчтениязначенийтабличногодокумента типдвустороннейпечати типзаполненияобластитабличногодокумента типкурсоровтабличногодокумента типлиниирисункатабличногодокумента типлинииячейкитабличногодокумента типнаправленияпереходатабличногодокумента типотображениявыделениятабличногодокумента типотображениялинийсводнойтаблицы типразмещениятекстатабличногодокумента типрисункатабличногодокумента типсмещениятабличногодокумента типузоратабличногодокумента типфайлатабличногодокумента точностьпечати чередованиерасположениястраниц ",z="отображениевремениэлементовпланировщика ",f="типфайлаформатированногодокумента ",k="обходрезультатазапроса типзаписизапроса ",u="видзаполнениярасшифровкипостроителяотчета типдобавленияпредставлений типизмеренияпостроителяотчета типразмещенияитогов ",y="доступкфайлу режимдиалогавыборафайла режимоткрытияфайла ",N="типизмеренияпостроителязапроса ",g="видданныханализа методкластеризации типединицыинтервалавременианализаданных типзаполнениятаблицырезультатаанализаданных типиспользованиячисловыхзначенийанализаданных типисточникаданныхпоискаассоциаций типколонкианализаданныхдереворешений типколонкианализаданныхкластеризация типколонкианализаданныхобщаястатистика типколонкианализаданныхпоискассоциаций типколонкианализаданныхпоискпоследовательностей типколонкимоделипрогноза типмерырасстоянияанализаданных типотсеченияправилассоциации типполяанализаданных типстандартизациианализаданных типупорядочиванияправилассоциациианализаданных типупорядочиванияшаблоновпоследовательностейанализаданных типупрощениядереварешений ",E="wsнаправлениепараметра вариантxpathxs вариантзаписидатыjson вариантпростоготипаxs видгруппымоделиxs видфасетаxdto действиепостроителяdom завершенностьпростоготипаxs завершенностьсоставноготипаxs завершенностьсхемыxs запрещенныеподстановкиxs исключениягруппподстановкиxs категорияиспользованияатрибутаxs категорияограниченияидентичностиxs категорияограниченияпространствименxs методнаследованияxs модельсодержимогоxs назначениетипаxml недопустимыеподстановкиxs обработкапробельныхсимволовxs обработкасодержимогоxs ограничениезначенияxs параметрыотбораузловdom переносстрокjson позициявдокументеdom пробельныесимволыxml типатрибутаxml типзначенияjson типканоническогоxml типкомпонентыxs типпроверкиxml типрезультатаdomxpath типузлаdom типузлаxml формаxml формапредставленияxs форматдатыjson экранированиесимволовjson ",M="видсравнениякомпоновкиданных действиеобработкирасшифровкикомпоновкиданных направлениесортировкикомпоновкиданных расположениевложенныхэлементоврезультатакомпоновкиданных расположениеитоговкомпоновкиданных расположениегруппировкикомпоновкиданных расположениеполейгруппировкикомпоновкиданных расположениеполякомпоновкиданных расположениереквизитовкомпоновкиданных расположениересурсовкомпоновкиданных типбухгалтерскогоостаткакомпоновкиданных типвыводатекстакомпоновкиданных типгруппировкикомпоновкиданных типгруппыэлементовотборакомпоновкиданных типдополненияпериодакомпоновкиданных типзаголовкаполейкомпоновкиданных типмакетагруппировкикомпоновкиданных типмакетаобластикомпоновкиданных типостаткакомпоновкиданных типпериодакомпоновкиданных типразмещениятекстакомпоновкиданных типсвязинаборовданныхкомпоновкиданных типэлементарезультатакомпоновкиданных расположениелегендыдиаграммыкомпоновкиданных типпримененияотборакомпоновкиданных режимотображенияэлементанастройкикомпоновкиданных режимотображениянастроеккомпоновкиданных состояниеэлементанастройкикомпоновкиданных способвосстановлениянастроеккомпоновкиданных режимкомпоновкирезультата использованиепараметракомпоновкиданных автопозицияресурсовкомпоновкиданных вариантиспользованиягруппировкикомпоновкиданных расположениересурсоввдиаграммекомпоновкиданных фиксациякомпоновкиданных использованиеусловногооформлениякомпоновкиданных ",_="важностьинтернетпочтовогосообщения обработкатекстаинтернетпочтовогосообщения способкодированияинтернетпочтовоговложения способкодированиянеasciiсимволовинтернетпочтовогосообщения типтекстапочтовогосообщения протоколинтернетпочты статусразборапочтовогосообщения ",v="режимтранзакциизаписижурналарегистрации статустранзакциизаписижурналарегистрации уровеньжурналарегистрации ",A="расположениехранилищасертификатовкриптографии режимвключениясертификатовкриптографии режимпроверкисертификатакриптографии типхранилищасертификатовкриптографии ",C="кодировкаименфайловвzipфайле методсжатияzip методшифрованияzip режимвосстановленияпутейфайловzip режимобработкиподкаталоговzip режимсохраненияпутейzip уровеньсжатияzip ",L="звуковоеоповещение направлениепереходакстроке позициявпотоке порядокбайтов режимблокировкиданных режимуправленияблокировкойданных сервисвстроенныхпокупок состояниефоновогозадания типподписчикадоставляемыхуведомлений уровеньиспользованиязащищенногосоединенияftp ",Z="направлениепорядкасхемызапроса типдополненияпериодамисхемызапроса типконтрольнойточкисхемызапроса типобъединениясхемызапроса типпараметрадоступнойтаблицысхемызапроса типсоединениясхемызапроса ",$="httpметод автоиспользованиеобщегореквизита автопрефиксномеразадачи вариантвстроенногоязыка видиерархии видрегистранакопления видтаблицывнешнегоисточникаданных записьдвиженийприпроведении заполнениепоследовательностей индексирование использованиебазыпланавидоврасчета использованиебыстроговыбора использованиеобщегореквизита использованиеподчинения использованиеполнотекстовогопоиска использованиеразделяемыхданныхобщегореквизита использованиереквизита назначениеиспользованияприложения назначениерасширенияконфигурации направлениепередачи обновлениепредопределенныхданных оперативноепроведение основноепредставлениевидарасчета основноепредставлениевидахарактеристики основноепредставлениезадачи основноепредставлениепланаобмена основноепредставлениесправочника основноепредставлениесчета перемещениеграницыприпроведении периодичностьномерабизнеспроцесса периодичностьномерадокумента периодичностьрегистрарасчета периодичностьрегистрасведений повторноеиспользованиевозвращаемыхзначений полнотекстовыйпоискпривводепостроке принадлежностьобъекта проведение разделениеаутентификацииобщегореквизита разделениеданныхобщегореквизита разделениерасширенийконфигурацииобщегореквизита режимавтонумерацииобъектов режимзаписирегистра режимиспользованиямодальности режимиспользованиясинхронныхвызововрасширенийплатформыивнешнихкомпонент режимповторногоиспользованиясеансов режимполученияданныхвыборапривводепостроке режимсовместимости режимсовместимостиинтерфейса режимуправленияблокировкойданныхпоумолчанию сериикодовпланавидовхарактеристик сериикодовпланасчетов сериикодовсправочника созданиепривводе способвыбора способпоискастрокипривводепостроке способредактирования типданныхтаблицывнешнегоисточникаданных типкодапланавидоврасчета типкодасправочника типмакета типномерабизнеспроцесса типномерадокумента типномеразадачи типформы удалениедвижений ",q="важностьпроблемыприменениярасширенияконфигурации вариантинтерфейсаклиентскогоприложения вариантмасштабаформклиентскогоприложения вариантосновногошрифтаклиентскогоприложения вариантстандартногопериода вариантстандартнойдатыначала видграницы видкартинки видотображенияполнотекстовогопоиска видрамки видсравнения видцвета видчисловогозначения видшрифта допустимаядлина допустимыйзнак использованиеbyteordermark использованиеметаданныхполнотекстовогопоиска источникрасширенийконфигурации клавиша кодвозвратадиалога кодировкаxbase кодировкатекста направлениепоиска направлениесортировки обновлениепредопределенныхданных обновлениеприизмененииданных отображениепанелиразделов проверказаполнения режимдиалогавопрос режимзапускаклиентскогоприложения режимокругления режимоткрытияформприложения режимполнотекстовогопоиска скоростьклиентскогосоединения состояниевнешнегоисточникаданных состояниеобновленияконфигурациибазыданных способвыборасертификатаwindows способкодированиястроки статуссообщения типвнешнейкомпоненты типплатформы типповеденияклавишиenter типэлементаинформацииовыполненииобновленияконфигурациибазыданных уровеньизоляциитранзакций хешфункция частидаты",B=p+b+w+h+j+z+f+k+u+y+N+g+E+M+_+v+A+C+L+Z+$+q,I="comобъект ftpсоединение httpзапрос httpсервисответ httpсоединение wsопределения wsпрокси xbase анализданных аннотацияxs блокировкаданных буфердвоичныхданных включениеxs выражениекомпоновкиданных генераторслучайныхчисел географическаясхема географическиекоординаты графическаясхема группамоделиxs данныерасшифровкикомпоновкиданных двоичныеданные дендрограмма диаграмма диаграммаганта диалогвыборафайла диалогвыборацвета диалогвыборашрифта диалограсписаниярегламентногозадания диалогредактированиястандартногопериода диапазон документdom документhtml документацияxs доставляемоеуведомление записьdom записьfastinfoset записьhtml записьjson записьxml записьzipфайла записьданных записьтекста записьузловdom запрос защищенноесоединениеopenssl значенияполейрасшифровкикомпоновкиданных извлечениетекста импортxs интернетпочта интернетпочтовоесообщение интернетпочтовыйпрофиль интернетпрокси интернетсоединение информациядляприложенияxs использованиеатрибутаxs использованиесобытияжурналарегистрации источникдоступныхнастроеккомпоновкиданных итераторузловdom картинка квалификаторыдаты квалификаторыдвоичныхданных квалификаторыстроки квалификаторычисла компоновщикмакетакомпоновкиданных компоновщикнастроеккомпоновкиданных конструктормакетаоформлениякомпоновкиданных конструкторнастроеккомпоновкиданных конструкторформатнойстроки линия макеткомпоновкиданных макетобластикомпоновкиданных макетоформлениякомпоновкиданных маскаxs менеджеркриптографии наборсхемxml настройкикомпоновкиданных настройкисериализацииjson обработкакартинок обработкарасшифровкикомпоновкиданных обходдереваdom объявлениеатрибутаxs объявлениенотацииxs объявлениеэлементаxs описаниеиспользованиясобытиядоступжурналарегистрации описаниеиспользованиясобытияотказвдоступежурналарегистрации описаниеобработкирасшифровкикомпоновкиданных описаниепередаваемогофайла описаниетипов определениегруппыатрибутовxs определениегруппымоделиxs определениеограниченияидентичностиxs определениепростоготипаxs определениесоставноготипаxs определениетипадокументаdom определенияxpathxs отборкомпоновкиданных пакетотображаемыхдокументов параметрвыбора параметркомпоновкиданных параметрызаписиjson параметрызаписиxml параметрычтенияxml переопределениеxs планировщик полеанализаданных полекомпоновкиданных построительdom построительзапроса построительотчета построительотчетаанализаданных построительсхемxml поток потоквпамяти почта почтовоесообщение преобразованиеxsl преобразованиекканоническомуxml процессорвыводарезультатакомпоновкиданныхвколлекциюзначений процессорвыводарезультатакомпоновкиданныхвтабличныйдокумент процессоркомпоновкиданных разыменовательпространствименdom рамка расписаниерегламентногозадания расширенноеимяxml результатчтенияданных своднаядиаграмма связьпараметравыбора связьпотипу связьпотипукомпоновкиданных сериализаторxdto сертификатклиентаwindows сертификатклиентафайл сертификаткриптографии сертификатыудостоверяющихцентровwindows сертификатыудостоверяющихцентровфайл сжатиеданных системнаяинформация сообщениепользователю сочетаниеклавиш сравнениезначений стандартнаядатаначала стандартныйпериод схемаxml схемакомпоновкиданных табличныйдокумент текстовыйдокумент тестируемоеприложение типданныхxml уникальныйидентификатор фабрикаxdto файл файловыйпоток фасетдлиныxs фасетколичестваразрядовдробнойчастиxs фасетмаксимальноговключающегозначенияxs фасетмаксимальногоисключающегозначенияxs фасетмаксимальнойдлиныxs фасетминимальноговключающегозначенияxs фасетминимальногоисключающегозначенияxs фасетминимальнойдлиныxs фасетобразцаxs фасетобщегоколичестваразрядовxs фасетперечисленияxs фасетпробельныхсимволовxs фильтрузловdom форматированнаястрока форматированныйдокумент фрагментxs хешированиеданных хранилищезначения цвет чтениеfastinfoset чтениеhtml чтениеjson чтениеxml чтениеzipфайла чтениеданных чтениетекста чтениеузловdom шрифт элементрезультатакомпоновкиданных ",P="comsafearray деревозначений массив соответствие списокзначений структура таблицазначений фиксированнаяструктура фиксированноесоответствие фиксированныймассив ",T=I+P,W="null истина ложь неопределено",D=s.inherit(s.NM),F={cN:"string",b:'"|\\|',e:'"|$',c:[{b:'""'}]},G={b:"'",e:"'",eB:!0,eE:!0,c:[{cN:"number",b:"\\d{4}([\\.\\\\/:-]?\\d{2}){0,5}"}]},H=s.inherit(s.CLCM),J={cN:"meta",l:x,b:"#|&",e:"$",k:{"meta-keyword":t+n},c:[H]},K={cN:"symbol",b:"~",e:";|:",eE:!0},O={cN:"function",l:x,v:[{b:"процедура|функция",e:"\\)",k:"процедура функция"},{b:"конецпроцедуры|конецфункции",k:"конецпроцедуры конецфункции"}],c:[{b:"\\(",e:"\\)",endsParent:!0,c:[{cN:"params",l:x,b:x,e:",",eE:!0,eW:!0,k:{keyword:"знач",literal:W},c:[D,F,G]},H]},s.inherit(s.TM,{b:x})]};return{cI:!0,l:x,k:{keyword:t,built_in:r,"class":B,type:T,literal:W},c:[J,O,H,K,D,F,G]}});hljs.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",i={cN:"variable",b:"(\\$"+t+")\\b"},r={cN:"number",b:"#[0-9A-Fa-f]+"};({cN:"attribute",b:"[A-Z\\_\\.\\-]+",e:":",eE:!0,i:"[^\\s]",starts:{eW:!0,eE:!0,c:[r,e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"meta",b:"!important"}]}});return{cI:!0,i:"[=/|']",c:[e.CLCM,e.CBCM,{cN:"selector-id",b:"\\#[A-Za-z0-9_-]+",r:0},{cN:"selector-class",b:"\\.[A-Za-z0-9_-]+",r:0},{cN:"selector-attr",b:"\\[",e:"\\]",i:"$"},{cN:"selector-tag",b:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",r:0},{b:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{b:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},i,{cN:"attribute",b:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-dbRule-width|column-dbRule-style|column-dbRule-color|column-dbRule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",i:"[^\\s]"},{b:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{b:":",e:";",c:[i,r,e.CSSNM,e.QSM,e.ASM,{cN:"meta",b:"!important"}]},{b:"@",e:"[{;]",k:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",c:[i,e.QSM,e.ASM,r,e.CSSNM,{b:"\\s[A-Za-z0-9_.-]+",r:0}]}]}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("mojolicious",function(e){return{sL:"xml",c:[{cN:"meta",b:"^__(END|DATA)__$"},{b:"^\\s*%{1,2}={0,2}",e:"$",sL:"perl"},{b:"<%{1,2}={0,2}",e:"={0,1}%>",sL:"perl",eB:!0,eE:!0}]}});hljs.registerLanguage("lsl",function(E){var T={cN:"subst",b:/\\[tn"\\]/},e={cN:"string",b:'"',e:'"',c:[T]},A={cN:"number",b:E.CNR},R={cN:"literal",v:[{b:"\\b(?:PI|TWO_PI|PI_BY_TWO|DEG_TO_RAD|RAD_TO_DEG|SQRT2)\\b"},{b:"\\b(?:XP_ERROR_(?:EXPERIENCES_DISABLED|EXPERIENCE_(?:DISABLED|SUSPENDED)|INVALID_(?:EXPERIENCE|PARAMETERS)|KEY_NOT_FOUND|MATURITY_EXCEEDED|NONE|NOT_(?:FOUND|PERMITTED(?:_LAND)?)|NO_EXPERIENCE|QUOTA_EXCEEDED|RETRY_UPDATE|STORAGE_EXCEPTION|STORE_DISABLED|THROTTLED|UNKNOWN_ERROR)|JSON_APPEND|STATUS_(?:PHYSICS|ROTATE_[XYZ]|PHANTOM|SANDBOX|BLOCK_GRAB(?:_OBJECT)?|(?:DIE|RETURN)_AT_EDGE|CAST_SHADOWS|OK|MALFORMED_PARAMS|TYPE_MISMATCH|BOUNDS_ERROR|NOT_(?:FOUND|SUPPORTED)|INTERNAL_ERROR|WHITELIST_FAILED)|AGENT(?:_(?:BY_(?:LEGACY_|USER)NAME|FLYING|ATTACHMENTS|SCRIPTED|MOUSELOOK|SITTING|ON_OBJECT|AWAY|WALKING|IN_AIR|TYPING|CROUCHING|BUSY|ALWAYS_RUN|AUTOPILOT|LIST_(?:PARCEL(?:_OWNER)?|REGION)))?|CAMERA_(?:PITCH|DISTANCE|BEHINDNESS_(?:ANGLE|LAG)|(?:FOCUS|POSITION)(?:_(?:THRESHOLD|LOCKED|LAG))?|FOCUS_OFFSET|ACTIVE)|ANIM_ON|LOOP|REVERSE|PING_PONG|SMOOTH|ROTATE|SCALE|ALL_SIDES|LINK_(?:ROOT|SET|ALL_(?:OTHERS|CHILDREN)|THIS)|ACTIVE|PASS(?:IVE|_(?:ALWAYS|IF_NOT_HANDLED|NEVER))|SCRIPTED|CONTROL_(?:FWD|BACK|(?:ROT_)?(?:LEFT|RIGHT)|UP|DOWN|(?:ML_)?LBUTTON)|PERMISSION_(?:RETURN_OBJECTS|DEBIT|OVERRIDE_ANIMATIONS|SILENT_ESTATE_MANAGEMENT|TAKE_CONTROLS|TRIGGER_ANIMATION|ATTACH|CHANGE_LINKS|(?:CONTROL|TRACK)_CAMERA|TELEPORT)|INVENTORY_(?:TEXTURE|SOUND|OBJECT|SCRIPT|LANDMARK|CLOTHING|NOTECARD|BODYPART|ANIMATION|GESTURE|ALL|NONE)|CHANGED_(?:INVENTORY|COLOR|SHAPE|SCALE|TEXTURE|LINK|ALLOWED_DROP|OWNER|REGION(?:_START)?|TELEPORT|MEDIA)|OBJECT_(?:CLICK_ACTION|HOVER_HEIGHT|LAST_OWNER_ID|(?:PHYSICS|SERVER|STREAMING)_COST|UNKNOWN_DETAIL|CHARACTER_TIME|PHANTOM|PHYSICS|TEMP_ON_REZ|NAME|DESC|POS|PRIM_(?:COUNT|EQUIVALENCE)|RETURN_(?:PARCEL(?:_OWNER)?|REGION)|REZZER_KEY|ROO?T|VELOCITY|OMEGA|OWNER|GROUP|CREATOR|ATTACHED_POINT|RENDER_WEIGHT|(?:BODY_SHAPE|PATHFINDING)_TYPE|(?:RUNNING|TOTAL)_SCRIPT_COUNT|TOTAL_INVENTORY_COUNT|SCRIPT_(?:MEMORY|TIME))|TYPE_(?:INTEGER|FLOAT|STRING|KEY|VECTOR|ROTATION|INVALID)|(?:DEBUG|PUBLIC)_CHANNEL|ATTACH_(?:AVATAR_CENTER|CHEST|HEAD|BACK|PELVIS|MOUTH|CHIN|NECK|NOSE|BELLY|[LR](?:SHOULDER|HAND|FOOT|EAR|EYE|[UL](?:ARM|LEG)|HIP)|(?:LEFT|RIGHT)_PEC|HUD_(?:CENTER_[12]|TOP_(?:RIGHT|CENTER|LEFT)|BOTTOM(?:_(?:RIGHT|LEFT))?)|[LR]HAND_RING1|TAIL_(?:BASE|TIP)|[LR]WING|FACE_(?:JAW|[LR]EAR|[LR]EYE|TOUNGE)|GROIN|HIND_[LR]FOOT)|LAND_(?:LEVEL|RAISE|LOWER|SMOOTH|NOISE|REVERT)|DATA_(?:ONLINE|NAME|BORN|SIM_(?:POS|STATUS|RATING)|PAYINFO)|PAYMENT_INFO_(?:ON_FILE|USED)|REMOTE_DATA_(?:CHANNEL|REQUEST|REPLY)|PSYS_(?:PART_(?:BF_(?:ZERO|ONE(?:_MINUS_(?:DEST_COLOR|SOURCE_(ALPHA|COLOR)))?|DEST_COLOR|SOURCE_(ALPHA|COLOR))|BLEND_FUNC_(DEST|SOURCE)|FLAGS|(?:START|END)_(?:COLOR|ALPHA|SCALE|GLOW)|MAX_AGE|(?:RIBBON|WIND|INTERP_(?:COLOR|SCALE)|BOUNCE|FOLLOW_(?:SRC|VELOCITY)|TARGET_(?:POS|LINEAR)|EMISSIVE)_MASK)|SRC_(?:MAX_AGE|PATTERN|ANGLE_(?:BEGIN|END)|BURST_(?:RATE|PART_COUNT|RADIUS|SPEED_(?:MIN|MAX))|ACCEL|TEXTURE|TARGET_KEY|OMEGA|PATTERN_(?:DROP|EXPLODE|ANGLE(?:_CONE(?:_EMPTY)?)?)))|VEHICLE_(?:REFERENCE_FRAME|TYPE_(?:NONE|SLED|CAR|BOAT|AIRPLANE|BALLOON)|(?:LINEAR|ANGULAR)_(?:FRICTION_TIMESCALE|MOTOR_DIRECTION)|LINEAR_MOTOR_OFFSET|HOVER_(?:HEIGHT|EFFICIENCY|TIMESCALE)|BUOYANCY|(?:LINEAR|ANGULAR)_(?:DEFLECTION_(?:EFFICIENCY|TIMESCALE)|MOTOR_(?:DECAY_)?TIMESCALE)|VERTICAL_ATTRACTION_(?:EFFICIENCY|TIMESCALE)|BANKING_(?:EFFICIENCY|MIX|TIMESCALE)|FLAG_(?:NO_DEFLECTION_UP|LIMIT_(?:ROLL_ONLY|MOTOR_UP)|HOVER_(?:(?:WATER|TERRAIN|UP)_ONLY|GLOBAL_HEIGHT)|MOUSELOOK_(?:STEER|BANK)|CAMERA_DECOUPLED))|PRIM_(?:ALPHA_MODE(?:_(?:BLEND|EMISSIVE|MASK|NONE))?|NORMAL|SPECULAR|TYPE(?:_(?:BOX|CYLINDER|PRISM|SPHERE|TORUS|TUBE|RING|SCULPT))?|HOLE_(?:DEFAULT|CIRCLE|SQUARE|TRIANGLE)|MATERIAL(?:_(?:STONE|METAL|GLASS|WOOD|FLESH|PLASTIC|RUBBER))?|SHINY_(?:NONE|LOW|MEDIUM|HIGH)|BUMP_(?:NONE|BRIGHT|DARK|WOOD|BARK|BRICKS|CHECKER|CONCRETE|TILE|STONE|DISKS|GRAVEL|BLOBS|SIDING|LARGETILE|STUCCO|SUCTION|WEAVE)|TEXGEN_(?:DEFAULT|PLANAR)|SCULPT_(?:TYPE_(?:SPHERE|TORUS|PLANE|CYLINDER|MASK)|FLAG_(?:MIRROR|INVERT))|PHYSICS(?:_(?:SHAPE_(?:CONVEX|NONE|PRIM|TYPE)))?|(?:POS|ROT)_LOCAL|SLICE|TEXT|FLEXIBLE|POINT_LIGHT|TEMP_ON_REZ|PHANTOM|POSITION|SIZE|ROTATION|TEXTURE|NAME|OMEGA|DESC|LINK_TARGET|COLOR|BUMP_SHINY|FULLBRIGHT|TEXGEN|GLOW|MEDIA_(?:ALT_IMAGE_ENABLE|CONTROLS|(?:CURRENT|HOME)_URL|AUTO_(?:LOOP|PLAY|SCALE|ZOOM)|FIRST_CLICK_INTERACT|(?:WIDTH|HEIGHT)_PIXELS|WHITELIST(?:_ENABLE)?|PERMS_(?:INTERACT|CONTROL)|PARAM_MAX|CONTROLS_(?:STANDARD|MINI)|PERM_(?:NONE|OWNER|GROUP|ANYONE)|MAX_(?:URL_LENGTH|WHITELIST_(?:SIZE|COUNT)|(?:WIDTH|HEIGHT)_PIXELS)))|MASK_(?:BASE|OWNER|GROUP|EVERYONE|NEXT)|PERM_(?:TRANSFER|MODIFY|COPY|MOVE|ALL)|PARCEL_(?:MEDIA_COMMAND_(?:STOP|PAUSE|PLAY|LOOP|TEXTURE|URL|TIME|AGENT|UNLOAD|AUTO_ALIGN|TYPE|SIZE|DESC|LOOP_SET)|FLAG_(?:ALLOW_(?:FLY|(?:GROUP_)?SCRIPTS|LANDMARK|TERRAFORM|DAMAGE|CREATE_(?:GROUP_)?OBJECTS)|USE_(?:ACCESS_(?:GROUP|LIST)|BAN_LIST|LAND_PASS_LIST)|LOCAL_SOUND_ONLY|RESTRICT_PUSHOBJECT|ALLOW_(?:GROUP|ALL)_OBJECT_ENTRY)|COUNT_(?:TOTAL|OWNER|GROUP|OTHER|SELECTED|TEMP)|DETAILS_(?:NAME|DESC|OWNER|GROUP|AREA|ID|SEE_AVATARS))|LIST_STAT_(?:MAX|MIN|MEAN|MEDIAN|STD_DEV|SUM(?:_SQUARES)?|NUM_COUNT|GEOMETRIC_MEAN|RANGE)|PAY_(?:HIDE|DEFAULT)|REGION_FLAG_(?:ALLOW_DAMAGE|FIXED_SUN|BLOCK_TERRAFORM|SANDBOX|DISABLE_(?:COLLISIONS|PHYSICS)|BLOCK_FLY|ALLOW_DIRECT_TELEPORT|RESTRICT_PUSHOBJECT)|HTTP_(?:METHOD|MIMETYPE|BODY_(?:MAXLENGTH|TRUNCATED)|CUSTOM_HEADER|PRAGMA_NO_CACHE|VERBOSE_THROTTLE|VERIFY_CERT)|STRING_(?:TRIM(?:_(?:HEAD|TAIL))?)|CLICK_ACTION_(?:NONE|TOUCH|SIT|BUY|PAY|OPEN(?:_MEDIA)?|PLAY|ZOOM)|TOUCH_INVALID_FACE|PROFILE_(?:NONE|SCRIPT_MEMORY)|RC_(?:DATA_FLAGS|DETECT_PHANTOM|GET_(?:LINK_NUM|NORMAL|ROOT_KEY)|MAX_HITS|REJECT_(?:TYPES|AGENTS|(?:NON)?PHYSICAL|LAND))|RCERR_(?:CAST_TIME_EXCEEDED|SIM_PERF_LOW|UNKNOWN)|ESTATE_ACCESS_(?:ALLOWED_(?:AGENT|GROUP)_(?:ADD|REMOVE)|BANNED_AGENT_(?:ADD|REMOVE))|DENSITY|FRICTION|RESTITUTION|GRAVITY_MULTIPLIER|KFM_(?:COMMAND|CMD_(?:PLAY|STOP|PAUSE)|MODE|FORWARD|LOOP|PING_PONG|REVERSE|DATA|ROTATION|TRANSLATION)|ERR_(?:GENERIC|PARCEL_PERMISSIONS|MALFORMED_PARAMS|RUNTIME_PERMISSIONS|THROTTLED)|CHARACTER_(?:CMD_(?:(?:SMOOTH_)?STOP|JUMP)|DESIRED_(?:TURN_)?SPEED|RADIUS|STAY_WITHIN_PARCEL|LENGTH|ORIENTATION|ACCOUNT_FOR_SKIPPED_FRAMES|AVOIDANCE_MODE|TYPE(?:_(?:[ABCD]|NONE))?|MAX_(?:DECEL|TURN_RADIUS|(?:ACCEL|SPEED)))|PURSUIT_(?:OFFSET|FUZZ_FACTOR|GOAL_TOLERANCE|INTERCEPT)|REQUIRE_LINE_OF_SIGHT|FORCE_DIRECT_PATH|VERTICAL|HORIZONTAL|AVOID_(?:CHARACTERS|DYNAMIC_OBSTACLES|NONE)|PU_(?:EVADE_(?:HIDDEN|SPOTTED)|FAILURE_(?:DYNAMIC_PATHFINDING_DISABLED|INVALID_(?:GOAL|START)|NO_(?:NAVMESH|VALID_DESTINATION)|OTHER|TARGET_GONE|(?:PARCEL_)?UNREACHABLE)|(?:GOAL|SLOWDOWN_DISTANCE)_REACHED)|TRAVERSAL_TYPE(?:_(?:FAST|NONE|SLOW))?|CONTENT_TYPE_(?:ATOM|FORM|HTML|JSON|LLSD|RSS|TEXT|XHTML|XML)|GCNP_(?:RADIUS|STATIC)|(?:PATROL|WANDER)_PAUSE_AT_WAYPOINTS|OPT_(?:AVATAR|CHARACTER|EXCLUSION_VOLUME|LEGACY_LINKSET|MATERIAL_VOLUME|OTHER|STATIC_OBSTACLE|WALKABLE)|SIM_STAT_PCT_CHARS_STEPPED)\\b"},{b:"\\b(?:FALSE|TRUE)\\b"},{b:"\\b(?:ZERO_ROTATION)\\b"},{b:"\\b(?:EOF|JSON_(?:ARRAY|DELETE|FALSE|INVALID|NULL|NUMBER|OBJECT|STRING|TRUE)|NULL_KEY|TEXTURE_(?:BLANK|DEFAULT|MEDIA|PLYWOOD|TRANSPARENT)|URL_REQUEST_(?:GRANTED|DENIED))\\b"},{b:"\\b(?:ZERO_VECTOR|TOUCH_INVALID_(?:TEXCOORD|VECTOR))\\b"}]},O={cN:"built_in",b:"\\b(?:ll(?:AgentInExperience|(?:Create|DataSize|Delete|KeyCount|Keys|Read|Update)KeyValue|GetExperience(?:Details|ErrorMessage)|ReturnObjectsBy(?:ID|Owner)|Json(?:2List|[GS]etValue|ValueType)|Sin|Cos|Tan|Atan2|Sqrt|Pow|Abs|Fabs|Frand|Floor|Ceil|Round|Vec(?:Mag|Norm|Dist)|Rot(?:Between|2(?:Euler|Fwd|Left|Up))|(?:Euler|Axes)2Rot|Whisper|(?:Region|Owner)?Say|Shout|Listen(?:Control|Remove)?|Sensor(?:Repeat|Remove)?|Detected(?:Name|Key|Owner|Type|Pos|Vel|Grab|Rot|Group|LinkNumber)|Die|Ground|Wind|(?:[GS]et)(?:AnimationOverride|MemoryLimit|PrimMediaParams|ParcelMusicURL|Object(?:Desc|Name)|PhysicsMaterial|Status|Scale|Color|Alpha|Texture|Pos|Rot|Force|Torque)|ResetAnimationOverride|(?:Scale|Offset|Rotate)Texture|(?:Rot)?Target(?:Remove)?|(?:Stop)?MoveToTarget|Apply(?:Rotational)?Impulse|Set(?:KeyframedMotion|ContentType|RegionPos|(?:Angular)?Velocity|Buoyancy|HoverHeight|ForceAndTorque|TimerEvent|ScriptState|Damage|TextureAnim|Sound(?:Queueing|Radius)|Vehicle(?:Type|(?:Float|Vector|Rotation)Param)|(?:Touch|Sit)?Text|Camera(?:Eye|At)Offset|PrimitiveParams|ClickAction|Link(?:Alpha|Color|PrimitiveParams(?:Fast)?|Texture(?:Anim)?|Camera|Media)|RemoteScriptAccessPin|PayPrice|LocalRot)|ScaleByFactor|Get(?:(?:Max|Min)ScaleFactor|ClosestNavPoint|StaticPath|SimStats|Env|PrimitiveParams|Link(?:PrimitiveParams|Number(?:OfSides)?|Key|Name|Media)|HTTPHeader|FreeURLs|Object(?:Details|PermMask|PrimCount)|Parcel(?:MaxPrims|Details|Prim(?:Count|Owners))|Attached(?:List)?|(?:SPMax|Free|Used)Memory|Region(?:Name|TimeDilation|FPS|Corner|AgentCount)|Root(?:Position|Rotation)|UnixTime|(?:Parcel|Region)Flags|(?:Wall|GMT)clock|SimulatorHostname|BoundingBox|GeometricCenter|Creator|NumberOf(?:Prims|NotecardLines|Sides)|Animation(?:List)?|(?:Camera|Local)(?:Pos|Rot)|Vel|Accel|Omega|Time(?:stamp|OfDay)|(?:Object|CenterOf)?Mass|MassMKS|Energy|Owner|(?:Owner)?Key|SunDirection|Texture(?:Offset|Scale|Rot)|Inventory(?:Number|Name|Key|Type|Creator|PermMask)|Permissions(?:Key)?|StartParameter|List(?:Length|EntryType)|Date|Agent(?:Size|Info|Language|List)|LandOwnerAt|NotecardLine|Script(?:Name|State))|(?:Get|Reset|GetAndReset)Time|PlaySound(?:Slave)?|LoopSound(?:Master|Slave)?|(?:Trigger|Stop|Preload)Sound|(?:(?:Get|Delete)Sub|Insert)String|To(?:Upper|Lower)|Give(?:InventoryList|Money)|RezObject|(?:Stop)?LookAt|Sleep|CollisionFilter|(?:Take|Release)Controls|DetachFromAvatar|AttachToAvatar(?:Temp)?|InstantMessage|(?:GetNext)?Email|StopHover|MinEventDelay|RotLookAt|String(?:Length|Trim)|(?:Start|Stop)Animation|TargetOmega|Request(?:Experience)?Permissions|(?:Create|Break)Link|BreakAllLinks|(?:Give|Remove)Inventory|Water|PassTouches|Request(?:Agent|Inventory)Data|TeleportAgent(?:Home|GlobalCoords)?|ModifyLand|CollisionSound|ResetScript|MessageLinked|PushObject|PassCollisions|AxisAngle2Rot|Rot2(?:Axis|Angle)|A(?:cos|sin)|AngleBetween|AllowInventoryDrop|SubStringIndex|List2(?:CSV|Integer|Json|Float|String|Key|Vector|Rot|List(?:Strided)?)|DeleteSubList|List(?:Statistics|Sort|Randomize|(?:Insert|Find|Replace)List)|EdgeOfWorld|AdjustSoundVolume|Key2Name|TriggerSoundLimited|EjectFromLand|(?:CSV|ParseString)2List|OverMyLand|SameGroup|UnSit|Ground(?:Slope|Normal|Contour)|GroundRepel|(?:Set|Remove)VehicleFlags|(?:AvatarOn)?(?:Link)?SitTarget|Script(?:Danger|Profiler)|Dialog|VolumeDetect|ResetOtherScript|RemoteLoadScriptPin|(?:Open|Close)RemoteDataChannel|SendRemoteData|RemoteDataReply|(?:Integer|String)ToBase64|XorBase64|Log(?:10)?|Base64To(?:String|Integer)|ParseStringKeepNulls|RezAtRoot|RequestSimulatorData|ForceMouselook|(?:Load|Release|(?:E|Une)scape)URL|ParcelMedia(?:CommandList|Query)|ModPow|MapDestination|(?:RemoveFrom|AddTo|Reset)Land(?:Pass|Ban)List|(?:Set|Clear)CameraParams|HTTP(?:Request|Response)|TextBox|DetectedTouch(?:UV|Face|Pos|(?:N|Bin)ormal|ST)|(?:MD5|SHA1|DumpList2)String|Request(?:Secure)?URL|Clear(?:Prim|Link)Media|(?:Link)?ParticleSystem|(?:Get|Request)(?:Username|DisplayName)|RegionSayTo|CastRay|GenerateKey|TransferLindenDollars|ManageEstateAccess|(?:Create|Delete)Character|ExecCharacterCmd|Evade|FleeFrom|NavigateTo|PatrolPoints|Pursue|UpdateCharacter|WanderWithin))\\b"};return{i:":",c:[e,{cN:"comment",v:[E.C("//","$"),E.C("/\\*","\\*/")]},A,{cN:"section",v:[{b:"\\b(?:state|default)\\b"},{b:"\\b(?:state_(?:entry|exit)|touch(?:_(?:start|end))?|(?:land_)?collision(?:_(?:start|end))?|timer|listen|(?:no_)?sensor|control|(?:not_)?at_(?:rot_)?target|money|email|experience_permissions(?:_denied)?|run_time_permissions|changed|attach|dataserver|moving_(?:start|end)|link_message|(?:on|object)_rez|remote_data|http_re(?:sponse|quest)|path_update|transaction_result)\\b"}]},O,R,{cN:"type",b:"\\b(?:integer|float|string|key|vector|quaternion|rotation|list)\\b"}]}});hljs.registerLanguage("dos",function(e){var r=e.C(/^\s*@?rem\b/,/$/,{r:10}),t={cN:"symbol",b:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",r:0};return{aliases:["bat","cmd"],cI:!0,i:/\/\*/,k:{keyword:"if else goto for in do call exit not exist errorlevel defined equ neq lss leq gtr geq",built_in:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux shift cd dir echo setlocal endlocal set pause copy append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol ping net ipconfig taskkill xcopy ren del"},c:[{cN:"variable",b:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{cN:"function",b:t.b,e:"goto:eof",c:[e.inherit(e.TM,{b:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),r]},{cN:"number",b:"\\b\\d+",r:0},r]}});hljs.registerLanguage("puppet",function(e){var s={keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms dbRule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},r=e.C("#","$"),a="([A-Za-z_]|::)(\\w|::)*",i=e.inherit(e.TM,{b:a}),o={cN:"variable",b:"\\$"+a},t={cN:"string",c:[e.BE,o],v:[{b:/'/,e:/'/},{b:/"/,e:/"/}]};return{aliases:["pp"],c:[r,o,t,{bK:"class",e:"\\{|;",i:/=/,c:[i,r]},{bK:"define",e:/\{/,c:[{cN:"section",b:e.IR,endsParent:!0}]},{b:e.IR+"\\s+\\{",rB:!0,e:/\S/,c:[{cN:"keyword",b:e.IR},{b:/\{/,e:/\}/,k:s,r:0,c:[t,r,{b:"[a-zA-Z_]+\\s*=>",rB:!0,e:"=>",c:[{cN:"attr",b:e.IR}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},o]}],r:0}]}});hljs.registerLanguage("swift",function(e){var i={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false fileprivate final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating open operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},t={cN:"type",b:"\\b[A-Z][\\wÀ-ʸ']*",r:0},n=e.C("/\\*","\\*/",{c:["self"]}),r={cN:"subst",b:/\\\(/,e:"\\)",k:i,c:[]},a={cN:"number",b:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",r:0},o=e.inherit(e.QSM,{c:[r,e.BE]});return r.c=[a],{k:i,c:[o,e.CLCM,n,t,a,{cN:"function",bK:"func",e:"{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{b://},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:i,c:["self",a,o,e.CBCM,{b:":"}],i:/["']/}],i:/\[|%/},{cN:"class",bK:"struct protocol class extension enum",k:i,e:"\\{",eE:!0,c:[e.inherit(e.TM,{b:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/})]},{cN:"meta",b:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{bK:"import",e:/$/,c:[e.CLCM,n]}]}});hljs.registerLanguage("gcode",function(N){var e="[A-Z_][A-Z0-9_.]*",c="\\%",E="IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR",i={cN:"meta",b:"([O])([0-9]+)"},n=[N.CLCM,N.CBCM,N.C(/\(/,/\)/),N.inherit(N.CNM,{b:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+N.CNR}),N.inherit(N.ASM,{i:null}),N.inherit(N.QSM,{i:null}),{cN:"name",b:"([G])([0-9]+\\.?[0-9]?)"},{cN:"name",b:"([M])([0-9]+\\.?[0-9]?)"},{cN:"attr",b:"(VC|VS|#)",e:"(\\d+)"},{cN:"attr",b:"(VZOFX|VZOFY|VZOFZ)"},{cN:"built_in",b:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",e:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{cN:"symbol",v:[{b:"N",e:"\\d+",i:"\\W"}]}];return{aliases:["nc"],cI:!0,l:e,k:E,c:[{cN:"meta",b:c},i].concat(n)}});hljs.registerLanguage("ceylon",function(e){var a="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",t="shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small",s="doc by license see throws tagged",n={cN:"subst",eB:!0,eE:!0,b:/``/,e:/``/,k:a,r:10},r=[{cN:"string",b:'"""',e:'"""',r:10},{cN:"string",b:'"',e:'"',c:[n]},{cN:"string",b:"'",e:"'"},{cN:"number",b:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",r:0}];return n.c=r,{k:{keyword:a+" "+t,meta:s},i:"\\$[^01]|#[^0-9a-fA-F]",c:[e.CLCM,e.C("/\\*","\\*/",{c:["self"]}),{cN:"meta",b:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(r)}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/\b-?[a-z\._]+\b/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("dockerfile",function(e){return{aliases:["docker"],cI:!0,k:"from maintainer expose env arg user onbuild stopsignal",c:[e.HCM,e.ASM,e.QSM,e.NM,{bK:"run cmd entrypoint volume add copy workdir label healthcheck shell",starts:{e:/[^\\]\n/,sL:"bash"}}],i:"",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:i.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[s,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[s]},s]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("protobuf",function(e){return{k:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},c:[e.QSM,e.NM,e.CLCM,{cN:"class",bK:"message enum service",e:/\{/,i:/\n/,c:[e.inherit(e.TM,{starts:{eW:!0,eE:!0}})]},{cN:"function",bK:"rpc",e:/;/,eE:!0,k:"rpc returns"},{b:/^\s*[A-Z_]+/,e:/\s*=/,eE:!0}]}});hljs.registerLanguage("matlab",function(e){var a=[e.CNM,{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]}],s={r:0,c:[{b:/'['\.]*/}]};return{k:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},i:'(//|"|#|/\\*|\\s+/\\w+)',c:[{cN:"function",bK:"function",e:"$",c:[e.UTM,{cN:"params",v:[{b:"\\(",e:"\\)"},{b:"\\[",e:"\\]"}]}]},{b:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,rB:!0,r:0,c:[{b:/[a-zA-Z_][a-zA-Z_0-9]*/,r:0},s.c[0]]},{b:"\\[",e:"\\]",c:a,r:0,starts:s},{b:"\\{",e:/}/,c:a,r:0,starts:s},{b:/\)/,r:0,starts:s},e.C("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.C("\\%","$")].concat(a)}});hljs.registerLanguage("irpf90",function(e){var t={cN:"params",b:"\\(",e:"\\)"},n={literal:".False. .True.",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"};return{cI:!0,k:n,i:/\/\*/,c:[e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{cN:"string",r:0}),{cN:"function",bK:"subroutine function program",i:"[${=\\n]",c:[e.UTM,t]},e.C("!","$",{r:0}),e.C("begin_doc","end_doc",{r:10}),{cN:"number",b:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",r:0}]}});hljs.registerLanguage("kotlin",function(e){var t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit initinterface annotation data sealed internal infix operator out by constructor super trait volatile transient native default",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},r={cN:"keyword",b:/\b(break|continue|return|this)\b/,starts:{c:[{cN:"symbol",b:/@\w+/}]}},i={cN:"symbol",b:e.UIR+"@"},n={cN:"subst",b:"\\${",e:"}",c:[e.ASM,e.CNM]},a={cN:"variable",b:"\\$"+e.UIR},c={cN:"string",v:[{b:'"""',e:'"""',c:[a,n]},{b:"'",e:"'",i:/\n/,c:[e.BE]},{b:'"',e:'"',i:/\n/,c:[e.BE,a,n]}]},s={cN:"meta",b:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UIR+")?"},o={cN:"meta",b:"@"+e.UIR,c:[{b:/\(/,e:/\)/,c:[e.inherit(c,{cN:"meta-string"})]}]};return{k:t,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,r,i,s,o,{cN:"function",bK:"fun",e:"[(]|$",rB:!0,eE:!0,k:t,i:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,r:5,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"type",b://,k:"reified",r:0},{cN:"params",b:/\(/,e:/\)/,endsParent:!0,k:t,r:0,c:[{b:/:/,e:/[=,\/]/,eW:!0,c:[{cN:"type",b:e.UIR},e.CLCM,e.CBCM],r:0},e.CLCM,e.CBCM,s,o,c,e.CNM]},e.CBCM]},{cN:"class",bK:"class interface trait",e:/[:\{(]|$/,eE:!0,i:"extends implements",c:[{bK:"public protected internal private constructor"},e.UTM,{cN:"type",b://,eB:!0,eE:!0,r:0},{cN:"type",b:/[,:]\s*/,e:/[<\(,]|$/,eB:!0,rE:!0},s,o]},c,{cN:"meta",b:"^#!/usr/bin/env",e:"$",i:"\n"},e.CNM]}});hljs.registerLanguage("crmsh",function(t){var e="primitive rsc_template",r="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml",s="property rsc_defaults op_defaults",a="params meta operations op dbRule attributes utilization",i="read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",o="number string",n="Master Started Slave Stopped start promote demote stop monitor true false";return{aliases:["crm","pcmk"],cI:!0,k:{keyword:a+" "+i+" "+o,literal:n},c:[t.HCM,{bK:"node",starts:{e:"\\s*([\\w_-]+:)?",starts:{cN:"title",e:"\\s*[\\$\\w_][\\w_-]*"}}},{bK:e,starts:{cN:"title",e:"\\s*[\\$\\w_][\\w_-]*",starts:{e:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{b:"\\b("+r.split(" ").join("|")+")\\s+",k:r,starts:{cN:"title",e:"[\\$\\w_][\\w_-]*"}},{bK:s,starts:{cN:"title",e:"\\s*([\\w_-]+:)?"}},t.QSM,{cN:"meta",b:"(ocf|systemd|service|lsb):[\\w_:-]+",r:0},{cN:"number",b:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",r:0},{cN:"literal",b:"[-]?(infinity|inf)",r:0},{cN:"attr",b:/([A-Za-z\$_\#][\w_-]+)=/,r:0},{cN:"tag",b:"",r:0}]}});hljs.registerLanguage("haskell",function(e){var i={v:[e.C("--","$"),e.C("{-","-}",{c:["self"]})]},a={cN:"meta",b:"{-#",e:"#-}"},l={cN:"meta",b:"^#",e:"$"},c={cN:"type",b:"\\b[A-Z][\\w']*",r:0},n={b:"\\(",e:"\\)",i:'"',c:[a,l,{cN:"type",b:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TM,{b:"[_a-z][\\w']*"}),i]},s={b:"{",e:"}",c:n.c};return{aliases:["hs"],k:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",c:[{bK:"module",e:"where",k:"module where",c:[n,i],i:"\\W\\.|;"},{b:"\\bimport\\b",e:"$",k:"import qualified as hiding",c:[n,i],i:"\\W\\.|;"},{cN:"class",b:"^(\\s*)?(class|instance)\\b",e:"where",k:"class family instance where",c:[c,n,i]},{cN:"class",b:"\\b(data|(new)?type)\\b",e:"$",k:"data family type newtype deriving",c:[a,c,n,s,i]},{bK:"default",e:"$",c:[c,n,i]},{bK:"infix infixl infixr",e:"$",c:[e.CNM,i]},{b:"\\bforeign\\b",e:"$",k:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",c:[c,e.QSM,i]},{cN:"meta",b:"#!\\/usr\\/bin\\/env runhaskell",e:"$"},a,l,e.QSM,e.CNM,c,e.inherit(e.TM,{b:"^[_a-z][\\w']*"}),i,{b:"->|<-"}]}});hljs.registerLanguage("flix",function(e){var t={cN:"string",b:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},i={cN:"string",v:[{b:'"',e:'"'}]},n={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/},c={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[n]};return{k:{literal:"true false",keyword:"case class def else enum if impl import in lat rel index let match namespace switch type yield with"},c:[e.CLCM,e.CBCM,t,i,c,e.CNM]}});hljs.registerLanguage("scala",function(e){var t={cN:"meta",b:"@[A-Za-z]+"},a={cN:"subst",v:[{b:"\\$[A-Za-z0-9_]+"},{b:"\\${",e:"}"}]},r={cN:"string",v:[{b:'"',e:'"',i:"\\n",c:[e.BE]},{b:'"""',e:'"""',r:10},{b:'[a-z]+"',e:'"',i:"\\n",c:[e.BE,a]},{cN:"string",b:'[a-z]+"""',e:'"""',c:[a],r:10}]},c={cN:"symbol",b:"'\\w[\\w\\d_]*(?!')"},i={cN:"type",b:"\\b[A-Z][A-Za-z0-9_]*",r:0},s={cN:"title",b:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,r:0},n={cN:"class",bK:"class object trait type",e:/[:={\[\n;]/,eE:!0,c:[{bK:"extends with",r:10},{b:/\[/,e:/\]/,eB:!0,eE:!0,r:0,c:[i]},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,r:0,c:[i]},s]},l={cN:"function",bK:"def",e:/[:={\[(\n;]/,eE:!0,c:[s]};return{k:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},c:[e.CLCM,e.CBCM,r,c,i,l,n,e.CNM,t]}});hljs.registerLanguage("powershell",function(e){var t={b:"`[\\s\\S]",r:0},o={cN:"variable",v:[{b:/\$[\w\d][\w\d_:]*/}]},r={cN:"literal",b:/\$(null|true|false)\b/},n={cN:"string",v:[{b:/"/,e:/"/},{b:/@"/,e:/^"@/}],c:[t,o,{cN:"variable",b:/\$[A-z]/,e:/[^A-z]/}]},a={cN:"string",v:[{b:/'/,e:/'/},{b:/@'/,e:/^'@/}]},i={cN:"doctag",v:[{b:/\.(synopsis|description|example|inputs|outputs|notes|link|component|role|functionality)/},{b:/\.(parameter|forwardhelptargetname|forwardhelpcategory|remotehelprunspace|externalhelp)\s+\S+/}]},s=e.inherit(e.C(null,null),{v:[{b:/#/,e:/$/},{b:/<#/,e:/#>/}],c:[i]});return{aliases:["ps"],l:/-?[A-z\.\-]+/,cI:!0,k:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",built_in:"Add-Computer Add-Content Add-History Add-JobTrigger Add-Member Add-PSSnapin Add-Type Checkpoint-Computer Clear-Content Clear-EventLog Clear-History Clear-Host Clear-Item Clear-ItemProperty Clear-Variable Compare-Object Complete-Transaction Connect-PSSession Connect-WSMan Convert-Path ConvertFrom-Csv ConvertFrom-Json ConvertFrom-SecureString ConvertFrom-StringData ConvertTo-Csv ConvertTo-Html ConvertTo-Json ConvertTo-SecureString ConvertTo-Xml Copy-Item Copy-ItemProperty Debug-Process Disable-ComputerRestore Disable-JobTrigger Disable-PSBreakpoint Disable-PSRemoting Disable-PSSessionConfiguration Disable-WSManCredSSP Disconnect-PSSession Disconnect-WSMan Disable-ScheduledJob Enable-ComputerRestore Enable-JobTrigger Enable-PSBreakpoint Enable-PSRemoting Enable-PSSessionConfiguration Enable-ScheduledJob Enable-WSManCredSSP Enter-PSSession Exit-PSSession Export-Alias Export-Clixml Export-Console Export-Counter Export-Csv Export-FormatData Export-ModuleMember Export-PSSession ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-ComputerRestorePoint Get-Content Get-ControlPanelItem Get-Counter Get-Credential Get-Culture Get-Date Get-Event Get-EventLog Get-EventSubscriber Get-ExecutionPolicy Get-FormatData Get-Host Get-HotFix Get-Help Get-History Get-IseSnippet Get-Item Get-ItemProperty Get-Job Get-JobTrigger Get-Location Get-Member Get-Module Get-PfxCertificate Get-Process Get-PSBreakpoint Get-PSCallStack Get-PSDrive Get-PSProvider Get-PSSession Get-PSSessionConfiguration Get-PSSnapin Get-Random Get-ScheduledJob Get-ScheduledJobOption Get-Service Get-TraceSource Get-Transaction Get-TypeData Get-UICulture Get-Unique Get-Variable Get-Verb Get-WinEvent Get-WmiObject Get-WSManCredSSP Get-WSManInstance Group-Object Import-Alias Import-Clixml Import-Counter Import-Csv Import-IseSnippet Import-LocalizedData Import-PSSession Import-Module Invoke-AsWorkflow Invoke-Command Invoke-Expression Invoke-History Invoke-Item Invoke-RestMethod Invoke-WebRequest Invoke-WmiMethod Invoke-WSManAction Join-Path Limit-EventLog Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Event New-EventLog New-IseSnippet New-Item New-ItemProperty New-JobTrigger New-Object New-Module New-ModuleManifest New-PSDrive New-PSSession New-PSSessionConfigurationFile New-PSSessionOption New-PSTransportOption New-PSWorkflowExecutionOption New-PSWorkflowSession New-ScheduledJobOption New-Service New-TimeSpan New-Variable New-WebServiceProxy New-WinEvent New-WSManInstance New-WSManSessionOption Out-Default Out-File Out-GridView Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Receive-Job Register-EngineEvent Register-ObjectEvent Register-PSSessionConfiguration Register-ScheduledJob Register-WmiEvent Remove-Computer Remove-Event Remove-EventLog Remove-Item Remove-ItemProperty Remove-Job Remove-JobTrigger Remove-Module Remove-PSBreakpoint Remove-PSDrive Remove-PSSession Remove-PSSnapin Remove-TypeData Remove-Variable Remove-WmiObject Remove-WSManInstance Rename-Computer Rename-Item Rename-ItemProperty Reset-ComputerMachinePassword Resolve-Path Restart-Computer Restart-Service Restore-Computer Resume-Job Resume-Service Save-Help Select-Object Select-String Select-Xml Send-MailMessage Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-JobTrigger Set-Location Set-PSBreakpoint Set-PSDebug Set-PSSessionConfiguration Set-ScheduledJob Set-ScheduledJobOption Set-Service Set-StrictMode Set-TraceSource Set-Variable Set-WmiInstance Set-WSManInstance Set-WSManQuickConfig Show-Command Show-ControlPanelItem Show-EventLog Sort-Object Split-Path Start-Job Start-Process Start-Service Start-Sleep Start-Transaction Start-Transcript Stop-Computer Stop-Job Stop-Process Stop-Service Stop-Transcript Suspend-Job Suspend-Service Tee-Object Test-ComputerSecureChannel Test-Connection Test-ModuleManifest Test-Path Test-PSSessionConfigurationFile Trace-Command Unblock-File Undo-Transaction Unregister-Event Unregister-PSSessionConfiguration Unregister-ScheduledJob Update-FormatData Update-Help Update-List Update-TypeData Use-Transaction Wait-Event Wait-Job Wait-Process Where-Object Write-Debug Write-Error Write-EventLog Write-Host Write-Output Write-Progress Write-Verbose Write-Warning Add-MDTPersistentDrive Disable-MDTMonitorService Enable-MDTMonitorService Get-MDTDeploymentShareStatistics Get-MDTMonitorData Get-MDTOperatingSystemCatalog Get-MDTPersistentDrive Import-MDTApplication Import-MDTDriver Import-MDTOperatingSystem Import-MDTPackage Import-MDTTaskSequence New-MDTDatabase Remove-MDTMonitorData Remove-MDTPersistentDrive Restore-MDTPersistentDrive Set-MDTMonitorData Test-MDTDeploymentShare Test-MDTMonitorData Update-MDTDatabaseSchema Update-MDTDeploymentShare Update-MDTLinkedDS Update-MDTMedia Update-MDTMedia Add-VamtProductKey Export-VamtData Find-VamtManagedMachine Get-VamtConfirmationId Get-VamtProduct Get-VamtProductKey Import-VamtData Initialize-VamtData Install-VamtConfirmationId Install-VamtProductActivation Install-VamtProductKey Update-VamtProduct",nomarkup:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},c:[t,e.NM,n,a,r,o,s]}});hljs.registerLanguage("cal",function(e){var r="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",t="false true",c=[e.CLCM,e.C(/\{/,/\}/,{r:0}),e.C(/\(\*/,/\*\)/,{r:10})],n={cN:"string",b:/'/,e:/'/,c:[{b:/''/}]},o={cN:"string",b:/(#\d+)+/},a={cN:"number",b:"\\b\\d+(\\.\\d+)?(DT|D|T)",r:0},i={cN:"string",b:'"',e:'"'},d={cN:"function",bK:"procedure",e:/[:;]/,k:"procedure|10",c:[e.TM,{cN:"params",b:/\(/,e:/\)/,k:r,c:[n,o]}].concat(c)},s={cN:"class",b:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",rB:!0,c:[e.TM,d]};return{cI:!0,k:{keyword:r,literal:t},i:/\/\*/,c:[n,o,a,i,e.NM,s,d]}});hljs.registerLanguage("openscad",function(e){var r={cN:"keyword",b:"\\$(f[asn]|t|vp[rtd]|children)"},n={cN:"literal",b:"false|true|PI|undef"},o={cN:"number",b:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",r:0},i=e.inherit(e.QSM,{i:null}),t={cN:"meta",k:{"meta-keyword":"include use"},b:"include|use <",e:">"},s={cN:"params",b:"\\(",e:"\\)",c:["self",o,i,r,n]},c={b:"[*!#%]",r:0},a={cN:"function",bK:"module function",e:"\\=|\\{",c:[s,e.UTM]};return{aliases:["scad"],k:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},c:[e.CLCM,e.CBCM,o,t,i,r,c,a]}});hljs.registerLanguage("dts",function(e){var a={cN:"string",v:[e.inherit(e.QSM,{b:'((u8?|U)|L)?"'}),{b:'(u8?|U)?R"',e:'"',c:[e.BE]},{b:"'\\\\?.",e:"'",i:"."}]},c={cN:"number",v:[{b:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{b:e.CNR}],r:0},b={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef ifdef ifndef"},c:[{b:/\\\n/,r:0},{bK:"include",e:"$",k:{"meta-keyword":"include"},c:[e.inherit(a,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"}]},a,e.CLCM,e.CBCM]},i={cN:"variable",b:"\\&[a-z\\d_]*\\b"},r={cN:"meta-keyword",b:"/[a-z][a-z\\d-]*/"},d={cN:"symbol",b:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},n={cN:"params",b:"<",e:">",c:[c,i]},s={cN:"class",b:/[a-zA-Z_][a-zA-Z\d_@]*\s{/,e:/[{;=]/,rB:!0,eE:!0},t={cN:"class",b:"/\\s*{",e:"};",r:10,c:[i,r,d,s,n,e.CLCM,e.CBCM,c,a]};return{k:"",c:[t,i,r,d,s,n,e.CLCM,e.CBCM,c,a,b,{b:e.IR+"::",k:""}]}});hljs.registerLanguage("sml",function(e){return{aliases:["ml"],k:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},i:/\/\/|>>/,l:"[a-z_]\\w*!?",c:[{cN:"literal",b:/\[(\|\|)?\]|\(\)/,r:0},e.C("\\(\\*","\\*\\)",{c:["self"]}),{cN:"symbol",b:"'[A-Za-z_](?!')[\\w']*"},{cN:"type",b:"`[A-Z][\\w']*"},{cN:"type",b:"\\b[A-Z][\\w']*",r:0},{b:"[a-z_]\\w*'[\\w']*"},e.inherit(e.ASM,{cN:"string",r:0}),e.inherit(e.QSM,{i:null}),{cN:"number",b:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",r:0},{b:/[-=]>/}]}});hljs.registerLanguage("verilog",function(e){var n={keyword:"accept_on alias always always_comb always_ff always_latch and assert assign assume automatic before begin bind bins binsof bit break buf|0 bufif0 bufif1 byte case casex casez cell chandle checker class clocking cmos config const constraint context continue cover covergroup coverpoint cross deassign default defparam design disable dist do edge else end endcase endchecker endclass endclocking endconfig endfunction endgenerate endgroup endinterface endmodule endpackage endprimitive endprogram endproperty endspecify endsequence endtable endtask enum event eventually expect export extends extern final first_match for force foreach forever fork forkjoin function generate|5 genvar global highz0 highz1 if iff ifnone ignore_bins illegal_bins implements implies import incdir include initial inout input inside instance int integer interconnect interface intersect join join_any join_none large let liblist library local localparam logic longint macromodule matches medium modport module nand negedge nettype new nexttime nmos nor noshowcancelled not notif0 notif1 or output package packed parameter pmos posedge primitive priority program property protected pull0 pull1 pulldown pullup pulsestyle_ondetect pulsestyle_onevent pure rand randc randcase randsequence rcmos real realtime ref reg reject_on release repeat restrict return rnmos rpmos rtran rtranif0 rtranif1 s_always s_eventually s_nexttime s_until s_until_with scalared sequence shortint shortreal showcancelled signed small soft solve specify specparam static string strong strong0 strong1 struct super supply0 supply1 sync_accept_on sync_reject_on table tagged task this throughout time timeprecision timeunit tran tranif0 tranif1 tri tri0 tri1 triand trior trireg type typedef union unique unique0 unsigned until until_with untyped use uwire var vectored virtual void wait wait_order wand weak weak0 weak1 while wildcard wire with within wor xnor xor",literal:"null",built_in:"$finish $stop $exit $fatal $error $warning $info $realtime $time $printtimescale $bitstoreal $bitstoshortreal $itor $signed $cast $bits $stime $timeformat $realtobits $shortrealtobits $rtoi $unsigned $asserton $assertkill $assertpasson $assertfailon $assertnonvacuouson $assertoff $assertcontrol $assertpassoff $assertfailoff $assertvacuousoff $isunbounded $sampled $fell $changed $past_gclk $fell_gclk $changed_gclk $rising_gclk $steady_gclk $coverage_control $coverage_get $coverage_save $set_coverage_db_name $rose $stable $past $rose_gclk $stable_gclk $future_gclk $falling_gclk $changing_gclk $display $coverage_get_max $coverage_merge $get_coverage $load_coverage_db $typename $unpacked_dimensions $left $low $increment $clog2 $ln $log10 $exp $sqrt $pow $floor $ceil $sin $cos $tan $countbits $onehot $isunknown $fatal $warning $dimensions $right $high $size $asin $acos $atan $atan2 $hypot $sinh $cosh $tanh $asinh $acosh $atanh $countones $onehot0 $error $info $random $dist_chi_square $dist_erlang $dist_exponential $dist_normal $dist_poisson $dist_t $dist_uniform $q_initialize $q_remove $q_exam $async$and$array $async$nand$array $async$or$array $async$nor$array $sync$and$array $sync$nand$array $sync$or$array $sync$nor$array $q_add $q_full $psprintf $async$and$plane $async$nand$plane $async$or$plane $async$nor$plane $sync$and$plane $sync$nand$plane $sync$or$plane $sync$nor$plane $system $display $displayb $displayh $displayo $strobe $strobeb $strobeh $strobeo $write $readmemb $readmemh $writememh $value$plusargs $dumpvars $dumpon $dumplimit $dumpports $dumpportson $dumpportslimit $writeb $writeh $writeo $monitor $monitorb $monitorh $monitoro $writememb $dumpfile $dumpoff $dumpall $dumpflush $dumpportsoff $dumpportsall $dumpportsflush $fclose $fdisplay $fdisplayb $fdisplayh $fdisplayo $fstrobe $fstrobeb $fstrobeh $fstrobeo $swrite $swriteb $swriteh $swriteo $fscanf $fread $fseek $fflush $feof $fopen $fwrite $fwriteb $fwriteh $fwriteo $fmonitor $fmonitorb $fmonitorh $fmonitoro $sformat $sformatf $fgetc $ungetc $fgets $sscanf $rewind $ftell $ferror"};return{aliases:["v","sv","svh"],cI:!1,k:n,l:/[\w\$]+/,c:[e.CBCM,e.CLCM,e.QSM,{cN:"number",c:[e.BE],v:[{b:"\\b((\\d+'(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{b:"\\B(('(b|h|o|d|B|H|O|D))[0-9xzXZa-fA-F_]+)"},{b:"\\b([0-9_])+",r:0}]},{cN:"variable",v:[{b:"#\\((?!parameter).+\\)"},{b:"\\.\\w+",r:0}]},{cN:"meta",b:"`",e:"$",k:{"meta-keyword":"define __FILE__ __LINE__ begin_keywords celldefine default_nettype define else elsif end_keywords endcelldefine endif ifdef ifndef include line nounconnected_drive pragma resetall timescale unconnected_drive undef undefineall"},r:0}]}});hljs.registerLanguage("hsp",function(e){return{cI:!0,l:/[\w\._]+/,k:"goto gosub return break repeat loop continue wait await dim sdim foreach dimtype dup dupptr end stop newmod delmod mref run exgoto on mcall assert logmes newlab resume yield onexit onerror onkey onclick oncmd exist delete mkdir chdir dirlist bload bsave bcopy memfile if else poke wpoke lpoke getstr chdpm memexpand memcpy memset notesel noteadd notedel noteload notesave randomize noteunsel noteget split strrep setease button chgdisp exec dialog mmload mmplay mmstop mci pset pget syscolor mes print title pos circle cls font sysfont objsize picload color palcolor palette redraw width gsel gcopy gzoom gmode bmpsave hsvcolor getkey listbox chkbox combox input mesbox buffer screen bgscr mouse objsel groll line clrobj boxf objprm objmode stick grect grotate gsquare gradf objimage objskip objenable celload celdiv celput newcom querycom delcom cnvstow comres axobj winobj sendmsg comevent comevarg sarrayconv callfunc cnvwtos comevdisp libptr system hspstat hspver stat cnt err strsize looplev sublev iparam wparam lparam refstr refdval int rnd strlen length length2 length3 length4 vartype gettime peek wpeek lpeek varptr varuse noteinfo instr abs limit getease str strmid strf getpath strtrim sin cos tan atan sqrt double absf expf logf limitf powf geteasef mousex mousey mousew hwnd hinstance hdc ginfo objinfo dirinfo sysinfo thismod __hspver__ __hsp30__ __date__ __time__ __line__ __file__ _debug __hspdef__ and or xor not screen_normal screen_palette screen_hide screen_fixedsize screen_tool screen_frame gmode_gdi gmode_mem gmode_rgb0 gmode_alpha gmode_rgb0alpha gmode_add gmode_sub gmode_pixela ginfo_mx ginfo_my ginfo_act ginfo_sel ginfo_wx1 ginfo_wy1 ginfo_wx2 ginfo_wy2 ginfo_vx ginfo_vy ginfo_sizex ginfo_sizey ginfo_winx ginfo_winy ginfo_mesx ginfo_mesy ginfo_r ginfo_g ginfo_b ginfo_paluse ginfo_dispx ginfo_dispy ginfo_cx ginfo_cy ginfo_intid ginfo_newid ginfo_sx ginfo_sy objinfo_mode objinfo_bmscr objinfo_hwnd notemax notesize dir_cur dir_exe dir_win dir_sys dir_cmdline dir_desktop dir_mydoc dir_tv font_normal font_bold font_italic font_underline font_strikeout font_antialias objmode_normal objmode_guifont objmode_usefont gsquare_grad msgothic msmincho do until while wend for next _break _continue switch case default swbreak swend ddim ldim alloc m_pi rad2deg deg2rad ease_linear ease_quad_in ease_quad_out ease_quad_inout ease_cubic_in ease_cubic_out ease_cubic_inout ease_quartic_in ease_quartic_out ease_quartic_inout ease_bounce_in ease_bounce_out ease_bounce_inout ease_shake_in ease_shake_out ease_shake_inout ease_loop",c:[e.CLCM,e.CBCM,e.QSM,e.ASM,{cN:"string",b:'{"',e:'"}',c:[e.BE]},e.C(";","$",{r:0}),{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"addion cfunc cmd cmpopt comfunc const defcfunc deffunc define else endif enum epack func global if ifdef ifndef include modcfunc modfunc modinit modterm module pack packopt regcmd runtime undef usecom uselib"},c:[e.inherit(e.QSM,{cN:"meta-string"}),e.NM,e.CNM,e.CLCM,e.CBCM]},{cN:"symbol",b:"^\\*(\\w+|@)"},e.NM,e.CNM]}});hljs.registerLanguage("rib",function(e){return{k:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",i:""}]}});hljs.registerLanguage("elixir",function(e){var r="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",b="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",c={cN:"subst",b:"#\\{",e:"}",l:r,k:b},a={cN:"string",c:[e.BE,c],v:[{b:/'/,e:/'/},{b:/"/,e:/"/}]},i={cN:"function",bK:"def defp defmacro",e:/\B\b/,c:[e.inherit(e.TM,{b:r,endsParent:!0})]},l=e.inherit(i,{cN:"class",bK:"defimpl defmodule defprotocol defrecord",e:/\bdo\b|$|;/}),s=[a,e.HCM,l,i,{cN:"symbol",b:":(?!\\s)",c:[a,{b:n}],r:0},{cN:"symbol",b:r+":",r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{cN:"variable",b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{b:"->"},{b:"("+e.RSR+")\\s*",c:[e.HCM,{cN:"regexp",i:"\\n",c:[e.BE,c],v:[{b:"/",e:"/[a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}],r:0}];return c.c=s,{l:r,k:b,c:s}});hljs.registerLanguage("asciidoc",function(e){return{aliases:["adoc"],c:[e.C("^/{4,}\\n","\\n/{4,}$",{r:10}),e.C("^//","$",{r:0}),{cN:"title",b:"^\\.\\w.*$"},{b:"^[=\\*]{4,}\\n",e:"\\n^[=\\*]{4,}$",r:10},{cN:"section",r:10,v:[{b:"^(={1,5}) .+?( \\1)?$"},{b:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$"}]},{cN:"meta",b:"^:.+?:",e:"\\s",eE:!0,r:10},{cN:"meta",b:"^\\[.+?\\]$",r:0},{cN:"quote",b:"^_{4,}\\n",e:"\\n_{4,}$",r:10},{cN:"code",b:"^[\\-\\.]{4,}\\n",e:"\\n[\\-\\.]{4,}$",r:10},{b:"^\\+{4,}\\n",e:"\\n\\+{4,}$",c:[{b:"<",e:">",sL:"xml",r:0}],r:10},{cN:"bullet",b:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{cN:"symbol",b:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",r:10},{cN:"strong",b:"\\B\\*(?![\\*\\s])",e:"(\\n{2}|\\*)",c:[{b:"\\\\*\\w",r:0}]},{cN:"emphasis",b:"\\B'(?!['\\s])",e:"(\\n{2}|')",c:[{b:"\\\\'\\w",r:0}],r:0},{cN:"emphasis",b:"_(?![_\\s])",e:"(\\n{2}|_)",r:0},{cN:"string",v:[{b:"``.+?''"},{b:"`.+?'"}]},{cN:"code",b:"(`.+?`|\\+.+?\\+)",r:0},{cN:"code",b:"^[ \\t]",e:"$",r:0},{b:"^'{3,}[ \\t]*$",r:10},{b:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",rB:!0,c:[{b:"(link|image:?):",r:0},{cN:"link",b:"\\w",e:"[^\\[]+",r:0},{cN:"string",b:"\\[",e:"\\]",eB:!0,eE:!0,r:0}],r:10}]}});hljs.registerLanguage("capnproto",function(t){return{aliases:["capnp"],k:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},c:[t.QSM,t.NM,t.HCM,{cN:"meta",b:/@0x[\w\d]{16};/,i:/\n/},{cN:"symbol",b:/@\d+\b/},{cN:"class",bK:"struct enum",e:/\{/,i:/\n/,c:[t.inherit(t.TM,{starts:{eW:!0,eE:!0}})]},{cN:"class",bK:"interface",e:/\{/,i:/\n/,c:[t.inherit(t.TM,{starts:{eW:!0,eE:!0}})]}]}});hljs.registerLanguage("makefile",function(e){var i={cN:"variable",v:[{b:"\\$\\("+e.UIR+"\\)",c:[e.BE]},{b:/\$[@%%$#]",starts:{e:"$",sL:"bash"}}]}});hljs.registerLanguage("oxygene",function(e){var r="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",t=e.C("{","}",{r:0}),a=e.C("\\(\\*","\\*\\)",{r:10}),n={cN:"string",b:"'",e:"'",c:[{b:"''"}]},o={cN:"string",b:"(#\\d+)+"},i={cN:"function",bK:"function constructor destructor procedure method",e:"[:;]",k:"function constructor|10 destructor|10 procedure|10 method|10",c:[e.TM,{cN:"params",b:"\\(",e:"\\)",k:r,c:[n,o]},t,a]};return{cI:!0,l:/\.?\w+/,k:r,i:'("|\\$[G-Zg-z]|\\/\\*||->)',c:[t,a,e.CLCM,n,o,e.NM,i,{cN:"class",b:"=\\bclass\\b",e:"end;",k:r,c:[n,o,t,a,e.CLCM,i]}]}});hljs.registerLanguage("autoit",function(e){var t="ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",r="True False And Null Not Or",i="Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown, UDPShutdown TCPStartup, UDPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait",l={v:[e.C(";","$",{r:0}),e.C("#cs","#ce"),e.C("#comments-start","#comments-end")]},n={b:"\\$[A-z0-9_]+"},o={cN:"string",v:[{b:/"/,e:/"/,c:[{b:/""/,r:0}]},{b:/'/,e:/'/,c:[{b:/''/,r:0}]}]},a={v:[e.BNM,e.CNM]},S={cN:"meta",b:"#",e:"$",k:{"meta-keyword":"comments include include-once NoTrayIcon OnAutoItStartRegister pragma compile RequireAdmin"},c:[{b:/\\\n/,r:0},{bK:"include",k:{"meta-keyword":"include"},e:"$",c:[o,{cN:"meta-string",v:[{b:"<",e:">"},{b:/"/,e:/"/,c:[{b:/""/,r:0}]},{b:/'/,e:/'/,c:[{b:/''/,r:0}]}]}]},o,l]},C={cN:"symbol",b:"@[A-z0-9_]+"},s={cN:"function",bK:"Func",e:"$",i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:[n,o,a]}]};return{cI:!0,i:/\/\*/,k:{keyword:t,built_in:i,literal:r},c:[l,n,o,a,S,C,s]}});hljs.registerLanguage("axapta",function(e){return{k:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",c:[e.CLCM,e.CBCM,e.ASM,e.QSM,e.CNM,{cN:"meta",b:"#",e:"$"},{cN:"class",bK:"class interface",e:"{",eE:!0,i:":",c:[{bK:"extends implements"},e.UTM]}]}});hljs.registerLanguage("qml",function(r){var e={keyword:"in of on if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await import",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Behavior bool color coordinate date double enumeration font geocircle georectangle geoshape int list matrix4x4 parent point quaternion real rect size string url variant vector2d vector3d vector4dPromise"},t="[a-zA-Z_][a-zA-Z0-9\\._]*",a={cN:"keyword",b:"\\bproperty\\b",starts:{cN:"string",e:"(:|=|;|,|//|/\\*|$)",rE:!0}},n={cN:"keyword",b:"\\bsignal\\b",starts:{cN:"string",e:"(\\(|:|=|;|,|//|/\\*|$)",rE:!0}},o={cN:"attribute",b:"\\bid\\s*:",starts:{cN:"string",e:t,rE:!1}},i={b:t+"\\s*:",rB:!0,c:[{cN:"attribute",b:t,e:"\\s*:",eE:!0,r:0}],r:0},c={b:t+"\\s*{",e:"{",rB:!0,r:0,c:[r.inherit(r.TM,{b:t})]};return{aliases:["qt"],cI:!1,k:e,c:[{cN:"meta",b:/^\s*['"]use (strict|asm)['"]/},r.ASM,r.QSM,{cN:"string",b:"`",e:"`",c:[r.BE,{cN:"subst",b:"\\$\\{",e:"\\}"}]},r.CLCM,r.CBCM,{cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:r.CNR}],r:0},{b:"("+r.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[r.CLCM,r.CBCM,r.RM,{b:/\s*[);\]]/,r:0,sL:"xml"}],r:0},n,a,{cN:"function",bK:"function",e:/\{/,eE:!0,c:[r.inherit(r.TM,{b:/[A-Za-z$_][0-9A-Za-z$_]*/}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:[r.CLCM,r.CBCM]}],i:/\[|%/},{b:"\\."+r.IR,r:0},o,i,c],i:/#/}});hljs.registerLanguage("subunit",function(s){var r={cN:"string",b:"\\[\n(multipart)?",e:"\\]\n"},t={cN:"string",b:"\\d{4}-\\d{2}-\\d{2}(\\s+)\\d{2}:\\d{2}:\\d{2}.\\d+Z"},e={cN:"string",b:"(\\+|-)\\d+"},c={cN:"keyword",r:10,v:[{b:"^(test|testing|success|successful|failure|error|skip|xfail|uxsuccess)(:?)\\s+(test)?"},{b:"^progress(:?)(\\s+)?(pop|push)?"},{b:"^tags:"},{b:"^time:"}]};return{cI:!0,c:[r,t,e,c]}});hljs.registerLanguage("vala",function(t){return{k:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override virtual delegate if while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object Gtk Posix",literal:"false true null"},c:[{cN:"class",bK:"class interface namespace",e:"{",eE:!0,i:"[^,:\\n\\s\\.]",c:[t.UTM]},t.CLCM,t.CBCM,{cN:"string",b:'"""',e:'"""',r:5},t.ASM,t.QSM,t.CNM,{cN:"meta",b:"^#",e:"$",r:2}]}});hljs.registerLanguage("hy",function(e){var t={"builtin-name":"!= % %= & &= * ** **= *= *map + += , --build-class-- --import-- -= . / // //= /= < << <<= <= = > >= >> >>= @ @= ^ ^= abs accumulate all and any ap-compose ap-dotimes ap-each ap-each-while ap-filter ap-first ap-if ap-last ap-map ap-map-when ap-pipe ap-reduce ap-reject apply as-> ascii assert assoc bin break butlast callable calling-module-name car case cdr chain chr coll? combinations compile compress cond cons cons? continue count curry cut cycle dec def default-method defclass defmacro defmacro-alias defmacro/g! defmain defmethod defmulti defn defn-alias defnc defnr defreader defseq del delattr delete-route dict-comp dir disassemble dispatch-reader-macro distinct divmod do doto drop drop-last drop-while empty? end-sequence eval eval-and-compile eval-when-compile even? every? except exec filter first flatten float? fn fnc fnr for for* format fraction genexpr gensym get getattr global globals group-by hasattr hash hex id identity if if* if-not if-python2 import in inc input instance? integer integer-char? integer? interleave interpose is is-coll is-cons is-empty is-even is-every is-float is-instance is-integer is-integer-char is-iterable is-iterator is-keyword is-neg is-none is-not is-numeric is-odd is-pos is-string is-symbol is-zero isinstance islice issubclass iter iterable? iterate iterator? keyword keyword? lambda last len let lif lif-not list* list-comp locals loop macro-error macroexpand macroexpand-1 macroexpand-all map max merge-with method-decorator min multi-decorator multicombinations name neg? next none? nonlocal not not-in not? nth numeric? oct odd? open or ord partition permutations pos? post-route postwalk pow prewalk print product profile/calls profile/cpu put-route quasiquote quote raise range read read-str recursive-replace reduce remove repeat repeatedly repr require rest round route route-with-methods rwm second seq set-comp setattr setv some sorted string string? sum switch symbol? take take-nth take-while tee try unless unquote unquote-splicing vars walk when while with with* with-decorator with-gensyms xi xor yield yield-from zero? zip zip-longest | |= ~"},i="a-zA-Z_\\-!.?+*=<>&#'",a="["+i+"]["+i+"0-9/;:]*",r="[-+]?\\d+(\\.\\d+)?",o={cN:"meta",b:"^#!",e:"$"},s={b:a,r:0},n={cN:"number",b:r,r:0},l=e.inherit(e.QSM,{i:null}),c=e.C(";","$",{r:0}),d={cN:"literal",b:/\b([Tt]rue|[Ff]alse|nil|None)\b/},p={b:"[\\[\\{]",e:"[\\]\\}]"},m={cN:"comment",b:"\\^"+a},u=e.C("\\^\\{","\\}"),f={cN:"symbol",b:"[:]{1,2}"+a},h={b:"\\(",e:"\\)"},b={eW:!0,r:0},g={k:t,l:a,cN:"name",b:a,starts:b},y=[h,l,m,u,c,f,p,n,d,s];return h.c=[e.C("comment",""),g,b],b.c=y,p.c=y,{aliases:["hylang"],i:/\S/,c:[o,h,l,m,u,c,f,p,n,d]}});hljs.registerLanguage("glsl",function(e){return{k:{keyword:"break continue discard do else for if return while switch case default attribute binding buffer ccw centroid centroid varying coherent column_major const cw depth_any depth_greater depth_less depth_unchanged early_fragment_tests equal_spacing flat fractional_even_spacing fractional_odd_spacing highp in index inout invariant invocations isolines layout line_strip lines lines_adjacency local_size_x local_size_y local_size_z location lowp max_vertices mediump noperspective offset origin_upper_left out packed patch pixel_center_integer point_mode points precise precision quads r11f_g11f_b10f r16 r16_snorm r16f r16i r16ui r32f r32i r32ui r8 r8_snorm r8i r8ui readonly restrict rg16 rg16_snorm rg16f rg16i rg16ui rg32f rg32i rg32ui rg8 rg8_snorm rg8i rg8ui rgb10_a2 rgb10_a2ui rgba16 rgba16_snorm rgba16f rgba16i rgba16ui rgba32f rgba32i rgba32ui rgba8 rgba8_snorm rgba8i rgba8ui row_major sample shared smooth std140 std430 stream triangle_strip triangles triangles_adjacency uniform varying vertices volatile writeonly",type:"atomic_uint bool bvec2 bvec3 bvec4 dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 double dvec2 dvec3 dvec4 float iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBufferiimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray int isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow image1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D samplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 vec2 vec3 vec4 void",built_in:"gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxComputeAtomicCounterBuffers gl_MaxComputeAtomicCounters gl_MaxComputeImageUniforms gl_MaxComputeTextureImageUnits gl_MaxComputeUniformComponents gl_MaxComputeWorkGroupCount gl_MaxComputeWorkGroupSize gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentInputVectors gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexOutputVectors gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffset gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_GlobalInvocationID gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_LocalInvocationID gl_LocalInvocationIndex gl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_NumSamples gl_NumWorkGroups gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrix gl_TextureMatrixInverse gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_WorkGroupID gl_WorkGroupSize gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicAdd atomicAnd atomicCompSwap atomicCounter atomicCounterDecrement atomicCounterIncrement atomicExchange atomicMax atomicMin atomicOr atomicXor barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual groupMemoryBarrier imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageSize imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier memoryBarrierAtomicCounter memoryBarrierBuffer memoryBarrierImage memoryBarrierShared min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLevels textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow",literal:"true false"},i:'"',c:[e.CLCM,e.CBCM,e.CNM,{cN:"meta",b:"#",e:"$"}]}});hljs.registerLanguage("pf",function(t){var o={cN:"variable",b:/\$[\w\d#@][\w\d_]*/},e={cN:"variable",b:/<(?!\/)/,e:/>/};return{aliases:["pf.conf"],l:/[a-z0-9_<>-]+/,k:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global dbRule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},c:[t.HCM,t.NM,t.QSM,o,e]}});hljs.registerLanguage("vbnet",function(e){return{aliases:["vb"],cI:!0,k:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},i:"//|{|}|endif|gosub|variant|wend",c:[e.inherit(e.QSM,{c:[{b:'""'}]}),e.C("'","$",{rB:!0,c:[{cN:"doctag",b:"'''|",c:[e.PWM]},{cN:"doctag",b:"",c:[e.PWM]}]}),e.CNM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elseif end region externalsource"}}]}});hljs.registerLanguage("coq",function(e){return{k:{keyword:"_ as at cofix else end exists exists2 fix for forall fun if IF in let match mod Prop return Set then Type using where with Abort About Add Admit Admitted All Arguments Assumptions Axiom Back BackTo Backtrack Bind Blacklist Canonical Cd Check Class Classes Close Coercion Coercions CoFixpoint CoInductive Collection Combined Compute Conjecture Conjectures Constant constr Constraint Constructors Context Corollary CreateHintDb Cut Declare Defined Definition Delimit Dependencies DependentDerive Drop eauto End Equality Eval Example Existential Existentials Existing Export exporting Extern Extract Extraction Fact Field Fields File Fixpoint Focus for From Function Functional Generalizable Global Goal Grab Grammar Graph Guarded Heap Hint HintDb Hints Hypotheses Hypothesis ident Identity If Immediate Implicit Import Include Inductive Infix Info Initial Inline Inspect Instance Instances Intro Intros Inversion Inversion_clear Language Left Lemma Let Libraries Library Load LoadPath Local Locate Ltac ML Mode Module Modules Monomorphic Morphism Next NoInline Notation Obligation Obligations Opaque Open Optimize Options Parameter Parameters Parametric Path Paths pattern Polymorphic Preterm Print Printing Program Projections Proof Proposition Pwd Qed Quit Rec Record Recursive Redirect Relation Remark Remove Require Reserved Reset Resolve Restart Rewrite Right Ring Rings Save Scheme Scope Scopes Script Search SearchAbout SearchHead SearchPattern SearchRewrite Section Separate Set Setoid Show Solve Sorted Step Strategies Strategy Structure SubClass Table Tables Tactic Term Test Theorem Time Timeout Transparent Type Typeclasses Types Undelimit Undo Unfocus Unfocused Unfold Universe Universes Unset Unshelve using Variable Variables Variant Verbose Visibility where with",built_in:"abstract absurd admit after apply as assert assumption at auto autorewrite autounfold before bottom btauto by case case_eq cbn cbv change classical_left classical_right clear clearbody cofix compare compute congruence constr_eq constructor contradict contradiction cut cutrewrite cycle decide decompose dependent destruct destruction dintuition discriminate discrR do double dtauto eapply eassumption eauto ecase econstructor edestruct ediscriminate eelim eexact eexists einduction einjection eleft elim elimtype enough equality erewrite eright esimplify_eq esplit evar exact exactly_once exfalso exists f_equal fail field field_simplify field_simplify_eq first firstorder fix fold fourier functional generalize generalizing gfail give_up has_evar hnf idtac in induction injection instantiate intro intro_pattern intros intuition inversion inversion_clear is_evar is_var lapply lazy left lia lra move native_compute nia nsatz omega once pattern pose progress proof psatz quote record red refine reflexivity remember rename repeat replace revert revgoals rewrite rewrite_strat right ring ring_simplify rtauto set setoid_reflexivity setoid_replace setoid_rewrite setoid_symmetry setoid_transitivity shelve shelve_unifiable simpl simple simplify_eq solve specialize split split_Rabs split_Rmult stepl stepr subst sum swap symmetry tactic tauto time timeout top transitivity trivial try tryif unfold unify until using vm_compute with"},c:[e.QSM,e.C("\\(\\*","\\*\\)"),e.CNM,{cN:"type",eB:!0,b:"\\|\\s*",e:"\\w+"},{b:/[-=]>/}]}}); \ No newline at end of file diff --git a/src/main/resources/templates/listRules.html b/src/main/resources/templates/listRules.html index 1f71b46..9987cc6 100644 --- a/src/main/resources/templates/listRules.html +++ b/src/main/resources/templates/listRules.html @@ -14,15 +14,15 @@ - + Если - - + + и - - + + то - + -- 2.34.1 From 5b080f41c25146c67c4c2368af7da1d25db58d58 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 14:48:05 +0400 Subject: [PATCH 032/122] #74 -- add new library, create middle service --- .../rule/service/FuzzyInferenceService.java | 197 +++++++----------- 1 file changed, 73 insertions(+), 124 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 862166c..4119729 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -1,27 +1,25 @@ package ru.ulstu.extractor.rule.service; -import net.sourceforge.jFuzzyLogic.defuzzifier.DefuzzifierCenterOfGravity; -import net.sourceforge.jFuzzyLogic.membership.MembershipFunctionTriangular; -import net.sourceforge.jFuzzyLogic.rule.FuzzyRule; -import net.sourceforge.jFuzzyLogic.rule.FuzzyRuleExpression; -import net.sourceforge.jFuzzyLogic.rule.FuzzyRuleSet; -import net.sourceforge.jFuzzyLogic.rule.FuzzyRuleTerm; -import net.sourceforge.jFuzzyLogic.rule.LinguisticTerm; -import net.sourceforge.jFuzzyLogic.rule.Variable; -import net.sourceforge.jFuzzyLogic.ruleConnection.RuleConnectionMethodAndMin; -import net.sourceforge.jFuzzyLogic.ruleImplication.RuleImplicationMethodMin; +import com.fuzzylite.Engine; +import com.fuzzylite.activation.Highest; +import com.fuzzylite.norm.t.AlgebraicProduct; +import com.fuzzylite.rule.Rule; +import com.fuzzylite.rule.RuleBlock; +import com.fuzzylite.term.Triangle; +import com.fuzzylite.variable.InputVariable; +import com.fuzzylite.variable.OutputVariable; import org.springframework.stereotype.Service; import ru.ulstu.extractor.rule.model.AntecedentValue; -import ru.ulstu.extractor.rule.model.Rule; +import ru.ulstu.extractor.rule.model.DbRule; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.LinkedList; +import java.util.HashMap; import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; @Service public class FuzzyInferenceService { + private final static String RULE_TEMPLATE = "if %s is %s AND %s is %s then state is %s"; private final RuleService ruleService; private final AntecedentValueService antecedentValueService; @@ -31,118 +29,69 @@ public class FuzzyInferenceService { this.antecedentValueService = antecedentValueService; } - private List getFuzzyRulesFromDb() { - List fuzzyRules = new ArrayList<>(); - //List variables = getFuzzyVariables(); - for (Rule dbRule : ruleService.getList()) { - FuzzyRule fuzzyRule = new FuzzyRule(String.format("Fuzzy rule %s", dbRule.getId())); - // fuzzyRule.setAntecedents(expression); - // fuzzyRule.setConsequents(new LinkedList<>(Collections.singleton(new FuzzyRuleTerm(dbRule.getConsequent(), false)))); - fuzzyRules.add(fuzzyRule); - } - return fuzzyRules; + public List getRulesFromDb() { + List dbDbRules = ruleService.getList(); + return dbDbRules.stream().map(this::getFuzzyRule).collect(Collectors.toList()); } - private List getFuzzyVariablesWithoutMembership() { - List variables = new ArrayList<>(); + private String getFuzzyRule(DbRule dbRule) { + return String.format(RULE_TEMPLATE, + dbRule.getFirstAntecedent().name(), + dbRule.getFirstAntecedentValue().getAntecedentValue(), + dbRule.getSecondAntecedent().name(), + dbRule.getSecondAntecedentValue().getAntecedentValue(), + dbRule.getConsequent()); + } + + private RuleBlock getRuleBlock(Engine engine, Map variableValues, List antecedentValues) { + variableValues.forEach((key, value) -> { + InputVariable input = new InputVariable(); + input.setName(key); + input.setDescription(""); + input.setEnabled(true); + input.setRange(0.000, 1.000); + input.setLockValueInRange(false); + for (int i = 0; i < antecedentValues.size(); i++) { + input.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i, i + 2)); + } + engine.addInputVariable(input); + }); + + + RuleBlock mamdani = new RuleBlock(); + mamdani.setName("mamdani"); + mamdani.setDescription(""); + mamdani.setEnabled(true); + mamdani.setConjunction(null); + mamdani.setDisjunction(null); + mamdani.setImplication(new AlgebraicProduct()); + mamdani.setActivation(new Highest()); + getRulesFromDb().forEach(r -> mamdani.addRule(Rule.parse(r, engine))); + return mamdani; + } + + private Engine getFuzzyEngine() { + Engine engine = new Engine(); + engine.setName("Git rules"); + engine.setDescription(""); + return engine; + } + + public String run() { + Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); - for (AntecedentValue antecedentValue : antecedentValues) { - variables.add(new Variable(antecedentValue.getAntecedentValue())); + Map variableValues = new HashMap<>(); + engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues)); + return getConsequent(engine, variableValues); + } + + private String getConsequent(Engine engine, Map variableValues) { + OutputVariable outputVariable = engine.getOutputVariable("state"); + for (Map.Entry variableValue : variableValues.entrySet()) { + InputVariable inputVariable = engine.getInputVariable(variableValue.getKey()); + inputVariable.setValue(variableValue.getValue()); } - return variables; - } - -// private FuzzyRuleExpression getFuzzyRulesAntecedents(TimeSeriesType timeSeriesType1, TimeSeriesType timeSeriesType2) { -// return new FuzzyRuleExpression(getFuzzyRuleTerm(), getFuzzyRuleTerm(), new RuleConnectionMethodAndMin()); -// } - - private FuzzyRuleExpression getFuzzyRuleExpression(FuzzyRuleTerm term1, FuzzyRuleTerm term2) { - return new FuzzyRuleExpression(term1, term2, new RuleConnectionMethodAndMin()); - } - - private FuzzyRuleTerm getFuzzyRuleTerm(Variable variable, String term) { - return new FuzzyRuleTerm(variable, term, false); - } - - - public void run() { - FuzzyRule fuzzyRule1 = new FuzzyRule("rule 1"); - FuzzyRule fuzzyRule2 = new FuzzyRule("rule 2"); - FuzzyRule fuzzyRule3 = new FuzzyRule("rule 3"); - - Variable weather = new Variable("Погода"); - weather.getLinguisticTerms().put("солнечно", - new LinguisticTerm("солнечно", new MembershipFunctionTriangular(0, 20, 30))); - weather.getLinguisticTerms().put("мороз", - new LinguisticTerm("мороз", new MembershipFunctionTriangular(-50, -10, 10))); - weather.setDefuzzifier(new DefuzzifierCenterOfGravity(weather)); - - - Variable suit = new Variable("Одежда"); - suit.getLinguisticTerms().put("легко одет", - new LinguisticTerm("легко одет", new MembershipFunctionTriangular(0, 5, 10))); - suit.getLinguisticTerms().put("тепло одет", - new LinguisticTerm("тепло одет", new MembershipFunctionTriangular(5, 10, 20))); - suit.setDefuzzifier(new DefuzzifierCenterOfGravity(suit)); - - Variable feel = new Variable("Ощущение"); - feel.getLinguisticTerms().put("Холодно", - new LinguisticTerm("Холодно", new MembershipFunctionTriangular(0, 5, 10))); - feel.getLinguisticTerms().put("Жарко", - new LinguisticTerm("Жарко", new MembershipFunctionTriangular(5, 10, 20))); - feel.setDefuzzifier(new DefuzzifierCenterOfGravity(feel)); - - FuzzyRuleTerm weatherTerm1 = new FuzzyRuleTerm(weather, "солнечно", false); - FuzzyRuleTerm weatherTerm2 = new FuzzyRuleTerm(weather, "мороз", false); - - FuzzyRuleTerm suitTerm1 = new FuzzyRuleTerm(suit, "легко одет", false); - FuzzyRuleTerm suitTerm2 = new FuzzyRuleTerm(suit, "тепло одет", false); - - FuzzyRuleTerm feelCold = new FuzzyRuleTerm(feel, "Холодно", false); - FuzzyRuleTerm feelWarm = new FuzzyRuleTerm(feel, "Жарко", false); - - FuzzyRuleExpression expression1 = new FuzzyRuleExpression(weatherTerm1, suitTerm2, new RuleConnectionMethodAndMin()); - fuzzyRule1.setAntecedents(expression1); - fuzzyRule1.setConsequents(new LinkedList<>(Collections.singleton(feelWarm))); - - FuzzyRuleExpression expression2 = new FuzzyRuleExpression(weatherTerm2, suitTerm1, new RuleConnectionMethodAndMin()); - fuzzyRule2.setAntecedents(expression2); - fuzzyRule2.setConsequents(new LinkedList<>(Collections.singleton(feelCold))); - - FuzzyRuleExpression expression3 = new FuzzyRuleExpression(weatherTerm1, suitTerm1, new RuleConnectionMethodAndMin()); - fuzzyRule3.setAntecedents(expression3); - fuzzyRule3.setConsequents(new LinkedList<>(Collections.singleton(feelCold))); - - fuzzyRule1.evaluate(new RuleImplicationMethodMin()); - fuzzyRule2.evaluate(new RuleImplicationMethodMin()); - //fuzzyRule3.evaluate(new RuleImplicationMethodMin()); - - FuzzyRuleSet set = new FuzzyRuleSet(); - set.add(fuzzyRule1); - set.add(fuzzyRule2); - set.add(fuzzyRule3); - set.evaluate(); - - set.setVariable("Погода", 25); - set.setVariable("Одежда", 7); - // Evaluate fuzzy set - set.evaluate(); - - // Show output variable's chart - //set.getVariable("Ощущение").chartDefuzzifier(true); - System.out.println(set.getVariable("Ощущение").getLatestDefuzzifiedValue()); - System.out.println(set); - System.out.println(set.getVariable("Ощущение")); - System.out.println( - feel.getLinguisticTerms() - .entrySet() - .stream() - .max(Comparator.comparing(e -> e.getValue() - .getMembershipFunction() - .membership(set.getVariable("Ощущение").getLatestDefuzzifiedValue()))) - .get() - .getValue().getTermName() - ); - set.getVariable("Ощущение").chartDefuzzifier(true); + engine.process(); + return outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); } } -- 2.34.1 From 1a0d57a78e04059c32c25b7ece64a8e1b217584a Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 15:37:54 +0400 Subject: [PATCH 033/122] #74 -- fix rules --- .../extractor/GitExtractorApplication.java | 12 --------- .../java/ru/ulstu/extractor/core/Route.java | 5 ++++ .../controller/RecommendationController.java | 25 +++++++++++++++++++ .../rule/service/FuzzyInferenceService.java | 23 ++++++++++++++--- .../resources/templates/recommendations.html | 18 +------------ 5 files changed, 50 insertions(+), 33 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java diff --git a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java index 0cad8ff..f9a272d 100644 --- a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java +++ b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java @@ -1,17 +1,5 @@ package ru.ulstu.extractor; -import com.fuzzylite.Engine; -import com.fuzzylite.FuzzyLite; -import com.fuzzylite.Op; -import com.fuzzylite.activation.Highest; -import com.fuzzylite.defuzzifier.Centroid; -import com.fuzzylite.norm.s.Maximum; -import com.fuzzylite.norm.t.AlgebraicProduct; -import com.fuzzylite.rule.Rule; -import com.fuzzylite.rule.RuleBlock; -import com.fuzzylite.term.Trapezoid; -import com.fuzzylite.variable.InputVariable; -import com.fuzzylite.variable.OutputVariable; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.scheduling.annotation.EnableScheduling; diff --git a/src/main/java/ru/ulstu/extractor/core/Route.java b/src/main/java/ru/ulstu/extractor/core/Route.java index 9627848..f6b48d1 100644 --- a/src/main/java/ru/ulstu/extractor/core/Route.java +++ b/src/main/java/ru/ulstu/extractor/core/Route.java @@ -18,6 +18,7 @@ public class Route { public static final String STATISTIC = "statistic"; public static final String LIST_RULE = "listRules"; public static final String ADD_RULE = "addRule"; + public static final String RECOMMENDATIONS = "recommendations"; public static String getLIST_INDEXED_REPOSITORIES() { return LIST_INDEXED_REPOSITORIES; @@ -38,4 +39,8 @@ public class Route { public static String getSTATISTIC() { return STATISTIC; } + + public static String getRECOMMENDATIONS() { + return RECOMMENDATIONS; + } } diff --git a/src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java new file mode 100644 index 0000000..1db00c0 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java @@ -0,0 +1,25 @@ +package ru.ulstu.extractor.rule.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import ru.ulstu.extractor.rule.service.FuzzyInferenceService; +import springfox.documentation.annotations.ApiIgnore; + +import static ru.ulstu.extractor.core.Route.RECOMMENDATIONS; + +@Controller +@ApiIgnore +public class RecommendationController { + private final FuzzyInferenceService fuzzyInferenceService; + + public RecommendationController(FuzzyInferenceService fuzzyInferenceService) { + this.fuzzyInferenceService = fuzzyInferenceService; + } + + @GetMapping(RECOMMENDATIONS) + public String getRecommendations(Model model) { + model.addAttribute("recommendations", fuzzyInferenceService.run()); + return RECOMMENDATIONS; + } +} diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 4119729..b5c394c 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -19,7 +19,10 @@ import java.util.stream.Collectors; @Service public class FuzzyInferenceService { - private final static String RULE_TEMPLATE = "if %s is %s AND %s is %s then state is %s"; + private final static String OUTPUT_VARIABLE_NAME = "state"; + private final static String RULE_TEMPLATE = "if %s is %s and %s is %s then " + + OUTPUT_VARIABLE_NAME + + " is %s"; private final RuleService ruleService; private final AntecedentValueService antecedentValueService; @@ -49,7 +52,7 @@ public class FuzzyInferenceService { input.setName(key); input.setDescription(""); input.setEnabled(true); - input.setRange(0.000, 1.000); + input.setRange(0.000, antecedentValues.size() + 1); input.setLockValueInRange(false); for (int i = 0; i < antecedentValues.size(); i++) { input.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i, i + 2)); @@ -57,6 +60,16 @@ public class FuzzyInferenceService { engine.addInputVariable(input); }); + OutputVariable output = new OutputVariable(); + output.setName(OUTPUT_VARIABLE_NAME); + output.setDescription(""); + output.setEnabled(true); + output.setRange(0.000, antecedentValues.size() + 1); + output.setLockValueInRange(false); + for (int i = 0; i < antecedentValues.size(); i++) { + output.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i, i + 2)); + } + engine.addOutputVariable(output); RuleBlock mamdani = new RuleBlock(); mamdani.setName("mamdani"); @@ -81,17 +94,19 @@ public class FuzzyInferenceService { Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); Map variableValues = new HashMap<>(); + variableValues.put("COMMITS", 10.0); + variableValues.put("AUTHORS", 10.0); engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues)); return getConsequent(engine, variableValues); } private String getConsequent(Engine engine, Map variableValues) { - OutputVariable outputVariable = engine.getOutputVariable("state"); + OutputVariable outputVariable = engine.getOutputVariable(OUTPUT_VARIABLE_NAME); for (Map.Entry variableValue : variableValues.entrySet()) { InputVariable inputVariable = engine.getInputVariable(variableValue.getKey()); inputVariable.setValue(variableValue.getValue()); } engine.process(); - return outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); + return outputVariable == null ? "" : outputVariable.fuzzyOutputValue(); } } diff --git a/src/main/resources/templates/recommendations.html b/src/main/resources/templates/recommendations.html index 036dc66..dbcebe5 100644 --- a/src/main/resources/templates/recommendations.html +++ b/src/main/resources/templates/recommendations.html @@ -7,22 +7,6 @@
- - - - - - - - - - - - - - - -
Рекомендации
Увеличить колличество авторов
Оценнить эффективность авторов
- +
-- 2.34.1 From 591f183e8bef2350d3eb68b83b0eb032b7c86209 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 15:41:20 +0400 Subject: [PATCH 034/122] #74 -- fix merge --- src/main/java/ru/ulstu/extractor/rule/model/AddRuleForm.java | 2 +- src/main/java/ru/ulstu/extractor/rule/service/RuleService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/model/AddRuleForm.java b/src/main/java/ru/ulstu/extractor/rule/model/AddRuleForm.java index 7834b45..62ef078 100644 --- a/src/main/java/ru/ulstu/extractor/rule/model/AddRuleForm.java +++ b/src/main/java/ru/ulstu/extractor/rule/model/AddRuleForm.java @@ -11,7 +11,7 @@ public class AddRuleForm { public AddRuleForm() { } - public AddRuleForm(Rule rule) { + public AddRuleForm(DbRule rule) { this.ruleId = rule.getId(); this.firstAntecedentId = rule.getFirstAntecedent().name(); this.secondAntecedentId = rule.getSecondAntecedent().name(); diff --git a/src/main/java/ru/ulstu/extractor/rule/service/RuleService.java b/src/main/java/ru/ulstu/extractor/rule/service/RuleService.java index 2304435..41ae26b 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/RuleService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/RuleService.java @@ -45,7 +45,7 @@ public class RuleService { } } - public Rule findById(Integer id) { + public DbRule findById(Integer id) { return ruleRepository.getOne(id); } -- 2.34.1 From 81bcc89096117cb0e48bb9d1ad06cea3f0623ed0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 16:26:54 +0400 Subject: [PATCH 035/122] #74 -- recommendations without time series data --- .../config/GlobalDefaultExceptionHandler.java | 21 ++++++-------- .../rule/service/FuzzyInferenceService.java | 28 +++++++++++++------ 2 files changed, 28 insertions(+), 21 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java b/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java index a5af0ec..62f2b4d 100644 --- a/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java +++ b/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java @@ -11,12 +11,9 @@ import org.springframework.http.HttpStatus; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseStatus; -import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.NoHandlerFoundException; import springfox.documentation.annotations.ApiIgnore; -import javax.servlet.http.HttpServletRequest; - @ControllerAdvice @ApiIgnore class GlobalDefaultExceptionHandler { @@ -24,15 +21,15 @@ class GlobalDefaultExceptionHandler { public static final String DEFAULT_ERROR_VIEW = "error"; - @ExceptionHandler(value = Exception.class) - public ModelAndView defaultErrorHandler(HttpServletRequest req, Exception e) { - LOG.warn(e.getMessage()); - ModelAndView mav = new ModelAndView(); - mav.addObject("exception", e); - mav.addObject("url", req.getRequestURL()); - mav.setViewName(DEFAULT_ERROR_VIEW); - return mav; - } +// @ExceptionHandler(value = Exception.class) +// public ModelAndView defaultErrorHandler(HttpServletRequest req, Exception e) { +// LOG.warn(e.getMessage()); +// ModelAndView mav = new ModelAndView(); +// mav.addObject("exception", e); +// mav.addObject("url", req.getRequestURL()); +// mav.setViewName(DEFAULT_ERROR_VIEW); +// return mav; +// } @ExceptionHandler(NoHandlerFoundException.class) @ResponseStatus(HttpStatus.NOT_FOUND) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index b5c394c..1a4fe35 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -2,6 +2,9 @@ package ru.ulstu.extractor.rule.service; import com.fuzzylite.Engine; import com.fuzzylite.activation.Highest; +import com.fuzzylite.defuzzifier.Centroid; +import com.fuzzylite.norm.s.BoundedSum; +import com.fuzzylite.norm.s.Maximum; import com.fuzzylite.norm.t.AlgebraicProduct; import com.fuzzylite.rule.Rule; import com.fuzzylite.rule.RuleBlock; @@ -52,10 +55,10 @@ public class FuzzyInferenceService { input.setName(key); input.setDescription(""); input.setEnabled(true); - input.setRange(0.000, antecedentValues.size() + 1); + input.setRange(-0.1, antecedentValues.size() + 1.1); input.setLockValueInRange(false); for (int i = 0; i < antecedentValues.size(); i++) { - input.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i, i + 2)); + input.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i - 0.1, i + 2.1)); } engine.addInputVariable(input); }); @@ -64,10 +67,13 @@ public class FuzzyInferenceService { output.setName(OUTPUT_VARIABLE_NAME); output.setDescription(""); output.setEnabled(true); - output.setRange(0.000, antecedentValues.size() + 1); + output.setRange(-0.1, antecedentValues.size() + 0.1); + output.setAggregation(new Maximum()); + output.setDefuzzifier(new Centroid(100)); + output.setDefaultValue(Double.NaN); output.setLockValueInRange(false); for (int i = 0; i < antecedentValues.size(); i++) { - output.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i, i + 2)); + output.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i - 0.1, i + 2.1)); } engine.addOutputVariable(output); @@ -75,8 +81,8 @@ public class FuzzyInferenceService { mamdani.setName("mamdani"); mamdani.setDescription(""); mamdani.setEnabled(true); - mamdani.setConjunction(null); - mamdani.setDisjunction(null); + mamdani.setConjunction(new AlgebraicProduct()); + mamdani.setDisjunction(new BoundedSum()); mamdani.setImplication(new AlgebraicProduct()); mamdani.setActivation(new Highest()); getRulesFromDb().forEach(r -> mamdani.addRule(Rule.parse(r, engine))); @@ -94,8 +100,8 @@ public class FuzzyInferenceService { Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); Map variableValues = new HashMap<>(); - variableValues.put("COMMITS", 10.0); - variableValues.put("AUTHORS", 10.0); + variableValues.put("COMMITS", 0.0); + variableValues.put("AUTHORS", 0.0); engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues)); return getConsequent(engine, variableValues); } @@ -107,6 +113,10 @@ public class FuzzyInferenceService { inputVariable.setValue(variableValue.getValue()); } engine.process(); - return outputVariable == null ? "" : outputVariable.fuzzyOutputValue(); + if (outputVariable != null) { + outputVariable.defuzzify(); + } + return outputVariable == null ? "" : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); + //return outputVariable == null ? "" : outputVariable.fuzzyOutputValue(); } } -- 2.34.1 From 5ef8599576107c5292385d5ebfabec9032ad1e65 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 16:31:31 +0400 Subject: [PATCH 036/122] #74 -- remove old dependencies --- build.gradle | 1 - src/main/resources/application.properties | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 3b1cf19..bde4ca9 100644 --- a/build.gradle +++ b/build.gradle @@ -68,7 +68,6 @@ dependencies { implementation group: 'com.ibm.icu', name: 'icu4j', version: '63.1' implementation group: 'org.eclipse.jgit', name: 'org.eclipse.jgit', version: '5.9.0.202009080501-r' - implementation group: 'net.sourceforge.jFuzzyLogic', name: 'jFuzzyLogic', version: '1.2.1' implementation group: 'com.fuzzylite', name: 'jfuzzylite', version: '6.0.1' implementation group: 'org.webjars', name: 'jquery', version: '3.6.0' diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 603e99a..03350a6 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -2,12 +2,13 @@ # Copyright (C) 2021 Anton Romanov - All Rights Reserved # You may use, distribute and modify this code, please write to: romanov73@gmail.com. # - spring.main.banner-mode=off server.port=8080 server.jetty.connection-idle-timeout=1000s # Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF logging.level.ru.ulstu=DEBUG +logging.level.sun.rmi.transport.tcp=off +logging.level.javax.management.remote.rmi=off extractor.custom-projects-dir= # Thymeleaf Settings spring.thymeleaf.cache=false -- 2.34.1 From c39bc3c6ca3e302e309bcc459a1338d95d4711c5 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 16:51:51 +0400 Subject: [PATCH 037/122] #74 -- fix --- .../ulstu/extractor/rule/service/FuzzyInferenceService.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 1a4fe35..88e0026 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -116,7 +116,9 @@ public class FuzzyInferenceService { if (outputVariable != null) { outputVariable.defuzzify(); } - return outputVariable == null ? "" : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); + return (outputVariable == null || Double.isNaN(outputVariable.getValue())) + ? "Нет рекомендаций" + : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); //return outputVariable == null ? "" : outputVariable.fuzzyOutputValue(); } } -- 2.34.1 From 8cb6fdf0825f03aaf62167a8414513abfb158a76 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Oct 2022 22:23:50 +0400 Subject: [PATCH 038/122] #76 -- fix part --- .../author/repository/AuthorRepository.java | 2 +- .../controller/RecommendationController.java | 39 +++++++++++++++++++ .../model/FilterBranchForm.java | 20 ++++++++++ .../controller/RecommendationController.java | 25 ------------ .../rule/service/FuzzyInferenceService.java | 3 +- src/main/resources/templates/default.html | 4 +- .../resources/templates/recommendations.html | 34 +++++++++++++++- 7 files changed, 96 insertions(+), 31 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java create mode 100644 src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java delete mode 100644 src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java diff --git a/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java b/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java index e20f19d..2ad2ceb 100644 --- a/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java +++ b/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java @@ -20,5 +20,5 @@ public interface AuthorRepository extends JpaRepository { List findByName(String name); @Query("SELECT DISTINCT a.name FROM Commit c, Branch b, Author a WHERE c.author = a AND c.branch = b AND (:branchId IS NULL OR b.id = :branchId) AND a.name IS NOT NULL AND a.name <> '' ORDER BY a.name") - List findByBranchId(Integer branchId); + List findByBranchId(@Param("branchId") Integer branchId); } diff --git a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java new file mode 100644 index 0000000..a303067 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java @@ -0,0 +1,39 @@ +package ru.ulstu.extractor.recommendation.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.recommendation.model.FilterBranchForm; +import ru.ulstu.extractor.rule.service.FuzzyInferenceService; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.Optional; + +import static ru.ulstu.extractor.core.Route.RECOMMENDATIONS; + +@Controller +@ApiIgnore +public class RecommendationController { + private final FuzzyInferenceService fuzzyInferenceService; + private final BranchService branchService; + + public RecommendationController(FuzzyInferenceService fuzzyInferenceService, + BranchService branchService) { + this.fuzzyInferenceService = fuzzyInferenceService; + this.branchService = branchService; + } + + @GetMapping(RECOMMENDATIONS) + public String getRecommendations(Model model, @RequestParam Optional branchId) { + model.addAttribute("branches", branchService.findAll()); + if (branchId.isPresent()) { + model.addAttribute("recommendations", fuzzyInferenceService.getRecommendations()); + model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); + } else { + model.addAttribute("filterBranchForm", new FilterBranchForm()); + } + return RECOMMENDATIONS; + } +} diff --git a/src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java b/src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java new file mode 100644 index 0000000..0d331c3 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java @@ -0,0 +1,20 @@ +package ru.ulstu.extractor.recommendation.model; + +public class FilterBranchForm { + private Integer branchId; + + public FilterBranchForm() { + } + + public FilterBranchForm(Integer branchId) { + this.branchId = branchId; + } + + public Integer getBranchId() { + return branchId; + } + + public void setBranchId(Integer branchId) { + this.branchId = branchId; + } +} diff --git a/src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java deleted file mode 100644 index 1db00c0..0000000 --- a/src/main/java/ru/ulstu/extractor/rule/controller/RecommendationController.java +++ /dev/null @@ -1,25 +0,0 @@ -package ru.ulstu.extractor.rule.controller; - -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.GetMapping; -import ru.ulstu.extractor.rule.service.FuzzyInferenceService; -import springfox.documentation.annotations.ApiIgnore; - -import static ru.ulstu.extractor.core.Route.RECOMMENDATIONS; - -@Controller -@ApiIgnore -public class RecommendationController { - private final FuzzyInferenceService fuzzyInferenceService; - - public RecommendationController(FuzzyInferenceService fuzzyInferenceService) { - this.fuzzyInferenceService = fuzzyInferenceService; - } - - @GetMapping(RECOMMENDATIONS) - public String getRecommendations(Model model) { - model.addAttribute("recommendations", fuzzyInferenceService.run()); - return RECOMMENDATIONS; - } -} diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 88e0026..6ec146e 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -96,10 +96,11 @@ public class FuzzyInferenceService { return engine; } - public String run() { + public String getRecommendations() { Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); Map variableValues = new HashMap<>(); + variableValues.put("COMMITS", 0.0); variableValues.put("AUTHORS", 0.0); engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues)); diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index 1b59df9..d118ca8 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -38,10 +38,10 @@ Link diff --git a/src/main/resources/templates/recommendations.html b/src/main/resources/templates/recommendations.html index dbcebe5..7d43881 100644 --- a/src/main/resources/templates/recommendations.html +++ b/src/main/resources/templates/recommendations.html @@ -1,12 +1,42 @@ Простая обработка формы на Spring MVC
-
+
+
+
+ Репозиторий-ветка +
+
+ + +
+ +
+
Выбрерите ветку для получения рекомендаций
+ + +
+
+
+
-- 2.34.1 From 3b7812a075919ab41d215f9a5dcd0356de85ed4e Mon Sep 17 00:00:00 2001 From: BarminaA Date: Sat, 5 Nov 2022 17:58:21 +0400 Subject: [PATCH 039/122] #76-create authorTS --- .../author/service/AuthorService.java | 5 +++ .../service/GitRepositoryService.java | 16 +++++++- .../ulstu/extractor/ts/creator/AuthorTS.java | 37 +++++++++++++++++- .../ulstu/extractor/ts/creator/EntityTS.java | 38 +++++++++++++++++- .../ru/ulstu/extractor/ts/creator/FileTS.java | 39 ++++++++++++++++++- .../ulstu/extractor/ts/model/TimeSeries.java | 5 +++ 6 files changed, 133 insertions(+), 7 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java b/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java index 659e17c..ce80869 100644 --- a/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java +++ b/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java @@ -11,6 +11,7 @@ import org.springframework.stereotype.Service; import ru.ulstu.extractor.author.model.Author; import ru.ulstu.extractor.author.repository.AuthorRepository; +import java.util.List; import java.util.Optional; @Service @@ -30,4 +31,8 @@ public class AuthorService { } return newAuthor.get(); } + + public List findAll() { + return authorRepository.findAll(); + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index 78038ad..b08f1d9 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -269,7 +269,7 @@ public class GitRepositoryService { try (ByteArrayOutputStream out = new ByteArrayOutputStream()) { DiffFormatter diffFormatter = new DiffFormatter(out); diffFormatter.setRepository(localRepo); - diffFormatter.format(earlierCommit.getId(), laterCommit.getId()); + diffFormatter.format(laterCommit.getId(), earlierCommit.getId()); output = out.toString(); } catch (IOException e) { throw new RuntimeException("Error occurred during diff computation. Message: " + e.getMessage()); @@ -281,6 +281,9 @@ public class GitRepositoryService { List changes = new ArrayList<>(); String[] strings = output.split("\n"); FileChange fileChange = new FileChange(); + boolean isAdded = false; + boolean isRemoved = false; + boolean isFileChanged = false; int stringsLength = strings.length - 1; for (int i = 0; i < strings.length; i++) { while (i < stringsLength) { @@ -290,6 +293,8 @@ public class GitRepositoryService { fileChange.setFile(maybeFileName.get()); Future futureEntity = executorService.submit(() -> structuralUnitService.containsEntity(getContent(repository, commit, maybeFileName.get()))); Future futureBL = executorService.submit(() -> structuralUnitService.containsBusinessLogic(getContent(repository, commit, maybeFileName.get()))); + fileChange.setAdded(isAdded); + fileChange.setRemoved(isRemoved); try { fileChange.setContainsBusinessLogic(futureBL.get()); fileChange.setContainsEntity(futureEntity.get()); @@ -312,6 +317,7 @@ public class GitRepositoryService { lineChange.setLineFrom(lineChange.getLineFrom() + "\n" + strings[i]); i++; } + isRemoved = true; } } lineChange.setRemoved(true); @@ -328,6 +334,7 @@ public class GitRepositoryService { lineChange.setLineTo(lineChange.getLineTo() + "\n" + strings[i]); i++; } + isAdded = true; } } lineChange.setAdded(true); @@ -340,6 +347,13 @@ public class GitRepositoryService { } } } + if ((isAdded) && (isRemoved)) { + isAdded = false; + isRemoved = false; + isFileChanged = true; + } + fileChange.setAdded(isAdded); + fileChange.setRemoved(isRemoved); return changes; } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java index ae71399..b1c41fb 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java @@ -1,8 +1,13 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.author.model.Author; +import ru.ulstu.extractor.author.service.AuthorService; +import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.ArrayList; @@ -11,9 +16,17 @@ import java.util.List; @Component public class AuthorTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final CommitService commitService; + private final AuthorService authorService; + private final GitRepositoryService gitRepositoryService; - public AuthorTS(TimeSeriesService timeSeriesService) { + public AuthorTS(TimeSeriesService timeSeriesService, + CommitService commitService, + AuthorService authorService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.commitService = commitService; + this.authorService = authorService; + this.gitRepositoryService = gitRepositoryService; } @Override @@ -23,7 +36,27 @@ public class AuthorTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList<>(); + List timeSeriesResult = new ArrayList<>(); + List authors = authorService.findAll(); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + for (Author author : authors) { + TimeSeries timeSeries = new TimeSeries( + String.format("%s %s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + author.getName(), + getTimeSeriesType().getDescription()), + getTimeSeriesType()); + for (ru.ulstu.extractor.model.Commit commit : commits) { + if (commit.getAuthor().equals(author)) { + timeSeries.getValues().add(new TimeSeriesValue(commit.getDate(), 1.0)); + } + } + if (!timeSeries.getValues().isEmpty()) { + timeSeriesResult.add(timeSeries); + } + } + return timeSeriesResult; } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java index c635556..946d9ac 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java @@ -1,24 +1,45 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.model.FileChange; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.ArrayList; +import java.util.Collections; import java.util.List; +import java.util.stream.Collectors; @Component public class EntityTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final CommitService commitService; + private final GitRepositoryService gitRepositoryService; - public EntityTS(TimeSeriesService timeSeriesService) { + + public EntityTS(TimeSeriesService timeSeriesService, CommitService commitService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.commitService = commitService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + commitService.findByRepositoryIdAndName(repositoryId, branchName) + .stream() + .map(c -> new TimeSeriesValue(c.getDate(), findEntity(repositoryId, branchName))) + .collect(Collectors.toList()))); } @Override @@ -30,4 +51,17 @@ public class EntityTS extends AbstractTimeSeriesCreator { public TimeSeriesType getTimeSeriesType() { return TimeSeriesType.ENTITIES; } + + public Double findEntity(Integer repositoryId, String branchName) { + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + double value = 0; + for (ru.ulstu.extractor.model.Commit commit : commits) { + for (FileChange fileChange : commit.getFileChanges()) { + if ((fileChange.getContainsEntity() != null) && (fileChange.getContainsEntity())) { + value = value + 1; + } + } + } + return value; + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java index 5797212..27e3453 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java @@ -1,6 +1,10 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.model.FileChange; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; +import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -11,14 +15,29 @@ import java.util.List; @Component public class FileTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final GitRepositoryService gitRepositoryService; + private final CommitService commitService; - public FileTS(TimeSeriesService timeSeriesService) { + public FileTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService, CommitService commitService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; + this.commitService = commitService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); +// findSum(repositoryId,branchName); + return new ArrayList<>(); +// return Collections.singletonList( +// new TimeSeries( +// String.format("", +// gitRepositoryService.findById(repositoryId).getName(), +// branchName, +// getTimeSeriesType().getDescription()), +// getTimeSeriesType(), +// ) +// ) +// ) } @Override @@ -30,4 +49,20 @@ public class FileTS extends AbstractTimeSeriesCreator { public TimeSeriesType getTimeSeriesType() { return TimeSeriesType.FILES; } + + public void findSum(Integer repositoryId, String branchName) { + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + int value = 0; + for (Commit commit : commits) { + for (FileChange fileChange : commit.getFileChanges()) { + if ((fileChange.getAdded() != null) && (fileChange.getAdded())) { + value = +1; + } + if ((fileChange.getRemoved() != null) && (fileChange.getRemoved())) { + value = -1; + } + } + System.out.println(value); + } + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java index b6d6931..7a810da 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java @@ -32,6 +32,11 @@ public class TimeSeries extends BaseEntity { this.name = name; } + public TimeSeries(String name, TimeSeriesType timeSeriesType) { + this.name = name; + this.timeSeriesType = timeSeriesType; + } + public TimeSeries(String name, List values) { this.name = name; this.values = values; -- 2.34.1 From 4de0e379024e201cf3a155ed978b3fab06770786 Mon Sep 17 00:00:00 2001 From: alexandra Date: Mon, 21 Nov 2022 13:42:15 +0400 Subject: [PATCH 040/122] #78 - Add FileTS --- .../service/GitRepositoryService.java | 187 +++++++++++------- .../ru/ulstu/extractor/ts/creator/FileTS.java | 53 +++-- 2 files changed, 136 insertions(+), 104 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index b08f1d9..fb0a3eb 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -30,6 +30,7 @@ import ru.ulstu.extractor.heuristic.model.ResourceUnit; import ru.ulstu.extractor.heuristic.service.StructuralUnitService; import ru.ulstu.extractor.model.Commit; +import javax.swing.text.html.parser.Entity; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; @@ -39,10 +40,7 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.time.Instant; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Optional; +import java.util.*; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; @@ -280,80 +278,22 @@ public class GitRepositoryService { private List parseOutputDiff(String output, org.eclipse.jgit.lib.Repository repository, RevCommit commit) { List changes = new ArrayList<>(); String[] strings = output.split("\n"); - FileChange fileChange = new FileChange(); - boolean isAdded = false; - boolean isRemoved = false; - boolean isFileChanged = false; - int stringsLength = strings.length - 1; - for (int i = 0; i < strings.length; i++) { - while (i < stringsLength) { - Optional maybeFileName = getFileName(strings[i]); - if (maybeFileName.isPresent()) { - fileChange = new FileChange(); - fileChange.setFile(maybeFileName.get()); - Future futureEntity = executorService.submit(() -> structuralUnitService.containsEntity(getContent(repository, commit, maybeFileName.get()))); - Future futureBL = executorService.submit(() -> structuralUnitService.containsBusinessLogic(getContent(repository, commit, maybeFileName.get()))); - fileChange.setAdded(isAdded); - fileChange.setRemoved(isRemoved); - try { - fileChange.setContainsBusinessLogic(futureBL.get()); - fileChange.setContainsEntity(futureEntity.get()); - } catch (Exception ex) { - LOG.warn(ex.getMessage()); - } - /// вытащить другие изменения из коммита - changes.add(fileChange); - } - LineChange lineChange = new LineChange(); - if (strings[i].startsWith("-")) { - while ((i < stringsLength) && strings[i].startsWith("-")) { - if (strings[i].startsWith("---")) { - i++; - } else { - if (lineChange.getLineFrom() == null) { - lineChange.setLineFrom(strings[i]); - i++; - } else { - lineChange.setLineFrom(lineChange.getLineFrom() + "\n" + strings[i]); - i++; - } - isRemoved = true; - } - } - lineChange.setRemoved(true); - } - if (strings[i].startsWith("+")) { - while ((i < stringsLength) && strings[i].startsWith("+")) { - if (strings[i].startsWith("+++")) { - i++; - } else { - if (lineChange.getLineTo() == null) { - lineChange.setLineTo(strings[i]); - i++; - } else { - lineChange.setLineTo(lineChange.getLineTo() + "\n" + strings[i]); - i++; - } - isAdded = true; - } - } - lineChange.setAdded(true); - } - if ((lineChange.getLineTo() != null) || (lineChange.getLineFrom() != null) - || ((lineChange.getLineTo() != null) && (lineChange.getLineFrom() != null))) { - fileChange.getLineChanges().add(lineChange); - } else { - i++; - } + Map> filesContent = getFilesContent(strings); + System.out.println(filesContent); + for(Map.Entry> fileSterings: filesContent.entrySet()) { + FileChange fileChange = new FileChange(); + fileChange.setFile(fileSterings.getKey()); + Future futureEntity = executorService.submit(() -> structuralUnitService.containsEntity(getContent(repository, commit, fileSterings.getKey()))); + Future futureBL = executorService.submit(() -> structuralUnitService.containsBusinessLogic(getContent(repository, commit, fileSterings.getKey()))); + try { + fileChange.setContainsBusinessLogic(futureBL.get()); + fileChange.setContainsEntity(futureEntity.get()); + } catch (Exception ex) { + LOG.warn(ex.getMessage()); } + fileChange = getChange(fileChange, fileSterings.getValue()); + changes.add(fileChange); } - if ((isAdded) && (isRemoved)) { - isAdded = false; - isRemoved = false; - isFileChanged = true; - } - fileChange.setAdded(isAdded); - fileChange.setRemoved(isRemoved); return changes; } @@ -382,6 +322,101 @@ public class GitRepositoryService { return Optional.empty(); } + private Map> getFilesContent(String[] commitStrings) { + int i = 0; + Map> result = new HashMap<>(); + while (i < commitStrings.length) { + Optional maybeFileName = getFileName(commitStrings[i]); + if (maybeFileName.isEmpty()) { + i++; + } else { + i = skipLinesForNextFile(commitStrings, i); + result.put(maybeFileName.get(), getFileContent(commitStrings, i)); + i += getFileContent(commitStrings, i).size() - 1; + } + } + return result; + } + + private List getFileContent(String[] commitsString, int i) { + List result = new ArrayList<>(); + while (i < commitsString.length && getFileName(commitsString[i]).isEmpty()) { + result.add(commitsString[i]); + i++; + } + return result; + } + + private int skipLinesForNextFile(String[] commitStrings, int index) { + boolean isFilePrefixSkipped = false; + while (!isFilePrefixSkipped && (index < commitStrings.length)) { + if ((commitStrings[index].startsWith("diff --git a/")) + || (commitStrings[index].startsWith("delete")) + || (commitStrings[index].startsWith("new")) + || (commitStrings[index].startsWith("index")) + || (commitStrings[index].startsWith("@@")) + || (commitStrings[index].startsWith("---")) + || (commitStrings[index].startsWith("+++"))) { + index++; + } else { + isFilePrefixSkipped = true; + } + } + return index; + } + + private FileChange getChange(FileChange fileChange, List fileContent){ + int addedLine = 0; + int removedLine = 0; + StringBuilder builder = new StringBuilder(); + boolean isRemoved = false; + boolean isAdded = false; + for (String line : fileContent){ + LineChange lineChange = new LineChange(); + if (line.startsWith("-")){ + isRemoved = true; + if (isAdded) { + isAdded = false; + lineChange = setAdded(lineChange, builder); + builder.setLength(0); + } + builder.append(line).append("\n"); + removedLine++; + } else if(line.startsWith("+")){ + isAdded = true; + if (isRemoved) { + isRemoved = false; + lineChange = setRemoved(lineChange, builder); + builder.setLength(0); + } + builder.append(line).append("\n"); + addedLine++; + } else { + if (isRemoved) { + lineChange = setRemoved(lineChange, builder); + builder.setLength(0); + } else if (isAdded){ + lineChange = setAdded(lineChange, builder); + builder.setLength(0); + } + } + } + fileChange.setRemoved(removedLine == fileContent.size() - 1); + fileChange.setAdded(addedLine == fileContent.size() - 1); + return fileChange; + } + + private LineChange setRemoved(LineChange lineChange, StringBuilder builder){ + lineChange.setLineFrom(builder.toString()); + lineChange.setRemoved(true); + return lineChange; + } + + private LineChange setAdded(LineChange lineChange, StringBuilder builder){ + lineChange.setLineTo(builder.toString()); + lineChange.setAdded(true); + return lineChange; + } public Page findAll(Pageable pageable) { return gitRepositoryRepository.findAll(pageable); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java index 27e3453..8e6a934 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java @@ -7,6 +7,7 @@ import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.ArrayList; @@ -26,18 +27,30 @@ public class FileTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { -// findSum(repositoryId,branchName); - return new ArrayList<>(); -// return Collections.singletonList( -// new TimeSeries( -// String.format("", -// gitRepositoryService.findById(repositoryId).getName(), -// branchName, -// getTimeSeriesType().getDescription()), -// getTimeSeriesType(), -// ) -// ) -// ) + List timeSeriesResult = new ArrayList<>(); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + double value = 0; + TimeSeries timeSeries = new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType()); + for (Commit commit : commits) { + for (FileChange fileChange : commit.getFileChanges()) { + if ((fileChange.getAdded() != null) && (fileChange.getAdded())) { + value += 1; + } + if ((fileChange.getRemoved() != null) && (fileChange.getRemoved())) { + value -= 1; + } + } + timeSeries.getValues().add(new TimeSeriesValue(commit.getDate(), value)); + } + if (!timeSeries.getValues().isEmpty()) { + timeSeriesResult.add(timeSeries); + } + return timeSeriesResult; } @Override @@ -49,20 +62,4 @@ public class FileTS extends AbstractTimeSeriesCreator { public TimeSeriesType getTimeSeriesType() { return TimeSeriesType.FILES; } - - public void findSum(Integer repositoryId, String branchName) { - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); - int value = 0; - for (Commit commit : commits) { - for (FileChange fileChange : commit.getFileChanges()) { - if ((fileChange.getAdded() != null) && (fileChange.getAdded())) { - value = +1; - } - if ((fileChange.getRemoved() != null) && (fileChange.getRemoved())) { - value = -1; - } - } - System.out.println(value); - } - } } -- 2.34.1 From 0be5e9c77cdca73cd7fc77ae95914c9c33dee834 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sun, 27 Nov 2022 22:09:07 +0400 Subject: [PATCH 041/122] #74 -- get time series tendency for rules --- .../gitrepository/service/IndexService.java | 3 +- .../extractor/http/SmoothingTimeSeries.java | 29 +++++++++++++++++ .../controller/RecommendationController.java | 2 +- .../rule/controller/RuleController.java | 8 ++--- .../{RuleService.java => DbRuleService.java} | 8 ++--- .../rule/service/FuzzyInferenceService.java | 23 +++++++++----- .../ts/creator/AbstractTimeSeriesCreator.java | 9 +++--- .../ulstu/extractor/ts/creator/CommitsTS.java | 11 +++++-- .../ulstu/extractor/ts/model/TimeSeries.java | 25 ++++++++++----- .../ts/repository/TimeSeriesRepository.java | 3 ++ .../ts/service/TimeSeriesService.java | 31 +++++++++++++------ src/main/resources/application.properties | 3 +- .../db/changelog-20221012_170000-schema.xml | 19 ++++++++++++ 13 files changed, 132 insertions(+), 42 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/http/SmoothingTimeSeries.java rename src/main/java/ru/ulstu/extractor/rule/service/{RuleService.java => DbRuleService.java} (91%) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 5d2c1c2..5ceb162 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -62,7 +62,8 @@ public class IndexService { commits = gitRepositoryService.getCommits(repositoryUrl, branchName, commitsFrom, commitsTo, false); } Integer repositoryId = gitRepository.getId(); - timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchName)); + final Branch branchForSave = branch; + timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchForSave)); LOG.debug("Complete indexing {} branch", branchName); } } diff --git a/src/main/java/ru/ulstu/extractor/http/SmoothingTimeSeries.java b/src/main/java/ru/ulstu/extractor/http/SmoothingTimeSeries.java new file mode 100644 index 0000000..9224a9c --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/http/SmoothingTimeSeries.java @@ -0,0 +1,29 @@ +package ru.ulstu.extractor.http; + +import ru.ulstu.extractor.ts.model.TimeSeries; + +public class SmoothingTimeSeries { + private JsonTimeSeries originalTimeSeries; + private String methodClassName; + + public SmoothingTimeSeries(TimeSeries timeSeries) { + originalTimeSeries = new JsonTimeSeries(timeSeries); + this.methodClassName = "FTransform"; + } + + public JsonTimeSeries getOriginalTimeSeries() { + return originalTimeSeries; + } + + public void setOriginalTimeSeries(JsonTimeSeries originalTimeSeries) { + this.originalTimeSeries = originalTimeSeries; + } + + public String getMethodClassName() { + return methodClassName; + } + + public void setMethodClassName(String methodClassName) { + this.methodClassName = methodClassName; + } +} diff --git a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java index a303067..4c0f803 100644 --- a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java +++ b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java @@ -29,7 +29,7 @@ public class RecommendationController { public String getRecommendations(Model model, @RequestParam Optional branchId) { model.addAttribute("branches", branchService.findAll()); if (branchId.isPresent()) { - model.addAttribute("recommendations", fuzzyInferenceService.getRecommendations()); + model.addAttribute("recommendations", fuzzyInferenceService.getRecommendations(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); } else { model.addAttribute("filterBranchForm", new FilterBranchForm()); diff --git a/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java b/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java index 7893dea..4e855df 100644 --- a/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java +++ b/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java @@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import ru.ulstu.extractor.rule.model.AddRuleForm; import ru.ulstu.extractor.rule.service.AntecedentValueService; -import ru.ulstu.extractor.rule.service.RuleService; +import ru.ulstu.extractor.rule.service.DbRuleService; import ru.ulstu.extractor.ts.service.TimeSeriesService; import springfox.documentation.annotations.ApiIgnore; @@ -21,14 +21,14 @@ import static ru.ulstu.extractor.core.Route.LIST_RULE; @Controller @ApiIgnore public class RuleController { - private final RuleService ruleService; + private final DbRuleService ruleService; private final AntecedentValueService antecedentValueService; private final TimeSeriesService timeSeriesService; - public RuleController(RuleService ruleService, + public RuleController(DbRuleService dbRuleService, AntecedentValueService antecedentValueService, TimeSeriesService timeSeriesService) { - this.ruleService = ruleService; + this.ruleService = dbRuleService; this.antecedentValueService = antecedentValueService; this.timeSeriesService = timeSeriesService; } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/RuleService.java b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java similarity index 91% rename from src/main/java/ru/ulstu/extractor/rule/service/RuleService.java rename to src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java index 41ae26b..a35cca2 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/RuleService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java @@ -10,14 +10,14 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.List; @Service -public class RuleService { +public class DbRuleService { private final RuleRepository ruleRepository; private final TimeSeriesService timeSeriesService; private final AntecedentValueService antecedentValueService; - public RuleService(RuleRepository ruleRepository, - TimeSeriesService timeSeriesService, - AntecedentValueService antecedentValueService) { + public DbRuleService(RuleRepository ruleRepository, + TimeSeriesService timeSeriesService, + AntecedentValueService antecedentValueService) { this.ruleRepository = ruleRepository; this.timeSeriesService = timeSeriesService; this.antecedentValueService = antecedentValueService; diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 6ec146e..f011aaf 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -12,8 +12,11 @@ import com.fuzzylite.term.Triangle; import com.fuzzylite.variable.InputVariable; import com.fuzzylite.variable.OutputVariable; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.rule.model.AntecedentValue; import ru.ulstu.extractor.rule.model.DbRule; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.HashMap; import java.util.List; @@ -26,13 +29,19 @@ public class FuzzyInferenceService { private final static String RULE_TEMPLATE = "if %s is %s and %s is %s then " + OUTPUT_VARIABLE_NAME + " is %s"; - private final RuleService ruleService; + private final DbRuleService ruleService; private final AntecedentValueService antecedentValueService; + private final GitRepositoryService gitRepositoryService; + private final TimeSeriesService timeSeriesService; - public FuzzyInferenceService(RuleService ruleService, - AntecedentValueService antecedentValueService) { + public FuzzyInferenceService(DbRuleService ruleService, + AntecedentValueService antecedentValueService, + GitRepositoryService gitRepositoryService, + TimeSeriesService timeSeriesService) { this.ruleService = ruleService; this.antecedentValueService = antecedentValueService; + this.gitRepositoryService = gitRepositoryService; + this.timeSeriesService = timeSeriesService; } public List getRulesFromDb() { @@ -96,13 +105,12 @@ public class FuzzyInferenceService { return engine; } - public String getRecommendations() { + public String getRecommendations(Integer branchId) { + List timeSeries = timeSeriesService.getByBranch(branchId); Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); Map variableValues = new HashMap<>(); - - variableValues.put("COMMITS", 0.0); - variableValues.put("AUTHORS", 0.0); + timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues)); return getConsequent(engine, variableValues); } @@ -120,6 +128,5 @@ public class FuzzyInferenceService { return (outputVariable == null || Double.isNaN(outputVariable.getValue())) ? "Нет рекомендаций" : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); - //return outputVariable == null ? "" : outputVariable.fuzzyOutputValue(); } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java index 0f470f5..ac353ac 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java @@ -1,5 +1,6 @@ package ru.ulstu.extractor.ts.creator; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -29,15 +30,15 @@ public abstract class AbstractTimeSeriesCreator { * Сохранить извлеченные временные ряды * * @param repositoryId - * @param branchName + * @param branch */ - public void addTimeSeries(Integer repositoryId, String branchName) { + public void addTimeSeries(Integer repositoryId, Branch branch) { // извлеченные временных рядов - List timeSeries = getTimeSeries(repositoryId, branchName); + List timeSeries = getTimeSeries(repositoryId, branch.getName()); // сгруппированные по временным интервалам точки временных рядов timeSeries.forEach(ts -> ts.setValues(mapTimeSeriesToInterval(getTimeSeriesService().getTimeSeriesInterval(), ts.getValues()))); - getTimeSeriesService().save(sortTimeSeries(timeSeries)); + getTimeSeriesService().save(sortTimeSeries(timeSeries), branch); } private List sortTimeSeries(List timeSeries) { diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java index c686a90..0b7ed9d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java @@ -1,7 +1,9 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -17,24 +19,29 @@ public class CommitsTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final CommitService commitService; private final GitRepositoryService gitRepositoryService; + private final BranchService branchService; public CommitsTS(TimeSeriesService timeSeriesService, CommitService commitService, - GitRepositoryService gitRepositoryService) { + GitRepositoryService gitRepositoryService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.commitService = commitService; this.gitRepositoryService = gitRepositoryService; + this.branchService = branchService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); //TODO: добавить постраничное чтение return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), commitService.findByRepositoryIdAndName(repositoryId, branchName) .stream() diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java index b6d6931..5e302fa 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java @@ -2,6 +2,7 @@ package ru.ulstu.extractor.ts.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.core.BaseEntity; import javax.persistence.CascadeType; @@ -10,6 +11,7 @@ import javax.persistence.EnumType; import javax.persistence.Enumerated; import javax.persistence.FetchType; import javax.persistence.JoinColumn; +import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import java.util.ArrayList; import java.util.List; @@ -25,22 +27,21 @@ public class TimeSeries extends BaseEntity { @Enumerated(EnumType.STRING) private TimeSeriesType timeSeriesType; + @ManyToOne + private Branch branch; + public TimeSeries() { } - public TimeSeries(String name) { - this.name = name; + public TimeSeries(String name, Branch branch, TimeSeriesType timeSeriesType) { + this(name, branch, timeSeriesType, new ArrayList<>()); } - public TimeSeries(String name, List values) { - this.name = name; - this.values = values; - } - - public TimeSeries(String name, TimeSeriesType timeSeriesType, List values) { + public TimeSeries(String name, Branch branch, TimeSeriesType timeSeriesType, List values) { this.name = name; this.values = values; this.timeSeriesType = timeSeriesType; + this.branch = branch; } public String getName() { @@ -66,4 +67,12 @@ public class TimeSeries extends BaseEntity { public void setTimeSeriesType(TimeSeriesType timeSeriesType) { this.timeSeriesType = timeSeriesType; } + + public Branch getBranch() { + return branch; + } + + public void setBranch(Branch branch) { + this.branch = branch; + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java b/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java index fbb123e..7346519 100644 --- a/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java +++ b/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java @@ -3,8 +3,11 @@ package ru.ulstu.extractor.ts.repository; import org.springframework.data.jpa.repository.JpaRepository; import ru.ulstu.extractor.ts.model.TimeSeries; +import java.util.List; import java.util.Optional; public interface TimeSeriesRepository extends JpaRepository { Optional findByName(String name); + + List getTimeSeriesByBranchId(Integer branchId); } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 9c79d0f..4a4b2f2 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -9,8 +9,10 @@ import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; import ru.ulstu.extractor.http.JsonTimeSeries; +import ru.ulstu.extractor.http.SmoothingTimeSeries; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -31,7 +33,8 @@ public class TimeSeriesService { private final TimeSeriesValueRepository timeSeriesValueRepository; private final TimeSeriesDateMapper.TimeSeriesInterval timeSeriesInterval = TimeSeriesDateMapper.TimeSeriesInterval.HOUR; private final HttpService httpService; - private final static String TIME_SERIES_SERVICE_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; + private final static String TIME_SERIES_SAVE_SERVICE_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; + private final static String TIME_SERIES_TENDENCY_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; public TimeSeriesService(TimeSeriesRepository timeSeriesRepository, TimeSeriesValueRepository timeSeriesValueRepository, @@ -42,12 +45,11 @@ public class TimeSeriesService { } @Transactional - public TimeSeries save(String timeSeriesName, TimeSeriesType timeSeriesType, List timeSeriesValues) { + public TimeSeries save(String timeSeriesName, Branch branch, TimeSeriesType timeSeriesType, List timeSeriesValues) { LOG.debug("Start save {} time series with {} time series values ", timeSeriesName, timeSeriesValues.size()); - final TimeSeries timeSeries = findOrCreate(timeSeriesName); + final TimeSeries timeSeries = findOrCreate(timeSeriesName, branch, timeSeriesType); List timeSeriesValuesToRemove = timeSeries.getValues(); timeSeries.setValues(timeSeriesValues); - timeSeries.setTimeSeriesType(timeSeriesType); LOG.debug("Save time series {} ", timeSeries.getName()); TimeSeries savedTimeSeries = timeSeriesRepository.save(timeSeries); LOG.debug("Clear {} time series values ", timeSeriesValuesToRemove.size()); @@ -56,13 +58,13 @@ public class TimeSeriesService { return savedTimeSeries; } - public TimeSeries findOrCreate(String timeSeriesName) { + public TimeSeries findOrCreate(String timeSeriesName, Branch branch, TimeSeriesType timeSeriesType) { Optional maybeTimeSeries = timeSeriesRepository.findByName(timeSeriesName); if (maybeTimeSeries.isPresent()) { LOG.debug("TimeSeries {} exists.", maybeTimeSeries.get().getName()); return maybeTimeSeries.get(); } - return timeSeriesRepository.save(new TimeSeries(timeSeriesName)); + return timeSeriesRepository.save(new TimeSeries(timeSeriesName, branch, timeSeriesType)); } /** @@ -72,10 +74,10 @@ public class TimeSeriesService { * @return сохраненный список ВР */ @Transactional - public List save(List timeSeries) { + public List save(List timeSeries, Branch branch) { List results = new ArrayList<>(); for (TimeSeries ts : timeSeries) { - results.add(save(ts.getName(), ts.getTimeSeriesType(), ts.getValues())); + results.add(save(ts.getName(), branch, ts.getTimeSeriesType(), ts.getValues())); } return results; } @@ -87,7 +89,7 @@ public class TimeSeriesService { private void sendToTimeSeriesService(TimeSeries timeSeries) { new Thread(() -> { try { - httpService.post(TIME_SERIES_SERVICE_URL, new JSONObject(new JsonTimeSeries(timeSeries))); + httpService.post(TIME_SERIES_SAVE_SERVICE_URL, new JSONObject(new JsonTimeSeries(timeSeries))); LOG.debug("Успешно отправлен на сервис"); } catch (Exception ex) { LOG.debug(ex.getMessage()); @@ -107,4 +109,15 @@ public class TimeSeriesService { public List getAllTimeSeriesTypes() { return Arrays.asList(TimeSeriesType.values()); } + + public List getByBranch(Integer branchId) { + return timeSeriesRepository.getTimeSeriesByBranchId(branchId); + } + + public Double getLastTimeSeriesTendency(TimeSeries ts) { + JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); + LOG.debug("Успешно отправлен на сервис сглаживания"); + response.get("timeSeries"); + return 0.0; + } } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 03350a6..f9422ed 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -7,8 +7,9 @@ server.port=8080 server.jetty.connection-idle-timeout=1000s # Available levels are: TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF logging.level.ru.ulstu=DEBUG -logging.level.sun.rmi.transport.tcp=off +logging.level.sun.rmi.transport=off logging.level.javax.management.remote.rmi=off +logging.level.java.rmi.server=off extractor.custom-projects-dir= # Thymeleaf Settings spring.thymeleaf.cache=false diff --git a/src/main/resources/db/changelog-20221012_170000-schema.xml b/src/main/resources/db/changelog-20221012_170000-schema.xml index 765df26..3e4dc33 100644 --- a/src/main/resources/db/changelog-20221012_170000-schema.xml +++ b/src/main/resources/db/changelog-20221012_170000-schema.xml @@ -80,4 +80,23 @@ + + + + + + + + + delete + from time_series_value + where time_series_id in (select id from time_series where time_series_type is null OR branch_id is null); + delete + from time_series + where time_series_type is null + OR branch_id is null; + + \ No newline at end of file -- 2.34.1 From 9ef1bb3072c7e7b6ea178efa01cb1725f3938862 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 28 Nov 2022 00:58:36 +0400 Subject: [PATCH 042/122] #76 -- fix rules --- .../extractor/rule/service/DbRuleService.java | 5 ++++ .../rule/service/FuzzyInferenceService.java | 30 +++++++++++++++---- .../ts/service/TimeSeriesService.java | 2 +- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java index a35cca2..198d486 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java @@ -8,6 +8,7 @@ import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.List; +import java.util.stream.Collectors; @Service public class DbRuleService { @@ -60,4 +61,8 @@ public class DbRuleService { public void deleteById(Integer id) { ruleRepository.deleteById(id); } + + public List getConsequentList() { + return ruleRepository.findAll().stream().map(DbRule::getConsequent).collect(Collectors.toList()); + } } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index f011aaf..46a8008 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -44,8 +44,9 @@ public class FuzzyInferenceService { this.timeSeriesService = timeSeriesService; } - public List getRulesFromDb() { + public List getRulesFromDb(Map variableValues) { List dbDbRules = ruleService.getList(); + validateVariables(variableValues, dbDbRules); return dbDbRules.stream().map(this::getFuzzyRule).collect(Collectors.toList()); } @@ -58,7 +59,10 @@ public class FuzzyInferenceService { dbRule.getConsequent()); } - private RuleBlock getRuleBlock(Engine engine, Map variableValues, List antecedentValues) { + private RuleBlock getRuleBlock(Engine engine, + Map variableValues, + List antecedentValues, + List consequentValues) { variableValues.forEach((key, value) -> { InputVariable input = new InputVariable(); input.setName(key); @@ -81,8 +85,8 @@ public class FuzzyInferenceService { output.setDefuzzifier(new Centroid(100)); output.setDefaultValue(Double.NaN); output.setLockValueInRange(false); - for (int i = 0; i < antecedentValues.size(); i++) { - output.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i - 0.1, i + 2.1)); + for (int i = 0; i < consequentValues.size(); i++) { + output.addTerm(new Triangle(consequentValues.get(i), i - 0.1, i + 2.1)); } engine.addOutputVariable(output); @@ -94,7 +98,7 @@ public class FuzzyInferenceService { mamdani.setDisjunction(new BoundedSum()); mamdani.setImplication(new AlgebraicProduct()); mamdani.setActivation(new Highest()); - getRulesFromDb().forEach(r -> mamdani.addRule(Rule.parse(r, engine))); + getRulesFromDb(variableValues).forEach(r -> mamdani.addRule(Rule.parse(r, engine))); return mamdani; } @@ -109,12 +113,26 @@ public class FuzzyInferenceService { List timeSeries = timeSeriesService.getByBranch(branchId); Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); + List consequentValues = ruleService.getConsequentList(); Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); - engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues)); + engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues, consequentValues)); return getConsequent(engine, variableValues); } + private void validateVariables(Map variableValues, List dbDbRules) { + for (DbRule dbRule : dbDbRules) { + if (!variableValues.containsKey(dbRule.getFirstAntecedent().name())) { + throw new RuntimeException(String.format("Переменной в правиле не задано значение (нет временного ряда): %s ", + dbRule.getFirstAntecedent().name())); + } + if (!variableValues.containsKey(dbRule.getSecondAntecedent().name())) { + throw new RuntimeException(String.format("Переменной в правиле не задано значение (нет временного ряда): %s ", + dbRule.getSecondAntecedent().name())); + } + } + } + private String getConsequent(Engine engine, Map variableValues) { OutputVariable outputVariable = engine.getOutputVariable(OUTPUT_VARIABLE_NAME); for (Map.Entry variableValue : variableValues.entrySet()) { diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 4a4b2f2..2faf0bf 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -34,7 +34,7 @@ public class TimeSeriesService { private final TimeSeriesDateMapper.TimeSeriesInterval timeSeriesInterval = TimeSeriesDateMapper.TimeSeriesInterval.HOUR; private final HttpService httpService; private final static String TIME_SERIES_SAVE_SERVICE_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; - private final static String TIME_SERIES_TENDENCY_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; + private final static String TIME_SERIES_TENDENCY_URL = "http://time-series.athene.tech/api/1.0/getSpecificMethodSmoothed"; public TimeSeriesService(TimeSeriesRepository timeSeriesRepository, TimeSeriesValueRepository timeSeriesValueRepository, -- 2.34.1 From 33e426e7f5c82f63830f816acbb380254171e0b5 Mon Sep 17 00:00:00 2001 From: alexandra Date: Thu, 22 Dec 2022 15:53:08 +0400 Subject: [PATCH 043/122] #78 - Add Dummy --- .../extractor/ts/creator/AuthorsCommitTS.java | 18 +++++++++++++++--- .../ts/creator/AuthorsCompletedIssueTS.java | 19 ++++++++++++++++--- .../extractor/ts/creator/AuthorsIssueTS.java | 18 +++++++++++++++--- .../ulstu/extractor/ts/creator/BranchTS.java | 18 +++++++++++++++--- .../ulstu/extractor/ts/creator/ClassTS.java | 18 +++++++++++++++--- .../extractor/ts/creator/DependenceTS.java | 18 +++++++++++++++--- .../extractor/ts/creator/InterfaceTS.java | 18 +++++++++++++++--- .../ulstu/extractor/ts/creator/IssuesTS.java | 18 +++++++++++++++--- .../ulstu/extractor/ts/creator/ProcessTS.java | 18 +++++++++++++++--- .../ru/ulstu/extractor/ts/creator/StarTS.java | 19 ++++++++++++++++--- .../ru/ulstu/extractor/ts/util/DateUtils.java | 13 +++++++++++++ .../ru/ulstu/extractor/ts/util/Dummy.java | 15 +++++++++++++++ 12 files changed, 180 insertions(+), 30 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/util/Dummy.java diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java index 4be4592..005cda2 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java @@ -1,19 +1,24 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class AuthorsCommitTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public AuthorsCommitTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public AuthorsCommitTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override @@ -23,7 +28,14 @@ public class AuthorsCommitTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java index 1fa3ebb..fc25833 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java @@ -1,24 +1,37 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; + +import java.util.Collections; import java.util.List; @Component public class AuthorsCompletedIssueTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList<>(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java index 4ba5df2..f279362 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java @@ -1,24 +1,36 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class AuthorsIssueTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public AuthorsIssueTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public AuthorsIssueTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java index aa6592e..b358cc7 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java @@ -1,19 +1,24 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class BranchTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public BranchTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public BranchTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override @@ -23,7 +28,14 @@ public class BranchTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList<>(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java index 2e7e8ea..406bd43 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java @@ -1,24 +1,36 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class ClassTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public ClassTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public ClassTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java index e534627..d0ba6cb 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java @@ -1,24 +1,36 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class DependenceTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public DependenceTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public DependenceTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java index 8821f8c..0e3d3e5 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java @@ -1,24 +1,36 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class InterfaceTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public InterfaceTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public InterfaceTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java index eef0e20..20ef996 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java @@ -1,24 +1,36 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class IssuesTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public IssuesTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public IssuesTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList<>(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java index f375b66..0000758 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java @@ -1,24 +1,36 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; +import java.util.Collections; import java.util.List; @Component public class ProcessTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public ProcessTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public ProcessTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList<>(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java index 557e9be..b628576 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java @@ -1,24 +1,37 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.Dummy; -import java.util.ArrayList; + +import java.util.Collections; import java.util.List; @Component public class StarTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - public StarTS(TimeSeriesService timeSeriesService) { + private final GitRepositoryService gitRepositoryService; + + public StarTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { - return new ArrayList<>(); + return Collections.singletonList( + new TimeSeries( + String.format("%s %s %s", + gitRepositoryService.findById(repositoryId).getName(), + branchName, + getTimeSeriesType().getDescription()), + getTimeSeriesType(), + Dummy.getDefaultTimeSeries())); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java b/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java new file mode 100644 index 0000000..773e9e0 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java @@ -0,0 +1,13 @@ +package ru.ulstu.extractor.ts.util; + +import java.util.Calendar; +import java.util.Date; +import java.util.GregorianCalendar; + +public class DateUtils { + public static Date addMonths(int amount) { + Calendar c = GregorianCalendar.getInstance(); + c.add(Calendar.DAY_OF_MONTH, amount); + return c.getTime(); + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java b/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java new file mode 100644 index 0000000..61b0389 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java @@ -0,0 +1,15 @@ +package ru.ulstu.extractor.ts.util; + +import ru.ulstu.extractor.ts.model.TimeSeriesValue; + +import java.util.List; + +public class Dummy { + public static List getDefaultTimeSeries (){ + return List.of(new TimeSeriesValue(DateUtils.addMonths(-5), 1.0), + new TimeSeriesValue(DateUtils.addMonths(-4), 2.0), + new TimeSeriesValue(DateUtils.addMonths(-3), 3.0), + new TimeSeriesValue(DateUtils.addMonths(-2), 4.0), + new TimeSeriesValue(DateUtils.addMonths(-1), 5.0)); + } +} -- 2.34.1 From df676849687ed9055ce640c3c62ebd3e4067ef0e Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 22 Dec 2022 16:00:49 +0400 Subject: [PATCH 044/122] #78 -- fix code --- .../gitrepository/service/GitRepositoryService.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index fb0a3eb..e986260 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -30,7 +30,6 @@ import ru.ulstu.extractor.heuristic.model.ResourceUnit; import ru.ulstu.extractor.heuristic.service.StructuralUnitService; import ru.ulstu.extractor.model.Commit; -import javax.swing.text.html.parser.Entity; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.IOException; @@ -40,7 +39,12 @@ import java.net.URL; import java.nio.charset.StandardCharsets; import java.nio.file.Path; import java.time.Instant; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; import java.util.concurrent.CopyOnWriteArrayList; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; -- 2.34.1 From da3de8e4c8b118d309bb56045035c9e1e93a99dd Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 22 Dec 2022 16:33:54 +0400 Subject: [PATCH 045/122] #78 -- fix code --- .../ru/ulstu/extractor/ts/creator/AuthorTS.java | 12 ++++++++++-- .../extractor/ts/creator/AuthorsCommitTS.java | 13 +++++++++++-- .../ts/creator/AuthorsCompletedIssueTS.java | 14 +++++++++++--- .../ulstu/extractor/ts/creator/AuthorsIssueTS.java | 12 ++++++++++-- .../ru/ulstu/extractor/ts/creator/BranchTS.java | 12 ++++++++++-- .../ru/ulstu/extractor/ts/creator/ClassTS.java | 12 ++++++++++-- .../ulstu/extractor/ts/creator/DependenceTS.java | 12 ++++++++++-- .../ru/ulstu/extractor/ts/creator/EntityTS.java | 14 +++++++++++--- .../java/ru/ulstu/extractor/ts/creator/FileTS.java | 13 +++++++++++-- .../ru/ulstu/extractor/ts/creator/InterfaceTS.java | 12 ++++++++++-- .../ru/ulstu/extractor/ts/creator/IssuesTS.java | 12 ++++++++++-- .../ru/ulstu/extractor/ts/creator/ProcessTS.java | 12 ++++++++++-- .../java/ru/ulstu/extractor/ts/creator/StarTS.java | 13 ++++++++++--- 13 files changed, 134 insertions(+), 29 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java index b1c41fb..e4fb786 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java @@ -3,7 +3,9 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; import ru.ulstu.extractor.author.model.Author; import ru.ulstu.extractor.author.service.AuthorService; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -19,14 +21,18 @@ public class AuthorTS extends AbstractTimeSeriesCreator { private final CommitService commitService; private final AuthorService authorService; private final GitRepositoryService gitRepositoryService; + private final BranchService branchService; public AuthorTS(TimeSeriesService timeSeriesService, CommitService commitService, - AuthorService authorService, GitRepositoryService gitRepositoryService) { + AuthorService authorService, + GitRepositoryService gitRepositoryService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.commitService = commitService; this.authorService = authorService; this.gitRepositoryService = gitRepositoryService; + this.branchService = branchService; } @Override @@ -38,14 +44,16 @@ public class AuthorTS extends AbstractTimeSeriesCreator { public List getTimeSeries(Integer repositoryId, String branchName) { List timeSeriesResult = new ArrayList<>(); List authors = authorService.findAll(); + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); for (Author author : authors) { TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, author.getName(), getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType()); for (ru.ulstu.extractor.model.Commit commit : commits) { if (commit.getAuthor().equals(author)) { diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java index 005cda2..2c6927d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,11 +15,15 @@ import java.util.List; @Component public class AuthorsCommitTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public AuthorsCommitTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public AuthorsCommitTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @@ -28,12 +34,15 @@ public class AuthorsCommitTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + //TODO: добавить постраничное чтение return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java index fc25833..700b6cb 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java @@ -1,35 +1,43 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; import ru.ulstu.extractor.ts.util.Dummy; - import java.util.Collections; import java.util.List; @Component public class AuthorsCompletedIssueTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + //TODO: добавить постраничное чтение return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java index f279362..c4fa9ea 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,22 +15,28 @@ import java.util.List; @Component public class AuthorsIssueTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public AuthorsIssueTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public AuthorsIssueTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java index b358cc7..a6d99f0 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,11 +15,15 @@ import java.util.List; @Component public class BranchTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public BranchTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public BranchTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @@ -28,12 +34,14 @@ public class BranchTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java index 406bd43..f284e90 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,22 +15,28 @@ import java.util.List; @Component public class ClassTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public ClassTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public ClassTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java index d0ba6cb..d89b5e8 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,22 +15,28 @@ import java.util.List; @Component public class DependenceTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public DependenceTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public DependenceTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java index 946d9ac..eee1017 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java @@ -1,8 +1,10 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -19,22 +21,28 @@ public class EntityTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final CommitService commitService; private final GitRepositoryService gitRepositoryService; + private final BranchService branchService; - - public EntityTS(TimeSeriesService timeSeriesService, CommitService commitService, GitRepositoryService gitRepositoryService) { + public EntityTS(TimeSeriesService timeSeriesService, + CommitService commitService, + GitRepositoryService gitRepositoryService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.commitService = commitService; this.gitRepositoryService = gitRepositoryService; + this.branchService = branchService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), commitService.findByRepositoryIdAndName(repositoryId, branchName) .stream() diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java index 8e6a934..7ab007d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java @@ -1,8 +1,10 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.ts.model.TimeSeries; @@ -18,23 +20,30 @@ public class FileTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final GitRepositoryService gitRepositoryService; private final CommitService commitService; + private final BranchService branchService; - public FileTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService, CommitService commitService) { + public FileTS(TimeSeriesService timeSeriesService, + GitRepositoryService gitRepositoryService, + CommitService commitService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.gitRepositoryService = gitRepositoryService; this.commitService = commitService; + this.branchService = branchService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); List timeSeriesResult = new ArrayList<>(); List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); double value = 0; TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType()); for (Commit commit : commits) { for (FileChange fileChange : commit.getFileChanges()) { diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java index 0e3d3e5..4c00620 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,22 +15,28 @@ import java.util.List; @Component public class InterfaceTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public InterfaceTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public InterfaceTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java index 20ef996..af43b83 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,22 +15,28 @@ import java.util.List; @Component public class IssuesTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public IssuesTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public IssuesTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java index 0000758..c172063 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java @@ -1,6 +1,8 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; @@ -13,22 +15,28 @@ import java.util.List; @Component public class ProcessTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public ProcessTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public ProcessTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java index b628576..0bbcf93 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java @@ -1,35 +1,42 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; import ru.ulstu.extractor.ts.util.Dummy; - import java.util.Collections; import java.util.List; @Component public class StarTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final GitRepositoryService gitRepositoryService; - public StarTS(TimeSeriesService timeSeriesService, GitRepositoryService gitRepositoryService) { + public StarTS(TimeSeriesService timeSeriesService, + BranchService branchService, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.gitRepositoryService = gitRepositoryService; } @Override public List getTimeSeries(Integer repositoryId, String branchName) { + GitRepository gitRepository = gitRepositoryService.findById(repositoryId); return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepositoryService.findById(repositoryId).getName(), + gitRepository.getName(), branchName, getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } -- 2.34.1 From ca3bfb62f867cb0646c367003c318b6f5df8d943 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 22 Dec 2022 16:52:40 +0400 Subject: [PATCH 046/122] #78 -- fix code --- .../ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java index ac353ac..cad3156 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java @@ -12,7 +12,6 @@ import java.util.List; import static ru.ulstu.extractor.ts.util.TimeSeriesDateMapper.mapTimeSeriesToInterval; public abstract class AbstractTimeSeriesCreator { - public abstract TimeSeriesType getTimeSeriesType(); /** -- 2.34.1 From 9423af3863b8c02a63a55bc5522e78b067ec41b5 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 31 Jan 2023 17:33:05 +0400 Subject: [PATCH 047/122] #80 -- partially fix inference --- .../ulstu/extractor/branch/model/Branch.java | 2 +- .../branch/service/BranchService.java | 7 +++++- .../ulstu/extractor/commit/model/Commit.java | 2 +- .../commit/repository/CommitRepository.java | 2 +- .../commit/service/CommitService.java | 2 +- .../ru/ulstu/extractor/core/BaseEntity.java | 10 ++++---- .../java/ru/ulstu/extractor/core/Route.java | 1 + .../controler/GitFilteringController.java | 2 +- .../controler/GitIndexingController.java | 25 ++++++++++++++++++- .../controler/RepoController.java | 2 +- .../gitrepository/model/FilterForm.java | 2 +- .../service/FilteringService.java | 2 +- .../service/GitRepositoryService.java | 2 +- .../gitrepository/service/IndexService.java | 7 +++++- .../ulstu/extractor/ts/creator/AuthorTS.java | 5 ++-- .../ulstu/extractor/ts/creator/EntityTS.java | 5 ++-- .../ru/ulstu/extractor/ts/creator/FileTS.java | 2 +- .../ts/service/TimeSeriesService.java | 5 ++-- .../resources/templates/listBranches.html | 4 +++ 19 files changed, 64 insertions(+), 25 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java index 12a9f01..046b8c4 100644 --- a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java +++ b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java @@ -7,9 +7,9 @@ package ru.ulstu.extractor.branch.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.core.BaseEntity; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.model.Commit; import javax.persistence.CascadeType; import javax.persistence.Entity; diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index ebb51aa..ce37a85 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -11,12 +11,13 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.repository.BranchRepository; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.core.BaseEntity; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.model.Commit; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; @Service @@ -55,6 +56,10 @@ public class BranchService { return branchRepository.findByGitRepositoryAndName(gitRepository, branchName); } + public Optional findByBranchId(Integer branchId) { + return branchRepository.findById(branchId); + } + public List findAll() { return branchRepository.findAll(); } diff --git a/src/main/java/ru/ulstu/extractor/commit/model/Commit.java b/src/main/java/ru/ulstu/extractor/commit/model/Commit.java index 9f8f109..5906a3f 100644 --- a/src/main/java/ru/ulstu/extractor/commit/model/Commit.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/Commit.java @@ -3,7 +3,7 @@ * You may use, distribute and modify this code, please write to: romanov73@gmail.com. */ -package ru.ulstu.extractor.model; +package ru.ulstu.extractor.commit.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; diff --git a/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java b/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java index d0558d8..70f9888 100644 --- a/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java +++ b/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java @@ -10,12 +10,12 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import org.springframework.data.repository.query.Param; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.model.CommitAuthorStatistic; import ru.ulstu.extractor.commit.model.CommitEntityStatistic; import ru.ulstu.extractor.commit.model.CommitTimeStatistic; import ru.ulstu.extractor.commit.model.CommitUrlStatistic; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.model.Commit; import java.util.List; diff --git a/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java index 050437a..df8d389 100644 --- a/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java +++ b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java @@ -8,8 +8,8 @@ package ru.ulstu.extractor.commit.service; import org.springframework.jdbc.core.JdbcTemplate; import org.springframework.stereotype.Service; import ru.ulstu.extractor.author.service.AuthorService; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.repository.CommitRepository; -import ru.ulstu.extractor.model.Commit; import java.util.List; import java.util.stream.Collectors; diff --git a/src/main/java/ru/ulstu/extractor/core/BaseEntity.java b/src/main/java/ru/ulstu/extractor/core/BaseEntity.java index 43690f1..a87fc94 100644 --- a/src/main/java/ru/ulstu/extractor/core/BaseEntity.java +++ b/src/main/java/ru/ulstu/extractor/core/BaseEntity.java @@ -8,7 +8,7 @@ import javax.persistence.Version; import java.io.Serializable; @MappedSuperclass -public abstract class BaseEntity implements Serializable, Comparable { +public abstract class BaseEntity implements Serializable, Comparable { @Id @GeneratedValue(strategy = GenerationType.TABLE) private Integer id; @@ -49,10 +49,10 @@ public abstract class BaseEntity implements Serializable, Comparable { } BaseEntity other = (BaseEntity) obj; if (id == null) { - if (other.id != null) { + if (other.getId() != null) { return false; } - } else if (!id.equals(other.id)) { + } else if (!id.equals(other.getId())) { return false; } return true; @@ -75,8 +75,8 @@ public abstract class BaseEntity implements Serializable, Comparable { } @Override - public int compareTo(Object o) { - return id != null ? id.compareTo(((BaseEntity) o).getId()) : -1; + public int compareTo(BaseEntity o) { + return id != null ? id.compareTo(o.getId()) : -1; } public void reset() { diff --git a/src/main/java/ru/ulstu/extractor/core/Route.java b/src/main/java/ru/ulstu/extractor/core/Route.java index 8f9b967..614bd69 100644 --- a/src/main/java/ru/ulstu/extractor/core/Route.java +++ b/src/main/java/ru/ulstu/extractor/core/Route.java @@ -13,6 +13,7 @@ public class Route { public static final String DELETE_INDEXED_REPOSITORY = "deleteRepository"; public static final String LIST_REPOSITORY_BRANCHES = "listBranches"; public static final String DELETE_BRANCH = "deleteBranch"; + public static final String REINDEX_BRANCH = "reindexBranch"; public static final String INDEXING_NEW_REPOSITORY = "indexNewRepository"; public static final String FILTER_COMMITS = "filterCommits"; public static final String STATISTIC = "statistic"; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java index 25f9ee7..f083161 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java @@ -11,10 +11,10 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.core.OffsetablePageRequest; import ru.ulstu.extractor.gitrepository.model.FilterForm; import ru.ulstu.extractor.gitrepository.service.FilteringService; -import ru.ulstu.extractor.model.Commit; import springfox.documentation.annotations.ApiIgnore; import java.util.List; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java index e610db7..3343754 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java @@ -14,8 +14,10 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; +import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.gitrepository.model.FilterForm; import ru.ulstu.extractor.gitrepository.model.RepoForm; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; @@ -27,6 +29,7 @@ import java.util.List; import static ru.ulstu.extractor.core.Route.FILTER_COMMITS; import static ru.ulstu.extractor.core.Route.INDEXING_NEW_REPOSITORY; +import static ru.ulstu.extractor.core.Route.REINDEX_BRANCH; @Controller @ApiIgnore @@ -34,11 +37,14 @@ public class GitIndexingController { private final static Logger LOG = LoggerFactory.getLogger(GitIndexingController.class); private final GitRepositoryService gitRepositoryService; private final IndexService indexService; + private final BranchService branchService; public GitIndexingController(GitRepositoryService gitRepositoryService, - IndexService indexService) { + IndexService indexService, + BranchService branchService) { this.gitRepositoryService = gitRepositoryService; this.indexService = indexService; + this.branchService = branchService; } @GetMapping(INDEXING_NEW_REPOSITORY) @@ -76,4 +82,21 @@ public class GitIndexingController { return "redirect:/" + FILTER_COMMITS; } } + + @GetMapping(REINDEX_BRANCH) + public String reindexBranch(Model model, + RedirectAttributes redirectAttributes, + @RequestParam Integer branchId) { + try { + indexService.index(branchId); + } catch (IOException | GitAPIException ex) { + ex.printStackTrace(); + model.addAttribute("error", ex.getMessage()); + return INDEXING_NEW_REPOSITORY; + } + Branch branch = branchService.findByBranchId(branchId).orElseThrow(() -> new RuntimeException("Ветка не найдена по id")); + redirectAttributes.addAttribute("repositoryUrl", branch.getGitRepository().getUrl()); + redirectAttributes.addAttribute("branchName", branch.getName()); + return "redirect:/" + FILTER_COMMITS; + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java index bc14f79..8bd5299 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java @@ -12,9 +12,9 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.gitrepository.service.IndexService; -import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.util.HttpUtils; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java index d25271f..f883c82 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java @@ -6,7 +6,7 @@ package ru.ulstu.extractor.gitrepository.model; import org.springframework.data.domain.Page; -import ru.ulstu.extractor.model.Commit; +import ru.ulstu.extractor.commit.model.Commit; public class FilterForm { private String filter; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java index ccc29de..d3b2a23 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java @@ -10,9 +10,9 @@ import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import ru.ulstu.extractor.author.repository.AuthorRepository; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.repository.CommitRepository; import ru.ulstu.extractor.gitrepository.repository.GitRepositoryRepository; -import ru.ulstu.extractor.model.Commit; import java.util.List; import java.util.Map; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index e986260..2802edf 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -20,6 +20,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import ru.ulstu.extractor.author.model.Author; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.FileChange; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.model.LineChange; @@ -28,7 +29,6 @@ import ru.ulstu.extractor.heuristic.model.BusinessLogicUnit; import ru.ulstu.extractor.heuristic.model.EntityUnit; import ru.ulstu.extractor.heuristic.model.ResourceUnit; import ru.ulstu.extractor.heuristic.service.StructuralUnitService; -import ru.ulstu.extractor.model.Commit; import java.io.ByteArrayOutputStream; import java.io.File; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 5ceb162..b510338 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -12,9 +12,9 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.repository.GitRepositoryRepository; -import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import java.io.IOException; @@ -40,6 +40,11 @@ public class IndexService { this.timeSeriesCreators = timeSeriesCreators; } + public void index(@NotNull Integer branchId) throws GitAPIException, IOException { + Branch branch = branchService.findByBranchId(branchId).orElseThrow(() -> new RuntimeException("Ветка репозитория не найдена по id")); + index(branch.getGitRepository().getUrl(), branch.getName()); + } + public void index(@NotNull String repositoryUrl, @NotNull String branchName) throws GitAPIException, IOException { GitRepository gitRepository = gitRepositoryRepository.findByUrl(repositoryUrl); if (gitRepository == null) { diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java index e4fb786..f2fd7cf 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java @@ -4,6 +4,7 @@ import org.springframework.stereotype.Component; import ru.ulstu.extractor.author.model.Author; import ru.ulstu.extractor.author.service.AuthorService; import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; @@ -45,7 +46,7 @@ public class AuthorTS extends AbstractTimeSeriesCreator { List timeSeriesResult = new ArrayList<>(); List authors = authorService.findAll(); GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); for (Author author : authors) { TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s %s", @@ -55,7 +56,7 @@ public class AuthorTS extends AbstractTimeSeriesCreator { getTimeSeriesType().getDescription()), branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType()); - for (ru.ulstu.extractor.model.Commit commit : commits) { + for (Commit commit : commits) { if (commit.getAuthor().equals(author)) { timeSeries.getValues().add(new TimeSeriesValue(commit.getDate(), 1.0)); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java index eee1017..b20dabd 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java @@ -2,6 +2,7 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; import ru.ulstu.extractor.gitrepository.model.GitRepository; @@ -61,9 +62,9 @@ public class EntityTS extends AbstractTimeSeriesCreator { } public Double findEntity(Integer repositoryId, String branchName) { - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); double value = 0; - for (ru.ulstu.extractor.model.Commit commit : commits) { + for (Commit commit : commits) { for (FileChange fileChange : commit.getFileChanges()) { if ((fileChange.getContainsEntity() != null) && (fileChange.getContainsEntity())) { value = value + 1; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java index 7ab007d..5d5f21a 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java @@ -2,11 +2,11 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.model.Commit; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 2faf0bf..43d385e 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -12,7 +12,6 @@ import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; import ru.ulstu.extractor.http.JsonTimeSeries; -import ru.ulstu.extractor.http.SmoothingTimeSeries; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -115,9 +114,9 @@ public class TimeSeriesService { } public Double getLastTimeSeriesTendency(TimeSeries ts) { - JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); + //JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); LOG.debug("Успешно отправлен на сервис сглаживания"); - response.get("timeSeries"); + //response.get("timeSeries"); return 0.0; } } diff --git a/src/main/resources/templates/listBranches.html b/src/main/resources/templates/listBranches.html index 596a990..b8e32f8 100644 --- a/src/main/resources/templates/listBranches.html +++ b/src/main/resources/templates/listBranches.html @@ -22,6 +22,10 @@ th:text="${branch.name}"/> + + + -- 2.34.1 From 1cd53459ed9f6db8cbe80ede3af3bb77eae867fc Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 31 Jan 2023 23:47:30 +0400 Subject: [PATCH 048/122] #80 -- sout rules --- .../ru/ulstu/extractor/rule/service/FuzzyInferenceService.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 46a8008..5e7e8e2 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -98,6 +98,7 @@ public class FuzzyInferenceService { mamdani.setDisjunction(new BoundedSum()); mamdani.setImplication(new AlgebraicProduct()); mamdani.setActivation(new Highest()); + getRulesFromDb(variableValues).forEach(System.out::println); getRulesFromDb(variableValues).forEach(r -> mamdani.addRule(Rule.parse(r, engine))); return mamdani; } -- 2.34.1 From 412d22fafd41f3362056c9a6481514985586bad9 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 00:15:59 +0400 Subject: [PATCH 049/122] #80 -- fix consequents --- .../ulstu/extractor/rule/service/FuzzyInferenceService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 5e7e8e2..70ae947 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -56,7 +56,7 @@ public class FuzzyInferenceService { dbRule.getFirstAntecedentValue().getAntecedentValue(), dbRule.getSecondAntecedent().name(), dbRule.getSecondAntecedentValue().getAntecedentValue(), - dbRule.getConsequent()); + dbRule.getConsequent().replaceAll(" ", "_")); } private RuleBlock getRuleBlock(Engine engine, @@ -86,7 +86,7 @@ public class FuzzyInferenceService { output.setDefaultValue(Double.NaN); output.setLockValueInRange(false); for (int i = 0; i < consequentValues.size(); i++) { - output.addTerm(new Triangle(consequentValues.get(i), i - 0.1, i + 2.1)); + output.addTerm(new Triangle(consequentValues.get(i).replaceAll(" ", "_"), i - 0.1, i + 2.1)); } engine.addOutputVariable(output); -- 2.34.1 From 237a4f99805bdaac4b7bc6512213edf57ec89d74 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 00:16:36 +0400 Subject: [PATCH 050/122] fix time series name --- src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java index 636061e..f694064 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java @@ -7,7 +7,7 @@ public enum TimeSeriesType { AUTHOR_COMPLETED_ISSUES("Временной ряд завершенных задач авторов"), AUTHORS("Временной ряд авторов"), BRANCHES("Временной ряд веток"), - CLASSES("Временной ряд кклассов"), + CLASSES("Временной ряд классов"), DEPENDENCIES("Временной ряд зависимостей"), ENTITIES("Временной ряд сущностей"), FILES("Временной файлов"), -- 2.34.1 From 4d7f0f38b81f5f360d3e5bad1b633d9e1e79069c Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 01:40:34 +0400 Subject: [PATCH 051/122] #80 -- fix forecasting --- .../rule/service/FuzzyInferenceService.java | 3 +-- .../extractor/ts/service/TimeSeriesService.java | 12 +++++++++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 70ae947..706f55c 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -80,7 +80,7 @@ public class FuzzyInferenceService { output.setName(OUTPUT_VARIABLE_NAME); output.setDescription(""); output.setEnabled(true); - output.setRange(-0.1, antecedentValues.size() + 0.1); + output.setRange(-0.1, consequentValues.size() + 0.1); output.setAggregation(new Maximum()); output.setDefuzzifier(new Centroid(100)); output.setDefaultValue(Double.NaN); @@ -98,7 +98,6 @@ public class FuzzyInferenceService { mamdani.setDisjunction(new BoundedSum()); mamdani.setImplication(new AlgebraicProduct()); mamdani.setActivation(new Highest()); - getRulesFromDb(variableValues).forEach(System.out::println); getRulesFromDb(variableValues).forEach(r -> mamdani.addRule(Rule.parse(r, engine))); return mamdani; } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 43d385e..a901e84 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -5,6 +5,7 @@ package ru.ulstu.extractor.ts.service; +import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -12,6 +13,7 @@ import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; import ru.ulstu.extractor.http.JsonTimeSeries; +import ru.ulstu.extractor.http.SmoothingTimeSeries; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -114,9 +116,13 @@ public class TimeSeriesService { } public Double getLastTimeSeriesTendency(TimeSeries ts) { - //JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); - LOG.debug("Успешно отправлен на сервис сглаживания"); - //response.get("timeSeries"); + if (ts != null && ts.getValues().size() > 5) { + JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); + LOG.debug("Успешно отправлен на сервис сглаживания"); + response.get("timeSeries"); + JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values"); + return jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value"); + } return 0.0; } } -- 2.34.1 From 9aa05b83e2c028a222ed228f3145fb2c99480d17 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 14:36:07 +0400 Subject: [PATCH 052/122] #80 -- fix forecasting --- .../ru/ulstu/extractor/http/HttpService.java | 23 +++++++++------ .../ts/service/TimeSeriesService.java | 4 ++- src/main/resources/application.properties | 3 ++ src/main/resources/templates/error.html | 28 +++++++++++++------ 4 files changed, 39 insertions(+), 19 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/http/HttpService.java b/src/main/java/ru/ulstu/extractor/http/HttpService.java index 9a5d660..6d79315 100644 --- a/src/main/java/ru/ulstu/extractor/http/HttpService.java +++ b/src/main/java/ru/ulstu/extractor/http/HttpService.java @@ -21,15 +21,20 @@ public class HttpService { public JSONObject post(String url, JSONObject postData) { log.debug("Service call: {}", url); - JSONObject response = new JSONObject(Optional.ofNullable(client - .post() - .uri(url) - .contentType(MediaType.APPLICATION_JSON) - .body(BodyInserters.fromValue(postData.toString())) - .accept(MediaType.APPLICATION_JSON) - .retrieve() - .bodyToMono(String.class) - .block()).orElse("{response:\"empty\"}")); + JSONObject response = null; + try { + response = new JSONObject(Optional.ofNullable(client + .post() + .uri(url) + .contentType(MediaType.APPLICATION_JSON) + .body(BodyInserters.fromValue(postData.toString())) + .accept(MediaType.APPLICATION_JSON) + .retrieve() + .bodyToMono(String.class) + .toFuture().get()).orElse("{response:\"empty\"}")); + } catch (Exception e) { + return new JSONObject("{response:\"empty\"}"); + } log.debug("Service response: {}", response); return response; } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index a901e84..3f8f6cd 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -119,7 +119,9 @@ public class TimeSeriesService { if (ts != null && ts.getValues().size() > 5) { JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); LOG.debug("Успешно отправлен на сервис сглаживания"); - response.get("timeSeries"); + if (response.has("response") && response.getString("response").equals("empty")) { + return 0.0; + } JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values"); return jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value"); } diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index f9422ed..193890c 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -11,6 +11,9 @@ logging.level.sun.rmi.transport=off logging.level.javax.management.remote.rmi=off logging.level.java.rmi.server=off extractor.custom-projects-dir= +server.error.include-stacktrace=always +server.error.include-exception=true +server.error.include-message=always # Thymeleaf Settings spring.thymeleaf.cache=false messages.basename.path=messages_en.properties diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index ce4f465..47f0e37 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -32,16 +32,26 @@

-

${url}
-

-
- ${exception.message} +
+ Status + +
+
+ Error + +
+
+ Message + +
+
+ Exception + +
+
+ Stacktrace +
-
    -
  • ${ste}
  • -
-- 2.34.1 From f76976899d7a0c8ddc7f30664f9899fd0408731d Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 22:39:40 +0400 Subject: [PATCH 053/122] #84 -- change page route and semantic --- .../java/ru/ulstu/extractor/core/Route.java | 6 ++-- .../controller/RecommendationController.java | 8 ++--- .../recommendation/model/Assessment.java | 31 +++++++++++++++++++ .../rule/service/FuzzyInferenceService.java | 2 +- ...{recommendations.html => assessments.html} | 0 5 files changed, 39 insertions(+), 8 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java rename src/main/resources/templates/{recommendations.html => assessments.html} (100%) diff --git a/src/main/java/ru/ulstu/extractor/core/Route.java b/src/main/java/ru/ulstu/extractor/core/Route.java index 614bd69..be9cb53 100644 --- a/src/main/java/ru/ulstu/extractor/core/Route.java +++ b/src/main/java/ru/ulstu/extractor/core/Route.java @@ -19,7 +19,7 @@ public class Route { public static final String STATISTIC = "statistic"; public static final String LIST_RULE = "listRules"; public static final String ADD_RULE = "addRule"; - public static final String RECOMMENDATIONS = "recommendations"; + public static final String ASSESSMENTS = "assessments"; public static final String DELETE_RULE = "deleteRule"; public static String getLIST_INDEXED_REPOSITORIES() { @@ -42,7 +42,7 @@ public class Route { return STATISTIC; } - public static String getRECOMMENDATIONS() { - return RECOMMENDATIONS; + public static String getASSESSMENTS() { + return ASSESSMENTS; } } diff --git a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java index 4c0f803..cb53532 100644 --- a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java +++ b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java @@ -11,7 +11,7 @@ import springfox.documentation.annotations.ApiIgnore; import java.util.Optional; -import static ru.ulstu.extractor.core.Route.RECOMMENDATIONS; +import static ru.ulstu.extractor.core.Route.ASSESSMENTS; @Controller @ApiIgnore @@ -25,15 +25,15 @@ public class RecommendationController { this.branchService = branchService; } - @GetMapping(RECOMMENDATIONS) + @GetMapping(ASSESSMENTS) public String getRecommendations(Model model, @RequestParam Optional branchId) { model.addAttribute("branches", branchService.findAll()); if (branchId.isPresent()) { - model.addAttribute("recommendations", fuzzyInferenceService.getRecommendations(branchId.get())); + model.addAttribute("assessments", fuzzyInferenceService.getAssessments(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); } else { model.addAttribute("filterBranchForm", new FilterBranchForm()); } - return RECOMMENDATIONS; + return ASSESSMENTS; } } diff --git a/src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java b/src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java new file mode 100644 index 0000000..7b9c213 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java @@ -0,0 +1,31 @@ +package ru.ulstu.extractor.recommendation.model; + +import ru.ulstu.extractor.ts.model.TimeSeriesType; + +public class Assessment { + private String consequent; + private TimeSeriesType firstAntecedent; + private String firstAntecedentTendency; + private TimeSeriesType secondAntecedent; + private String secondAntecedentTendency; + + public String getConsequent() { + return consequent; + } + + public TimeSeriesType getFirstAntecedent() { + return firstAntecedent; + } + + public String getFirstAntecedentTendency() { + return firstAntecedentTendency; + } + + public TimeSeriesType getSecondAntecedent() { + return secondAntecedent; + } + + public String getSecondAntecedentTendency() { + return secondAntecedentTendency; + } +} diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 706f55c..ce87a89 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -109,7 +109,7 @@ public class FuzzyInferenceService { return engine; } - public String getRecommendations(Integer branchId) { + public String getAssessments(Integer branchId) { List timeSeries = timeSeriesService.getByBranch(branchId); Engine engine = getFuzzyEngine(); List antecedentValues = antecedentValueService.getList(); diff --git a/src/main/resources/templates/recommendations.html b/src/main/resources/templates/assessments.html similarity index 100% rename from src/main/resources/templates/recommendations.html rename to src/main/resources/templates/assessments.html -- 2.34.1 From 13ff304369cd2f46ee437694ea8e9ca5e56108f6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 22:50:04 +0400 Subject: [PATCH 054/122] #84 -- change page content --- .../controller/RecommendationController.java | 2 +- src/main/resources/templates/assessments.html | 21 ++++++++++++++----- src/main/resources/templates/default.html | 2 +- 3 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java index cb53532..750ef57 100644 --- a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java +++ b/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java @@ -26,7 +26,7 @@ public class RecommendationController { } @GetMapping(ASSESSMENTS) - public String getRecommendations(Model model, @RequestParam Optional branchId) { + public String getAssessments(Model model, @RequestParam Optional branchId) { model.addAttribute("branches", branchService.findAll()); if (branchId.isPresent()) { model.addAttribute("assessments", fuzzyInferenceService.getAssessments(branchId.get())); diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index 7d43881..c2cbb47 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -7,7 +7,7 @@
-- 2.34.1 From 14c17284bdc8a033084825cc9960e3a68c5ceec4 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 1 Feb 2023 22:51:12 +0400 Subject: [PATCH 055/122] #84 -- rename package --- .../controller/AssessmentController.java} | 10 +++++----- .../model/Assessment.java | 2 +- .../model/FilterBranchForm.java | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/main/java/ru/ulstu/extractor/{recommendation/controller/RecommendationController.java => assessment/controller/AssessmentController.java} (80%) rename src/main/java/ru/ulstu/extractor/{recommendation => assessment}/model/Assessment.java (93%) rename src/main/java/ru/ulstu/extractor/{recommendation => assessment}/model/FilterBranchForm.java (87%) diff --git a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java similarity index 80% rename from src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java rename to src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index 750ef57..9743f01 100644 --- a/src/main/java/ru/ulstu/extractor/recommendation/controller/RecommendationController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -1,11 +1,11 @@ -package ru.ulstu.extractor.recommendation.controller; +package ru.ulstu.extractor.assessment.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; +import ru.ulstu.extractor.assessment.model.FilterBranchForm; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.recommendation.model.FilterBranchForm; import ru.ulstu.extractor.rule.service.FuzzyInferenceService; import springfox.documentation.annotations.ApiIgnore; @@ -15,12 +15,12 @@ import static ru.ulstu.extractor.core.Route.ASSESSMENTS; @Controller @ApiIgnore -public class RecommendationController { +public class AssessmentController { private final FuzzyInferenceService fuzzyInferenceService; private final BranchService branchService; - public RecommendationController(FuzzyInferenceService fuzzyInferenceService, - BranchService branchService) { + public AssessmentController(FuzzyInferenceService fuzzyInferenceService, + BranchService branchService) { this.fuzzyInferenceService = fuzzyInferenceService; this.branchService = branchService; } diff --git a/src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java b/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java similarity index 93% rename from src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java rename to src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java index 7b9c213..adc11d3 100644 --- a/src/main/java/ru/ulstu/extractor/recommendation/model/Assessment.java +++ b/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.recommendation.model; +package ru.ulstu.extractor.assessment.model; import ru.ulstu.extractor.ts.model.TimeSeriesType; diff --git a/src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java b/src/main/java/ru/ulstu/extractor/assessment/model/FilterBranchForm.java similarity index 87% rename from src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java rename to src/main/java/ru/ulstu/extractor/assessment/model/FilterBranchForm.java index 0d331c3..280727b 100644 --- a/src/main/java/ru/ulstu/extractor/recommendation/model/FilterBranchForm.java +++ b/src/main/java/ru/ulstu/extractor/assessment/model/FilterBranchForm.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.recommendation.model; +package ru.ulstu.extractor.assessment.model; public class FilterBranchForm { private Integer branchId; -- 2.34.1 From 6bb39cc4d6e6f285a5c5c3c53e590db7ffb1e67a Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 Feb 2023 00:50:57 +0400 Subject: [PATCH 056/122] #84 -- fix output --- .../controller/AssessmentController.java | 2 +- .../assessment/model/Assessment.java | 19 ++++++-- .../rule/service/FuzzyInferenceService.java | 47 +++++++++++++++---- src/main/resources/templates/assessments.html | 17 +++---- 4 files changed, 59 insertions(+), 26 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index 9743f01..3e3d3cc 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -29,7 +29,7 @@ public class AssessmentController { public String getAssessments(Model model, @RequestParam Optional branchId) { model.addAttribute("branches", branchService.findAll()); if (branchId.isPresent()) { - model.addAttribute("assessments", fuzzyInferenceService.getAssessments(branchId.get())); + model.addAttribute("assessments", fuzzyInferenceService.getAssessmentsByForecastTendencies(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); } else { model.addAttribute("filterBranchForm", new FilterBranchForm()); diff --git a/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java b/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java index adc11d3..f6609b4 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java +++ b/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java @@ -1,13 +1,22 @@ package ru.ulstu.extractor.assessment.model; +import ru.ulstu.extractor.rule.model.DbRule; import ru.ulstu.extractor.ts.model.TimeSeriesType; public class Assessment { - private String consequent; - private TimeSeriesType firstAntecedent; - private String firstAntecedentTendency; - private TimeSeriesType secondAntecedent; - private String secondAntecedentTendency; + private final String consequent; + private final TimeSeriesType firstAntecedent; + private final String firstAntecedentTendency; + private final TimeSeriesType secondAntecedent; + private final String secondAntecedentTendency; + + public Assessment(DbRule dbRule) { + this.consequent = dbRule.getConsequent(); + this.firstAntecedent = dbRule.getFirstAntecedent(); + this.firstAntecedentTendency = dbRule.getFirstAntecedentValue().getAntecedentValue(); + this.secondAntecedent = dbRule.getSecondAntecedent(); + this.secondAntecedentTendency = dbRule.getSecondAntecedentValue().getAntecedentValue(); + } public String getConsequent() { return consequent; diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index ce87a89..9e0864b 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -12,6 +12,7 @@ import com.fuzzylite.term.Triangle; import com.fuzzylite.variable.InputVariable; import com.fuzzylite.variable.OutputVariable; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.assessment.model.Assessment; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.rule.model.AntecedentValue; import ru.ulstu.extractor.rule.model.DbRule; @@ -22,6 +23,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; +import java.util.stream.Stream; @Service public class FuzzyInferenceService { @@ -56,13 +58,13 @@ public class FuzzyInferenceService { dbRule.getFirstAntecedentValue().getAntecedentValue(), dbRule.getSecondAntecedent().name(), dbRule.getSecondAntecedentValue().getAntecedentValue(), - dbRule.getConsequent().replaceAll(" ", "_")); + dbRule.getId()); } private RuleBlock getRuleBlock(Engine engine, Map variableValues, List antecedentValues, - List consequentValues) { + List consequentValues) { variableValues.forEach((key, value) -> { InputVariable input = new InputVariable(); input.setName(key); @@ -86,7 +88,7 @@ public class FuzzyInferenceService { output.setDefaultValue(Double.NaN); output.setLockValueInRange(false); for (int i = 0; i < consequentValues.size(); i++) { - output.addTerm(new Triangle(consequentValues.get(i).replaceAll(" ", "_"), i - 0.1, i + 2.1)); + output.addTerm(new Triangle(consequentValues.get(i).toString(), i - 0.1, i + 2.1)); } engine.addOutputVariable(output); @@ -109,15 +111,42 @@ public class FuzzyInferenceService { return engine; } - public String getAssessments(Integer branchId) { + public List getAssessmentsByForecastTendencies(Integer branchId) { List timeSeries = timeSeriesService.getByBranch(branchId); + List dbRules = ruleService.getList(); + return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); + } + + public List getAssessmentsByLastValues(Integer branchId) { + List timeSeries = timeSeriesService.getByBranch(branchId); + List dbRules = ruleService.getList(); + return getAssessmentsByLastValues(dbRules, timeSeries); + } + + private List getFuzzyInference(List dbRules, Map variableValues) { Engine engine = getFuzzyEngine(); - List antecedentValues = antecedentValueService.getList(); - List consequentValues = ruleService.getConsequentList(); + List antecedentValues = Stream.concat(dbRules.stream().map(DbRule::getFirstAntecedentValue), + dbRules.stream().map(DbRule::getSecondAntecedentValue)).distinct().collect(Collectors.toList()); + List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); + engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues, consequentValues)); + String consequent = getConsequent(engine, variableValues); + return dbRules + .stream() + .filter(r -> r.getId().equals(Integer.valueOf(consequent))) + .map(Assessment::new) + .collect(Collectors.toList()); + } + + private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); - engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues, consequentValues)); - return getConsequent(engine, variableValues); + return getFuzzyInference(dbRules, variableValues); + } + + private List getAssessmentsByLastValues(List dbRules, List timeSeries) { + Map variableValues = new HashMap<>(); + timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); + return getFuzzyInference(dbRules, variableValues); } private void validateVariables(Map variableValues, List dbDbRules) { @@ -144,7 +173,7 @@ public class FuzzyInferenceService { outputVariable.defuzzify(); } return (outputVariable == null || Double.isNaN(outputVariable.getValue())) - ? "Нет рекомендаций" + ? "Нет результата" : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); } } diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index c2cbb47..013e37c 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -35,18 +35,13 @@
-

Состояние репозитория описывается следующими выражениями:

+
Состояние репозитория описывается следующими выражениями:
-
- вследствие тенденции -
- показателя -
- и тенденции -
- показателя -
- и + + вследствие тенденции '' показателя '' + и тенденции '' показателя '';
-- 2.34.1 From 36e2b095685fb5d1912e5f2f65052cd1ab0459e3 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 Feb 2023 01:01:03 +0400 Subject: [PATCH 057/122] #84 -- fix integer cast --- .../extractor/rule/service/FuzzyInferenceService.java | 7 ++++++- src/main/resources/templates/assessments.html | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 9e0864b..d17d112 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -19,6 +19,7 @@ import ru.ulstu.extractor.rule.model.DbRule; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -31,6 +32,7 @@ public class FuzzyInferenceService { private final static String RULE_TEMPLATE = "if %s is %s and %s is %s then " + OUTPUT_VARIABLE_NAME + " is %s"; + private final static String NO_RESULT = "Нет результата"; private final DbRuleService ruleService; private final AntecedentValueService antecedentValueService; private final GitRepositoryService gitRepositoryService; @@ -130,6 +132,9 @@ public class FuzzyInferenceService { List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues, consequentValues)); String consequent = getConsequent(engine, variableValues); + if (consequent.equals(NO_RESULT)) { + return new ArrayList<>(); + } return dbRules .stream() .filter(r -> r.getId().equals(Integer.valueOf(consequent))) @@ -173,7 +178,7 @@ public class FuzzyInferenceService { outputVariable.defuzzify(); } return (outputVariable == null || Double.isNaN(outputVariable.getValue())) - ? "Нет результата" + ? NO_RESULT : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); } } diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index 013e37c..516628a 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -34,7 +34,7 @@ -
+
Состояние репозитория описывается следующими выражениями:
@@ -44,5 +44,8 @@ th:text="${assessment.secondAntecedent.description}">';
+
+
Нет результатов
+
-- 2.34.1 From e4d32a3e92513fc9b20af837c1d8c4b94dd32eb8 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 Feb 2023 13:02:13 +0400 Subject: [PATCH 058/122] #84 -- multiple assessments --- .../rule/model/AssessmentException.java | 7 ++++ .../rule/service/FuzzyInferenceService.java | 41 +++++++++++++++---- .../ts/service/TimeSeriesService.java | 8 ++-- 3 files changed, 43 insertions(+), 13 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/rule/model/AssessmentException.java diff --git a/src/main/java/ru/ulstu/extractor/rule/model/AssessmentException.java b/src/main/java/ru/ulstu/extractor/rule/model/AssessmentException.java new file mode 100644 index 0000000..d021db6 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/rule/model/AssessmentException.java @@ -0,0 +1,7 @@ +package ru.ulstu.extractor.rule.model; + +public class AssessmentException extends RuntimeException { + public AssessmentException(String message) { + super(message); + } +} diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index d17d112..9d8bc86 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -15,6 +15,7 @@ import org.springframework.stereotype.Service; import ru.ulstu.extractor.assessment.model.Assessment; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.rule.model.AntecedentValue; +import ru.ulstu.extractor.rule.model.AssessmentException; import ru.ulstu.extractor.rule.model.DbRule; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -48,10 +49,9 @@ public class FuzzyInferenceService { this.timeSeriesService = timeSeriesService; } - public List getRulesFromDb(Map variableValues) { - List dbDbRules = ruleService.getList(); - validateVariables(variableValues, dbDbRules); - return dbDbRules.stream().map(this::getFuzzyRule).collect(Collectors.toList()); + public List getRulesFromDb(List dbRules, Map variableValues) { + validateVariables(variableValues, dbRules); + return dbRules.stream().map(this::getFuzzyRule).collect(Collectors.toList()); } private String getFuzzyRule(DbRule dbRule) { @@ -64,6 +64,7 @@ public class FuzzyInferenceService { } private RuleBlock getRuleBlock(Engine engine, + List dbRules, Map variableValues, List antecedentValues, List consequentValues) { @@ -102,7 +103,7 @@ public class FuzzyInferenceService { mamdani.setDisjunction(new BoundedSum()); mamdani.setImplication(new AlgebraicProduct()); mamdani.setActivation(new Highest()); - getRulesFromDb(variableValues).forEach(r -> mamdani.addRule(Rule.parse(r, engine))); + getRulesFromDb(dbRules, variableValues).forEach(r -> mamdani.addRule(Rule.parse(r, engine))); return mamdani; } @@ -116,7 +117,11 @@ public class FuzzyInferenceService { public List getAssessmentsByForecastTendencies(Integer branchId) { List timeSeries = timeSeriesService.getByBranch(branchId); List dbRules = ruleService.getList(); - return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); + try { + return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); + } catch (AssessmentException ex) { + return new ArrayList<>(); + } } public List getAssessmentsByLastValues(Integer branchId) { @@ -130,7 +135,7 @@ public class FuzzyInferenceService { List antecedentValues = Stream.concat(dbRules.stream().map(DbRule::getFirstAntecedentValue), dbRules.stream().map(DbRule::getSecondAntecedentValue)).distinct().collect(Collectors.toList()); List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); - engine.addRuleBlock(getRuleBlock(engine, variableValues, antecedentValues, consequentValues)); + engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, antecedentValues, consequentValues)); String consequent = getConsequent(engine, variableValues); if (consequent.equals(NO_RESULT)) { return new ArrayList<>(); @@ -142,12 +147,30 @@ public class FuzzyInferenceService { .collect(Collectors.toList()); } - private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { + private List getSingleAssessmentByTimeSeriesTendencies(List dbRules, List timeSeries) throws AssessmentException { Map variableValues = new HashMap<>(); - timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); + timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), + timeSeriesService.getLastTimeSeriesTendency(ts) + .orElseThrow(() -> new AssessmentException("")))); return getFuzzyInference(dbRules, variableValues); } + private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { + return dbRules + .stream() + .flatMap(dbRule -> { + Map variableValues = new HashMap<>(); + timeSeries + .stream() + .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() + || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) + .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService + .getLastTimeSeriesTendency(ts) + .orElseThrow(() -> new AssessmentException("")))); + return getFuzzyInference(List.of(dbRule), variableValues).stream(); + }).collect(Collectors.toList()); + } + private List getAssessmentsByLastValues(List dbRules, List timeSeries) { Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 3f8f6cd..4cc2de9 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -115,16 +115,16 @@ public class TimeSeriesService { return timeSeriesRepository.getTimeSeriesByBranchId(branchId); } - public Double getLastTimeSeriesTendency(TimeSeries ts) { + public Optional getLastTimeSeriesTendency(TimeSeries ts) { if (ts != null && ts.getValues().size() > 5) { JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); LOG.debug("Успешно отправлен на сервис сглаживания"); if (response.has("response") && response.getString("response").equals("empty")) { - return 0.0; + return Optional.empty(); } JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values"); - return jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value"); + return Optional.of(jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value")); } - return 0.0; + return Optional.empty(); } } -- 2.34.1 From 4216356c35fc8e750917fc889dc6542b9431591b Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 6 Feb 2023 13:54:12 +0400 Subject: [PATCH 059/122] #86 -- divide bl --- .../controller/AssessmentController.java | 10 +-- .../rule/service/FuzzyInferenceService.java | 67 +--------------- .../service/assessment/AssessmentService.java | 78 +++++++++++++++++++ .../java/ru/ulstu/FuzzyInferenceTest.java | 15 ++++ .../java/ru/ulstu/TimeSeriesMapperTest.java | 28 +++---- 5 files changed, 115 insertions(+), 83 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java create mode 100644 src/test/java/ru/ulstu/FuzzyInferenceTest.java diff --git a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index 3e3d3cc..b960b4d 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import ru.ulstu.extractor.assessment.model.FilterBranchForm; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.rule.service.FuzzyInferenceService; +import ru.ulstu.extractor.service.assessment.AssessmentService; import springfox.documentation.annotations.ApiIgnore; import java.util.Optional; @@ -16,12 +16,12 @@ import static ru.ulstu.extractor.core.Route.ASSESSMENTS; @Controller @ApiIgnore public class AssessmentController { - private final FuzzyInferenceService fuzzyInferenceService; + private final AssessmentService assessmentService; private final BranchService branchService; - public AssessmentController(FuzzyInferenceService fuzzyInferenceService, + public AssessmentController(AssessmentService assessmentService, BranchService branchService) { - this.fuzzyInferenceService = fuzzyInferenceService; + this.assessmentService = assessmentService; this.branchService = branchService; } @@ -29,7 +29,7 @@ public class AssessmentController { public String getAssessments(Model model, @RequestParam Optional branchId) { model.addAttribute("branches", branchService.findAll()); if (branchId.isPresent()) { - model.addAttribute("assessments", fuzzyInferenceService.getAssessmentsByForecastTendencies(branchId.get())); + model.addAttribute("assessments", assessmentService.getAssessmentsByForecastTendencies(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); } else { model.addAttribute("filterBranchForm", new FilterBranchForm()); diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 9d8bc86..38a6a58 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -13,15 +13,10 @@ import com.fuzzylite.variable.InputVariable; import com.fuzzylite.variable.OutputVariable; import org.springframework.stereotype.Service; import ru.ulstu.extractor.assessment.model.Assessment; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.rule.model.AntecedentValue; -import ru.ulstu.extractor.rule.model.AssessmentException; import ru.ulstu.extractor.rule.model.DbRule; -import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.stream.Collectors; @@ -34,22 +29,8 @@ public class FuzzyInferenceService { + OUTPUT_VARIABLE_NAME + " is %s"; private final static String NO_RESULT = "Нет результата"; - private final DbRuleService ruleService; - private final AntecedentValueService antecedentValueService; - private final GitRepositoryService gitRepositoryService; - private final TimeSeriesService timeSeriesService; - public FuzzyInferenceService(DbRuleService ruleService, - AntecedentValueService antecedentValueService, - GitRepositoryService gitRepositoryService, - TimeSeriesService timeSeriesService) { - this.ruleService = ruleService; - this.antecedentValueService = antecedentValueService; - this.gitRepositoryService = gitRepositoryService; - this.timeSeriesService = timeSeriesService; - } - - public List getRulesFromDb(List dbRules, Map variableValues) { + private List getRulesFromDb(List dbRules, Map variableValues) { validateVariables(variableValues, dbRules); return dbRules.stream().map(this::getFuzzyRule).collect(Collectors.toList()); } @@ -114,23 +95,8 @@ public class FuzzyInferenceService { return engine; } - public List getAssessmentsByForecastTendencies(Integer branchId) { - List timeSeries = timeSeriesService.getByBranch(branchId); - List dbRules = ruleService.getList(); - try { - return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); - } catch (AssessmentException ex) { - return new ArrayList<>(); - } - } - public List getAssessmentsByLastValues(Integer branchId) { - List timeSeries = timeSeriesService.getByBranch(branchId); - List dbRules = ruleService.getList(); - return getAssessmentsByLastValues(dbRules, timeSeries); - } - - private List getFuzzyInference(List dbRules, Map variableValues) { + public List getFuzzyInference(List dbRules, Map variableValues) { Engine engine = getFuzzyEngine(); List antecedentValues = Stream.concat(dbRules.stream().map(DbRule::getFirstAntecedentValue), dbRules.stream().map(DbRule::getSecondAntecedentValue)).distinct().collect(Collectors.toList()); @@ -147,35 +113,6 @@ public class FuzzyInferenceService { .collect(Collectors.toList()); } - private List getSingleAssessmentByTimeSeriesTendencies(List dbRules, List timeSeries) throws AssessmentException { - Map variableValues = new HashMap<>(); - timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), - timeSeriesService.getLastTimeSeriesTendency(ts) - .orElseThrow(() -> new AssessmentException("")))); - return getFuzzyInference(dbRules, variableValues); - } - - private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { - return dbRules - .stream() - .flatMap(dbRule -> { - Map variableValues = new HashMap<>(); - timeSeries - .stream() - .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() - || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) - .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService - .getLastTimeSeriesTendency(ts) - .orElseThrow(() -> new AssessmentException("")))); - return getFuzzyInference(List.of(dbRule), variableValues).stream(); - }).collect(Collectors.toList()); - } - - private List getAssessmentsByLastValues(List dbRules, List timeSeries) { - Map variableValues = new HashMap<>(); - timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); - return getFuzzyInference(dbRules, variableValues); - } private void validateVariables(Map variableValues, List dbDbRules) { for (DbRule dbRule : dbDbRules) { diff --git a/src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java b/src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java new file mode 100644 index 0000000..5edd2ec --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java @@ -0,0 +1,78 @@ +package ru.ulstu.extractor.service.assessment; + +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.assessment.model.Assessment; +import ru.ulstu.extractor.rule.model.AssessmentException; +import ru.ulstu.extractor.rule.model.DbRule; +import ru.ulstu.extractor.rule.service.DbRuleService; +import ru.ulstu.extractor.rule.service.FuzzyInferenceService; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.service.TimeSeriesService; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +@Service +public class AssessmentService { + private final DbRuleService ruleService; + private final TimeSeriesService timeSeriesService; + private final FuzzyInferenceService fuzzyInferenceService; + + public AssessmentService(DbRuleService ruleService, + TimeSeriesService timeSeriesService, + FuzzyInferenceService fuzzyInferenceService) { + this.ruleService = ruleService; + this.timeSeriesService = timeSeriesService; + this.fuzzyInferenceService = fuzzyInferenceService; + } + + public List getAssessmentsByForecastTendencies(Integer branchId) { + List timeSeries = timeSeriesService.getByBranch(branchId); + List dbRules = ruleService.getList(); + try { + return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); + } catch (AssessmentException ex) { + return new ArrayList<>(); + } + } + + public List getAssessmentsByLastValues(Integer branchId) { + List timeSeries = timeSeriesService.getByBranch(branchId); + List dbRules = ruleService.getList(); + return getAssessmentsByLastValues(dbRules, timeSeries); + } + + private List getSingleAssessmentByTimeSeriesTendencies(List dbRules, List timeSeries) throws AssessmentException { + Map variableValues = new HashMap<>(); + timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), + timeSeriesService.getLastTimeSeriesTendency(ts) + .orElseThrow(() -> new AssessmentException("")))); + return fuzzyInferenceService.getFuzzyInference(dbRules, variableValues); + } + + private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { + return dbRules + .stream() + .flatMap(dbRule -> { + Map variableValues = new HashMap<>(); + timeSeries + .stream() + .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() + || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) + .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService + .getLastTimeSeriesTendency(ts) + .orElseThrow(() -> new AssessmentException("")))); + return fuzzyInferenceService.getFuzzyInference(List.of(dbRule), variableValues).stream(); + }).collect(Collectors.toList()); + } + + private List getAssessmentsByLastValues(List dbRules, List timeSeries) { + Map variableValues = new HashMap<>(); + timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); + return fuzzyInferenceService.getFuzzyInference(dbRules, variableValues); + } + +} diff --git a/src/test/java/ru/ulstu/FuzzyInferenceTest.java b/src/test/java/ru/ulstu/FuzzyInferenceTest.java new file mode 100644 index 0000000..99d69ef --- /dev/null +++ b/src/test/java/ru/ulstu/FuzzyInferenceTest.java @@ -0,0 +1,15 @@ +package ru.ulstu; + +import org.junit.Assert; +import org.junit.Test; +import ru.ulstu.extractor.rule.service.FuzzyInferenceService; + +public class FuzzyInferenceTest { + + private final FuzzyInferenceService fuzzyInferenceService = new FuzzyInferenceService(); + + @Test + public void test() { + Assert.assertNotNull(fuzzyInferenceService); + } +} diff --git a/src/test/java/ru/ulstu/TimeSeriesMapperTest.java b/src/test/java/ru/ulstu/TimeSeriesMapperTest.java index d799a2b..9beb443 100644 --- a/src/test/java/ru/ulstu/TimeSeriesMapperTest.java +++ b/src/test/java/ru/ulstu/TimeSeriesMapperTest.java @@ -2,7 +2,9 @@ package ru.ulstu; import org.junit.Assert; import org.junit.Test; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.util.TimeSeriesDateMapper; @@ -17,13 +19,13 @@ public class TimeSeriesMapperTest { c1.set(2020, 5, 1, 1, 1, 1); Calendar c2 = GregorianCalendar.getInstance(); c2.set(2020, 5, 2, 2, 1, 1); - TimeSeries timeSeries = new TimeSeries("Тестовый", + TimeSeries timeSeries = new TimeSeries("Тестовый", new Branch(), TimeSeriesType.COMMITS, Arrays.asList(new TimeSeriesValue(c1.getTime(), 10.0), new TimeSeriesValue(c2.getTime(), 10.0))); TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); - timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); + timeSeries = TimeSeriesDateMapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); Assert.assertEquals(1, timeSeries.getValues().size()); - Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + Assert.assertEquals(Double.valueOf(20), timeSeries.getValues().get(0).getValue()); } @Test @@ -32,13 +34,13 @@ public class TimeSeriesMapperTest { c1.set(2020, 5, 1, 1, 1, 1); Calendar c2 = GregorianCalendar.getInstance(); c2.set(2020, 5, 2, 1, 1, 1); - TimeSeries timeSeries = new TimeSeries("Тестовый", + TimeSeries timeSeries = new TimeSeries("Тестовый", new Branch(), TimeSeriesType.COMMITS, Arrays.asList(new TimeSeriesValue(c1.getTime(), 10.0), new TimeSeriesValue(c2.getTime(), 10.0))); TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); Assert.assertEquals(1, timeSeries.getValues().size()); - Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + Assert.assertEquals(Double.valueOf(20), timeSeries.getValues().get(0).getValue()); } @Test @@ -47,13 +49,13 @@ public class TimeSeriesMapperTest { c1.set(2020, 5, 1, 1, 1, 1); Calendar c2 = GregorianCalendar.getInstance(); c2.set(2020, 5, 2, 1, 1, 1); - TimeSeries timeSeries = new TimeSeries("Тестовый", + TimeSeries timeSeries = new TimeSeries("Тестовый", new Branch(), TimeSeriesType.COMMITS, Arrays.asList(new TimeSeriesValue(c1.getTime(), 10.0), new TimeSeriesValue(c2.getTime(), 10.0))); TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); Assert.assertEquals(1, timeSeries.getValues().size()); - Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + Assert.assertEquals(Double.valueOf(20), timeSeries.getValues().get(0).getValue()); } @Test @@ -62,13 +64,13 @@ public class TimeSeriesMapperTest { c1.set(2020, 5, 1, 1, 1, 1); Calendar c2 = GregorianCalendar.getInstance(); c2.set(2020, 6, 2, 1, 1, 1); - TimeSeries timeSeries = new TimeSeries("Тестовый", + TimeSeries timeSeries = new TimeSeries("Тестовый", new Branch(), TimeSeriesType.COMMITS, Arrays.asList(new TimeSeriesValue(c1.getTime(), 10.0), new TimeSeriesValue(c2.getTime(), 10.0))); TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.MONTH, timeSeries); Assert.assertEquals(2, timeSeries.getValues().size()); - Assert.assertEquals(Integer.valueOf(10), timeSeries.getValues().get(0).getValue()); + Assert.assertEquals(Double.valueOf(10), timeSeries.getValues().get(0).getValue()); } @Test @@ -77,13 +79,13 @@ public class TimeSeriesMapperTest { c1.set(2020, 5, 1, 1, 1, 1); Calendar c2 = GregorianCalendar.getInstance(); c2.set(2020, 5, 2, 1, 1, 1); - TimeSeries timeSeries = new TimeSeries("Тестовый", + TimeSeries timeSeries = new TimeSeries("Тестовый", new Branch(), TimeSeriesType.COMMITS, Arrays.asList(new TimeSeriesValue(c1.getTime(), 10.0), new TimeSeriesValue(c2.getTime(), 10.0))); TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.YEAR, timeSeries); Assert.assertEquals(1, timeSeries.getValues().size()); - Assert.assertEquals(Integer.valueOf(20), timeSeries.getValues().get(0).getValue()); + Assert.assertEquals(Double.valueOf(20), timeSeries.getValues().get(0).getValue()); } @Test @@ -92,12 +94,12 @@ public class TimeSeriesMapperTest { c1.set(2020, 5, 1, 1, 1, 1); Calendar c2 = GregorianCalendar.getInstance(); c2.set(2021, 5, 2, 1, 1, 1); - TimeSeries timeSeries = new TimeSeries("Тестовый", + TimeSeries timeSeries = new TimeSeries("Тестовый", new Branch(), TimeSeriesType.COMMITS, Arrays.asList(new TimeSeriesValue(c1.getTime(), 10.0), new TimeSeriesValue(c2.getTime(), 10.0))); TimeSeriesDateMapper mapper = new TimeSeriesDateMapper(); timeSeries = mapper.mapTimeSeriesToInterval(TimeSeriesDateMapper.TimeSeriesInterval.YEAR, timeSeries); Assert.assertEquals(2, timeSeries.getValues().size()); - Assert.assertEquals(Integer.valueOf(10), timeSeries.getValues().get(0).getValue()); + Assert.assertEquals(Double.valueOf(10), timeSeries.getValues().get(0).getValue()); } } -- 2.34.1 From 4143fcfb20638651f2a5564d96c1491487150ae6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 7 Feb 2023 16:36:32 +0400 Subject: [PATCH 060/122] #86 -- fix fuzzy inference --- .../controller/AssessmentController.java | 2 +- .../assessment/model/Assessment.java | 8 +- .../service}/AssessmentService.java | 68 +++++++++++++++-- .../service/GitRepositoryService.java | 1 - .../extractor/rule/model/AntecedentValue.java | 3 +- .../rule/service/FuzzyInferenceService.java | 75 ++++++++++++------- src/main/resources/templates/assessments.html | 1 + .../java/ru/ulstu/FuzzyInferenceTest.java | 15 ---- 8 files changed, 120 insertions(+), 53 deletions(-) rename src/main/java/ru/ulstu/extractor/{service/assessment => assessment/service}/AssessmentService.java (55%) delete mode 100644 src/test/java/ru/ulstu/FuzzyInferenceTest.java diff --git a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index b960b4d..3434377 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -5,8 +5,8 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestParam; import ru.ulstu.extractor.assessment.model.FilterBranchForm; +import ru.ulstu.extractor.assessment.service.AssessmentService; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.service.assessment.AssessmentService; import springfox.documentation.annotations.ApiIgnore; import java.util.Optional; diff --git a/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java b/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java index f6609b4..db5e048 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java +++ b/src/main/java/ru/ulstu/extractor/assessment/model/Assessment.java @@ -9,13 +9,15 @@ public class Assessment { private final String firstAntecedentTendency; private final TimeSeriesType secondAntecedent; private final String secondAntecedentTendency; + private final Double degree; - public Assessment(DbRule dbRule) { + public Assessment(DbRule dbRule, Double degree) { this.consequent = dbRule.getConsequent(); this.firstAntecedent = dbRule.getFirstAntecedent(); this.firstAntecedentTendency = dbRule.getFirstAntecedentValue().getAntecedentValue(); this.secondAntecedent = dbRule.getSecondAntecedent(); this.secondAntecedentTendency = dbRule.getSecondAntecedentValue().getAntecedentValue(); + this.degree = degree; } public String getConsequent() { @@ -37,4 +39,8 @@ public class Assessment { public String getSecondAntecedentTendency() { return secondAntecedentTendency; } + + public Double getDegree() { + return degree; + } } diff --git a/src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java similarity index 55% rename from src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java rename to src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index 5edd2ec..d221806 100644 --- a/src/main/java/ru/ulstu/extractor/service/assessment/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -1,15 +1,18 @@ -package ru.ulstu.extractor.service.assessment; +package ru.ulstu.extractor.assessment.service; import org.springframework.stereotype.Service; import ru.ulstu.extractor.assessment.model.Assessment; import ru.ulstu.extractor.rule.model.AssessmentException; import ru.ulstu.extractor.rule.model.DbRule; +import ru.ulstu.extractor.rule.service.AntecedentValueService; import ru.ulstu.extractor.rule.service.DbRuleService; import ru.ulstu.extractor.rule.service.FuzzyInferenceService; import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.ArrayList; +import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -18,13 +21,16 @@ import java.util.stream.Collectors; @Service public class AssessmentService { private final DbRuleService ruleService; + private final AntecedentValueService antecedentValueService; private final TimeSeriesService timeSeriesService; private final FuzzyInferenceService fuzzyInferenceService; public AssessmentService(DbRuleService ruleService, + AntecedentValueService antecedentValueService, TimeSeriesService timeSeriesService, FuzzyInferenceService fuzzyInferenceService) { this.ruleService = ruleService; + this.antecedentValueService = antecedentValueService; this.timeSeriesService = timeSeriesService; this.fuzzyInferenceService = fuzzyInferenceService; } @@ -35,6 +41,7 @@ public class AssessmentService { try { return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); } catch (AssessmentException ex) { + ex.printStackTrace(); return new ArrayList<>(); } } @@ -50,7 +57,11 @@ public class AssessmentService { timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts) .orElseThrow(() -> new AssessmentException("")))); - return fuzzyInferenceService.getFuzzyInference(dbRules, variableValues); + return fuzzyInferenceService.getFuzzyInference(dbRules, + antecedentValueService.getList(), + variableValues, + getTSsMin(timeSeries), + getTSsMax(timeSeries)); } private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { @@ -64,15 +75,60 @@ public class AssessmentService { || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService .getLastTimeSeriesTendency(ts) - .orElseThrow(() -> new AssessmentException("")))); - return fuzzyInferenceService.getFuzzyInference(List.of(dbRule), variableValues).stream(); - }).collect(Collectors.toList()); + .orElse(ts.getValues().get(ts.getValues().size() - 1).getValue()))); + return fuzzyInferenceService.getFuzzyInference(List.of(dbRule), + antecedentValueService.getList(), + variableValues, + getTSsMin(timeSeries), + getTSsMax(timeSeries)).stream(); + }) + .sorted(Comparator.comparing(Assessment::getDegree)) + .collect(Collectors.toList()); } private List getAssessmentsByLastValues(List dbRules, List timeSeries) { Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); - return fuzzyInferenceService.getFuzzyInference(dbRules, variableValues); + return fuzzyInferenceService.getFuzzyInference(dbRules, + antecedentValueService.getList(), + variableValues, + getTSsMin(timeSeries), + getTSsMax(timeSeries)); } + private Double getMin(List values) { + return values.stream().mapToDouble(v -> v).min().getAsDouble(); + } + + private Map.Entry getTSMin(TimeSeries ts) { + return Map.entry(ts.getTimeSeriesType().name(), + getMin(ts.getValues().stream().map(TimeSeriesValue::getValue).collect(Collectors.toList()))); + } + + private Map getTSsMin(List tss) { + Map res = new HashMap<>(); + tss.forEach(ts -> { + Map.Entry entry = getTSMin(ts); + res.put(entry.getKey(), entry.getValue()); + }); + return res; + } + + private Double getMax(List values) { + return values.stream().mapToDouble(v -> v).max().getAsDouble(); + } + + private Map.Entry getTSMax(TimeSeries ts) { + return Map.entry(ts.getTimeSeriesType().name(), + getMax(ts.getValues().stream().map(TimeSeriesValue::getValue).collect(Collectors.toList()))); + } + + private Map getTSsMax(List tss) { + Map res = new HashMap<>(); + tss.forEach(ts -> { + Map.Entry entry = getTSMax(ts); + res.put(entry.getKey(), entry.getValue()); + }); + return res; + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index 2802edf..2d451e1 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -283,7 +283,6 @@ public class GitRepositoryService { List changes = new ArrayList<>(); String[] strings = output.split("\n"); Map> filesContent = getFilesContent(strings); - System.out.println(filesContent); for(Map.Entry> fileSterings: filesContent.entrySet()) { FileChange fileChange = new FileChange(); fileChange.setFile(fileSterings.getKey()); diff --git a/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java b/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java index 39b5eb6..3583e6a 100644 --- a/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java +++ b/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java @@ -11,7 +11,8 @@ public class AntecedentValue extends BaseEntity { public AntecedentValue() { } - public AntecedentValue(String antecedentValue) { + public AntecedentValue(Integer id, String antecedentValue) { + this.setId(id); this.antecedentValue = antecedentValue; } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 38a6a58..6768c87 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -1,16 +1,18 @@ package ru.ulstu.extractor.rule.service; import com.fuzzylite.Engine; -import com.fuzzylite.activation.Highest; +import com.fuzzylite.activation.General; import com.fuzzylite.defuzzifier.Centroid; -import com.fuzzylite.norm.s.BoundedSum; import com.fuzzylite.norm.s.Maximum; import com.fuzzylite.norm.t.AlgebraicProduct; +import com.fuzzylite.norm.t.Minimum; import com.fuzzylite.rule.Rule; import com.fuzzylite.rule.RuleBlock; import com.fuzzylite.term.Triangle; import com.fuzzylite.variable.InputVariable; import com.fuzzylite.variable.OutputVariable; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import ru.ulstu.extractor.assessment.model.Assessment; import ru.ulstu.extractor.rule.model.AntecedentValue; @@ -20,10 +22,12 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; import java.util.stream.Collectors; -import java.util.stream.Stream; + +import static java.lang.String.format; @Service public class FuzzyInferenceService { + private final static Logger LOG = LoggerFactory.getLogger(FuzzyInferenceService.class); private final static String OUTPUT_VARIABLE_NAME = "state"; private final static String RULE_TEMPLATE = "if %s is %s and %s is %s then " + OUTPUT_VARIABLE_NAME @@ -36,7 +40,7 @@ public class FuzzyInferenceService { } private String getFuzzyRule(DbRule dbRule) { - return String.format(RULE_TEMPLATE, + return format(RULE_TEMPLATE, dbRule.getFirstAntecedent().name(), dbRule.getFirstAntecedentValue().getAntecedentValue(), dbRule.getSecondAntecedent().name(), @@ -47,6 +51,8 @@ public class FuzzyInferenceService { private RuleBlock getRuleBlock(Engine engine, List dbRules, Map variableValues, + Map min, + Map max, List antecedentValues, List consequentValues) { variableValues.forEach((key, value) -> { @@ -54,10 +60,19 @@ public class FuzzyInferenceService { input.setName(key); input.setDescription(""); input.setEnabled(true); - input.setRange(-0.1, antecedentValues.size() + 1.1); + double delta = antecedentValues.size() > 1 + ? (max.get(key) - min.get(key)) / (antecedentValues.size() - 1) + : (max.get(key) - min.get(key)); + input.setRange(min.get(key), max.get(key)); input.setLockValueInRange(false); for (int i = 0; i < antecedentValues.size(); i++) { - input.addTerm(new Triangle(antecedentValues.get(i).getAntecedentValue(), i - 0.1, i + 2.1)); + input.addTerm( + new Triangle( + antecedentValues.get(i).getAntecedentValue(), + min.get(key) + i * delta - 0.5 * delta, + min.get(key) + i * delta + delta + 0.5 * delta + ) + ); } engine.addInputVariable(input); }); @@ -66,13 +81,13 @@ public class FuzzyInferenceService { output.setName(OUTPUT_VARIABLE_NAME); output.setDescription(""); output.setEnabled(true); - output.setRange(-0.1, consequentValues.size() + 0.1); + output.setRange(0, consequentValues.size() + 0.1); output.setAggregation(new Maximum()); - output.setDefuzzifier(new Centroid(100)); + output.setDefuzzifier(new Centroid(10)); output.setDefaultValue(Double.NaN); output.setLockValueInRange(false); for (int i = 0; i < consequentValues.size(); i++) { - output.addTerm(new Triangle(consequentValues.get(i).toString(), i - 0.1, i + 2.1)); + output.addTerm(new Triangle(consequentValues.get(i).toString(), i, i + 2.1)); } engine.addOutputVariable(output); @@ -80,11 +95,14 @@ public class FuzzyInferenceService { mamdani.setName("mamdani"); mamdani.setDescription(""); mamdani.setEnabled(true); - mamdani.setConjunction(new AlgebraicProduct()); - mamdani.setDisjunction(new BoundedSum()); + mamdani.setConjunction(new Minimum()); + //mamdani.setDisjunction(null); mamdani.setImplication(new AlgebraicProduct()); - mamdani.setActivation(new Highest()); - getRulesFromDb(dbRules, variableValues).forEach(r -> mamdani.addRule(Rule.parse(r, engine))); + mamdani.setActivation(new General()); + getRulesFromDb(dbRules, variableValues).forEach(r -> { + LOG.info(r); + mamdani.addRule(Rule.parse(r, engine)); + }); return mamdani; } @@ -95,21 +113,22 @@ public class FuzzyInferenceService { return engine; } - - public List getFuzzyInference(List dbRules, Map variableValues) { + public List getFuzzyInference(List dbRules, + List antecedentValues, + Map variableValues, + Map min, + Map max) { Engine engine = getFuzzyEngine(); - List antecedentValues = Stream.concat(dbRules.stream().map(DbRule::getFirstAntecedentValue), - dbRules.stream().map(DbRule::getSecondAntecedentValue)).distinct().collect(Collectors.toList()); List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); - engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, antecedentValues, consequentValues)); - String consequent = getConsequent(engine, variableValues); - if (consequent.equals(NO_RESULT)) { + engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, min, max, antecedentValues, consequentValues)); + Map.Entry consequent = getConsequent(engine, variableValues); + if (consequent.getKey().equals(NO_RESULT)) { return new ArrayList<>(); } return dbRules .stream() - .filter(r -> r.getId().equals(Integer.valueOf(consequent))) - .map(Assessment::new) + .filter(r -> r.getId().equals(Integer.valueOf(consequent.getKey()))) + .map(r -> new Assessment(r, consequent.getValue())) .collect(Collectors.toList()); } @@ -117,17 +136,17 @@ public class FuzzyInferenceService { private void validateVariables(Map variableValues, List dbDbRules) { for (DbRule dbRule : dbDbRules) { if (!variableValues.containsKey(dbRule.getFirstAntecedent().name())) { - throw new RuntimeException(String.format("Переменной в правиле не задано значение (нет временного ряда): %s ", + throw new RuntimeException(format("Переменной в правиле не задано значение (нет временного ряда): %s ", dbRule.getFirstAntecedent().name())); } if (!variableValues.containsKey(dbRule.getSecondAntecedent().name())) { - throw new RuntimeException(String.format("Переменной в правиле не задано значение (нет временного ряда): %s ", + throw new RuntimeException(format("Переменной в правиле не задано значение (нет временного ряда): %s ", dbRule.getSecondAntecedent().name())); } } } - private String getConsequent(Engine engine, Map variableValues) { + private Map.Entry getConsequent(Engine engine, Map variableValues) { OutputVariable outputVariable = engine.getOutputVariable(OUTPUT_VARIABLE_NAME); for (Map.Entry variableValue : variableValues.entrySet()) { InputVariable inputVariable = engine.getInputVariable(variableValue.getKey()); @@ -135,10 +154,10 @@ public class FuzzyInferenceService { } engine.process(); if (outputVariable != null) { - outputVariable.defuzzify(); + LOG.info("Output: {}", outputVariable.getValue()); } return (outputVariable == null || Double.isNaN(outputVariable.getValue())) - ? NO_RESULT - : outputVariable.highestMembership(outputVariable.getValue()).getSecond().getName(); + ? Map.entry(NO_RESULT, 0.0) + : Map.entry(outputVariable.highestMembershipTerm(outputVariable.getValue()).getName(), outputVariable.getValue()); } } diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index 516628a..a303e2d 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -42,6 +42,7 @@ th:text="${assessment.firstAntecedent.description}">' и тенденции '' показателя ''; +
diff --git a/src/test/java/ru/ulstu/FuzzyInferenceTest.java b/src/test/java/ru/ulstu/FuzzyInferenceTest.java deleted file mode 100644 index 99d69ef..0000000 --- a/src/test/java/ru/ulstu/FuzzyInferenceTest.java +++ /dev/null @@ -1,15 +0,0 @@ -package ru.ulstu; - -import org.junit.Assert; -import org.junit.Test; -import ru.ulstu.extractor.rule.service.FuzzyInferenceService; - -public class FuzzyInferenceTest { - - private final FuzzyInferenceService fuzzyInferenceService = new FuzzyInferenceService(); - - @Test - public void test() { - Assert.assertNotNull(fuzzyInferenceService); - } -} -- 2.34.1 From f9fd839a14f13fbc20e97593277ac624f4f6ceaf Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 7 Feb 2023 22:30:47 +0400 Subject: [PATCH 061/122] #81 -- Add branch indexing status --- .../ru/ulstu/extractor/branch/model/Branch.java | 15 +++++++++++++++ .../extractor/branch/model/IndexingStatus.java | 5 +++++ .../db/changelog-20221012_170000-schema.xml | 8 ++++++++ 3 files changed, 28 insertions(+) create mode 100644 src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java diff --git a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java index 046b8c4..97c03df 100644 --- a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java +++ b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java @@ -13,6 +13,8 @@ import ru.ulstu.extractor.gitrepository.model.GitRepository; import javax.persistence.CascadeType; import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; @@ -20,6 +22,8 @@ import javax.persistence.OneToMany; import java.util.ArrayList; import java.util.List; +import static ru.ulstu.extractor.branch.model.IndexingStatus.EMPTY; + @Entity public class Branch extends BaseEntity { private String name; @@ -32,6 +36,9 @@ public class Branch extends BaseEntity { @Fetch(FetchMode.SUBSELECT) private List commits = new ArrayList<>(); + @Enumerated(EnumType.STRING) + private IndexingStatus indexingStatus = EMPTY; + public Branch() { } @@ -67,4 +74,12 @@ public class Branch extends BaseEntity { public void setCommits(List commits) { this.commits = commits; } + + public IndexingStatus getIndexingStatus() { + return indexingStatus; + } + + public void setIndexingStatus(IndexingStatus indexingStatus) { + this.indexingStatus = indexingStatus; + } } diff --git a/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java b/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java new file mode 100644 index 0000000..3683817 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java @@ -0,0 +1,5 @@ +package ru.ulstu.extractor.branch.model; + +public enum IndexingStatus { + EMPTY, INDEXING, FINISHED +} diff --git a/src/main/resources/db/changelog-20221012_170000-schema.xml b/src/main/resources/db/changelog-20221012_170000-schema.xml index 3e4dc33..6ee4e83 100644 --- a/src/main/resources/db/changelog-20221012_170000-schema.xml +++ b/src/main/resources/db/changelog-20221012_170000-schema.xml @@ -99,4 +99,12 @@ OR branch_id is null; + + + + + + + + \ No newline at end of file -- 2.34.1 From 98ec8217484f4bf9edc2d5cbf75555c7cbf2df9c Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 7 Feb 2023 22:44:04 +0400 Subject: [PATCH 062/122] #81 -- Show indexing status --- src/main/resources/templates/listBranches.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/main/resources/templates/listBranches.html b/src/main/resources/templates/listBranches.html index b8e32f8..2ecdaae 100644 --- a/src/main/resources/templates/listBranches.html +++ b/src/main/resources/templates/listBranches.html @@ -12,20 +12,24 @@ Ветки - + + th:text="${branch.name}"> + Индексируется... + -- 2.34.1 From 11b42d7e09d7c9c318155aa6495ec704628ec761 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 7 Feb 2023 23:29:13 +0400 Subject: [PATCH 063/122] #81 -- Start indexing on failed tasks --- .../extractor/GitExtractorApplication.java | 17 +++++++++++ .../branch/repository/BranchRepository.java | 3 ++ .../branch/service/BranchService.java | 16 +++++++++++ .../gitrepository/service/IndexService.java | 28 +++++++++++++++++++ .../resources/templates/listBranches.html | 2 +- 5 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java index f9a272d..1cf7928 100644 --- a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java +++ b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java @@ -2,12 +2,29 @@ package ru.ulstu.extractor; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.boot.context.event.ApplicationReadyEvent; +import org.springframework.context.event.EventListener; +import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; +import ru.ulstu.extractor.gitrepository.service.IndexService; @SpringBootApplication @EnableScheduling +@EnableAsync public class GitExtractorApplication { + private final IndexService indexService; + + public GitExtractorApplication(IndexService indexService) { + this.indexService = indexService; + } + public static void main(String[] args) { SpringApplication.run(GitExtractorApplication.class, args); } + + @EventListener(ApplicationReadyEvent.class) + public void doSomethingAfterStartup() { + indexService.indexFailedBranchesOnStart(); + } + } diff --git a/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java b/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java index af14f53..5a8b1f6 100644 --- a/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java +++ b/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java @@ -5,6 +5,7 @@ import org.springframework.data.domain.Pageable; import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Query; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.model.IndexingStatus; import ru.ulstu.extractor.gitrepository.model.GitRepository; import java.util.List; @@ -18,4 +19,6 @@ public interface BranchRepository extends JpaRepository { List findByGitRepositoryId(Integer repositoryId); Page findByGitRepository(GitRepository gitRepository, Pageable pageable); + + List findAllByIndexingStatus(IndexingStatus indexingStatus); } diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index ce37a85..0a11945 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -10,6 +10,7 @@ import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.model.IndexingStatus; import ru.ulstu.extractor.branch.repository.BranchRepository; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; @@ -32,6 +33,11 @@ public class BranchService { this.commitService = commitService; } + @Transactional + public Branch save(Branch branch) { + return branchRepository.save(branch); + } + @Transactional public Branch save(Branch branch, List commits) { LOG.debug("Start save {} branch with {} commits ", branch.getName(), commits.size()); @@ -63,4 +69,14 @@ public class BranchService { public List findAll() { return branchRepository.findAll(); } + + public List findAllByIndexingStatus(IndexingStatus indexingStatus) { + return branchRepository.findAllByIndexingStatus(indexingStatus); + } + + @Transactional + public Branch updateStatus(Branch branch, IndexingStatus indexingStatus) { + branch.setIndexingStatus(indexingStatus); + return branchRepository.save(branch); + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index b510338..a442286 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -9,8 +9,11 @@ import com.sun.istack.NotNull; import org.eclipse.jgit.api.errors.GitAPIException; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.model.IndexingStatus; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; @@ -55,6 +58,7 @@ public class IndexService { branch = new Branch(gitRepository, branchName); } branchService.save(branch, Collections.emptyList()); + branch = branchService.updateStatus(branch, IndexingStatus.INDEXING); int commitsFrom = 0; int commitsTo = COMMITS_PAGE_SIZE; List commits = gitRepositoryService.getCommits(repositoryUrl, branchName, commitsFrom, commitsTo, true); @@ -69,6 +73,30 @@ public class IndexService { Integer repositoryId = gitRepository.getId(); final Branch branchForSave = branch; timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchForSave)); + branchService.updateStatus(branch, IndexingStatus.FINISHED); LOG.debug("Complete indexing {} branch", branchName); } + + @Transactional + @Async + public void indexFailedBranchesOnStart() { + LOG.info("Старт проверки незавершенных задач для индексирований..."); + + List failedBranches = branchService.findAllByIndexingStatus(IndexingStatus.INDEXING); + if (failedBranches.size() > 0) { + LOG.info("Найдено {} незавершенных задач для индексирования", failedBranches.size()); + failedBranches.forEach(failedBranch -> { + try { + index(failedBranch.getId()); + LOG.info("Завершено индексирование ветки {}", failedBranch.getName()); + branchService.updateStatus(failedBranch, IndexingStatus.FINISHED); + } catch (Exception ex) { + LOG.warn(ex.getMessage()); + } + }); + LOG.info("Завершено индексирование незавершенных задач"); + } else { + LOG.info("Не найдено незавершенных веток для индексирования"); + } + } } diff --git a/src/main/resources/templates/listBranches.html b/src/main/resources/templates/listBranches.html index 2ecdaae..a9cb074 100644 --- a/src/main/resources/templates/listBranches.html +++ b/src/main/resources/templates/listBranches.html @@ -30,7 +30,7 @@ Индексируется... - -- 2.34.1 From 425ff706834923b7a4ab8e430cdef85136b12cdf Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 13 Feb 2023 12:03:13 +0400 Subject: [PATCH 064/122] #81 -- Add new time series type --- .../extractor/ts/creator/AuthorsCommitTS.java | 55 +++++++++++++------ 1 file changed, 38 insertions(+), 17 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java index 2c6927d..86ec31d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java @@ -1,30 +1,39 @@ package ru.ulstu.extractor.ts.creator; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.author.model.Author; +import ru.ulstu.extractor.author.service.AuthorService; import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.model.Commit; +import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; -import java.util.Collections; +import java.util.ArrayList; import java.util.List; @Component public class AuthorsCommitTS extends AbstractTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final CommitService commitService; + private final AuthorService authorService; + private final GitRepositoryService gitRepositoryService; private final BranchService branchService; - private final GitRepositoryService gitRepositoryService; - public AuthorsCommitTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { + CommitService commitService, + AuthorService authorService, + GitRepositoryService gitRepositoryService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; - this.branchService = branchService; + this.commitService = commitService; + this.authorService = authorService; this.gitRepositoryService = gitRepositoryService; + this.branchService = branchService; } @Override @@ -34,17 +43,29 @@ public class AuthorsCommitTS extends AbstractTimeSeriesCreator { @Override public List getTimeSeries(Integer repositoryId, String branchName) { + List timeSeriesResult = new ArrayList<>(); + List authors = authorService.findAll(); GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - //TODO: добавить постраничное чтение - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - gitRepository.getName(), - branchName, - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + for (Author author : authors) { + TimeSeries timeSeries = new TimeSeries( + String.format("%s %s %s %s", + gitRepository.getName(), + branchName, + author.getName(), + getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(gitRepository, branchName), + getTimeSeriesType()); + for (Commit commit : commits) { + if (commit.getAuthor().equals(author)) { + timeSeries.getValues().add(new TimeSeriesValue(commit.getDate(), 1.0)); + } + } + if (!timeSeries.getValues().isEmpty()) { + timeSeriesResult.add(timeSeries); + } + } + return timeSeriesResult; } @Override -- 2.34.1 From 616eaaa23a5552594223dbaf86542e2bd620745b Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 13 Feb 2023 17:54:49 +0400 Subject: [PATCH 065/122] #81 -- Add async tasks --- .../branch/model/IndexingStatus.java | 2 +- .../branch/repository/BranchRepository.java | 3 ++ .../branch/service/BranchService.java | 7 ++++ .../controler/GitIndexingController.java | 23 +++++++----- .../service/GitRepositoryService.java | 27 +++++++++----- .../gitrepository/service/IndexService.java | 37 +++++++++++-------- 6 files changed, 64 insertions(+), 35 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java b/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java index 3683817..67f2cec 100644 --- a/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java +++ b/src/main/java/ru/ulstu/extractor/branch/model/IndexingStatus.java @@ -1,5 +1,5 @@ package ru.ulstu.extractor.branch.model; public enum IndexingStatus { - EMPTY, INDEXING, FINISHED + EMPTY, INDEXING, ERROR, FINISHED } diff --git a/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java b/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java index 5a8b1f6..8ac8523 100644 --- a/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java +++ b/src/main/java/ru/ulstu/extractor/branch/repository/BranchRepository.java @@ -9,10 +9,13 @@ import ru.ulstu.extractor.branch.model.IndexingStatus; import ru.ulstu.extractor.gitrepository.model.GitRepository; import java.util.List; +import java.util.Optional; public interface BranchRepository extends JpaRepository { Branch findByGitRepositoryAndName(GitRepository gitRepository, String name); + Optional findByGitRepository_UrlAndName(String repositoryUrl, String name); + @Query("select count(c) from Commit c LEFT JOIN c.branch b LEFT JOIN GitRepository r where r.id = ?1 AND b.name = ?2") int getCommitsCount(Integer repositoryId, String name); diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index 0a11945..cb8537e 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -62,6 +62,13 @@ public class BranchService { return branchRepository.findByGitRepositoryAndName(gitRepository, branchName); } + public Branch findByRepositoryAndNameOrCreate(GitRepository gitRepository, String branchName) { + Branch branch = branchRepository.findByGitRepositoryAndName(gitRepository, branchName); + return branch == null + ? branchRepository.save(new Branch(gitRepository, branchName)) + : branch; + } + public Optional findByBranchId(Integer branchId) { return branchRepository.findById(branchId); } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java index 3343754..bcd7917 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java @@ -17,8 +17,10 @@ import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.model.IndexingStatus; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.gitrepository.model.FilterForm; +import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.model.RepoForm; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.gitrepository.service.IndexService; @@ -27,8 +29,8 @@ import springfox.documentation.annotations.ApiIgnore; import java.io.IOException; import java.util.List; -import static ru.ulstu.extractor.core.Route.FILTER_COMMITS; import static ru.ulstu.extractor.core.Route.INDEXING_NEW_REPOSITORY; +import static ru.ulstu.extractor.core.Route.LIST_REPOSITORY_BRANCHES; import static ru.ulstu.extractor.core.Route.REINDEX_BRANCH; @Controller @@ -70,16 +72,18 @@ public class GitIndexingController { if (repoForm.getBranch() == null) { return INDEXING_NEW_REPOSITORY; } else { + GitRepository gitRepository = gitRepositoryService.findByUrlOrCreate(repoForm.getRepo()); + Branch branch = branchService.findByRepositoryAndNameOrCreate(gitRepository, repoForm.getBranch()); + branch = branchService.updateStatus(branch, IndexingStatus.INDEXING); try { - indexService.index(repoForm.getRepo(), repoForm.getBranch()); + indexService.index(gitRepository, branch); } catch (IOException | GitAPIException ex) { ex.printStackTrace(); model.addAttribute("error", ex.getMessage()); return INDEXING_NEW_REPOSITORY; } - redirectAttributes.addAttribute("repositoryUrl", repoForm.getRepo()); - redirectAttributes.addAttribute("branchName", repoForm.getBranch()); - return "redirect:/" + FILTER_COMMITS; + redirectAttributes.addAttribute("repositoryId", branch.getGitRepository().getId()); + return "redirect:/" + LIST_REPOSITORY_BRANCHES; } } @@ -87,6 +91,9 @@ public class GitIndexingController { public String reindexBranch(Model model, RedirectAttributes redirectAttributes, @RequestParam Integer branchId) { + + Branch branch = branchService.findByBranchId(branchId).orElseThrow(() -> new RuntimeException("Ветка не найдена по id")); + branch = branchService.updateStatus(branch, IndexingStatus.INDEXING); try { indexService.index(branchId); } catch (IOException | GitAPIException ex) { @@ -94,9 +101,7 @@ public class GitIndexingController { model.addAttribute("error", ex.getMessage()); return INDEXING_NEW_REPOSITORY; } - Branch branch = branchService.findByBranchId(branchId).orElseThrow(() -> new RuntimeException("Ветка не найдена по id")); - redirectAttributes.addAttribute("repositoryUrl", branch.getGitRepository().getUrl()); - redirectAttributes.addAttribute("branchName", branch.getName()); - return "redirect:/" + FILTER_COMMITS; + redirectAttributes.addAttribute("repositoryId", branch.getGitRepository().getId()); + return "redirect:/" + LIST_REPOSITORY_BRANCHES; } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index 2d451e1..f6ead24 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -187,7 +187,6 @@ public class GitRepositoryService { return structuralUnitService.getResource(getProjectDirectoryFile(repositoryUrl)); } - public void remove(String repositoryUrl) throws IOException { FileUtils.deleteDirectory(getProjectDirectoryFile(repositoryUrl)); } @@ -283,7 +282,7 @@ public class GitRepositoryService { List changes = new ArrayList<>(); String[] strings = output.split("\n"); Map> filesContent = getFilesContent(strings); - for(Map.Entry> fileSterings: filesContent.entrySet()) { + for (Map.Entry> fileSterings : filesContent.entrySet()) { FileChange fileChange = new FileChange(); fileChange.setFile(fileSterings.getKey()); Future futureEntity = executorService.submit(() -> structuralUnitService.containsEntity(getContent(repository, commit, fileSterings.getKey()))); @@ -327,7 +326,7 @@ public class GitRepositoryService { private Map> getFilesContent(String[] commitStrings) { int i = 0; - Map> result = new HashMap<>(); + Map> result = new HashMap<>(); while (i < commitStrings.length) { Optional maybeFileName = getFileName(commitStrings[i]); if (maybeFileName.isEmpty()) { @@ -368,15 +367,15 @@ public class GitRepositoryService { return index; } - private FileChange getChange(FileChange fileChange, List fileContent){ + private FileChange getChange(FileChange fileChange, List fileContent) { int addedLine = 0; int removedLine = 0; StringBuilder builder = new StringBuilder(); boolean isRemoved = false; boolean isAdded = false; - for (String line : fileContent){ + for (String line : fileContent) { LineChange lineChange = new LineChange(); - if (line.startsWith("-")){ + if (line.startsWith("-")) { isRemoved = true; if (isAdded) { isAdded = false; @@ -385,7 +384,7 @@ public class GitRepositoryService { } builder.append(line).append("\n"); removedLine++; - } else if(line.startsWith("+")){ + } else if (line.startsWith("+")) { isAdded = true; if (isRemoved) { isRemoved = false; @@ -398,7 +397,7 @@ public class GitRepositoryService { if (isRemoved) { lineChange = setRemoved(lineChange, builder); builder.setLength(0); - } else if (isAdded){ + } else if (isAdded) { lineChange = setAdded(lineChange, builder); builder.setLength(0); } @@ -409,17 +408,18 @@ public class GitRepositoryService { return fileChange; } - private LineChange setRemoved(LineChange lineChange, StringBuilder builder){ + private LineChange setRemoved(LineChange lineChange, StringBuilder builder) { lineChange.setLineFrom(builder.toString()); lineChange.setRemoved(true); return lineChange; } - private LineChange setAdded(LineChange lineChange, StringBuilder builder){ + private LineChange setAdded(LineChange lineChange, StringBuilder builder) { lineChange.setLineTo(builder.toString()); lineChange.setAdded(true); return lineChange; } + public Page findAll(Pageable pageable) { return gitRepositoryRepository.findAll(pageable); } @@ -427,4 +427,11 @@ public class GitRepositoryService { public GitRepository findById(Integer id) { return gitRepositoryRepository.getOne(id); } + + public GitRepository findByUrlOrCreate(String gitRepositoryUrl) { + GitRepository gitRepository = gitRepositoryRepository.findByUrl(gitRepositoryUrl); + return gitRepository == null + ? gitRepositoryRepository.save(new GitRepository(gitRepositoryUrl)) + : gitRepository; + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index a442286..7c3b4bb 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -23,6 +23,8 @@ import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import java.io.IOException; import java.util.Collections; import java.util.List; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; @Service public class IndexService { @@ -32,6 +34,7 @@ public class IndexService { private final GitRepositoryRepository gitRepositoryRepository; private final BranchService branchService; private final List timeSeriesCreators; + private final static ExecutorService EXECUTOR = Executors.newFixedThreadPool(10); public IndexService(GitRepositoryService gitRepositoryService, GitRepositoryRepository gitRepositoryRepository, @@ -43,38 +46,43 @@ public class IndexService { this.timeSeriesCreators = timeSeriesCreators; } + @Transactional + @Async public void index(@NotNull Integer branchId) throws GitAPIException, IOException { Branch branch = branchService.findByBranchId(branchId).orElseThrow(() -> new RuntimeException("Ветка репозитория не найдена по id")); - index(branch.getGitRepository().getUrl(), branch.getName()); + index(branch.getGitRepository(), branch); } - public void index(@NotNull String repositoryUrl, @NotNull String branchName) throws GitAPIException, IOException { - GitRepository gitRepository = gitRepositoryRepository.findByUrl(repositoryUrl); - if (gitRepository == null) { - gitRepository = gitRepositoryRepository.save(new GitRepository(repositoryUrl)); - } - Branch branch = branchService.findByRepositoryAndName(gitRepository, branchName); - if (branch == null) { - branch = new Branch(gitRepository, branchName); - } + @Transactional + @Async + public void index(String gitRepositoryUrl, String branchName) throws GitAPIException, IOException { + GitRepository gitRepository = gitRepositoryService.findByUrlOrCreate(gitRepositoryUrl); + Branch branch = branchService.findByRepositoryAndNameOrCreate(gitRepository, branchName); + branch = branchService.updateStatus(branch, IndexingStatus.INDEXING); + index(gitRepository, branch); + } + + @Transactional + @Async + public void index(GitRepository gitRepository, Branch branch) throws GitAPIException, IOException { branchService.save(branch, Collections.emptyList()); branch = branchService.updateStatus(branch, IndexingStatus.INDEXING); int commitsFrom = 0; int commitsTo = COMMITS_PAGE_SIZE; - List commits = gitRepositoryService.getCommits(repositoryUrl, branchName, commitsFrom, commitsTo, true); + List commits = gitRepositoryService.getCommits(gitRepository.getUrl(), branch.getName(), commitsFrom, commitsTo, true); while (!commits.isEmpty()) { LOG.debug("{} commits loaded.", commits.size()); branchService.addCommits(branch, commits); - LOG.debug("{} commits successfully saved. {} {}", commits.size(), repositoryUrl, branchName); + LOG.debug("{} commits successfully saved. {} {}", commits.size(), gitRepository.getUrl(), branch.getName()); commitsFrom += COMMITS_PAGE_SIZE; commitsTo += COMMITS_PAGE_SIZE; - commits = gitRepositoryService.getCommits(repositoryUrl, branchName, commitsFrom, commitsTo, false); + commits = gitRepositoryService.getCommits(gitRepository.getUrl(), branch.getName(), commitsFrom, commitsTo, false); } Integer repositoryId = gitRepository.getId(); final Branch branchForSave = branch; timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchForSave)); branchService.updateStatus(branch, IndexingStatus.FINISHED); - LOG.debug("Complete indexing {} branch", branchName); + LOG.debug("Complete indexing {} branch", branch.getName()); } @Transactional @@ -89,7 +97,6 @@ public class IndexService { try { index(failedBranch.getId()); LOG.info("Завершено индексирование ветки {}", failedBranch.getName()); - branchService.updateStatus(failedBranch, IndexingStatus.FINISHED); } catch (Exception ex) { LOG.warn(ex.getMessage()); } -- 2.34.1 From 0d43bf8ccd71cb79d5ad824217c3d84c62fbdbe0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 15 Feb 2023 00:55:06 +0400 Subject: [PATCH 066/122] #89 -- Use git service api to create time series --- .../gitrepository/service/GitApi.java | 13 +++++ .../gitrepository/service/GitAtheneApi.java | 45 ++++++++++++++++ .../gitrepository/service/IndexService.java | 9 ++-- .../ru/ulstu/extractor/http/HttpService.java | 23 ++++++++ .../ts/creator/AbstractTimeSeriesCreator.java | 39 -------------- .../ulstu/extractor/ts/creator/BranchTS.java | 53 ------------------- .../ulstu/extractor/ts/creator/IssuesTS.java | 53 ------------------- .../ru/ulstu/extractor/ts/creator/StarTS.java | 53 ------------------- .../ts/creator/{ => db}/AuthorsCommitTS.java | 13 ++--- .../ts/creator/{ => db}/CommitsTS.java | 13 ++--- .../ts/creator/db/DBTimeSeriesCreator.java | 45 ++++++++++++++++ .../extractor/ts/creator/{ => db}/FileTS.java | 13 ++--- .../ts/creator/{ => scheduled}/AuthorTS.java | 12 ++--- .../AuthorsCompletedIssueTS.java | 7 ++- .../{ => scheduled}/AuthorsIssueTS.java | 4 +- .../ts/creator/scheduled/BranchTS.java | 35 ++++++++++++ .../ts/creator/{ => scheduled}/ClassTS.java | 3 +- .../creator/{ => scheduled}/DependenceTS.java | 3 +- .../ts/creator/{ => scheduled}/EntityTS.java | 3 +- .../creator/{ => scheduled}/InterfaceTS.java | 3 +- .../ts/creator/scheduled/IssuesTS.java | 35 ++++++++++++ .../ts/creator/{ => scheduled}/ProcessTS.java | 4 +- .../scheduled/ScheduledTimeSeriesCreator.java | 20 +++++++ .../ts/creator/scheduled/StarTS.java | 34 ++++++++++++ .../ulstu/extractor/ts/model/TimeSeries.java | 7 +++ .../extractor/ts/model/TimeSeriesValue.java | 5 ++ .../ts/repository/TimeSeriesRepository.java | 4 ++ .../service/ScheduledTimeSeriesService.java | 34 ++++++++++++ .../ts/service/TimeSeriesService.java | 11 +++- 29 files changed, 346 insertions(+), 250 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java create mode 100644 src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java delete mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java delete mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java delete mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java rename src/main/java/ru/ulstu/extractor/ts/creator/{ => db}/AuthorsCommitTS.java (81%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => db}/CommitsTS.java (78%) create mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java rename src/main/java/ru/ulstu/extractor/ts/creator/{ => db}/FileTS.java (81%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/AuthorTS.java (85%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/AuthorsCompletedIssueTS.java (86%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/AuthorsIssueTS.java (94%) create mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/ClassTS.java (94%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/DependenceTS.java (94%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/EntityTS.java (96%) rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/InterfaceTS.java (94%) create mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java rename src/main/java/ru/ulstu/extractor/ts/creator/{ => scheduled}/ProcessTS.java (94%) create mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java create mode 100644 src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java new file mode 100644 index 0000000..3aa4e59 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java @@ -0,0 +1,13 @@ +package ru.ulstu.extractor.gitrepository.service; + +import ru.ulstu.extractor.branch.model.Branch; + +public interface GitApi { + Integer getBranchesCount(Branch branch); + + Integer getStarsCount(Branch branch); + + Integer getOpenIssuesCount(Branch branch); + + String getFormattedUrl(String gitRepositoryUrl, String template); +} diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java new file mode 100644 index 0000000..a8853dc --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java @@ -0,0 +1,45 @@ +package ru.ulstu.extractor.gitrepository.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.http.HttpService; + +@Service +public class GitAtheneApi implements GitApi { + private final HttpService httpService; + private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; + private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + + public GitAtheneApi(HttpService httpService) { + this.httpService = httpService; + } + + @Override + public Integer getBranchesCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), BRANCHES_COUNT_URL)) + .length(); + } + + @Override + public Integer getStarsCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), STARS_COUNT_URL)) + .getJSONObject(0) + .getInt("stars_count"); + } + + @Override + public Integer getOpenIssuesCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), OPEN_ISSUES_URL)) + .length(); + } + + @Override + public String getFormattedUrl(String gitRepositoryUrl, String template) { + String[] urlParts = gitRepositoryUrl.split("/"); + return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); + } +} diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 7c3b4bb..088aa22 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -18,7 +18,7 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.repository.GitRepositoryRepository; -import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; +import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; import java.io.IOException; import java.util.Collections; @@ -33,13 +33,13 @@ public class IndexService { private final GitRepositoryService gitRepositoryService; private final GitRepositoryRepository gitRepositoryRepository; private final BranchService branchService; - private final List timeSeriesCreators; + private final List timeSeriesCreators; private final static ExecutorService EXECUTOR = Executors.newFixedThreadPool(10); public IndexService(GitRepositoryService gitRepositoryService, GitRepositoryRepository gitRepositoryRepository, BranchService branchService, - List timeSeriesCreators) { + List timeSeriesCreators) { this.gitRepositoryService = gitRepositoryService; this.gitRepositoryRepository = gitRepositoryRepository; this.branchService = branchService; @@ -78,9 +78,8 @@ public class IndexService { commitsTo += COMMITS_PAGE_SIZE; commits = gitRepositoryService.getCommits(gitRepository.getUrl(), branch.getName(), commitsFrom, commitsTo, false); } - Integer repositoryId = gitRepository.getId(); final Branch branchForSave = branch; - timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(repositoryId, branchForSave)); + timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(gitRepository, branchForSave)); branchService.updateStatus(branch, IndexingStatus.FINISHED); LOG.debug("Complete indexing {} branch", branch.getName()); } diff --git a/src/main/java/ru/ulstu/extractor/http/HttpService.java b/src/main/java/ru/ulstu/extractor/http/HttpService.java index 6d79315..cc1884e 100644 --- a/src/main/java/ru/ulstu/extractor/http/HttpService.java +++ b/src/main/java/ru/ulstu/extractor/http/HttpService.java @@ -1,5 +1,6 @@ package ru.ulstu.extractor.http; +import org.json.JSONArray; import org.json.JSONObject; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -38,4 +39,26 @@ public class HttpService { log.debug("Service response: {}", response); return response; } + + public JSONArray get(String url) { + log.debug("Service call: {}", url); + try { + String response = client + .get() + .uri(url) + .accept(MediaType.APPLICATION_JSON) + .retrieve() + .bodyToMono(String.class) + .toFuture().get(); + if (response.startsWith("[")) { + return new JSONArray(response); + } else { + JSONArray jsonArray = new JSONArray(); + jsonArray.put(0, new JSONObject(response)); + return jsonArray; + } + } catch (Exception e) { + return new JSONArray("[{response:\"empty\"}]"); + } + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java index cad3156..c6a2f2b 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/AbstractTimeSeriesCreator.java @@ -1,49 +1,10 @@ package ru.ulstu.extractor.ts.creator; -import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; -import java.util.Comparator; -import java.util.List; - -import static ru.ulstu.extractor.ts.util.TimeSeriesDateMapper.mapTimeSeriesToInterval; - public abstract class AbstractTimeSeriesCreator { public abstract TimeSeriesType getTimeSeriesType(); - /** - * Извлечь список точек временных рядов - * - * @param repositoryId - * @param branchName - * @return - */ - public abstract List getTimeSeries(Integer repositoryId, String branchName); - public abstract TimeSeriesService getTimeSeriesService(); - - /** - * Сохранить извлеченные временные ряды - * - * @param repositoryId - * @param branch - */ - public void addTimeSeries(Integer repositoryId, Branch branch) { - // извлеченные временных рядов - List timeSeries = getTimeSeries(repositoryId, branch.getName()); - - // сгруппированные по временным интервалам точки временных рядов - timeSeries.forEach(ts -> ts.setValues(mapTimeSeriesToInterval(getTimeSeriesService().getTimeSeriesInterval(), ts.getValues()))); - getTimeSeriesService().save(sortTimeSeries(timeSeries), branch); - } - - private List sortTimeSeries(List timeSeries) { - for (TimeSeries ts : timeSeries) { - ts.getValues().sort(Comparator.comparing(TimeSeriesValue::getDate)); - } - return timeSeries; - } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java deleted file mode 100644 index a6d99f0..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/creator/BranchTS.java +++ /dev/null @@ -1,53 +0,0 @@ -package ru.ulstu.extractor.ts.creator; - -import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; - -import java.util.Collections; -import java.util.List; - -@Component -public class BranchTS extends AbstractTimeSeriesCreator { - private final TimeSeriesService timeSeriesService; - private final BranchService branchService; - - private final GitRepositoryService gitRepositoryService; - - public BranchTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { - this.timeSeriesService = timeSeriesService; - this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; - } - - @Override - public TimeSeriesType getTimeSeriesType() { - return TimeSeriesType.BRANCHES; - } - - @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - gitRepository.getName(), - branchName, - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); - } - - @Override - public TimeSeriesService getTimeSeriesService() { - return timeSeriesService; - } -} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java deleted file mode 100644 index af43b83..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/creator/IssuesTS.java +++ /dev/null @@ -1,53 +0,0 @@ -package ru.ulstu.extractor.ts.creator; - -import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; - -import java.util.Collections; -import java.util.List; - -@Component -public class IssuesTS extends AbstractTimeSeriesCreator { - private final TimeSeriesService timeSeriesService; - private final BranchService branchService; - - private final GitRepositoryService gitRepositoryService; - - public IssuesTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { - this.timeSeriesService = timeSeriesService; - this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; - } - - @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - gitRepository.getName(), - branchName, - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); - } - - @Override - public TimeSeriesService getTimeSeriesService() { - return timeSeriesService; - } - - @Override - public TimeSeriesType getTimeSeriesType() { - return TimeSeriesType.ISSUES; - } -} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java deleted file mode 100644 index 0bbcf93..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/creator/StarTS.java +++ /dev/null @@ -1,53 +0,0 @@ -package ru.ulstu.extractor.ts.creator; - -import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; - -import java.util.Collections; -import java.util.List; - -@Component -public class StarTS extends AbstractTimeSeriesCreator { - private final TimeSeriesService timeSeriesService; - private final BranchService branchService; - - private final GitRepositoryService gitRepositoryService; - - public StarTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { - this.timeSeriesService = timeSeriesService; - this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; - } - - @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - gitRepository.getName(), - branchName, - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); - } - - @Override - public TimeSeriesService getTimeSeriesService() { - return timeSeriesService; - } - - @Override - public TimeSeriesType getTimeSeriesType() { - return TimeSeriesType.STARS; - } -} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java similarity index 81% rename from src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java index 86ec31d..dc95528 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCommitTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; import ru.ulstu.extractor.author.model.Author; @@ -7,7 +7,6 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -17,22 +16,19 @@ import java.util.ArrayList; import java.util.List; @Component -public class AuthorsCommitTS extends AbstractTimeSeriesCreator { +public class AuthorsCommitTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final CommitService commitService; private final AuthorService authorService; - private final GitRepositoryService gitRepositoryService; private final BranchService branchService; public AuthorsCommitTS(TimeSeriesService timeSeriesService, CommitService commitService, AuthorService authorService, - GitRepositoryService gitRepositoryService, BranchService branchService) { this.timeSeriesService = timeSeriesService; this.commitService = commitService; this.authorService = authorService; - this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; } @@ -42,11 +38,10 @@ public class AuthorsCommitTS extends AbstractTimeSeriesCreator { } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { + public List getTimeSeries(GitRepository gitRepository, String branchName) { List timeSeriesResult = new ArrayList<>(); List authors = authorService.findAll(); - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName)); for (Author author : authors) { TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s %s", diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java similarity index 78% rename from src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java index 0b7ed9d..523ff76 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/CommitsTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java @@ -1,10 +1,9 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -15,25 +14,21 @@ import java.util.List; import java.util.stream.Collectors; @Component -public class CommitsTS extends AbstractTimeSeriesCreator { +public class CommitsTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final CommitService commitService; - private final GitRepositoryService gitRepositoryService; private final BranchService branchService; public CommitsTS(TimeSeriesService timeSeriesService, CommitService commitService, - GitRepositoryService gitRepositoryService, BranchService branchService) { this.timeSeriesService = timeSeriesService; this.commitService = commitService; - this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(GitRepository gitRepository, String branchName) { //TODO: добавить постраничное чтение return Collections.singletonList( new TimeSeries( @@ -43,7 +38,7 @@ public class CommitsTS extends AbstractTimeSeriesCreator { getTimeSeriesType().getDescription()), branchService.findByRepositoryAndName(gitRepository, branchName), getTimeSeriesType(), - commitService.findByRepositoryIdAndName(repositoryId, branchName) + commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName) .stream() .map(c -> new TimeSeriesValue(c.getDate(), 1.0)) .collect(Collectors.toList()))); diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java new file mode 100644 index 0000000..7de98b7 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java @@ -0,0 +1,45 @@ +package ru.ulstu.extractor.ts.creator.db; + +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.model.GitRepository; +import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; + +import java.util.Comparator; +import java.util.List; + +import static ru.ulstu.extractor.ts.util.TimeSeriesDateMapper.mapTimeSeriesToInterval; + +public abstract class DBTimeSeriesCreator extends AbstractTimeSeriesCreator { + /** + * Извлечь список точек временных рядов + * + * @param gitRepository + * @param branchName + * @return + */ + public abstract List getTimeSeries(GitRepository gitRepository, String branchName); + + /** + * Сохранить извлеченные временные ряды + * + * @param gitRepository + * @param branch + */ + public void addTimeSeries(GitRepository gitRepository, Branch branch) { + // извлеченные временных рядов + List timeSeries = getTimeSeries(gitRepository, branch.getName()); + + // сгруппированные по временным интервалам точки временных рядов + timeSeries.forEach(ts -> ts.setValues(mapTimeSeriesToInterval(getTimeSeriesService().getTimeSeriesInterval(), ts.getValues()))); + getTimeSeriesService().save(sortTimeSeries(timeSeries), branch); + } + + private List sortTimeSeries(List timeSeries) { + for (TimeSeries ts : timeSeries) { + ts.getValues().sort(Comparator.comparing(TimeSeriesValue::getDate)); + } + return timeSeries; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java similarity index 81% rename from src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java index 5d5f21a..dd845f6 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/FileTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; @@ -6,7 +6,6 @@ import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -16,27 +15,23 @@ import java.util.ArrayList; import java.util.List; @Component -public class FileTS extends AbstractTimeSeriesCreator { +public class FileTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final GitRepositoryService gitRepositoryService; private final CommitService commitService; private final BranchService branchService; public FileTS(TimeSeriesService timeSeriesService, - GitRepositoryService gitRepositoryService, CommitService commitService, BranchService branchService) { this.timeSeriesService = timeSeriesService; - this.gitRepositoryService = gitRepositoryService; this.commitService = commitService; this.branchService = branchService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(GitRepository gitRepository, String branchName) { List timeSeriesResult = new ArrayList<>(); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName)); double value = 0; TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s", diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java similarity index 85% rename from src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java index f2fd7cf..3caec78 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.author.model.Author; @@ -8,6 +8,7 @@ import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; +import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -17,11 +18,10 @@ import java.util.ArrayList; import java.util.List; @Component -public class AuthorTS extends AbstractTimeSeriesCreator { +public class AuthorTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final CommitService commitService; private final AuthorService authorService; - private final GitRepositoryService gitRepositoryService; private final BranchService branchService; public AuthorTS(TimeSeriesService timeSeriesService, @@ -32,7 +32,6 @@ public class AuthorTS extends AbstractTimeSeriesCreator { this.timeSeriesService = timeSeriesService; this.commitService = commitService; this.authorService = authorService; - this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; } @@ -42,11 +41,10 @@ public class AuthorTS extends AbstractTimeSeriesCreator { } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { + public List getTimeSeries(GitRepository gitRepository, String branchName) { List timeSeriesResult = new ArrayList<>(); List authors = authorService.findAll(); - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(repositoryId, branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName)); for (Author author : authors) { TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s %s", diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java similarity index 86% rename from src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java index 700b6cb..9eeb72d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsCompletedIssueTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; @@ -13,7 +13,7 @@ import java.util.Collections; import java.util.List; @Component -public class AuthorsCompletedIssueTS extends AbstractTimeSeriesCreator { +public class AuthorsCompletedIssueTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; @@ -28,8 +28,7 @@ public class AuthorsCompletedIssueTS extends AbstractTimeSeriesCreator { } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(GitRepository gitRepository, String branchName) { //TODO: добавить постраничное чтение return Collections.singletonList( new TimeSeries( diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java similarity index 94% rename from src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java index c4fa9ea..9407869 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/AuthorsIssueTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; @@ -13,7 +13,7 @@ import java.util.Collections; import java.util.List; @Component -public class AuthorsIssueTS extends AbstractTimeSeriesCreator { +public class AuthorsIssueTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java new file mode 100644 index 0000000..4ef0042 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java @@ -0,0 +1,35 @@ +package ru.ulstu.extractor.ts.creator.scheduled; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitApi; +import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; +import ru.ulstu.extractor.ts.service.TimeSeriesService; + +@Component +public class BranchTS extends ScheduledTimeSeriesCreator { + private final TimeSeriesService timeSeriesService; + private final GitApi gitApi; + + public BranchTS(TimeSeriesService timeSeriesService, + GitApi gitApi) { + this.timeSeriesService = timeSeriesService; + this.gitApi = gitApi; + } + + @Override + public TimeSeriesType getTimeSeriesType() { + return TimeSeriesType.BRANCHES; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } + + @Override + public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { + return new TimeSeriesValue(gitApi.getBranchesCount(branch)); + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ClassTS.java similarity index 94% rename from src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ClassTS.java index f284e90..6062fc0 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/ClassTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ClassTS.java @@ -1,9 +1,10 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; +import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/DependenceTS.java similarity index 94% rename from src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/DependenceTS.java index d89b5e8..d53c5b6 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/DependenceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/DependenceTS.java @@ -1,9 +1,10 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; +import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/EntityTS.java similarity index 96% rename from src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/EntityTS.java index b20dabd..3666d6b 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/EntityTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/EntityTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; @@ -7,6 +7,7 @@ import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; +import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/InterfaceTS.java similarity index 94% rename from src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/InterfaceTS.java index 4c00620..efc1827 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/InterfaceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/InterfaceTS.java @@ -1,9 +1,10 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; +import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java new file mode 100644 index 0000000..69907c6 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java @@ -0,0 +1,35 @@ +package ru.ulstu.extractor.ts.creator.scheduled; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitApi; +import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; +import ru.ulstu.extractor.ts.service.TimeSeriesService; + +@Component +public class IssuesTS extends ScheduledTimeSeriesCreator { + private final TimeSeriesService timeSeriesService; + private final GitApi gitApi; + + public IssuesTS(TimeSeriesService timeSeriesService, + GitApi gitApi) { + this.timeSeriesService = timeSeriesService; + this.gitApi = gitApi; + } + + @Override + public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { + return new TimeSeriesValue(gitApi.getOpenIssuesCount(branch)); + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } + + @Override + public TimeSeriesType getTimeSeriesType() { + return TimeSeriesType.ISSUES; + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ProcessTS.java similarity index 94% rename from src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ProcessTS.java index c172063..1dd4675 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/ProcessTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ProcessTS.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.creator; +package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.service.BranchService; @@ -13,7 +13,7 @@ import java.util.Collections; import java.util.List; @Component -public class ProcessTS extends AbstractTimeSeriesCreator { +public class ProcessTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java new file mode 100644 index 0000000..1be6322 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java @@ -0,0 +1,20 @@ +package ru.ulstu.extractor.ts.creator.scheduled; + +import org.springframework.transaction.annotation.Transactional; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; + +import java.util.Collections; + +public abstract class ScheduledTimeSeriesCreator extends AbstractTimeSeriesCreator { + @Transactional + public void addTimeSeriesValue(Branch branch) { + TimeSeries timeSeries = getTimeSeriesService().findByBranchAndTypeOrCreate(branch, getTimeSeriesType()); + timeSeries.getValues().add(getNewTimeSeriesValue(branch)); + getTimeSeriesService().save(Collections.singletonList(timeSeries), branch); + } + + public abstract TimeSeriesValue getNewTimeSeriesValue(Branch branch); +} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java new file mode 100644 index 0000000..6422822 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java @@ -0,0 +1,34 @@ +package ru.ulstu.extractor.ts.creator.scheduled; + +import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitApi; +import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; +import ru.ulstu.extractor.ts.service.TimeSeriesService; + +@Component +public class StarTS extends ScheduledTimeSeriesCreator { + private final TimeSeriesService timeSeriesService; + private final GitApi gitApi; + + public StarTS(TimeSeriesService timeSeriesService, GitApi gitApi) { + this.timeSeriesService = timeSeriesService; + this.gitApi = gitApi; + } + + @Override + public TimeSeriesService getTimeSeriesService() { + return timeSeriesService; + } + + @Override + public TimeSeriesType getTimeSeriesType() { + return TimeSeriesType.STARS; + } + + @Override + public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { + return new TimeSeriesValue(gitApi.getStarsCount(branch)); + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java index 5e302fa..76abf70 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java @@ -33,6 +33,13 @@ public class TimeSeries extends BaseEntity { public TimeSeries() { } + public TimeSeries(Branch branch, TimeSeriesType timeSeriesType) { + this(String.format("%s %s %s", + branch.getGitRepository().getName(), + branch.getName(), + timeSeriesType.getDescription()), branch, timeSeriesType); + } + public TimeSeries(String name, Branch branch, TimeSeriesType timeSeriesType) { this(name, branch, timeSeriesType, new ArrayList<>()); } diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java index 112b4c5..9b77f2a 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java @@ -18,6 +18,11 @@ public class TimeSeriesValue extends BaseEntity { this.value = value; } + public TimeSeriesValue(Integer value) { + this.date = new Date(); + this.value = Double.valueOf(value); + } + public TimeSeriesValue(TimeSeries timeSeries, Date date, Double value) { this.date = date; this.value = value; diff --git a/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java b/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java index 7346519..583582c 100644 --- a/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java +++ b/src/main/java/ru/ulstu/extractor/ts/repository/TimeSeriesRepository.java @@ -1,7 +1,9 @@ package ru.ulstu.extractor.ts.repository; import org.springframework.data.jpa.repository.JpaRepository; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesType; import java.util.List; import java.util.Optional; @@ -10,4 +12,6 @@ public interface TimeSeriesRepository extends JpaRepository Optional findByName(String name); List getTimeSeriesByBranchId(Integer branchId); + + Optional getTimeSeriesByBranchAndTimeSeriesType(Branch branch, TimeSeriesType timeSeriesType); } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java new file mode 100644 index 0000000..4dc636e --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java @@ -0,0 +1,34 @@ +package ru.ulstu.extractor.ts.service; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.scheduling.annotation.Scheduled; +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.ts.creator.scheduled.ScheduledTimeSeriesCreator; + +import java.util.List; + +@Service +public class ScheduledTimeSeriesService { + private final Logger log = LoggerFactory.getLogger(ScheduledTimeSeriesService.class); + private final List scheduledTimeSeriesCreators; + private final BranchService branchService; + + public ScheduledTimeSeriesService(List scheduledTimeSeriesCreators, + BranchService branchService) { + this.scheduledTimeSeriesCreators = scheduledTimeSeriesCreators; + this.branchService = branchService; + } + + @Scheduled(cron = "0 */5 * * * *", zone = "Europe/Samara") + public void addTimeSeriesPoints() { + log.debug("ConferenceScheduler.checkDeadlineBeforeWeek started"); + List branches = branchService.findAll(); + branches.forEach(branch -> { + scheduledTimeSeriesCreators.forEach(creator -> creator.addTimeSeriesValue(branch)); + }); + log.debug("ConferenceScheduler.checkDeadlineBeforeWeek finished"); + } +} diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 4cc2de9..3989f2e 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -59,7 +59,7 @@ public class TimeSeriesService { return savedTimeSeries; } - public TimeSeries findOrCreate(String timeSeriesName, Branch branch, TimeSeriesType timeSeriesType) { + private TimeSeries findOrCreate(String timeSeriesName, Branch branch, TimeSeriesType timeSeriesType) { Optional maybeTimeSeries = timeSeriesRepository.findByName(timeSeriesName); if (maybeTimeSeries.isPresent()) { LOG.debug("TimeSeries {} exists.", maybeTimeSeries.get().getName()); @@ -68,6 +68,15 @@ public class TimeSeriesService { return timeSeriesRepository.save(new TimeSeries(timeSeriesName, branch, timeSeriesType)); } + public TimeSeries findByBranchAndTypeOrCreate(Branch branch, TimeSeriesType timeSeriesType) { + Optional maybeTimeSeries = timeSeriesRepository.getTimeSeriesByBranchAndTimeSeriesType(branch, timeSeriesType); + if (maybeTimeSeries.isPresent()) { + LOG.debug("TimeSeries {} exists.", maybeTimeSeries.get().getName()); + return maybeTimeSeries.get(); + } + return timeSeriesRepository.save(new TimeSeries(branch, timeSeriesType)); + } + /** * Сохранить список временных рядов * -- 2.34.1 From aeab50cfb8ebb025d58d0f7a49e071f7bf68b885 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 15 Feb 2023 18:28:39 +0400 Subject: [PATCH 067/122] #89 -- Create a valid class hierarchy --- .../gitrepository/service/GitApi.java | 4 ++ .../gitrepository/service/GitAtheneApi.java | 16 ++++++ .../gitrepository/service/IndexService.java | 2 +- .../ts/creator/db/AuthorsCommitTS.java | 14 +++-- .../ts/creator/{scheduled => db}/ClassTS.java | 23 +++----- .../extractor/ts/creator/db/CommitsTS.java | 14 +++-- .../ts/creator/db/DBTimeSeriesCreator.java | 11 ++-- .../{scheduled => db}/DependenceTS.java | 23 +++----- .../creator/{scheduled => db}/EntityTS.java | 24 +++----- .../ulstu/extractor/ts/creator/db/FileTS.java | 14 +++-- .../{scheduled => db}/InterfaceTS.java | 23 +++----- .../creator/{scheduled => db}/ProcessTS.java | 22 +++----- .../ts/creator/scheduled/AuthorTS.java | 55 +++---------------- .../scheduled/AuthorsCompletedIssueTS.java | 53 ------------------ .../ts/creator/scheduled/AuthorsIssueTS.java | 53 ------------------ 15 files changed, 98 insertions(+), 253 deletions(-) rename src/main/java/ru/ulstu/extractor/ts/creator/{scheduled => db}/ClassTS.java (56%) rename src/main/java/ru/ulstu/extractor/ts/creator/{scheduled => db}/DependenceTS.java (56%) rename src/main/java/ru/ulstu/extractor/ts/creator/{scheduled => db}/EntityTS.java (71%) rename src/main/java/ru/ulstu/extractor/ts/creator/{scheduled => db}/InterfaceTS.java (56%) rename src/main/java/ru/ulstu/extractor/ts/creator/{scheduled => db}/ProcessTS.java (58%) delete mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java delete mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java index 3aa4e59..1267a15 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java @@ -10,4 +10,8 @@ public interface GitApi { Integer getOpenIssuesCount(Branch branch); String getFormattedUrl(String gitRepositoryUrl, String template); + + Integer getAuthorsCompletedIssues(Branch branch); + + Integer getAuthorsCount(Branch branch); } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java index a8853dc..eb79ab5 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java @@ -10,6 +10,8 @@ public class GitAtheneApi implements GitApi { private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + private static final String AUTHOR_COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + private static final String AUTHORS_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; public GitAtheneApi(HttpService httpService) { this.httpService = httpService; @@ -42,4 +44,18 @@ public class GitAtheneApi implements GitApi { String[] urlParts = gitRepositoryUrl.split("/"); return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); } + + @Override + public Integer getAuthorsCompletedIssues(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHOR_COMPLETED_ISSUES_URL)) + .length(); + } + + @Override + public Integer getAuthorsCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHORS_COUNT_URL)) + .length(); + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 088aa22..7921c21 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -79,7 +79,7 @@ public class IndexService { commits = gitRepositoryService.getCommits(gitRepository.getUrl(), branch.getName(), commitsFrom, commitsTo, false); } final Branch branchForSave = branch; - timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(gitRepository, branchForSave)); + timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave)); branchService.updateStatus(branch, IndexingStatus.FINISHED); LOG.debug("Complete indexing {} branch", branch.getName()); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java index dc95528..dd1b7c8 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/AuthorsCommitTS.java @@ -3,10 +3,10 @@ package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; import ru.ulstu.extractor.author.model.Author; import ru.ulstu.extractor.author.service.AuthorService; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -38,18 +38,20 @@ public class AuthorsCommitTS extends DBTimeSeriesCreator { } @Override - public List getTimeSeries(GitRepository gitRepository, String branchName) { + public List getTimeSeries(Branch branch) { List timeSeriesResult = new ArrayList<>(); List authors = authorService.findAll(); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(branch.getGitRepository().getId(), + branch.getName())); for (Author author : authors) { TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), author.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), + branch.getName()), getTimeSeriesType()); for (Commit commit : commits) { if (commit.getAuthor().equals(author)) { diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ClassTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java similarity index 56% rename from src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ClassTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java index 6062fc0..904238c 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ClassTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java @@ -1,10 +1,8 @@ -package ru.ulstu.extractor.ts.creator.scheduled; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -14,30 +12,25 @@ import java.util.Collections; import java.util.List; @Component -public class ClassTS extends AbstractTimeSeriesCreator { +public class ClassTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; - private final GitRepositoryService gitRepositoryService; - public ClassTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(Branch branch) { return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), branch.getName()), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java index 523ff76..a8982c1 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/CommitsTS.java @@ -1,9 +1,9 @@ package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.service.CommitService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -28,17 +28,19 @@ public class CommitsTS extends DBTimeSeriesCreator { } @Override - public List getTimeSeries(GitRepository gitRepository, String branchName) { + public List getTimeSeries(Branch branch) { //TODO: добавить постраничное чтение return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), + branch.getName()), getTimeSeriesType(), - commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName) + commitService.findByRepositoryIdAndName(branch.getGitRepository().getId(), + branch.getName()) .stream() .map(c -> new TimeSeriesValue(c.getDate(), 1.0)) .collect(Collectors.toList()))); diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java index 7de98b7..214aa32 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/DBTimeSeriesCreator.java @@ -1,7 +1,6 @@ package ru.ulstu.extractor.ts.creator.db; import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -15,21 +14,19 @@ public abstract class DBTimeSeriesCreator extends AbstractTimeSeriesCreator { /** * Извлечь список точек временных рядов * - * @param gitRepository - * @param branchName + * @param branch * @return */ - public abstract List getTimeSeries(GitRepository gitRepository, String branchName); + public abstract List getTimeSeries(Branch branch); /** * Сохранить извлеченные временные ряды * - * @param gitRepository * @param branch */ - public void addTimeSeries(GitRepository gitRepository, Branch branch) { + public void addTimeSeries(Branch branch) { // извлеченные временных рядов - List timeSeries = getTimeSeries(gitRepository, branch.getName()); + List timeSeries = getTimeSeries(branch); // сгруппированные по временным интервалам точки временных рядов timeSeries.forEach(ts -> ts.setValues(mapTimeSeriesToInterval(getTimeSeriesService().getTimeSeriesInterval(), ts.getValues()))); diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/DependenceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/DependenceTS.java similarity index 56% rename from src/main/java/ru/ulstu/extractor/ts/creator/scheduled/DependenceTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/DependenceTS.java index d53c5b6..385f2a0 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/DependenceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/DependenceTS.java @@ -1,10 +1,8 @@ -package ru.ulstu.extractor.ts.creator.scheduled; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -14,30 +12,25 @@ import java.util.Collections; import java.util.List; @Component -public class DependenceTS extends AbstractTimeSeriesCreator { +public class DependenceTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; - private final GitRepositoryService gitRepositoryService; - public DependenceTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(Branch branch) { return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), branch.getName()), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/EntityTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/EntityTS.java similarity index 71% rename from src/main/java/ru/ulstu/extractor/ts/creator/scheduled/EntityTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/EntityTS.java index 3666d6b..aed07b3 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/EntityTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/EntityTS.java @@ -1,13 +1,11 @@ -package ru.ulstu.extractor.ts.creator.scheduled; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -19,36 +17,32 @@ import java.util.List; import java.util.stream.Collectors; @Component -public class EntityTS extends AbstractTimeSeriesCreator { +public class EntityTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final CommitService commitService; - private final GitRepositoryService gitRepositoryService; private final BranchService branchService; public EntityTS(TimeSeriesService timeSeriesService, CommitService commitService, - GitRepositoryService gitRepositoryService, BranchService branchService) { this.timeSeriesService = timeSeriesService; this.commitService = commitService; - this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(Branch branch) { return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), branch.getName()), getTimeSeriesType(), - commitService.findByRepositoryIdAndName(repositoryId, branchName) + commitService.findByRepositoryIdAndName(branch.getGitRepository().getId(), branch.getName()) .stream() - .map(c -> new TimeSeriesValue(c.getDate(), findEntity(repositoryId, branchName))) + .map(c -> new TimeSeriesValue(c.getDate(), findEntity(branch.getGitRepository().getId(), branch.getName()))) .collect(Collectors.toList()))); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java index dd845f6..3d4b62d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/FileTS.java @@ -1,11 +1,11 @@ package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.gitrepository.model.FileChange; -import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -29,16 +29,18 @@ public class FileTS extends DBTimeSeriesCreator { } @Override - public List getTimeSeries(GitRepository gitRepository, String branchName) { + public List getTimeSeries(Branch branch) { List timeSeriesResult = new ArrayList<>(); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName)); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(branch.getGitRepository().getId(), + branch.getName())); double value = 0; TimeSeries timeSeries = new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), + branch.getName()), getTimeSeriesType()); for (Commit commit : commits) { for (FileChange fileChange : commit.getFileChanges()) { diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/InterfaceTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/InterfaceTS.java similarity index 56% rename from src/main/java/ru/ulstu/extractor/ts/creator/scheduled/InterfaceTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/InterfaceTS.java index efc1827..08d8cda 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/InterfaceTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/InterfaceTS.java @@ -1,10 +1,8 @@ -package ru.ulstu.extractor.ts.creator.scheduled; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -14,30 +12,25 @@ import java.util.Collections; import java.util.List; @Component -public class InterfaceTS extends AbstractTimeSeriesCreator { +public class InterfaceTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; - private final GitRepositoryService gitRepositoryService; - public InterfaceTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(Branch branch) { return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), branch.getName()), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ProcessTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/ProcessTS.java similarity index 58% rename from src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ProcessTS.java rename to src/main/java/ru/ulstu/extractor/ts/creator/db/ProcessTS.java index 1dd4675..c900678 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ProcessTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/ProcessTS.java @@ -1,9 +1,8 @@ -package ru.ulstu.extractor.ts.creator.scheduled; +package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; +import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -13,30 +12,25 @@ import java.util.Collections; import java.util.List; @Component -public class ProcessTS extends ScheduledTimeSeriesCreator { +public class ProcessTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final BranchService branchService; - private final GitRepositoryService gitRepositoryService; - public ProcessTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { + BranchService branchService) { this.timeSeriesService = timeSeriesService; this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; } @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); + public List getTimeSeries(Branch branch) { return Collections.singletonList( new TimeSeries( String.format("%s %s %s", - gitRepository.getName(), - branchName, + branch.getGitRepository().getName(), + branch.getName(), getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), + branchService.findByRepositoryAndName(branch.getGitRepository(), branch.getName()), getTimeSeriesType(), Dummy.getDefaultTimeSeries())); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java index 3caec78..768f16f 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java @@ -1,38 +1,20 @@ package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.stereotype.Component; -import ru.ulstu.extractor.author.model.Author; -import ru.ulstu.extractor.author.service.AuthorService; -import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.commit.model.Commit; -import ru.ulstu.extractor.commit.service.CommitService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; -import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitApi; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; -import java.util.ArrayList; -import java.util.List; - @Component -public class AuthorTS extends DBTimeSeriesCreator { +public class AuthorTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final CommitService commitService; - private final AuthorService authorService; - private final BranchService branchService; + private final GitApi gitApi; - public AuthorTS(TimeSeriesService timeSeriesService, - CommitService commitService, - AuthorService authorService, - GitRepositoryService gitRepositoryService, - BranchService branchService) { + public AuthorTS(TimeSeriesService timeSeriesService, GitApi gitApi) { this.timeSeriesService = timeSeriesService; - this.commitService = commitService; - this.authorService = authorService; - this.branchService = branchService; + this.gitApi = gitApi; } @Override @@ -41,29 +23,8 @@ public class AuthorTS extends DBTimeSeriesCreator { } @Override - public List getTimeSeries(GitRepository gitRepository, String branchName) { - List timeSeriesResult = new ArrayList<>(); - List authors = authorService.findAll(); - List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(gitRepository.getId(), branchName)); - for (Author author : authors) { - TimeSeries timeSeries = new TimeSeries( - String.format("%s %s %s %s", - gitRepository.getName(), - branchName, - author.getName(), - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType()); - for (Commit commit : commits) { - if (commit.getAuthor().equals(author)) { - timeSeries.getValues().add(new TimeSeriesValue(commit.getDate(), 1.0)); - } - } - if (!timeSeries.getValues().isEmpty()) { - timeSeriesResult.add(timeSeries); - } - } - return timeSeriesResult; + public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { + return new TimeSeriesValue(gitApi.getAuthorsCount(branch)); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java deleted file mode 100644 index 9eeb72d..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsCompletedIssueTS.java +++ /dev/null @@ -1,53 +0,0 @@ -package ru.ulstu.extractor.ts.creator.scheduled; - -import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; - -import java.util.Collections; -import java.util.List; - -@Component -public class AuthorsCompletedIssueTS extends ScheduledTimeSeriesCreator { - private final TimeSeriesService timeSeriesService; - private final BranchService branchService; - - private final GitRepositoryService gitRepositoryService; - - public AuthorsCompletedIssueTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { - this.timeSeriesService = timeSeriesService; - this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; - } - - @Override - public List getTimeSeries(GitRepository gitRepository, String branchName) { - //TODO: добавить постраничное чтение - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - gitRepository.getName(), - branchName, - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); - } - - @Override - public TimeSeriesService getTimeSeriesService() { - return timeSeriesService; - } - - @Override - public TimeSeriesType getTimeSeriesType() { - return TimeSeriesType.AUTHOR_COMPLETED_ISSUES; - } -} diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java deleted file mode 100644 index 9407869..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorsIssueTS.java +++ /dev/null @@ -1,53 +0,0 @@ -package ru.ulstu.extractor.ts.creator.scheduled; - -import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.service.BranchService; -import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; -import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; - -import java.util.Collections; -import java.util.List; - -@Component -public class AuthorsIssueTS extends ScheduledTimeSeriesCreator { - private final TimeSeriesService timeSeriesService; - private final BranchService branchService; - - private final GitRepositoryService gitRepositoryService; - - public AuthorsIssueTS(TimeSeriesService timeSeriesService, - BranchService branchService, - GitRepositoryService gitRepositoryService) { - this.timeSeriesService = timeSeriesService; - this.branchService = branchService; - this.gitRepositoryService = gitRepositoryService; - } - - @Override - public List getTimeSeries(Integer repositoryId, String branchName) { - GitRepository gitRepository = gitRepositoryService.findById(repositoryId); - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - gitRepository.getName(), - branchName, - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(gitRepository, branchName), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); - } - - @Override - public TimeSeriesService getTimeSeriesService() { - return timeSeriesService; - } - - @Override - public TimeSeriesType getTimeSeriesType() { - return TimeSeriesType.AUTHOR_ISSUES; - } -} -- 2.34.1 From 3de664abb1e1829d70c630a277383e4258899f33 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 16 Feb 2023 00:39:13 +0400 Subject: [PATCH 068/122] #89 -- Divide git api services --- .../gitrepository/service/GithubApi.java | 61 +++++++++++++++++++ .../gitrepository/service/GitlabApi.java | 61 +++++++++++++++++++ .../ru/ulstu/extractor/http/HttpService.java | 2 +- .../ts/creator/scheduled/AuthorTS.java | 12 ++-- .../ts/creator/scheduled/BranchTS.java | 11 ++-- .../ts/creator/scheduled/IssuesTS.java | 11 ++-- .../scheduled/ScheduledTimeSeriesCreator.java | 15 +++++ .../ts/creator/scheduled/StarTS.java | 12 ++-- .../ru/ulstu/extractor/util/StringUtils.java | 6 ++ 9 files changed, 170 insertions(+), 21 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java create mode 100644 src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java new file mode 100644 index 0000000..11145ca --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java @@ -0,0 +1,61 @@ +package ru.ulstu.extractor.gitrepository.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.http.HttpService; + +@Service +public class GithubApi implements GitApi { + private final HttpService httpService; + private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; + private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + private static final String AUTHOR_COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + private static final String AUTHORS_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + + public GithubApi(HttpService httpService) { + this.httpService = httpService; + } + + @Override + public Integer getBranchesCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), BRANCHES_COUNT_URL)) + .length(); + } + + @Override + public Integer getStarsCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), STARS_COUNT_URL)) + .getJSONObject(0) + .getInt("stars_count"); + } + + @Override + public Integer getOpenIssuesCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), OPEN_ISSUES_URL)) + .length(); + } + + @Override + public String getFormattedUrl(String gitRepositoryUrl, String template) { + String[] urlParts = gitRepositoryUrl.split("/"); + return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); + } + + @Override + public Integer getAuthorsCompletedIssues(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHOR_COMPLETED_ISSUES_URL)) + .length(); + } + + @Override + public Integer getAuthorsCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHORS_COUNT_URL)) + .length(); + } +} diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java new file mode 100644 index 0000000..975e0f8 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java @@ -0,0 +1,61 @@ +package ru.ulstu.extractor.gitrepository.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.http.HttpService; + +@Service +public class GitlabApi implements GitApi { + private final HttpService httpService; + private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; + private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + private static final String AUTHOR_COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; + private static final String AUTHORS_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + + public GitlabApi(HttpService httpService) { + this.httpService = httpService; + } + + @Override + public Integer getBranchesCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), BRANCHES_COUNT_URL)) + .length(); + } + + @Override + public Integer getStarsCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), STARS_COUNT_URL)) + .getJSONObject(0) + .getInt("stars_count"); + } + + @Override + public Integer getOpenIssuesCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), OPEN_ISSUES_URL)) + .length(); + } + + @Override + public String getFormattedUrl(String gitRepositoryUrl, String template) { + String[] urlParts = gitRepositoryUrl.split("/"); + return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); + } + + @Override + public Integer getAuthorsCompletedIssues(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHOR_COMPLETED_ISSUES_URL)) + .length(); + } + + @Override + public Integer getAuthorsCount(Branch branch) { + return httpService + .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHORS_COUNT_URL)) + .length(); + } +} diff --git a/src/main/java/ru/ulstu/extractor/http/HttpService.java b/src/main/java/ru/ulstu/extractor/http/HttpService.java index cc1884e..2c24f1f 100644 --- a/src/main/java/ru/ulstu/extractor/http/HttpService.java +++ b/src/main/java/ru/ulstu/extractor/http/HttpService.java @@ -58,7 +58,7 @@ public class HttpService { return jsonArray; } } catch (Exception e) { - return new JSONArray("[{response:\"empty\"}]"); + throw new RuntimeException(e); } } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java index 768f16f..a07007c 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java @@ -1,8 +1,8 @@ package ru.ulstu.extractor.ts.creator.scheduled; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.gitrepository.service.GitApi; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -10,11 +10,12 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; @Component public class AuthorTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final GitApi gitApi; + private final ApplicationContext applicationContext; - public AuthorTS(TimeSeriesService timeSeriesService, GitApi gitApi) { + public AuthorTS(TimeSeriesService timeSeriesService, + ApplicationContext applicationContext) { this.timeSeriesService = timeSeriesService; - this.gitApi = gitApi; + this.applicationContext = applicationContext; } @Override @@ -24,7 +25,8 @@ public class AuthorTS extends ScheduledTimeSeriesCreator { @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(gitApi.getAuthorsCount(branch)); + return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + .getAuthorsCount(branch)); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java index 4ef0042..81289db 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java @@ -1,8 +1,8 @@ package ru.ulstu.extractor.ts.creator.scheduled; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.gitrepository.service.GitApi; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -10,12 +10,12 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; @Component public class BranchTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final GitApi gitApi; + private final ApplicationContext applicationContext; public BranchTS(TimeSeriesService timeSeriesService, - GitApi gitApi) { + ApplicationContext applicationContext) { this.timeSeriesService = timeSeriesService; - this.gitApi = gitApi; + this.applicationContext = applicationContext; } @Override @@ -30,6 +30,7 @@ public class BranchTS extends ScheduledTimeSeriesCreator { @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(gitApi.getBranchesCount(branch)); + return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + .getBranchesCount(branch)); } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java index 69907c6..8d26648 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java @@ -1,8 +1,8 @@ package ru.ulstu.extractor.ts.creator.scheduled; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.gitrepository.service.GitApi; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -10,17 +10,18 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; @Component public class IssuesTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final GitApi gitApi; + private final ApplicationContext applicationContext; public IssuesTS(TimeSeriesService timeSeriesService, - GitApi gitApi) { + ApplicationContext applicationContext) { this.timeSeriesService = timeSeriesService; - this.gitApi = gitApi; + this.applicationContext = applicationContext; } @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(gitApi.getOpenIssuesCount(branch)); + return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + .getOpenIssuesCount(branch)); } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java index 1be6322..0bb3786 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java @@ -2,13 +2,24 @@ package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitApi; +import ru.ulstu.extractor.gitrepository.service.GitAtheneApi; +import ru.ulstu.extractor.gitrepository.service.GithubApi; +import ru.ulstu.extractor.gitrepository.service.GitlabApi; import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesValue; +import ru.ulstu.extractor.util.StringUtils; import java.util.Collections; +import java.util.Map; public abstract class ScheduledTimeSeriesCreator extends AbstractTimeSeriesCreator { + private final Map> gitApiServiceHolder = Map.of( + "git.athene.tech", GitAtheneApi.class, + "github.com", GithubApi.class, + "gitlab.com", GitlabApi.class); + @Transactional public void addTimeSeriesValue(Branch branch) { TimeSeries timeSeries = getTimeSeriesService().findByBranchAndTypeOrCreate(branch, getTimeSeriesType()); @@ -17,4 +28,8 @@ public abstract class ScheduledTimeSeriesCreator extends AbstractTimeSeriesCreat } public abstract TimeSeriesValue getNewTimeSeriesValue(Branch branch); + + public Class getGitApiServiceClass(Branch branch) { + return gitApiServiceHolder.get(StringUtils.getServerDomain(branch.getGitRepository().getUrl())); + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java index 6422822..27becfa 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java @@ -1,8 +1,8 @@ package ru.ulstu.extractor.ts.creator.scheduled; +import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.gitrepository.service.GitApi; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -10,11 +10,12 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; @Component public class StarTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; - private final GitApi gitApi; + private final ApplicationContext applicationContext; - public StarTS(TimeSeriesService timeSeriesService, GitApi gitApi) { + public StarTS(TimeSeriesService timeSeriesService, + ApplicationContext applicationContext) { this.timeSeriesService = timeSeriesService; - this.gitApi = gitApi; + this.applicationContext = applicationContext; } @Override @@ -29,6 +30,7 @@ public class StarTS extends ScheduledTimeSeriesCreator { @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(gitApi.getStarsCount(branch)); + return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + .getStarsCount(branch)); } } diff --git a/src/main/java/ru/ulstu/extractor/util/StringUtils.java b/src/main/java/ru/ulstu/extractor/util/StringUtils.java index ec448bc..9d137e5 100644 --- a/src/main/java/ru/ulstu/extractor/util/StringUtils.java +++ b/src/main/java/ru/ulstu/extractor/util/StringUtils.java @@ -9,6 +9,7 @@ import java.nio.file.FileSystems; public class StringUtils { public final static String EMPTY_STRING = ""; + public final static String SERVER_DOMAIN_PATTERN = "%s"; private final static String PATH_SEPARATOR = FileSystems.getDefault().getSeparator(); public static String addPathSeparator(String path) { @@ -25,4 +26,9 @@ public class StringUtils { public static boolean fileInSubdirectory(String filePath, String projectPath, String subDirectory) { return filePath.startsWith(projectPath + PATH_SEPARATOR + subDirectory); } + + public static String getServerDomain(String url) { + String[] urlParts = url.split("/"); + return urlParts[2]; + } } -- 2.34.1 From 78016741cf3938fce731f217f6eecee2ab40bb51 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sun, 19 Feb 2023 23:59:30 +0400 Subject: [PATCH 069/122] #89 -- Fix scheduled time series --- .../gitrepository/model/GitRepository.java | 8 +++- .../gitrepository/service/GitApi.java | 4 +- .../gitrepository/service/GitAtheneApi.java | 22 +++------ .../gitrepository/service/GithubApi.java | 32 +++++-------- .../gitrepository/service/GitlabApi.java | 46 +++++++++++-------- .../ru/ulstu/extractor/http/HttpService.java | 2 + .../ts/creator/scheduled/AuthorTS.java | 36 --------------- 7 files changed, 56 insertions(+), 94 deletions(-) delete mode 100644 src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java index f2b8276..da94301 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java @@ -26,7 +26,11 @@ public class GitRepository extends BaseEntity { public String getName() { int lastDelimiterIndex = url.lastIndexOf("/"); return (lastDelimiterIndex > 0 && lastDelimiterIndex < url.length()) - ? url.substring(lastDelimiterIndex + 1) - : url; + ? removeDotGit(url.substring(lastDelimiterIndex + 1)) + : removeDotGit(url); + } + + private String removeDotGit(String prevName) { + return prevName.substring(0, prevName.lastIndexOf(".git")); } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java index 1267a15..4be8736 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java @@ -9,9 +9,7 @@ public interface GitApi { Integer getOpenIssuesCount(Branch branch); - String getFormattedUrl(String gitRepositoryUrl, String template); + String getFormattedUrl(Branch branch, String template); Integer getAuthorsCompletedIssues(Branch branch); - - Integer getAuthorsCount(Branch branch); } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java index eb79ab5..d6644e1 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java @@ -10,8 +10,7 @@ public class GitAtheneApi implements GitApi { private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; - private static final String AUTHOR_COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; - private static final String AUTHORS_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + private static final String COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=closed"; public GitAtheneApi(HttpService httpService) { this.httpService = httpService; @@ -20,14 +19,14 @@ public class GitAtheneApi implements GitApi { @Override public Integer getBranchesCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), BRANCHES_COUNT_URL)) + .get(getFormattedUrl(branch, BRANCHES_COUNT_URL)) .length(); } @Override public Integer getStarsCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), STARS_COUNT_URL)) + .get(getFormattedUrl(branch, STARS_COUNT_URL)) .getJSONObject(0) .getInt("stars_count"); } @@ -35,27 +34,20 @@ public class GitAtheneApi implements GitApi { @Override public Integer getOpenIssuesCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), OPEN_ISSUES_URL)) + .get(getFormattedUrl(branch, OPEN_ISSUES_URL)) .length(); } @Override - public String getFormattedUrl(String gitRepositoryUrl, String template) { - String[] urlParts = gitRepositoryUrl.split("/"); + public String getFormattedUrl(Branch branch, String template) { + String[] urlParts = branch.getGitRepository().getUrl().split("/"); return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); } @Override public Integer getAuthorsCompletedIssues(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHOR_COMPLETED_ISSUES_URL)) - .length(); - } - - @Override - public Integer getAuthorsCount(Branch branch) { - return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHORS_COUNT_URL)) + .get(getFormattedUrl(branch, COMPLETED_ISSUES_URL)) .length(); } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java index 11145ca..e744bb7 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java @@ -7,11 +7,10 @@ import ru.ulstu.extractor.http.HttpService; @Service public class GithubApi implements GitApi { private final HttpService httpService; - private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; - private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; - private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; - private static final String AUTHOR_COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; - private static final String AUTHORS_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + private static final String BRANCHES_COUNT_URL = "https://api.github.com/repos/%s/%s/branches"; + private static final String STARS_COUNT_URL = "https://api.github.com/repos/%s/%s"; + private static final String OPEN_ISSUES_URL = "https://api.github.com/repos/%s/%s/issues?state=open"; + private static final String AUTHOR_COMPLETED_ISSUES_URL = "https://api.github.com/repos/%s/%s/issues?state=open"; public GithubApi(HttpService httpService) { this.httpService = httpService; @@ -20,42 +19,35 @@ public class GithubApi implements GitApi { @Override public Integer getBranchesCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), BRANCHES_COUNT_URL)) + .get(getFormattedUrl(branch, BRANCHES_COUNT_URL)) .length(); } @Override public Integer getStarsCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), STARS_COUNT_URL)) + .get(getFormattedUrl(branch, STARS_COUNT_URL)) .getJSONObject(0) - .getInt("stars_count"); + .getInt("watchers"); } @Override public Integer getOpenIssuesCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), OPEN_ISSUES_URL)) + .get(getFormattedUrl(branch, OPEN_ISSUES_URL)) .length(); } @Override - public String getFormattedUrl(String gitRepositoryUrl, String template) { - String[] urlParts = gitRepositoryUrl.split("/"); - return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); + public String getFormattedUrl(Branch branch, String template) { + String[] urlParts = branch.getGitRepository().getUrl().split("/"); + return String.format(template, urlParts[3], urlParts[4]); } @Override public Integer getAuthorsCompletedIssues(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHOR_COMPLETED_ISSUES_URL)) - .length(); - } - - @Override - public Integer getAuthorsCount(Branch branch) { - return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHORS_COUNT_URL)) + .get(getFormattedUrl(branch, AUTHOR_COMPLETED_ISSUES_URL)) .length(); } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java index 975e0f8..60feab5 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java @@ -1,5 +1,6 @@ package ru.ulstu.extractor.gitrepository.service; +import org.json.JSONArray; import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; @@ -7,11 +8,11 @@ import ru.ulstu.extractor.http.HttpService; @Service public class GitlabApi implements GitApi { private final HttpService httpService; - private static final String BRANCHES_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; - private static final String STARS_COUNT_URL = "%s/api/v1/repos/%s/%s"; - private static final String OPEN_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; - private static final String AUTHOR_COMPLETED_ISSUES_URL = "%s/api/v1/repos/%s/%s/issues?state=open"; - private static final String AUTHORS_COUNT_URL = "%s/api/v1/repos/%s/%s/branches"; + private static final String BRANCHES_COUNT_URL = "%s/api/v4/projects/%s/repository/branches"; + private final static String PROJECT_ID_URL = "https://gitlab.com/api/v4/users/%s/projects?search=%s"; + private static final String PROJECT_INFO_URL = "%s/api/v4/projects/%s"; + private static final String OPEN_ISSUES_URL = "%s/api/v4/projects/%s/issues?state=opened"; + private static final String COMPLETED_ISSUES_URL = "%s/api/v4/projects/%s/issues?state=closed"; public GitlabApi(HttpService httpService) { this.httpService = httpService; @@ -20,42 +21,51 @@ public class GitlabApi implements GitApi { @Override public Integer getBranchesCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), BRANCHES_COUNT_URL)) + .get(getFormattedUrl(branch, BRANCHES_COUNT_URL)) .length(); } @Override public Integer getStarsCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), STARS_COUNT_URL)) + .get(getFormattedUrl(branch, PROJECT_INFO_URL)) .getJSONObject(0) - .getInt("stars_count"); + .getInt("star_count"); } @Override public Integer getOpenIssuesCount(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), OPEN_ISSUES_URL)) + .get(getFormattedUrl(branch, OPEN_ISSUES_URL)) .length(); } @Override - public String getFormattedUrl(String gitRepositoryUrl, String template) { - String[] urlParts = gitRepositoryUrl.split("/"); - return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], urlParts[3], urlParts[4]); + public String getFormattedUrl(Branch branch, String template) { + String[] urlParts = branch.getGitRepository().getUrl().split("/"); + return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], getProjectId(branch)); + } + + public String getFormattedUrlForProjectId(Branch branch, String template) { + String[] urlParts = branch.getGitRepository().getUrl().split("/"); + // получаем корректное название репозитория, gitlab всегда добавляет .git в конец + return String.format(template, urlParts[3], branch.getGitRepository().getName()); } @Override public Integer getAuthorsCompletedIssues(Branch branch) { return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHOR_COMPLETED_ISSUES_URL)) + .get(getFormattedUrl(branch, COMPLETED_ISSUES_URL)) .length(); } - @Override - public Integer getAuthorsCount(Branch branch) { - return httpService - .get(getFormattedUrl(branch.getGitRepository().getUrl(), AUTHORS_COUNT_URL)) - .length(); + private String getProjectId(Branch branch) { + JSONArray projects = httpService.get(getFormattedUrlForProjectId(branch, PROJECT_ID_URL)); + for (int i = 0; i < projects.length(); i++) { + if (projects.getJSONObject(i).get("name").equals(branch.getGitRepository().getName())) { + return String.valueOf(projects.getJSONObject(i).getInt("id")); + } + } + throw new RuntimeException("Id проекта не найден: " + branch.getGitRepository().getName()); } } diff --git a/src/main/java/ru/ulstu/extractor/http/HttpService.java b/src/main/java/ru/ulstu/extractor/http/HttpService.java index 2c24f1f..1e53488 100644 --- a/src/main/java/ru/ulstu/extractor/http/HttpService.java +++ b/src/main/java/ru/ulstu/extractor/http/HttpService.java @@ -9,6 +9,7 @@ import org.springframework.stereotype.Service; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; +import java.time.Duration; import java.util.Optional; @Service @@ -49,6 +50,7 @@ public class HttpService { .accept(MediaType.APPLICATION_JSON) .retrieve() .bodyToMono(String.class) + .timeout(Duration.ofMinutes(1)) .toFuture().get(); if (response.startsWith("[")) { return new JSONArray(response); diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java deleted file mode 100644 index a07007c..0000000 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/AuthorTS.java +++ /dev/null @@ -1,36 +0,0 @@ -package ru.ulstu.extractor.ts.creator.scheduled; - -import org.springframework.context.ApplicationContext; -import org.springframework.stereotype.Component; -import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.model.TimeSeriesValue; -import ru.ulstu.extractor.ts.service.TimeSeriesService; - -@Component -public class AuthorTS extends ScheduledTimeSeriesCreator { - private final TimeSeriesService timeSeriesService; - private final ApplicationContext applicationContext; - - public AuthorTS(TimeSeriesService timeSeriesService, - ApplicationContext applicationContext) { - this.timeSeriesService = timeSeriesService; - this.applicationContext = applicationContext; - } - - @Override - public TimeSeriesType getTimeSeriesType() { - return TimeSeriesType.AUTHORS; - } - - @Override - public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) - .getAuthorsCount(branch)); - } - - @Override - public TimeSeriesService getTimeSeriesService() { - return timeSeriesService; - } -} -- 2.34.1 From a5c9d15d4f7f19e46bdc2bfc0d0840a9a33121ac Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 20 Feb 2023 10:10:41 +0400 Subject: [PATCH 070/122] #89 -- Fix logs --- .../ts/service/ScheduledTimeSeriesService.java | 6 +++--- .../ulstu/extractor/ts/service/TimeSeriesService.java | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java index 4dc636e..55aeae5 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java @@ -22,13 +22,13 @@ public class ScheduledTimeSeriesService { this.branchService = branchService; } - @Scheduled(cron = "0 */5 * * * *", zone = "Europe/Samara") + @Scheduled(cron = "0 0 * * * *", zone = "Europe/Samara") public void addTimeSeriesPoints() { - log.debug("ConferenceScheduler.checkDeadlineBeforeWeek started"); + log.debug("Старт добавления новых точек временного ряда"); List branches = branchService.findAll(); branches.forEach(branch -> { scheduledTimeSeriesCreators.forEach(creator -> creator.addTimeSeriesValue(branch)); }); - log.debug("ConferenceScheduler.checkDeadlineBeforeWeek finished"); + log.debug("Завершение добавления новых точек временного ряда"); } } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 3989f2e..d5e12e6 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -47,13 +47,13 @@ public class TimeSeriesService { @Transactional public TimeSeries save(String timeSeriesName, Branch branch, TimeSeriesType timeSeriesType, List timeSeriesValues) { - LOG.debug("Start save {} time series with {} time series values ", timeSeriesName, timeSeriesValues.size()); + LOG.debug("Начало сохранения временного ряда {} с {} значениями", timeSeriesName, timeSeriesValues.size()); final TimeSeries timeSeries = findOrCreate(timeSeriesName, branch, timeSeriesType); List timeSeriesValuesToRemove = timeSeries.getValues(); timeSeries.setValues(timeSeriesValues); - LOG.debug("Save time series {} ", timeSeries.getName()); + LOG.debug("Сохранение временного ряда {} ", timeSeries.getName()); TimeSeries savedTimeSeries = timeSeriesRepository.save(timeSeries); - LOG.debug("Clear {} time series values ", timeSeriesValuesToRemove.size()); + LOG.debug("Очистить {} точек временного ряда", timeSeriesValuesToRemove.size()); timeSeriesValueRepository.deleteAll(timeSeriesValuesToRemove); sendToTimeSeriesService(savedTimeSeries); return savedTimeSeries; @@ -100,7 +100,7 @@ public class TimeSeriesService { new Thread(() -> { try { httpService.post(TIME_SERIES_SAVE_SERVICE_URL, new JSONObject(new JsonTimeSeries(timeSeries))); - LOG.debug("Успешно отправлен на сервис"); + LOG.debug("{} успешно отправлен на сервис временных рядов", timeSeries.getName()); } catch (Exception ex) { LOG.debug(ex.getMessage()); } @@ -113,7 +113,7 @@ public class TimeSeriesService { public TimeSeries getById(Integer tsId) { return timeSeriesRepository.findById(tsId) - .orElseThrow(() -> new RuntimeException("Time series not found by id " + tsId)); + .orElseThrow(() -> new RuntimeException("Временной ряд не найден по идентификатору " + tsId)); } public List getAllTimeSeriesTypes() { -- 2.34.1 From 220854401efff37c955680e83d2c3de7051590d0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 20 Feb 2023 11:08:49 +0400 Subject: [PATCH 071/122] #92 -- Fix .git removing --- .../ru/ulstu/extractor/gitrepository/model/GitRepository.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java index da94301..652faf3 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java @@ -31,6 +31,8 @@ public class GitRepository extends BaseEntity { } private String removeDotGit(String prevName) { - return prevName.substring(0, prevName.lastIndexOf(".git")); + return prevName.lastIndexOf(".git") > 0 + ? prevName.substring(0, prevName.lastIndexOf(".git")) + : prevName; } } -- 2.34.1 From de6c83c2393542ecb1d78c177a492a83c7c768ee Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 20 Feb 2023 14:18:37 +0400 Subject: [PATCH 072/122] #92 -- Move id repository to model --- .../gitrepository/model/GitRepository.java | 23 +++++++++-------- .../gitrepository/service/GitApi.java | 2 ++ .../gitrepository/service/GitAtheneApi.java | 5 ++++ .../service/GitRepositoryService.java | 25 ++++++++++++++++--- .../gitrepository/service/GithubApi.java | 5 ++++ .../gitrepository/service/GitlabApi.java | 21 +++++++++------- .../gitrepository/service/IndexService.java | 4 --- .../ts/creator/scheduled/BranchTS.java | 11 +++++++- .../ts/creator/scheduled/IssuesTS.java | 13 ++++++++-- .../scheduled/ScheduledTimeSeriesCreator.java | 16 ++---------- .../ts/creator/scheduled/StarTS.java | 13 ++++++++-- .../ru/ulstu/extractor/util/StringUtils.java | 10 ++++++++ .../db/changelog-20221012_170000-schema.xml | 20 +++++++++++++++ 13 files changed, 122 insertions(+), 46 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java index 652faf3..f4707c7 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java @@ -1,18 +1,21 @@ package ru.ulstu.extractor.gitrepository.model; import ru.ulstu.extractor.core.BaseEntity; +import ru.ulstu.extractor.util.StringUtils; import javax.persistence.Entity; @Entity public class GitRepository extends BaseEntity { private String url; + private String repositoryId; public GitRepository() { } - public GitRepository(String repositoryUrl) { - url = repositoryUrl; + public GitRepository(String repositoryUrl, String repositoryId) { + this.url = repositoryUrl; + this.repositoryId = repositoryId; } public String getUrl() { @@ -23,16 +26,14 @@ public class GitRepository extends BaseEntity { this.url = url; } - public String getName() { - int lastDelimiterIndex = url.lastIndexOf("/"); - return (lastDelimiterIndex > 0 && lastDelimiterIndex < url.length()) - ? removeDotGit(url.substring(lastDelimiterIndex + 1)) - : removeDotGit(url); + public String getRepositoryId() { + return repositoryId; } - private String removeDotGit(String prevName) { - return prevName.lastIndexOf(".git") > 0 - ? prevName.substring(0, prevName.lastIndexOf(".git")) - : prevName; + public String getName() { + int lastDelimiterIndex = url.lastIndexOf("/"); + return StringUtils.removeDotGit((lastDelimiterIndex > 0 && lastDelimiterIndex < url.length()) + ? url.substring(lastDelimiterIndex + 1) + : url); } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java index 4be8736..33d3a14 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitApi.java @@ -12,4 +12,6 @@ public interface GitApi { String getFormattedUrl(Branch branch, String template); Integer getAuthorsCompletedIssues(Branch branch); + + String getRepositoryId(String repositoryUrl); } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java index d6644e1..b1fbf55 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitAtheneApi.java @@ -50,4 +50,9 @@ public class GitAtheneApi implements GitApi { .get(getFormattedUrl(branch, COMPLETED_ISSUES_URL)) .length(); } + + @Override + public String getRepositoryId(String repositoryUrl) { + return null; + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index f6ead24..e400670 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -15,6 +15,7 @@ import org.eclipse.jgit.treewalk.TreeWalk; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Value; +import org.springframework.context.ApplicationContext; import org.springframework.data.domain.Page; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @@ -29,6 +30,7 @@ import ru.ulstu.extractor.heuristic.model.BusinessLogicUnit; import ru.ulstu.extractor.heuristic.model.EntityUnit; import ru.ulstu.extractor.heuristic.model.ResourceUnit; import ru.ulstu.extractor.heuristic.service.StructuralUnitService; +import ru.ulstu.extractor.util.StringUtils; import java.io.ByteArrayOutputStream; import java.io.File; @@ -55,7 +57,11 @@ import static org.apache.logging.log4j.util.Strings.isBlank; @Service public class GitRepositoryService { - private final static Logger LOG = LoggerFactory.getLogger(GitRepositoryService.class); + private final Map> gitApiServiceHolder = Map.of( + "git.athene.tech", GitAtheneApi.class, + "github.com", GithubApi.class, + "gitlab.com", GitlabApi.class); + private static final Logger LOG = LoggerFactory.getLogger(GitRepositoryService.class); private static final String BRANCH_PREFIX = "refs/remotes/origin/"; @Value("${extractor.custom-projects-dir}") private String customProjectsDir; @@ -63,11 +69,14 @@ public class GitRepositoryService { private final ExecutorService executorServiceCommits = Executors.newFixedThreadPool(8); private final StructuralUnitService structuralUnitService; private final GitRepositoryRepository gitRepositoryRepository; + private final ApplicationContext applicationContext; public GitRepositoryService(StructuralUnitService structuralUnitService, - GitRepositoryRepository gitRepositoryRepository) { + GitRepositoryRepository gitRepositoryRepository, + ApplicationContext applicationContext) { this.structuralUnitService = structuralUnitService; this.gitRepositoryRepository = gitRepositoryRepository; + this.applicationContext = applicationContext; } public List getRemoteBranches(String url) throws GitAPIException, IOException { @@ -430,8 +439,18 @@ public class GitRepositoryService { public GitRepository findByUrlOrCreate(String gitRepositoryUrl) { GitRepository gitRepository = gitRepositoryRepository.findByUrl(gitRepositoryUrl); + return gitRepository == null - ? gitRepositoryRepository.save(new GitRepository(gitRepositoryUrl)) + ? gitRepositoryRepository.save(new GitRepository(gitRepositoryUrl, + applicationContext.getBean(getGitApiServiceClass(gitRepositoryUrl)).getRepositoryId(gitRepositoryUrl))) : gitRepository; } + + public Class getGitApiServiceClass(Branch branch) { + return getGitApiServiceClass(branch.getGitRepository().getUrl()); + } + + public Class getGitApiServiceClass(String url) { + return gitApiServiceHolder.get(StringUtils.getServerDomain(url)); + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java index e744bb7..717594f 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java @@ -50,4 +50,9 @@ public class GithubApi implements GitApi { .get(getFormattedUrl(branch, AUTHOR_COMPLETED_ISSUES_URL)) .length(); } + + @Override + public String getRepositoryId(String repositoryUrl) { + return null; + } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java index 60feab5..9f774a3 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitlabApi.java @@ -5,6 +5,9 @@ import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; +import static ru.ulstu.extractor.util.StringUtils.getUrlParts; +import static ru.ulstu.extractor.util.StringUtils.removeDotGit; + @Service public class GitlabApi implements GitApi { private final HttpService httpService; @@ -42,14 +45,14 @@ public class GitlabApi implements GitApi { @Override public String getFormattedUrl(Branch branch, String template) { - String[] urlParts = branch.getGitRepository().getUrl().split("/"); - return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], getProjectId(branch)); + String[] urlParts = getUrlParts(branch.getGitRepository().getUrl()); + return String.format(template, urlParts[0] + "/" + urlParts[1] + "/" + urlParts[2], branch.getGitRepository().getRepositoryId()); } - public String getFormattedUrlForProjectId(Branch branch, String template) { - String[] urlParts = branch.getGitRepository().getUrl().split("/"); + public String getFormattedUrlForProjectId(String repositoryUrl, String template) { + String[] urlParts = getUrlParts(repositoryUrl); // получаем корректное название репозитория, gitlab всегда добавляет .git в конец - return String.format(template, urlParts[3], branch.getGitRepository().getName()); + return String.format(template, urlParts[3], removeDotGit(urlParts[4])); } @Override @@ -59,13 +62,13 @@ public class GitlabApi implements GitApi { .length(); } - private String getProjectId(Branch branch) { - JSONArray projects = httpService.get(getFormattedUrlForProjectId(branch, PROJECT_ID_URL)); + public String getRepositoryId(String repositoryUrl) { + JSONArray projects = httpService.get(getFormattedUrlForProjectId(repositoryUrl, PROJECT_ID_URL)); for (int i = 0; i < projects.length(); i++) { - if (projects.getJSONObject(i).get("name").equals(branch.getGitRepository().getName())) { + if (projects.getJSONObject(i).get("name").equals(removeDotGit(getUrlParts(repositoryUrl)[4]))) { return String.valueOf(projects.getJSONObject(i).getInt("id")); } } - throw new RuntimeException("Id проекта не найден: " + branch.getGitRepository().getName()); + throw new RuntimeException("Id проекта не найден: " + repositoryUrl); } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 7921c21..6d43000 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -17,7 +17,6 @@ import ru.ulstu.extractor.branch.model.IndexingStatus; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import ru.ulstu.extractor.gitrepository.repository.GitRepositoryRepository; import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; import java.io.IOException; @@ -31,17 +30,14 @@ public class IndexService { private final static Logger LOG = LoggerFactory.getLogger(IndexService.class); private final static int COMMITS_PAGE_SIZE = 10; private final GitRepositoryService gitRepositoryService; - private final GitRepositoryRepository gitRepositoryRepository; private final BranchService branchService; private final List timeSeriesCreators; private final static ExecutorService EXECUTOR = Executors.newFixedThreadPool(10); public IndexService(GitRepositoryService gitRepositoryService, - GitRepositoryRepository gitRepositoryRepository, BranchService branchService, List timeSeriesCreators) { this.gitRepositoryService = gitRepositoryService; - this.gitRepositoryRepository = gitRepositoryRepository; this.branchService = branchService; this.timeSeriesCreators = timeSeriesCreators; } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java index 81289db..2ae2510 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/BranchTS.java @@ -3,6 +3,7 @@ package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -10,11 +11,14 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; @Component public class BranchTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final GitRepositoryService gitRepositoryService; private final ApplicationContext applicationContext; public BranchTS(TimeSeriesService timeSeriesService, + GitRepositoryService gitRepositoryService, ApplicationContext applicationContext) { this.timeSeriesService = timeSeriesService; + this.gitRepositoryService = gitRepositoryService; this.applicationContext = applicationContext; } @@ -28,9 +32,14 @@ public class BranchTS extends ScheduledTimeSeriesCreator { return timeSeriesService; } + @Override + public GitRepositoryService getGitRepositoryService() { + return gitRepositoryService; + } + @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + return new TimeSeriesValue(applicationContext.getBean(getGitRepositoryService().getGitApiServiceClass(branch)) .getBranchesCount(branch)); } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java index 8d26648..4f9e9f6 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/IssuesTS.java @@ -3,6 +3,7 @@ package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -11,16 +12,19 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; public class IssuesTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final ApplicationContext applicationContext; + private final GitRepositoryService gitRepositoryService; public IssuesTS(TimeSeriesService timeSeriesService, - ApplicationContext applicationContext) { + ApplicationContext applicationContext, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; this.applicationContext = applicationContext; + this.gitRepositoryService = gitRepositoryService; } @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + return new TimeSeriesValue(applicationContext.getBean(getGitRepositoryService().getGitApiServiceClass(branch)) .getOpenIssuesCount(branch)); } @@ -33,4 +37,9 @@ public class IssuesTS extends ScheduledTimeSeriesCreator { public TimeSeriesType getTimeSeriesType() { return TimeSeriesType.ISSUES; } + + @Override + public GitRepositoryService getGitRepositoryService() { + return gitRepositoryService; + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java index 0bb3786..032bb40 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/ScheduledTimeSeriesCreator.java @@ -2,24 +2,14 @@ package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.branch.model.Branch; -import ru.ulstu.extractor.gitrepository.service.GitApi; -import ru.ulstu.extractor.gitrepository.service.GitAtheneApi; -import ru.ulstu.extractor.gitrepository.service.GithubApi; -import ru.ulstu.extractor.gitrepository.service.GitlabApi; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.creator.AbstractTimeSeriesCreator; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesValue; -import ru.ulstu.extractor.util.StringUtils; import java.util.Collections; -import java.util.Map; public abstract class ScheduledTimeSeriesCreator extends AbstractTimeSeriesCreator { - private final Map> gitApiServiceHolder = Map.of( - "git.athene.tech", GitAtheneApi.class, - "github.com", GithubApi.class, - "gitlab.com", GitlabApi.class); - @Transactional public void addTimeSeriesValue(Branch branch) { TimeSeries timeSeries = getTimeSeriesService().findByBranchAndTypeOrCreate(branch, getTimeSeriesType()); @@ -29,7 +19,5 @@ public abstract class ScheduledTimeSeriesCreator extends AbstractTimeSeriesCreat public abstract TimeSeriesValue getNewTimeSeriesValue(Branch branch); - public Class getGitApiServiceClass(Branch branch) { - return gitApiServiceHolder.get(StringUtils.getServerDomain(branch.getGitRepository().getUrl())); - } + public abstract GitRepositoryService getGitRepositoryService(); } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java index 27becfa..46f5f28 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/scheduled/StarTS.java @@ -3,6 +3,7 @@ package ru.ulstu.extractor.ts.creator.scheduled; import org.springframework.context.ApplicationContext; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.gitrepository.service.GitRepositoryService; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; @@ -11,11 +12,14 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; public class StarTS extends ScheduledTimeSeriesCreator { private final TimeSeriesService timeSeriesService; private final ApplicationContext applicationContext; + private final GitRepositoryService gitRepositoryService; public StarTS(TimeSeriesService timeSeriesService, - ApplicationContext applicationContext) { + ApplicationContext applicationContext, + GitRepositoryService gitRepositoryService) { this.timeSeriesService = timeSeriesService; this.applicationContext = applicationContext; + this.gitRepositoryService = gitRepositoryService; } @Override @@ -28,9 +32,14 @@ public class StarTS extends ScheduledTimeSeriesCreator { return TimeSeriesType.STARS; } + @Override + public GitRepositoryService getGitRepositoryService() { + return gitRepositoryService; + } + @Override public TimeSeriesValue getNewTimeSeriesValue(Branch branch) { - return new TimeSeriesValue(applicationContext.getBean(getGitApiServiceClass(branch)) + return new TimeSeriesValue(applicationContext.getBean(getGitRepositoryService().getGitApiServiceClass(branch)) .getStarsCount(branch)); } } diff --git a/src/main/java/ru/ulstu/extractor/util/StringUtils.java b/src/main/java/ru/ulstu/extractor/util/StringUtils.java index 9d137e5..0c57bcb 100644 --- a/src/main/java/ru/ulstu/extractor/util/StringUtils.java +++ b/src/main/java/ru/ulstu/extractor/util/StringUtils.java @@ -31,4 +31,14 @@ public class StringUtils { String[] urlParts = url.split("/"); return urlParts[2]; } + + public static String[] getUrlParts(String gitRepositoryUrl) { + return gitRepositoryUrl.split("/"); + } + + public static String removeDotGit(String repositoryName) { + return repositoryName.lastIndexOf(".git") > 0 + ? repositoryName.substring(0, repositoryName.lastIndexOf(".git")) + : repositoryName; + } } diff --git a/src/main/resources/db/changelog-20221012_170000-schema.xml b/src/main/resources/db/changelog-20221012_170000-schema.xml index 6ee4e83..6b8df1a 100644 --- a/src/main/resources/db/changelog-20221012_170000-schema.xml +++ b/src/main/resources/db/changelog-20221012_170000-schema.xml @@ -107,4 +107,24 @@ + + + + + + + + + + + + + \ No newline at end of file -- 2.34.1 From 1e69baea80c0779516da5586b9fc5b5d43dac8e5 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 20 Feb 2023 14:22:38 +0400 Subject: [PATCH 073/122] #92 -- Fix scheduled time --- .../ulstu/extractor/ts/service/ScheduledTimeSeriesService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java index 55aeae5..501184a 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java @@ -22,7 +22,7 @@ public class ScheduledTimeSeriesService { this.branchService = branchService; } - @Scheduled(cron = "0 0 * * * *", zone = "Europe/Samara") + @Scheduled(cron = "0 0 8 * * *", zone = "Europe/Samara") public void addTimeSeriesPoints() { log.debug("Старт добавления новых точек временного ряда"); List branches = branchService.findAll(); -- 2.34.1 From bc58d72481f94f8ec56b4741e5f8a3fb0ac89025 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 21 Feb 2023 14:43:27 +0400 Subject: [PATCH 074/122] #92 -- Fix .git removing for git --- .../ru/ulstu/extractor/gitrepository/service/GithubApi.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java index 717594f..b799474 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GithubApi.java @@ -3,6 +3,7 @@ package ru.ulstu.extractor.gitrepository.service; import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; +import ru.ulstu.extractor.util.StringUtils; @Service public class GithubApi implements GitApi { @@ -41,7 +42,7 @@ public class GithubApi implements GitApi { @Override public String getFormattedUrl(Branch branch, String template) { String[] urlParts = branch.getGitRepository().getUrl().split("/"); - return String.format(template, urlParts[3], urlParts[4]); + return String.format(template, urlParts[3], StringUtils.removeDotGit(urlParts[4])); } @Override -- 2.34.1 From d72cf99fa6c1c2f8fd2115cf50bf65b92fd351bb Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 21 Feb 2023 17:46:55 +0400 Subject: [PATCH 075/122] #92 -- Fix saving in transaction --- .../ru/ulstu/extractor/branch/service/BranchService.java | 7 ++++--- .../ru/ulstu/extractor/commit/service/CommitService.java | 8 -------- .../extractor/gitrepository/service/IndexService.java | 4 ++-- 3 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index cb8537e..e123a71 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -41,6 +41,7 @@ public class BranchService { @Transactional public Branch save(Branch branch, List commits) { LOG.debug("Start save {} branch with {} commits ", branch.getName(), commits.size()); + LOG.debug("Current branch contains {} commits ", branch.getCommits().size()); List commitsToRemoveIds = branch.getCommits().stream().map(BaseEntity::getId).collect(Collectors.toList()); branch.setCommits(commitService.save(commits)); LOG.debug("Save branch {} ", branch.getName()); @@ -50,12 +51,12 @@ public class BranchService { return branch; } + @Transactional public Branch addCommits(Branch branch, List commits) { LOG.debug("Start add commits to {} branch with {} commits ", branch.getName(), commits.size()); - commitService.save(commits); + branch.getCommits().addAll(commitService.save(commits)); LOG.debug("Save branch {} ", branch.getName()); - commitService.updateBranchId(commits, branch.getId()); - return branch; + return save(branch); } public Branch findByRepositoryAndName(GitRepository gitRepository, String branchName) { diff --git a/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java index df8d389..79aaa9b 100644 --- a/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java +++ b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java @@ -44,14 +44,6 @@ public class CommitService { jdbcTemplate.update("DELETE FROM commit where branch_id is null"); } - public void updateBranchId(List commits, Integer branchId) { - List commitIds = commits.stream().map(c -> c.getId().toString()).collect(Collectors.toList()); - String updateQuery = "update commit set branch_id = ? where id in (%s)"; - updateQuery = String.format(updateQuery, String.join(",", commitIds)); - jdbcTemplate.update(updateQuery, branchId); - } - - public List findByRepositoryIdAndName(Integer repositoryId, String branchName) { return commitRepository.findByRepositoryIdAndBranchName(repositoryId, branchName); } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 6d43000..7345254 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -74,9 +74,9 @@ public class IndexService { commitsTo += COMMITS_PAGE_SIZE; commits = gitRepositoryService.getCommits(gitRepository.getUrl(), branch.getName(), commitsFrom, commitsTo, false); } - final Branch branchForSave = branch; + branch = branchService.findByBranchId(branch.getId()).orElseThrow(() -> new RuntimeException("Branch not found by id")); + final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED); timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave)); - branchService.updateStatus(branch, IndexingStatus.FINISHED); LOG.debug("Complete indexing {} branch", branch.getName()); } -- 2.34.1 From 9d5672cdcf06054df77af702f270d15cb0f1bbef Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 21 Feb 2023 18:22:41 +0400 Subject: [PATCH 076/122] #91 -- Add markup page --- .../TimeSeriesMarkupController.java | 27 +++++++++++++++++++ src/main/resources/templates/markup.html | 24 +++++++++++++++++ 2 files changed, 51 insertions(+) create mode 100644 src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java create mode 100644 src/main/resources/templates/markup.html diff --git a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java new file mode 100644 index 0000000..5caad5c --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java @@ -0,0 +1,27 @@ +package ru.ulstu.extractor.ts.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.service.TimeSeriesService; +import springfox.documentation.annotations.ApiIgnore; + +import java.util.List; + +@Controller +@ApiIgnore +public class TimeSeriesMarkupController { + private final TimeSeriesService timeSeriesService; + + public TimeSeriesMarkupController(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + @GetMapping("time-series-markup") + public String markupTs(Model model) { + List ts = timeSeriesService.getAllTimeSeries(); + model.addAttribute("ts", ts); + return "markup"; + } +} diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html new file mode 100644 index 0000000..329d010 --- /dev/null +++ b/src/main/resources/templates/markup.html @@ -0,0 +1,24 @@ + + + + Простая обработка формы на Spring MVC + + +
+ + + + + + + + + + + + +
Разметка временных рядов
+
+ -- 2.34.1 From 9972f5e925bf0ca43c81ece6c948844c3d0c1393 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 22 Feb 2023 15:49:10 +0400 Subject: [PATCH 077/122] #92 -- Add api call --- .../extractor/gitrepository/service/IndexService.java | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 7345254..d8d1c1e 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -18,12 +18,11 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; +import ru.ulstu.extractor.ts.service.ScheduledTimeSeriesService; import java.io.IOException; import java.util.Collections; import java.util.List; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; @Service public class IndexService { @@ -32,14 +31,16 @@ public class IndexService { private final GitRepositoryService gitRepositoryService; private final BranchService branchService; private final List timeSeriesCreators; - private final static ExecutorService EXECUTOR = Executors.newFixedThreadPool(10); + private final ScheduledTimeSeriesService scheduledTimeSeriesService; public IndexService(GitRepositoryService gitRepositoryService, BranchService branchService, - List timeSeriesCreators) { + List timeSeriesCreators, + ScheduledTimeSeriesService scheduledTimeSeriesService) { this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; this.timeSeriesCreators = timeSeriesCreators; + this.scheduledTimeSeriesService = scheduledTimeSeriesService; } @Transactional @@ -78,6 +79,7 @@ public class IndexService { final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED); timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave)); LOG.debug("Complete indexing {} branch", branch.getName()); + scheduledTimeSeriesService.addTimeSeriesPoints(); } @Transactional -- 2.34.1 From 7ad962494a78c172168a0f9c738fb06c91e1d430 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 22 Feb 2023 15:59:32 +0400 Subject: [PATCH 078/122] #92 -- Restore --- .../extractor/gitrepository/service/IndexService.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index d8d1c1e..8e89f21 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -18,7 +18,6 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; -import ru.ulstu.extractor.ts.service.ScheduledTimeSeriesService; import java.io.IOException; import java.util.Collections; @@ -31,16 +30,13 @@ public class IndexService { private final GitRepositoryService gitRepositoryService; private final BranchService branchService; private final List timeSeriesCreators; - private final ScheduledTimeSeriesService scheduledTimeSeriesService; public IndexService(GitRepositoryService gitRepositoryService, BranchService branchService, - List timeSeriesCreators, - ScheduledTimeSeriesService scheduledTimeSeriesService) { + List timeSeriesCreators) { this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; this.timeSeriesCreators = timeSeriesCreators; - this.scheduledTimeSeriesService = scheduledTimeSeriesService; } @Transactional @@ -79,7 +75,6 @@ public class IndexService { final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED); timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave)); LOG.debug("Complete indexing {} branch", branch.getName()); - scheduledTimeSeriesService.addTimeSeriesPoints(); } @Transactional -- 2.34.1 From 4bd2f460467cbe85159ab8d095046e36fee91444 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 22 Feb 2023 22:31:53 +0400 Subject: [PATCH 079/122] #91 -- Add markup page menu item --- src/main/resources/templates/default.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index 45c036d..e7c1cec 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -1,8 +1,3 @@ - - @@ -37,6 +32,9 @@
+ -- 2.34.1 From f08e5447fdf5ff571ad8ae822626c995d6c43329 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 22 Feb 2023 23:01:56 +0400 Subject: [PATCH 080/122] #91 -- Fix menu --- src/main/resources/templates/default.html | 6 +++--- src/main/resources/templates/listRepositories.html | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index e7c1cec..aa66144 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -33,13 +33,13 @@ Link
diff --git a/src/main/resources/templates/listRepositories.html b/src/main/resources/templates/listRepositories.html index 8e07b46..ab2ff08 100644 --- a/src/main/resources/templates/listRepositories.html +++ b/src/main/resources/templates/listRepositories.html @@ -19,7 +19,7 @@ + th:text="${repo.name}" th:title="${repo.url}"> -- 2.34.1 From a701f943eb677fd2c2b13f4c4d36e445e180b647 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 25 Feb 2023 11:30:08 +0400 Subject: [PATCH 081/122] #91 -- Fix mvc config --- src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java b/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java index d4f9a9c..a85543c 100644 --- a/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java +++ b/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java @@ -16,9 +16,7 @@ import static ru.ulstu.extractor.core.Route.LIST_INDEXED_REPOSITORIES; public class MvcConfiguration implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/{articlename:\\w+}"); registry.addRedirectViewController("/", LIST_INDEXED_REPOSITORIES); - registry.addRedirectViewController("/default", "/home"); } @Override -- 2.34.1 From 41b23570c03a9878522bdcbaa3e97f7955085ef3 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 25 Feb 2023 12:26:48 +0400 Subject: [PATCH 082/122] #91 -- Fix buttons --- .../resources/templates/listBranches.html | 29 ++++++++++--------- .../resources/templates/listRepositories.html | 2 +- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/src/main/resources/templates/listBranches.html b/src/main/resources/templates/listBranches.html index a9cb074..db6d729 100644 --- a/src/main/resources/templates/listBranches.html +++ b/src/main/resources/templates/listBranches.html @@ -22,19 +22,22 @@ th:text="${branch.name}"> - - - - Индексируется... - - - - + diff --git a/src/main/resources/templates/listRepositories.html b/src/main/resources/templates/listRepositories.html index ab2ff08..8c9289b 100644 --- a/src/main/resources/templates/listRepositories.html +++ b/src/main/resources/templates/listRepositories.html @@ -21,7 +21,7 @@ - -- 2.34.1 From f4600c2ba5d144ca3b7de486fa780f86016df3a0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 27 Feb 2023 14:47:51 +0400 Subject: [PATCH 083/122] #91 -- Group ts tendencies --- .../controller/TimeSeriesMarkupController.java | 1 + .../ulstu/extractor/ts/model/TimeSeries.java | 12 ++++++++++++ .../extractor/ts/model/TimeSeriesValue.java | 13 +++++++++++++ .../ts/service/TimeSeriesService.java | 13 +++++++++++++ .../ru/ulstu/extractor/util/JsonUtils.java | 18 ++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 src/main/java/ru/ulstu/extractor/util/JsonUtils.java diff --git a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java index 5caad5c..32674c5 100644 --- a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java @@ -22,6 +22,7 @@ public class TimeSeriesMarkupController { public String markupTs(Model model) { List ts = timeSeriesService.getAllTimeSeries(); model.addAttribute("ts", ts); + model.addAttribute("fts", timeSeriesService.getGroupedTendencies(ts.get(0))); return "markup"; } } diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java index 76abf70..34a2b4c 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java @@ -2,6 +2,7 @@ package ru.ulstu.extractor.ts.model; import org.hibernate.annotations.Fetch; import org.hibernate.annotations.FetchMode; +import org.json.JSONObject; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.core.BaseEntity; @@ -15,6 +16,9 @@ import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import java.util.ArrayList; import java.util.List; +import java.util.stream.Collectors; + +import static ru.ulstu.extractor.util.JsonUtils.getListOfObjects; @Entity public class TimeSeries extends BaseEntity { @@ -51,6 +55,14 @@ public class TimeSeries extends BaseEntity { this.branch = branch; } + public TimeSeries(JSONObject timeSeries) { + this.name = timeSeries.getString("name"); + this.values = getListOfObjects(timeSeries.getJSONArray("values")) + .stream() + .map(TimeSeriesValue::new) + .collect(Collectors.toList()); + } + public String getName() { return name; } diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java index 9b77f2a..e9ac965 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesValue.java @@ -1,8 +1,11 @@ package ru.ulstu.extractor.ts.model; +import org.json.JSONObject; import ru.ulstu.extractor.core.BaseEntity; import javax.persistence.Entity; +import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.Date; @Entity @@ -28,6 +31,16 @@ public class TimeSeriesValue extends BaseEntity { this.value = value; } + public TimeSeriesValue(JSONObject jsonValue) { + SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd'T'hh:mm:ss"); + try { + this.date = formatter.parse(jsonValue.getString("date")); + } catch (ParseException e) { + e.printStackTrace(); + } + this.value = jsonValue.getDouble("value"); + } + public Date getDate() { return date; } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index d5e12e6..1cdf4cc 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -36,6 +36,7 @@ public class TimeSeriesService { private final HttpService httpService; private final static String TIME_SERIES_SAVE_SERVICE_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; private final static String TIME_SERIES_TENDENCY_URL = "http://time-series.athene.tech/api/1.0/getSpecificMethodSmoothed"; + private final static String TIME_SERIES_GROUPED_TENDENCIES_URL = "http://time-series.athene.tech/api/1.0/getGroupedTendencies"; public TimeSeriesService(TimeSeriesRepository timeSeriesRepository, TimeSeriesValueRepository timeSeriesValueRepository, @@ -136,4 +137,16 @@ public class TimeSeriesService { } return Optional.empty(); } + + public Optional getGroupedTendencies(TimeSeries ts) { + if (ts != null && ts.getValues().size() > 5) { + JSONObject response = httpService.post(TIME_SERIES_GROUPED_TENDENCIES_URL, new JSONObject(new JsonTimeSeries(ts))); + LOG.debug("Send to group time series tendencies"); + if (response.has("response") && response.getString("response").equals("empty")) { + return Optional.empty(); + } + return Optional.of(new TimeSeries(response)); + } + return Optional.empty(); + } } diff --git a/src/main/java/ru/ulstu/extractor/util/JsonUtils.java b/src/main/java/ru/ulstu/extractor/util/JsonUtils.java new file mode 100644 index 0000000..6ac8927 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/util/JsonUtils.java @@ -0,0 +1,18 @@ +package ru.ulstu.extractor.util; + +import org.json.JSONArray; +import org.json.JSONObject; + +import java.util.ArrayList; +import java.util.List; + +public class JsonUtils { + + public static List getListOfObjects(JSONArray jsonArray) { + List result = new ArrayList<>(); + for (int i = 0; i < jsonArray.length(); i++) { + result.add(jsonArray.getJSONObject(i)); + } + return result; + } +} -- 2.34.1 From 704366f11ada7b4bf027e18e56b1390f9db1dac9 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 27 Feb 2023 23:35:31 +0400 Subject: [PATCH 084/122] #91 -- Group list of ts tendencies --- .../ru/ulstu/extractor/http/HttpService.java | 20 +++++++++++++++++++ .../TimeSeriesMarkupController.java | 2 +- .../ts/service/TimeSeriesService.java | 19 +++++++++--------- src/main/resources/templates/markup.html | 2 +- 4 files changed, 31 insertions(+), 12 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/http/HttpService.java b/src/main/java/ru/ulstu/extractor/http/HttpService.java index 1e53488..97dd0df 100644 --- a/src/main/java/ru/ulstu/extractor/http/HttpService.java +++ b/src/main/java/ru/ulstu/extractor/http/HttpService.java @@ -41,6 +41,26 @@ public class HttpService { return response; } + public JSONArray post(String url, JSONArray postData) { + log.debug("Service call: {}", url); + JSONArray response = null; + try { + response = new JSONArray(Optional.ofNullable(client + .post() + .uri(url) + .contentType(MediaType.APPLICATION_JSON) + .body(BodyInserters.fromValue(postData.toString())) + .accept(MediaType.APPLICATION_JSON) + .retrieve() + .bodyToMono(String.class) + .toFuture().get()).orElse("[{response:\"empty\"}]")); + } catch (Exception e) { + return new JSONArray("[{response:\"empty\"}]"); + } + log.debug("Service response: {}", response); + return response; + } + public JSONArray get(String url) { log.debug("Service call: {}", url); try { diff --git a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java index 32674c5..fbe7493 100644 --- a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java @@ -22,7 +22,7 @@ public class TimeSeriesMarkupController { public String markupTs(Model model) { List ts = timeSeriesService.getAllTimeSeries(); model.addAttribute("ts", ts); - model.addAttribute("fts", timeSeriesService.getGroupedTendencies(ts.get(0))); + model.addAttribute("groupedTs", timeSeriesService.getGroupedTendencies(ts)); return "markup"; } } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 1cdf4cc..dac66fe 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -20,12 +20,14 @@ import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.repository.TimeSeriesRepository; import ru.ulstu.extractor.ts.repository.TimeSeriesValueRepository; import ru.ulstu.extractor.ts.util.TimeSeriesDateMapper; +import ru.ulstu.extractor.util.JsonUtils; import javax.transaction.Transactional; import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; +import java.util.stream.Collectors; @Service public class TimeSeriesService { @@ -138,15 +140,12 @@ public class TimeSeriesService { return Optional.empty(); } - public Optional getGroupedTendencies(TimeSeries ts) { - if (ts != null && ts.getValues().size() > 5) { - JSONObject response = httpService.post(TIME_SERIES_GROUPED_TENDENCIES_URL, new JSONObject(new JsonTimeSeries(ts))); - LOG.debug("Send to group time series tendencies"); - if (response.has("response") && response.getString("response").equals("empty")) { - return Optional.empty(); - } - return Optional.of(new TimeSeries(response)); - } - return Optional.empty(); + public List getGroupedTendencies(List tsList) { + JSONArray response = httpService.post(TIME_SERIES_GROUPED_TENDENCIES_URL, new JSONArray(tsList.stream().map(JsonTimeSeries::new).collect(Collectors.toList()))); + LOG.debug("Send to group time series tendencies"); + return JsonUtils.getListOfObjects(response) + .stream() + .map(TimeSeries::new) + .collect(Collectors.toList()); } } diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 329d010..533e30a 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -14,7 +14,7 @@ - + -- 2.34.1 From ed68fa47f7a0c686836f438f8bd1d4ddeff55af0 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 Mar 2023 21:02:10 +0400 Subject: [PATCH 085/122] #91 -- Add markup table --- .../TimeSeriesMarkupController.java | 2 +- .../ulstu/extractor/markup/model/Markup.java | 30 +++++++++++++++++++ .../db/changelog-20230302_210000-schema.xml | 23 ++++++++++++++ src/main/resources/db/changelog-master.xml | 1 + 4 files changed, 55 insertions(+), 1 deletion(-) rename src/main/java/ru/ulstu/extractor/{ts => markup}/controller/TimeSeriesMarkupController.java (95%) create mode 100644 src/main/java/ru/ulstu/extractor/markup/model/Markup.java create mode 100644 src/main/resources/db/changelog-20230302_210000-schema.xml diff --git a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java similarity index 95% rename from src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java rename to src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index fbe7493..d9571a8 100644 --- a/src/main/java/ru/ulstu/extractor/ts/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -1,4 +1,4 @@ -package ru.ulstu.extractor.ts.controller; +package ru.ulstu.extractor.markup.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; diff --git a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java new file mode 100644 index 0000000..84c6d80 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java @@ -0,0 +1,30 @@ +package ru.ulstu.extractor.markup.model; + +import ru.ulstu.extractor.core.BaseEntity; +import ru.ulstu.extractor.ts.model.TimeSeries; + +import javax.persistence.Entity; +import javax.persistence.ManyToOne; + +@Entity +public class Markup extends BaseEntity { + @ManyToOne + private TimeSeries timeSeries; + private String markup; + + public TimeSeries getTimeSeries() { + return timeSeries; + } + + public void setTimeSeries(TimeSeries timeSeries) { + this.timeSeries = timeSeries; + } + + public String getMarkup() { + return markup; + } + + public void setMarkup(String markup) { + this.markup = markup; + } +} \ No newline at end of file diff --git a/src/main/resources/db/changelog-20230302_210000-schema.xml b/src/main/resources/db/changelog-20230302_210000-schema.xml new file mode 100644 index 0000000..7ccb661 --- /dev/null +++ b/src/main/resources/db/changelog-20230302_210000-schema.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/resources/db/changelog-master.xml b/src/main/resources/db/changelog-master.xml index dfde9f7..aa59e26 100644 --- a/src/main/resources/db/changelog-master.xml +++ b/src/main/resources/db/changelog-master.xml @@ -15,4 +15,5 @@ + -- 2.34.1 From 0883c5193bb35934a2090de0154a0e8b694dc3fc Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 2 Mar 2023 22:03:29 +0400 Subject: [PATCH 086/122] #91 -- Add dtos --- .../java/ru/ulstu/extractor/core/Route.java | 5 ++++ .../TimeSeriesMarkupController.java | 15 ++++++++-- .../extractor/markup/model/MarkupForm.java | 15 ++++++++++ .../extractor/markup/model/MarkupRow.java | 28 +++++++++++++++++++ src/main/resources/templates/markup.html | 28 ++++++++++--------- 5 files changed, 75 insertions(+), 16 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java create mode 100644 src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java diff --git a/src/main/java/ru/ulstu/extractor/core/Route.java b/src/main/java/ru/ulstu/extractor/core/Route.java index be9cb53..e1605e7 100644 --- a/src/main/java/ru/ulstu/extractor/core/Route.java +++ b/src/main/java/ru/ulstu/extractor/core/Route.java @@ -21,6 +21,7 @@ public class Route { public static final String ADD_RULE = "addRule"; public static final String ASSESSMENTS = "assessments"; public static final String DELETE_RULE = "deleteRule"; + public static final String ADD_MARKUP = "addMarkup"; public static String getLIST_INDEXED_REPOSITORIES() { return LIST_INDEXED_REPOSITORIES; @@ -45,4 +46,8 @@ public class Route { public static String getASSESSMENTS() { return ASSESSMENTS; } + + public static String getADD_MARKUP() { + return ADD_MARKUP; + } } diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index d9571a8..c816987 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -3,11 +3,16 @@ package ru.ulstu.extractor.markup.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import ru.ulstu.extractor.markup.model.MarkupForm; +import ru.ulstu.extractor.markup.model.MarkupRow; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; import springfox.documentation.annotations.ApiIgnore; import java.util.List; +import java.util.stream.Collectors; @Controller @ApiIgnore @@ -20,9 +25,13 @@ public class TimeSeriesMarkupController { @GetMapping("time-series-markup") public String markupTs(Model model) { - List ts = timeSeriesService.getAllTimeSeries(); - model.addAttribute("ts", ts); - model.addAttribute("groupedTs", timeSeriesService.getGroupedTendencies(ts)); + List tss = timeSeriesService.getAllTimeSeries(); + model.addAttribute("markupForm", new MarkupForm(tss.stream().map(MarkupRow::new).collect(Collectors.toList()))); + return "markup"; + } + + @PostMapping("addMarkups") + public String addMarkups(@RequestBody MarkupForm markupForm) { return "markup"; } } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java new file mode 100644 index 0000000..987103a --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java @@ -0,0 +1,15 @@ +package ru.ulstu.extractor.markup.model; + +import java.util.List; + +public class MarkupForm { + private List markupRows; + + public MarkupForm(List markupRows) { + this.markupRows = markupRows; + } + + public List getMarkupRows() { + return markupRows; + } +} diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java new file mode 100644 index 0000000..f62640e --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java @@ -0,0 +1,28 @@ +package ru.ulstu.extractor.markup.model; + +import ru.ulstu.extractor.ts.model.TimeSeries; + +public class MarkupRow { + private TimeSeries timeSeries; + private String markup; + + public MarkupRow(TimeSeries ts) { + this.timeSeries = ts; + } + + public TimeSeries getTimeSeries() { + return timeSeries; + } + + public void setTimeSeries(TimeSeries timeSeries) { + this.timeSeries = timeSeries; + } + + public String getMarkup() { + return markup; + } + + public void setMarkup(String markup) { + this.markup = markup; + } +} diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 533e30a..3579887 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -7,18 +7,20 @@
- - - - - - - - - - - - -
Разметка временных рядов
+
+ + + + + + + + + + + + +
Разметка временных рядов
+
-- 2.34.1 From 0239b0afd479e8f59ba4b704dd369c04fdb36ff9 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 3 Mar 2023 10:44:26 +0400 Subject: [PATCH 087/122] #91 -- Add save operation --- .../TimeSeriesMarkupController.java | 14 ++++++++++---- .../ulstu/extractor/markup/model/Markup.java | 8 ++++++++ .../extractor/markup/model/MarkupForm.java | 4 ++++ .../markup/repository/MarkupRepository.java | 7 +++++++ .../markup/service/MarkupService.java | 19 +++++++++++++++++++ src/main/resources/templates/markup.html | 3 ++- 6 files changed, 50 insertions(+), 5 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java create mode 100644 src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index c816987..9eeab36 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -3,10 +3,12 @@ package ru.ulstu.extractor.markup.controller; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; +import ru.ulstu.extractor.core.Route; import ru.ulstu.extractor.markup.model.MarkupForm; import ru.ulstu.extractor.markup.model.MarkupRow; +import ru.ulstu.extractor.markup.service.MarkupService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; import springfox.documentation.annotations.ApiIgnore; @@ -18,9 +20,12 @@ import java.util.stream.Collectors; @ApiIgnore public class TimeSeriesMarkupController { private final TimeSeriesService timeSeriesService; + private final MarkupService markupService; - public TimeSeriesMarkupController(TimeSeriesService timeSeriesService) { + public TimeSeriesMarkupController(TimeSeriesService timeSeriesService, + MarkupService markupService) { this.timeSeriesService = timeSeriesService; + this.markupService = markupService; } @GetMapping("time-series-markup") @@ -30,8 +35,9 @@ public class TimeSeriesMarkupController { return "markup"; } - @PostMapping("addMarkups") - public String addMarkups(@RequestBody MarkupForm markupForm) { + @PostMapping(Route.ADD_MARKUP) + public String addMarkups(@ModelAttribute MarkupForm markupForm) { + markupService.saveMarkup(markupForm); return "markup"; } } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java index 84c6d80..0117bc8 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java @@ -12,6 +12,14 @@ public class Markup extends BaseEntity { private TimeSeries timeSeries; private String markup; + public Markup() { + } + + public Markup(MarkupRow markupRow) { + this.timeSeries = markupRow.getTimeSeries(); + this.markup = markupRow.getMarkup(); + } + public TimeSeries getTimeSeries() { return timeSeries; } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java index 987103a..e197b6b 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java @@ -12,4 +12,8 @@ public class MarkupForm { public List getMarkupRows() { return markupRows; } + + public void setMarkupRows(List markupRows) { + this.markupRows = markupRows; + } } diff --git a/src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java b/src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java new file mode 100644 index 0000000..0d149f1 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java @@ -0,0 +1,7 @@ +package ru.ulstu.extractor.markup.repository; + +import org.springframework.data.jpa.repository.JpaRepository; +import ru.ulstu.extractor.markup.model.Markup; + +public interface MarkupRepository extends JpaRepository { +} diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java new file mode 100644 index 0000000..266240c --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -0,0 +1,19 @@ +package ru.ulstu.extractor.markup.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.markup.model.Markup; +import ru.ulstu.extractor.markup.model.MarkupForm; +import ru.ulstu.extractor.markup.repository.MarkupRepository; + +@Service +public class MarkupService { + private final MarkupRepository markupRepository; + + public MarkupService(MarkupRepository markupRepository) { + this.markupRepository = markupRepository; + } + + public void saveMarkup(MarkupForm markupForm) { + markupForm.getMarkupRows().forEach(markupRow -> markupRepository.save(new Markup(markupRow))); + } +} diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 3579887..6417ba2 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -7,7 +7,7 @@
-
+ @@ -21,6 +21,7 @@
+
-- 2.34.1 From 211a8b004c8d1cf47cd63ba30904e12cc75838fa Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 3 Mar 2023 11:10:35 +0400 Subject: [PATCH 088/122] #91 -- Add get markups form --- .../ulstu/extractor/GitExtractorApplication.java | 1 - .../controller/TimeSeriesMarkupController.java | 2 +- .../ulstu/extractor/markup/model/MarkupForm.java | 6 +++++- .../ru/ulstu/extractor/markup/model/MarkupRow.java | 3 +++ src/main/resources/templates/markup.html | 14 ++++++++------ 5 files changed, 17 insertions(+), 9 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java index 1cf7928..8491e6c 100644 --- a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java +++ b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java @@ -26,5 +26,4 @@ public class GitExtractorApplication { public void doSomethingAfterStartup() { indexService.indexFailedBranchesOnStart(); } - } diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index 9eeab36..0c1600c 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -31,7 +31,7 @@ public class TimeSeriesMarkupController { @GetMapping("time-series-markup") public String markupTs(Model model) { List tss = timeSeriesService.getAllTimeSeries(); - model.addAttribute("markupForm", new MarkupForm(tss.stream().map(MarkupRow::new).collect(Collectors.toList()))); + model.addAttribute("markupForm", new MarkupForm(tss.stream().map(MarkupRow::new).limit(200).collect(Collectors.toList()))); return "markup"; } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java index e197b6b..b81a110 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java @@ -1,9 +1,13 @@ package ru.ulstu.extractor.markup.model; +import java.util.ArrayList; import java.util.List; public class MarkupForm { - private List markupRows; + private List markupRows = new ArrayList<>(); + + public MarkupForm() { + } public MarkupForm(List markupRows) { this.markupRows = markupRows; diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java index f62640e..3989a6f 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupRow.java @@ -6,6 +6,9 @@ public class MarkupRow { private TimeSeries timeSeries; private String markup; + public MarkupRow() { + } + public MarkupRow(TimeSeries ts) { this.timeSeries = ts; } diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 6417ba2..b2b1d4e 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -7,21 +7,23 @@
-
+ - + - - - + + + +
Разметка временных рядовРазметка временных рядов
- +
-- 2.34.1 From d7790dff700c3e0a1c1ff96ac03f0f1e51365c63 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 7 Mar 2023 16:59:17 +0400 Subject: [PATCH 089/122] #91 -- Save markup --- .../TimeSeriesMarkupController.java | 35 ++++++++++++++++--- .../ulstu/extractor/markup/model/Markup.java | 6 ++-- .../extractor/markup/model/MarkupForm.java | 27 ++++++++++++++ .../markup/service/MarkupService.java | 14 ++++++-- src/main/resources/templates/markup.html | 25 +++++++++++++ 5 files changed, 98 insertions(+), 9 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index 0c1600c..0672544 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -5,6 +5,7 @@ import org.springframework.ui.Model; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.core.Route; import ru.ulstu.extractor.markup.model.MarkupForm; import ru.ulstu.extractor.markup.model.MarkupRow; @@ -20,24 +21,50 @@ import java.util.stream.Collectors; @ApiIgnore public class TimeSeriesMarkupController { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; private final MarkupService markupService; public TimeSeriesMarkupController(TimeSeriesService timeSeriesService, + BranchService branchService, MarkupService markupService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; this.markupService = markupService; } @GetMapping("time-series-markup") public String markupTs(Model model) { - List tss = timeSeriesService.getAllTimeSeries(); - model.addAttribute("markupForm", new MarkupForm(tss.stream().map(MarkupRow::new).limit(200).collect(Collectors.toList()))); + model.addAttribute("branches", branchService.findAll()); + model.addAttribute("markupForm", new MarkupForm()); + return "markup"; + } + + @PostMapping("time-series-markup") + public String filter(Model model, @ModelAttribute MarkupForm markupForm) { + model.addAttribute("branches", branchService.findAll()); + if (markupForm != null && markupForm.getBranchId() != null) { + List tss = timeSeriesService.getByBranch(markupForm.getBranchId()); + MarkupForm markupFormWithTs = new MarkupForm(tss.stream().map(MarkupRow::new).limit(200).collect(Collectors.toList())); + markupFormWithTs.setBranchId(markupForm.getBranchId()); + model.addAttribute("markupForm", markupFormWithTs); + } else { + model.addAttribute("markupForm", new MarkupForm()); + } return "markup"; } @PostMapping(Route.ADD_MARKUP) - public String addMarkups(@ModelAttribute MarkupForm markupForm) { - markupService.saveMarkup(markupForm); + public String addMarkups(Model model, @ModelAttribute MarkupForm markupForm) { + model.addAttribute("branches", branchService.findAll()); + if (markupForm.getBranchId() != null) { + List tss = timeSeriesService.getByBranch(markupForm.getBranchId()); + MarkupForm markupFormWithTs = new MarkupForm(tss.stream().map(MarkupRow::new).limit(200).collect(Collectors.toList())); + markupFormWithTs.setBranchId(markupForm.getBranchId()); + model.addAttribute("markupForm", markupFormWithTs); + if (markupForm.getMarkupRows() != null && !markupForm.getMarkupRows().isEmpty()) { + markupService.saveMarkup(markupForm); + } + } return "markup"; } } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java index 0117bc8..f119e41 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java @@ -15,9 +15,9 @@ public class Markup extends BaseEntity { public Markup() { } - public Markup(MarkupRow markupRow) { - this.timeSeries = markupRow.getTimeSeries(); - this.markup = markupRow.getMarkup(); + public Markup(TimeSeries timeSeries, String markup) { + this.timeSeries = timeSeries; + this.markup = markup; } public TimeSeries getTimeSeries() { diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java index b81a110..c07c837 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java @@ -5,6 +5,9 @@ import java.util.List; public class MarkupForm { private List markupRows = new ArrayList<>(); + private Integer branchId; + private boolean save; + private boolean filter; public MarkupForm() { } @@ -20,4 +23,28 @@ public class MarkupForm { public void setMarkupRows(List markupRows) { this.markupRows = markupRows; } + + public Integer getBranchId() { + return branchId; + } + + public void setBranchId(Integer branchId) { + this.branchId = branchId; + } + + public boolean isSave() { + return save; + } + + public void setSave(boolean save) { + this.save = save; + } + + public boolean isFilter() { + return filter; + } + + public void setFilter(boolean filter) { + this.filter = filter; + } } diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index 266240c..ae3e35f 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -1,19 +1,29 @@ package ru.ulstu.extractor.markup.service; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.markup.model.Markup; import ru.ulstu.extractor.markup.model.MarkupForm; import ru.ulstu.extractor.markup.repository.MarkupRepository; +import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.service.TimeSeriesService; @Service public class MarkupService { private final MarkupRepository markupRepository; + private final TimeSeriesService timeSeriesService; - public MarkupService(MarkupRepository markupRepository) { + public MarkupService(MarkupRepository markupRepository, + TimeSeriesService timeSeriesService) { this.markupRepository = markupRepository; + this.timeSeriesService = timeSeriesService; } + @Transactional public void saveMarkup(MarkupForm markupForm) { - markupForm.getMarkupRows().forEach(markupRow -> markupRepository.save(new Markup(markupRow))); + markupForm.getMarkupRows().forEach(markupRow -> { + TimeSeries timeSeries = timeSeriesService.getById(markupRow.getTimeSeries().getId()); + markupRepository.save(new Markup(timeSeries, markupRow.getMarkup())); + }); } } diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index b2b1d4e..c0c98a7 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -8,6 +8,31 @@
+
+
+ Репозиторий-ветка +
+
+ + +
+
+ +
+
-- 2.34.1 From 71652c7b79225bcef75d5fa5c7433334a3c1c8c9 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 11 Mar 2023 00:55:43 +0400 Subject: [PATCH 090/122] #91 -- Add some rule generator --- .../extractor/GitExtractorApplication.java | 6 ++- .../assessment/service/AssessmentService.java | 3 +- .../markup/service/MarkupService.java | 6 +++ .../extractor/rule/model/AntecedentValue.java | 3 +- .../repository/AntecedentValueRepository.java | 3 ++ .../rule/service/AntecedentValueService.java | 5 ++ .../extractor/rule/service/DbRuleService.java | 48 +++++++++++++++++-- 7 files changed, 67 insertions(+), 7 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java index 8491e6c..95e1008 100644 --- a/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java +++ b/src/main/java/ru/ulstu/extractor/GitExtractorApplication.java @@ -7,15 +7,18 @@ import org.springframework.context.event.EventListener; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.scheduling.annotation.EnableScheduling; import ru.ulstu.extractor.gitrepository.service.IndexService; +import ru.ulstu.extractor.rule.service.DbRuleService; @SpringBootApplication @EnableScheduling @EnableAsync public class GitExtractorApplication { private final IndexService indexService; + private final DbRuleService dbRuleService; - public GitExtractorApplication(IndexService indexService) { + public GitExtractorApplication(IndexService indexService, DbRuleService dbRuleService) { this.indexService = indexService; + this.dbRuleService = dbRuleService; } public static void main(String[] args) { @@ -25,5 +28,6 @@ public class GitExtractorApplication { @EventListener(ApplicationReadyEvent.class) public void doSomethingAfterStartup() { indexService.indexFailedBranchesOnStart(); + //dbRuleService.generateRulesFromMarkup(); } } diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index d221806..2514e6a 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -71,8 +71,9 @@ public class AssessmentService { Map variableValues = new HashMap<>(); timeSeries .stream() - .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() + .filter(ts -> (ts.getTimeSeriesType() == dbRule.getFirstAntecedent() || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) + && ts.getValues().size() > 0) .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService .getLastTimeSeriesTendency(ts) .orElse(ts.getValues().get(ts.getValues().size() - 1).getValue()))); diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index ae3e35f..c4d3fd3 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -8,6 +8,8 @@ import ru.ulstu.extractor.markup.repository.MarkupRepository; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import java.util.List; + @Service public class MarkupService { private final MarkupRepository markupRepository; @@ -26,4 +28,8 @@ public class MarkupService { markupRepository.save(new Markup(timeSeries, markupRow.getMarkup())); }); } + + public List findAll() { + return markupRepository.findAll(); + } } diff --git a/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java b/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java index 3583e6a..39b5eb6 100644 --- a/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java +++ b/src/main/java/ru/ulstu/extractor/rule/model/AntecedentValue.java @@ -11,8 +11,7 @@ public class AntecedentValue extends BaseEntity { public AntecedentValue() { } - public AntecedentValue(Integer id, String antecedentValue) { - this.setId(id); + public AntecedentValue(String antecedentValue) { this.antecedentValue = antecedentValue; } diff --git a/src/main/java/ru/ulstu/extractor/rule/repository/AntecedentValueRepository.java b/src/main/java/ru/ulstu/extractor/rule/repository/AntecedentValueRepository.java index 1ea84d7..3ae5795 100644 --- a/src/main/java/ru/ulstu/extractor/rule/repository/AntecedentValueRepository.java +++ b/src/main/java/ru/ulstu/extractor/rule/repository/AntecedentValueRepository.java @@ -4,5 +4,8 @@ package ru.ulstu.extractor.rule.repository; import org.springframework.data.jpa.repository.JpaRepository; import ru.ulstu.extractor.rule.model.AntecedentValue; +import java.util.Optional; + public interface AntecedentValueRepository extends JpaRepository { + Optional findByAntecedentValue(String antecedentValue); } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/AntecedentValueService.java b/src/main/java/ru/ulstu/extractor/rule/service/AntecedentValueService.java index ef3c124..8de502a 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/AntecedentValueService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/AntecedentValueService.java @@ -22,4 +22,9 @@ public class AntecedentValueService { return antecedentValueRepository.findById(antecedentValueId) .orElseThrow(() -> new RuntimeException("Antecedent value not found by id " + antecedentValueId)); } + + public AntecedentValue getByValue(String antecedentValue) { + return antecedentValueRepository.findByAntecedentValue(antecedentValue) + .orElseThrow(() -> new RuntimeException("Antecedent value not found by value " + antecedentValue)); + } } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java index 198d486..c0a2dc5 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java @@ -1,10 +1,15 @@ package ru.ulstu.extractor.rule.service; import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import ru.ulstu.extractor.markup.model.Markup; +import ru.ulstu.extractor.markup.service.MarkupService; import ru.ulstu.extractor.rule.model.AddRuleForm; +import ru.ulstu.extractor.rule.model.AntecedentValue; import ru.ulstu.extractor.rule.model.DbRule; import ru.ulstu.extractor.rule.repository.RuleRepository; import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.List; @@ -13,15 +18,16 @@ import java.util.stream.Collectors; @Service public class DbRuleService { private final RuleRepository ruleRepository; - private final TimeSeriesService timeSeriesService; private final AntecedentValueService antecedentValueService; + private final MarkupService markupService; public DbRuleService(RuleRepository ruleRepository, TimeSeriesService timeSeriesService, - AntecedentValueService antecedentValueService) { + AntecedentValueService antecedentValueService, + MarkupService markupService) { this.ruleRepository = ruleRepository; - this.timeSeriesService = timeSeriesService; this.antecedentValueService = antecedentValueService; + this.markupService = markupService; } public List getList() { @@ -65,4 +71,40 @@ public class DbRuleService { public List getConsequentList() { return ruleRepository.findAll().stream().map(DbRule::getConsequent).collect(Collectors.toList()); } + + @Transactional + public void generateRulesFromMarkup() { + List markups = markupService.findAll(); + for (Markup markup1 : markups) { + for (Markup markup2 : markups) { + if (!markup1.equals(markup2)) { + List values1 = markup1.getTimeSeries().getValues(); + for (int i = 1; i < values1.size(); i++) { + List values2 = markup2.getTimeSeries().getValues(); + for (int j = 1; j < values2.size(); j++) { + ruleRepository.save(new DbRule( + getAntecedent(values1.get(i).getValue() - values1.get(i - 1).getValue()), + markup1.getTimeSeries().getTimeSeriesType(), + getAntecedent(values2.get(j).getValue() - values2.get(j - 1).getValue()), + markup2.getTimeSeries().getTimeSeriesType(), + "сгенерированный консеквент" + )); + } + } + } + } + } + } + + private AntecedentValue getAntecedent(Double diff) { + String antecedentValue; + if (diff < 0) { + antecedentValue = "спад"; + } else if (diff > 0) { + antecedentValue = "рост"; + } else { + antecedentValue = "стабильно"; + } + return antecedentValueService.getByValue(antecedentValue); + } } -- 2.34.1 From 80904e622148e740e0d09fd6fbf0730776fde1f5 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 14 Mar 2023 23:20:57 +0400 Subject: [PATCH 091/122] #91 -- Restore --- .../ulstu/extractor/assessment/service/AssessmentService.java | 3 +-- .../ru/ulstu/extractor/rule/controller/RuleController.java | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index 2514e6a..d221806 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -71,9 +71,8 @@ public class AssessmentService { Map variableValues = new HashMap<>(); timeSeries .stream() - .filter(ts -> (ts.getTimeSeriesType() == dbRule.getFirstAntecedent() + .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) - && ts.getValues().size() > 0) .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService .getLastTimeSeriesTendency(ts) .orElse(ts.getValues().get(ts.getValues().size() - 1).getValue()))); diff --git a/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java b/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java index 4e855df..a9a8258 100644 --- a/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java +++ b/src/main/java/ru/ulstu/extractor/rule/controller/RuleController.java @@ -54,7 +54,7 @@ public class RuleController { } @GetMapping(DELETE_RULE) - public String deleteRule(Model model, @RequestParam Integer id) { + public String deleteRule(@RequestParam Integer id) { ruleService.deleteById(id); return "redirect:/" + LIST_RULE; } -- 2.34.1 From 9e431757044345632f7c6710d7281619bca1aca1 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 15 Mar 2023 14:18:23 +0400 Subject: [PATCH 092/122] #80 -- Add validation --- .../controller/AssessmentController.java | 2 +- .../assessment/service/AssessmentService.java | 7 ++----- .../branch/service/BranchService.java | 13 +++++++++++- .../ts/service/TimeSeriesService.java | 20 ++++++++++++++----- 4 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index 3434377..e5721fa 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -27,7 +27,7 @@ public class AssessmentController { @GetMapping(ASSESSMENTS) public String getAssessments(Model model, @RequestParam Optional branchId) { - model.addAttribute("branches", branchService.findAll()); + model.addAttribute("branches", branchService.findAllValid()); if (branchId.isPresent()) { model.addAttribute("assessments", assessmentService.getAssessmentsByForecastTendencies(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index d221806..e1a2020 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -54,9 +54,7 @@ public class AssessmentService { private List getSingleAssessmentByTimeSeriesTendencies(List dbRules, List timeSeries) throws AssessmentException { Map variableValues = new HashMap<>(); - timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), - timeSeriesService.getLastTimeSeriesTendency(ts) - .orElseThrow(() -> new AssessmentException("")))); + timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(dbRules, antecedentValueService.getList(), variableValues, @@ -74,8 +72,7 @@ public class AssessmentService { .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService - .getLastTimeSeriesTendency(ts) - .orElse(ts.getValues().get(ts.getValues().size() - 1).getValue()))); + .getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(List.of(dbRule), antecedentValueService.getList(), variableValues, diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index e123a71..0684ed4 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -16,6 +16,7 @@ import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.commit.service.CommitService; import ru.ulstu.extractor.core.BaseEntity; import ru.ulstu.extractor.gitrepository.model.GitRepository; +import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.List; import java.util.Optional; @@ -26,11 +27,14 @@ public class BranchService { private final static Logger LOG = LoggerFactory.getLogger(BranchService.class); private final BranchRepository branchRepository; private final CommitService commitService; + private final TimeSeriesService timeSeriesService; public BranchService(BranchRepository branchRepository, - CommitService commitService) { + CommitService commitService, + TimeSeriesService timeSeriesService) { this.branchRepository = branchRepository; this.commitService = commitService; + this.timeSeriesService = timeSeriesService; } @Transactional @@ -87,4 +91,11 @@ public class BranchService { branch.setIndexingStatus(indexingStatus); return branchRepository.save(branch); } + + public List findAllValid() { + return findAll() + .stream() + .filter(timeSeriesService::isBranchContainsAllTimeSeries) + .collect(Collectors.toList()); + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index d5e12e6..234757f 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -26,10 +26,13 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; +import java.util.stream.Stream; @Service public class TimeSeriesService { private final static Logger LOG = LoggerFactory.getLogger(TimeSeriesService.class); + private final static int MIN_TIME_SERIES_LENGTH = 5; + private final static double DEFAULT_TIME_SERIES_TENDENCY = 0.0; private final TimeSeriesRepository timeSeriesRepository; private final TimeSeriesValueRepository timeSeriesValueRepository; private final TimeSeriesDateMapper.TimeSeriesInterval timeSeriesInterval = TimeSeriesDateMapper.TimeSeriesInterval.HOUR; @@ -124,16 +127,23 @@ public class TimeSeriesService { return timeSeriesRepository.getTimeSeriesByBranchId(branchId); } - public Optional getLastTimeSeriesTendency(TimeSeries ts) { - if (ts != null && ts.getValues().size() > 5) { + public double getLastTimeSeriesTendency(TimeSeries ts) { + if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) { JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); LOG.debug("Успешно отправлен на сервис сглаживания"); if (response.has("response") && response.getString("response").equals("empty")) { - return Optional.empty(); + return DEFAULT_TIME_SERIES_TENDENCY; } JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values"); - return Optional.of(jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value")); + return jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value"); } - return Optional.empty(); + return DEFAULT_TIME_SERIES_TENDENCY; + } + + public boolean isBranchContainsAllTimeSeries(Branch b) { + List timeSeries = getByBranch(b.getId()); + return Stream.of(TimeSeriesType.values()).allMatch(type -> timeSeries + .stream() + .anyMatch(ts -> type == ts.getTimeSeriesType())); } } -- 2.34.1 From 394873f63b31287aa1a48932cbc64d6e6402bfec Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 15 Mar 2023 14:21:37 +0400 Subject: [PATCH 093/122] #91 -- Remove copyright --- .../ru/ulstu/extractor/ts/service/TimeSeriesService.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 1067649..5d48ae7 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.ts.service; import org.json.JSONArray; @@ -27,8 +22,8 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Optional; -import java.util.stream.Stream; import java.util.stream.Collectors; +import java.util.stream.Stream; @Service public class TimeSeriesService { -- 2.34.1 From ddedfc97515ca08d36af264b8f4724146c506154 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Wed, 15 Mar 2023 14:36:47 +0400 Subject: [PATCH 094/122] #91 -- Fix form --- src/main/resources/templates/assessments.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index a303e2d..8a8c7f7 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -31,8 +31,6 @@
Выбрерите ветку для получения оценки репозитория
- -
Состояние репозитория описывается следующими выражениями:
-- 2.34.1 From d111121e2437d39cc8d2841693c15456e8caa1cb Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 16 Mar 2023 23:09:04 +0400 Subject: [PATCH 095/122] #91 -- Use new models --- .../TimeSeriesMarkupController.java | 36 ++++++++------- .../extractor/markup/model/MarkupForm.java | 33 ++++---------- .../markup/model/TimeSeriesForMarkup.java | 44 +++++++++++++++++++ .../markup/service/MarkupService.java | 41 +++++++++++++++-- src/main/resources/templates/markup.html | 12 ++--- 5 files changed, 115 insertions(+), 51 deletions(-) create mode 100644 src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index 0672544..94d1ec4 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -8,14 +8,12 @@ import org.springframework.web.bind.annotation.PostMapping; import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.core.Route; import ru.ulstu.extractor.markup.model.MarkupForm; -import ru.ulstu.extractor.markup.model.MarkupRow; +import ru.ulstu.extractor.markup.model.TimeSeriesForMarkup; import ru.ulstu.extractor.markup.service.MarkupService; -import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; import springfox.documentation.annotations.ApiIgnore; import java.util.List; -import java.util.stream.Collectors; @Controller @ApiIgnore @@ -34,18 +32,21 @@ public class TimeSeriesMarkupController { @GetMapping("time-series-markup") public String markupTs(Model model) { - model.addAttribute("branches", branchService.findAll()); + model.addAttribute("branches", branchService.findAllValid()); model.addAttribute("markupForm", new MarkupForm()); return "markup"; } @PostMapping("time-series-markup") public String filter(Model model, @ModelAttribute MarkupForm markupForm) { - model.addAttribute("branches", branchService.findAll()); + model.addAttribute("branches", branchService.findAllValid()); if (markupForm != null && markupForm.getBranchId() != null) { - List tss = timeSeriesService.getByBranch(markupForm.getBranchId()); - MarkupForm markupFormWithTs = new MarkupForm(tss.stream().map(MarkupRow::new).limit(200).collect(Collectors.toList())); - markupFormWithTs.setBranchId(markupForm.getBranchId()); + List tss = markupService.getTimeSeriesForMarkup( + timeSeriesService.getGroupedTendencies( + timeSeriesService.getByBranch(markupForm.getBranchId()) + ) + ); + MarkupForm markupFormWithTs = new MarkupForm(markupForm.getBranchId(), tss); model.addAttribute("markupForm", markupFormWithTs); } else { model.addAttribute("markupForm", new MarkupForm()); @@ -55,15 +56,18 @@ public class TimeSeriesMarkupController { @PostMapping(Route.ADD_MARKUP) public String addMarkups(Model model, @ModelAttribute MarkupForm markupForm) { - model.addAttribute("branches", branchService.findAll()); - if (markupForm.getBranchId() != null) { - List tss = timeSeriesService.getByBranch(markupForm.getBranchId()); - MarkupForm markupFormWithTs = new MarkupForm(tss.stream().map(MarkupRow::new).limit(200).collect(Collectors.toList())); - markupFormWithTs.setBranchId(markupForm.getBranchId()); + model.addAttribute("branches", branchService.findAllValid()); + if (markupForm != null && markupForm.getBranchId() != null) { + List tss = markupService.getTimeSeriesForMarkup( + timeSeriesService.getGroupedTendencies( + timeSeriesService.getByBranch(markupForm.getBranchId()) + ) + ); + MarkupForm markupFormWithTs = new MarkupForm(markupForm.getBranchId(), tss); model.addAttribute("markupForm", markupFormWithTs); - if (markupForm.getMarkupRows() != null && !markupForm.getMarkupRows().isEmpty()) { - markupService.saveMarkup(markupForm); - } +// if (markupForm.getMarkupRows() != null && !markupForm.getMarkupRows().isEmpty()) { +// markupService.saveMarkup(markupForm); +// } } return "markup"; } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java index c07c837..098a379 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/MarkupForm.java @@ -4,24 +4,23 @@ import java.util.ArrayList; import java.util.List; public class MarkupForm { - private List markupRows = new ArrayList<>(); + private List timeSeriesForMarkupList = new ArrayList<>(); private Integer branchId; - private boolean save; - private boolean filter; public MarkupForm() { } - public MarkupForm(List markupRows) { - this.markupRows = markupRows; + public MarkupForm(Integer branchId, List tss) { + this.timeSeriesForMarkupList = tss; + this.branchId = branchId; } - public List getMarkupRows() { - return markupRows; + public List getTimeSeriesForMarkupList() { + return timeSeriesForMarkupList; } - public void setMarkupRows(List markupRows) { - this.markupRows = markupRows; + public void setTimeSeriesForMarkupList(List timeSeriesForMarkupList) { + this.timeSeriesForMarkupList = timeSeriesForMarkupList; } public Integer getBranchId() { @@ -31,20 +30,4 @@ public class MarkupForm { public void setBranchId(Integer branchId) { this.branchId = branchId; } - - public boolean isSave() { - return save; - } - - public void setSave(boolean save) { - this.save = save; - } - - public boolean isFilter() { - return filter; - } - - public void setFilter(boolean filter) { - this.filter = filter; - } } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java b/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java new file mode 100644 index 0000000..3bb84ff --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java @@ -0,0 +1,44 @@ +package ru.ulstu.extractor.markup.model; + +import ru.ulstu.extractor.ts.model.TimeSeries; + +import java.util.Date; +import java.util.Set; +import java.util.TreeSet; + +public class TimeSeriesForMarkup { + private Set timeSeriesSet = new TreeSet<>(); + private Date dateFrom; + private Date dateTo; + + public TimeSeriesForMarkup(TimeSeries ts1, TimeSeries ts2, Date dateFrom, Date dateTo) { + this.dateFrom = dateFrom; + this.dateTo = dateTo; + this.timeSeriesSet.add(ts1); + this.timeSeriesSet.add(ts2); + } + + public Set getTimeSeriesSet() { + return timeSeriesSet; + } + + public void setTimeSeriesSet(Set timeSeriesSet) { + this.timeSeriesSet = timeSeriesSet; + } + + public Date getDateFrom() { + return dateFrom; + } + + public void setDateFrom(Date dateFrom) { + this.dateFrom = dateFrom; + } + + public Date getDateTo() { + return dateTo; + } + + public void setDateTo(Date dateTo) { + this.dateTo = dateTo; + } +} diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index c4d3fd3..2d3096f 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -1,13 +1,14 @@ package ru.ulstu.extractor.markup.service; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import ru.ulstu.extractor.markup.model.Markup; -import ru.ulstu.extractor.markup.model.MarkupForm; +import ru.ulstu.extractor.markup.model.TimeSeriesForMarkup; import ru.ulstu.extractor.markup.repository.MarkupRepository; import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import java.util.ArrayList; import java.util.List; @Service @@ -21,15 +22,47 @@ public class MarkupService { this.timeSeriesService = timeSeriesService; } - @Transactional + /*@Transactional public void saveMarkup(MarkupForm markupForm) { markupForm.getMarkupRows().forEach(markupRow -> { TimeSeries timeSeries = timeSeriesService.getById(markupRow.getTimeSeries().getId()); markupRepository.save(new Markup(timeSeries, markupRow.getMarkup())); }); - } + }*/ public List findAll() { return markupRepository.findAll(); } + + public List getTimeSeriesForMarkup(List timeSeriesList) { + List tsForMarkup = new ArrayList<>(); + for (int i = 0; i < timeSeriesList.size(); i++) { + TimeSeries ts1 = timeSeriesList.get(i); + for (int j = i + 1; j < timeSeriesList.size(); j++) { + TimeSeries ts2 = timeSeriesList.get(j); + List values1 = ts1.getValues(); + for (int k = 0; k < values1.size() - 1; k++) { + List values2 = ts2.getValues(); + for (int l = 0; l < values2.size() - 1; l++) { + if (values1.get(k).getDate().equals(values2.get(l).getDate()) + && values1.get(k + 1).getDate().equals(values2.get(l + 1).getDate())) { + final int index = k; + TimeSeriesForMarkup found = tsForMarkup + .stream() + .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index + 1).getDate())) + .findAny() + .orElse(null); + if (found == null) { + tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index + 1).getDate())); + } else { + found.getTimeSeriesSet().add(ts1); + found.getTimeSeriesSet().add(ts2); + } + } + } + } + } + } + return tsForMarkup; + } } diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index c0c98a7..0f085fe 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -36,15 +36,15 @@
- + - - - - + + + + +
Разметка временных рядовОхарактеризуйте периоды вашего проекта
-- 2.34.1 From 5c6b38890185d3dd6e7054471c338c1290fdc844 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Thu, 16 Mar 2023 23:09:26 +0400 Subject: [PATCH 096/122] #91 -- Reformat --- .../extractor/markup/service/MarkupService.java | 12 ++++++------ src/main/resources/templates/markup.html | 8 +++----- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index 2d3096f..c222d39 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -38,22 +38,22 @@ public class MarkupService { List tsForMarkup = new ArrayList<>(); for (int i = 0; i < timeSeriesList.size(); i++) { TimeSeries ts1 = timeSeriesList.get(i); - for (int j = i + 1; j < timeSeriesList.size(); j++) { + for (int j = i+1; j < timeSeriesList.size(); j++) { TimeSeries ts2 = timeSeriesList.get(j); List values1 = ts1.getValues(); - for (int k = 0; k < values1.size() - 1; k++) { + for (int k = 0; k < values1.size()-1; k++) { List values2 = ts2.getValues(); - for (int l = 0; l < values2.size() - 1; l++) { + for (int l = 0; l < values2.size()-1; l++) { if (values1.get(k).getDate().equals(values2.get(l).getDate()) - && values1.get(k + 1).getDate().equals(values2.get(l + 1).getDate())) { + && values1.get(k+1).getDate().equals(values2.get(l+1).getDate())) { final int index = k; TimeSeriesForMarkup found = tsForMarkup .stream() - .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index + 1).getDate())) + .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index+1).getDate())) .findAny() .orElse(null); if (found == null) { - tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index + 1).getDate())); + tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index+1).getDate())); } else { found.getTimeSeriesSet().add(ts1); found.getTimeSeriesSet().add(ts2); diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 0f085fe..87746b9 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -22,9 +22,7 @@
@@ -41,10 +39,10 @@ - + - + -- 2.34.1 From 4596a25a595a21bf356d2b94ea809e6b7e7b34cb Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 11 Apr 2023 16:36:05 +0400 Subject: [PATCH 097/122] #91 -- Fix fuzzy inference --- .../assessment/service/AssessmentService.java | 49 ++----------------- .../rule/service/FuzzyInferenceService.java | 26 +++++----- .../ts/service/TimeSeriesService.java | 16 +++++- 3 files changed, 28 insertions(+), 63 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index e1a2020..2d9899c 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -8,7 +8,6 @@ import ru.ulstu.extractor.rule.service.AntecedentValueService; import ru.ulstu.extractor.rule.service.DbRuleService; import ru.ulstu.extractor.rule.service.FuzzyInferenceService; import ru.ulstu.extractor.ts.model.TimeSeries; -import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.ArrayList; @@ -57,9 +56,7 @@ public class AssessmentService { timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(dbRules, antecedentValueService.getList(), - variableValues, - getTSsMin(timeSeries), - getTSsMax(timeSeries)); + variableValues); } private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { @@ -75,9 +72,7 @@ public class AssessmentService { .getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(List.of(dbRule), antecedentValueService.getList(), - variableValues, - getTSsMin(timeSeries), - getTSsMax(timeSeries)).stream(); + variableValues).stream(); }) .sorted(Comparator.comparing(Assessment::getDegree)) .collect(Collectors.toList()); @@ -88,44 +83,6 @@ public class AssessmentService { timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); return fuzzyInferenceService.getFuzzyInference(dbRules, antecedentValueService.getList(), - variableValues, - getTSsMin(timeSeries), - getTSsMax(timeSeries)); - } - - private Double getMin(List values) { - return values.stream().mapToDouble(v -> v).min().getAsDouble(); - } - - private Map.Entry getTSMin(TimeSeries ts) { - return Map.entry(ts.getTimeSeriesType().name(), - getMin(ts.getValues().stream().map(TimeSeriesValue::getValue).collect(Collectors.toList()))); - } - - private Map getTSsMin(List tss) { - Map res = new HashMap<>(); - tss.forEach(ts -> { - Map.Entry entry = getTSMin(ts); - res.put(entry.getKey(), entry.getValue()); - }); - return res; - } - - private Double getMax(List values) { - return values.stream().mapToDouble(v -> v).max().getAsDouble(); - } - - private Map.Entry getTSMax(TimeSeries ts) { - return Map.entry(ts.getTimeSeriesType().name(), - getMax(ts.getValues().stream().map(TimeSeriesValue::getValue).collect(Collectors.toList()))); - } - - private Map getTSsMax(List tss) { - Map res = new HashMap<>(); - tss.forEach(ts -> { - Map.Entry entry = getTSMax(ts); - res.put(entry.getKey(), entry.getValue()); - }); - return res; + variableValues); } } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 6768c87..910dde5 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -34,8 +34,7 @@ public class FuzzyInferenceService { + " is %s"; private final static String NO_RESULT = "Нет результата"; - private List getRulesFromDb(List dbRules, Map variableValues) { - validateVariables(variableValues, dbRules); + private List mapRulesToString(List dbRules) { return dbRules.stream().map(this::getFuzzyRule).collect(Collectors.toList()); } @@ -51,8 +50,6 @@ public class FuzzyInferenceService { private RuleBlock getRuleBlock(Engine engine, List dbRules, Map variableValues, - Map min, - Map max, List antecedentValues, List consequentValues) { variableValues.forEach((key, value) -> { @@ -61,16 +58,16 @@ public class FuzzyInferenceService { input.setDescription(""); input.setEnabled(true); double delta = antecedentValues.size() > 1 - ? (max.get(key) - min.get(key)) / (antecedentValues.size() - 1) - : (max.get(key) - min.get(key)); - input.setRange(min.get(key), max.get(key)); + ? 2.0 / (antecedentValues.size() - 1) + : 2.0; + input.setRange(-1, 1); input.setLockValueInRange(false); for (int i = 0; i < antecedentValues.size(); i++) { input.addTerm( new Triangle( antecedentValues.get(i).getAntecedentValue(), - min.get(key) + i * delta - 0.5 * delta, - min.get(key) + i * delta + delta + 0.5 * delta + -1 + i * delta - 0.5 * delta, + -1 + i * delta + delta + 0.5 * delta ) ); } @@ -87,7 +84,7 @@ public class FuzzyInferenceService { output.setDefaultValue(Double.NaN); output.setLockValueInRange(false); for (int i = 0; i < consequentValues.size(); i++) { - output.addTerm(new Triangle(consequentValues.get(i).toString(), i, i + 2.1)); + output.addTerm(new Triangle(consequentValues.get(i).toString(), i, i + 1)); } engine.addOutputVariable(output); @@ -99,7 +96,7 @@ public class FuzzyInferenceService { //mamdani.setDisjunction(null); mamdani.setImplication(new AlgebraicProduct()); mamdani.setActivation(new General()); - getRulesFromDb(dbRules, variableValues).forEach(r -> { + mapRulesToString(dbRules).forEach(r -> { LOG.info(r); mamdani.addRule(Rule.parse(r, engine)); }); @@ -115,12 +112,11 @@ public class FuzzyInferenceService { public List getFuzzyInference(List dbRules, List antecedentValues, - Map variableValues, - Map min, - Map max) { + Map variableValues) { + validateVariables(variableValues, dbRules); Engine engine = getFuzzyEngine(); List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); - engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, min, max, antecedentValues, consequentValues)); + engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, antecedentValues, consequentValues)); Map.Entry consequent = getConsequent(engine, variableValues); if (consequent.getKey().equals(NO_RESULT)) { return new ArrayList<>(); diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 5d48ae7..038a3c0 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -127,17 +127,29 @@ public class TimeSeriesService { public double getLastTimeSeriesTendency(TimeSeries ts) { if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) { - JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(ts))); + JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(normalizeTimeSeries(ts)))); LOG.debug("Успешно отправлен на сервис сглаживания"); if (response.has("response") && response.getString("response").equals("empty")) { return DEFAULT_TIME_SERIES_TENDENCY; } JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values"); - return jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value"); + return jsonArray.getJSONObject(jsonArray.length() - 1).getDouble("value") - + jsonArray.getJSONObject(jsonArray.length() - 2).getDouble("value"); } return DEFAULT_TIME_SERIES_TENDENCY; } + private TimeSeries normalizeTimeSeries(TimeSeries ts) { + double sum = ts.getValues().stream().mapToDouble(TimeSeriesValue::getValue).sum(); + + if (sum > 0.0d) { + for (int i = 0; i < ts.getValues().size(); i++) { + ts.getValues().get(i).setValue(ts.getValues().get(i).getValue() / sum); + } + } + return ts; + } + public boolean isBranchContainsAllTimeSeries(Branch b) { List timeSeries = getByBranch(b.getId()); return Stream.of(TimeSeriesType.values()).allMatch(type -> timeSeries -- 2.34.1 From d03cb194ee0ef081af66d40fd63081155a68def7 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 21 Apr 2023 13:23:48 +0400 Subject: [PATCH 098/122] #91 -- Fix fuzzy inference --- .../controller/AssessmentController.java | 3 ++- .../assessment/service/AssessmentService.java | 20 ++++++------------- src/main/resources/templates/assessments.html | 19 +++++++++++++++++- 3 files changed, 26 insertions(+), 16 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index e5721fa..35beb28 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -29,7 +29,8 @@ public class AssessmentController { public String getAssessments(Model model, @RequestParam Optional branchId) { model.addAttribute("branches", branchService.findAllValid()); if (branchId.isPresent()) { - model.addAttribute("assessments", assessmentService.getAssessmentsByForecastTendencies(branchId.get())); + model.addAttribute("assessments", assessmentService.getAssessments(branchId.get())); + model.addAttribute("singleAssessment", assessmentService.getSingleAssessment(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); } else { model.addAttribute("filterBranchForm", new FilterBranchForm()); diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index 2d9899c..83e99ef 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -34,24 +34,24 @@ public class AssessmentService { this.fuzzyInferenceService = fuzzyInferenceService; } - public List getAssessmentsByForecastTendencies(Integer branchId) { + public List getAssessments(Integer branchId) { List timeSeries = timeSeriesService.getByBranch(branchId); List dbRules = ruleService.getList(); try { - return getAssessmentsByTimeSeriesTendencies(dbRules, timeSeries); + return getAssessments(dbRules, timeSeries); } catch (AssessmentException ex) { ex.printStackTrace(); return new ArrayList<>(); } } - public List getAssessmentsByLastValues(Integer branchId) { + public List getSingleAssessment(Integer branchId) throws AssessmentException { List timeSeries = timeSeriesService.getByBranch(branchId); List dbRules = ruleService.getList(); - return getAssessmentsByLastValues(dbRules, timeSeries); + return getSingleAssessment(dbRules, timeSeries); } - private List getSingleAssessmentByTimeSeriesTendencies(List dbRules, List timeSeries) throws AssessmentException { + private List getSingleAssessment(List dbRules, List timeSeries) throws AssessmentException { Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(dbRules, @@ -59,7 +59,7 @@ public class AssessmentService { variableValues); } - private List getAssessmentsByTimeSeriesTendencies(List dbRules, List timeSeries) { + private List getAssessments(List dbRules, List timeSeries) { return dbRules .stream() .flatMap(dbRule -> { @@ -77,12 +77,4 @@ public class AssessmentService { .sorted(Comparator.comparing(Assessment::getDegree)) .collect(Collectors.toList()); } - - private List getAssessmentsByLastValues(List dbRules, List timeSeries) { - Map variableValues = new HashMap<>(); - timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), ts.getValues().get(ts.getValues().size() - 1).getValue())); - return fuzzyInferenceService.getFuzzyInference(dbRules, - antecedentValueService.getList(), - variableValues); - } } diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index 8a8c7f7..f213f81 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -33,7 +33,7 @@
Выбрерите ветку для получения оценки репозитория
-
Состояние репозитория описывается следующими выражениями:
+
Состояние репозитория по нескольким правилам описывается следующими выражениями:
вследствие тенденции '' показателя '
Нет результатов
+ +
+ +
+
Состояние репозитория по лидирующему правилу описывается следующими выражениями:
+
+ + вследствие тенденции '' показателя '' + и тенденции '' показателя ''; + +
+
+
+
Нет результатов
+
-- 2.34.1 From 6823f3499759e7db6b91ab9f86d0b127ce2debb1 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 21 Apr 2023 15:00:14 +0400 Subject: [PATCH 099/122] #91 -- Fix fuzzy sets --- .../rule/service/FuzzyInferenceService.java | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index 910dde5..a1a7f53 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -57,20 +57,11 @@ public class FuzzyInferenceService { input.setName(key); input.setDescription(""); input.setEnabled(true); - double delta = antecedentValues.size() > 1 - ? 2.0 / (antecedentValues.size() - 1) - : 2.0; input.setRange(-1, 1); input.setLockValueInRange(false); - for (int i = 0; i < antecedentValues.size(); i++) { - input.addTerm( - new Triangle( - antecedentValues.get(i).getAntecedentValue(), - -1 + i * delta - 0.5 * delta, - -1 + i * delta + delta + 0.5 * delta - ) - ); - } + input.addTerm(new Triangle("спад", -1, 0)); + input.addTerm(new Triangle("стабильно", -0.1, 0.1)); + input.addTerm(new Triangle("рост", 0, 1)); engine.addInputVariable(input); }); @@ -114,6 +105,7 @@ public class FuzzyInferenceService { List antecedentValues, Map variableValues) { validateVariables(variableValues, dbRules); + variableValues.entrySet().forEach(e -> System.out.println(e.getKey() + " " + e.getValue())); Engine engine = getFuzzyEngine(); List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, antecedentValues, consequentValues)); -- 2.34.1 From 1dc44f79889eae29b0f0bbb36e5abb5f0965304e Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 21 Apr 2023 15:47:27 +0400 Subject: [PATCH 100/122] #91 -- Fix fuzzy inference --- .../controller/AssessmentController.java | 1 - .../assessment/service/AssessmentService.java | 38 ------------------- .../rule/service/FuzzyInferenceService.java | 27 +++++++------ src/main/resources/templates/assessments.html | 17 --------- 4 files changed, 16 insertions(+), 67 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java index 35beb28..9a7ffd8 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java +++ b/src/main/java/ru/ulstu/extractor/assessment/controller/AssessmentController.java @@ -30,7 +30,6 @@ public class AssessmentController { model.addAttribute("branches", branchService.findAllValid()); if (branchId.isPresent()) { model.addAttribute("assessments", assessmentService.getAssessments(branchId.get())); - model.addAttribute("singleAssessment", assessmentService.getSingleAssessment(branchId.get())); model.addAttribute("filterBranchForm", new FilterBranchForm(branchId.get())); } else { model.addAttribute("filterBranchForm", new FilterBranchForm()); diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index 83e99ef..0bae62a 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -2,7 +2,6 @@ package ru.ulstu.extractor.assessment.service; import org.springframework.stereotype.Service; import ru.ulstu.extractor.assessment.model.Assessment; -import ru.ulstu.extractor.rule.model.AssessmentException; import ru.ulstu.extractor.rule.model.DbRule; import ru.ulstu.extractor.rule.service.AntecedentValueService; import ru.ulstu.extractor.rule.service.DbRuleService; @@ -10,12 +9,9 @@ import ru.ulstu.extractor.rule.service.FuzzyInferenceService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; -import java.util.ArrayList; -import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; @Service public class AssessmentService { @@ -37,44 +33,10 @@ public class AssessmentService { public List getAssessments(Integer branchId) { List timeSeries = timeSeriesService.getByBranch(branchId); List dbRules = ruleService.getList(); - try { - return getAssessments(dbRules, timeSeries); - } catch (AssessmentException ex) { - ex.printStackTrace(); - return new ArrayList<>(); - } - } - - public List getSingleAssessment(Integer branchId) throws AssessmentException { - List timeSeries = timeSeriesService.getByBranch(branchId); - List dbRules = ruleService.getList(); - return getSingleAssessment(dbRules, timeSeries); - } - - private List getSingleAssessment(List dbRules, List timeSeries) throws AssessmentException { Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(dbRules, antecedentValueService.getList(), variableValues); } - - private List getAssessments(List dbRules, List timeSeries) { - return dbRules - .stream() - .flatMap(dbRule -> { - Map variableValues = new HashMap<>(); - timeSeries - .stream() - .filter(ts -> ts.getTimeSeriesType() == dbRule.getFirstAntecedent() - || ts.getTimeSeriesType() == dbRule.getSecondAntecedent()) - .forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService - .getLastTimeSeriesTendency(ts))); - return fuzzyInferenceService.getFuzzyInference(List.of(dbRule), - antecedentValueService.getList(), - variableValues).stream(); - }) - .sorted(Comparator.comparing(Assessment::getDegree)) - .collect(Collectors.toList()); - } } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java index a1a7f53..28838c6 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/FuzzyInferenceService.java @@ -8,6 +8,7 @@ import com.fuzzylite.norm.t.AlgebraicProduct; import com.fuzzylite.norm.t.Minimum; import com.fuzzylite.rule.Rule; import com.fuzzylite.rule.RuleBlock; +import com.fuzzylite.term.Activated; import com.fuzzylite.term.Triangle; import com.fuzzylite.variable.InputVariable; import com.fuzzylite.variable.OutputVariable; @@ -109,15 +110,19 @@ public class FuzzyInferenceService { Engine engine = getFuzzyEngine(); List consequentValues = dbRules.stream().map(DbRule::getId).collect(Collectors.toList()); engine.addRuleBlock(getRuleBlock(engine, dbRules, variableValues, antecedentValues, consequentValues)); - Map.Entry consequent = getConsequent(engine, variableValues); - if (consequent.getKey().equals(NO_RESULT)) { + Map consequents = getConsequent(engine, variableValues); + if (consequents.containsKey(NO_RESULT)) { return new ArrayList<>(); } - return dbRules - .stream() - .filter(r -> r.getId().equals(Integer.valueOf(consequent.getKey()))) - .map(r -> new Assessment(r, consequent.getValue())) - .collect(Collectors.toList()); + List assessments = new ArrayList<>(); + for (Map.Entry consequent : consequents.entrySet()) { + for (DbRule dbRule : dbRules) { + if (dbRule.getId().equals(Integer.valueOf(consequent.getKey()))) { + assessments.add(new Assessment(dbRule, consequent.getValue())); + } + } + } + return assessments; } @@ -134,7 +139,7 @@ public class FuzzyInferenceService { } } - private Map.Entry getConsequent(Engine engine, Map variableValues) { + private Map getConsequent(Engine engine, Map variableValues) { OutputVariable outputVariable = engine.getOutputVariable(OUTPUT_VARIABLE_NAME); for (Map.Entry variableValue : variableValues.entrySet()) { InputVariable inputVariable = engine.getInputVariable(variableValue.getKey()); @@ -144,8 +149,8 @@ public class FuzzyInferenceService { if (outputVariable != null) { LOG.info("Output: {}", outputVariable.getValue()); } - return (outputVariable == null || Double.isNaN(outputVariable.getValue())) - ? Map.entry(NO_RESULT, 0.0) - : Map.entry(outputVariable.highestMembershipTerm(outputVariable.getValue()).getName(), outputVariable.getValue()); + return Double.isNaN(outputVariable.getValue()) + ? Map.of(NO_RESULT, 0.0) + : outputVariable.fuzzyOutput().getTerms().stream().collect(Collectors.toMap(t -> t.getTerm().getName(), Activated::getDegree)); } } diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index f213f81..d88b271 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -46,22 +46,5 @@
Нет результатов
- -
- -
-
Состояние репозитория по лидирующему правилу описывается следующими выражениями:
-
- - вследствие тенденции '' показателя '' - и тенденции '' показателя ''; - -
-
-
-
Нет результатов
-
-- 2.34.1 From 3bb4f5c49c0ddb09e63f77ddd7884c2d265a5279 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 21 Apr 2023 22:49:33 +0400 Subject: [PATCH 101/122] #91 -- Run scheduled time series creators --- .../gitrepository/service/IndexService.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 8e89f21..9b2cca7 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.service; import com.sun.istack.NotNull; @@ -18,6 +13,7 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; +import ru.ulstu.extractor.ts.service.ScheduledTimeSeriesService; import java.io.IOException; import java.util.Collections; @@ -30,13 +26,16 @@ public class IndexService { private final GitRepositoryService gitRepositoryService; private final BranchService branchService; private final List timeSeriesCreators; + private final ScheduledTimeSeriesService scheduledTimeSeriesService; public IndexService(GitRepositoryService gitRepositoryService, BranchService branchService, - List timeSeriesCreators) { + List timeSeriesCreators, + ScheduledTimeSeriesService scheduledTimeSeriesService) { this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; this.timeSeriesCreators = timeSeriesCreators; + this.scheduledTimeSeriesService = scheduledTimeSeriesService; } @Transactional @@ -74,6 +73,7 @@ public class IndexService { branch = branchService.findByBranchId(branch.getId()).orElseThrow(() -> new RuntimeException("Branch not found by id")); final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED); timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave)); + scheduledTimeSeriesService.addTimeSeriesPoints(); LOG.debug("Complete indexing {} branch", branch.getName()); } -- 2.34.1 From 8d31dc36b36fb27940e732d426c7539912c3e1b4 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 21 Apr 2023 23:11:09 +0400 Subject: [PATCH 102/122] #91 -- Fix time series types --- src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java index f694064..27487b7 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java @@ -3,9 +3,6 @@ package ru.ulstu.extractor.ts.model; public enum TimeSeriesType { COMMITS("Временной ряд коммитов"), AUTHOR_COMMITS("Временной ряд коммитов авторов"), - AUTHOR_ISSUES("Временной ряд задач авторов"), - AUTHOR_COMPLETED_ISSUES("Временной ряд завершенных задач авторов"), - AUTHORS("Временной ряд авторов"), BRANCHES("Временной ряд веток"), CLASSES("Временной ряд классов"), DEPENDENCIES("Временной ряд зависимостей"), -- 2.34.1 From 1c62c520e940cf815b7f07068a5db599ecec75e1 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 22 Apr 2023 12:26:54 +0400 Subject: [PATCH 103/122] #91 -- Fix db --- .../db/changelog-20230302_210000-schema.xml | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/main/resources/db/changelog-20230302_210000-schema.xml b/src/main/resources/db/changelog-20230302_210000-schema.xml index 7ccb661..670658e 100644 --- a/src/main/resources/db/changelog-20230302_210000-schema.xml +++ b/src/main/resources/db/changelog-20230302_210000-schema.xml @@ -20,4 +20,30 @@ referencedTableName="time_series" referencedColumnNames="id"/> + + + delete + from time_series + where time_series_type = 'AUTHORS'; + delete + from rule + where first_antecedent = 'AUTHORS' + OR second_antecedent = 'AUTHORS'; + delete + from time_series + where time_series_type = 'AUTHOR_COMPLETED_ISSUES'; + delete + from rule + where first_antecedent = 'AUTHOR_COMPLETED_ISSUES' + OR second_antecedent = 'AUTHOR_COMPLETED_ISSUES'; + delete + from time_series + where time_series_type = 'AUTHOR_ISSUES'; + delete + from rule + where first_antecedent = 'AUTHOR_ISSUES' + OR second_antecedent = 'AUTHOR_ISSUES'; + + + \ No newline at end of file -- 2.34.1 From 9c3a64b0d0c7707ebcb8e380a337a3b1453b944c Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sat, 22 Apr 2023 12:58:12 +0400 Subject: [PATCH 104/122] #91 -- Fix smoothing --- .../ru/ulstu/extractor/ts/service/TimeSeriesService.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 038a3c0..2279b0d 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -8,7 +8,6 @@ import org.springframework.stereotype.Service; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.http.HttpService; import ru.ulstu.extractor.http.JsonTimeSeries; -import ru.ulstu.extractor.http.SmoothingTimeSeries; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; import ru.ulstu.extractor.ts.model.TimeSeriesValue; @@ -35,7 +34,7 @@ public class TimeSeriesService { private final TimeSeriesDateMapper.TimeSeriesInterval timeSeriesInterval = TimeSeriesDateMapper.TimeSeriesInterval.HOUR; private final HttpService httpService; private final static String TIME_SERIES_SAVE_SERVICE_URL = "http://time-series.athene.tech/api/1.0/add-time-series?setKey=git-extractor"; - private final static String TIME_SERIES_TENDENCY_URL = "http://time-series.athene.tech/api/1.0/getSpecificMethodSmoothed"; + private final static String TIME_SERIES_TENDENCY_URL = "http://time-series.athene.tech/api/1.0/getMaxSmoothing"; private final static String TIME_SERIES_GROUPED_TENDENCIES_URL = "http://time-series.athene.tech/api/1.0/getGroupedTendencies"; public TimeSeriesService(TimeSeriesRepository timeSeriesRepository, @@ -127,7 +126,7 @@ public class TimeSeriesService { public double getLastTimeSeriesTendency(TimeSeries ts) { if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) { - JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new SmoothingTimeSeries(normalizeTimeSeries(ts)))); + JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new JsonTimeSeries(normalizeTimeSeries(ts)))); LOG.debug("Успешно отправлен на сервис сглаживания"); if (response.has("response") && response.getString("response").equals("empty")) { return DEFAULT_TIME_SERIES_TENDENCY; -- 2.34.1 From e506566a5ddc79ac28b98b06861d3830e44e2572 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sun, 23 Apr 2023 15:08:26 +0400 Subject: [PATCH 105/122] #91 -- Fix data for markup --- .../TimeSeriesMarkupController.java | 7 +- .../ulstu/extractor/markup/model/Markup.java | 38 --------- .../markup/model/TimeSeriesForMarkup.java | 26 +++--- .../markup/repository/MarkupRepository.java | 7 -- .../markup/service/MarkupService.java | 83 +++++++++++++------ .../extractor/rule/service/DbRuleService.java | 58 +++---------- src/main/resources/templates/markup.html | 29 +++---- 7 files changed, 98 insertions(+), 150 deletions(-) delete mode 100644 src/main/java/ru/ulstu/extractor/markup/model/Markup.java delete mode 100644 src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index 94d1ec4..3aef93a 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -65,9 +65,10 @@ public class TimeSeriesMarkupController { ); MarkupForm markupFormWithTs = new MarkupForm(markupForm.getBranchId(), tss); model.addAttribute("markupForm", markupFormWithTs); -// if (markupForm.getMarkupRows() != null && !markupForm.getMarkupRows().isEmpty()) { -// markupService.saveMarkup(markupForm); -// } + if (markupForm.getTimeSeriesForMarkupList() != null + && !markupForm.getTimeSeriesForMarkupList().isEmpty()) { + markupService.generateRules(markupForm); + } } return "markup"; } diff --git a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java b/src/main/java/ru/ulstu/extractor/markup/model/Markup.java deleted file mode 100644 index f119e41..0000000 --- a/src/main/java/ru/ulstu/extractor/markup/model/Markup.java +++ /dev/null @@ -1,38 +0,0 @@ -package ru.ulstu.extractor.markup.model; - -import ru.ulstu.extractor.core.BaseEntity; -import ru.ulstu.extractor.ts.model.TimeSeries; - -import javax.persistence.Entity; -import javax.persistence.ManyToOne; - -@Entity -public class Markup extends BaseEntity { - @ManyToOne - private TimeSeries timeSeries; - private String markup; - - public Markup() { - } - - public Markup(TimeSeries timeSeries, String markup) { - this.timeSeries = timeSeries; - this.markup = markup; - } - - public TimeSeries getTimeSeries() { - return timeSeries; - } - - public void setTimeSeries(TimeSeries timeSeries) { - this.timeSeries = timeSeries; - } - - public String getMarkup() { - return markup; - } - - public void setMarkup(String markup) { - this.markup = markup; - } -} \ No newline at end of file diff --git a/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java b/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java index 3bb84ff..9aaa903 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java @@ -1,29 +1,27 @@ package ru.ulstu.extractor.markup.model; +import ru.ulstu.extractor.rule.model.AntecedentValue; import ru.ulstu.extractor.ts.model.TimeSeries; import java.util.Date; -import java.util.Set; -import java.util.TreeSet; +import java.util.HashMap; +import java.util.Map; public class TimeSeriesForMarkup { - private Set timeSeriesSet = new TreeSet<>(); + private Map timeSeriesTendencyMap = new HashMap<>(); + private String markup; private Date dateFrom; private Date dateTo; - public TimeSeriesForMarkup(TimeSeries ts1, TimeSeries ts2, Date dateFrom, Date dateTo) { + public TimeSeriesForMarkup(TimeSeries ts1, AntecedentValue tendency1, TimeSeries ts2, AntecedentValue tendency2, Date dateFrom, Date dateTo) { this.dateFrom = dateFrom; this.dateTo = dateTo; - this.timeSeriesSet.add(ts1); - this.timeSeriesSet.add(ts2); + this.timeSeriesTendencyMap.put(ts1, tendency1); + this.timeSeriesTendencyMap.put(ts2, tendency2); } - public Set getTimeSeriesSet() { - return timeSeriesSet; - } - - public void setTimeSeriesSet(Set timeSeriesSet) { - this.timeSeriesSet = timeSeriesSet; + public Map getTimeSeriesTendencyMap() { + return timeSeriesTendencyMap; } public Date getDateFrom() { @@ -41,4 +39,8 @@ public class TimeSeriesForMarkup { public void setDateTo(Date dateTo) { this.dateTo = dateTo; } + + public String getMarkup() { + return markup; + } } diff --git a/src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java b/src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java deleted file mode 100644 index 0d149f1..0000000 --- a/src/main/java/ru/ulstu/extractor/markup/repository/MarkupRepository.java +++ /dev/null @@ -1,7 +0,0 @@ -package ru.ulstu.extractor.markup.repository; - -import org.springframework.data.jpa.repository.JpaRepository; -import ru.ulstu.extractor.markup.model.Markup; - -public interface MarkupRepository extends JpaRepository { -} diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index c222d39..12ee087 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -1,68 +1,97 @@ package ru.ulstu.extractor.markup.service; import org.springframework.stereotype.Service; -import ru.ulstu.extractor.markup.model.Markup; +import ru.ulstu.extractor.markup.model.MarkupForm; import ru.ulstu.extractor.markup.model.TimeSeriesForMarkup; -import ru.ulstu.extractor.markup.repository.MarkupRepository; +import ru.ulstu.extractor.rule.model.AntecedentValue; +import ru.ulstu.extractor.rule.service.AntecedentValueService; +import ru.ulstu.extractor.rule.service.DbRuleService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesValue; -import ru.ulstu.extractor.ts.service.TimeSeriesService; +import javax.transaction.Transactional; import java.util.ArrayList; +import java.util.Comparator; import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; @Service public class MarkupService { - private final MarkupRepository markupRepository; - private final TimeSeriesService timeSeriesService; + private final DbRuleService dbRuleService; + private final AntecedentValueService antecedentValueService; - public MarkupService(MarkupRepository markupRepository, - TimeSeriesService timeSeriesService) { - this.markupRepository = markupRepository; - this.timeSeriesService = timeSeriesService; + public MarkupService(DbRuleService dbRuleService, + AntecedentValueService antecedentValueService) { + this.dbRuleService = dbRuleService; + this.antecedentValueService = antecedentValueService; } - /*@Transactional - public void saveMarkup(MarkupForm markupForm) { - markupForm.getMarkupRows().forEach(markupRow -> { - TimeSeries timeSeries = timeSeriesService.getById(markupRow.getTimeSeries().getId()); - markupRepository.save(new Markup(timeSeries, markupRow.getMarkup())); + @Transactional + public void generateRules(MarkupForm markupForm) { + markupForm.getTimeSeriesForMarkupList().forEach(markupRow -> { + Set> timeSeriesEntry1 = markupRow.getTimeSeriesTendencyMap().entrySet(); + Set> timeSeriesEntry2 = markupRow.getTimeSeriesTendencyMap().entrySet(); + for (Map.Entry entry1 : timeSeriesEntry1) { + for (Map.Entry entry2 : timeSeriesEntry2) { + if (!entry1.equals(entry2)) { + dbRuleService.saveRule(entry1.getKey().getTimeSeriesType(), entry1.getValue(), + entry2.getKey().getTimeSeriesType(), entry2.getValue(), + markupRow.getMarkup()); + } + } + } }); - }*/ - - public List findAll() { - return markupRepository.findAll(); } + private AntecedentValue getAntecedent(Double diff) { + String antecedentValue; + if (diff < 0) { + antecedentValue = "спад"; + } else if (diff > 0) { + antecedentValue = "рост"; + } else { + antecedentValue = "стабильно"; + } + return antecedentValueService.getByValue(antecedentValue); + } + + public List getTimeSeriesForMarkup(List timeSeriesList) { List tsForMarkup = new ArrayList<>(); for (int i = 0; i < timeSeriesList.size(); i++) { TimeSeries ts1 = timeSeriesList.get(i); - for (int j = i+1; j < timeSeriesList.size(); j++) { + for (int j = i + 1; j < timeSeriesList.size(); j++) { TimeSeries ts2 = timeSeriesList.get(j); List values1 = ts1.getValues(); - for (int k = 0; k < values1.size()-1; k++) { + for (int k = 0; k < values1.size() - 1; k++) { List values2 = ts2.getValues(); - for (int l = 0; l < values2.size()-1; l++) { + for (int l = 0; l < values2.size() - 1; l++) { if (values1.get(k).getDate().equals(values2.get(l).getDate()) - && values1.get(k+1).getDate().equals(values2.get(l+1).getDate())) { + && values1.get(k + 1).getDate().equals(values2.get(l + 1).getDate())) { final int index = k; TimeSeriesForMarkup found = tsForMarkup .stream() - .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index+1).getDate())) + .filter(m -> m.getDateFrom().equals(values1.get(index).getDate()) && m.getDateTo().equals(values1.get(index + 1).getDate())) .findAny() .orElse(null); + AntecedentValue antecedentValue1 = getAntecedent(values1.get(index + 1).getValue() - values1.get(index).getValue()); + AntecedentValue antecedentValue2 = getAntecedent(values2.get(l + 1).getValue() - values2.get(l).getValue()); if (found == null) { - tsForMarkup.add(new TimeSeriesForMarkup(ts1, ts2, values1.get(index).getDate(), values1.get(index+1).getDate())); + tsForMarkup.add(new TimeSeriesForMarkup(ts1, antecedentValue1, ts2, antecedentValue2, values1.get(index).getDate(), values1.get(index + 1).getDate())); } else { - found.getTimeSeriesSet().add(ts1); - found.getTimeSeriesSet().add(ts2); + found.getTimeSeriesTendencyMap().put(ts1, antecedentValue1); + found.getTimeSeriesTendencyMap().put(ts2, antecedentValue2); } } } } } } - return tsForMarkup; + return tsForMarkup + .stream() + .sorted(Comparator.comparing(TimeSeriesForMarkup::getDateFrom)) + .collect(Collectors.toList()); } } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java index c0a2dc5..44fe3cf 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java @@ -1,16 +1,11 @@ package ru.ulstu.extractor.rule.service; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; -import ru.ulstu.extractor.markup.model.Markup; -import ru.ulstu.extractor.markup.service.MarkupService; import ru.ulstu.extractor.rule.model.AddRuleForm; import ru.ulstu.extractor.rule.model.AntecedentValue; import ru.ulstu.extractor.rule.model.DbRule; import ru.ulstu.extractor.rule.repository.RuleRepository; import ru.ulstu.extractor.ts.model.TimeSeriesType; -import ru.ulstu.extractor.ts.model.TimeSeriesValue; -import ru.ulstu.extractor.ts.service.TimeSeriesService; import java.util.List; import java.util.stream.Collectors; @@ -19,15 +14,11 @@ import java.util.stream.Collectors; public class DbRuleService { private final RuleRepository ruleRepository; private final AntecedentValueService antecedentValueService; - private final MarkupService markupService; public DbRuleService(RuleRepository ruleRepository, - TimeSeriesService timeSeriesService, - AntecedentValueService antecedentValueService, - MarkupService markupService) { + AntecedentValueService antecedentValueService) { this.ruleRepository = ruleRepository; this.antecedentValueService = antecedentValueService; - this.markupService = markupService; } public List getList() { @@ -52,6 +43,17 @@ public class DbRuleService { } } + public void saveRule(TimeSeriesType timeSeriesType1, AntecedentValue antecedentValue1, + TimeSeriesType timeSeriesType2, AntecedentValue antecedentValue2, + String consequent) { + ruleRepository.save(new DbRule(antecedentValueService.getById(antecedentValue1.getId()), + timeSeriesType1, + antecedentValueService.getById(antecedentValue2.getId()), + timeSeriesType2, + consequent)); + + } + public DbRule findById(Integer id) { return ruleRepository.getOne(id); } @@ -71,40 +73,4 @@ public class DbRuleService { public List getConsequentList() { return ruleRepository.findAll().stream().map(DbRule::getConsequent).collect(Collectors.toList()); } - - @Transactional - public void generateRulesFromMarkup() { - List markups = markupService.findAll(); - for (Markup markup1 : markups) { - for (Markup markup2 : markups) { - if (!markup1.equals(markup2)) { - List values1 = markup1.getTimeSeries().getValues(); - for (int i = 1; i < values1.size(); i++) { - List values2 = markup2.getTimeSeries().getValues(); - for (int j = 1; j < values2.size(); j++) { - ruleRepository.save(new DbRule( - getAntecedent(values1.get(i).getValue() - values1.get(i - 1).getValue()), - markup1.getTimeSeries().getTimeSeriesType(), - getAntecedent(values2.get(j).getValue() - values2.get(j - 1).getValue()), - markup2.getTimeSeries().getTimeSeriesType(), - "сгенерированный консеквент" - )); - } - } - } - } - } - } - - private AntecedentValue getAntecedent(Double diff) { - String antecedentValue; - if (diff < 0) { - antecedentValue = "спад"; - } else if (diff > 0) { - antecedentValue = "рост"; - } else { - antecedentValue = "стабильно"; - } - return antecedentValueService.getByValue(antecedentValue); - } } diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 87746b9..0d0fc58 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -22,7 +22,9 @@ @@ -31,22 +33,15 @@ value="Применить"/> - - - - - - - - - - - - - - -
Охарактеризуйте периоды вашего проекта
- +
+ Охарактеризуйте периоды вашего проекта
+
+ + + +
+ -- 2.34.1 From 07cd5abe9cca85ed5df57540e41da1f8c87d7200 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sun, 23 Apr 2023 15:09:00 +0400 Subject: [PATCH 106/122] #91 -- Fix format --- src/main/resources/templates/markup.html | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 0d0fc58..1009701 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -22,9 +22,7 @@ -- 2.34.1 From d2f898d758d9c4671a19df6dda4897ddc005b5e4 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Sun, 23 Apr 2023 23:41:44 +0400 Subject: [PATCH 107/122] #91 -- fix markup --- .../markup/model/TimeSeriesForMarkup.java | 44 ++++++++++++++++++- .../markup/service/MarkupService.java | 15 +++---- .../extractor/rule/service/DbRuleService.java | 4 +- .../ulstu/extractor/ts/model/TimeSeries.java | 5 ++- .../ts/service/TimeSeriesService.java | 2 +- src/main/resources/templates/markup.html | 9 +++- 6 files changed, 63 insertions(+), 16 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java b/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java index 9aaa903..3a48a57 100644 --- a/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java +++ b/src/main/java/ru/ulstu/extractor/markup/model/TimeSeriesForMarkup.java @@ -2,22 +2,35 @@ package ru.ulstu.extractor.markup.model; import ru.ulstu.extractor.rule.model.AntecedentValue; import ru.ulstu.extractor.ts.model.TimeSeries; +import ru.ulstu.extractor.ts.model.TimeSeriesType; +import java.util.ArrayList; import java.util.Date; import java.util.HashMap; +import java.util.List; import java.util.Map; +import java.util.stream.Collectors; public class TimeSeriesForMarkup { + //output private Map timeSeriesTendencyMap = new HashMap<>(); - private String markup; private Date dateFrom; private Date dateTo; + //input + private List timeSeriesTypes; + private List antecedentValues; + private String markup; + + public TimeSeriesForMarkup() { + } + public TimeSeriesForMarkup(TimeSeries ts1, AntecedentValue tendency1, TimeSeries ts2, AntecedentValue tendency2, Date dateFrom, Date dateTo) { this.dateFrom = dateFrom; this.dateTo = dateTo; this.timeSeriesTendencyMap.put(ts1, tendency1); this.timeSeriesTendencyMap.put(ts2, tendency2); + refresh(); } public Map getTimeSeriesTendencyMap() { @@ -43,4 +56,33 @@ public class TimeSeriesForMarkup { public String getMarkup() { return markup; } + + public void setTimeSeriesTendencyMap(Map timeSeriesTendencyMap) { + this.timeSeriesTendencyMap = timeSeriesTendencyMap; + } + + public void setMarkup(String markup) { + this.markup = markup; + } + + public List getTimeSeriesTypes() { + return timeSeriesTypes; + } + + public void setTimeSeriesTypes(List timeSeriesTypes) { + this.timeSeriesTypes = timeSeriesTypes; + } + + public List getAntecedentValues() { + return antecedentValues; + } + + public void setAntecedentValues(List antecedentValues) { + this.antecedentValues = antecedentValues; + } + + public void refresh() { + this.antecedentValues = new ArrayList<>(timeSeriesTendencyMap.values()); + this.timeSeriesTypes = timeSeriesTendencyMap.keySet().stream().map(TimeSeries::getTimeSeriesType).collect(Collectors.toList()); + } } diff --git a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java index 12ee087..5c4508d 100644 --- a/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java +++ b/src/main/java/ru/ulstu/extractor/markup/service/MarkupService.java @@ -13,8 +13,6 @@ import javax.transaction.Transactional; import java.util.ArrayList; import java.util.Comparator; import java.util.List; -import java.util.Map; -import java.util.Set; import java.util.stream.Collectors; @Service @@ -31,13 +29,11 @@ public class MarkupService { @Transactional public void generateRules(MarkupForm markupForm) { markupForm.getTimeSeriesForMarkupList().forEach(markupRow -> { - Set> timeSeriesEntry1 = markupRow.getTimeSeriesTendencyMap().entrySet(); - Set> timeSeriesEntry2 = markupRow.getTimeSeriesTendencyMap().entrySet(); - for (Map.Entry entry1 : timeSeriesEntry1) { - for (Map.Entry entry2 : timeSeriesEntry2) { - if (!entry1.equals(entry2)) { - dbRuleService.saveRule(entry1.getKey().getTimeSeriesType(), entry1.getValue(), - entry2.getKey().getTimeSeriesType(), entry2.getValue(), + for (int i = 0; i < markupRow.getTimeSeriesTypes().size(); i++) { + for (int j = i+1; j < markupRow.getTimeSeriesTypes().size(); j++) { + if (i != j) { + dbRuleService.saveRule(markupRow.getTimeSeriesTypes().get(i), markupRow.getAntecedentValues().get(i), + markupRow.getTimeSeriesTypes().get(j), markupRow.getAntecedentValues().get(j), markupRow.getMarkup()); } } @@ -83,6 +79,7 @@ public class MarkupService { } else { found.getTimeSeriesTendencyMap().put(ts1, antecedentValue1); found.getTimeSeriesTendencyMap().put(ts2, antecedentValue2); + found.refresh(); } } } diff --git a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java index 44fe3cf..537ef59 100644 --- a/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java +++ b/src/main/java/ru/ulstu/extractor/rule/service/DbRuleService.java @@ -46,9 +46,9 @@ public class DbRuleService { public void saveRule(TimeSeriesType timeSeriesType1, AntecedentValue antecedentValue1, TimeSeriesType timeSeriesType2, AntecedentValue antecedentValue2, String consequent) { - ruleRepository.save(new DbRule(antecedentValueService.getById(antecedentValue1.getId()), + ruleRepository.save(new DbRule(antecedentValueService.getByValue(antecedentValue1.getAntecedentValue()), timeSeriesType1, - antecedentValueService.getById(antecedentValue2.getId()), + antecedentValueService.getByValue(antecedentValue2.getAntecedentValue()), timeSeriesType2, consequent)); diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java index 34a2b4c..a7519ce 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeries.java @@ -16,6 +16,7 @@ import javax.persistence.ManyToOne; import javax.persistence.OneToMany; import java.util.ArrayList; import java.util.List; +import java.util.Optional; import java.util.stream.Collectors; import static ru.ulstu.extractor.util.JsonUtils.getListOfObjects; @@ -55,8 +56,10 @@ public class TimeSeries extends BaseEntity { this.branch = branch; } - public TimeSeries(JSONObject timeSeries) { + public TimeSeries(JSONObject timeSeries, Optional maybeTimeSeries) { this.name = timeSeries.getString("name"); + this.timeSeriesType = maybeTimeSeries.map(TimeSeries::getTimeSeriesType).orElse(null); + this.setId(maybeTimeSeries.map(TimeSeries::getId).orElse(null)); this.values = getListOfObjects(timeSeries.getJSONArray("values")) .stream() .map(TimeSeriesValue::new) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 2279b0d..6dba38c 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -161,7 +161,7 @@ public class TimeSeriesService { LOG.debug("Send to group time series tendencies"); return JsonUtils.getListOfObjects(response) .stream() - .map(TimeSeries::new) + .map(jsonTs -> new TimeSeries(jsonTs, tsList.stream().filter(ts -> jsonTs.get("name").equals("Model of " + ts.getName())).findAny())) .collect(Collectors.toList()); } } diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index 1009701..fa92dad 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -34,9 +34,14 @@
Охарактеризуйте периоды вашего проекта
- +
+ +
+
+ +
- +
-- 2.34.1 From 09abd351fb87bba3fbbd9f7368cd59b88d00865a Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 24 Apr 2023 10:31:31 +0400 Subject: [PATCH 108/122] #91 -- remove copyrights --- .../ulstu/extractor/author/repository/AuthorRepository.java | 5 ----- .../ru/ulstu/extractor/author/service/AuthorService.java | 5 ----- .../ulstu/extractor/branch/controller/BranchController.java | 5 ----- src/main/java/ru/ulstu/extractor/branch/model/Branch.java | 5 ----- .../ru/ulstu/extractor/branch/service/BranchService.java | 5 ----- src/main/java/ru/ulstu/extractor/commit/model/Commit.java | 5 ----- .../ulstu/extractor/commit/repository/CommitRepository.java | 5 ----- .../ru/ulstu/extractor/commit/service/CommitService.java | 5 ----- .../extractor/config/GlobalDefaultExceptionHandler.java | 5 ----- .../java/ru/ulstu/extractor/config/MvcConfiguration.java | 5 ----- src/main/java/ru/ulstu/extractor/core/Route.java | 5 ----- .../gitrepository/controler/GitFilteringController.java | 5 ----- .../gitrepository/controler/GitIndexingController.java | 5 ----- .../extractor/gitrepository/controler/RepoController.java | 5 ----- .../gitrepository/controler/RepositoryController.java | 5 ----- .../gitrepository/controler/StatisticController.java | 5 ----- .../ru/ulstu/extractor/gitrepository/model/FileChange.java | 5 ----- .../ru/ulstu/extractor/gitrepository/model/FilterForm.java | 5 ----- .../ru/ulstu/extractor/gitrepository/model/LineChange.java | 5 ----- .../extractor/gitrepository/service/FilteringService.java | 5 ----- .../extractor/heuristic/api/StructuralUnitIdentifier.java | 5 ----- .../ru/ulstu/extractor/heuristic/component/BuildTool.java | 5 ----- .../ulstu/extractor/heuristic/component/GradleBuildTool.java | 5 ----- .../heuristic/component/JavaProgrammingLanguage.java | 5 ----- .../ulstu/extractor/heuristic/component/MavenBuildTool.java | 5 ----- .../extractor/heuristic/component/ProgrammingLanguage.java | 5 ----- .../heuristic/controller/StructuralUnitController.java | 5 ----- .../ulstu/extractor/heuristic/model/BusinessLogicUnit.java | 5 ----- .../java/ru/ulstu/extractor/heuristic/model/EntityUnit.java | 5 ----- .../ru/ulstu/extractor/heuristic/model/ResourceUnit.java | 5 ----- .../ru/ulstu/extractor/heuristic/model/StructuralUnit.java | 5 ----- .../ulstu/extractor/heuristic/service/BuildToolService.java | 5 ----- .../ulstu/extractor/heuristic/service/DetectorService.java | 5 ----- .../ulstu/extractor/heuristic/service/DirectoryService.java | 5 ----- .../ru/ulstu/extractor/heuristic/service/JavaIdentifier.java | 5 ----- .../heuristic/service/ProgrammingLanguageService.java | 5 ----- .../extractor/heuristic/service/StructuralUnitService.java | 5 ----- src/main/java/ru/ulstu/extractor/util/HttpUtils.java | 5 ----- src/main/java/ru/ulstu/extractor/util/StringUtils.java | 5 ----- src/main/resources/application.properties | 4 ---- src/main/resources/messages.properties | 5 ----- src/main/resources/messages_en.properties | 5 ----- src/main/resources/messages_ru.properties | 5 ----- src/main/resources/templates/error.html | 5 ----- src/main/resources/templates/filterCommits.html | 5 ----- src/main/resources/templates/indexNewRepository.html | 5 ----- src/main/resources/templates/listBranches.html | 5 ----- src/main/resources/templates/listRepositories.html | 5 ----- src/main/resources/templates/statistic.html | 5 ----- 49 files changed, 244 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java b/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java index 2ad2ceb..5b430e9 100644 --- a/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java +++ b/src/main/java/ru/ulstu/extractor/author/repository/AuthorRepository.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.author.repository; import org.springframework.data.jpa.repository.JpaRepository; diff --git a/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java b/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java index ce80869..86da224 100644 --- a/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java +++ b/src/main/java/ru/ulstu/extractor/author/service/AuthorService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.author.service; import org.slf4j.Logger; diff --git a/src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java b/src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java index 8b79a93..81700e5 100644 --- a/src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java +++ b/src/main/java/ru/ulstu/extractor/branch/controller/BranchController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.branch.controller; import org.springframework.stereotype.Controller; diff --git a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java index 97c03df..6d63841 100644 --- a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java +++ b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.branch.model; import org.hibernate.annotations.Fetch; diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index 0684ed4..2b68c45 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.branch.service; import org.slf4j.Logger; diff --git a/src/main/java/ru/ulstu/extractor/commit/model/Commit.java b/src/main/java/ru/ulstu/extractor/commit/model/Commit.java index 5906a3f..535a6b7 100644 --- a/src/main/java/ru/ulstu/extractor/commit/model/Commit.java +++ b/src/main/java/ru/ulstu/extractor/commit/model/Commit.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.commit.model; import org.hibernate.annotations.Fetch; diff --git a/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java b/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java index 70f9888..384e8aa 100644 --- a/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java +++ b/src/main/java/ru/ulstu/extractor/commit/repository/CommitRepository.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.commit.repository; import org.springframework.data.domain.Page; diff --git a/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java index 79aaa9b..251fbc8 100644 --- a/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java +++ b/src/main/java/ru/ulstu/extractor/commit/service/CommitService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.commit.service; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java b/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java index 62f2b4d..412ddce 100644 --- a/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java +++ b/src/main/java/ru/ulstu/extractor/config/GlobalDefaultExceptionHandler.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.config; import org.slf4j.Logger; diff --git a/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java b/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java index a85543c..d430ed3 100644 --- a/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java +++ b/src/main/java/ru/ulstu/extractor/config/MvcConfiguration.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.config; import org.springframework.context.annotation.Configuration; diff --git a/src/main/java/ru/ulstu/extractor/core/Route.java b/src/main/java/ru/ulstu/extractor/core/Route.java index e1605e7..9c56182 100644 --- a/src/main/java/ru/ulstu/extractor/core/Route.java +++ b/src/main/java/ru/ulstu/extractor/core/Route.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.core; import org.springframework.stereotype.Component; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java index f083161..84cad9d 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitFilteringController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.controler; import org.springframework.data.domain.Page; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java index bcd7917..8b98a35 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/GitIndexingController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.controler; import org.eclipse.jgit.api.errors.GitAPIException; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java index 8bd5299..ebe954f 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepoController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.controler; import org.eclipse.jgit.api.errors.GitAPIException; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java index 69b643b..d27ee14 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.controler; import org.springframework.stereotype.Controller; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java index eb2024e..63e75d8 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.controler; import org.springframework.stereotype.Controller; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/FileChange.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/FileChange.java index 65d0815..374d757 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/FileChange.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/FileChange.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.model; import org.hibernate.annotations.Fetch; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java index f883c82..5574f29 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/FilterForm.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.model; import org.springframework.data.domain.Page; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java index 99d78b3..00dbdfc 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.model; import ru.ulstu.extractor.core.BaseEntity; diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java index d3b2a23..246666a 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/FilteringService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.gitrepository.service; import com.sun.istack.NotNull; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java b/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java index 1cfabcf..549e7e4 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.api; import ru.ulstu.extractor.heuristic.component.BuildTool; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/component/BuildTool.java b/src/main/java/ru/ulstu/extractor/heuristic/component/BuildTool.java index 273e46e..ea450a4 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/component/BuildTool.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/component/BuildTool.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.component; import java.io.File; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/component/GradleBuildTool.java b/src/main/java/ru/ulstu/extractor/heuristic/component/GradleBuildTool.java index 4d1f4d1..c6801d2 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/component/GradleBuildTool.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/component/GradleBuildTool.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.component; import org.springframework.stereotype.Component; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/component/JavaProgrammingLanguage.java b/src/main/java/ru/ulstu/extractor/heuristic/component/JavaProgrammingLanguage.java index 4b2a725..5952984 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/component/JavaProgrammingLanguage.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/component/JavaProgrammingLanguage.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.component; import org.springframework.stereotype.Component; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/component/MavenBuildTool.java b/src/main/java/ru/ulstu/extractor/heuristic/component/MavenBuildTool.java index 7897e1c..b73ee1d 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/component/MavenBuildTool.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/component/MavenBuildTool.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.component; import org.springframework.stereotype.Component; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/component/ProgrammingLanguage.java b/src/main/java/ru/ulstu/extractor/heuristic/component/ProgrammingLanguage.java index 5fa9c30..daa751a 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/component/ProgrammingLanguage.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/component/ProgrammingLanguage.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.component; import java.util.Locale; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java b/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java index db95ab2..a224806 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/controller/StructuralUnitController.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.controller; import org.eclipse.jgit.api.errors.GitAPIException; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/model/BusinessLogicUnit.java b/src/main/java/ru/ulstu/extractor/heuristic/model/BusinessLogicUnit.java index 9d8e132..307e9d1 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/model/BusinessLogicUnit.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/model/BusinessLogicUnit.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.model; import java.io.File; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/model/EntityUnit.java b/src/main/java/ru/ulstu/extractor/heuristic/model/EntityUnit.java index 3e99784..b6d04d4 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/model/EntityUnit.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/model/EntityUnit.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.model; import java.io.File; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/model/ResourceUnit.java b/src/main/java/ru/ulstu/extractor/heuristic/model/ResourceUnit.java index cf0e517..1c39373 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/model/ResourceUnit.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/model/ResourceUnit.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.model; import java.io.File; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/model/StructuralUnit.java b/src/main/java/ru/ulstu/extractor/heuristic/model/StructuralUnit.java index 6c4ebd8..ff2b195 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/model/StructuralUnit.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/model/StructuralUnit.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.model; import java.io.File; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/BuildToolService.java b/src/main/java/ru/ulstu/extractor/heuristic/service/BuildToolService.java index 2ce46cb..bf78f93 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/BuildToolService.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/BuildToolService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.service; import org.springframework.stereotype.Service; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/DetectorService.java b/src/main/java/ru/ulstu/extractor/heuristic/service/DetectorService.java index c989a2f..f6210d5 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/DetectorService.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/DetectorService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.service; import com.gargoylesoftware.htmlunit.WebClient; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/DirectoryService.java b/src/main/java/ru/ulstu/extractor/heuristic/service/DirectoryService.java index 344e09d..ffa8a55 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/DirectoryService.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/DirectoryService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.service; import com.sun.istack.NotNull; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java b/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java index 5ed971d..178c304 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.service; import com.github.javaparser.JavaParser; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/ProgrammingLanguageService.java b/src/main/java/ru/ulstu/extractor/heuristic/service/ProgrammingLanguageService.java index 405ae41..777f44b 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/ProgrammingLanguageService.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/ProgrammingLanguageService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.service; import org.springframework.stereotype.Service; diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/StructuralUnitService.java b/src/main/java/ru/ulstu/extractor/heuristic/service/StructuralUnitService.java index aa2e02e..6286600 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/StructuralUnitService.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/StructuralUnitService.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.heuristic.service; import org.springframework.stereotype.Service; diff --git a/src/main/java/ru/ulstu/extractor/util/HttpUtils.java b/src/main/java/ru/ulstu/extractor/util/HttpUtils.java index 5561566..86583b6 100644 --- a/src/main/java/ru/ulstu/extractor/util/HttpUtils.java +++ b/src/main/java/ru/ulstu/extractor/util/HttpUtils.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.util; import javax.servlet.http.HttpServletRequest; diff --git a/src/main/java/ru/ulstu/extractor/util/StringUtils.java b/src/main/java/ru/ulstu/extractor/util/StringUtils.java index 0c57bcb..5770308 100644 --- a/src/main/java/ru/ulstu/extractor/util/StringUtils.java +++ b/src/main/java/ru/ulstu/extractor/util/StringUtils.java @@ -1,8 +1,3 @@ -/* - * Copyright (C) 2021 Anton Romanov - All Rights Reserved - * You may use, distribute and modify this code, please write to: romanov73@gmail.com. - */ - package ru.ulstu.extractor.util; import java.nio.file.FileSystems; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 193890c..db1ecfd 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,3 @@ -# -# Copyright (C) 2021 Anton Romanov - All Rights Reserved -# You may use, distribute and modify this code, please write to: romanov73@gmail.com. -# spring.main.banner-mode=off server.port=8080 server.jetty.connection-idle-timeout=1000s diff --git a/src/main/resources/messages.properties b/src/main/resources/messages.properties index e6edf95..d4abcc1 100644 --- a/src/main/resources/messages.properties +++ b/src/main/resources/messages.properties @@ -1,8 +1,3 @@ -# -# Copyright (C) 2021 Anton Romanov - All Rights Reserved -# You may use, distribute and modify this code, please write to: romanov73@gmail.com. -# - messages.app-name=GitExtractor v0.1.0 messages.menu.home=Main messages.menu.indexed-repos=List of indexed repos diff --git a/src/main/resources/messages_en.properties b/src/main/resources/messages_en.properties index e6edf95..d4abcc1 100644 --- a/src/main/resources/messages_en.properties +++ b/src/main/resources/messages_en.properties @@ -1,8 +1,3 @@ -# -# Copyright (C) 2021 Anton Romanov - All Rights Reserved -# You may use, distribute and modify this code, please write to: romanov73@gmail.com. -# - messages.app-name=GitExtractor v0.1.0 messages.menu.home=Main messages.menu.indexed-repos=List of indexed repos diff --git a/src/main/resources/messages_ru.properties b/src/main/resources/messages_ru.properties index 30c525b..e9eadea 100644 --- a/src/main/resources/messages_ru.properties +++ b/src/main/resources/messages_ru.properties @@ -1,8 +1,3 @@ -# -# Copyright (C) 2021 Anton Romanov - All Rights Reserved -# You may use, distribute and modify this code, please write to: romanov73@gmail.com. -# - messages.app-name=GitЁxtractor v0.1.0 messages.menu.home=На главную messages.menu.indexed-repos=Список проиндексированных репозиториев diff --git a/src/main/resources/templates/error.html b/src/main/resources/templates/error.html index 47f0e37..23f7172 100644 --- a/src/main/resources/templates/error.html +++ b/src/main/resources/templates/error.html @@ -1,8 +1,3 @@ - - - - - - - Date: Mon, 24 Apr 2023 13:57:37 +0400 Subject: [PATCH 109/122] #91 -- fix time series tendency estimation --- .../java/ru/ulstu/extractor/ts/service/TimeSeriesService.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java index 6dba38c..f28a031 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/TimeSeriesService.java @@ -128,7 +128,8 @@ public class TimeSeriesService { if (ts != null && ts.getValues().size() > MIN_TIME_SERIES_LENGTH) { JSONObject response = httpService.post(TIME_SERIES_TENDENCY_URL, new JSONObject(new JsonTimeSeries(normalizeTimeSeries(ts)))); LOG.debug("Успешно отправлен на сервис сглаживания"); - if (response.has("response") && response.getString("response").equals("empty")) { + if (response.has("response") && response.getString("response").equals("empty") + || !response.has("timeSeries")) { return DEFAULT_TIME_SERIES_TENDENCY; } JSONArray jsonArray = response.getJSONObject("timeSeries").getJSONArray("values"); -- 2.34.1 From 9cc721849c6d4a59972891c3a18212e1d3000543 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 24 Apr 2023 16:09:12 +0400 Subject: [PATCH 110/122] #91 -- show assessments --- .../assessment/service/AssessmentService.java | 9 +++++-- src/main/resources/templates/assessments.html | 26 +++++++++++-------- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java index 0bae62a..488eed6 100644 --- a/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java +++ b/src/main/java/ru/ulstu/extractor/assessment/service/AssessmentService.java @@ -9,9 +9,11 @@ import ru.ulstu.extractor.rule.service.FuzzyInferenceService; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import java.util.Comparator; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; @Service public class AssessmentService { @@ -36,7 +38,10 @@ public class AssessmentService { Map variableValues = new HashMap<>(); timeSeries.forEach(ts -> variableValues.put(ts.getTimeSeriesType().name(), timeSeriesService.getLastTimeSeriesTendency(ts))); return fuzzyInferenceService.getFuzzyInference(dbRules, - antecedentValueService.getList(), - variableValues); + antecedentValueService.getList(), + variableValues) + .stream() + .sorted(Comparator.comparing(Assessment::getDegree).reversed()) + .collect(Collectors.toList()); } } diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index d88b271..98db8ac 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -12,9 +12,9 @@
Репозиторий-ветка
-
-
+
+
- -
Выбрерите ветку для получения оценки репозитория
-
Состояние репозитория по нескольким правилам описывается следующими выражениями:
-
+
Состояние репозитория описывается следующими выражениями:
+
+ вследствие тенденции '' показателя '' и тенденции '' показателя ''; - + +
-- 2.34.1 From 14e0266d0bb0b1c447a7ae2fbf1e29fd979d90f8 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Apr 2023 12:32:59 +0400 Subject: [PATCH 111/122] #91 -- fix api call --- .../extractor/gitrepository/service/IndexService.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java index 9b2cca7..b1841c3 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/IndexService.java @@ -13,7 +13,6 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.gitrepository.model.GitRepository; import ru.ulstu.extractor.ts.creator.db.DBTimeSeriesCreator; -import ru.ulstu.extractor.ts.service.ScheduledTimeSeriesService; import java.io.IOException; import java.util.Collections; @@ -26,16 +25,13 @@ public class IndexService { private final GitRepositoryService gitRepositoryService; private final BranchService branchService; private final List timeSeriesCreators; - private final ScheduledTimeSeriesService scheduledTimeSeriesService; public IndexService(GitRepositoryService gitRepositoryService, BranchService branchService, - List timeSeriesCreators, - ScheduledTimeSeriesService scheduledTimeSeriesService) { + List timeSeriesCreators) { this.gitRepositoryService = gitRepositoryService; this.branchService = branchService; this.timeSeriesCreators = timeSeriesCreators; - this.scheduledTimeSeriesService = scheduledTimeSeriesService; } @Transactional @@ -73,7 +69,6 @@ public class IndexService { branch = branchService.findByBranchId(branch.getId()).orElseThrow(() -> new RuntimeException("Branch not found by id")); final Branch branchForSave = branchService.updateStatus(branch, IndexingStatus.FINISHED); timeSeriesCreators.forEach(tsCreator -> tsCreator.addTimeSeries(branchForSave)); - scheduledTimeSeriesService.addTimeSeriesPoints(); LOG.debug("Complete indexing {} branch", branch.getName()); } -- 2.34.1 From 6dbf60cb570b98346402efffdeab532ce518335f Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Apr 2023 15:53:25 +0400 Subject: [PATCH 112/122] #91 -- add accordion --- src/main/resources/templates/assessments.html | 63 ++++++++++++++++--- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index 98db8ac..d9a3721 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -35,17 +35,60 @@
-
Состояние репозитория описывается следующими выражениями:
-
- - - вследствие тенденции '' показателя '' - и тенденции '' показателя ''; - -
+
На основе прогноза тенденций показателей репозитория отмечаются следующие характеристики:
+
+
+
+

+ +

+
+ +
+
+ вследствие тенденции '' показателя + '' + и тенденции '' показателя ''; + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + +
Нет результатов
-- 2.34.1 From 23b41ba2832a3431273f7715db358c0444cd1c33 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Tue, 25 Apr 2023 16:15:34 +0400 Subject: [PATCH 113/122] #91 -- fix markup UI --- src/main/resources/templates/markup.html | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/resources/templates/markup.html b/src/main/resources/templates/markup.html index fa92dad..41734fb 100644 --- a/src/main/resources/templates/markup.html +++ b/src/main/resources/templates/markup.html @@ -31,20 +31,23 @@ value="Применить"/>
-
+
Охарактеризуйте периоды вашего проекта
-
+
- +
- +
- +
+ class="btn btn-outline-success m-5" value="Сгенерировать правила"/>
-- 2.34.1 From 422864e489ba75a17019e9dc713658c3b12335fa Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 8 May 2023 00:52:35 +0400 Subject: [PATCH 114/122] #91 -- fix ts classes --- .../gitrepository/model/LineChange.java | 4 +- .../service/GitRepositoryService.java | 67 ++++++------------- .../api/StructuralUnitIdentifier.java | 2 + .../heuristic/service/JavaIdentifier.java | 22 ++++-- .../extractor/ts/creator/db/ClassTS.java | 52 ++++++++++---- .../extractor/ts/model/TimeSeriesType.java | 2 +- 6 files changed, 82 insertions(+), 67 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java index 00dbdfc..317db4f 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/LineChange.java @@ -9,8 +9,8 @@ public class LineChange extends BaseEntity { private Boolean added = false; private Boolean removed = false; - private String lineFrom; - private String lineTo; + private String lineFrom = ""; + private String lineTo = ""; public LineChange() { diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java index e400670..391a9a8 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/service/GitRepositoryService.java @@ -377,58 +377,33 @@ public class GitRepositoryService { } private FileChange getChange(FileChange fileChange, List fileContent) { - int addedLine = 0; - int removedLine = 0; - StringBuilder builder = new StringBuilder(); - boolean isRemoved = false; - boolean isAdded = false; - for (String line : fileContent) { + int i = 0; + int added = 0; + int removed = 0; + while (i < fileContent.size()) { LineChange lineChange = new LineChange(); - if (line.startsWith("-")) { - isRemoved = true; - if (isAdded) { - isAdded = false; - lineChange = setAdded(lineChange, builder); - builder.setLength(0); - } - builder.append(line).append("\n"); - removedLine++; - } else if (line.startsWith("+")) { - isAdded = true; - if (isRemoved) { - isRemoved = false; - lineChange = setRemoved(lineChange, builder); - builder.setLength(0); - } - builder.append(line).append("\n"); - addedLine++; - } else { - if (isRemoved) { - lineChange = setRemoved(lineChange, builder); - builder.setLength(0); - } else if (isAdded) { - lineChange = setAdded(lineChange, builder); - builder.setLength(0); - } + while ((i < fileContent.size()) && fileContent.get(i).startsWith("-")) { + lineChange.setRemoved(true); + lineChange.setLineFrom(lineChange.getLineFrom() + "\n" + fileContent.get(i).replaceFirst("\\-", "")); + removed++; + i++; } + while ((i < fileContent.size()) && fileContent.get(i).startsWith("+")) { + lineChange.setAdded(true); + lineChange.setLineTo(lineChange.getLineTo() + "\n" + fileContent.get(i).replaceFirst("\\+", "")); + added++; + i++; + } + if (!lineChange.getLineTo().isEmpty() || !lineChange.getLineFrom().isEmpty()) { + fileChange.getLineChanges().add(lineChange); + } + i++; } - fileChange.setRemoved(removedLine == fileContent.size() - 1); - fileChange.setAdded(addedLine == fileContent.size() - 1); + fileChange.setRemoved(removed == fileContent.size()); + fileChange.setAdded(added == fileContent.size()); return fileChange; } - private LineChange setRemoved(LineChange lineChange, StringBuilder builder) { - lineChange.setLineFrom(builder.toString()); - lineChange.setRemoved(true); - return lineChange; - } - - private LineChange setAdded(LineChange lineChange, StringBuilder builder) { - lineChange.setLineTo(builder.toString()); - lineChange.setAdded(true); - return lineChange; - } - public Page findAll(Pageable pageable) { return gitRepositoryRepository.findAll(pageable); } diff --git a/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java b/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java index 549e7e4..c65fed7 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/api/StructuralUnitIdentifier.java @@ -107,4 +107,6 @@ public abstract class StructuralUnitIdentifier { public abstract boolean isResourceClass(String sourceCode); protected abstract boolean isResourceClass(File file); + + public abstract List getClasses(String sourceCode); } diff --git a/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java b/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java index 178c304..d4247f0 100644 --- a/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java +++ b/src/main/java/ru/ulstu/extractor/heuristic/service/JavaIdentifier.java @@ -6,6 +6,7 @@ import com.github.javaparser.ast.CompilationUnit; import com.github.javaparser.ast.body.FieldDeclaration; import com.github.javaparser.ast.body.MethodDeclaration; import com.github.javaparser.ast.body.TypeDeclaration; +import com.github.javaparser.ast.nodeTypes.NodeWithSimpleName; import org.springframework.stereotype.Service; import ru.ulstu.extractor.heuristic.api.StructuralUnitIdentifier; import ru.ulstu.extractor.heuristic.component.BuildTool; @@ -19,6 +20,7 @@ import ru.ulstu.extractor.util.StringUtils; import java.io.File; import java.io.IOException; import java.nio.file.Files; +import java.util.ArrayList; import java.util.List; import java.util.Optional; import java.util.stream.Collectors; @@ -52,6 +54,9 @@ public class JavaIdentifier extends StructuralUnitIdentifier { } public boolean canAppliedToCode(String sourceCode) { + if (sourceCode == null || sourceCode.isEmpty()) { + return false; + } return getMainProgrammingLanguage(sourceCode).orElse(null) instanceof JavaProgrammingLanguage; } @@ -169,12 +174,7 @@ public class JavaIdentifier extends StructuralUnitIdentifier { } private boolean sourceCodeContainsClass(String sourceCode) { - JavaParser parser = new JavaParser(); - ParseResult parseResult = parser.parse(sourceCode); - if (parseResult.getResult().isPresent() && parseResult.getResult().get().findCompilationUnit().isPresent()) { - return parseResult.getResult().get().getTypes().stream().findAny().isPresent(); - } - return false; + return getClasses(sourceCode).size() > 0; } @Override @@ -243,4 +243,14 @@ public class JavaIdentifier extends StructuralUnitIdentifier { } return false; } + + @Override + public List getClasses(String sourceCode) { + JavaParser parser = new JavaParser(); + ParseResult parseResult = parser.parse(sourceCode); + if (parseResult.getResult().isPresent() && parseResult.getResult().get().findCompilationUnit().isPresent()) { + return parseResult.getResult().get().getTypes().stream().map(NodeWithSimpleName::getNameAsString).collect(Collectors.toList()); + } + return new ArrayList<>(); + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java b/src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java index 904238c..446f1d7 100644 --- a/src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java +++ b/src/main/java/ru/ulstu/extractor/ts/creator/db/ClassTS.java @@ -3,36 +3,64 @@ package ru.ulstu.extractor.ts.creator.db; import org.springframework.stereotype.Component; import ru.ulstu.extractor.branch.model.Branch; import ru.ulstu.extractor.branch.service.BranchService; +import ru.ulstu.extractor.commit.model.Commit; +import ru.ulstu.extractor.commit.service.CommitService; +import ru.ulstu.extractor.gitrepository.model.FileChange; +import ru.ulstu.extractor.gitrepository.model.LineChange; +import ru.ulstu.extractor.heuristic.api.StructuralUnitIdentifier; import ru.ulstu.extractor.ts.model.TimeSeries; import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; -import ru.ulstu.extractor.ts.util.Dummy; -import java.util.Collections; +import java.util.ArrayList; import java.util.List; @Component public class ClassTS extends DBTimeSeriesCreator { private final TimeSeriesService timeSeriesService; + private final CommitService commitService; private final BranchService branchService; + private final StructuralUnitIdentifier structuralUnitIdentifier; public ClassTS(TimeSeriesService timeSeriesService, - BranchService branchService) { + CommitService commitService, + BranchService branchService, + StructuralUnitIdentifier structuralUnitIdentifier) { this.timeSeriesService = timeSeriesService; + this.commitService = commitService; this.branchService = branchService; + this.structuralUnitIdentifier = structuralUnitIdentifier; } @Override public List getTimeSeries(Branch branch) { - return Collections.singletonList( - new TimeSeries( - String.format("%s %s %s", - branch.getGitRepository().getName(), - branch.getName(), - getTimeSeriesType().getDescription()), - branchService.findByRepositoryAndName(branch.getGitRepository(), branch.getName()), - getTimeSeriesType(), - Dummy.getDefaultTimeSeries())); + List timeSeriesResult = new ArrayList<>(); + List commits = new ArrayList<>(commitService.findByRepositoryIdAndName(branch.getGitRepository().getId(), + branch.getName())); + TimeSeries timeSeries = new TimeSeries( + String.format("%s %s %s", + branch.getGitRepository().getName(), + branch.getName(), + getTimeSeriesType().getDescription()), + branchService.findByRepositoryAndName(branch.getGitRepository(), + branch.getName()), + getTimeSeriesType()); + for (Commit commit : commits) { + double value = 0; + for (FileChange fileChange : commit.getFileChanges()) { + for (LineChange lineChange : fileChange.getLineChanges()) { + if (lineChange.getLineTo() != null && !lineChange.getLineTo().isEmpty()) { + value += structuralUnitIdentifier.getClasses(lineChange.getLineTo()).size(); + } + } + } + timeSeries.getValues().add(new TimeSeriesValue(commit.getDate(), value)); + } + if (!timeSeries.getValues().isEmpty()) { + timeSeriesResult.add(timeSeries); + } + return timeSeriesResult; } @Override diff --git a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java index 27487b7..6b422e6 100644 --- a/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java +++ b/src/main/java/ru/ulstu/extractor/ts/model/TimeSeriesType.java @@ -4,7 +4,7 @@ public enum TimeSeriesType { COMMITS("Временной ряд коммитов"), AUTHOR_COMMITS("Временной ряд коммитов авторов"), BRANCHES("Временной ряд веток"), - CLASSES("Временной ряд классов"), + CLASSES("Временной ряд измененных классов"), DEPENDENCIES("Временной ряд зависимостей"), ENTITIES("Временной ряд сущностей"), FILES("Временной файлов"), -- 2.34.1 From 28697b68aa4f7f52849753cd3a1239a9cec05b3b Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 12 May 2023 11:32:23 +0400 Subject: [PATCH 115/122] test ts add --- .../extractor/ts/service/ScheduledTimeSeriesService.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java index 501184a..fb41395 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java @@ -22,13 +22,13 @@ public class ScheduledTimeSeriesService { this.branchService = branchService; } - @Scheduled(cron = "0 0 8 * * *", zone = "Europe/Samara") + @Scheduled(cron = "0 */5 * * * *", zone = "Europe/Samara") public void addTimeSeriesPoints() { - log.debug("Старт добавления новых точек временного ряда"); + log.info("Старт добавления новых точек временного ряда"); List branches = branchService.findAll(); branches.forEach(branch -> { scheduledTimeSeriesCreators.forEach(creator -> creator.addTimeSeriesValue(branch)); }); - log.debug("Завершение добавления новых точек временного ряда"); + log.info("Завершение добавления новых точек временного ряда"); } } -- 2.34.1 From 6377e187794d2b5728bb0981e330323f141fa2c1 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 12 May 2023 11:54:03 +0400 Subject: [PATCH 116/122] test ts add --- .../ulstu/extractor/ts/service/ScheduledTimeSeriesService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java index fb41395..d3fe476 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java @@ -22,7 +22,7 @@ public class ScheduledTimeSeriesService { this.branchService = branchService; } - @Scheduled(cron = "0 */5 * * * *", zone = "Europe/Samara") + @Scheduled(cron = "0 0 8 * * *") public void addTimeSeriesPoints() { log.info("Старт добавления новых точек временного ряда"); List branches = branchService.findAll(); -- 2.34.1 From c5cb94f009e84e37e7259db69c99fe42e2ebc6e6 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 9 Jun 2023 06:39:27 +0400 Subject: [PATCH 117/122] wrong action --- .../java/ru/ulstu/extractor/branch/service/BranchService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java index 2b68c45..e8e147d 100644 --- a/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java +++ b/src/main/java/ru/ulstu/extractor/branch/service/BranchService.java @@ -90,7 +90,7 @@ public class BranchService { public List findAllValid() { return findAll() .stream() - .filter(timeSeriesService::isBranchContainsAllTimeSeries) + //.filter(timeSeriesService::isBranchContainsAllTimeSeries) .collect(Collectors.toList()); } } -- 2.34.1 From 5a97d107c39a884a353820e69849d35b28a322b3 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 10 May 2024 11:43:40 +0400 Subject: [PATCH 118/122] #96 -- Add db records for generated time series --- .../ru/ulstu/extractor/branch/model/Branch.java | 10 ++-------- .../controler/RepositoryController.java | 13 +++++++++++-- .../controler/StatisticController.java | 5 ++++- .../gitrepository/model/GitRepository.java | 2 ++ .../controller/TimeSeriesMarkupController.java | 15 ++++++++++++--- .../ts/service/ScheduledTimeSeriesService.java | 8 +++++++- .../db/changelog-20230302_210000-schema.xml | 11 +++++++++++ 7 files changed, 49 insertions(+), 15 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java index 6d63841..7c428d0 100644 --- a/src/main/java/ru/ulstu/extractor/branch/model/Branch.java +++ b/src/main/java/ru/ulstu/extractor/branch/model/Branch.java @@ -6,14 +6,7 @@ import ru.ulstu.extractor.commit.model.Commit; import ru.ulstu.extractor.core.BaseEntity; import ru.ulstu.extractor.gitrepository.model.GitRepository; -import javax.persistence.CascadeType; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.FetchType; -import javax.persistence.JoinColumn; -import javax.persistence.ManyToOne; -import javax.persistence.OneToMany; +import javax.persistence.*; import java.util.ArrayList; import java.util.List; @@ -21,6 +14,7 @@ import static ru.ulstu.extractor.branch.model.IndexingStatus.EMPTY; @Entity public class Branch extends BaseEntity { + public static Integer GENERATED_BRANCH_ID = 1; private String name; @ManyToOne diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java index d27ee14..cefbe4d 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/RepositoryController.java @@ -7,8 +7,11 @@ import org.springframework.web.bind.annotation.RequestParam; import ru.ulstu.extractor.gitrepository.repository.GitRepositoryRepository; import springfox.documentation.annotations.ApiIgnore; +import java.util.stream.Collectors; + import static ru.ulstu.extractor.core.Route.DELETE_INDEXED_REPOSITORY; import static ru.ulstu.extractor.core.Route.LIST_INDEXED_REPOSITORIES; +import static ru.ulstu.extractor.gitrepository.model.GitRepository.GENERATED_REPOSITORY_ID; @Controller @ApiIgnore @@ -21,7 +24,10 @@ public class RepositoryController { @GetMapping(LIST_INDEXED_REPOSITORIES) public String indexNewRepo(Model model) { - model.addAttribute("repositories", gitRepositoryRepository.findAll()); + model.addAttribute("repositories", gitRepositoryRepository.findAll() + .stream() + .filter(r -> !r.getId().equals(GENERATED_REPOSITORY_ID)) + .collect(Collectors.toList())); return LIST_INDEXED_REPOSITORIES; } @@ -29,7 +35,10 @@ public class RepositoryController { public String deleteRepo(Model model, @RequestParam Integer id) { gitRepositoryRepository.deleteById(id); - model.addAttribute("repositories", gitRepositoryRepository.findAll()); + model.addAttribute("repositories", gitRepositoryRepository.findAll() + .stream() + .filter(r -> !r.getId().equals(GENERATED_REPOSITORY_ID)) + .collect(Collectors.toList())); return "redirect:/" + LIST_INDEXED_REPOSITORIES; } } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java b/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java index 63e75d8..766d3a7 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/controler/StatisticController.java @@ -14,6 +14,7 @@ import java.util.List; import java.util.Optional; import java.util.stream.Collectors; +import static ru.ulstu.extractor.branch.model.Branch.GENERATED_BRANCH_ID; import static ru.ulstu.extractor.core.Route.STATISTIC; @Controller @@ -60,7 +61,9 @@ public class StatisticController { filterForm.setEntity(entity.orElse(null)); model.addAttribute("filterForm", filterForm); model.addAttribute("entityPresent", filteringService.getEntityPresent()); - model.addAttribute("branches", branchService.findAll()); + model.addAttribute("branches", branchService.findAll().stream() + .filter(r -> !r.getId().equals(GENERATED_BRANCH_ID)) + .collect(Collectors.toList())); model.addAttribute("authors", filteringService.getRepositoryAuthors(branchId.orElse(null))); return STATISTIC; } diff --git a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java index f4707c7..8017241 100644 --- a/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java +++ b/src/main/java/ru/ulstu/extractor/gitrepository/model/GitRepository.java @@ -7,6 +7,8 @@ import javax.persistence.Entity; @Entity public class GitRepository extends BaseEntity { + + public static Integer GENERATED_REPOSITORY_ID = 1; private String url; private String repositoryId; diff --git a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java index 3aef93a..ad67a0d 100644 --- a/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java +++ b/src/main/java/ru/ulstu/extractor/markup/controller/TimeSeriesMarkupController.java @@ -14,6 +14,9 @@ import ru.ulstu.extractor.ts.service.TimeSeriesService; import springfox.documentation.annotations.ApiIgnore; import java.util.List; +import java.util.stream.Collectors; + +import static ru.ulstu.extractor.branch.model.Branch.GENERATED_BRANCH_ID; @Controller @ApiIgnore @@ -32,14 +35,18 @@ public class TimeSeriesMarkupController { @GetMapping("time-series-markup") public String markupTs(Model model) { - model.addAttribute("branches", branchService.findAllValid()); + model.addAttribute("branches", branchService.findAllValid().stream() + .filter(r -> !r.getId().equals(GENERATED_BRANCH_ID)) + .collect(Collectors.toList())); model.addAttribute("markupForm", new MarkupForm()); return "markup"; } @PostMapping("time-series-markup") public String filter(Model model, @ModelAttribute MarkupForm markupForm) { - model.addAttribute("branches", branchService.findAllValid()); + model.addAttribute("branches", branchService.findAllValid().stream() + .filter(r -> !r.getId().equals(GENERATED_BRANCH_ID)) + .collect(Collectors.toList())); if (markupForm != null && markupForm.getBranchId() != null) { List tss = markupService.getTimeSeriesForMarkup( timeSeriesService.getGroupedTendencies( @@ -56,7 +63,9 @@ public class TimeSeriesMarkupController { @PostMapping(Route.ADD_MARKUP) public String addMarkups(Model model, @ModelAttribute MarkupForm markupForm) { - model.addAttribute("branches", branchService.findAllValid()); + model.addAttribute("branches", branchService.findAllValid().stream() + .filter(r -> !r.getId().equals(GENERATED_BRANCH_ID)) + .collect(Collectors.toList())); if (markupForm != null && markupForm.getBranchId() != null) { List tss = markupService.getTimeSeriesForMarkup( timeSeriesService.getGroupedTendencies( diff --git a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java index d3fe476..5b961f9 100644 --- a/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java +++ b/src/main/java/ru/ulstu/extractor/ts/service/ScheduledTimeSeriesService.java @@ -9,6 +9,9 @@ import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.ts.creator.scheduled.ScheduledTimeSeriesCreator; import java.util.List; +import java.util.stream.Collectors; + +import static ru.ulstu.extractor.branch.model.Branch.GENERATED_BRANCH_ID; @Service public class ScheduledTimeSeriesService { @@ -25,7 +28,10 @@ public class ScheduledTimeSeriesService { @Scheduled(cron = "0 0 8 * * *") public void addTimeSeriesPoints() { log.info("Старт добавления новых точек временного ряда"); - List branches = branchService.findAll(); + List branches = branchService.findAll() + .stream() + .filter(b -> !b.getId().equals(GENERATED_BRANCH_ID)) + .collect(Collectors.toList()); branches.forEach(branch -> { scheduledTimeSeriesCreators.forEach(creator -> creator.addTimeSeriesValue(branch)); }); diff --git a/src/main/resources/db/changelog-20230302_210000-schema.xml b/src/main/resources/db/changelog-20230302_210000-schema.xml index 670658e..135ac55 100644 --- a/src/main/resources/db/changelog-20230302_210000-schema.xml +++ b/src/main/resources/db/changelog-20230302_210000-schema.xml @@ -46,4 +46,15 @@ + + + 1 + Генерированный репозиторий + + + 1 + Сгенерированные показатели + 1 + + \ No newline at end of file -- 2.34.1 From e5d5d7312be7be49aca2f437aeb5583baad595c8 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 10 May 2024 12:11:17 +0400 Subject: [PATCH 119/122] #96 -- Add generation page --- .../java/ru/ulstu/extractor/core/Route.java | 6 +++ .../controller/GenerationController.java | 35 +++++++++++++ .../generation/model/GenerationForm.java | 50 +++++++++++++++++++ .../generation/service/GenerationService.java | 18 +++++++ src/main/resources/templates/assessments.html | 2 +- src/main/resources/templates/default.html | 3 ++ src/main/resources/templates/generation.html | 50 +++++++++++++++++++ 7 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 src/main/java/ru/ulstu/extractor/generation/controller/GenerationController.java create mode 100644 src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java create mode 100644 src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java create mode 100644 src/main/resources/templates/generation.html diff --git a/src/main/java/ru/ulstu/extractor/core/Route.java b/src/main/java/ru/ulstu/extractor/core/Route.java index 9c56182..0b2fe3f 100644 --- a/src/main/java/ru/ulstu/extractor/core/Route.java +++ b/src/main/java/ru/ulstu/extractor/core/Route.java @@ -18,6 +18,8 @@ public class Route { public static final String DELETE_RULE = "deleteRule"; public static final String ADD_MARKUP = "addMarkup"; + public static final String GENERATION = "generation"; + public static String getLIST_INDEXED_REPOSITORIES() { return LIST_INDEXED_REPOSITORIES; } @@ -45,4 +47,8 @@ public class Route { public static String getADD_MARKUP() { return ADD_MARKUP; } + + public static String getGENERATION() { + return GENERATION; + } } diff --git a/src/main/java/ru/ulstu/extractor/generation/controller/GenerationController.java b/src/main/java/ru/ulstu/extractor/generation/controller/GenerationController.java new file mode 100644 index 0000000..fcb9dc4 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/generation/controller/GenerationController.java @@ -0,0 +1,35 @@ +package ru.ulstu.extractor.generation.controller; + +import org.springframework.stereotype.Controller; +import org.springframework.ui.Model; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +import org.springframework.web.bind.annotation.PostMapping; +import ru.ulstu.extractor.generation.model.GenerationForm; +import ru.ulstu.extractor.generation.service.GenerationService; +import springfox.documentation.annotations.ApiIgnore; + +import static ru.ulstu.extractor.core.Route.GENERATION; + +@Controller +@ApiIgnore +public class GenerationController { + private final GenerationService generationService; + + public GenerationController(GenerationService generationService) { + this.generationService = generationService; + } + + @GetMapping(GENERATION) + public String getGenerationsPage(Model model) { + model.addAttribute("generationForm", new GenerationForm()); + return GENERATION; + } + + @PostMapping(GENERATION) + public String setGenerationParams(Model model, @ModelAttribute GenerationForm generationForm) { + model.addAttribute("generationForm", generationForm); + generationService.generate(generationForm); + return GENERATION; + } +} diff --git a/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java b/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java new file mode 100644 index 0000000..99b19f3 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java @@ -0,0 +1,50 @@ +package ru.ulstu.extractor.generation.model; + +public class GenerationForm { + private int tsLength; + private int min; + private int max; + private int base; + + public int getTsLength() { + return tsLength; + } + + public void setTsLength(int tsLength) { + this.tsLength = tsLength; + } + + public int getMin() { + return min; + } + + public void setMin(int min) { + this.min = min; + } + + public int getMax() { + return max; + } + + public void setMax(int max) { + this.max = max; + } + + public int getBase() { + return base; + } + + public void setBase(int base) { + this.base = base; + } + + @Override + public String toString() { + return "GenerationForm{" + + "tsLength=" + tsLength + + ", min=" + min + + ", max=" + max + + ", base=" + base + + '}'; + } +} diff --git a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java new file mode 100644 index 0000000..0a50824 --- /dev/null +++ b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java @@ -0,0 +1,18 @@ +package ru.ulstu.extractor.generation.service; + +import org.springframework.stereotype.Service; +import ru.ulstu.extractor.generation.model.GenerationForm; +import ru.ulstu.extractor.ts.service.TimeSeriesService; + +@Service +public class GenerationService { + private final TimeSeriesService timeSeriesService; + + public GenerationService(TimeSeriesService timeSeriesService) { + this.timeSeriesService = timeSeriesService; + } + + public void generate(GenerationForm generationForm) { + System.out.print(generationForm); + } +} diff --git a/src/main/resources/templates/assessments.html b/src/main/resources/templates/assessments.html index d9a3721..aae7805 100644 --- a/src/main/resources/templates/assessments.html +++ b/src/main/resources/templates/assessments.html @@ -3,7 +3,7 @@ xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout" xmlns:th="http://www.w3.org/1999/xhtml" layout:decorate="~{default}"> - Простая обработка формы на Spring MVC + Оценка репозиториев
diff --git a/src/main/resources/templates/default.html b/src/main/resources/templates/default.html index aa66144..7303d7e 100644 --- a/src/main/resources/templates/default.html +++ b/src/main/resources/templates/default.html @@ -38,6 +38,9 @@ + diff --git a/src/main/resources/templates/generation.html b/src/main/resources/templates/generation.html new file mode 100644 index 0000000..4174f8b --- /dev/null +++ b/src/main/resources/templates/generation.html @@ -0,0 +1,50 @@ + + + + Генерация + + +
+
+
+
+ Длина временных рядов +
+
+ +
+
+
+
+ Минимум +
+
+ +
+
+
+
+ Максимум +
+
+ +
+
+
+
+ Основное значение +
+
+ +
+
+
+
+ +
+
+
+
+ -- 2.34.1 From eb37dd0c8ce5c89a5a5c68a6a7cf74b6c4fa352b Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Fri, 10 May 2024 23:12:22 +0400 Subject: [PATCH 120/122] #96 -- Add time series generation --- .../generation/model/GenerationForm.java | 24 +++++++++++------ .../generation/service/GenerationService.java | 26 +++++++++++++++++-- .../ru/ulstu/extractor/ts/util/DateUtils.java | 9 ++++++- .../ru/ulstu/extractor/ts/util/Dummy.java | 10 +++---- src/main/resources/templates/generation.html | 16 ++++++++++++ 5 files changed, 69 insertions(+), 16 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java b/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java index 99b19f3..8571d6a 100644 --- a/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java +++ b/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java @@ -5,6 +5,8 @@ public class GenerationForm { private int min; private int max; private int base; + private int baseTendency; + private int tendencyDynamic; public int getTsLength() { return tsLength; @@ -38,13 +40,19 @@ public class GenerationForm { this.base = base; } - @Override - public String toString() { - return "GenerationForm{" + - "tsLength=" + tsLength + - ", min=" + min + - ", max=" + max + - ", base=" + base + - '}'; + public int getBaseTendency() { + return baseTendency; + } + + public void setBaseTendency(int baseTendency) { + this.baseTendency = baseTendency; + } + + public int getTendencyDynamic() { + return tendencyDynamic; + } + + public void setTendencyDynamic(int tendencyDynamic) { + this.tendencyDynamic = tendencyDynamic; } } diff --git a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java index 0a50824..43eb10d 100644 --- a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java +++ b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java @@ -1,18 +1,40 @@ package ru.ulstu.extractor.generation.service; import org.springframework.stereotype.Service; +import ru.ulstu.extractor.branch.model.Branch; +import ru.ulstu.extractor.branch.service.BranchService; import ru.ulstu.extractor.generation.model.GenerationForm; +import ru.ulstu.extractor.ts.model.TimeSeriesType; +import ru.ulstu.extractor.ts.model.TimeSeriesValue; import ru.ulstu.extractor.ts.service.TimeSeriesService; +import ru.ulstu.extractor.ts.util.DateUtils; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; @Service public class GenerationService { private final TimeSeriesService timeSeriesService; + private final BranchService branchService; - public GenerationService(TimeSeriesService timeSeriesService) { + public GenerationService(TimeSeriesService timeSeriesService, + BranchService branchService) { this.timeSeriesService = timeSeriesService; + this.branchService = branchService; } public void generate(GenerationForm generationForm) { - System.out.print(generationForm); + Branch branch = branchService.findByBranchId(Branch.GENERATED_BRANCH_ID).orElseThrow(); + Date startDate = DateUtils.addDays(-generationForm.getTsLength()); + Arrays.stream(TimeSeriesType.values()).forEach(tsType -> { + List tsValues = new ArrayList<>(); + for (int i = 0; i < generationForm.getTsLength(); i++) { + tsValues.add(new TimeSeriesValue(DateUtils.addDays(startDate, i), (double) i)); + } + final String tsName = "Генерированный " + tsType.getDescription(); + timeSeriesService.save(tsName, branch, tsType, tsValues); + }); } } diff --git a/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java b/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java index 773e9e0..d998853 100644 --- a/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java +++ b/src/main/java/ru/ulstu/extractor/ts/util/DateUtils.java @@ -5,9 +5,16 @@ import java.util.Date; import java.util.GregorianCalendar; public class DateUtils { - public static Date addMonths(int amount) { + public static Date addDays(int amount) { Calendar c = GregorianCalendar.getInstance(); c.add(Calendar.DAY_OF_MONTH, amount); return c.getTime(); } + + public static Date addDays(Date startDate, int amount) { + Calendar c = GregorianCalendar.getInstance(); + c.setTime(startDate); + c.add(Calendar.DAY_OF_MONTH, amount); + return c.getTime(); + } } diff --git a/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java b/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java index 61b0389..59fcd52 100644 --- a/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java +++ b/src/main/java/ru/ulstu/extractor/ts/util/Dummy.java @@ -6,10 +6,10 @@ import java.util.List; public class Dummy { public static List getDefaultTimeSeries (){ - return List.of(new TimeSeriesValue(DateUtils.addMonths(-5), 1.0), - new TimeSeriesValue(DateUtils.addMonths(-4), 2.0), - new TimeSeriesValue(DateUtils.addMonths(-3), 3.0), - new TimeSeriesValue(DateUtils.addMonths(-2), 4.0), - new TimeSeriesValue(DateUtils.addMonths(-1), 5.0)); + return List.of(new TimeSeriesValue(DateUtils.addDays(-5), 1.0), + new TimeSeriesValue(DateUtils.addDays(-4), 2.0), + new TimeSeriesValue(DateUtils.addDays(-3), 3.0), + new TimeSeriesValue(DateUtils.addDays(-2), 4.0), + new TimeSeriesValue(DateUtils.addDays(-1), 5.0)); } } diff --git a/src/main/resources/templates/generation.html b/src/main/resources/templates/generation.html index 4174f8b..f21f39d 100644 --- a/src/main/resources/templates/generation.html +++ b/src/main/resources/templates/generation.html @@ -40,6 +40,22 @@
+
+
+ Основная тенденция +
+
+ +
+
+
+
+ Динамика тенденции +
+
+ +
+
-- 2.34.1 From 8bcdff3ba15e6a810e2c9b67bc64368764bebd22 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 13 May 2024 00:07:41 +0400 Subject: [PATCH 121/122] #96 -- Fix time series generation --- .../generation/service/GenerationService.java | 28 ++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java index 43eb10d..0b168cd 100644 --- a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java +++ b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java @@ -18,6 +18,7 @@ import java.util.List; public class GenerationService { private final TimeSeriesService timeSeriesService; private final BranchService branchService; + private final static double RANDOM_WEIGHT = 0.1; public GenerationService(TimeSeriesService timeSeriesService, BranchService branchService) { @@ -31,10 +32,35 @@ public class GenerationService { Arrays.stream(TimeSeriesType.values()).forEach(tsType -> { List tsValues = new ArrayList<>(); for (int i = 0; i < generationForm.getTsLength(); i++) { - tsValues.add(new TimeSeriesValue(DateUtils.addDays(startDate, i), (double) i)); + tsValues.add(new TimeSeriesValue(DateUtils.addDays(startDate, i), + getNextAdditiveValue(tsValues, generationForm))); } final String tsName = "Генерированный " + tsType.getDescription(); timeSeriesService.save(tsName, branch, tsType, tsValues); }); } + + private double getNextAdditiveValue(List timeSeriesValues, GenerationForm generationForm) { + double newValue; + int maxTryCount = 10; + do { + if (timeSeriesValues.isEmpty()) { + if (generationForm.getBaseTendency() > 0) { + newValue = 0.1 * Math.random() * (generationForm.getMax() - generationForm.getMin()); + } else { + newValue = generationForm.getMax() - 0.1 * Math.random() * (generationForm.getMax() - generationForm.getMin()); + } + } else { + newValue = timeSeriesValues.get(timeSeriesValues.size() - 1).getValue() + + Math.random() * generationForm.getBaseTendency() + * ((generationForm.getMax() - generationForm.getMin()) / generationForm.getTsLength()) + * generationForm.getTendencyDynamic() + + RANDOM_WEIGHT * (Math.random() - 0.5) * (generationForm.getMax() - generationForm.getMin()); + } + maxTryCount--; + } while (((newValue <= generationForm.getMin()) + || (newValue >= generationForm.getMax())) + && (maxTryCount > 0)); + return newValue; + } } -- 2.34.1 From 1192201a69cfd121d47197fd903b6674695bec71 Mon Sep 17 00:00:00 2001 From: Anton Romanov Date: Mon, 13 May 2024 00:52:04 +0400 Subject: [PATCH 122/122] #96 -- Fix time series generation --- .../generation/model/GenerationForm.java | 39 ++++++++++++------- .../generation/service/GenerationService.java | 15 +++---- src/main/resources/templates/generation.html | 8 ++++ 3 files changed, 40 insertions(+), 22 deletions(-) diff --git a/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java b/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java index 8571d6a..e1e2c69 100644 --- a/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java +++ b/src/main/java/ru/ulstu/extractor/generation/model/GenerationForm.java @@ -2,11 +2,12 @@ package ru.ulstu.extractor.generation.model; public class GenerationForm { private int tsLength; - private int min; - private int max; - private int base; - private int baseTendency; - private int tendencyDynamic; + private double min; + private double max; + private double base; + private double baseTendency; + private double tendencyDynamic; + private double randomWeight; public int getTsLength() { return tsLength; @@ -16,43 +17,51 @@ public class GenerationForm { this.tsLength = tsLength; } - public int getMin() { + public double getMin() { return min; } - public void setMin(int min) { + public void setMin(double min) { this.min = min; } - public int getMax() { + public double getMax() { return max; } - public void setMax(int max) { + public void setMax(double max) { this.max = max; } - public int getBase() { + public double getBase() { return base; } - public void setBase(int base) { + public void setBase(double base) { this.base = base; } - public int getBaseTendency() { + public double getBaseTendency() { return baseTendency; } - public void setBaseTendency(int baseTendency) { + public void setBaseTendency(double baseTendency) { this.baseTendency = baseTendency; } - public int getTendencyDynamic() { + public double getTendencyDynamic() { return tendencyDynamic; } - public void setTendencyDynamic(int tendencyDynamic) { + public void setTendencyDynamic(double tendencyDynamic) { this.tendencyDynamic = tendencyDynamic; } + + public double getRandomWeight() { + return randomWeight; + } + + public void setRandomWeight(double randomWeight) { + this.randomWeight = randomWeight; + } } diff --git a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java index 0b168cd..34a160d 100644 --- a/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java +++ b/src/main/java/ru/ulstu/extractor/generation/service/GenerationService.java @@ -18,7 +18,6 @@ import java.util.List; public class GenerationService { private final TimeSeriesService timeSeriesService; private final BranchService branchService; - private final static double RANDOM_WEIGHT = 0.1; public GenerationService(TimeSeriesService timeSeriesService, BranchService branchService) { @@ -44,18 +43,20 @@ public class GenerationService { double newValue; int maxTryCount = 10; do { + double oneStepDiff = generationForm.getRandomWeight() * (Math.random() - 0.5) * (generationForm.getMax() - generationForm.getMin()) / (generationForm.getTsLength() + 10); if (timeSeriesValues.isEmpty()) { if (generationForm.getBaseTendency() > 0) { - newValue = 0.1 * Math.random() * (generationForm.getMax() - generationForm.getMin()); + newValue = 0.1 * (generationForm.getRandomWeight() > 0.0 ? oneStepDiff : 1.0) * (generationForm.getMax() - generationForm.getMin()); + } else if (generationForm.getBaseTendency() < 0) { + newValue = generationForm.getMax() - 0.1 * (generationForm.getRandomWeight() > 0.0 ? oneStepDiff : 1.0) * (generationForm.getMax() - generationForm.getMin()); } else { - newValue = generationForm.getMax() - 0.1 * Math.random() * (generationForm.getMax() - generationForm.getMin()); + newValue = generationForm.getBase(); } } else { newValue = timeSeriesValues.get(timeSeriesValues.size() - 1).getValue() - + Math.random() * generationForm.getBaseTendency() - * ((generationForm.getMax() - generationForm.getMin()) / generationForm.getTsLength()) - * generationForm.getTendencyDynamic() - + RANDOM_WEIGHT * (Math.random() - 0.5) * (generationForm.getMax() - generationForm.getMin()); + + (generationForm.getRandomWeight() > 0.0 ? oneStepDiff : 1.0) * generationForm.getBaseTendency() + * ((generationForm.getMax() - generationForm.getMin()) / (generationForm.getTsLength() + 10)) + * generationForm.getTendencyDynamic(); } maxTryCount--; } while (((newValue <= generationForm.getMin()) diff --git a/src/main/resources/templates/generation.html b/src/main/resources/templates/generation.html index f21f39d..ef7fd1d 100644 --- a/src/main/resources/templates/generation.html +++ b/src/main/resources/templates/generation.html @@ -56,6 +56,14 @@
+
+
+ Величина шума +
+
+ +
+
-- 2.34.1