## Stationary Distribution of a Markov Process defined on the space of permutations

Let $$S$$ be the set of $$n!$$ permutations of the first $$n$$ integers. Let $$p\in(0,1)$$. Consider the Markov Process defined on the elements of $$S$$.

1. Let $$x\in S$$. Choose two distinct integers $$1\le i uniformly at random among the $$n(n+1)/2$$ possible combinations.
2. If $$x_i < x_j$$, swap $$x_i$$ and $$x_j$$ with probability $$p$$, otherwise do nothing. If $$x_i > x_j$$, swap $$x_i$$ and $$x_j$$ with probability $$1-p$$, otherwise do nothing.

This process is ergodic, because there is path between any two states with non-zero probability. It has a stationary distribution. I conjecture that the stationary distribution of $$p(x)$$ depends only on $$p$$ and on the number of mis-rankings of $$x$$, defined as $$\sum_{i\le j} 1\{x_i < x_j\}$$. But am not able to prove it. I also wonder whether this simple model has been studied somewhere, maybe in Statistical Mechanics. Any literature reference is appreciated.

## compiler defined move constructor with destructor

As per the link [Move-ctor][1], compiler does not generate a default move constructor if we have a user defined destructor.

Code snippet:

 class General { public:     ~General();     General();     void testInitList(); };  int main(int argc, char **argv) {     General b(std::move(General()));     General g = std::move(b);     g.testInitList();     return 0; } 

The code compiles implying that the compiler generated a default move constructor. The code was compiled using gcc version 5.4.0.

Could someone explain why the compiler generated a move constructor and move assignment operator in this case despite have a destructor?

Best, Rahul

I’m building my own theme to be used with Angular 4 and can’t tell where/why Drupal is deciding to import jQuery.

Here’s the code for my theme, loosely based off this Angular 1 theme:

ng.info.yml

name: ng type: theme libraries:   - ng/base description: 'An theme that makes Angular do all the work' core: 8.x 

ng.libraries.yml

base:   version: 8.x   js:     js/inline.bundle.js: {}     js/polyfills.bundle.js: {}     js/styles.bundle.js: {}     js/vendor.bundle.js: {}     js/main.bundle.js: {} 

ng.module

<?php function ng_theme() {   return array(     'ng_view' => array(       'template' => 'view',       'variables' => array('title' => NULL),     ),   ); } 

ng.routing.yml

ng.view:   path: 'ng'   defaults:     _title: 'Drupal Angular'     _controller: '\Drupal\ng\Controller\DrupalNgController::viewDrupalNg'   requirements:     _permission: 'access content' 

src/Controller/DrupalNgController

namespace Drupal\ng\Controller; use Drupal\Core\Controller\ControllerBase; class DrupalNgController extends ControllerBase {   public function viewDrupalNg() {     $build['myelement'] = array( '#theme' => 'ng_view', );$  build['myelement']['#attached']['library'][] = 'ng/inline.bundle';     $build['myelement']['#attached']['library'][] = 'ng/polyfills.bundle';$  build['myelement']['#attached']['library'][] = 'ng/styles.bundle';     $build['myelement']['#attached']['library'][] = 'ng/vendor.bundle';$  build['myelement']['#attached']['library'][] = 'ng/main.bundle';     return $build; } }  templates/view.html.twig <html{{ html_attributes }}> <head> <title>Angular app</title> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> <meta name="HandheldFriendly" content="true" /> <meta name="apple-touch-fullscreen" content="YES" /> </head> <body> <app-root></app-root> </body> </html>  ## How to get text using dbutils.widget.text defined in function using python in databricks i have to get widget text value using dbutils.widget.text which is defined in function which is given in following code.after creating the function i’m getting the attribute error. Can anyone help me on this issue? class WidgetTest: def __init__(self,dbutils,getArgument): self.dbutils=dbutils self.getArgument=getArgument def Get_Widget_text_test(self): self.dbutils.widget.text("kPath","","") self.dbutils.widget.get("kPath") self.getArgument("kPath") wid=WidgetTest(dbutils,getArgument) text1=wid.Get_Widget_text_test()  ## ReferenceError: prompt is not defined Olá, sou novato em JS, estou usando VSCODE no notebook, e estou com uma dúvida. Fui fazer um código em Javascript do curso EAD, e o professor passou um exemplo em que no final dizia o seguinte: ReferenceError: prompt is not defined Procurei na net sobre, alguns posts em inglês diziam algo sobre extensão js hint, tentei e nada dá certo até o momento… Segue o exemplo de código: /* 1. Elabore um programa para realizar vendas de produtos, para isso escreva uma função construtora:para definição de uma Venda, contendo as seguintes propriedades e métodos: a) propriedades: totalVendas e totalDescontos, ambas numéricas; b) método: calculaFaturamento o qual retorna o total de vendas menos os descontos concedidos. */ var Venda = function(totalVendas, totalDescontos){ this.totalVendas = totalVendas; this.totalDescontos = totalDescontos; } Venda.prototype.calculaFaturamento = function(){ return this.totalVendas – this.totalDescontos; } /* 2. No mesmo programa, declare dois objetos do tipo Venda. a) leia os totais de vendas e descontos para cada objeto. b) Mostre na tela o faturamento obtido em cada venda. */ //Primeiro devemos ler o total da venda e os descontos. var totalVenda1 = prompt(“Informe o total da primeira venda”); totalVenda1 = parseFloat(totalVenda1);//Note que devemos converter para um Number. var totalDescontos1 = prompt(“Informe o total de descontos da primeira venda”); totalDescontos1 = parseFloat(totalDescontos1); //Agora cria o objeto com a função construtora. var venda1 = new Venda(totalVenda1, totalDescontos1); //Fazemos as mesmas operações para criar a segunda venda. var totalVenda2 = prompt(“Informe o total da segunda venda”); totalVenda2 = parseFloat(totalVenda2); var totalDescontos2 = prompt(“Informe o total de descontos da segunda venda”); totalDescontos2 = parseFloat(totalDescontos2); var venda2 = new Venda(totalVenda2, totalDescontos2); //Agora vamos mostrar os faturamentos de cada venda. alert(“O faturamento da primeira venda foi R$ ” + venda1.toFixed(2));

