symmetry – What are all the possible symmetrical map designs? (on a flat 2d surface)

If we look at the following ‘square’ map:

Square Map - 4 symmetrical nodes

… we have the possibility of creating a repeating pattern of 4 equidistant ‘nodes’ (where the distance between could be ‘scalable’).

If we look at the following ‘hex’ map:

Hex Map - 3 symmetrical nodes

… we have the possibility of creating a repeating pattern of 3 equidistant ‘nodes’ (where the distance between could be ‘scalable’).

Are these the only two possibilities?… if not, what shapes/nodes am I missing? Is there an equation that defines these?

I will do 350 google point map citations for local Business SEO for $4

I will do 350 google point map citations for local Business SEO

Hello, I am Local citation/ local listings expert.

Google local map point listing is the most powerful & helpful for your business or website to get improve local search ranking on Maps. People oversee to include local area such as cities/states/regions when searching for businesses on the web.

This Citation is a powerhouse of link-juice for your Local SEO. I will build 350+, 800, 1000,2000 different Local points a couple Mile Radius from your area all points shows your business details.

Why my service is best ?

Best for Local and Maps rankings..

100% NAP Constant for ALL Citations.

Using white hat method.

Full Reports Submission (excel format)

Your Business address show up in google Maps.

Help to ranking in Search Engine Results.

Customer satisfaction 100% guarantee.

If you are unsure about anything, please message me before ordering,I will do any country

Thanks

.(tagsToTranslate)google(t)maps(t)googleplace(t)locallisting(t)mappoint

java – Why does ‘get’ method of class ‘Map’ enable sending a not relevant key without a compilation error?

I just had a bug in my program, but i don’t understand how the program was compiled at all!

I have the following variable:

gamesPerCountriesMap: MutableMap<Long, MutableMap<Long, MutableList<AllScoresGameObj>>>?

and i had the following line of code:

var gamesList = gamesPerCountriesMap?.get(countryItem.id)?.get(competitionItem)

the correct line should be:

var gamesList = gamesPerCountriesMap?.get(countryItem.id)?.get(competitionItem.id)

i have looked at the prototype of the Map class and the method is declared as following:

public inline operator fun <@kotlin.internal.OnlyInputTypes K, V> Map<out K, V>.get(key: K): V?

As we can see it can get K and it’s subtype, but competitionItem which is an instacne of class CompetitionObj isn’t inherit the Long class.
So why the compiler didn’t prevent this error? I solved the issue but i am very couries of what is didn’t prevent the code from being compiled?

unity – Touch control pan 3D map

I’m working on recreating the board game “Hex” as a mobile game. I’m working on implementing zoom and pan features using two fingers. I feel like I managed to get the zoom to work, but the pan moves more than I want it to and I feel like it is because I’m missing something and must be somewhere in the conversion to World Space coordinates. if I could get some help it would be greatly appreciated.

For reference, oldMidpoint is initialized to 0 earlier on.

        Touch touchA = Input.GetTouch(0);
        Touch touchB = Input.GetTouch(1);

        Vector3 midpoint = (touchA.position + touchB.position) / 2;
        if(midpoint != oldMidpoint)
        {
            if(oldMidpoint == Vector3.zero)
                oldMidpoint = midpoint;

            Vector3 moveDistance = oldMidpoint - midpoint;
            moveDistance.y = 0;

            Camera.main.transform.Translate(moveDistance, Space.World);

            oldMidpoint = midpoint;
        }

How to create a site map diagram for existing SharePoint 2010 intranet sites?

I am about to migrate to sp oinline, and i my manager asked me to generate site map for my intranet, what is the quick option i have ? i just need a site flow diagram. So that we know what is where.

Separar en partes un map ordenado nodejs

Tengo el siguiente código

currency.sort((a, b) => b.balance - a.balance)
        .filter(user => message.client.users.cache.has(user.user_id) && !message.member.roles.cache.some(role => role.name === 'admin'))
        .first(10)
        .map((user, position) => `**#${position + 1}** ${(message.client.users.cache.get(user.user_id).tag)}: ${user.balance}`)
        .join('n');

