## Unit – Recommended data structure for storage and quick access to infinite, piece-based elevation map terrain

I want to create a chunk-based heightmap terrain in Unity.
I've already set up a basic multifractal simplex noise and am working on it that I can generate height fields and meshes at runtime … but only one at a time.

I'm trying to figure out how best to store and access each block. I have already worked out some methods to convert global positions into chunk coordinates and chunk-local barycentric triangular coordinates so that I can interpolate heights. I've used this to create a way to beam a ray from the camera space to space over the mesh and traverse the intersections in the x / z plane until the intersection is found in elevation – position yourself on the terrain without having to install collision networks for each chunk, and use Unity's Raycasting. Everything works fine.

I'm just a bit clueless about how to implement the main infinite grid memory from which I generate chunk meshes.

This is planned to serve a game with an isometric perspective that reveals the world, while units investigate the fog of war over time … with the ability to move the camera through the uncovered terrain relatively quickly There may be limited possibilities to unload previously generated chunks. It's going to be an ever-growing dataset (so I'll probably have to look for ways to minimize memory).

I think I can either:

1. For the entire site, create a two-dimensional array of float values ​​(or perhaps short values ​​of 64 KB in height) and dynamically resize the array as the X / Z boundaries move backward. Generate only the terrain mesh in chunks to keep any mesh chunk below the Unity 64k vertex boundary.
2. Create a grid manager class with a kind of dynamic data structure that stores and instantiates / references map chunk objects, each containing its own (res * res) -large elevation map array.
3. Something else?

I'm assuming Option 2 has the most mileage, but I'm not sure what kind of dynamic data structure to use. I would guess a kind of key / object pair structure in which the key is created from the block coordinates.

Suppose I want to access altitude values ​​quickly and consistently across chunk boundaries. I think I need a way to access chunks. That's almost as fast as looking up arrays for indices and the complexity of O (1).
Or maybe a way to cache recently accessed chunks or chunks near the camera? Or pointer to her or something?

As you can probably tell, I'm pretty new to Spielev, but I have a VFX background, so I'm familiar with 3D geometry math and basic scripts. However, when it comes to designing / structuring / implementing a game, I'm an absolute novice, so references to relevant tutorials and the like are welcome.

## schema.org – Incorrect Google data structure if the URL contains a special character

I've defined a Google Scheme on my website and it works just fine testing the following URLs in the Google Structured Data Test:

``````exmaple.com
``````

or

``````exmaple.com?test=12&check=10
``````

but if I test URLs like the following, which contain special characters like \$ amp; The schema is completely wrong and full of errors:

``````example.com?text=12&check=10
``````

that's weird because the page content is the same in both cases, the only difference is the URL.
Here is the link to the structured data test:
the right thing
the wrong one

I could not find the problem. When I open the pages in the browser, everything is fine. However, there are bugs and problems in the Structured Data Trial and the Google Search Console. This problem is not limited to the same problem on any other page where the URL contains special characters. Every help is appreciated.

## Virtual machine – I can not find the directory structure

I have the latest version of DrupalVM installed. Everything is working well. I can access Drupal on both my local dashboard and my DrupalVM dashboard, but I can not find the Drupal directory structure in the directory.

After use `vagrant ssh`I can see the Drupal directory structure, but not in Windows Explorer.

## Page Structure – Country-Specific Pages Same Domain or Subdomains?

On our website we list companies like restaurants. So there are restaurants in the US and let's say Mexico. The restaurants in Mexico could be American Chains too.

What is the best way to handle this separation?

Is there a problem if they both live on the same domain, only different page names? i.e.

American restaurant = `/american-restaurant`

Mexican restaurant = `/mexican-restaurant`

American restaurant in Mexico logo CNRS logo INIST `/american-restaurant-mx`

Or should they be separated from Directories?

American restaurant = `/american-restaurant`

Mexican restaurant = `/mx/mexican-restaurant`

American restaurant in Mexico logo CNRS logo INIST `/mx/american-restaurant-mx`

Or is it most useful if other countries are only in their own subdomain? This means that authority and the like would not simply pass from the main domain.

American restaurant = `www.domain.com/american-restaurant`

Mexican restaurant = `mx.domain.com/mexican-restaurant`

American restaurant in Mexico logo CNRS logo INIST `mx.domain.com/american-restaurant-mx`

My favorite is the subdomain idea, but I'm worried about how difficult it could be to create a leaderboard because you're basically starting with 0 authority.

## design – modeling a structure that is open for further customization

I need to structure my model in relation to a training plan to allow for flexible post-creation customization.

The structure I have created so far consists of (from the smallest unit):

exercise – an extensible abstract entity described by name, intensity and duration.
Subclasses represent different types (I use Kotlin, where you can find beautiful ones sealed class Mechanism), e.g.

• strength training
• warming Up

block – one ordered to adjust of one or more exercises. Described by name and duration (which is actually the sum of the exercise duration). At the moment, it is convenient to avoid repeating the same exercises in a series.

series – one ordered collection one or more blocks Described by name and duration (which is actually the sum of the duration of the blocks). Subclasses describe different goals, e.g.

• Strength Building Series

• AnaerobicSeries

education – ordered a summary collection one or more series. Described by name, duration and some other properties, calculated using exercises.

To plan – A map with a collection of training sessions tied to a specific date and additionally described by the user prepress.

Once created, I want to be able to create one, let's say rule which consists of several factors and describes which types of series and exercises are transformed in which way, eg.

• StrengthIncreaseRule – Factors such as a = 0.5, b = 0.4 should decrease the duration of the StrengthBuildingSeries by a * 100% and the intensity of the AnaerobicSeries by b * 100%.

