text:
<idea-plugin>
  <resource-bundle>messages.KotlinBundle</resource-bundle>

  <extensionPoints>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.idea.codeInsight.unambiguousImports"
            interface="org.jetbrains.kotlin.idea.codeInsight.KotlinAutoImportsFilter"
            dynamic="true"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.updater"
            beanClass="com.intellij.openapi.fileTypes.FileTypeExtensionPoint"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.pluginUpdateVerifier"
            interface="org.jetbrains.kotlin.idea.update.PluginUpdateVerifier"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.projectConfigurator"
            interface="org.jetbrains.kotlin.idea.configuration.KotlinProjectConfigurator"
            dynamic="true"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.newFileHook"
            interface="org.jetbrains.kotlin.idea.actions.NewKotlinFileHook"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.facetValidatorCreator"
            interface="org.jetbrains.kotlin.idea.facet.KotlinFacetValidatorCreator"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.clearBuildState"
            interface="org.jetbrains.kotlin.idea.compiler.configuration.ClearBuildStateExtension"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.experimentalFeature"
            interface="org.jetbrains.kotlin.idea.configuration.ExperimentalFeature"
            dynamic="true"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.j2kConverterExtension"
            interface="org.jetbrains.kotlin.j2k.J2kConverterExtension"
            dynamic="true"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.idea.testFrameworkProvider"
            interface="org.jetbrains.kotlin.idea.extensions.KotlinTestFrameworkProvider"
            dynamic="true"/>
    <extensionPoint
            qualifiedName="org.jetbrains.kotlin.buildSystemTypeDetector"
            interface="org.jetbrains.kotlin.idea.configuration.BuildSystemTypeDetector"
            dynamic="true"/>
  </extensionPoints>

  <extensions defaultExtensionNs="com.intellij">
    <applicationService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupApplicationService" />
    <applicationService serviceImplementation="org.jetbrains.kotlin.idea.KotlinPluginUpdater"/>
    <applicationService serviceImplementation="org.jetbrains.kotlin.idea.quickfix.QuickFixes"/>
    <applicationService serviceImplementation="org.jetbrains.kotlin.idea.codeInsight.KotlinCodeInsightSettings"/>
    <applicationService serviceImplementation="org.jetbrains.kotlin.idea.editor.KotlinEditorOptions"/>

    <applicationService
            serviceInterface="org.jetbrains.kotlin.idea.references.ReadWriteAccessChecker"
            serviceImplementation="org.jetbrains.kotlin.idea.references.ReadWriteAccessCheckerDescriptorsImpl"/>

    <projectService serviceImplementation="org.jetbrains.kotlin.idea.PluginStartupService"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.core.KotlinPluginDisposable"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.core.util.ProjectJob"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.configuration.KotlinMigrationProjectService"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.compiler.configuration.KotlinCommonCompilerArgumentsHolder"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.compiler.configuration.Kotlin2JvmCompilerArgumentsHolder"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.compiler.configuration.Kotlin2JsCompilerArgumentsHolder"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.compiler.configuration.KotlinCompilerSettings"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.compiler.configuration.KotlinJpsPluginSettings"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.compiler.configuration.KotlinCompilerWorkspaceSettings"/>
    <projectService serviceImplementation="org.jetbrains.kotlin.idea.codeInsight.KotlinCodeInsightWorkspaceSettings"/>

    <projectService
            serviceInterface="org.jetbrains.kotlin.idea.util.FirPluginOracleService"
            serviceImplementation="org.jetbrains.kotlin.idea.util.FirPluginOracleServiceFE10Impl"/>
    <projectService
            serviceInterface="org.jetbrains.kotlin.idea.util.ImportInsertHelper"
            serviceImplementation="org.jetbrains.kotlin.idea.util.ImportInsertHelperImpl"/>
    <projectService
            serviceInterface="org.jetbrains.kotlin.idea.core.NotPropertiesService"
            serviceImplementation="org.jetbrains.kotlin.idea.intentions.NotPropertiesServiceImpl"/>

    <applicationConfigurable
            groupId="language"
            bundle="messages.KotlinBundle"
            key="kotlin.language.configurable"
            id="preferences.language.Kotlin"
            instance="org.jetbrains.kotlin.idea.configuration.KotlinLanguageConfiguration"/>

    <projectConfigurable
            instance="org.jetbrains.kotlin.idea.compiler.configuration.KotlinCompilerConfigurableTab"
            id="project.kotlinCompiler"
            bundle="messages.KotlinBundle"
            key="kotlin.compiler.configurable"
            parentId="project.propCompiler"/>

    <errorHandler implementation="org.jetbrains.kotlin.idea.reporter.KotlinReportSubmitter"/>

    <iconProvider implementation="org.jetbrains.kotlin.idea.KotlinIconProvider"/>

    <pathMacroExpandableProtocol protocol="kotlin-js-meta"/>

    <pathMacroContributor implementation="org.jetbrains.kotlin.idea.KotlinPluginMacros"/>

    <postStartupActivity implementation="org.jetbrains.kotlin.idea.PluginStartupActivity"/>
    <postStartupActivity implementation="org.jetbrains.kotlin.idea.versions.KotlinUpdatePluginStartupActivity"/>
    <postStartupActivity implementation="org.jetbrains.kotlin.idea.caches.KotlinPackageContentModificationListener"/>
    <postStartupActivity implementation="org.jetbrains.kotlin.idea.configuration.KotlinMigrationProjectComponent"/>

    <lang.importOptimizer
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.imports.KotlinImportOptimizer"/>
    <lang.foldingBuilder
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.KotlinFoldingBuilder"/>

    <codeInsight.parameterInfo
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.parameterInfo.KotlinFunctionParameterInfoHandler"/>
    <codeInsight.parameterInfo
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.parameterInfo.KotlinLambdaParameterInfoHandler"/>
    <codeInsight.parameterInfo
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.parameterInfo.KotlinArrayAccessParameterInfoHandler"/>
    <codeInsight.parameterInfo
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.parameterInfo.KotlinClassTypeArgumentInfoHandler"/>
    <codeInsight.parameterInfo
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.parameterInfo.KotlinFunctionTypeArgumentInfoHandler"/>
    <codeInsight.parameterInfo
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.parameterInfo.KotlinClassConstructorInfoHandler"/>

    <codeInsight.linkHandler
            prefix="#kotlinClass/"
            handlerClass="org.jetbrains.kotlin.idea.highlighter.markers.KotlinClassTooltipLinkHandler"/>

    <codeInsight.nonBlockingContextChecker
            implementation="org.jetbrains.kotlin.idea.inspections.blockingCallsDetection.CoroutineNonBlockingContextChecker"/>
    <codeInsight.blockingMethodChecker
            implementation="org.jetbrains.kotlin.idea.inspections.blockingCallsDetection.CoroutineBlockingMethodChecker"/>

    <typeDeclarationProvider implementation="org.jetbrains.kotlin.idea.codeInsight.KotlinTypeDeclarationProvider"/>

    <breadcrumbsInfoProvider implementation="org.jetbrains.kotlin.idea.codeInsight.KotlinBreadcrumbsInfoProvider"/>

    <lang.documentationProvider language="JAVA" implementationClass="org.jetbrains.kotlin.idea.KotlinDocumentationProvider" order="first"/>
    <documentationProvider implementation="org.jetbrains.kotlin.idea.KotlinDocumentationProvider"/>

    <codeInsight.implementMethod language="kotlin" implementationClass="org.jetbrains.kotlin.idea.core.overrideImplement.ImplementMembersHandler"/>
    <codeInsight.overrideMethod language="kotlin" implementationClass="org.jetbrains.kotlin.idea.core.overrideImplement.OverrideMembersHandler"/>

    <typeHierarchyProvider
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.hierarchy.KotlinTypeHierarchyProviderBySuperTypeCallEntry"/>
    <typeHierarchyProvider
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.hierarchy.KotlinTypeHierarchyProvider"/>
    <typeHierarchyProvider
            language="JAVA"
            order="last"
            implementationClass="org.jetbrains.kotlin.idea.hierarchy.KotlinTypeHierarchyProviderBySuperTypeCallEntry"/>
    <callHierarchyProvider
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.hierarchy.calls.KotlinCallHierarchyProvider" />
    <methodHierarchyProvider
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.hierarchy.overrides.KotlinOverrideHierarchyProvider" />

    <hierarchy.referenceProcessor implementation="org.jetbrains.kotlin.idea.hierarchy.calls.KotlinCallReferenceProcessor"/>

    <codeInsight.typeInfo language="kotlin"
                          implementationClass="org.jetbrains.kotlin.idea.codeInsight.KotlinExpressionTypeProviderDescriptorsImpl"/>

    <testCreator language="kotlin" implementationClass="org.jetbrains.kotlin.idea.testIntegration.KotlinTestCreator"/>
    <testFinder implementation="org.jetbrains.kotlin.idea.testIntegration.KotlinTestFinder"/>

    <createFromTemplateHandler implementation="org.jetbrains.kotlin.idea.actions.KotlinCreateFromTemplateHandler"/>

    <lang.jvm.actions.jvmElementActionsFactory implementation="org.jetbrains.kotlin.idea.quickfix.crossLanguage.KotlinElementActionsFactory"/>

    <referenceImporter implementation="org.jetbrains.kotlin.idea.codeInsight.KotlinReferenceImporter" id="KotlinReferenceImporter"/>
    <autoImportOptionsProvider instance="org.jetbrains.kotlin.idea.codeInsight.KotlinCodeInsightWorkspaceSettingsProvider"/>

    <lang.elementManipulator
            forClass="org.jetbrains.kotlin.psi.KtStringTemplateExpression"
            implementationClass="org.jetbrains.kotlin.psi.psiUtil.KtStringTemplateExpressionManipulator"/>

    <treeStructureProvider implementation="org.jetbrains.kotlin.idea.projectView.KotlinSelectInProjectViewProvider"/>
    <treeStructureProvider implementation="org.jetbrains.kotlin.idea.projectView.KotlinExpandNodeProjectViewProvider" order="last"/>

    <qualifiedNameProvider implementation="org.jetbrains.kotlin.idea.actions.KotlinQualifiedNameProvider"/>

    <packageDependencies.visitor
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.packageDependencies.KotlinDependencyVisitorFactory"/>

    <annotationSupport language="kotlin" implementationClass="com.intellij.psi.impl.source.tree.java.JavaAnnotationSupport"/>

    <deadCode implementation="org.jetbrains.kotlin.idea.inspections.KotlinJUnitStaticEntryPoint"/>

    <stripTrailingSpacesFilterFactory implementation="org.jetbrains.kotlin.idea.editor.KotlinStripTrailingSpacesFilterFactory"/>

    <search.topHitProvider implementation="org.jetbrains.kotlin.idea.editor.KotlinEditorOptionsTopHitProvider"/>

    <psi.classFileDecompiler implementation="org.jetbrains.kotlin.idea.decompiler.classFile.KotlinClassFileDecompiler"/>
    <psi.classFileDecompiler implementation="org.jetbrains.kotlin.idea.decompiler.js.KotlinJavaScriptMetaFileDecompiler"/>
    <psi.classFileDecompiler implementation="org.jetbrains.kotlin.idea.decompiler.builtIns.KotlinBuiltInDecompiler"/>

    <moduleConfigurationEditorProvider implementation="org.jetbrains.kotlin.idea.roots.ui.NonJvmKotlinModuleEditorsProvider"/>

    <projectStructure.sourceRootEditHandler implementation="org.jetbrains.kotlin.idea.roots.ui.KotlinModuleSourceRootEditHandler$Source"/>
    <projectStructure.sourceRootEditHandler implementation="org.jetbrains.kotlin.idea.roots.ui.KotlinModuleSourceRootEditHandler$TestSource"/>
    <projectStructure.sourceRootEditHandler implementation="org.jetbrains.kotlin.idea.roots.ui.KotlinModuleSourceRootEditHandler$Resource"/>
    <projectStructure.sourceRootEditHandler implementation="org.jetbrains.kotlin.idea.roots.ui.KotlinModuleSourceRootEditHandler$TestResource"/>

    <lang.psiStructureViewFactory
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.structureView.KotlinStructureViewFactory"/>

    <structureViewBuilder
            order="first"
            key="CLASS"
            factoryClass="org.jetbrains.kotlin.idea.structureView.KtClsStructureViewBuilderProvider"/>

    <registryKey
            key="kotlin.code-vision.usages"
            description="Enable Code-Vision usages search"
            defaultValue="false"
            restartRequired="false"/>
    <registryKey
            key="kotlin.code-vision.inheritors"
            description="Enable Code-Vision inheritors search"
            defaultValue="false"
            restartRequired="false"/>
    <registryKey
            key="kotlin.experimental.new.j2k"
            description="Enable new Java to Kotlin converter"
            defaultValue="true"
            restartRequired="false"/>
  </extensions>

  <extensions defaultExtensionNs="org.jetbrains.kotlin">
    <versionInfoProvider implementation="org.jetbrains.kotlin.idea.facet.KotlinVersionInfoProviderByModuleDependencies"/>

    <pluginUpdateVerifier implementation="org.jetbrains.kotlin.idea.update.GooglePluginUpdateVerifier"/>

    <binaryExtension implementation="org.jetbrains.kotlin.idea.util.JavaClassBinary"/>
    <binaryExtension implementation="org.jetbrains.kotlin.idea.util.KotlinBuiltInBinary"/>
    <binaryExtension implementation="org.jetbrains.kotlin.idea.util.KotlinModuleBinary"/>
    <binaryExtension implementation="org.jetbrains.kotlin.idea.util.KotlinJsMetaBinary"/>

    <projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJavaModuleConfigurator"/>
    <projectConfigurator implementation="org.jetbrains.kotlin.idea.configuration.KotlinJsModuleConfigurator"/>

    <quickFixContributor implementation="org.jetbrains.kotlin.idea.quickfix.QuickFixRegistrar"/>

    <j2kConverterExtension implementation="org.jetbrains.kotlin.nj2k.NewJ2kConverterExtension"/>
    <j2kConverterExtension implementation="org.jetbrains.kotlin.idea.j2k.OldJ2kConverterExtension"/>

    <buildSystemTypeDetector implementation="org.jetbrains.kotlin.idea.configuration.GradleDetector"/>
  </extensions>

  <!-- Editing -->
  <extensions defaultExtensionNs="com.intellij">
    <typedHandler implementation="org.jetbrains.kotlin.idea.editor.KotlinTypedHandler"/>
    <typedHandler implementation="org.jetbrains.kotlin.idea.kdoc.KDocTypedHandler"/>
    <typedHandler implementation="org.jetbrains.kotlin.idea.editor.KotlinRawStringTypedHandler"/>

    <lang.surroundDescriptor
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.codeInsight.surroundWith.expression.KotlinExpressionSurroundDescriptor"/>
    <lang.surroundDescriptor
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.codeInsight.surroundWith.statement.KotlinStatementSurroundDescriptor"/>
    <lang.unwrapDescriptor
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.codeInsight.unwrap.KotlinUnwrapDescriptor"/>

    <statementUpDownMover
            id="ktExpression"
            order="before declaration"
            implementation="org.jetbrains.kotlin.idea.codeInsight.upDownMover.KotlinExpressionMover"/>
    <statementUpDownMover
            id="ktDeclaration"
            order="before ktExpression"
            implementation="org.jetbrains.kotlin.idea.codeInsight.upDownMover.KotlinDeclarationMover"/>

    <moveLeftRightHandler language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.KotlinMoveLeftRightHandler"/>

    <editorSmartKeysConfigurable instance="org.jetbrains.kotlin.idea.editor.KotlinEditorOptionsConfigurable"/>

    <joinLinesHandler implementation="org.jetbrains.kotlin.idea.joinLines.JoinDeclarationAndAssignmentHandler"/>
    <joinLinesHandler implementation="org.jetbrains.kotlin.idea.joinLines.JoinInitializerAndIfToElvisHandler"/>
    <joinLinesHandler implementation="org.jetbrains.kotlin.idea.joinLines.JoinBlockIntoSingleStatementHandler"/>
    <joinLinesHandler implementation="org.jetbrains.kotlin.idea.joinLines.JoinStatementsAddSemicolonHandler"/>
    <joinLinesHandler implementation="org.jetbrains.kotlin.idea.joinLines.JoinToStringTemplateHandler"/>
    <joinLinesHandler implementation="org.jetbrains.kotlin.idea.joinLines.JoinWithTrailingCommaHandler"/>

    <quoteHandler fileType="Kotlin" className="org.jetbrains.kotlin.idea.editor.KotlinQuoteHandler"/>

    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinStatementGroupSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinCodeBlockSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinDocCommentSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinCallExpressionWithLambdaSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinDeclarationSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinListSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinStringLiteralSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinInvokedExpressionSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinTypeSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinSuperTypeSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinBracketsSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinLabeledReturnSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinClassMemberSelectioner"/>
    <extendWordSelectionHandler implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinEscapedIdentifierSelectioner"/>

    <basicWordSelectionFilter implementation="org.jetbrains.kotlin.idea.editor.wordSelection.KotlinWordSelectionFilter"/>

    <declarationRangeHandler
            key="org.jetbrains.kotlin.psi.KtClassOrObject"
            implementationClass="org.jetbrains.kotlin.idea.codeInsight.KotlinClassDeclarationRangeHandler"/>
    <declarationRangeHandler
            key="org.jetbrains.kotlin.psi.KtDeclarationWithBody"
            implementationClass="org.jetbrains.kotlin.idea.codeInsight.KotlinFunDeclarationRangeHandler"/>

    <enterHandlerDelegate
            id="KotlinEnterHandler"
            order="before EnterBetweenBracesHandler, before xmlEnter"
            implementation="org.jetbrains.kotlin.idea.editor.KotlinEnterHandler"/>
    <enterHandlerDelegate
            id="KotlinMultilineStringEnterHandler"
            order="before EnterBetweenBracesHandler, before xmlEnter"
            implementation="org.jetbrains.kotlin.idea.editor.KotlinMultilineStringEnterHandler"/>
    <enterHandlerDelegate
            id="KotlinEnterAfterUnmatchedBraceHandler"
            order="before afterUnmatchedBrace"
            implementation="org.jetbrains.kotlin.idea.editor.KotlinEnterAfterUnmatchedBraceHandler"/>
    <enterBetweenBracesDelegate
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.editor.KotlinEnterBetweenBracesAndBracketsNoCommitDelegate"/>

    <lang.smartEnterProcessor language="kotlin" implementationClass="org.jetbrains.kotlin.idea.editor.KotlinSmartEnterHandler"/>

    <backspaceHandlerDelegate implementation="org.jetbrains.kotlin.idea.editor.KotlinBackspaceHandler"/>
    <backspaceHandlerDelegate implementation="org.jetbrains.kotlin.idea.editor.KotlinStringTemplateBackspaceHandler"/>
    <backspaceHandlerDelegate implementation="org.jetbrains.kotlin.idea.editor.KotlinRawStringBackspaceHandler"/>
  </extensions>

  <!-- Tips and Tricks -->
  <extensions defaultExtensionNs="com.intellij">
    <tipAndTrick file="Kotlin.html"/>
    <tipAndTrick file="Kotlin_project.html"/>
    <tipAndTrick file="Kotlin_mix.html"/>
    <tipAndTrick file="Kotlin_Java_convert.html"/>
  </extensions>

  <!-- Notifications -->
  <extensions defaultExtensionNs="com.intellij">
    <notificationGroup
            id="kotlin.external.compiler.updates"
            displayType="STICKY_BALLOON"
            key="kotlin.external.compiler.updates.notification.group.name"
    />
    <notificationGroup
            id="Kotlin plugin updates"
            displayType="STICKY_BALLOON"
            key="plugin.updater.notification.group"
    />
    <notificationGroup
            id="Kotlin Migration"
            displayType="STICKY_BALLOON"
            key="configuration.migration.group.name"
    />
    <notificationGroup
            id="Update Kotlin code style"
            displayType="STICKY_BALLOON"
            key="configuration.kotlin.code.style.group.name"
    />
  </extensions>

  <!-- Navigation -->
  <extensions defaultExtensionNs="com.intellij">
    <navbar implementation="org.jetbrains.kotlin.idea.navigationToolbar.KotlinNavBarModelExtension" order="first"/>

    <applicationService
            serviceInterface="org.jetbrains.kotlin.psi.KotlinReferenceProvidersService"
            serviceImplementation="org.jetbrains.kotlin.idea.references.KtIdeReferenceProviderService"/>

    <psi.referenceContributor
            implementation="org.jetbrains.kotlin.idea.references.KotlinWebReferenceContributor"/>
    <psi.referenceContributor
            id="kotlinFilePathReferenceContributor"
            language="kotlin"
            implementation="org.jetbrains.kotlin.idea.references.KotlinFilePathReferenceContributor"/>
  </extensions>

  <!-- Formatter -->
  <extensions defaultExtensionNs="com.intellij">
    <lang.formatter language="kotlin" implementationClass="org.jetbrains.kotlin.idea.formatter.KotlinFormattingModelBuilder"/>

    <lineIndentProvider implementation="org.jetbrains.kotlin.idea.formatter.KotlinLineIndentProvider"/>

    <preFormatProcessor implementation="org.jetbrains.kotlin.idea.formatter.KotlinPreFormatProcessor"/>

    <postFormatProcessor implementation="org.jetbrains.kotlin.idea.formatter.TrailingCommaPostFormatProcessor"/>

    <langCodeStyleSettingsProvider implementation="org.jetbrains.kotlin.idea.formatter.KotlinLanguageCodeStyleSettingsProvider"/>

    <codeStyleSettingsProvider implementation="org.jetbrains.kotlin.idea.formatter.KotlinGenerationSettingsProvider"/>

    <predefinedCodeStyle implementation="org.jetbrains.kotlin.idea.formatter.KotlinStyleGuideCodeStyle"/>
    <predefinedCodeStyle implementation="org.jetbrains.kotlin.idea.formatter.KotlinObsoleteCodeStyle"/>

    <registryKey
            key="kotlin.formatter.allowTrailingCommaInAnyProject"
            description="Allow a trailing comma regardless of plugin version"
            defaultValue="false"
            restartRequired="false"/>
    <registryKey
            key="kotlin.formatter.allowTrailingCommaOnCallSite"
            description="Allow a trailing comma on call-site"
            defaultValue="false"
            restartRequired="false"/>
  </extensions>

  <!-- Templates -->
  <extensions defaultExtensionNs="com.intellij">
    <defaultLiveTemplates file="liveTemplates/Kotlin.xml"/>

    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.AnyVariableMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.SuitableVariableMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.FunctionParametersMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.AnonymousSuperMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.SuggestVariableNameMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.KotlinClassNameMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.KotlinFunctionNameMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.KotlinPackageNameMacro"/>
    <liveTemplateMacro implementation="org.jetbrains.kotlin.idea.liveTemplates.macro.KotlinMainArgumentsMacro"/>

    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$Generic"/>
    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$TopLevel"/>
    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$Statement"/>
    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$Class"/>
    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$Expression"/>
    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$Comment"/>
    <liveTemplateContext implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinTemplateContextType$ObjectDeclaration"/>

    <liveTemplateOptionalProcessor implementation="org.jetbrains.kotlin.idea.liveTemplates.KotlinShortenFQNamesProcessor"/>

    <defaultTemplatePropertiesProvider
            order="last"
            implementation="org.jetbrains.kotlin.idea.actions.KotlinDefaultTemplatePropertiesProvider"/>

    <codeInsight.template.postfixTemplateProvider
            language="kotlin"
            implementationClass="org.jetbrains.kotlin.idea.codeInsight.postfix.KtPostfixTemplateProvider"/>
  </extensions>

  <!-- Line markers -->
  <extensions defaultExtensionNs="com.intellij">
    <codeInsight.lineMarkerProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.highlighter.markers.KotlinLineMarkerProvider"/>
    <codeInsight.lineMarkerProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.highlighter.KotlinRecursiveCallLineMarkerProvider"/>
    <codeInsight.lineMarkerProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.highlighter.KotlinSuspendCallLineMarkerProvider"/>
    <runLineMarkerContributor language="kotlin" implementationClass="org.jetbrains.kotlin.idea.highlighter.KotlinRunLineMarkerContributor"/>
    <runLineMarkerContributor language="kotlin" implementationClass="org.jetbrains.kotlin.idea.highlighter.KotlinTestRunLineMarkerContributor"/>
  </extensions>

  <!-- Inlay hints -->
  <extensions defaultExtensionNs="com.intellij">
    <codeInsight.parameterNameHints language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinInlayParameterHintsProvider"/>

    <codeInsight.inlayProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinCodeAuthorInlayHintsProvider"/>
    <codeInsight.inlayProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.codevision.KotlinCodeVisionProvider"/>
    <codeInsight.inlayProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinReferencesTypeHintsProvider"/>
    <codeInsight.inlayProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinLambdasHintsProvider"/>
    <codeInsight.inlayProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinCallChainHintsProvider"/>
    <codeInsight.inlayProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinRangesHintsProvider"/>

    <search.projectOptionsTopHitProvider implementation="org.jetbrains.kotlin.idea.codeInsight.hints.KotlinInlayHintsTopHitProvider"/>
  </extensions>

  <!-- Go to declaration -->
  <extensions defaultExtensionNs="com.intellij">
    <gotoSymbolContributor implementation="org.jetbrains.kotlin.idea.goto.KotlinGotoSymbolContributor"/>
    <gotoPrimeSymbolContributor implementation="org.jetbrains.kotlin.idea.goto.KotlinGotoPrimeSymbolContributor"/>
    <gotoClassContributor implementation="org.jetbrains.kotlin.idea.goto.KotlinGotoClassContributor"/>
    <gotoDeclarationHandler implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinImportAliasGotoDeclarationHandler"/>
    <gotoRelatedProvider implementation="org.jetbrains.kotlin.idea.goto.KotlinExpectOrActualGotoRelatedProvider"/>

    <codeInsight.gotoSuper language="kotlin" implementationClass="org.jetbrains.kotlin.idea.codeInsight.GotoSuperActionHandler"/>

    <gotoTargetRendererProvider
            id="JetGotoTargetRenderProvider"
            order="first"
            implementation="org.jetbrains.kotlin.idea.KotlinGotoTargetRenderProvider"/>
  </extensions>

  <!-- Copy-paste -->
  <extensions defaultExtensionNs="com.intellij">
    <copyPastePostProcessor implementation="org.jetbrains.kotlin.idea.conversion.copy.ConvertJavaCopyPasteProcessor"/>
    <copyPastePostProcessor implementation="org.jetbrains.kotlin.idea.conversion.copy.ConvertTextJavaCopyPasteProcessor"/>
    <copyPastePostProcessor implementation="org.jetbrains.kotlin.idea.codeInsight.KotlinCopyPasteReferenceProcessor"/>
    <copyPastePreProcessor implementation="org.jetbrains.kotlin.idea.editor.KotlinLiteralCopyPasteProcessor"/>
    <copyPastePostProcessor implementation="org.jetbrains.kotlin.idea.refactoring.cutPaste.MoveDeclarationsCopyPasteProcessor"/>

    <filePasteProvider implementation="org.jetbrains.kotlin.idea.conversion.copy.KotlinFilePasteProvider" order="first"/>
  </extensions>

  <!-- Declaration search and Find Usages -->
  <extensions defaultExtensionNs="com.intellij">
    <searchEverywhereResultsEqualityProvider implementation="org.jetbrains.kotlin.idea.searcheverywhere.KtSearchEverywhereEqualityProvider"/>

    <searchEverywhereClassifier implementation="org.jetbrains.kotlin.idea.goto.KotlinSearchEverywhereClassifier"/>

    <projectService serviceInterface="org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupport"
                    serviceImplementation="org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesSupportImpl"/>

    <projectService serviceInterface="org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupport"
                    serviceImplementation="org.jetbrains.kotlin.idea.search.KotlinSearchUsagesSupportImpl"/>

    <lang.findUsagesProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesProvider"/>

    <lang.sliceProvider language="kotlin" implementationClass="org.jetbrains.kotlin.idea.slicer.KotlinSliceProvider"/>

    <fileStructureGroupRuleProvider implementation="org.jetbrains.kotlin.idea.findUsages.KotlinDeclarationGroupRuleProvider"/>
    <fileStructureGroupRuleProvider implementation="org.jetbrains.kotlin.idea.findUsages.KotlinDeclarationSecondLevelGroupRuleProvider"/>

    <findUsagesHandlerFactory implementation="org.jetbrains.kotlin.idea.findUsages.KotlinFindUsagesHandlerFactory"/>

    <highlightUsagesHandlerFactory implementation="org.jetbrains.kotlin.idea.highlighter.KotlinHighlightExitPointsHandlerFactory"/>
    <highlightUsagesHandlerFactory implementation="org.jetbrains.kotlin.idea.highlighter.KotlinHighlightImplicitItHandlerFactory"/>

    <referencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReferencesSearcher"/>
    <referencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinAliasedImportedElementSearcher"/>

    <directClassInheritorsSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinDirectInheritorsSearcher"/>
    <overridingMethodsSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinOverridingMethodsWithGenericsSearcher"/>
    <overridingMethodsSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinOverridingMethodsWithFlexibleTypesSearcher"/>
    <definitionsScopedSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinDefinitionsSearcher"/>
    <annotatedElementsSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinAnnotatedElementsSearcher"/>
    <classesWithAnnotatedMembersSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinClassesWithAnnotatedMembersSearcher"/>
    <useScopeOptimizer implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinDeclarationScopeOptimizer"/>
    <methodReferencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinPropertyAccessorsReferenceSearcher"/>
    <methodReferencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinConstructorDelegationCallReferenceSearcher"/>
    <methodReferencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinOverridingMethodReferenceSearcher"/>
    <methodReferencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinConventionMethodReferencesSearcher"/>
    <methodReferencesSearch implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.DefaultAnnotationMethodKotlinImplicitReferenceSearcher"/>

    <importFilteringRule implementation="org.jetbrains.kotlin.idea.findUsages.KotlinImportFilteringRule"/>

    <targetElementEvaluator language="kotlin" implementationClass="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinTargetElementEvaluator" />

    <targetElementUtilExtender implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinTargetElementEvaluator"/>

    <structuralsearch.profile implementation="org.jetbrains.kotlin.idea.structuralsearch.KotlinStructuralSearchProfile"/>
    <structuralsearch.filterProvider implementation="org.jetbrains.kotlin.idea.structuralsearch.filters.KotlinFilterProvider"/>

    <elementDescriptionProvider order="first" implementation="org.jetbrains.kotlin.idea.findUsages.KotlinElementDescriptionProvider"/>
    <elementDescriptionProvider implementation="org.jetbrains.kotlin.idea.findUsages.KotlinNonCodeSearchElementDescriptionProvider"/>

    <usageContextPanelProvider implementation="org.jetbrains.kotlin.idea.slicer.KotlinUsageContextDataInflowPanel$Provider"/>
    <usageContextPanelProvider implementation="org.jetbrains.kotlin.idea.slicer.KotlinUsageContextDataOutflowPanel$Provider"/>

    <usageToPsiElementProvider implementation="org.jetbrains.kotlin.idea.codeInsight.KotlinUsageToPsiElementProvider"/>

    <usageTypeProvider implementation="org.jetbrains.kotlin.idea.findUsages.KotlinUsageTypeProviderImpl"/>

    <readWriteAccessDetector implementation="org.jetbrains.kotlin.idea.search.ideaExtensions.KotlinReadWriteAccessDetector" id="kotlin"/>
  </extensions>

  <extensions defaultExtensionNs="com.intellij.jvm">
    <declarationSearcher language="kotlin" implementationClass="org.jetbrains.kotlin.idea.jvm.KotlinDeclarationSearcher"/>
  </extensions>

  <actions>
    <action id="Kotlin.NewFile" class="org.jetbrains.kotlin.idea.actions.NewKotlinFileAction">
      <add-to-group group-id="NewGroup" anchor="after" relative-to-action="NewGroup1"/>
    </action>
    <action id="Kotlin.NewScript" class="org.jetbrains.kotlin.idea.actions.NewKotlinScriptAction">
      <add-to-group group-id="NewGroup" anchor="before" relative-to-action="NewFromTemplate"/>
    </action>
    <action id="Kotlin.NewWorksheet" class="org.jetbrains.kotlin.idea.actions.NewKotlinWorksheetAction">
      <add-to-group group-id="NewGroup" anchor="before" relative-to-action="NewFromTemplate"/>
    </action>

    <group id="KotlinToolsGroup" popup="true" icon="/org/jetbrains/kotlin/idea/icons/kotlin13.svg"
           class="org.jetbrains.kotlin.idea.actions.KotlinActionGroup">
      <add-to-group group-id="ToolsMenu" anchor="last"/>
    </group>

    <action id="KotlinConfigureUpdates" class="org.jetbrains.kotlin.idea.actions.ConfigurePluginUpdatesAction">
      <add-to-group group-id="KotlinToolsGroup"/>
    </action>

    <action id="CopyKotlinProjectInformation" class="org.jetbrains.kotlin.idea.actions.internal.CopyKotlinProjectOverviewAction">
    </action>

    <group id="ConvertJavaToKotlinGroup">
      <separator/>
      <action id="ConvertJavaToKotlin" class="org.jetbrains.kotlin.idea.actions.JavaToKotlinAction">
        <keyboard-shortcut keymap="$default" first-keystroke="control alt shift K"/>
      </action>
      <add-to-group group-id="CodeMenu" anchor="last"/>
      <add-to-group group-id="ProjectViewPopupMenu" anchor="last"/>
      <add-to-group group-id="EditorTabPopupMenu" anchor="last"/>
    </group>

    <action id="KotlinCodeMigration" class="org.jetbrains.kotlin.idea.migration.CodeMigrationAction">
      <!-- TODO: Not assigned to any group because there should be a panel for filling migration options -->
    </action>
    <action id="KotlinCodeMigrationToggle" class="org.jetbrains.kotlin.idea.migration.CodeMigrationToggleAction">
      <add-to-group group-id="KotlinToolsGroup"/>
    </action>

    <group id="KotlinGenerateGroup">
      <action id="KotlinGenerateTestMethod"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Test"/>
      <action id="KotlinGenerateSetUpMethod"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$SetUp"/>
      <action id="KotlinGenerateTearDownMethod"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$TearDown"/>
      <action id="KotlinGenerateDataMethod"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateTestSupportActionBase$Data"/>
      <separator />
      <action id="KotlinGenerateSecondaryConstructor"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateSecondaryConstructorAction"/>
      <action id="KotlinGenerateEqualsAndHashCode"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateEqualsAndHashcodeAction"/>
      <action id="KotlinGenerateToString"
              class="org.jetbrains.kotlin.idea.actions.generate.KotlinGenerateToStringAction"/>

      <add-to-group group-id="GenerateGroup" anchor="first"/>
    </group>

    <group id="InternalKotlin" internal="true">
      <separator/>

      <action id="DumbModeTremble"
              class="org.jetbrains.kotlin.idea.actions.internal.DumbModeTrembleAction"/>
      <action id="HighlightingBenchmarkAction"
              class="org.jetbrains.kotlin.idea.actions.internal.benchmark.HighlightingBenchmarkAction"/>

      <group id="KotlinInternalGroup" popup="true">
        <action
                id="CacheResetOnProcessCanceledToggleAction"
                class="org.jetbrains.kotlin.idea.actions.internal.CacheResetOnProcessCanceledToggleAction"/>
        <action
                id="CheckComponentsUsageSearchAction"
                class="org.jetbrains.kotlin.idea.actions.internal.CheckComponentsUsageSearchAction"/>
        <action
                id="FindImplicitNothingAction"
                class="org.jetbrains.kotlin.idea.actions.internal.FindImplicitNothingAction"/>
        <action
                id="PrintOutNotPropertyMatches"
                class="org.jetbrains.kotlin.idea.actions.internal.SearchNotPropertyCandidatesAction"/>
        <action
                id="StoredExceptionsThrowToggleAction"
                class="org.jetbrains.kotlin.idea.actions.internal.StoredExceptionsThrowToggleAction"/>
        <action
                id="MultiplatformCompositeAnalysisToggleAction"
                class="org.jetbrains.kotlin.idea.actions.internal.MultiplatformCompositeAnalysisToggleAction"/>
        <action
                id="LibraryToSourceDependencySupportToggleAction"
                class="org.jetbrains.kotlin.idea.actions.internal.LibraryToSourceDependencySupportToggleAction"/>
        <action
                id="CopyAsDiagnosticTest"
                class="org.jetbrains.kotlin.idea.actions.internal.CopyAsDiagnosticTestAction"/>
        <action
                id="KotlinFormattingSettingsStatusAction"
                class="org.jetbrains.kotlin.idea.actions.internal.KotlinFormattingSettingsStatusAction"/>
        <action
                id="KotlinThrowException"
                class="org.jetbrains.kotlin.idea.actions.internal.KotlinThrowExceptionAction"/>

        <group id="KotlinCompletionBenchmarkGroup" popup="true">
          <action
                  id="TopLevelCompletionBenchmarkAction"
                  class="org.jetbrains.kotlin.idea.actions.internal.benchmark.TopLevelCompletionBenchmarkAction"/>

          <action
                  id="LocalCompletionBenchmarkAction"
                  class="org.jetbrains.kotlin.idea.actions.internal.benchmark.LocalCompletionBenchmarkAction"/>
        </group>
      </group>

      <separator/>

      <add-to-group group-id="Internal" anchor="last"/>
    </group>

    <action id="KotlinShellExecute" class="com.intellij.openapi.actionSystem.EmptyAction">
      <keyboard-shortcut first-keystroke="control ENTER" keymap="$default"/>
    </action>
  </actions>
