object

NHibernate and Modular Code

We're developing an application using Nhibernate as the data access layer. One of the things I'm struggling with is finding a way to map 2 objects to the same table. We have an object which is suited to data entry, and another which is used in more of a batch process. The table contains all the columns for the data entry and some addi...

Flash On IE8 Problem

Please help! I'm designing an HTML website and added an animated Flash image using the object tag. I was handcoding on Dreamweaver and before I saved it I got this message asking me if the code should be modified for compatibility with IE8. So I just clicked on 'Yes' and a 'script' folder was generated. The Flash image appears on Firef...

How can a shared event handler know which control's event it's handling?

I want to write some code that assigns the same event handler to several different buttons. Is there a way to implement it without referring to each button by name but by using something generic like self or sender to refer to the button? ...

PHP stdClass() with __get() Magic Method

Take the following code as an example: class xpto { public function __get($key) { return $key; } } function xpto() { static $instance = null; if (is_null($instance) === true) { $instance = new xpto(); } return $instance; } echo xpto()->haha; // returns "haha" Now, I'm trying to archive the...

shuffle Objects php

how can i sort object in php? i tryed shuffle but that expects an array Warning: shuffle() expects parameter 1 to be array, object given in /var/www/index.php on line 366 Warning: Invalid argument supplied for foreach() in /var/www/index.php on line 334 here is the code public function updateStatusWithoutDB() { $this->upda...

How do I check the methods that an object has, in Python?

For example, a list. l1 = [1, 5 , 7] How do I check the methods that it has? (l1.append, for example) Or a string... string.lower( ...

Dynamic options object for jQuery plugin (examples of)

Is anyone aware of any jQuery plugins that can work with a dynamic options object? What I mean is, I need to be able to pass in: $('div').somePlugin({title : 'title1', label : function(element){}, etc.}); and also $('div').somePlugin({name : 'name1', url : function(element){}, event : 'event1', etc.}); So the ...

Comparing window.parent/opener with NULL or 'undefined'

If I have this method: this.getForm = function () { try { var frmIndex = arguments[0]; if (isNaN(frmIndex)) frmIndex = 1; if (window !== null) { if (window.opener !== null) { return window.parent; } else if (window.parent !== null) { if (window.parent.frames !== null) { if (window.parent.frames(...

Can I use OBJECT to embed remote content for IE?

I am trying to use OBJECT to embed content from a remote server into a webpage. The remote content is a component provided by a third party and they host it on their domain. I have been able to get the OBJECT tag to "work" for all browsers using relative URL's for data (same domain) but IE fails completely any time the data attribute ref...

solr problem to get the field names

Ive got a problem. In each document I've got fields: threads.id and posts.id. I want to get the field name value for them so i can get data from the database. Between the lines beneath i have marked the lines where i want to get the fields. But it returns error because they are $doc is object. How can i get the fields? I have to do i...

Object serialization in PHP issues?

I was wondering if there is any reason to stay away from object serialization in PHP. My use case is for deferred processing. Ex: A mail queue where the mail object would be serialized when a send request is received, stored in a db and unserialized by a scheduled worker script. The alternative is to store all the information that is n...

Advantages of Domain object representing only elements of one type over being able to represent several different types of elements

hi 1) As far as I’m aware, each domain object instance ( at BLL layer ) should completely represent an element of the domain ( an employee, book, car etc ). So what is an advantage of having two types of domain objects, say one type representing a particular forum and other type representing a thread(s) in that forum, over having ...

Complete integration of vbulletin, help desk, knowledge base, sales database, gallery, etc

Hi, I operate a PHP-based website in which there are several disjointed parts: a vBulletin forum, a help desk ticket system, a knowledge base, a large sales database (with license keys), and a gallery. In the future I plan on integrating all of these into a single customer backend, where they can for instance view their license key, sub...

Init javascript Date object

Hi, I would like to retrieve a Javascript object Date for new year. I want to user new Date(); object and init it to the 2009-01-01 (it's for a countdown). Thanks ...

Fill list with objects and sort (Newbie)

I'm new to Python, so please forgive me when using wrong terms :) I'd like to have a list of several "objects", each of them having the same numeric attributes (A, B, C). This list should then be sorted by the value of attribute A. In Java I'd define a Class with my attributes as members, implement Sortable to compare A, put them all i...

Passing a C++ object with an Objective-C (Cocoa) event (performSelector)

How to pass a C++ object with the performSelector method? This method only allows you to pass 'objc_object*' objects, I can't cast them. I could build a wrapper, but I don't know the overall superclass for all C++ objects, so I don't know how I could build a generic wrapper (I don't want specific knowledge about the object in the wrapper...

JSP Problem ussing implicit object (session) in a function

Can the object of type HttpSession called session be accessed from a function? In a simple jsp page I have a function(see below) defined in the header of the page, and set to an onclick handle of for a button. When I press this button, I'll never see the second alert message. If I do something in the body of the page (like Session ID...

Getting ruby function object itself

In Ruby, everything is supposed to be an object. But I have a big problem to get to the function object defined the usual way, like def f "foo" end Unlike in Python, f is the function result, not the function itself. Therefore, f(), f, ObjectSpace.f are all "foo". Also f.methods returns just string method list. How do I access th...

Embedding OBJECT (Video) in RSS Feed while maintaining page flow

Hello all, I'm trying to publish rss feed from a site. Some of the feed items contain embedded video. Now I know for sure that this won't show up in the feed when the feed item contains the object data enclosed within the item's <description> tag. In fact feed validator shows a warning for the same. Googling for a solution to th...

How do I convert this object to an array in JavaScript?

How do I convert testObj to an array? function MinEvent(event, width, left){ this.start = event.start; this.end = event.end; this.width = width; this.top = event.start; this.left = left; } var testObj = {}; for (var j=0; j<eventLists.length; j++) { var eve = eventLists[j]; var event = new MinEvent(eventList[j], width, lef...