(Another question is whether both the series and the exercises should have a type or whether it makes no sense to dive so deep and only the series should have a type.)

What I mean is that there can be many factors in the rules, but the set of specific parameters of the structure is specified and can only be extended a little. But I have to be able to link those parameters to the Rule factors to change them.

I have small experience in system design. What I have thought now is a visitors Patter design. Does it fit my problem? Which other design pattern should I use?

## PHP – Java Script Switch structure question

In this example.

``````switch(numero {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9': console.log('Case 9');
break;
``````

The instruction is cleared in case 9 if the number = & # 39; 2 & # 39; is. I know this happens because the break statement in case & # 39; 2 & # 39; was not used, but why does it happen because & # 39; 2 & # 39; from & # 39; 2 & # 39; differs. 9 & # 39;

## Tensile Structure – + 91-9873975818 – Tensile Structure Manufacturer – Advertising, Offers

Train structure: A structure characterized by a strain of the membrane system to produce the crucial structural support for the structure.

We are one of each of the leading manufacturers of surface structures used in outdoor areas such as parks, gardens, restaurants, bars and more. It is very trendy and offers more shade on massive surfaces. Such as auditoriums, warehouses, swimming pools, food courts. These design structures for tensile-strength materials are factory-made in each low-carbon steel raw material according to degree of victimization 1. We tend to produce and process high tensile tensile structures.

See more…

tension structure

sunroof

Stretchable fabric structure

Pavilion tensile structure

## Go through a JSON-like data structure in Go

In my code, I need a function to iterate through any JSON-like data structure with a path definition. For example, in the face of the structure

``````{"root": {"inner": ({"name": "obj1"}, {"name": "obj2"})}}
``````

and the way `("root", "inner", "0", "name"}` I would receive `"obj1"`, I just started learning Go, and to be honest, I found it rather difficult to write because the type system of Go imposes restrictions. Now it compiles and it seems to work. To use it in my code, I needed additional helper functions with certain return types. All in all, it seems to be an ugly hack with a lot of repetition. I'd like to see if this is the best thing you can do in Go.

Note: Especially the distinction between is `map(string)string` and `map(string)interface{}`, I thought that `interface{}` would cover any type, but apparently not in this case. If I take this part out of the `switch` Statement, the program does not work there `map(string)string` is not handled by the `map(string)interface{}` Ast.

``````package main

import (
"fmt"
"strconv"
)

func main() {
test := map(string)interface{}{
"root": map(string)interface{}{
"inner": ()interface{}{
map(string)string{"name": "obj1"},
map(string)string{"name": "obj2"},
},
},
}
fmt.Println(TraverseToStr(test, ()string{"root", "inner", "0", "name"}))
}

func TraverseToUint64(data interface{}, path ()string) uint64 {
val, err := Traverse(data, path)
if err != nil {
return 0
} else {
return val.(uint64)
}
}

func TraverseToStr(data interface{}, path ()string) string {
val, err := Traverse(data, path)
if err != nil {
return ""
} else {
return val.(string)
}
}

func TraverseToMap(data interface{}, path ()string) map(string)interface{} {
val, err := Traverse(data, path)
if err != nil {
return make(map(string)interface{})
} else {
return val.(map(string)interface{})
}
}

func TraverseToArray(data interface{}, path ()string) ()interface{} {
val, err := Traverse(data, path)
if err != nil {
return make(()interface{}, 0)
} else {
return val.(()interface{})
}
}

func Traverse(data interface{}, path ()string) (interface{}, error) {
var ok bool
current := data
for _, p := range path {
switch current.(type) {
case map(string)string:
if current, ok = current.(map(string)string)(p); !ok {
}
case map(string)interface{}:
if current, ok = current.(map(string)interface{})(p); !ok {
}
case ()interface{}:
if i, err := strconv.ParseInt(p, 10, 64); err == nil {
array := current.(()interface{})
if int(i) < len(array) {
current = array(i)
} else {
return nil, fmt.Errorf("index %d out of bounds for %v", i, array)
}
} else {
return nil, fmt.Errorf("integer required, got: %s", p)
}
default:
return nil, fmt.Errorf("cannot traverse %Tn", current)
}
}
return current, nil
}
$$```$$
``````

## Cycle structure of restricted genus graphs

Given solid genus $$k$$ there are some $$q = f (k)$$ for which for each graphic $$G$$ of limited genus $$k$$ there is $$q$$ planar subgraphs $$G_1, G_2, .., G_q$$ from $$G$$
so every cycle of $$G$$ can be written as a symmetric difference of the cycles in $$G_i$$?
If so, why is that bound? $$f (k)$$ you can use a solid (not flat) embedding of $$G$$ so everyone $$G_i$$ is planar?

Also posted here: https://math.stackexchange.com/questions/3349842/cycle-structure-of-bounded-genus-graphs
and https://mathoverflow.net/questions/339972/cycle-structure-of-bounded-genus-graphs
By the way, what batch exchange should I use to post graph theory problems?

## sharepoint online – How To Fix TypeError: Converting a Circular Structure into JSON When Creating an SP List Item?

When attempting to use REST to create a list item in SharePoint, the following error message appears:

Unrecognized TypeError: Convert the circular structure to JSON

Do I miss something obvious here?

``````\$.ajax({
url: _spPageContextInfo.webAbsoluteUrl + "/_api/web/lists('" + myList + "')/items",
type: "POST",
"accept": "application/json;odata=verbose",
"content-type": "application/json;odata=verbose",
"X-RequestDigest": \$("#__REQUESTDIGEST").val()
},
data: JSON.stringify({
'Title': 'testing',