object

Entity Framework Update Methods

I have a few entities I'd like to update at the same time. However I'd like to write individual update methods in each classes partial class file, for each entity and call them all at the same time. For example: public sub UpdateEntity1() ... end sub public sub UpdateEntity2() ... end sub public sub UpdateEntity3() ... end sub pub...

Compare int and Object in Java

I have the following code: Object obj = 3; //obj.equals(3); // so is this true? Does obj equal to 3? ...

AS3 <Key,Value> Collection

In actionscript object class can act as a collection that stores key,value combinations: var o:Object = new Object(); o["a"] = 1; But when I'm trying to extend it and add some custom functionality: var mo:MyObject = new MyObject(); mo["a"] = 1; I get this: ReferenceError: Error #1056: Cannot create property a on MyObject. ...

PHP: declare a class variable to be a stdClass object

This is probably pretty simple but I haven't been able to figure out how to phrase the question for Google, so here goes: So, I often do something like this... class foo { private $bar = array(); } ... to set some class property to be an array. However, I'd like to make a private property an object instead, something like this: ...

recursively loop over javascript object?

Hi there. I am trying to create a function which, When given an object will output something like <div> reason : ok status : 0 AiStatistics : null CurrentSeasonArenaStatistics : null <div> Player <div> CampaignProgressCoop : CompletedLegendary CampaignProgressSp : PartialHeroic <div> ReachEmblem <div> ba...

What is the main difference in object creation between Java and C++?

I'm preparing for an exam in Java and one of the questions which was on a previous exam was:"What is the main difference in object creation between Java and C++?" I think I know the basics of object creation like for example how constructors are called and what initialization blocks do in Java and what happens when constructor of one cl...

linux "more" like code in python for very big tuple/file/db records/numpy.darray?

Dear All, I am in looking for a buffer code for process huge records in tuple / csv file / sqlite db records / numpy.darray, the buffer may just like linux command "more". The request came from processing huge data records(100000000 rows maybe), the records may look like this: 0.12313 0.231312 0.23123 0.152432 0.22569 0.311312 0.54549...

Effects of method chaining

I know the benefits of chaining within PHP but lets say we have this following situation $Mail = new MailClass("mail") ->SetFrom("X") ->SetTo("X") ->SetSubject("X") ->AddRecipient("X") ->AddRecipient("X") ->AddRecipient("X") ->AddRecipient("X") ->AddRecipient("X") -...

does order of members of objects of a class have any impact on performance?

May order of members in binary architecture of objects of a class somehow have an impact on performance of applications which use that class? and I'm wondering about how to decide order of members of PODs in case the answer is yes since programmer defines order of members via order of their declaraions ...

Trouble returning a query from a Coldfusion method call

Ok, I have instantiated an object and all is fine. I am able to call various methods of that object easily, such as myobject.getId(), myObject.getName() , etc etc. These examples all return either a string or numeric value. Now I have another method that returns a query. I've cfdumped what is returned by the method and it is indeed a qu...

Should I choose a hash, an object or an array to represent a data instance in Perl?

I was always wondering about this, but never really looked thoroughly into it. The situation is like this: I have a relatively large set of data instances. Each instance has the same set or properties, e.g: # a child instance name age height weight hair_color favorite_color list_of_hobbies Usually I would represent a child as a hash ...

object array efficiency in Matlab

Hi. For my work I have to set up a project in Matlab, which is not my language of choice and I have some questions regarding efficiency. I am currently dealing with a collection of points with several properties. Rather than putting all of these in separate arrays of equal length I would much prefer to make a single array of Point objec...

Javascript and jQuery getting the right this

I have some sample code that looks like this: var myDrawingArea = new DrawingArea(document.getElementById("drawing_canvas")); function DrawingArea(aCanvas) { this.brushSize = 2; this.buildToolbar = (function () { $("#brush-size") .slider({ value: this.brushSize, // this is DrawingArea insta...

doctrine2 dql query by property of serialized object within entity

I have an entity with an 'object' type column. I want to be able to retreive the entity by a property (say id) of that object. For example, the query would look something like this: $em->createQuery('SELECT e FROM Entity_Class e SOME_MAGIC e.object o WHERE o.id = ?1'); The question is, is there *SOME_MAGIC* in dql? ...

Formal definitions of Classes and Structs

I remember touching on this subject during a class on programming languages. I vaguely remember that a struct could be seen as a mathematical tuple. Is it possible to describe a class or an object in a similar fashion? ...

file upload problem in struts2

Hi , i want to upload a file and update result in other div on the same page dynamically just by showing a string "succeed/failed". It is working fine when i am forwarding result to a new page. However for below mentioned code it is updating div id "two" to [object HTMLDocument]. Please show me the way to solve it. <div id='two' style=...

[Delphi7] onResize event with class object

Here's is my code: type TNav = class(TPanel) private procedure CMMouseEnter(var AMsg: TMessage); message CM_MOUSEENTER; procedure CMMouseLeave(var AMsg: TMessage); message CM_MOUSELEAVE; public end; type TForm1 = class(TForm) ... procedure FormCreate(Sender: TObject); private public end; procedure TForm1.FormCreate(Sender: TOb...

Shouldn't a method that receives java.lang.Object as input also receive javax.servlet.jsp.JspWriter as input?

I wanted to consolidate two functions. After getting a viable solution, I decided to play with the code a bit further, and came up with this: package hu.flux.helper; import java.io.DataInputStream; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.IOException; import java.io.PrintWriter; import java.i...

Return PHP object by index number (not name)

Goal: retrieve an element of data from within a PHP object by number. This is the print_r($data) of the object: stdClass Object ( [0] => stdClass Object ( [TheKey] => 1456 [ThingName] => Malibu [ThingID] => 7037 [MemberOf] => California [ListID] => 7035 ...

Deserializing the comments in XML file

I am trying to deserialize the following sample XML file.I have created the schema for this XML file.With the help of schema i am able to deserialize the XML into object. But my problem is i have a XML comments(ex:<!----Test-->) on my XML file.Deserializer is not reading the comments from the XML to object which i created using schema. ...