El código ordena una lista de usuarios en base a quién tiene mas "monedas", y escoge los 10 primeros y los mapea para darle un formato. Hasta ahí todo bien.

El objetivo ahora es que en vez de guardar todos juntos, el primero con mas monedas, el segundo, los siguientes 4 y los últimos 4 formen parte de strings diferentes, ¿Cómo podría hacerlo? he probado varias cosas pero no he conseguido que funcione.

python – How to load a new map when player reaches a certain point using if tile_object.name == ‘door” (pygame)

I have been working on creating a 2d game, and I am now at the point where I want the character to be able to interact with his environment, I have created a few different obstacles such as a house, fence and a wall is it possible to load a new map when the player reached the tile named “door” I have it written out as if tile_object.name == ‘door’: but not sure what to load after that so that a new map loads when he reaches that obstacle named door any help would be greatly appreciated 🙂 I have attached my code below for main.py

import pygame as pg
import sys
from os import path
from settings import *
from sprites import *
from tilemap import *

class Game:
def init(self):
pg.init()
self.screen = pg.display.set_mode((WIDTH, HEIGHT))
pg.display.set_caption(TITLE)
self.clock = pg.time.Clock()
self.running = True
self.font_name = pg.font.match_font(FONT_NAME)
self.bg_img = pg.image.load(‘background.jpg’)
self.load_data()

def load_data(self):
    game_folder = path.dirname(__file__)
    img_folder = path.join(game_folder, 'img')
    map_folder = path.join(game_folder, 'maps')
    self.map = TiledMap(path.join(map_folder, 'map2use.tmx'))
    self.map_img = self.map.make_map()
    self.map_rect = self.map_img.get_rect()
    self.spritesheet = Spritesheet(path.join(img_folder, SPRITESHEET))
    self.mob_img = pg.image.load(path.join(img_folder, MOB_IMG)).convert_alpha()
    self.snd_dir = path.join(game_folder, 'snd')

def load_data2(self):
    game_folder = path.dirname(__file__)
    img_folder = path.join(game_folder, 'img')
    map_folder = path.join(game_folder, 'maps')
    self.map = TiledMap_2(path.join(map_folder, 'map3use.tmx'))
    self.map_img = self.map.make_map2()
    self.map_rect = self.map_img.get_rect()
    self.spritesheet = Spritesheet(path.join(img_folder, SPRITESHEET))

def new(self):
    self.all_sprites = pg.sprite.Group()
    self.mobs = pg.sprite.Group()
    self.walls = pg.sprite.Group()
    pg.mixer.music.load(path.join(self.snd_dir, "midnight_drive.ogg"))
    for tile_object in self.map.tmxdata.objects:
        if tile_object.name == 'player':
            self.player = Player(self, tile_object.x, tile_object.y)
        if tile_object.name == "enemy":
            Mob(self, tile_object.x, tile_object.y)
        if tile_object.name == 'Wall':
            Obstacle(self, tile_object.x, tile_object.y, tile_object.width, tile_object.height)
        if tile_object.name == 'tree':
            Obstacle(self, tile_object.x, tile_object.y, tile_object.width, tile_object.height)
        if tile_object.name == 'house':
            Obstacle(self, tile_object.x, tile_object.y, tile_object.width, tile_object.height)
        if tile_object.name == 'fence':
            Obstacle(self, tile_object.x, tile_object.y, tile_object.width, tile_object.height)
        if tile_object.name == 'door':
            Obstacle(self, tile_object.x, tile_object.y, tile_object.width, tile_object.height)

    self.camera = Camera(self.map.width, self.map.height)
    self.draw_debug = False
    self.run()

def run(self):
    self.playing = True
    pg.mixer.music.play(loops=-1)
    while self.playing:
        self.dt = self.clock.tick(FPS) / 1000
        self.events()
        self.update()
        self.draw()
    pg.mixer.music.fadeout(500)

def quit(self):
    pg.quit()
    sys.exit()

def update(self):
    self.all_sprites.update()
    self.camera.update(self.player)
    #mob spawn
    
