object

Reading bytes as a string from Db

I have one table that has 2 fields one(container_id) for numeric type and another for byte type(coDearntainer_objects) . I would like to read the byte field(container_objects) as a string for corresponding (container_id) field. How could I do this? I am using Postgresql Db Table Structure: CREATE TABLE container ( ct_id numeric, co...

C# UrlReferrer from PayPal return to vendor button? Object Not Set an instance of an object

After a successful Paypal transaction my customer lands on a Paypal Thank You page with a link back to my site. That link is going to the expected page. However If I attempt to pull Referrer information from my server code, I get error Object Not set to an Instance of an object. I have a page on the site with a link to that same page...

Error while creating new object in rails

hello, I am getting this error in rails whenever i am trying to create an object for the model. I am working on Windows 7 C:\Ruby\joker\chapter3>ruby script/console Loading development environment (Rails 2.3.8) >> mycb = ComicBook.new SyntaxError: C:/Ruby/joker/chapter3/app/models/comic_book.rb:19: syntax error, u nexpected $end, expec...

No error or warning when attempt to access property of non object (not assigned)

Can somebody explain to me why PHP does not report a warning or error when accessing a property of a empty object (var is not assigned)? For example: $oMyObject->test = 'hello world'; // $oMyObject is not assigned but no warning or error When i do this, it produces an error: $oMyObject->test(); // Error: Calling function on non-obje...

Unable to serialize an object based on a singleton in PHP

I have an object, based on the Singleton design, that I use for user authentication. Because the object is a per-user object, I want the object to be stored automatically in a session variable at the end of execution. However, any time I try to serialize the object, either internally or externally, I get an empty string. The following i...

Garbage Collection and JavaScript "delete": Is this overkill/obfuscation, or a good practice?

I just read this question and the accepted answer: http://stackoverflow.com/questions/864516/what-is-javascript-garbage-collection In the answer, Noldorin referenced some guidelines from apple. Here is the part I'm concerned with: Use delete statements. Whenever you create an object using a new statement, pair it with a delete sta...

Flex 3 How to Inspect value of Object

Hi I'm debugging a problem and I've got: o = URLUtil.stringToObject(browserManager.fragment); When I try to put an alert on the var o, I get [object] [object]. How do I find out its value? Thank you. -Laxmidi ...

Reuse object within another object

I have an object that contains another object with translations. It looks like this: var parent = { //parent object with a bunch of stuff in it countryAlerts:{ //area for country alerts "USA":{ //country en:"FAST", //alert text in English es:"RAPIDO" //alert text in Spanish }, "Japan":...

Object OOP Vs Prototype OOP

Which OOP style do you think leads to more structred and efficent code? ...

Why should I test for both MSXML2.XmlHttp and Microsoft.XmlHttp version-independent ProgIDs?

I have read the MSDN blog post about the subject. And this question doesn't help me much either. As far as i can tell checking Microsoft.XmlHttp is enough. Someone could confirm me this bug? Are there any earlier version of IE which require detecting both? ...

How does an object reference itself in Javascript?

I was experimenting with inheritance in javascript, and wrote those two functions: Object.prototype.inherits=function(obj){this.prototype=new obj;} Object.prototype.pass=function(obj){obj.prototype=new this;} This code works very well: Dog.inherits(Animal); But the following fails: Animal.pass(Dog); As I understand it, my pass f...

How do I figure out that a particular object in an application is no longer in use?

How could I figure out that an object(or objects of a class) is/are not in use and ready to be collected by GC. or how could i get to know that object has no reference while the application is running. (before it gets GCed) ...

Access array in PHP ojbect

Hi, I have the following PHP object but I'm struggling to get the array item out of the object. exampleBatch Object ( [file_path:protected] => [title:protected] => [description:protected] => [link:protected] => [items:protected] => Array ( ) [raw:protected] => data/example [feed_nid:protected] => Array ( [0] => Array ( [path...

the best OO framework in Coldfusion9

Hi I am new to OO frameworks in general such as MVC, Coldspring,etc but I have read about their benefits - could someone point tell me which one is the best - may be with standard to other programming language. Many thanks ...

Is there a best practice for writing maps literal style in Java?

In short, if you want to write a map of e.g. constants in Java, which in e.g. Python and Javascript you would write as a literal, T<String,String> CONSTANTS = { "CONSTANT_NAME_0": CONSTANT_VALUE_0 , "CONSTANT_NAME_1": CONSTANT_VALUE_1 , "CONSTANT_NAME_2": CONSTANT_VALUE_2 , //... } ; is there a Class or any preset Obj...

JSON parsing and printing JSON object with variable name

I'm having trouble printing an object with a variable name. It works when I hard code it. var objectVarName = "lat"; var obj = jQuery.parseJSON(JSON.stringify(msg)); // {"lat":"93"} is what JSON.stringify(msg) prints $('#display').prepend("<br/><br/>" + JSON.stringify(msg)); ...

page opening in data object window

Hi, I have an html homepage, at bottom too, I have place menu options. This I have done using object tag and calling another page, through object tag's data attribute, having menubar code. Now the problem is when I try to open any link using this bottom menu those links gets open in this data object window only. Where I want when I cli...

Adding to a class' variables with elements in an object

$class = new Class; $foo = json_decode($_POST['array']); In this highly contrived example, I have a class with its own functions and variables, blah blah. I also just decoded a JSON string, so those values are now in$foo. How do I move the elements in $foo over to $class, so that: $foo->name becomes $class->name? Would be trivial if...

Javascript not recognizing Quicktime movie object

Hello i'm trying to play just the first few seconds on a quicktime movie then stop. if the user scrolls, I replay - Im doing this to reshow the image that seems to go away when scrolling. By design, once the user clicks 'Play' I want the movie to disregard the scroll (and other) functions. This seems to work in FF, but not in IE, where t...

calling an objects function while inside a different objects function

For some reason i can't seem to get this right ok i have 2 objects class score { public: int scored(int amount); private: int currentscore; } int score::scored(int amount) { currentscore += amount; return 0; } class collisions { public: int lasers(); } // ok heres my issue int collisions::lasers() { // some code h...