## graphs – Methods for generating DAG with small Minimum Path Cover

On a directed acyclic graph $$G=(V,E)$$ the Minimum Path Cover (MPC) is the minimum number of paths that can be constructed on the DAG such that all vertices are covered by at least one path.

I know that there are practical circumstances where the MPC of a DAG is small, for example in genomics. I am wondering what kinds of conditions on the DAG would imply that the DAG’s MPC is small. One condition I know of is $$sum_{v in V} deg_{out}(v)-deg_{in}(v) leq k$$, where $$k$$ is some constant. However, I was looking for other such conditions, that restrict the MPC to size of $$logN$$ or $$O(1)$$, or similar.

## What is the moment generating function of this distribution?

Can anyone show me how to compute this MGF? I am reviewing for an exam, and the professor put an answer for the MGF of the following distribution, but did not show his work, so I have no clue how he get the answer.

$$P(x_1, x_2) = 6 * (frac{1}{3})^{x_1} * (frac{1}{4})^{x_2}, 1 leq x_1,x_2 < inf, 0$$ elsewhere

$$x_1 , x_2 in mathbb{Z}^{+}$$

Can someone please show me how to compute the joint MGF of this distribution? Thank you for reading.

## Computational complexity of generating a random vector

I’m new to the concept of computational complexity and trying to understand the topic in depth. I went through some references mentioned by some old questions, however, I had this question and not sure if my understanding is correct. I want to know the complexity of generating a random vector of size $$N$$. Is it $$mathcal{O}(N)$$ cause I’m generating $$N$$ random numbers and the complexity of generating each one of them is $$mathcal{O}(1)$$ or is it simply $$mathcal{O}(1)$$?

## generating payload whith autorun script

i want to generate payload whith persistence script that automatically setuped when victim install the payload in window . I know that a multi/handler allow to set autorunscript and it works fine. the problem is i want to generate a payload in windows/meterpreter/reverse_tcp> whith autorun script & i set autorun script correctly and generated the payload but after getting meterpreter session its not loading the script i set. is there a way to make it work or other way to make persistence payload setup
heres my commands :-
`payload(windows/meterpreter/reverse_tcp) > set autorunscript post/windows/manage/migrate` then i generated the payload like this ` generate -f exe -o /root/Desktop/vurus.exe`

## network topology – What is a distributed algorithm for generating random “private” pair-matchings?

Say you have 2N named peers (agents) able to address each other by their name and communicate freely among them.
What distributed algorithm could they use in order to randomly pair up? The final situation would be that the agents were able to organize themselves in N random couples. On different runs the random couples should be different.

Important: the algorithm should be “private” in the following sense: at the end of the round, each agent should only know the name of agent it was paired with.

## sharepoint enterprise – Automatically generating pages when subsite is created

Migrating from Sharepoint 2010 to 2019 (On-Prem, Classic UI) and I need to implement a solution that automatically generates pages (3 for example) when a subsite is created.

An example would be subsites and subsite pages for departments in a business:

EX: If I create a new ‘Finance’ subsite under my root site and set the page layout via a terminal command, the solution should automatically generate 3 pages under that subsite in addition to the /default.aspx page: a ‘People’ page, ‘Overview’ page, and ‘Contact’ page. Each would use a custom layout set via a terminal command.

Am I looking for site definitions? Or a module (as described here)? I’ve poured through Microsoft’s documentation but the specifications of our implementation (2019, On-Prem, Classic UI) have made it difficult to discern the next steps.

It would also be great to automatically generate lists when subsites are created too. Would a similar process be used to accomplish both? Or are they different solutions?

I have access to Sharepoint Designer and Visual Studio. I’m familiar with Sharepoint Designer, it’s purpose, and how it interacts with our Sharepoint environment. Not as familiar with Visual Studio, so I dont know what I dont know about the tool.

Any help in the right direction would be much appreciated. Thank you!

## django – Generating random string (for unique code) keeps returning the same random string

I have a `Test` model where each test can be identified by a unique randomly-generated string:

``````class Test(models.Model):
code_length = 7
code = models.CharField(max_length=code_length, editable=False, default=generate_id(code_length))
name = models.CharField(max_length=100, default=None)

def __str__(self):

def generate_id(length):
return get_random_string(length)
``````

Tbh, it was working good before. It started to “bugged-out” after I updated my Django from Django 1.x to Django 3.xm and I also cleared all the records of the `Test` model in django-admin (I want to have a fresh and clean database for testing). Right now, whenever I try and create a new `Test`, it’s `code` is literally the same with all other new `Tests` that I create:

I think I haven’t done anything to it other than those two changes I made. Any ideas? Thanks a lot!

## algorithms – Generating topological sequence from DAG with additional “not appearing before” constraints

DAG specifies the relationship of one node must appear after another. What if I add an additional constraint where one node cannot appear before another on top of the DAG?

Is there an algorithm for generating topological sequence from DAG with such constraint? Or maybe I can transform the DAG with this constraint?

I’m working on a Wolfram Language Package to connect into Bigquery (that I’ll make public available). In order to finish It, I need to solve a last step, that is how to get an authentication token using JWT json file.

The package it already working, but with a very ugly part, where I do a call to R Script just to generate the access token to be used in the Google Cloud API.

``````library(jsonlite)
library(httr)

authPath <- "/Users/rodrigomurta/Desktop/GetBigQueryToken/bigquery.json"

authorize = "auth",
access = "token",
revoke = "revoke"
)

jsonInfo <- jsonlite::fromJSON(authPath, simplifyVector = FALSE)

scope <- c(
)
token <- httr::oauth_service_token(endpoint = googleEndpoint, secrets = jsonInfo, scope = scope)
token <- token$$credentials$$access_token

cat(token)
``````

The returned token is something in this format:

``````ya29.c.KpEB4Af1KOjCjy-msEN42XFq0IqS2DGwDG85W_Rx9WXEF_W_vGGCnG0lklw7NU25UABnWjTkwB8_NdoDsRhHHyaBLC04Cgu2mKrJ-eLQ9qlWNkwOTlpIwFCOTc-Jj1QcHzMI4JwS-nC03MeIJIC75A8bIqAEKZx90SCseNYSAKjEKw30Dbnc6Oc2k8WYwlccDlJlIQ
``````

I tried to explore `SecuredAuthenticationKey` function, but without success. It would be cool to have a 100% Mathematica implementation for both facilitate distribution and make possible to run It inside Wolfram Cloud.

Some clue on how to do that?

Related:

## 8 – CSS files are not generating when turning on CSS aggregation in dev site

In a website that I created, the subtheme CSS are not getting applied or rather the CSS files are also not even generating when turning on CSS aggregation. I’m using AdvAgg module to extended configuration settings. This problem was occurring with JS also but tweaking some settings in the AdvAgg for JS solved the issue but not for CSS.