def draw_grid(self):
    for x in range(0, WIDTH, TILESIZE):
        pg.draw.line(self.screen, LIGHTGREY, (x, 0), (x, HEIGHT))
    for y in range(0, HEIGHT, TILESIZE):
        pg.draw.line(self.screen, LIGHTGREY, (0, y), (WIDTH, y))

def draw(self):
    pg.display.set_caption('{:.2f}'.format(self.clock.get_fps()))
    self.screen.blit(self.map_img, self.camera.apply_rect(self.map_rect))
    for sprite in self.all_sprites:
        self.screen.blit(sprite.image, self.camera.apply(sprite))
        if self.draw_debug:
            pg.draw.rect(self.screen, CYAN, self.camera.apply_rect(sprite.hit_rect), 1)
    if self.draw_debug:
        for wall in self.walls:
            pg.draw.rect(self.screen, CYAN, self.camera.apply_rect(wall.rect), 1)

    pg.display.flip()

def events(self):
    for event in pg.event.get():
        if event.type == pg.QUIT:
            self.quit()
        if event.type == pg.KEYDOWN:
            if event.key == pg.K_ESCAPE:
                self.quit()
            if event.key == pg.K_h:
                self.draw_debug = not self.draw_debug

def show_start_screen(self):
    # game splash/start screen
    #self.screen.fill(BGCOLOR)
    pg.mixer.music.load(path.join(self.snd_dir, "Feat.ogg"))
    pg.mixer.music.play(loops=-1)
    self.screen.blit(self.bg_img, self.bg_img.get_rect())
    pg.display.flip()
    self.wait_for_key()
    pg.mixer.music.fadeout(500)

def show_go_screen(self):
    # game over/continue
    if not self.running:
        return
    #self.screen.fill(BGCOLOR)
    self.screen.blit(self.bg_img, self.bg_img.get_rect())
    pg.display.flip()
    self.wait_for_key()

def wait_for_key(self):
    waiting = True
    while waiting:
        self.clock.tick(FPS)
        for event in pg.event.get():
            if event.type == pg.QUIT:
                waiting = False
                self.running = False
            if event.type == pg.KEYUP:
                waiting = False

def draw_text(self, text, size, color, x, y):
    font = pg.font.Font(self.font_name, size)
    text_surface = font.render(text, True, color)
    text_rect = text_surface.get_rect()
    text_rect.midtop = (x, y)
    self.screen.blit(text_surface, text_rect)

g = Game()
g.show_start_screen()
while True:
g.new()
g.run()
g.show_go_screen()

rpg maker – Using a custom map gui disables the ability to save

I’m quite confused at the moment. I’ve created a custom gui (a fuel display on map) that works nicely, but somehow whenever I try to save the game when this gui is active….clicking on the slot where I want to save the game does not work!

thus when I add the following code and let it be called via a trigger (a common event which has a switch as trigger calls this javascript code…event runs parallel with a wait (5)):

REITD.SpaceClass.prototype.showCargoAndFuelStatusUI = function (vehicleType, currentCargo, maxCargo, currentFuel, maxFuel) {
    if (!(SceneManager._scene instanceof Scene_Menu)) {
        if ($gameSystem._REITD_definedWindows("CargoAndFuel") !== undefined) {
            SceneManager._scene.removeChild($gameSystem._REITD_definedWindows("CargoAndFuel"));
        }

        $gameSystem._REITD_definedWindows("CargoAndFuel") = new Window_Base(new Rectangle(1, 1, 211, 200));
        SceneManager._scene.addChild($gameSystem._REITD_definedWindows("CargoAndFuel"));

        $gameSystem._REITD_shownStatusUIWindows("CargoAndFuel") = "shown";

        $gameSystem._REITD_definedWindows("CargoAndFuel").drawText("Vehicle Fuel", 1, 5, 190, "center");
        $gameSystem._REITD_definedWindows("CargoAndFuel").contents.fillRect(1, 40, 200, 25, _Colors.gray);
        $gameSystem._REITD_definedWindows("CargoAndFuel").contents.fillRect(1, 40, 2 * this.calcFuelPercent(vehicleType), 25, _Colors.blue);  // 2 px per percent full.
        $gameSystem._REITD_definedWindows("CargoAndFuel").drawText(
            padLeft(this.getCurrentFuel(vehicleType), 6, "0") + " / " + padLeft(this.getMaxFuel(vehicleType), 6, "0"), 30, 35, 100, "left");

        $gameSystem._REITD_definedWindows("CargoAndFuel").drawText("Vehicle Cargo", 1, 75, 190, "center");
        $gameSystem._REITD_definedWindows("CargoAndFuel").contents.fillRect(1, 110, 200, 25, _Colors.gray);
        $gameSystem._REITD_definedWindows("CargoAndFuel").contents.fillRect(1, 110, 2 * this.calcCargoPercent(vehicleType), 25, _Colors.red);  // 2 px per percent full.
        $gameSystem._REITD_definedWindows("CargoAndFuel").drawText(
            padLeft(this.getCurrentCargo(vehicleType), 6, "0") + " / " + padLeft(this.getMaxCargo(vehicleType), 6, "0"), 30, 105, 100, "left");
    }
}