</idea-plugin>


text:
print('pingbacks:');
db.pingbacks.find().forEach(printjson);
print();
print('comments:');
db.comments.find().forEach(printjson);

redpajama_set_name: RedPajamaGithub


text:
export default function ensureArray(value) {
  return Array.isArray(value) ? value : [value];
};


text:
namespace v8 {
namespace internal {

class ObjectStats {
 public:
  explicit ObjectStats(Heap* heap) : heap_(heap) {}

  // ObjectStats are kept in two arrays, counts and sizes. Related stats are
  // stored in a contiguous linear buffer. Stats groups are stored one after
  // another.
  enum {
    FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1,
    FIRST_FIXED_ARRAY_SUB_TYPE =
        FIRST_CODE_KIND_SUB_TYPE + Code::NUMBER_OF_KINDS,
    FIRST_CODE_AGE_SUB_TYPE =
        FIRST_FIXED_ARRAY_SUB_TYPE + LAST_FIXED_ARRAY_SUB_TYPE + 1,
    OBJECT_STATS_COUNT = FIRST_CODE_AGE_SUB_TYPE + Code::kCodeAgeCount + 1
  };

  void ClearObjectStats(bool clear_last_time_stats = false);

  void TraceObjectStats();
  void TraceObjectStat(const char* name, int count, int size, double time);
  void CheckpointObjectStats();

