objects

Does all SPWeb or SPSite instances get automatically disposed when console app process has ended?

We have Best practices on using disposable object in SharePoint. But i`m thinking - can I skip these when using Console Application? That's some code I want to execute once and after that process has finished. Do or don't SPSite and SPWeb's remain opened somwhere? Why i`m asking this? I just don't want to stress when using something l...

COM IUnknown and do I need a pointer to it first before calling CoGetClassObject?

In COM, when you want to create an instance of some COM Server object, do you first need to get a pointer to it's IUnknown interface and only then create a class object using CoGetClassObject? As far as I understand it, IUnknown is used to manage object lifetimes, so from my understanding, whatever object the client wants to create, one...

Creating a new object destroys an older object with different name in C++

First question here! So, I am having some problems with pointers in Visual C++ 2008. I'm writing a program which will control six cameras and do some processing on them so to clean things up I have created a Camera Manager class. This class handles all operations which will be carried out on all the cameras. Below this is a Camera clas...

How to return array of C++ objects from a PHP extension

I need to have my PHP extension return an array of objects, but I can't seem to figure out how to do this. I have a Graph object written in C++. Graph.getNodes() returns a std::map<int, Node*>. Here's the code I have currently: struct node_object { zend_object std; Node *node; }; zend_class_entry *node_ce; then PH...

Is this Javascript object literal key restriction strictly due to parsing?

Please refer to the code below, when I "comment in" either of the commented out lines, it causes the error (in IE) of "':' expected". So then is my conclusion correct, that this inability to provide a reference to an object value, as an object key in a string literal; is this strictly an interpreter/parsing issue? Is this a candidate f...

declaring/initializing primitives equal to creating new objects

is declaring/initializing primitives the same as creating new objects? from what i know when we create primitives, we also creating wrapper classes for them. im implementing on java btw. ...

Retrieving all objects in code upfront for performance reasons

How do you folks retrieve all objects in code upfront? I figure you can increase performance if you bundle all the model calls together? This makes for a bigger deal, especially if your DB cannot keep everything in memory def hitDBSeperately { get X users ...code get Y users... code get Z users... code } ...

Business Objects: Refresh Data problem with .NET API

I'm currently using the BO API for .NET to connect to our reports database. In .NET, I'm getting the following error: Your security profile does not include permission to refresh Web Intelligence documents. (WIS 30253) Interestingly enough, I can log into BO, and I can refresh the data and grab prompts as I'm logged in. From .NET, wit...

Why was the definition of a variable changed in the latest C++0x draft?

n3035 says: A variable is introduced by the declaration of an object. The variable's name denotes the object. n3090 says: A variable is introduced by the declaration of a reference other than a non-static data member or of an object. The variable's name denotes the reference or object. I wonder what motivated this change. Doe...

What exactly is a variable in C++?

The standard says A variable is introduced by the declaration of an object. The variable's name denotes the object. But what does this definition actually mean? Does a variable give a name to an object, i.e. are variables just a naming mechanism for otherwise anonymous objects? Or is a variable the name itself? Or is a variab...

Undefined symbols GCC / C++ dynamically loadable *.so objects

-I am trying to compile a netsnmp mib and extend the functionality of the snmp agent. When I try to start the daemon and load the shared object (*.so) , the daemon complains about undefined symbols. "dlopen failed: Filename.so: undefined symbol: netsnmp_container_table_row_extract" On further prodding #nm -D -u Filename.so prints out...

Hyphens in Keys of Object

I have an stdClass Object like this: stdClass Object ( [key-west] => 1 [disney-land] => 1 ) I am trying to retrieve the value like this: $objectName->key-west but the value returned is 0. Why? and How can I retrieve it as 1? Thanks ...

PHP object help -> unexpected T_OBJECT_OPERATOR

Please help me understand: print gettype(new CustomerObject()) prints: "object" (so it is an object) BUT print gettype((new CustomerObject())->get_customer()); prints: unexpected T_OBJECT_OPERATOR If I do it over two lines it works fine $object = new Customer($order->customer_id); print gettype($object); prints: object $cus...

Equivalent of object using literal notation

See following class: function availItem(xs, s, m, l, xl) { this.xs = xs; this.s = s; this.m = m; this.l = l; this.xl = xl; } How can I declare the above class using JSON? I think It should be in following manner but problem is to pass argument. var availItem = { ...

Using java to send/receive different objects through UDP

Hello everyone, I am writing a program in Java where there are communications between two or more machines using UDP. My application sends objects after serializing them through the network to the other machine where it will be deserialized and dealt with it. I was successful in sending one kind of objects so far. My problem is that I ...

How can I implement forum privileges

I've started developing a forum application in PHP on my MVC Framework and I've got to the stage where I assign permissions to members (for example: READ, WRITE, UPDATE, DELETE). Now, I know I can add 5 columns under the user table in my database and set them to 1 | 0, but that to me seems like too much if I want to add other rules, l...

Converting formCollection array to objects in the controller

in my view I have several [n].propertyName array fields I want to turn the formCollection fields into objects myobject[n].propertyName when it goes to the controller. so for example, the context: View: foreach (var item in Model.SSSubjobs.AsEnumerable()) <%: Html.Hidden("["+c+"].sssj_id", item.sssj_id ) %> <%: Html.Hidden("["+c+"]...

php sort properties of object

I want to sort the properties of an object so I can loop through them in a defined order. for example: I have an object 'book' with the following properties: 'id', 'title', 'author', 'date'. Now i want to loop through these properties like this: foreach($book as $prop=>$val) //do something now the order of the loop has to be 'title...

django blog - post- reply system display replies

I have a mini blog app, and a reply system. I want to list all mini blog entries, and their replies, if there are any. i have in views.py def profile_view(request, id): u = UserProfile.objects.get(pk=id) paginator = New.objects.filter(created_by = request.user) replies = Reply.objects.filter(reply_to = paginator...

How can I use Amazon's API in PHP to search for books?

I'm working on a Facebook app for book sharing, reviewing, and recommendations. I've scoured the web, searched Google using every search phrase I could think of, but I could not find any tutorials on how to access the Amazon.com API for book information. I signed up for an AWS account, but even the tutorials on their website didn't help...