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...
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...
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...
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...
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 = $...
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.
...
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'
}
...
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...
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, ...
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...
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 ...
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...
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...
How would I do this?
Tue, 2 Feb 2010 19:34:21 Etc/GMT
...
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 ...
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 I use a .NET service object in an Adobe Flex application? Is it even possible? Do I have to use some third-party tool?
...
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...
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 ...
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...