  void RecordObjectStats(InstanceType type, size_t size) {
    DCHECK(type <= LAST_TYPE);
    object_counts_[type]++;
    object_sizes_[type] += size;
  }

  void RecordCodeSubTypeStats(int code_sub_type, int code_age, size_t size) {
    int code_sub_type_index = FIRST_CODE_KIND_SUB_TYPE + code_sub_type;
    int code_age_index =
        FIRST_CODE_AGE_SUB_TYPE + code_age - Code::kFirstCodeAge;
    DCHECK(code_sub_type_index >= FIRST_CODE_KIND_SUB_TYPE &&
           code_sub_type_index < FIRST_CODE_AGE_SUB_TYPE);
    DCHECK(code_age_index >= FIRST_CODE_AGE_SUB_TYPE &&
           code_age_index < OBJECT_STATS_COUNT);
    object_counts_[code_sub_type_index]++;
    object_sizes_[code_sub_type_index] += size;
    object_counts_[code_age_index]++;
    object_sizes_[code_age_index] += size;
  }

  void RecordFixedArraySubTypeStats(int array_sub_type, size_t size) {
    DCHECK(array_sub_type <= LAST_FIXED_ARRAY_SUB_TYPE);
    object_counts_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type]++;
    object_sizes_[FIRST_FIXED_ARRAY_SUB_TYPE + array_sub_type] += size;
  }

