object

how do I stop further methods in a PHP class?

I am learning OOP with PHP. I am creating a class to extract XML data from a website. My question is how do I stop the given object from executing more methods if there is an error with the first method. For example, I want to send the URL: class GEOCACHE { public $url; public function __construct($url) { $this->url=$url...

What "ClassName objectName;" does before the main method?

In this code I see the following lines before the "main" method: JTextArea displayArea; JTextField typingArea; I wonder what these lines do and when they are executed. As far as I know the "main" method is the "entry point". So, the code will be executed from the beginning of the "main" method. All other methods will be executed if th...

WCF Performance: Can I create a pool of my objects like ConnectionPooling does.

I have a service that uses a fairly expensive object to create. I would like to improve the performance from call to call. When I remove the object and run a load test, like how many invocations I can do per second, I have a massive performance difference between to situations. Situation 1. I remove the expensive object: Invocations pe...

WCF service returning an array of dictionary<string, object>.

Hi I've been trying to use a silverlight client to call an asp.net wcf service that would return a Dictionary. That worked fine when the values in the dictionary were simples types like int, string or Guid. However, I now have a scenario where I need one of the values to be an array of dictionary ! It all compiles fine and the signature...

php object within object, getting the top level object instance

I am experimenting with PHP OOP what i'm trying to find out is, Is it possible to access a object instance from withing a object that was created in this object instance? sounds confusing, so here is a example: contents of index class mainclass { var $data; function __construct($data){ $this->data = $...

http object status question

I am using http object in javascript on a hand held device, running Win CE. When the device looses connection to the network, the javascript does not report an error (status = 12007) for 60-90 sec. When connected to the network, the status (200) is returned immediately. In both cases the readystate = 4. ...

How to convert form data to object using MooTools.

I would like to convert an entire form of data to a javascript object. <form id='myform'> <input type='text' name='field1' value='foo'> <input type='text' name='field2' value='bar'> </form> would convert to a javascript object... { field1: 'foo', field2: 'bar' } ...

C# check if COM Object is available before performing some action on them

Hello. How can i check if COM Object exists (is registered / is available / can run without problems) before running actions using them? My application should use other applications COM's (InteropServices) but before i start some action, i would like to check whether i can create COM objects. It woudnt be a problem if COM's where in sa...

Object doesn't support this property or method javascript error in IE6 only

I've searched the internet and this great stackoverflow.com site particularly, but cannot help myself. I am not very experienced programmer and a friend of mine asked me to fix the bug that is on IE6 only. It works on FF, IE7/8, Opera. Here is the PART of the code that gives error message on IE6: (function(d, n, r) { var ie, jscript, ...

Java JNI - Calling object method.

Hi, I'm currently programming an interface between some C++ code and Java using JNI. I'm getting some events in my GUI that I want to pass to a C++ event handler. I therefore call a function that I wrote in Java. public void sendToEventQueue( AWTEvent evt ) { Mudkiptz.Main.fctC_sendEvent( evt ); } This method is in an abstract cl...

When do you overload operator new?

Possible Duplicate: Any reason to overload global new and delete? In what cases does it make perfect sense to overload operator new? I heard you do it in a class that is very often allocated using new. Can you give an example? And are there other cases where you would want to overload operator new? Update: Thanks for all ...

Creating an array from a constructor in C#

So I've been trying to figure out how to populate an array with an object I have created in C#. I found this code sample which explains a bit about what I need to do. for (int i = 0;i<empArray.Length;i++) { empArray[i] = new Employee(i+5); } But what happens if I pass more than one parameter into my construc...

[object design]Plenty of timed events to synchronize. How to ? :-)

Hi folks ! I'm trying to design an application (in C++ but that doesn't matter I guess, anything object-oriented would work the same) which has to synchronize a bunch of events together. Basically, you would have a several data structure instances which would contain lists of events. An event would have a timestamp and be "runable". T...

Parse RSS pubDate to Date object in JavaScript

How would I do this? Tue, 2 Feb 2010 19:34:21 Etc/GMT ...

PHP Objects vs Arrays

I have a huge amount of PHP objects for a neural network for which I have to iterate over and perform some maths on. I was wondering if I would be better off using an associative array over instances of classes? I am dealing with around 3640 objects and iterating around 500 times (at best) on top of that so any micro-optimization helps ...

Passing an object-string to a javascript-function

Hi, I'm trying to pass a string like this: {"key":["value"],"key2":undefined,"key3":undefined,"key4":undefined,"key5":"value"} to a javascript-function like this: <a href="#" onClick="myFunction(myString);"> but can't get the escaping right. Is there a way to pass that object-string to a function or do I need to convert something?...

How can you use a .NET service object within Adobe Flex

How can I use a .NET service object in an Adobe Flex application? Is it even possible? Do I have to use some third-party tool? ...

Using c#, How can I take benefit of using nullable valuetypes when I have a variable of object type?

Hi Using c#, How can I take benefit of using nullable value types when I have a variable of object type? For example, I have a method Insert within a class which takes 4 arguments: public int Update(Int32 serial, object deliveryDate, object quantity, object shiftTime) { .... .... .... } As you can guess, this method in...

MOUSE_OVER Event Attached to Video Object

Hi there, I'm trying to create a video player in AS3 that displays the player controls when the user hovers over the video, however I'm having a hard time getting the MOUSE_OVER event to fire. I've made sure that the video's index is at the top, so that's not the issue. Is there something I'm missing? Is there any reason why this event ...

jQuery recursive iteration over objects

The other day I thought I saw an object iterator in jQuery that had a flag that could be set to recursively iterate over child objects. I thought it was part of jQuery.each(), but now I don't see that capability in the docs. Is there any such iterator in jQuery that can be automatically recursive? (I know how to do it in javascript. J...