graphics – Code for a color bucket fill (seed fill) of a bounded irregular area?

In images like the one shown here, I would like to be able to pick an x,y coordinate and fill the bounded interior with a specified color. That functionality is well known in PhotoShop and GIMP, but I can’t seem to find even a simple version of such code for Mathematica. I’m not expecting a great GUI – just some code that I can use and modify.

enter image description here

geometry – Find the area of the shaded region within the smaller equilateral triangle

enter image description here

WLOG, let the side length of one of the smaller equilateral triangles by $1$. So the overall area of one of the smaller equilateral triangles is $frac{sqrt{3}}{4}.$ To find the area of the shaded region (within the smaller triangle), I toyed with the idea of coord-bashing (I know, a bad method, but I didn’t know what else to do), but quickly dismissed it. It would take way too much time.

I am at a loss for what to do, can someone please provide me with a hint (not solution) that will help me on my way?

unity – How do I spawn 3d objects in a certain area

What I want to do is spawn diamonds inside my game box area

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class Spawn : MonoBehaviour
    public GameObject Diamond;
    public float Number;
    public Vector3 Area;
    // Start is called before the first frame update
    void Start()

    // Update is called once per frame
    void Update()

How do I implement the area restrictions of the spawning?

Content area was not found only for footer

In my site elementor is working properly for header and body. But when I want to edit footer then elementor says following issue-

Sorry, the content area was not found in your page. You must call the_content function in the current template, in order for Elementor to work on this page.

What should I do now?

autofocus – Nikon D5600: AF area mode (no of focus points ) doesn’t work in any of manual mode (aperture, shutter, manual) for any fou

AF-area mode (no of focus points 9, 21, 39 ) doesn’t seem to work in manual modes (aperture priority, shutter priority, manual) for any focus mode (AF-A, AF-C), only it focus at centre with a single focus point)

While If I select Auto-area AF in AF-area mode as shown in picture, then auto focus (more than one focus points) works well.

Could you please explain that is it a problem in my newly bought dslr or it is like that way only ?

enter image description here

geography – Does the Berlin metropolitan area work the same as all other metropolitan areas?

I am having a debate on another comment section regards to me using the Berlin metro population and comparing it to the Moscow metro population but i am being advised by a person claiming to live in Berlin that the Berlin metro population does not work the same as other metropolitan areas, and that Berlins metropolitan area takes in a wider area and seperate cities and states, and the person instead wants me to use the Berlin urban population.

I am not sure i believe that the Berlin metropolitan area includes seperate cities and states, so i have only agreed to change it, if i can have it confirmed that this is the case.

My understanding of a metro area is in the wikipedia link and quote below.

Metropolitan area, Wikipedia

A metropolitan area or metro is a region consisting of a densely populated urban core and its less-populated surrounding territories under the same administrative division, sharing industry, infrastructure and housing.1

If Berlins metropolitan area contradicts what is written above, then i will improve my answer.

My helper is claiming that different state laws apply for Education, housing, building laws, pilice, justice and do not fall under the berlin administrative division, despite being classed as the Berlin metropolitan area.

So is Berlins metropolitan area any different from anywhere else in the world?

cropping – How do I select an area with an exact width and height from the center of an image in Photoshop?

Stack Exchange Network

Stack Exchange network consists of 176 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Drawing header and footer area in DirectX 9 w/ C++

I don’t know how to draw something like this? I am using DirectX 9.0 currently.

enter image description here


#include <windows.h>
#include <windowsx.h>
#include <d3d9.h>

#pragma comment (lib, "d3d9.lib")

LPDIRECT3D9 d3d;    

// function prototypes
void initD3D(HWND hWnd);    
void render_frame(void);    
void cleanD3D(void);    

LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);

int WINAPI WinMain(HINSTANCE hInstance,
                   HINSTANCE hPrevInstance,
                   LPSTR lpCmdLine,
                   int nCmdShow)
    HWND hWnd;
    ZeroMemory(&wc, sizeof(WNDCLASSEX));
     wc.cbSize = sizeof(WNDCLASSEX); = CS_HREDRAW | CS_VREDRAW;
    wc.lpfnWndProc = WindowProc;
    wc.hInstance = hInstance;
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    wc.hbrBackground = (HBRUSH)COLOR_WINDOW;
    wc.lpszClassName = L"WindowClass";
    hWnd = CreateWindowEx(NULL,
                          300, 300,
                          800, 600,

    ShowWindow(hWnd, nCmdShow);
    MSG msg;

        while(PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))

        if(msg.message == WM_QUIT)


    return msg.wParam;