  size_t object_count_last_gc(size_t index) {
    return object_counts_last_time_[index];
  }

  size_t object_size_last_gc(size_t index) {
    return object_sizes_last_time_[index];
  }

  Isolate* isolate();
  Heap* heap() { return heap_; }

 private:
  Heap* heap_;

  // Object counts and used memory by InstanceType
  size_t object_counts_[OBJECT_STATS_COUNT];
  size_t object_counts_last_time_[OBJECT_STATS_COUNT];
  size_t object_sizes_[OBJECT_STATS_COUNT];
  size_t object_sizes_last_time_[OBJECT_STATS_COUNT];
};

class ObjectStatsCollector {
 public:
  static void CollectStatistics(StaticVisitorBase::VisitorId id, Map* map,
                                HeapObject* obj);
  static void CollectFixedArrayStatistics(HeapObject* obj);

  static void CountFixedArray(FixedArrayBase* fixed_array,
                              FixedArraySubInstanceType fast_type,
                              FixedArraySubInstanceType dictionary_type);
  static void RecordMapStats(Map* map, HeapObject* obj);
  static void RecordCodeStats(Map* map, HeapObject* obj);
  static void RecordSharedFunctionInfoStats(Map* map, HeapObject* obj);
  static void RecordFixedArrayStats(Map* map, HeapObject* obj);
};

class MarkCompactObjectStatsVisitor
    : public StaticMarkingVisitor<MarkCompactObjectStatsVisitor> {
 public:
  static void Initialize(VisitorDispatchTable<Callback>* original);

  template <VisitorId id>
  static inline void Visit(Map* map, HeapObject* obj);
};

class IncrementalMarkingObjectStatsVisitor
    : public StaticMarkingVisitor<IncrementalMarkingObjectStatsVisitor> {
 public:
  static void Initialize(VisitorDispatchTable<Callback>* original);

  template <VisitorId id>
  static inline void Visit(Map* map, HeapObject* obj);
};

}  // namespace internal
}  // namespace v8

#endif  // V8_HEAP_OBJECT_STATS_H_


text:
package binance

import (
	"testing"

	"github.com/stretchr/testify/suite"
)

type accountServiceTestSuite struct {
	baseTestSuite
}

func TestAccountService(t *testing.T) {
	suite.Run(t, new(accountServiceTestSuite))
}

func (s *accountServiceTestSuite) TestGetAccount() {
	data := []byte(`{
			"makerCommission": 15,
			"takerCommission": 15,
			"buyerCommission": 0,
			"sellerCommission": 0,
			"canTrade": true,
			"canWithdraw": true,
			"canDeposit": true,
			"updateTime": 123456789,
			"accountType": "SPOT",
			"balances": [
					{
							"asset": "BTC",
							"free": "4723846.89208129",
							"locked": "0.00000000"
					},
					{
							"asset": "LTC",
							"free": "4763368.68006011",
							"locked": "0.00000000"
					}
			],
			"permissions": [
				"SPOT"
			]
  }`)
	s.mockDo(data, nil)
	defer s.assertDo()
	s.assertReq(func(r *request) {
		e := newSignedRequest()
		s.assertRequestEqual(e, r)
	})

	res, err := s.client.NewGetAccountService().Do(newContext())
	s.r().NoError(err)
	e := &Account{
		MakerCommission:  15,
		TakerCommission:  15,
		BuyerCommission:  0,
		SellerCommission: 0,
		CanTrade:         true,
		CanWithdraw:      true,
		CanDeposit:       true,
		UpdateTime:       123456789,
		AccountType:      "SPOT",
		Balances: []Balance{
			{
				Asset:  "BTC",
				Free:   "4723846.89208129",
				Locked: "0.00000000",
			},
			{
				Asset:  "LTC",
				Free:   "4763368.68006011",
				Locked: "0.00000000",
			},
		},
		Permissions: []string{"SPOT"},
	}
	s.assertAccountEqual(e, res)
}

func (s *accountServiceTestSuite) assertAccountEqual(e, a *Account) {
	r := s.r()
	r.Equal(e.MakerCommission, a.MakerCommission, "MakerCommission")
	r.Equal(e.TakerCommission, a.TakerCommission, "TakerCommission")
	r.Equal(e.BuyerCommission, a.BuyerCommission, "BuyerCommission")
	r.Equal(e.SellerCommission, a.SellerCommission, "SellerCommission")
	r.Equal(e.CanTrade, a.CanTrade, "CanTrade")
	r.Equal(e.CanWithdraw, a.CanWithdraw, "CanWithdraw")
	r.Equal(e.CanDeposit, a.CanDeposit, "CanDeposit")
	r.Len(a.Balances, len(e.Balances))
	for i := 0; i < len(a.Balances); i++ {
		r.Equal(e.Balances[i].Asset, a.Balances[i].Asset, "Asset")
		r.Equal(e.Balances[i].Free, a.Balances[i].Free, "Free")
		r.Equal(e.Balances[i].Locked, a.Balances[i].Locked, "Locked")
	}
}

