dnd 5th – What is considered an object?

An object is a non-living, non-thinking thing, which can clearly be separated from its surroundings, has its own statistics and has no separate statistics for any of its vital parts.

Dungeon Master Guide, chapter 8, Objects section, pages 246-247 gives us the majority of what we need: a definition, examples for the armor class and hit points, a suggestion for fairly large things, details related to damage types and details on damage thresholds.

The definition of the objects reads as follows (it is me who underlines):

For the purposes of these rules, an object is a discreet, inanimate item like a window, a door, a sword, delivered, table, chair or stone, do not a building or a vehicle that is made of many other objects.

Discreet Generally means that something is easy to identify as distinct from what surrounds it. So that would mean that you can easily tell where the thing in question ends and everything around it begins. An example would be individual bricks in an uncovered wall or a wall in relation to its roof.

Inanimate simply means not having a life, but due to the sometimes fuzzy nature of this in 5th, I think it would make sense to extend this to have no choice. Basically, the inability to do anything without the action of an external force.

As for the examples of the definition, I have chosen to highlight delivered, as this is an element of the Player Manual, and we know that it, although composed of several parts, has statistics only for itself as a whole, even if the parchment and the paper are themselves separate elements. State that complexity is not important.

Finally, by definition, we're told about buildings and vehicles, but specifically do not objects only if they are composed of other objects. If they weren't always objects, nothing would be needed after the word vehicle. We even have an example of this as objects directly for the Objects section, because a cart is listed in the Hit Points table and a cart is a drawn vehicle, as shown in the table Transfer, harness and drawn vehicles on page 157 of Player Manual.
In addition, there is a table on page 119 of the Dungeon Master Guide called Airborne and nautical vehicles which has a number of vehicles with damage thresholds, something listed as being present on some items. It should be noted that the vehicles listed here or in the Player Manual, only have statistics for themselves as a whole, not for parts.

Finally, there are 3 examples of articles that can help us clarify what it means to be compound other objects.

The first is Daern's Instant Fortress magic object (Dungeon Master Guide, page 160). Once deployed, it is a building where the roof, door and each wall have their own hit points. These are all vital parts of the whole, without them the building is not a functional building, so it is compound of these parts. So this building is do not an object itself. The pieces themselves are objects.

The second is the Keelboat as listed in Ghosts of Saltmarsh (page 188). This article not only presents statistics for itself as a whole, but also for each vital part of its structure: the hull, the helm, the oars, the sails. It also lists a ballista, but this is not vital. If one of the vital parts is destroyed, the vehicle stops working, so it is compound of them. Thus, the keelboat, as noted in Ghosts of Saltmarsh, is do not an object. But every part is.

The last is the demon mill for the descent to Avernus (page 219). Like Daern's Instant Fortress and the keelboat listed in Ghosts of Saltmarsh, this item has parts listed. Unlike these other objects, however, the parts listed are not essential to the existence of this object, so their loss would not functionally destroy this object. So this article East an object.

Sorry for the lengthy answer, here is an easy step-by-step checker to determine if something is an object or not:

  1. is he alive or able to act independently? if so, not an object.
  2. is it difficult to separate from one's environment? if yes, not an object
  3. Is Dungeon Master stats missing or from another source? if so, not an object.
  4. do vital parts have their own statistics? if so, not an object.

If the answer to the above questions is negative, then the item in question East an object.

python – the & # 39; super & # 39; object does not support item assignment

