Questions tagged [slots]

`__slots__` is a python language feature to reduce size of object instances by dropping the builtin dictionary every python instance normally features in order to support dynamic assignment of attributes and replacing it with a fixed set of attributes (the 'slots').

__slots__ is a python language feature to reduce size of object instances by dropping the builtin dictionary every python instance normally features in order to support dynamic assignment of attributes and replacing it with a fixed set of attributes (the 'slots'). See: https://docs.python.org/2/reference/datamodel.html#slots

306 questions
1
vote
1 answer

Multi turn dialog alexa skill

We developing a skill it requires multi-turn dialog. However, when alexa is confirming the first slot it throws up saying "There was a problem with the requested skill's response." The lambda code that alexa calls looks like this. …
1
vote
1 answer

Vue material - single selection for md-table using slots

In Vue Material Table component there is an explanation for single selection, which in codepen doesn't work https://vuematerial.io/components/table (SCROLL TO SINGLE SELECTION). I want working example of this making sure that the list to be rendered…
1
vote
1 answer

How to access named slots inside svelte component?

I'm trying out Svelte (great!) but I'm running into a problem that I don't know how to solve. I have a component with a couple of named slots. Based on whether these slots are filled, I need to render some additional HTML. So my idea was to put…
1
vote
1 answer

Disable swapping for one slot in Azure Web Apps

Let's say I have an app in Azure with 2 slots: staging and development. At the moment, I can freely do swaps between production, development and staging. Is there a way to disable swaps for development? So it's possible to swap prod & staging, but…
faso
  • 679
  • 7
  • 25
1
vote
1 answer

How can you pass arguments with class inheritance?

I have 12 classes that look like this, the only difference is DefaultAsset global object. I have 12 of those global DefaultAssetOrderedDict, such as DefaultAssetsOrderedDict, NewAssetsOrderedDict, OldAssetsOrderedDict, etc. I didn't make them part…
gunslingor
  • 1,358
  • 12
  • 34
1
vote
0 answers

Style slot in vue

Have a Table call in Index.vue: The…
user1093111
  • 1,091
  • 5
  • 21
  • 47
1
vote
0 answers

PyQt is executing my function multiple times after signal

I'm building a pyqt Qwidget with multiple QcomboBox in which the user can add items at will. But I also want to give the user the option to delete any of the items by clicking a QPushbutton. Because I can't know in advance which comboBox and item…
Elcook
  • 165
  • 2
  • 10
1
vote
1 answer

Understand how slots work with dictionary class

Somebody recently pointed me to the usage of __slots__ What I could find on the internet is that it could improve memory usage class Passenger2(): __slots__ = ['first_name', 'last_name'] def __init__(self, iterable=(), **kwargs): for…
Ludisposed
  • 1,709
  • 4
  • 18
  • 38
1
vote
1 answer

Is it possible to add values to a custom slot type in Lambda ASK code?

I am making a custom slot type that will be different for each skill user based on a certain list of their products. Is there a way to define an empty slot called "userProducts" and then populate it in my NodeJS code with Alexa Skills kit?
Team. Coco
  • 211
  • 3
  • 13
1
vote
1 answer

Using Enums in Qt slots

In the class QCustomPlot have enums that I want to use in the constructor of the QWidget class, which uses class QCustomPlot. #include "qcustomplot.h" SignalViewerDialog::SignalViewerDialog(QVector x_1, …
1
vote
2 answers

How to have multiple Qt buttons return each different values

I'm relatively new to Qt and I’m stuck with trying to figure out how to have different buttons each return a specific value when they're clicked.I've read through the Qt doc on signals and slots but I didn't find something useful. I know that I can…
Layla
  • 77
  • 1
  • 11
1
vote
1 answer

Qt5 | Function w/ Slot Not Working

I've made an app with two forms. When I press the save button in the second form, it updates the DB Record, and returns back to the first form. I've connected the two forms via Signal-Slot with this code: DruckerData.h signals: void…
Pecurka
  • 113
  • 2
  • 10
1
vote
1 answer

How to port `__slots__` from Python 2 to 3

I have to port a legacy code ( ~60K LOC) from Python 2 to 3 which has a couple of thousand of structures like below: class Sample(object): __slots__ = ('both', 'advertise') class __metaclass__(type): __instancecheck__ = classmethod( …
ViFI
  • 971
  • 1
  • 11
  • 27
1
vote
1 answer

QT Interface with Slots

I made an interface and plugins by following this tutorial: http://doc.trolltech.com/4.6/plugins-howto.html and everything is working fine. But know I would like to connect a Signal to a slot of the plugins. Trying to do that I get an error, that…
Flobbes
  • 73
  • 4
1
vote
1 answer

Qt5.6 signals and slots overloading

I have created a class for handling data received from slots and have created several overloaded methods of the same name with a different parameter type. Is it possible to use overloaded methods as slots? I have two declarations so far: void…
SPlatten
  • 5,334
  • 11
  • 57
  • 128