func (s *accountServiceTestSuite) TestGetAccountSnapshot() {
	data := []byte(`{
		"code":200,
		"msg":"",
		"snapshotVos":[
		   {
			  "data":{
				 "balances":[
					{
					   "asset":"BTC",
					   "free":"0.09905021",
					   "locked":"0.00000000"
					}
				 ],
				 "totalAssetOfBtc":"0.09942700"
			  },
			  "type":"spot",
			  "updateTime":1576281599000
		   }
		]
	}`)
	s.mockDo(data, nil)
	defer s.assertDo()

	accountType := "SPOT"
	startTime := int64(1498793709153)
	endTime := int64(1498793709156)
	limit := 1
	s.assertReq(func(r *request) {
		e := newSignedRequest().setParams(params{
			"type":      accountType,
			"startTime": startTime,
			"endTime":   endTime,
			"limit":     limit,
		})
		s.assertRequestEqual(e, r)
	})

	accSnapshot, err := s.client.NewGetAccountSnapshotService().Type(accountType).StartTime(startTime).EndTime(endTime).Limit(limit).
		Do(newContext())
	r := s.r()
	r.NoError(err)
	e := &Snapshot{
		Code: 200,
		Msg:  "",
		Snapshot: []*SnapshotVos{
			&SnapshotVos{
				Type:       "spot",
				UpdateTime: 1576281599000,
				Data: &SnapshotData{
					TotalAssetOfBtc: "0.09942700",
					Balances: []*SnapshotBalances{
						&SnapshotBalances{
							Asset:  "BTC",
							Free:   "0.09905021",
							Locked: "0.00000000",
						},
					},
				},
			},
		},
	}
	s.assertSnapshotAccountEqual(e, accSnapshot)
}

func (s *accountServiceTestSuite) assertSnapshotAccountEqual(e, a *Snapshot) {
	r := s.r()
	r.Equal(e.Code, a.Code, "Code")
	r.Equal(e.Msg, a.Msg, "Msg")
	for i := 0; i < len(a.Snapshot); i++ {
		r.Equal(e.Snapshot[i].Type, a.Snapshot[i].Type, "Type")
		r.Equal(e.Snapshot[i].UpdateTime, a.Snapshot[i].UpdateTime, "UpdateTime")
		r.Equal(e.Snapshot[i].Data.TotalAssetOfBtc, a.Snapshot[i].Data.TotalAssetOfBtc, "TotalAssetOfBtc")
		for j := 0; j < len(a.Snapshot[i].Data.Balances); j++ {
			r.Equal(e.Snapshot[i].Data.Balances[j].Asset, a.Snapshot[i].Data.Balances[j].Asset, "Asset")
			r.Equal(e.Snapshot[i].Data.Balances[j].Free, a.Snapshot[i].Data.Balances[j].Free, "Free")
			r.Equal(e.Snapshot[i].Data.Balances[j].Locked, a.Snapshot[i].Data.Balances[j].Locked, "Locked")
		}
	}
}

func (s *accountServiceTestSuite) TestGetAPIKeyPermission() {
	data := []byte(`{
   			"ipRestrict": false,
   			"createTime": 1623840271000,
   			"enableWithdrawals": false,
   			"enableInternalTransfer": true,
   			"permitsUniversalTransfer": true,
   			"enableVanillaOptions": false,
   			"enableReading": true,
   			"enableFutures": false,
   			"enableMargin": false,
   			"enableSpotAndMarginTrading": false,
   			"tradingAuthorityExpirationTime": 1628985600000
	}`)
	s.mockDo(data, nil)
	defer s.assertDo()
	s.assertReq(func(r *request) {
		e := newSignedRequest()
		s.assertRequestEqual(e, r)
	})

	res, err := s.client.NewGetAPIKeyPermission().Do(newContext())
	s.r().NoError(err)
	e := &APIKeyPermission{
		IPRestrict:                     false,
		CreateTime:                     1623840271000,
		EnableWithdrawals:              false,
		EnableInternalTransfer:         true,
		PermitsUniversalTransfer:       true,
		EnableVanillaOptions:           false,
		EnableReading:                  true,
		EnableFutures:                  false,
		EnableMargin:                   false,
		EnableSpotAndMarginTrading:     false,
		TradingAuthorityExpirationTime: 1628985600000,
	}
	s.assertAPIKeyPermissionEqual(e, res)
}

func (s *accountServiceTestSuite) assertAPIKeyPermissionEqual(e, a *APIKeyPermission) {
	r := s.r()
	r.Equal(e.IPRestrict, a.IPRestrict, "IPRestrict")
	r.Equal(e.CreateTime, a.CreateTime, "CreateTime")
	r.Equal(e.EnableWithdrawals, a.EnableWithdrawals, "EnableWithdrawals")
	r.Equal(e.EnableInternalTransfer, a.EnableInternalTransfer, "EnableInternalTransfer")
	r.Equal(e.PermitsUniversalTransfer, a.PermitsUniversalTransfer, "PermitsUniversalTransfer")
	r.Equal(e.EnableVanillaOptions, a.EnableVanillaOptions, "EnableVanillaOptions")
	r.Equal(e.EnableReading, a.EnableReading, "EnableReading")
	r.Equal(e.EnableFutures, a.EnableFutures, "EnableFutures")
	r.Equal(e.EnableMargin, a.EnableMargin, "EnableMargin")
	r.Equal(e.EnableSpotAndMarginTrading, a.EnableSpotAndMarginTrading, "EnableSpotAndMarginTrading")
	r.Equal(e.TradingAuthorityExpirationTime, a.TradingAuthorityExpirationTime, "TradingAuthorityExpirationTime")
}


text:
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/modules/webcodecs/decoder_selector.h"

#include "base/bind.h"
#include "base/check_op.h"
#include "base/notreached.h"
#include "base/task/single_thread_task_runner.h"
#include "media/base/channel_layout.h"
#include "media/base/demuxer_stream.h"
#include "media/filters/decrypting_demuxer_stream.h"
#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/wtf/functional.h"

namespace blink {

// Demuxing isn't part of WebCodecs. This shim allows us to reuse decoder
// selection logic from <video>.
// TODO(chcunningham): Maybe refactor DecoderSelector to separate dependency on
// media::DemuxerStream. DecoderSelection doesn't conceptually require a
// Demuxer. The tough part is re-working Decryptingmedia::DemuxerStream.
template <media::DemuxerStream::Type StreamType>
class NullDemuxerStream : public media::DemuxerStream {
 public:
  using DecoderConfigType =
      typename media::DecoderStreamTraits<StreamType>::DecoderConfigType;

  ~NullDemuxerStream() override = default;

  void Read(ReadCB read_cb) override { NOTREACHED(); }

  void Configure(DecoderConfigType config);

  media::AudioDecoderConfig audio_decoder_config() override {
    DCHECK_EQ(type(), media::DemuxerStream::AUDIO);
    return audio_decoder_config_;
  }

  media::VideoDecoderConfig video_decoder_config() override {
    DCHECK_EQ(type(), media::DemuxerStream::VIDEO);
    return video_decoder_config_;
  }

  Type type() const override { return stream_type; }

  bool SupportsConfigChanges() override {
    NOTREACHED();
    return true;
  }

  void set_low_delay(bool low_delay) { low_delay_ = low_delay; }
  media::DemuxerStream::Liveness liveness() const override {
    return low_delay_ ? media::DemuxerStream::LIVENESS_LIVE
                      : media::DemuxerStream::LIVENESS_UNKNOWN;
  }

 private:
  static const media::DemuxerStream::Type stream_type = StreamType;

  media::AudioDecoderConfig audio_decoder_config_;
  media::VideoDecoderConfig video_decoder_config_;
  bool low_delay_ = false;
};

template <>
void NullDemuxerStream<media::DemuxerStream::AUDIO>::Configure(
    DecoderConfigType config) {
  audio_decoder_config_ = config;
}

template <>
void NullDemuxerStream<media::DemuxerStream::VIDEO>::Configure(
    DecoderConfigType config) {
  video_decoder_config_ = config;
}

template <media::DemuxerStream::Type StreamType>
DecoderSelector<StreamType>::DecoderSelector(
    scoped_refptr<base::SequencedTaskRunner> task_runner,
    CreateDecodersCB create_decoders_cb,
    typename Decoder::OutputCB output_cb)
    : impl_(std::move(task_runner),
            std::move(create_decoders_cb),
            &null_media_log_),
      demuxer_stream_(new NullDemuxerStream<StreamType>()),
      stream_traits_(CreateStreamTraits()),
      output_cb_(output_cb) {
  impl_.Initialize(stream_traits_.get(), demuxer_stream_.get(),
                   nullptr /*CdmContext*/, media::WaitingCB());
}

template <media::DemuxerStream::Type StreamType>
DecoderSelector<StreamType>::~DecoderSelector() = default;

template <media::DemuxerStream::Type StreamType>
void DecoderSelector<StreamType>::SelectDecoder(
    const DecoderConfig& config,
    bool low_delay,
    SelectDecoderCB select_decoder_cb) {
  // |impl_| will internally use this the |config| from our NullDemuxerStream.
  demuxer_stream_->Configure(config);
  demuxer_stream_->set_low_delay(low_delay);

  // media::DecoderSelector will call back with a null decoder if selection is
  // in progress when it is destructed.
  impl_.SelectDecoder(
      WTF::Bind(&DecoderSelector<StreamType>::OnDecoderSelected,
                weak_factory_.GetWeakPtr(), std::move(select_decoder_cb)),
      output_cb_);
}

template <>
std::unique_ptr<WebCodecsAudioDecoderSelector::StreamTraits>
DecoderSelector<media::DemuxerStream::AUDIO>::CreateStreamTraits() {
  // TODO(chcunningham): Consider plumbing real hw channel layout.
  return std::make_unique<DecoderSelector::StreamTraits>(
      &null_media_log_, media::CHANNEL_LAYOUT_NONE);
}

template <>
std::unique_ptr<WebCodecsVideoDecoderSelector::StreamTraits>
DecoderSelector<media::DemuxerStream::VIDEO>::CreateStreamTraits() {
  return std::make_unique<DecoderSelector::StreamTraits>(&null_media_log_);
}

template <media::DemuxerStream::Type StreamType>
void DecoderSelector<StreamType>::OnDecoderSelected(
    SelectDecoderCB select_decoder_cb,
    std::unique_ptr<Decoder> decoder,
    std::unique_ptr<media::DecryptingDemuxerStream> decrypting_demuxer_stream) {
  DCHECK(!decrypting_demuxer_stream);

  // We immediately finalize decoder selection.
  // TODO(chcunningham): Rework this to do finalize after first frame
  // successfully decoded. This updates to match latest plans for spec
  // (configure() no longer takes a promise).
  impl_.FinalizeDecoderSelection();

  std::move(select_decoder_cb).Run(std::move(decoder));
}

template class MODULES_EXPORT DecoderSelector<media::DemuxerStream::VIDEO>;
template class MODULES_EXPORT DecoderSelector<media::DemuxerStream::AUDIO>;

}  // namespace blink


text:
<?php

/**
 * Instance of an infrastructure service
 *
 * @package    Zend_Cloud
 * @subpackage Infrastructure
 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
 * @license    http://framework.zend.com/license/new-bsd     New BSD License
 */
class Zend_Cloud_Infrastructure_Image
{
    const IMAGE_ID           = 'imageId';
    const IMAGE_OWNERID      = 'ownerId';
    const IMAGE_NAME         = 'name';
    const IMAGE_DESCRIPTION  = 'description';
    const IMAGE_PLATFORM     = 'platform';
    const IMAGE_ARCHITECTURE = 'architecture';
    const ARCH_32BIT         = 'i386';
    const ARCH_64BIT         = 'x86_64';
    const IMAGE_WINDOWS      = 'windows';
    const IMAGE_LINUX        = 'linux';