// this is the main message handler for the program
LRESULT CALLBACK WindowProc(HWND hWnd, UINT message, 
                 WPARAM wParam, LPARAM lParam)
    case WM_DESTROY:
                return 0;
            } break;
   return DefWindowProc (hWnd, message, wParam, lParam);

void initD3D(HWND hWnd)
    d3d = Direct3DCreate9(D3D_SDK_VERSION);   
     ZeroMemory(&d3dpp, sizeof(d3dpp));    
    d3dpp.Windowed = TRUE;    
    d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;    
    d3dpp.hDeviceWindow = hWnd;    


void render_frame(void)
    // clear the window to a deep blue
    d3ddev->Clear(0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 170), 1.0f, 0); 
   d3ddev->Present(NULL, NULL, NULL, NULL);

void cleanD3D(void)

google sheets – how to create stacked area chart with grouping

I have data that looks like below

date city state covid
1/1  NYC  NY    10
1/2  NYC  NY    15
1/3  NYC  NY    12
1/4  NYC  NY    11
 .    .    .    .
 .    .    .    .
 .    .    .    .
 .    .    .    .
1/1  LA   CA    10
1/2  LA   CA    15
1/3  LA   CA    12
1/4  LA   CA    11
 .    .    .    .
 .    .    .    .
 .    .    .    .

and I want to create, in google sheet, a stacked area chart where the x-axis is date, the y-axis is a number of the covid case, and the chart is grouped by city. Is it possible to create such a chart with minimum extra tables created?

dnd 5e – Which spells require the caster to see a target creature or unoccupied area?

Spells that rely on sight

If you cast any of these spells while blinded or your vision is heavily obscured, the spell fails or is crippled. They all use the “that you can see” keywords when they are cast.

If vision is obscured after the spell is cast it may not matter but at least a caster using these spells might be nerfed by Fog Cloud or Darkness the same way Silence nerfs spells with a Verbal component.

        § Create Bonfire [Elemental Evil]
        § Frostbite [Elemental Evil]
        § Shape Water [Elemental Evil]
        § Mold Earth [Elemental Evil]
        § Beast Bond [Elemental Evil]
        § Lightning Lure [SCAG]
        § Control Flames [Elemental Evil]
        § Sacred Flame
    Level 1 Spells:
        § Healing Word
        § Animal Friendship 
        § Tenser’s Floating Disk
        § Tasha’s Hideous Laughter
        § Hellish Rebuke
        § Chromatic Orb
        § Magic Missile
        § Hideous Laughter
        § Hex
        § Floating Disk
        § Bane
    Level 2 Spells:
        § Summon Beast
        § Hold Person
        § Blindness / Deafness
        § Misty Step
        § Knock
        § Levitate
        § Dust Devil [Elemental Evil]
        § Heat Metal
        § Detect Thoughts
        § Phantasmal Force
        § Pyrotechnics [Elemental Evil]
        § Prayer of Healing
        § Maximilian’s Earthen Grasp [Elemental Evil]
        § Magic Mouth
        § Enthrall
    Level 3 Spells:
        § Conjure Animals
        § Blink
        § Magic Circle
        § Major Image
        § Mass Healing Word
        § Haste
    Level 4 Spells:
        § Compulsion
        § Dominate Beast
        § Mordenkainen’s Faithful Hound
        § Fabricate
        § Conjure Minor Elementals
        § Faithful Hound
        § Polymorph
        § Guardian of Faith
        § Evard's Black Tentacles
        § Conjure Woodland Beings
        § Blight
        § Black Tentacles
        § Banishment
    Level 5 Spells:
        § Dominate Person
        § Bigby ’s Hand
        § Modify Memory
        § Seeming
        § Hold Monster
        § Transmute Rock [Elemental Evil]
        § Telekinesis
        § Passwall
        § Geas
        § Control Winds [Elemental Evil]
        § Arcane Hand
    Level 6 Spells:
        § Magic Jar
        § Irresistible Dance
        § Eye Bite
        § Mass Suggestion
        § Heal
        § Harm
        § Flesh to Stone
        § Disintegrate
        § Conjure Fey
        § Chain Lightning
        § Bones of the Earth [Elemental Evil]
    Level 7 Spells:
        § Conjure Celestial
        § Teleport
        § Finger of Death
    Level 8 Spells:
        § Animal Shapes
        § Demi-Plane
        § Maze
        § Feeble Mind
        § Earthquake
        § Dominate Monster
    Level 9 Spells:
        § True Polymorph
        § Wish
        § Mass Heal
        § Imprisonment