## parabolic pde – Generate Equation of Parabola, Given X Intercepts of 0 & 1 and Area under curve equaling 1

How do I generate an Parabolic equation whose;

1. A could be -1 or 1
2. X intercepts are between 1 and 31
3. Area Under the curve Equals 1
4. And IF posable, be able to set the maximum above a x value

I want to be able to translate such a calculator into excel, but I need to understand the math for it before I can begin to do that. As for Why I need it, I want to be able to spread a sales goal across the days of a month, and thought this might be a fun thing to try. Of course I want the intercepts around the beginning and end of the month and the bump somewhere in the middle. I’d like to be able to choose when the bump happens.

Any Help or Direction is Appreciated.

## combinatorics – How to generate all the combinations with repetition and another conditions?

I want to generate all the combinations with repetition for k variables with values from a set of n elements.

There are some ways, I like this formula, which I found on this forum (it is for n = 2 and k = 3, which is not a problem).

`````` With({n = 2, k = 3},
Join @@ Table(IntegerPartitions(s, {k}, Range(n)), {s, k, n k}))
``````

My question is, How can I add these conditions:

First: every value of n must be used at least once,
Second: every value of n must be used at most 10 times

Is there a way, how to improve the code above or should I try another method?

Thank you!

## procedural generation – How can we generate 3D architecture in a racing game’s background procedurally with respect/similar to the real world?

AFAIK they achieve this by

Parameterized Procedural Placement

They create a workflow where you create a handful assets in this case building floors and they procedurally tweak the parameters such as Floor count,size,tint and custom props such as air conditioning outside of the buildings.

I once a saw a video about ubisoft creating a procedural assasins creed city.They premade a bunch of houses and spread them randomly.

You should desing a workflow where you control how your building floors are stacked on each other and how each floor has its own specific unique props.

This is what i would do

• I would decide what a building floor means to me.These would be my parameters: IsGroundFloor?, width and height of the floor, how many windows, a balcony?, general tint color of the floor material and unique set of models.(Such as vegatation, flowers, air conditioning or a satallite dish perhaps?).
• I would decide how many floors should a building has.Define the minimum and the maximum
• I would decide what will be the floor independent objects such as fire escape ladder which starts from ground to the top of the building, some garden? or fences?

with these parameters one can create wide range of different buildings considering you feed your procedural workflow with enough assets

## models – How can we generate 3D architecture in the background procedurally with respect/similar to the real world?

AFAIK they achieve this by

Parameterized Procedural Placement

They create a workflow where you create a handful assets in this case building floors and they procedurally tweak the parameters such as Floor count,size,tint and custom props such as air conditioning outside of the buildings.

I once a saw a video about ubisoft creating a procedural assasins creed city.They premade a bunch of houses and spread them randomly.

You should desing a workflow where you control how your building floors are stacked on each other and how each floor has its own specific unique props.

This is what i would do

• I would decide what a building floor means to me.These would be my parameters: IsGroundFloor?, width and height of the floor, how many windows, a balcony?, general tint color of the floor material and unique set of models.(Such as vegatation, flowers, air conditioning or a satallite dish perhaps?).
• I would decide how many floors should a building has.Define the minimum and the maximum
• I would decide what will be the floor independent objects such as fire escape ladder which starts from ground to the top of the building, some garden? or fences?

with these parameters one can create wide range of different buildings considering you feed your procedural workflow with enough assets

## 8 – How to generate files with a custom module?

I have a site with Drupal 8. I have created a custom module. Here is its code :

https://github.com/S1BIOSE/generator_website

generator-website-page.html.twig :

``````<div class="card mb-5 overflow-hidden shadow rounded bg-white">
<div class="card-body">

<form>

<legend>Générateur de site web</legend>
<div class="mb-3">
<label for="TokenUrl" class="form-label">L'URL de votre site web</label>
<input type="text" class="form-control is-invalid" id="TokenUrl" required>
<div class="invalid-feedback">
Ce champ est requis.
</div>
<small id="helpUrl" class="form-text">Entrez l'URL complète de votre site web.</small>
</div>
<div class="mb-3">
<label for="TokenTitle" class="form-label">Nom de l'entreprise</label>
<input type="text" class="form-control is-invalid" id="TokenTitle" required>
<div class="invalid-feedback">
Ce champ est requis.
</div>
<small id="helpTitle" class="form-text">Entrez le nom de votre entreprise.</small>
</div>
<div class="mb-3">
<label for="TokenDescription" class="form-label">Présentation de l'entreprise</label>
<textarea class="form-control is-invalid" id="TokenDescription" rows="5" required></textarea>
<div class="invalid-feedback">
Ce champ est requis.
</div>
<small id="helpDescription" class="form-text">Entrez une description de votre entreprise.</small>
</div>