    /**
     * Image's attributes
     *
     * @var array
     */
    protected $attributes = array();

    /**
     * The Image adapter (if exists)
     *
     * @var object
     */
    protected $adapter;

    /**
     * Required attributes
     *
     * @var array
     */
    protected $attributeRequired = array(
        self::IMAGE_ID,
        self::IMAGE_DESCRIPTION,
        self::IMAGE_PLATFORM,
        self::IMAGE_ARCHITECTURE,
    );

    /**
     * Constructor
     *
     * @param array $data
     * @param object $adapter
     */
    public function __construct($data, $adapter = null)
    {
        if (is_object($data)) {
            if (method_exists($data, 'toArray')) {
                $data= $data->toArray();
            } elseif ($data instanceof Traversable) {
                $data = iterator_to_array($data);
            }
        }

        if (empty($data) || !is_array($data)) {
            require_once 'Zend/Cloud/Infrastructure/Exception.php';
            throw new Zend_Cloud_Infrastructure_Exception('You must pass an array of parameters');
        }

        foreach ($this->attributeRequired as $key) {
            if (empty($data[$key])) {
                require_once 'Zend/Cloud/Infrastructure/Exception.php';
                throw new Zend_Cloud_Infrastructure_Exception(sprintf(
                    'The param "%s" is a required parameter for class %s',
                    $key,
                    __CLASS__
                ));
            }
        }

        $this->attributes = $data;
        $this->adapter    = $adapter;
    }

    /**
     * Get Attribute with a specific key
     *
     * @param array $data
     * @return misc|boolean
     */
    public function getAttribute($key)
    {
        if (!empty($this->attributes[$key])) {
            return $this->attributes[$key];
        }
        return false;
    }

    /**
     * Get all the attributes
     *
     * @return array
     */
    public function getAttributes()
    {
        return $this->attributes;
    }

    /**
     * Get the image ID
     *
     * @return string
     */
    public function getId()
    {
        return $this->attributes[self::IMAGE_ID];
    }

    /**
     * Get the Owner ID
     *
     * @return string
     */
    public function getOwnerId()
    {
        return $this->attributes[self::IMAGE_OWNERID];
    }

    /**
     * Get the name
     *
     * @return string
     */
    public function getName()
    {
        return $this->attributes[self::IMAGE_NAME];
    }

    /**
     * Get the description
     *
     * @return string
     */
    public function getDescription()
    {
        return $this->attributes[self::IMAGE_DESCRIPTION];
    }

    /**
     * Get the platform
     *
     * @return string
     */
    public function getPlatform()
    {
        return $this->attributes[self::IMAGE_PLATFORM];
    }

    /**
     * Get the architecture
     *
     * @return string
     */
    public function getArchitecture()
    {
        return $this->attributes[self::IMAGE_ARCHITECTURE];
    }
}


text:
@extends('core::app.layout')

@section('scripts')

@stop

@section('content')

            @include('point-sales::app.sales.point.sales._breadcrumb')

Delivery Order

Request approval

Delivery Order

        @include('point-sales::app.sales.point.sales.delivery-order._menu')

        <form action="{{url('sales/point/indirect/delivery-order/send-request-approval')}}" method="post">
            {!! csrf_field() !!}

                        {!! $list_delivery_order->render() !!}

                                    <input type="checkbox" id="check-all">

                                Form Date
                                Form Number
                                Customer
                                Total Payment
                                Approval To
                                Last Request

                            @foreach($list_delivery_order as $delivery_order)

formulir_id}}">

                                        <input type="checkbox" name="formulir_id[]"
                                               value="{{$delivery_order->formulir_id}}">

                                    {{ date_format_view($delivery_order->formulir->form_date) }}

                                        id) }}">{{ $delivery_order->formulir->form_number}}

                                        person_id) }}">{{ $delivery_order->person->codeName}}

                                        {{ number_format_price($delivery_order->total_payment) }}

                                    {{  $delivery_order->formulir->approvalTo->name}}

                                        @if($delivery_order->formulir->request_approval_at != null)
                                            {{ date_format_view($delivery_order->formulir->request_approval_at, true) }}
                                        @else
                                            -
                                        @endif

                            @endforeach

                        {!! $list_delivery_order->render() !!}

                            <button type="submit" class="btn btn-effect-ripple btn-primary">Send Request</button>

        </form>

@stop


text:
'use strict';

const CommerceProcurementUtil = require('./commerceProcurementUtil');

async function getAccount(projectId, name) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const account = await procurementUtil.getAccount(name);
        return { success: true, data: account };
    } catch (err) {
        return { success: false, errors: ['Failed to retrieve account'] };
    }
}

async function approveAccount(projectId, name, approvalName, reason) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const approval = await procurementUtil.approveAccount(name, approvalName, reason);
        return { success: true, data: approval };
    } catch (err) {
        return { success: false, errors: ['Failed to approve account'] };
    }
}

async function rejectAccount(projectId, name, approvalName, reason) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const approval = await procurementUtil.rejectAccount(name, approvalName, reason);
        return { success: true, data: approval };
    } catch (err) {
        return { success: false, errors: ['Failed to reject account'] };
    }
}

async function resetAccount(projectId, name, approvalName, reason) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const approval = await procurementUtil.resetAccount(name);
        return { success: true, data: approval };
    } catch (err) {
        return { success: false, errors: ['Failed to reset account'] };
    }
}

async function listAccounts(projectId) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const accounts = await procurementUtil.listAccounts();
        return { success: true, data: accounts };
    } catch (err) {
        return { success: false, errors: ['Failed to retrieve accounts'] };
    }
}

async function getEntitlement(projectId, name) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const entitlement = await procurementUtil.getEntitlement(name);
        return { success: true, data: entitlement };
    } catch (err) {
        return { success: false, errors: ['Failed to retrieve entitlement'] };
    }
}

async function updateEntitlementMessage(projectId, name, message) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const entitlement = await procurementUtil.updateEntitlementMessage(name, message);
        return { success: true, data: entitlement };
    } catch (err) {
        return { success: false, errors: ['Failed to update entitlement'] };
    }
}

async function listEntitlements(projectId) {
    try {
        const procurementUtil = new CommerceProcurementUtil(projectId);
        const entitlements = await procurementUtil.listEntitlements();
        return { success: true, data: entitlements };
    } catch (err) {
        return { success: false, errors: ['Failed to retrieve entitlements'] };
    }
}

// REJECTED accounts can be APPROVED but not RESET.
// APPROVED accounts be be RESET.
const account1 = 'providers/cds-demo-2/accounts/E-FEA0-5C23-1B4F-9E5D';
const account2 = 'providers/cds-demo-2/accounts/E-41E2-CF7B-BA71-CA8B';
console.log('Starting');

