## Apache2 Multiple URL Paths

Hello all

Please forgive what must sound like such a basic question. I have Apache2 installed in an Ubuntu 18.04 server. I have a reverse proxy sitting in front with which I want to test some URL rewrite functionality. What I need to setup on the Apache server is a simple site with multiple paths, like so:

http:/1.2.3.4/path1/path2/path3/path4

Would appreciate some assistance with this.

Thank you.

## dg.differential geometry – Paths \$tg_1+(1-t)g_0\$ in the moduli space of Riemann surfaces

Suppose $$S$$ is a smooth compact orientable surface without boundary. Let $$g_0$$ and $$g_1$$ be two smooth Riemannin metrics on $$S$$. Consider the interpolating path of metrics $$g_t=g_1t+g_0(1-t)$$. This gives us a path $$gamma: (0,1)to M$$ in the moduli space of Riemann surfaces (since each $$g_t$$ defines an integrable complex structure on $$S$$).

Question. Is is true that $$gamma$$ is a real analytic path in $$M$$? If so, how can I convince myself in this? (the statement strikes me as counter-intuitive…)

## seo – Disallow dynamic URL paths ending in a common suffix using robots.txt

I want to block Google from crawling the following URLs:

``````https://www.example.com/tonga/posts
https://www.example.com/india/posts
https://www.example.com/usa/posts
https://www.example.com/uae/posts
``````

which one is appropriate?

`tonga`, `india`, `usa`, `uae` etc are dynamic variables