<div class="mb-3">
<label for="TokenFeed" class="form-label">Fil d'actualité</label>
<input type="text" class="form-control" id="TokenFeed">
<small id="helpFeed" class="form-text">Entrez l'url de votre Flux RSS sur la plateforme S1BIOSE.</small>
</div>

<button type="submit" class="btn btn-primary">Générer</button>
</form>

</div>
</div>
``````

What should I put in my module to generate the 3 files above and replace the words starting with Token ?

In this custom module, I created a form with IDs (I’m not sure if this is the right way to go). For example, the data entered in the TokenTitle field must replace TokenTitle wherever it appears in the files.

When a user submits the form, it must download the 3 files with the correct data (the one entered in the form). If possible in a ZIP archive.

It is unnecessary to keep the information submitted in the form in the database.

manifest.json

``````{
"orientation":"portrait",
"short_name": "TokenTitle",
"name": "TokenTitle",
"display": "standalone",
"background_color": "#000000",
"theme_color": "#000000",
"description": "TokenDescription",
"lang": "fr",
"icons": ({
"src": "icon-144.png",
"sizes": "144x144",
"type": "image/png",
}, {
"src": "icon-192.png",
"sizes": "192x192",
"type": "image/png",
}, {
"src": "icon-512.png",
"sizes": "512x512",
"type": "image/png",
}),
"start_url": "/?source=pwa",
"scope": "/"
}
``````

sitemap.xml

``````<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>TokenUrl/index.html</loc>
<lastmod>TokenDate</lastmod>
</url>
</urlset>
``````

sw.js

``````const staticCacheName = 'TokenTimestamp';
const filesToCache = (
"https://drupal.stackexchange.com/",
'/index.html',
'/CHANGELOG.md',
'/bootstrap.min.css',
'/style.css',
'/bootstrap.bundle.min.js',
'/popover.js',
'/clipboard.min.js',
'/btn-clipboard.js',
'/pwa.js',
'/feed.js',
'/toasts.js',
'/icon-32.png',
'/icon-144.png',
'/icon-192.png',
'/icon-512.png',
'/iphone5_splash.png',
'/iphone6_splash.png',
'/iphoneplus_splash.png',
'/iphonex_splash.png',
'/iphonexr_splash.png',
'/iphonexsmax_splash.png',
);

event.waitUntil(
caches.open(staticCacheName).then(cache => {
})
);
});

event.waitUntil(caches.keys().then(function(cacheNames) {
return Promise.all(
cacheNames.filter(function(staticCacheName) {
}).map(function(staticCacheName) {
return caches.delete(staticCacheName);
})
);
}));
});

event.respondWith(
caches.match(event.request).then(cachedResponse => {
if (cachedResponse) {
return cachedResponse;
}
return fetch(event.request);
})
);
});

if (event.data.action === 'skipWaiting') {
self.skipWaiting();
}
});
``````

## Error generate new block with signet test

I have tried to test signet to generate new block but it is showed message as below:

bicoin-cli -signet -generate 1

``````ERROR: ProcessNewBlock: AcceptBlock FAILED (bad-signet-blksig, signet block signature validation failure)
``````

## How to generate a random matrix with arbitrary correlation between elements?

I would like to find a smart way to generate a $$Ntimes N$$ random matrix $$M$$ with arbitrary correlation:
$$begin{equation} boxed{langle M_{ij}M_{kl}rangle=tau_{ijkl}} end{equation}$$
Where the mean and variance of the elements are given by:
begin{align} langle M_{ij}rangle&=0 \ langle M_{ij}^2rangle&=sigma^2 end{align}

The case I am interested in is actually a sub-problem of this. I would like to generate a matrix whose elements follow a normal distribution of mean $$0$$ and variance $$1/N$$, and whose elements are correlated the following way:
$$begin{equation} langle M_{ij}M_{ki}rangle=tau_{ijk} end{equation}$$
When $$tau_{ijk}=delta_{jk}N^{-1}$$ I recover a symmetric matrix.

## hash – cannot generate bitcoin first block

I have download bitcoin source and change genesis in regtest. and i try to generate 1 block by command ./bitcoin-cli -generate 1 it does not show any mining block. i try over 10 times but it is still the same result why?

``````here the result:
{
"blocks": [
]
}
``````