//Mostramos com duas casas decimais.

alert(“O faturamento da segunda venda foi R\$ ” + venda2.toFixed(2));

Aqui termina o código… aí no output aparece isso:

## How is functional property guaranteed in type theory when function type is defined?

I understand that functions are not defined in type theory the same way they are defined in set theory, hence functional property is not directly defined when defining function type in type theory. But I want to know which part of function type definition in type theory guarantees functional property even if it is done so indirectly and implicitly?

## Cousin Problem – Hypersurface is defined by holomorphic function

how do I show that any hypersurface $$D \subset \mathbb{C}^n$$ is the defined by a global holomorphic function $$f: \mathbb{C}^n \rightarrow \mathbb{C}^n$$?

This is an exercise from Daniel Huybrechts’ “Complex Geometry: An Introduction” and there the exercise says one should use the Poincaré lemma to prove this statement.

## algorithm for grouping elements (defined by time range, weight, location) based on time range overlap (groups are constrained by params)?

Let each element be an individual. Consider that an individual is defined such that each individual has a time range, weight, and location.

The goal is to group together individuals whose time ranges overlap while ensuring that, within the group, the sum of the weights of the individuals do not exceed a certain threshold. At the same time, it is desirable to minimize the total distance between the individuals in the group. As many individuals as necessary can be placed into a group as long as the weight constraint is met.

The goal is to have as many individuals grouped (that is at minimum paired) as possible while minimizing the total distance between individuals in groups.

For example, consider an example in the discrete time case where there are ten time intervals. [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. The weight threshold is 4 and the location of the individuals are points on the 1-D line of integers. Say that we have the following individuals:

A: time range: [1, 2, 3] | weight: 1 | location: 1 B: time range: [2, 3, 4] | weight: 2 | location: 2 C: time range: [4, 5, 6] | weight: 2 | location: -3 D: time range: [4, 5, 6] | weight: 3 | location: -3 

Note:

• A and C cannot be grouped because they do not have overlapping time ranges.
• grouping together A and B gives is preferable to grouping together B and C because A and B are closer together.
• C and D cannot be grouped because the sum of their weights exceed 4. Does any one have a recommended algorithm for solving a problem like this?

I’ve looked at the examples in (Studies in Computational Intelligence 666) Michael Mutingi, Charles Mbohwa (auth.) – Grouping Genetic Algorithms_ Advances and Applications-Springer International Publishing (2017). However, none of the grouping algorithms seem very fitting.

## main.CRITICAL: Email template ” is not defined. at /public_html/vendor/magento/module-email/Model/Template/Config.php:225)”} []]

in my exception.log i see this error message, I am unable to trace where the exception came from.

magento: 2.2.6

main.CRITICAL: Email template '' is not defined. {"exception":"[object] (UnexpectedValueException(code: 0): Email template '' is not defined. at /public_html/vendor/magento/module-email/Model/Template/Config.php:225)"} [] 

## Can spin structures and Arf invariants be defined in terms of local quantities, like Chern classes and Chern numbers?

I’m interested in if it’s possible to represent a spin structure and the Arf invariant associated to it in terms of some sort of local fields.

For example, the first Chern class of a complex line bundle on a manifold is some element of $$H^2(X,\mathbb{Z})$$, which on a 2d manifold equivalent to specifying an integer, the Chern number $$c_1 \in \mathbb{Z}$$.

All of these concepts have local interpretations after putting a $$U(1)$$ connection on the bundle, in terms of the connection 1-form $$A_\mu dx^\mu$$ and the curvature 2-form field on the manifold, $$F = (\partial_\mu A_\nu) dx^\mu \wedge \ dx^\nu$$. In this case, the Chern class can be thought of as $$\frac{1}{2\pi}F \in H^2(X,\mathbb{Z}) \subset H^2_\text{(de Rham)}(X,\mathbb{R})$$. And the Chern number is given as the integral of this local quantity, $$c_1 = \frac{1}{2\pi}\int_X F$$.

I was curious whether or not there was an analogous interpretation of a spin structure and the Arf invariant.

From my (pedestrian, physics) point of view (as explained in this paper), a spin structure is an element $$\rho \in H_1(X,\mathbb{Z}_2)$$ which specifies periodic or antiperiodic boundary conditions on each nontrivial cycle, and the Arf invariant is $$(-1)^{ind(D_\rho)}$$, where $$D_\rho$$ is the Dirac operator associated to the spin structure and $$ind(D_\rho)$$ is the index of the operator.

My question could also be phrased as whether the index of a Dirac operator is some integral of some local quantity that is “canonically” associated to the spin structure.