``````Disallow: /*/posts
Disallow: /*?posts=
Disallow: /*=posts
``````

## Are there paths of exact forms joining two symplectic structures on open manifolds?

There is a Theorem of Conolly, L$$hat{text{e}}$$ and Ono which states that on a closed simply-connected $$4$$-manifold two cohomologous symplectic forms can be joined by a path of non-degenerate $$2$$-forms.

I was wondering is there any open analogue of this theorem? For example:

Let $$omega_0$$ and $$omega_1$$ be two cohomologous symplectic structures on an open simply-connected $$4$$-manifold $$M$$ which are equal on the complement of some compact set. Are there any results on the existence of a path $${omega_t}_{tin [0,1]}$$ of non-degenerate $$2$$-forms joining $$omega_0$$ and $$omega_1$$ such that all $$omega_t$$ are equal on the complement of some compact set?

I am especially interested in the case $$M=mathbb{R}^4$$.

## dns – Wildcard redirects for some paths but not others in Google Domains

dns – Wildcard redirects for some paths but not others in Google Domains – Webmasters Stack Exchange

## github – Wildcard redirects for paths in Google Domains

The Goal: redirect www.example.com/product/* to www.example.com/product using Google Domains

Background: I’m using github pages to host my site so I cannot add an htaccess file like a more traditional site. Also I had some issues with emails from my domain going to spam when I used Cloudflare.

There doesn’t seem to be an option to simply set up wildcard redirects for paths. it’s just subdomain.

## samsung – Android 11 “raw/:storage/…” file paths

Hello Android community!

I am trying to recreate a way of putting a file on my emulator in a location, so that when picked it produces the following uri: “raw/:storage/…”

My challenge right now is I do not have a reproducible way of doing this. I have only gotten this raw uri once in my testing and can’t anymore.

This is react native app, and we’re using a forked version of image-crop-picker library.

Function: https://github.com/aarongrider/react-native-image-crop-picker/blob/master/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L369

This is the function that returns the uri of the selected file: https://github.com/aarongrider/react-native-image-crop-picker/blob/master/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L672

We’re getting the following error from line 691 probably:

from calling the resolvePath which has a specific way of resolving the uri for Android API 19 and above: https://github.com/aarongrider/react-native-image-crop-picker/blob/master/android/src/main/java/com/reactnative/ivpusic/imagepicker/PickerModule.java#L546

I am a complete newbie with Android, and just need a consistent way of producing the raw/:storage/.. file uris. I appreciate any guidance provided here! Thanks :]

## Graph-related classes

Base implementations of the relevant classes in my graph library. I’m using C#9 in a .NET 5 project. I opted to use `struct`s for my `Vertex` and `Edge` types to disallow `null`, which simplifies the equality and comparison implementations. I’ve also chosen to keep all collections as generic as possible using `IEnumerable<T>` and I’ve also tried to use LINQ where I could because it’s convenient.

### `Graph.cs`

A simple directed graph with some basic functionalities.

``````public class DirectedGraph<T, U>
where T : IComparable<T>, IEquatable<T>
where U : IComparable<U>, IEquatable<U>
{
public LinkedList<Vertex<T>> Vertices { get; set; } = new();
public LinkedList<Edge<T, U>> Edges { get; set; } = new();

public virtual void Add(T state)
=> Vertices.AddLast(new Vertex<T>(state));

public virtual void SetEdge(Vertex<T> from, Vertex<T> to, U weight)
{
if (Vertices.Contains(from) && Vertices.Contains(to))
{
Edges.AddLast(new Edge<T, U>(from, to, weight));
}
}

public virtual IEnumerable<Edge<T, U>> GetEdgesFrom(Vertex<T> from)
=> Edges.Where(x => x.From.Equals(from));

public virtual IEnumerable<Edge<T, U>> GetEdgesTo(Vertex<T> to)
=> Edges.Where(x => x.To.Equals(to));

// Method to be reviewed
public IEnumerable<IEnumerable<Edge<T, U>>> GetPathsWithLengthFrom(int length, Vertex<T> vertex)
{
// Using breadth-first search
if (length == 1)
{
// This seems like a reasonable base case
return GetEdgesFrom(vertex).Select(x => Enumerable.Empty<Edge<T, U>>().Append(x));
}
else if (length > 1)
{
var pathsSoFar = GetPathsWithLengthFrom(length - 1, vertex);
var newPaths = Enumerable.Empty<IEnumerable<Edge<T, U>>>();
foreach (var path in pathsSoFar)
{
// Better way to duplicate paths or other approach altogether?
var pathEnd = path.Last().To;
var nextPieces = GetEdgesFrom(pathEnd);
foreach (var nextPiece in nextPieces)
{
newPaths = newPaths.Append(path.Append(nextPiece));
}
}
return newPaths;
}
throw new ArgumentOutOfRangeException(nameof(length), "Path length must be greater than or equal to 1.");
}
}
``````

### `Vertex.cs`

Abridged version of the vertex class with basic interface implementations. In my actual project I also implemented all the comparison and equality operators (<, >, ==, etc.).

``````public struct Vertex<T> :
IComparable<Vertex<T>>,
IEquatable<Vertex<T>>,
IComparable<T>,
IEquatable<T>
where T :
IComparable<T>,
IEquatable<T>
{
public Vertex(T state)
=> State = state;

public T State { get; set; }

#region Interface implementations and operator overloads
public int CompareTo(Vertex<T> other)
=> State.CompareTo(other.State);

public int CompareTo(T other)
=> State.CompareTo(other);

public bool Equals(Vertex<T> other)
=> CompareTo(other) == 0;

public bool Equals(T other)
=> CompareTo(other) == 0;

public override int GetHashCode()
=> State.GetHashCode();
#endregion
}
``````

### `Edge.cs`

``````public struct Edge<T, U>
where T : IComparable<T>, IEquatable<T>
where U : IComparable<U>, IEquatable<U>
{
public Edge(Vertex<T> from, Vertex<T> to, U weight)
=> (From, To, Weight) = (from, to, weight);

public Vertex<T> From { get; set; }
public Vertex<T> To { get; set; }
public U Weight { get; set; }
}
``````

## Goal of the graph library

Initially, I wanted to use graphs to enumerate all possible ways to choose `k` elements from a set of `n` total elements, but I discovered better ways to achieve that goal.

That being said, I created a graph with customizable states and weights for a poker calculator. The customizable weight could for example keep track of which cards were drawn or which hands are likely to arise given the current game state and the remaining cards in the deck.

Finally, writing a small graph theory library from scratch helps me learn more about algorithms and data structures.

## Why C# and not a faster language like C/C++?

I’m just more familiar with C# and I like LINQ, C# also has a ton of abstractions that I would likely have to import or write myself in C/C++ (the more I have to write myself, the more likely I’m going to make mistakes). Not to mention memory management with pointers and references.

But if C# turns out to be too slow, even after optimisations, I might switch over to C/C++ anyway.

## django – All paths open a single page

I am new to Django and doing something wrong. I’ve tried many templates and examples and always run into the same problem. No matter what path I try to use, I get the same file.

Settings.py

``````INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',

#my apps
'strategicplan.apps.StrategicplanConfig',
'house.apps.HouseConfig',
)
``````

Main site urls.py

``````from strategicplan import views as sp_views
from house import views as house_views

urlpatterns = (
path('house/',house_views.index),
path('strategicplan/',sp_views.index),

)
``````

house/urls.py

``````from django.urls import path
from house import views

urlpatterns = (
path('', views.index, name='index'),
)
``````

house/templates/index.html

``````<!DOCTYPE html>
<html lang="en">
<head>
{% block title %}<title>Houses</title>{% endblock %}
</head>
<body>
house
</body>
</html>
``````

strategicplan/urls.py

``````from django.urls import path
from strategicplan import views

urlpatterns = (
path('strategicplan/', views.index, name='index'),
)
``````

strategicplan/templates/index.html

``````<!DOCTYPE html>
<html lang="en">
<head>
{% block title %}<title>strategic plan</title>{% endblock %}
</head>
<body>
strategic plan
</body>
</html>
``````

No matter what I put in the url http://127.0.0.1 or http://127.0.0.1/house or http://127.0.0.1/stategicplan, I get the strategicplan/index.html page. Both http://127.0.0.1 and http://127.0.0.1/house end up with http://127.0.0.1 in the address bar, but still show the strategicplan page. The http://127.0.0.1/strategicplan page holds the correct address in the address bar, which is also the correct page.

Thanks!!

## algorithms – Finding the two edge-disjoint paths, minimizing the sum of their lengths

Given an undirected graph and a start and end node, I am trying to find two edge-disjoint paths such that the sum of their lengths is minimized. In particular, each path must start at the start node, end at the end node, and no edge can be traversed by both nodes. Is there an efficient algorithm to solve this problem?

I know that if I just need the shortest path, I can use Dijkstra’s algorithm, but finding one path with Dijkstra’s algorithm and then searching for another is sometimes not optimal at all, since edges in the first path may have blocked a possible and way shorter path.

I have tried implementing the `edge_disjoint_path` algorithm from the Python `networkx` package. But I must say that the result is very varying from okay to really bad. My network is not that big. “Only” 6000 nodes and 7500 edges.