Can anyone help me with this bug in Django with python 2.7. I am trying with this code to implement a calendar.
I encounter an error in the context variable (& # 39; calendar & # 39;) = mark_safe (html_cal)
I don't know what I'm doing wrong.

 from datetime import datetime
from django.shortcuts import render
from django.http import HttpResponse
from django.views import generic
from django.utils.safestring import mark_safe

from .models import *
from .utils import Calendar

class CalendarView(generic.ListView):
    model = Event
    template_name = 'agendas/templates/calendar.html'

def get_context_data(self, **kwargs):
    context = super(CalendarView,self)

    # use today's date for the calendar
    d = get_date(self.request.GET.get('day', None))

    # Instantiate our calendar class with today's year and date
    cal = Calendar(d.year, d.month)

    # Call the formatmonth method, which returns our calendar as a table
    html_cal = cal.formatmonth(withyear=True)
    context('calendar') = mark_safe(html_cal)
    return context

def get_date(req_day):
    if req_day:
        year, month = (int(x) for x in req_day.split('-'))
        return date(year, month, day=1)
    return datetime.datetime.today()

Django journal error

    'super' object does not support item assignment
    context('calendar') = mark_safe(html_cal)

The context variable is described here.

, >
d   datetime.datetime(2020, 3, 25, 23, 26, 52, 368050)
self    
cal     
html_cal    'n{self.formatmonthname(self.year, self.month, withyear=withyear)}n{self.formatweekheader()}n{self.formatweek(week, events)}n{self.formatweek(week, events)}n{self.formatweek(week, events)}n{self.formatweek(week, events)}n{self.formatweek(week, events)}n{self.formatweek(week, events)}n'
kwargs {}

Poor way to determine the color of an object with filters?

One of the earliest forms of colorimetry involved a light sensor (or film) with a known sensitivity curve over the visible spectrum and, if a film was involved, a densitometer to measure the resulting density.

You organize constant lighting and measure the level of light received (or the density above low + fog with a standardized development process) for each of the three or more filters (also known absorption characteristics, of course ).

As you can probably see by now, this is not exactly a "poor man's method", because of all the necessary science behind the instruments. Still, it probably cost less to do it that way with a panchromatic film, in the 1950s, than to buy and use an actual colorimeter.

An alternative that was available at different times was colored chips. That had limits, but the idea was that you would hold a known color swatch against the object, and in the same light, and then move on to a swatch that was, say, a little greener, a little less blue, etc. until you have an exact match. It used to take time, but if the sharpness of your measurement doesn't need to be too high, it will most likely be less than the film and filter method.

python – Creation of a generator object with image augmentation to form convolutional neural networks with Keras

I'm currently self-learning on a Python generator object and I'm using it to generate training data and increase it on the fly, then feed it into convolutional neural networks.

Could someone help me revise my code? It works fine, but I need a review to make it more efficient and better structured. Also, how can I verify that using the generator will consume less memory (compared to just switching from a normal numpy array to the model)?

Thank you so much!

from keras.utils import to_categorical
from keras.models import Sequential
from keras.layers import Dense, Conv2D, Flatten
import pandas as pd
import os
import cv2
import numpy as np
from sklearn.model_selection import train_test_split
import tensorflow as tf
from augment import ImageAugment

class Generator():
    def __init__(self, feat, labels, width, height):
        self.feat = feat
        self.labels = labels
        self.width = width
        self.height = height

    def gen(self):
        '''
        Yields generator object for training or evaluation without batching
        Yields:
            im: np.array of (1,width,height,1) of images
            label: np.array of one-hot vector of label (1,num_labels)
        '''
        feat = self.feat
        labels = self.labels
        width = self.width
        height = self.height
        i=0
        while (True):
            im = cv2.imread(feat(i),0)
            im = im.reshape(width,height,1)
            im = np.expand_dims(im,axis=0)
            label = np.expand_dims(labels(i),axis=0)
            yield im,label
            i+=1

            if i>=len(feat):
                i=0


    def gen_test(self):
        '''
        Yields generator object to do prediction
        Yields:
            im: np.array of (1,width,height,1) of images
        '''
        feat = self.feat
        width = self.width
        height = self.height
        i=0
        while (True):
            im = cv2.imread(feat(i),0)
            im = im.reshape(width,height,1)
            im = np.expand_dims(im,axis=0)
            yield im
            i+=1


    def gen_batching(self, batch_size):
        '''
        Yields generator object with batching of batch_size
        Args:
            batch_size (int): batch_size
        Yields:
            feat_batch: np.array of (batch_size,width,height,1) of images
            label_batch: np.array of (batch_size,num_labels)
        '''
        feat = self.feat
        labels = self.labels
        width = self.width
        height = self.height
        num_examples = len(feat)
        num_batch = num_examples/batch_size
        X = ()
        for n in range(num_examples):
            im = cv2.imread(feat(n),0)
            try:
                im = im.reshape(width,height,1)
            except:
                print('Error on this image: ', feat(n))
            X.append(im)
        X = np.array(X)

        feat_batch = np.zeros((batch_size,width,height,1))
        label_batch = np.zeros((batch_size,labels.shape(1)))
        while(True):
            for i in range(batch_size):
                index = np.random.randint(X.shape(0),size=1)(0) #shuffle the data
                feat_batch(i) = X(index)
                label_batch(i) = labels(index)
            yield feat_batch,label_batch

    # def on_next(self):
    #     '''
    #     Advance to the next generator object
    #     '''
    #     gen_obj = self.gen_test()
    #     return next(gen_obj)
    #
    # def gen_show(self, pred):
    #     '''
    #     Show the image generator object
    #     '''
    #     i=0
    #     while(True):
    #         image = self.on_next()
    #         image = np.squeeze(image,axis=0)
    #         cv2.imshow('image', image)
    #         cv2.waitKey(0)
    #         i+=1

    def gen_augment(self,batch_size,augment):
        '''
        Yields generator object with batching of batch_size and augmentation.
        The number of examples for 1 batch will be multiplied based on the number of augmentation

        augment represents (speckle, gaussian, poisson). It means, the augmentation will be done on the augment list element that is 1
        for example, augment = (1,1,0) corresponds to adding speckle noise and gaussian noise
        if batch_size = 100, the number of examples in each batch will become 300

        Args:
            batch_size (int): batch_size
            augment (list): list that defines what kind of augmentation we want to do
        Yields:
            feat_batch: np.array of (batch_size*n_augment,width,height,1) of images
            label_batch: np.array of (batch_size*n_augment,num_labels)
        '''
        feat = self.feat
        labels = self.labels
        width = self.width
        height = self.height

        num_examples = len(feat)
        num_batch = num_examples/batch_size
        X = ()
        for n in range(num_examples):
            im = cv2.imread(feat(n),0)
            try:
                im = im.reshape(width,height,1)
            except:
                print('Error on this image: ', feat(n))
            X.append(im)
        X = np.array(X)

        n_augment = augment.count(1)
        print('Number of augmentations: ', n_augment)
        feat_batch = np.zeros(((n_augment+1)*batch_size,width,height,1))
        label_batch = np.zeros(((n_augment+1)*batch_size,labels.shape(1)))

        while(True):
            i=0
            while (i<=batch_size):
                index = np.random.randint(X.shape(0),size=1)(0) #shuffle the data
                aug = ImageAugment(X(index))
                feat_batch(i) = X(index)
                label_batch(i) = labels(index)

                j=0
                if augment(0) == 1:
                    feat_batch((j*n_augment)+i+batch_size) = aug.add_speckle_noise()
                    label_batch((j*n_augment)+i+batch_size) = labels(index)
                    j+=1

                if augment(1) == 1:
                    feat_batch((j*n_augment)+i+batch_size) = aug.add_gaussian_noise()
                    label_batch((j*n_augment)+i+batch_size) = labels(index)
                    j+=1

                if augment(2) == 1:
                    feat_batch((j*n_augment)+i+batch_size) = aug.add_poisson_noise()
                    label_batch((j*n_augment)+i+batch_size) = labels(index)
                    j+=1

                i+=1


            yield feat_batch,label_batch

def CNN_model(width,height):
    # #create model
    model = Sequential()
    model.add(Conv2D(64, kernel_size=3, activation="relu", input_shape=(width,height,1)))
    model.add(Conv2D(32, kernel_size=3, activation="relu"))
    model.add(Flatten())
    model.add(Dense(labels.shape(1), activation="softmax"))

    model.compile(optimizer='adam', loss='categorical_crossentropy', metrics=('accuracy'))
    return model


if __name__ == "__main__":
    input_dir = './mnist'
    output_file = 'dataset.csv'

    filename = ()
    label = ()
    for root,dirs,files in os.walk(input_dir):
        for file in files:
            full_path = os.path.join(root,file)
            filename.append(full_path)
            label.append(os.path.basename(os.path.dirname(full_path)))

    data = pd.DataFrame(data={'filename': filename, 'label':label})
    data.to_csv(output_file,index=False)

    labels = pd.get_dummies(data.iloc(:,1)).values

    X, X_val, y, y_val = train_test_split(
                                            filename, labels,
                                            test_size=0.2,
                                            random_state=1234,
                                            shuffle=True,
                                            stratify=labels
                                            )

    X_train, X_test, y_train, y_test = train_test_split(
                                                        X, y,
                                                        test_size=0.025,
                                                        random_state=1234,
                                                        shuffle=True,
                                                        stratify=y
                                                        )

    width = 28
    height = 28

    test_data = pd.DataFrame(data={'filename': X_test})


    image_gen_train = Generator(X_train,y_train,width,height)
    image_gen_val = Generator(X_val,y_val,width,height)
    image_gen_test = Generator(X_test,None,width,height)


    batch_size = 900
    print('len data: ', len(X_train))
    print('len test data: ', len(X_test))

    #augment represents (speckle, gaussian, poisson). It means, the augmentation will be done on the augment list element that is 1
    #for example, augment = (1,1,0) corresponds to adding speckle noise and gaussian noise
    augment = (1,1,1)
    model = CNN_model(width,height)

    model.fit_generator(
                        generator=image_gen_train.gen_augment(batch_size=batch_size,augment=augment),
                        steps_per_epoch=np.ceil(len(X_train)/batch_size),
                        epochs=20,
                        verbose=1,
                        validation_data=image_gen_val.gen(),
                        validation_steps=len(X_val)
                        )
    model.save('model_aug_3.h5')
    model = tf.keras.models.load_model('model_aug_3.h5')

    #Try evaluate_generator
    image_gen_test = Generator(X_test,y_test,width,height)
    print(model.evaluate_generator(
                            generator=image_gen_test.gen(),
                            steps=len(X_test)
                            ))

    #Try predict_generator
    image_gen_test = Generator(X_test,None,width,height)
    pred = model.predict_generator(
                            generator=image_gen_test.gen_test(),
                            steps=len(X_test)
                            )
    pred = np.argmax(pred,axis=1)
    # image_gen_test = Generator(X_test,pred,width*3,height*3)
    # image_gen_test.gen_show(pred)
    wrong_pred = ()
    for i,ex in enumerate(zip(pred,y_test)):
        if ex(0) != np.argmax(ex(1)):
            wrong_pred.append(i)
    print(wrong_pred)

    # for i in range(len(X_test)):
    #     im = cv2.imread(X_test(i),0)
    #     im = cv2.putText(im, str(pred(i)), (10,15), cv2.FONT_HERSHEY_SIMPLEX, 1, (255, 0, 0), 2)
    #     print(i)
    #     cv2.imshow('image',im)
    #     cv2.waitKey(0)
```

javascript – How to remove repeated elements from an array of objects while preserving the object that has an id property other than null

I need to delete items that have the same value on the property screen_id keep what has property id different from null.

My example object:

let userPermissions  = (
    {
        id: 1,
        description: Cadastro de usuários,
        screen_id: 1,
        allow_read: true,
        allow_create: true,
        allow_update: false,
        allow_delete: true
    },
    {
        id: null,
        description: "Cadastro de usuários",
        screen_id: 1,
        allow_read: false,
        allow_create: false,
        allow_update: false,
        allow_delete: false
    },
    {
        id: null,
        description: "Tela teste 3",
        screen_id: 5,
        allow_read: false,
        allow_create: false,
        allow_update: false,
        allow_delete: false
    },
)

I need the following result:

(
    {
        "id": 1,
        "description": "Cadastro de usuários",
        "screen_id": 1,
        "allow_read": true,
        "allow_create": true,
        "allow_update": false,
        "allow_delete": true
    },
    {
        "id": null,
        "description": "Tela teste 3",
        "screen_id": 5,
        "allow_read": false,
        "allow_create": false,
        "allow_update": false,
        "allow_delete": false
    },
)

What I have tried:

userPermissions = userPermissions.reduce((arr, item) => {
  const removed = arr.filter(i => i('screen_id') === item('screen_id') && item('id') !== null)
  return (...removed, item)
}, ())

However, the result does not come back as expected.

onload a JavaScript FileReader object

I am doing a course and to load an image into a form, the following code is used, which they do not explain very well and I have searched on the Internet but I do not understand how it works

let reader = new FileReader();
            reader.onload = ((theFile) => {
                console.log(theFile);
                return (e) => {
                    console.log(e);
                    //Insertamos la imagen
                    document.getElementById('fotos').innerHTML = 
                    ('').join('');
                };

            })(f);
            reader.readAsDataURL(f);

What I understand is that when reading the file, the anonymous method of reader.onload is activated and the File parameter is the file that was read, I made it a console log and I can see it is outputting information from the image such as name, size, among other things, but I don't understand the return parameter e, when doing the console log, it always shows me more detailed information about the image, but I don't understand why or how it works, the code works well, but I would like to understand how this return works, or why why at In the end, the variable f is- it a parameter, what function does it get as a parameter?

object oriented – i want to know if my code is a correct way to pho oop while using jquery

Now my question is the right way to code if i want to use OOP and also jquery to call functions
i have 2 files
the client side which has an ajax call to get data

AddTicket, php

$(document).on('change', '#userList', function() {
            //
            var email = document.getElementById('userList').value;
            var user = $('option(value="'+email+'")').text();
            userID=$(".es-list li.es-visible").attr('value')
            // console.log(basic_text);
            // console.log(basic_value);

            $.ajax({
                type: "POST",
                url: "retrieveUserDetails.php",
                data: {email: email,user: user,type: "0"},
                success: function(result) {                                 
                    //alert(result)
                    $("#txtUserID").val(result);
                    },
                fail: function(xhr, textStatus, errorThrown) {
                    alert(errorThrown);
                }

            });
        });

the second file is
retrieveUserDetails.php

if ($_POST('type') == "0"){         
        $users = $obj_users->getUserDetails($_POST('user'),$_POST('email'));            
        echo $users;    
    }else if($_POST('type') == "2"){        
        echo $obj_users->checkUserExist($_POST('fullname'),$_POST('email'));//AddTicket.php,AddTicketPost.php   
    }else if($_POST('type') == "3"){        
        $obj_posts->getTicketPosts($_POST('ticketid')); //SearchTicketPost.php
    }else if($_POST('type') == "4"){        
        $obj_posts->getTicketPostData($_POST('ticketpostid'));  //EditTicketPost.php
    }else if($_POST('type') == "5"){        
        $obj_attachments->getPostAttachments($_POST('ticketpostid'));   //EditTicketPost.php
    }

As you can see, retrieveUserDetails.php sort of acts as a controller.all of my ajax calls in this file, then I identify in this file the class and function to call.

I just want to know if this is a clean and proper way to use OOP and Jquery together where I call ajax on a file then that file calls classes. if it is not clean and correct, can you help me on the right track? Thanks in advance.

FYI this code works I want to know if it is a correct way.

object oriented – simple implementation of List in C #

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
class List
{
    private T() arrayList;
    private int arrayLenght = 5;
    private int arrayIndex = 0;


    public List()
    {
        arrayList = new T(arrayLenght);
    }

    internal string() toArray()
    {
        string() arrayListArray = new string(arrayLenght);
        try
        {

            for (int j = 0; j < arrayList.Length; j++)
            {
                if (arrayList(j) == null)
                {
                    arrayListArray(j) = "";
                }
                else
                {
                    arrayListArray(j) = arrayList(j).ToString();
                }

            }
        }
        catch(Exception Ex)
        {
            Console.WriteLine(Ex);
        }
        return arrayListArray;
    }

    private void ArrayOverFlow(T genericParameter)
    {
        try
        {
            arrayLenght = 2 * arrayLenght;
            T() arrayListNewSize = new T(arrayLenght);
            int arrayListNewSizeIndex = 0;
            Array.Copy(arrayList, arrayListNewSize, arrayList.Length);
            arrayList = new T(arrayLenght);
            Array.Copy(arrayListNewSize, arrayList, arrayListNewSize.Length);
            arrayListNewSize = null;
            arrayList(arrayIndex) = genericParameter;
            arrayIndex++;
        }
        catch (Exception Ex)
        {
            Console.WriteLine(Ex);
        }
    }

    internal void Add(T genericParameter)
    {
        // Console.WriteLine("Parameter type: {0}, value: {1}", typeof(T).ToString(), genericParameter);  
        try
        {
            if (arrayIndex + 1 <= arrayLenght)
            {
                arrayList(arrayIndex) = genericParameter;
                arrayIndex++;
            }
            else
            {
                ArrayOverFlow(genericParameter);
            }
        }
        catch (Exception Ex)
        {
            Console.WriteLine(Ex);
        }
    }

    internal void Insert(int index, T genericParameter)
    {
        try
        {
            arrayList(index) = genericParameter;
        }
        catch (Exception Ex)
        {
            Console.WriteLine(Ex);
        }
    }

    private void RemoveArray(int index)
    {
        try
        {
            for (int i = index; i < arrayList.Length; i++)
            {
                if (i < arrayList.Length - 1)
                {
                    arrayList(i) = arrayList(i + 1);
                }
            }
        }
        catch (Exception Ex) {
            Console.WriteLine(Ex);
        }
    }

    internal void RemoveAt(int index)
    {
        RemoveArray(index);
    }

    internal void Remove(T genericParameter)
    {
        try
        {
            for (int i = 0; i < arrayList.Length; i++)
            {
                if (arrayList(i) != null)
                {
                    if (arrayList(i).Equals(genericParameter))
                    {
                        RemoveArray(i);
                    }
                }
            }
        }
        catch (Exception Ex)
        {
            Console.WriteLine(Ex);
        }
    }
   }
 }

I have also written test cases for the same

using NUnit.Framework;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
{
(TestFixture)
class Test1
{
    (TestCase)
    public void TestAdd1()
    {
        List st = new List();
        st.Add(10);
        st.Add(20);
        st.Add(30);
        st.Add(40);
        st.Add(50);
        st.Add(60);

        Assert.AreEqual("10,20,30,40,50,60,0,0,0,0", string.Join(",", st.toArray()));
    }
    (TestCase)
    public void TestAdd2()
    {
        List st = new List();
        st.Add("10");
        st.Add("20");
        st.Add("30");
        st.Add("40");
        st.Add("50");
        st.Add("60");
        Assert.AreEqual("10,20,30,40,50,60,,,,", string.Join(",", st.toArray()));
    }

    (TestCase)
    public void TestAdd3()
    {
        List st = new List();
        st.Add(10);
        st.Add(20);
        st.Add(30);
        st.Add(40);
        st.Add(50);
        st.Add(60);
        st.Insert(2, 70);
        Assert.AreEqual("10,20,70,40,50,60,0,0,0,0", string.Join(",", st.toArray()));
    }

    (TestCase)
    public void TestAdd4()
    {
        List st = new List();
        st.Add("10");
        st.Add("20");
        st.Add("30");
        st.Add("40");
        st.Add("50");
        st.Add("60");
        st.Insert(2, "70");
        Assert.AreEqual("10,20,70,40,50,60,,,,", string.Join(",", st.toArray()));
    }

    (TestCase)
    public void TestAdd5()
    {
        List st = new List();
        st.Add(10);
        st.Add(20);
        st.Add(30);
        st.Add(40);
        st.Add(50);
        st.Add(60);
        st.RemoveAt(2);
        Assert.AreEqual("10,20,40,50,60,0,0,0,0,0", string.Join(",", st.toArray()));
    }


    (TestCase)
    public void TestAdd6()
    {
        List st = new List();
        st.Add("10");
        st.Add("20");
        st.Add("30");
        st.Add("40");
        st.Add("50");
        st.Add("60");
        st.RemoveAt(2);
        Assert.AreEqual("10,20,40,50,60,,,,,", string.Join(",", st.toArray()));
    }
    (TestCase)
    public void TestAdd7()
    {
        List st = new List();
        st.Add(10);
        st.Add(20);
        st.Add(30);
        st.Add(40);
        st.Add(50);
        st.Add(60);
        st.Remove(30);
        Assert.AreEqual("10,20,40,50,60,0,0,0,0,0", string.Join(",", st.toArray()));
    }

    (TestCase)
    public void TestAdd8()
    {
        List st = new List();
        st.Add("10");
        st.Add("20");
        st.Add("30");
        st.Add("40");
        st.Add("50");
        st.Add("60");
        st.Remove("30");
        Assert.AreEqual("10,20,40,50,60,,,,,", string.Join(",", st.toArray()));

       }
     }
   }

I am learning the structure of the data, so I have tried to implement a list for better understanding so that any feedback and review of the code is useful.

hello !!, i would like to add N new waypoint numbers in my object, how to do it without writing it directly on the object?

Coded

var
routeRequestParams =
{
mode: “the fastest; car",
representation: "display",
routeattributes: & # 39; waypoints, summary, shape, legs & # 39;
maneuvering powers: "direction, action",
/ *
This is what I want the object to contain
waypoint0: x [1] + "," + y [1],
waypoint1: x [2] + "," + y [2],
waypoint2: x [3] + "," + y [3],
waypoint3: x [4] + "," + y [4],

waypointN: x [n + 1] + "," + y [n + 1],
* /
};

windows 10 – Echo GDI Object Count to Command Line or File

I'm finally looking for a way to set up an automated alert that will notify me if the number of GDI objects in a process is approaching the limit of 10,000 by default. I have a known problem with certain software used by our company which causes the number of explorers to increase until it hangs without warning – there is apparently a fix in a later version of the software, but we cannot upgrade for reasons beyond control. My idea is to create a background program / script that will display an alert when it sees a GDI number approaching the limit of 10,000. However, the only way I can seem to display the GDI number is via a GUI in Task Manager or Process Explorer – if I could somehow just dump this into a text file, I would be defined, but I don't know if this is possible.

I tried the GDIView software, but our Antivirus company reports it and it's out of my control.

I have downloaded sysinterals, but I can't seem to find a way to get one of the command line tools to echo the GDI number I can get in Process Explorer . I also tried the task list, but in the same way I can't find a way to get the GDI tally.

For reference, I'm on a Windows 10 machine here. I also have the Linux subsystem activated and I have the option to run Ubuntu through this. I am open to doing something in batch or python if that is useful – although it seems like PowerShell is being prevented from running scripts (maybe I could work around this though).