getEntitlement('cds-demo-2', 'providers/cds-demo-2/entitlements/80b1302d-da6b-40c4-b527-a05a7722e0a5')
    .then((res) => {
        console.log(`getEntitlement:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);

updateEntitlementMessage('cds-demo-2', 'providers/cds-demo-2/entitlements/84b05068-01a9-4ca9-9943-b9babf0b5030', 'test message')
    .then((res) => {
        console.log(`updateEntitlementMessage:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);

listAccounts('cds-demo-2')
    .then((res) => {
        console.log(`listAccounts:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);

listEntitlements('cds-demo-2')
    .then((res) => {
        console.log(`listEntitlements:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);

getAccount('cds-demo-2', account1)
    .then((res) => {
        console.log(`getAccount:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);

/*
resetAccount('cds-demo-2', account1)
    .then((res) => {
        console.log(`resetAccount:\n${JSON.stringify(res, null, 3)}`);
        return approveAccount('cds-demo-2', account1, 'signup', 'test approve reason');
    })
    .catch(console.error);

approveAccount('cds-demo-2', account2)
    .then((res) => {
        console.log(`resetAccount:\n${JSON.stringify(res, null, 3)}`);
        return rejectAccount('cds-demo-2', account2, 'signup', 'test reject reason');
    })
    .catch(console.error);

approveAccount('cds-demo-2', account1, 'signup', 'test approve reason')
    .then((res) => {
        console.log(`approveAccount:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);

rejectAccount('cds-demo-2', account1, 'signup', 'test reject reason')
    .then((res) => {
        console.log(`rejectAccount:\n${JSON.stringify(res, null, 3)}`);
        return true;
    }).catch(console.error);
*/


text:
title: How to Draw a Moving Line Under the Mouse in RadChartView
description: An example demonstrating how a m line can be painted following the mouse position in RadChartView
type: how-to
page_title: How to Draw a Moving Line Under the Mouse in RadChartView
slug: chartview-moving-marker
position: 0
tags: mouse, annotation, chartview
res_type: kb
---

## Environment

|Product Version|Product|Author|
|----|----|----|
|2019.2.508|RadChartView for WinForms|[Hristo Merdjanov](https://www.telerik.com/blogs/author/hristo-merdjanov)|

## Description

An example demonstrating how a line can be painted in **RadChartView** following the mouse position.

## Solution

**RadChartView** already supports annotations. The solution in the article will update annotations collection upon moving the mouse.

>caption Figure 1: Annotation Following the Mouse
![chartview-moving-line 001](images/chartview-moving-line001.gif)

#### Implementation

````C#
public partial class RadFormAnnotation : Telerik.WinControls.UI.RadForm
{
    public RadFormAnnotation()
    {
        InitializeComponent();

        FluentTheme ft = new FluentTheme();
        ThemeResolutionService.ApplicationThemeName = ft.ThemeName;

        this.radChartView1.MouseMove += RadChartView1_MouseMove;

        CandlestickSeries candlestickSeries = new CandlestickSeries();
        candlestickSeries.DataPoints.Add(new OhlcDataPoint(.00010, .00011, .00007, .00008, DateTime.Now));
        candlestickSeries.DataPoints.Add(new OhlcDataPoint(.00008, .00009, .00005, .00009, DateTime.Now.AddDays(1)));
        candlestickSeries.DataPoints.Add(new OhlcDataPoint(.00012, .00012, .00009, .00010, DateTime.Now.AddDays(2)));
        candlestickSeries.DataPoints.Add(new OhlcDataPoint(.00007, .00010, .00006, .00009, DateTime.Now.AddDays(3)));

        this.radChartView1.Series.Add(candlestickSeries);
        this.radChartView1.Axes[1].LabelFormat = "{0:N5}";
    }

    private void RadChartView1_MouseMove(object sender, MouseEventArgs e)
    {
        object hValue = this.GetVerticalAxisValueFromMouse(e);

        this.radChartView1.Annotations.Clear();
        CartesianGridLineAnnotation annotation1 = new CartesianGridLineAnnotation();
        annotation1.Value = hValue;
        annotation1.Font = new Font("Arial", 12, FontStyle.Bold);
        annotation1.Axis = this.radChartView1.Axes[1] as CartesianAxis;
        annotation1.BorderColor = Color.Red;
        annotation1.BorderDashStyle = DashStyle.Dash;
        annotation1.BorderWidth = 2;
        annotation1.Label = ((double)hValue).ToString("N5");
        this.radChartView1.Annotations.Add(annotation1);
    }

    private object GetVerticalAxisValueFromMouse(MouseEventArgs e)
    {
        LinearAxis axis = radChartView1.Axes[1] as LinearAxis;
        double delta = axis.ActualRange.Maximum - axis.ActualRange.Minimum;
        double totalHeight = axis.Model.LayoutSlot.Height;
        double ratio = 1 - (e.Location.Y - this.radChartView1.Area.View.Viewport.Y - axis.Model.LayoutSlot.Y) / totalHeight;
        double value = axis.ActualRange.Minimum + delta * ratio;

        return value;
    }
}

````
````VB.NET
Partial Public Class RadForm1

    Public Sub New()
        InitializeComponent()

        AddHandler Me.RadChartView1.MouseMove, AddressOf RadChartView1_MouseMove
        Dim candlestickSeries As CandlestickSeries = New CandlestickSeries()
        candlestickSeries.DataPoints.Add(New OhlcDataPoint(0.0001, 0.00011, 0.00007, 0.00008, DateTime.Now))
        candlestickSeries.DataPoints.Add(New OhlcDataPoint(0.00008, 0.00009, 0.00005, 0.00009, DateTime.Now.AddDays(1)))
        candlestickSeries.DataPoints.Add(New OhlcDataPoint(0.00012, 0.00012, 0.00009, 0.0001, DateTime.Now.AddDays(2)))
        candlestickSeries.DataPoints.Add(New OhlcDataPoint(0.00007, 0.0001, 0.00006, 0.00009, DateTime.Now.AddDays(3)))
        Me.RadChartView1.Series.Add(candlestickSeries)
        Me.RadChartView1.Axes(1).LabelFormat = "{0:N5}"
    End Sub

    Private Sub RadChartView1_MouseMove(ByVal sender As Object, ByVal e As MouseEventArgs)
        Dim hValue As Object = Me.GetVerticalAxisValueFromMouse(e)
        Me.RadChartView1.Annotations.Clear()
        Dim annotation1 As CartesianGridLineAnnotation = New CartesianGridLineAnnotation()
        annotation1.Value = hValue
        annotation1.Font = New Font("Arial", 12, FontStyle.Bold)
        annotation1.Axis = TryCast(Me.RadChartView1.Axes(1), CartesianAxis)
        annotation1.BorderColor = Color.Red
        annotation1.BorderDashStyle = DashStyle.Dash
        annotation1.BorderWidth = 2
        annotation1.Label = (CDbl(hValue)).ToString("N5")
        Me.RadChartView1.Annotations.Add(annotation1)
    End Sub

    Private Function GetVerticalAxisValueFromMouse(ByVal e As MouseEventArgs) As Object
        Dim axis As LinearAxis = TryCast(RadChartView1.Axes(1), LinearAxis)
        Dim delta As Double = axis.ActualRange.Maximum - axis.ActualRange.Minimum
        Dim totalHeight As Double = axis.Model.LayoutSlot.Height
        Dim ratio As Double = 1 - (e.Location.Y - Me.RadChartView1.Area.View.Viewport.Y - axis.Model.LayoutSlot.Y) / totalHeight
        Dim value As Double = axis.ActualRange.Minimum + delta * ratio
        Return value
    End Function
End Class

````

# See Also

* [RadChartView Annotations]({%slug winforms/chartview-/features/annotations%})


text:
<?php

/**
 * @license    GPL 2 (http://www.gnu.org/licenses/gpl.html)
 *
 * @author Robert Bogenschneider <bogi@uea.org>
 * @author Robert Bogenschneider <robog@gmx.de>
 */
$lang['noheader']              = 'Ne montri la unuan alineon de inkluditaj paĝoj/sekcioj';
$lang['firstseconly']          = 'montri nur la unuan sekcion de inkluditaj paĝoj';
$lang['showtaglogos']          = 'montri bildon por la unua etikedo';
$lang['showfooter']            = 'montri informojn pri inkludita paĝo sube';
$lang['showlink']              = 'ligilo al la unua kaplinio de inkludita paĝo';
$lang['showpermalink']         = 'montri permaligilojn sub inkludita paĝo';
$lang['showdate']              = 'montri daton sub inkludita paĝo';
$lang['showmdate']             = 'montri modif-daton sub inkludita paĝo';
$lang['showuser']              = 'montri uzantonomojn sub inkludita paĝo';
$lang['showcomments']          = 'montri komentojn sub inkludita paĝo (kromaĵo discussion bezonata)';
$lang['showlinkbacks']         = 'montri retroligilojn sub inkludita paĝo (kromaĵo linkback bezonata)';
$lang['showtags']              = 'montri etikedojn sub inkludita paĝo (kromaĵo tag bezonata)';
$lang['showeditbtn']           = 'montri butonon por modifi';
$lang['doredirect']            = 'redirekti al la origina paĝo post modifado de la inkludita paĝo';
$lang['doindent']              = 'ŝovi inkluditajn paĝojn relative al la inkludanta paĝo';
$lang['linkonly']              = 'nur ligi, ne montri la enhavon de la inkludita paĝo';
$lang['title']                 = 'uzi la unuan titolon de paĝo en ligilo eĉ se useheading estas blokita (koncernas nur linkonly-moduson)';
$lang['pageexists']            = 'ne montri ligilon, se la paĝo ne ekzistas (koncernas nur linkonly-moduson)';
$lang['parlink']               = 'meti alineon ĉirkaŭ ligilon (koncernas nur linkonly-moduson)';
$lang['safeindex']             = 'eviti indeksadon de metadatumoj de nepublikaj inkluditaj paĝoj';
$lang['order']                 = 'ordigi inkludojn de multaj paĝoj laŭ';
$lang['order_o_id']            = 'paĝnomo';
$lang['order_o_title']         = 'titolo';
$lang['order_o_created']       = 'krea dato';
$lang['order_o_modified']      = 'modifa dato';
$lang['order_o_indexmenu']     = 'propra ordo per indexmenu-sintakso';
$lang['order_o_custom']        = 'propra ordo per include-sintakso';
$lang['rsort']                 = 'inversigi la ordon de la inkluditaj paĝoj';
$lang['depth']                 = 'maksimuma profundeco de nomspaco-inkludoj, 0 por senlima profundeco';
$lang['readmore']              = 'Ĉu montri la \'Legi plu\'-ligilon por la opcio unua alineo';


text:
"""The volume encryption metadata extension."""

from cinder.api import extensions
from cinder.api.openstack import wsgi
from cinder import db
from cinder import objects
from cinder.policies import volumes as policy

class VolumeEncryptionMetadataController(wsgi.Controller):
    """The volume encryption metadata API extension."""

    def index(self, req, volume_id):
        """Returns the encryption metadata for a given volume."""
        context = req.environ['cinder.context']
        volume = objects.Volume.get_by_id(context, volume_id)
        context.authorize(policy.ENCRYPTION_METADATA_POLICY,
                          target_obj=volume)
        return db.volume_encryption_metadata_get(context, volume_id)

    def show(self, req, volume_id, id):
        """Return a single encryption item."""
        encryption_item = self.index(req, volume_id)
        if encryption_item is not None:
            return encryption_item[id]
        else:
            return None

class Volume_encryption_metadata(extensions.ExtensionDescriptor):
    """Volume encryption metadata retrieval support."""

    name = "VolumeEncryptionMetadata"
    alias = "os-volume-encryption-metadata"
    updated = "2013-07-10T00:00:00+00:00"

    def get_resources(self):
        resources = []
        res = extensions.ResourceExtension(
            'encryption', VolumeEncryptionMetadataController(),
            parent=dict(member_name='volume', collection_name='volumes'))
        resources.append(res)
        return resources


text:
package ex02.pymont;

import java.io.File;

public class Constants {
	public static final String WEB_ROOT = System.getProperty("user.dir") + File.separator + "webroot";
}


text:
package org.scalajs.linker.interface

/** Kind of module structure emitted for the Scala.js output. */
abstract class ModuleKind private ()

object ModuleKind {

  /** All the available module kinds.
   *
   *  They are listed in decreasing order of "importance", as judged by
   *  whoever maintains the back-ends.
   */
  val All: List[ModuleKind] = List(
      NoModule,
      ESModule,
      CommonJSModule)

  /** No module structure.
   *
   *  With this module kind, exports are stored on the global object.
   *
   *  Imports are not supported.
   */
  case object NoModule extends ModuleKind

  /** An ECMAScript 2015 module.
   *
   *  Scala.js imports and exports directly map to `import` and `export`
   *  clauses in the ES module.
   */
  case object ESModule extends ModuleKind

  /** A CommonJS module (notably used by Node.js).
   *
   *  Imported modules are fetched with `require`. Exports go to the `exports`
   *  module-global variable.
   */
  case object CommonJSModule extends ModuleKind

  private[interface] implicit object ModuleKindFingerprint
      extends Fingerprint[ModuleKind] {

    override def fingerprint(moduleKind: ModuleKind): String = {
      moduleKind match {
        case NoModule       => "NoModule"
        case ESModule       => "ESModule"
        case CommonJSModule => "CommonJSModule"
      }
    }
  }
}


text:
from openturns import *

TESTPREAMBLE()
RandomGenerator.SetSeed(0)

try:
    # Instanciate one distribution object
    f = NumericalMathFunction("x", "x^2 + 2 * sin(x)")
    distribution = CompositeDistribution(f, Normal())
    print "Distribution ", repr(distribution)
    print "Distribution ", distribution

    # Is this distribution elliptical ?
    print "Elliptical = ", distribution.isElliptical()

    # Is this distribution continuous ?
    print "Continuous = ", distribution.isContinuous()

    # Test for realization of distribution
    oneRealization = distribution.getRealization()
    print "oneRealization=", oneRealization

    # Test for sampling
    size = 10000
    oneSample = distribution.getSample(size)
    print "oneSample first=", oneSample[0], " last=", oneSample[size - 1]
    print "mean=", oneSample.computeMean()
    print "covariance=", oneSample.computeCovariance()
    # RandomGenerator::SetSeed(0)
    size = 100
    for i in range(2):
        msg = ''
        if FittingTest.Kolmogorov(distribution.getSample(size), distribution).getBinaryQualityMeasure():
            msg = "accepted"
        else:
            msg = "rejected"
        print "Kolmogorov test for the generator, sample size=", size, " is", msg
        size *= 10

    # Define a point
    point = NumericalPoint(distribution.getDimension(), 1.0)
    print "Point= ", point

    # Show PDF and CDF of point
    eps = 1e-5
    DDF = distribution.computeDDF(point)
    print "ddf     =", DDF
    LPDF = distribution.computeLogPDF(point)
    print "log pdf= %.12g" % LPDF
    PDF = distribution.computePDF(point)
    print "pdf     = %.12g" % PDF
    print "pdf (FD)= %.12g" % ((distribution.computeCDF(point + NumericalPoint(1, eps)) - distribution.computeCDF(point + NumericalPoint(1, -eps))) / (2.0 * eps))
    CDF = distribution.computeCDF(point)
    print "cdf= %.12g" % CDF
    CCDF = distribution.computeComplementaryCDF(point)
    print "ccdf= %.12g" % CCDF
    Survival = distribution.computeSurvivalFunction(point)
    print "survival= %.12g" % Survival
    quantile = distribution.computeQuantile(0.95)
    print "quantile=", quantile
    print "cdf(quantile)= %.12g" % distribution.computeCDF(quantile)
    quantileTail = distribution.computeQuantile(0.95, True)
    print "quantile (tail)=", quantileTail
    CDFTail = distribution.computeComplementaryCDF(quantileTail)
    print "cdf (tail)= %.12g" % CDFTail
    CF = distribution.computeCharacteristicFunction(point[0])
    print "characteristic function=(%.6g+%.6gj)" % (CF.real, CF.imag)
    LCF = distribution.computeLogCharacteristicFunction(point[0])
    print "log characteristic function=(%.6g+%.6gj)" % (LCF.real, LCF.imag)
    PDFgr = distribution.computePDFGradient(point)
    print "pdf gradient     =", PDFgr
    CDFgr = distribution.computeCDFGradient(point)
    print "cdf gradient     =", CDFgr
    mean = distribution.getMean()
    print "mean=", mean
    standardDeviation = distribution.getStandardDeviation()
    print "standard deviation=", standardDeviation
    skewness = distribution.getSkewness()
    print "skewness=", skewness
    kurtosis = distribution.getKurtosis()
    print "kurtosis=", kurtosis
    covariance = distribution.getCovariance()
    print "covariance=", covariance
    correlation = distribution.getCorrelation()
    print "correlation=", correlation
    spearman = distribution.getSpearmanCorrelation()
    print "spearman=", spearman
    kendall = distribution.getKendallTau()
    print "kendall=", kendall
    parameters = distribution.getParametersCollection()
    print "parameters=", parameters
    for i in range(6):
        print "standard moment n=", i, ", value=", distribution.getStandardMoment(i)
    print "Standard representative=", distribution.getStandardRepresentative()

    # Specific to this distribution
    antecedent = distribution.getAntecedent()
    print "antecedent=", antecedent
    function = distribution.getFunction()
    print "function=", function
    newDistribution = CompositeDistribution(function, antecedent)
    print "newDistribution=", newDistribution

except:
    import sys
    print "t_CompositeDistribution_std.py", sys.exc_type, sys.exc_value


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Proc. Acad. nat. Sci. Philad. 43: 89 (1891)

#### Original name
Cercospora acnidae Ellis & Everh.

### Remarks
null


text:
<use:element path="sendit:partial/attach" as="email:attach"/>
<use:element path="sendit:partial/embed" as="email:embed"/>
<use:element path="sendit:partial/image" as="email:image"/>


text:
import * as db from '../../helpers/db';
import _ from 'lodash';
import config from '../../config';
import constants from '../../constants';

export default function validateName(req) {
  return new Promise((resolve, reject) => {
    const user = req.session.user;
    if (!user) {
      return reject(constants.errors.USER_NOT_LOGGED_IN)
    }

    const pageName = req.query.name;
    if (!pageName) {
      return reject(constants.errors.MISSING_PARAMS)
    }

    const filter = {name: pageName};
    db.find(config.classes.vertexPage, filter)
      .then((result) => {
        if(result.length) {
          if (req.query.id) {
            filter['@rid'] = req.query.id;
            db.find(config.classes.vertexPage, filter)
              .then((result) => {
                resolve(!result.length);
              });
          } else {
            resolve(true);
          }
        } else {
          resolve(false);
        }
      })
      .catch((err) => {
        reject(err);
      });
  });
}


text:
describe('List Test', () => {

    beforeEach(module('marvelAPI'));

    describe('Smoke Test',() => {
        let listController,consts, $httpBackend, stateparams, service;

        beforeEach( () => {
            angular.mock.inject(($controller,$rootScope, _$httpBackend_, _apiRequestService_) => {
                $httpBackend = _$httpBackend_;
                stateparams = { url: 'comics' }
                $httpBackend.expectGET(`http://localhost:8000/#/list/${stateparams.url}`).respond('SUCCESS');
                consts = $rootScope.consts;
                service = _apiRequestService_
                listController = $controller('listController',{ $stateParams:stateparams, consts:consts, apiRequestService:service });

            })
        })

        it('Should Exist filter', () => {
             expect(listController.filter).toBeDefined();
        });
        it('Should Exist listName', () => {
             expect(listController.listName).toBeDefined();
        });
        it('Should Exist limits', () => {
             expect(listController.limits).toBeDefined();
        });
        it('Should Exist callbackSuccessFunction', () => {
             expect(listController.callbackSuccessFunction).toBeDefined();
        });
        it('Should Exist nextPage', () => {
             expect(listController.nextPage).toBeDefined();
        });
        it('Should Exist prevPage', () => {
             expect(listController.prevPage).toBeDefined();
        });
        it('Should Exist limitFilterChange', () => {
             expect(listController.limitFilterChange).toBeDefined();
        });
        it('Should Exist listRequest', () => {
             expect(listController.listRequest).toBeDefined();
        });
    });

    describe('listName Test',() => {

        let listController,consts, $httpBackend, stateparams, service;
        beforeEach( () => {
            angular.mock.inject(($controller,$rootScope, _$httpBackend_, _apiRequestService_) => {
                $httpBackend = _$httpBackend_;
                stateparams = { url : 'comics'}
                consts = $rootScope.consts;
                service = _apiRequestService_
                listController = $controller('listController',{ $stateParams:stateparams, consts:consts, apiRequestService:service });
            })
        });

        it('should listName return comics', () => {
            expect(listController.listName).toEqual('comics')
        });

    });

    describe('filters Test',() => {

        let listController,consts, $httpBackend, stateparams, service;
        beforeEach( () => {
            angular.mock.inject(($controller,$rootScope, _$httpBackend_, _apiRequestService_) => {
                $httpBackend = _$httpBackend_;
                stateparams = { url : 'comics', filters: { format: 'comics', orderBy : 'title', test:'123' } }
                consts = $rootScope.consts;
                service = _apiRequestService_
                listController = $controller('listController',{ $stateParams:stateparams, consts:consts, apiRequestService:service });
            })
        });

        it('should filter return return the correct object with foramt,title,limit,and offset', () => {
            var filterResponse = { limit: 10, offset: 0, format: 'comics', orderBy: 'title', test:'123'  };
            expect(listController.filter).toEqual(filterResponse)
        });

    });

});


text:
"""
Interface for an output.
"""
from __future__ import unicode_literals
from abc import ABCMeta, abstractmethod
from six import with_metaclass
from prompt_toolkit.layout.screen import Size

__all__ = (
    'Output',
)

class Output(with_metaclass(ABCMeta, object)):
    """
    Base class defining the output interface for a
    :class:`~prompt_toolkit.renderer.Renderer`.

    Actual implementations are
    :class:`~prompt_toolkit.terminal.vt100_output.Vt100_Output` and
    :class:`~prompt_toolkit.terminal.win32_output.Win32Output`.
    """
    @abstractmethod
    def fileno(self):
        " Return the file descriptor to which we can write for the output. "

    @abstractmethod
    def encoding(self):
        """
        Return the encoding for this output, e.g. 'utf-8'.
        (This is used mainly to know which characters are supported by the
        output the data, so that the UI can provide alternatives, when
        required.)
        """

    @abstractmethod
    def write(self, data):
        " Write text (Terminal escape sequences will be removed/escaped.) "

    @abstractmethod
    def write_raw(self, data):
        " Write text. "

    @abstractmethod
    def set_title(self, title):
        " Set terminal title. "

    @abstractmethod
    def clear_title(self):
        " Clear title again. (or restore previous title.) "

    @abstractmethod
    def flush(self):
        " Write to output stream and flush. "

    @abstractmethod
    def erase_screen(self):
        """
        Erases the screen with the background colour and moves the cursor to
        home.
        """

    @abstractmethod
    def enter_alternate_screen(self):
        " Go to the alternate screen buffer. (For full screen applications). "

    @abstractmethod
    def quit_alternate_screen(self):
        " Leave the alternate screen buffer. "

    @abstractmethod
    def enable_mouse_support(self):
        " Enable mouse. "

    @abstractmethod
    def disable_mouse_support(self):
        " Disable mouse. "

    @abstractmethod
    def erase_end_of_line(self):
        """
        Erases from the current cursor position to the end of the current line.
        """

    @abstractmethod
    def erase_down(self):
        """
        Erases the screen from the current line down to the bottom of the
        screen.
        """

    @abstractmethod
    def reset_attributes(self):
        " Reset color and styling attributes. "

    @abstractmethod
    def set_attributes(self, attrs):
        " Set new color and styling attributes. "

    @abstractmethod
    def disable_autowrap(self):
        " Disable auto line wrapping. "

    @abstractmethod
    def enable_autowrap(self):
        " Enable auto line wrapping. "

    @abstractmethod
    def cursor_goto(self, row=0, column=0):
        " Move cursor position. "

    @abstractmethod
    def cursor_up(self, amount):
        " Move cursor `amount` place up. "

    @abstractmethod
    def cursor_down(self, amount):
        " Move cursor `amount` place down. "

    @abstractmethod
    def cursor_forward(self, amount):
        " Move cursor `amount` place forward. "

    @abstractmethod
    def cursor_backward(self, amount):
        " Move cursor `amount` place backward. "

    @abstractmethod
    def hide_cursor(self):
        " Hide cursor. "

    @abstractmethod
    def show_cursor(self):
        " Show cursor. "

    def ask_for_cpr(self):
        """
        Asks for a cursor position report (CPR).
        (VT100 only.)
        """

    def bell(self):
        " Sound bell. "

    def enable_bracketed_paste(self):
        " For vt100 only. "

    def disable_bracketed_paste(self):
        " For vt100 only. "

class DummyOutput(Output):
    """
    For testing. An output class that doesn't render anything.
    """
    def fileno(self):
        " There is no sensible default for fileno(). "
        raise NotImplementedError

    def encoding(self):
        return 'utf-8'

    def write(self, data): pass
    def write_raw(self, data): pass
    def set_title(self, title): pass
    def clear_title(self): pass
    def flush(self): pass
    def erase_screen(self): pass
    def enter_alternate_screen(self): pass
    def quit_alternate_screen(self): pass
    def enable_mouse_support(self): pass
    def disable_mouse_support(self): pass
    def erase_end_of_line(self): pass
    def erase_down(self): pass
    def reset_attributes(self): pass
    def set_attributes(self, attrs): pass
    def disable_autowrap(self): pass
    def enable_autowrap(self): pass
    def cursor_goto(self, row=0, column=0): pass
    def cursor_up(self, amount): pass
    def cursor_down(self, amount): pass
    def cursor_forward(self, amount): pass
    def cursor_backward(self, amount): pass
    def hide_cursor(self): pass
    def show_cursor(self): pass
    def ask_for_cpr(self): pass
    def bell(self): pass
    def enable_bracketed_paste(self): pass
    def disable_bracketed_paste(self): pass

    def get_size(self):
        return Size(rows=40, columns=80)


text:
using Abp.Dependency;
using Abp.Extensions;
using Abp.MultiTenancy;
using Microsoft.AspNetCore.Http;

namespace Abp.AspNetCore.MultiTenancy
{
    public class HttpCookieTenantResolveContributer : ITenantResolveContributer, ITransientDependency
    {
        private readonly IHttpContextAccessor _httpContextAccessor;

        public HttpCookieTenantResolveContributer(IHttpContextAccessor httpContextAccessor)
        {
            _httpContextAccessor = httpContextAccessor;
        }

        public int? ResolveTenantId()
        {
            var httpContext = _httpContextAccessor.HttpContext;
            if (httpContext == null)
            {
                return null;
            }

            var tenantIdValue = httpContext.Request.Cookies[MultiTenancyConsts.TenantIdResolveKey];
            if (tenantIdValue.IsNullOrEmpty())
            {
                return null;
            }

            int tenantId;
            return !int.TryParse(tenantIdValue, out tenantId) ? (int?) null : tenantId;
        }
    }
}