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
2 answers

angularJS shows empty slots in array but it's not

It's weird and I don't have any idea of how to solve this issue... I have my controller with an ajax call using a service with promise, which works great. horariosOcupadosService.getHorariosOcupados($scope.formData.cmbUnidade,…
Eduardo
  • 21
  • 2
1
vote
1 answer

pass data from one class to another qt

I want to pass data from one form to another. I did some research and I found out how to do it, but my code doesn't work!! Here is my code: MainWindow.h signals: void signalEmission(const String &port) ; MainWindow.cpp void…
1
vote
1 answer

extracting coordinates from polygon r

I am trying to extract coordinates from numerous polygons, originally contained in a SpatialPolygons object: Sr1 = Polygon(cbind(c(2,4,4,1,2),c(2,3,5,4,2))) Sr2 = Polygon(cbind(c(5,4,2,5),c(2,3,2,2))) Srs1 = Polygons(list(Sr1), "s1") Srs2 =…
LoveMeow
  • 1,141
  • 2
  • 15
  • 26
1
vote
1 answer

QObject::connection(const QObject*, const char*, const char*, Qt::ConnectionType) "Cannot convert argument 3 from 'fileProcessor' to const QObject *"

I need the instance of p to by of type QObject it seems, I have extended QObject and defined the keyword Q_OBJECT in fileprocessor.h, I am not sure what else I can do. -Fileprocessor.h #ifndef FILEPROCESSOR_H #define FILEPROCESSOR_H #include…
user4217633
  • 71
  • 3
  • 10
1
vote
1 answer

PYQT4 - Why I can't add Buttons to QMainWindow in Slot/callback function?

I need to create buttons dynamically in a QMainWindow, and I'm trying it through the RefreshData() Slot function. The point is, despite the function runs and the Buttons are created, they are not linked to QMainWindow!! Buut when I call that…
1
vote
1 answer

Qt C++ WebKit windowCloseRequested Signal

I am trying to connect QWebpage::windowCloseRequested() to a slot that just prints out a debug message. When I call window.close(); in JavaScript it doesn't bubble the signal up or call the slot... connect(webView->page(),…
J. Martin
  • 1,683
  • 2
  • 17
  • 33
1
vote
0 answers

VB Regarding Arrays and If Then Statements

I am currently working on a project in VB and I am having 2 issues, both in the btnPull_Click function. First is having the 3 wheels mimic the spin of the slot machine. I have the .sleep in there for the delay you would see but I can't seem to get…
1
vote
1 answer

Slot not being passed from action to layout in Symfony 1.4

I'm using the following to set a slot in an action but I can't retrieve it in the layout. $this->getResponse()->setSlot('global_message', 'You have already completed this contest.'); But if you set this in the template file, it works fine. Anyone…
Justin
  • 4,203
  • 7
  • 41
  • 58
1
vote
1 answer

R - Creating a class with a list attribute

I am pretty new using R in an advanced way...so apologize for futile questions! I want to create a object of class S4, defined by 3 slots. Thing is that I can't manage to create these attributes as a list. Here is my code…
Remssssss
  • 89
  • 1
  • 9
1
vote
0 answers

boost signals2 connecting using XML file

in the following code example I would like to define the connections between the outputSignal and the slots in a XML file and I would like then to connect the actual objects according to that XML. How can I do that? class A { public: …
gerrit
  • 21
  • 2
1
vote
2 answers

__setattr__ versus __slots__ for constraining attribute creation in Python

I've been reading about how make Python classes less dynamic, specifically by not allowing users to dynamically create new attributes. I've read that overloadding __setattr__ is a good way to do this , and __slots__ is not the way to go. One post on…
hunse
  • 3,175
  • 20
  • 25
1
vote
2 answers

Qt5 Connect Custom WindowClose Signal To A Different Window

I'm trying to connect a signal from one class to a slot in another class but when I do, my application crashes on startup. I read some other posts on here and the Qt forums that eluded to connecting custom signals as such but I think I'm connecting…
Jarrod Cabalzar
  • 408
  • 1
  • 5
  • 24
1
vote
1 answer

Finding an empty slot in array and using it

So I have a problem that I have been messing with for a while in Squirrel. I want to create something that goes through everything inside an array, e.g: local array = [1, 2, 3, -1, 5, -1, 7, -1]; and look for those that are -1, I want to use just…
Rolandd
  • 11
  • 1
  • 4
1
vote
3 answers

R: delete attribute in a slot of a SpatialPixelsDataFrame object

I want to plot my kriging-results which are stored in a SpatialPixelsDataFrame object. Using spplot, it automatically creates a plot including var1.pred, var1.var and var1.stdev. This is nice, but I want the spplot function to only plot var1.pred,…
1
vote
0 answers

Identifying consistently physical usb slots where devices are plugged in

I have an applicattion in Windows 7 that uses two USB handsets plugged to specific physical external USB slots in a PC (eg: the left side USB slot and the right-side USB slot in a tablet). The application needs to handle differently those…