I’m running into the problem.
Now my question is:
Why is that so and what can I do to correct this problem (or can I somehow deactivate this while a menu is open?)

Engine: RPGMaker MZ

c++ – Getting data from the backbuffer D3D11 using Map

I’m having some trouble using ID3D11DeviceContext::Map() correctly.

Here’s the whole function so far:

 Color Graphics::GetPixel(int x, int y) const
{
    //Temp frame buffer descriptor;
    CD3D11_TEXTURE2D_DESC pFrameDesc;
    pFrameDesc.Width = WindowWidth;
    pFrameDesc.Height = WindowHeight;
    pFrameDesc.CPUAccessFlags = D3D11_CPU_ACCESS_READ;
    pFrameDesc.Format = DXGI_FORMAT_B8G8R8A8_UNORM;
    pFrameDesc.MipLevels = 1u;
    pFrameDesc.ArraySize = 1u;
    pFrameDesc.SampleDesc.Count = 1u;
    pFrameDesc.SampleDesc.Quality = 0u;
    pFrameDesc.Usage = D3D11_USAGE_DEFAULT;
    pFrameDesc.BindFlags = D3D11_BIND_UNORDERED_ACCESS;
    pFrameDesc.MiscFlags = 0u;

    // Create temp frame buffer(2d texture)
    wrl::ComPtr<ID3D11Texture2D>pFrame = nullptr;
    HRESULT hr = pDevice->CreateTexture2D(&pFrameDesc, nullptr, &pFrame);
    GFX_THROW_INFO(hr);

    hr = pSwapChain->GetBuffer(0, __uuidof(pFrame), &pFrame);
    GFX_THROW_INFO(hr);
    
    
    D3D11_MAPPED_SUBRESOURCE map;
    map.RowPitch = WindowWidth * 4;
    map.DepthPitch = WindowHeight * 4;
    
    //Throwing here, CPU access flags problem. 
    hr = pContext->Map(pFrame.Get(), 0u, D3D11_MAP_READ, 0u, &map);
    GFX_THROW_INFO(hr);

    pContext->Unmap(pFrame.Get(), 0u);
    


    return { 0.0f, 0.4f, 0.0f, 0.0f };
}

I’m getting an exception thrown at pContext->Map()

“Map cannot be called with MAP_READ access, because the Resource was not created with the D3D11_CPU_ACCESS_READ flag. “

Which is confusing as the newly created resource has the D3D11_CPU_ACCESS_READ flag enabled. This is also true If I try MAP_WRITE and change the access flags to match. I’ve also tried ORing the flags together with no luck.

The ultimate use of this function is to be able to create a CPU side array of Color objects (Colors are currently a struct of four floats) Which I can then send onto the NewTek NDI sdk. But I feel it would also be useful for saving screen shots, creating colour pickers etc.

Any ideas welcome!

Map data structure terminology – Computer Science Stack Exchange

I’m looking for the correct terminology in regard to map (dictionary) data structure.

When I’m talking about the semantics of the values stored in map in the direction from keys to values, I’d say, for example

messages keys are mapped to message strings

When I’m using the opposite direction – describing the values first, I’d need to say something like

message strings are ??? by message keys (“being mapped by” just doesn’t feel right here)