Questions tagged [members]

175 questions
3
votes
7 answers

Why generated code in C# uses underscore?

I know this might be a stupid question, but here it goes. I always wrote my private members like privateMember and I've been reading a lot about naming conventions in C# because I noticed that a lot of the automatic generated code in visual studio…
Eric.M
  • 827
  • 1
  • 14
  • 29
2
votes
2 answers

Javascript Mutable Parameter?

This is just a technical question about javascript. In javascript, one member of my group found something odd with javascript object creation. For some reason, the parameters in the object are already treated as members without assigning them to…
Wes
  • 45
  • 1
  • 7
2
votes
2 answers

how can I get LinkedIn group members

I have been trying to get all the members of my LinkedIn groups. I have gone through their API's but LinkedIn don't support this. I have tried many other ways of doing so through curl , different php functions, HTML DOM all have session problem (I…
hashmi
  • 21
  • 1
  • 2
2
votes
2 answers

Handling Specified Member Classes In C#

In building a class structure, I would like to have derived classes potentially posses derived member classes. For example: class GamePiece { } class Checker : GamePiece {} class ChessMan : GamePiece {} class Game { protected GamePiece…
user954886
  • 23
  • 2
2
votes
0 answers

Pros/cons of different ways accessing C struct members

Structs interface and Hiding members in a C struct discusses various ways in accessing /modifying members. What would be pros/cons of using: Opaque handle to struct and setters/getters Accessing members directly foo.value(&foo, value) functions…
mindless
  • 135
  • 2
  • 6
2
votes
1 answer

MDX for calculating measure given equality of 2 member attributes from 2 different dimensions

I have the following structure of measures and dimensions, and some example data Fact Table: id_dim1 id_dim2 id_dim ...measure1 1 2 ...120 2 1 ...101 1 1 ...95 3 3 ...12 Dim1: id_dim1 member1value 1 Value1 2 Value2 3 Value3 Dim2: id_dim2…
envsdl
  • 21
  • 1
2
votes
3 answers

How far should I go to avoid internal getters/setters within a class

I have more of a "how much is too much" question. I have a Java class that defines several getters/setters for use by external classes (about 30 altogether). However, the Java class itself requires the use of these variables as well in some…
B Mac
  • 159
  • 1
  • 6
2
votes
1 answer

Discord.py Runtime error with dictionaries

So, I've been trying to make a bot which loops through all the members in my server. I'm using the get_all_members() generator to do so. for member in client.get_all_members(): userName = str(member.name) userGame = str(member.game) …
Neuheit
  • 75
  • 3
2
votes
1 answer

C++ - Destruction order - Static members of a function is destroyed before the main class destructor

I'm creating a c++ project using the Embarcadero RAD Studio XE7 compiler. In this project I have the following code design: A main form, inheriting from TForm, which contains a destructor A class "foo" A class "bar" in which the class "foo" is a…
Jean-Milost Reymond
  • 1,833
  • 1
  • 15
  • 36
2
votes
1 answer

Firebase Swift Get a list of rooms a member is in

I have read a good article on how to structure a firebase database for a chat app and I ended app in this structure: { "users":{ "autoIdUser1":{ "username":"john", "full_name":"John Vincent", "groups":{ …
HaVaNa7
  • 330
  • 1
  • 3
  • 14
2
votes
2 answers

Accessing non-subscriptable properties

Scripting the Blender, I successfully did bpy.ops.render.render(some_args) but bpy.ops.render['render'] fails with BPyOpsSubMod object is not subscriptable. This puzzles me since I expected that, likewise in Javascript, any Python object is a…
Little Alien
  • 1
  • 8
  • 22
2
votes
2 answers

Memory Allocation for objects in java

I am a beginner in Java and I had completed C++. In C++,the memory allocation for member functions is done at the time they are declared as a part of a class and not when the objects are created,when the objects are created,then only the memory…
Frosted Cupcake
  • 1,909
  • 2
  • 20
  • 42
2
votes
3 answers

Setting all struct pointer members to NULL

If I set a pointer to a struct to point to a block of memory via malloc, will all the members initialize to their respective default values? Such as int's to 0 and pointer's to NULL? I'm seeing that they do based on this sample code I wrote, so I…
de3z1e
  • 411
  • 4
  • 8
2
votes
4 answers

c++ default parameters class members

class bst { private: typedef struct nod { int data; nod* left; nod* right; nod(int key):data(key),left(NULL),right(NULL){} }node; node* root; public: void create(); void add(int key,node*curr=root); void c2ll(); void print(){} The code…
basav
  • 1,475
  • 12
  • 20
2
votes
2 answers

Share object across members

I'm trying to make the following example code work. I've read thru several tutorials and Q&A's, but I can't get it to work. In all likelyhood my understanding of classes are lacking, but I learn by doing. Hope I don't offend anybody :-) I'm working…
soje
  • 25
  • 4
1 2
3
11 12