PHP object overloading is explained here.
Basically it allows you to define some custom actions when an inaccessible object property or method is accessed.
What are some practical uses for this feature?
...
We're using jQuery on a less UI-intensive project whereas we have been using ExtJS on other projects. Regardless, I'm curious if any of the prevalent libraries such as ExtJS, jQuery, or others, provide a utility for "pruning" objects? By which I mean, deleting keys if they don't contain values.
I've devised my own (naive) implementati...
(I know what null is and what its is used for)
Question: OK, say we make a reference to an object in whatever language. The computer makes a little 32-bit (or other size, depending on computer's design) space in memory for that reference. That memory can be assigned to a value that represents an object's location in memory. But when I s...
Ok here is what I am currently trying to do. I have a class called vdata.as which takes 2 paramaters both are strings sent from the main stage. Parameter one is the location for an XML file that I need to open and read. The second parameter is the name of the video I am currently looking for.
Now I can get the data from the XML file and...
I've done some silverlight2 apps that access a database. I did some clunky stuff so that i could use some custom classes on both the webservice end and also in silverlight. I want to use these custom classes because it houses all the business logic. With silverlight 3 i see all these demo's where they are using RIA services. These al...
When starting a new application what are some ways to decide what objects you will need, what they should do, and how they should interact with each other?
Is this a job for a white board, or is it easier to just start coding and move stuff around as needed?
...
Hi all,
Let's say I have an array of objects declared in my header. The size of the array could be very large. In my source file, I create the constructor for my class and I'd like to initialize all the objects in my array. If these objects are not being constructed with a zero-parameter constructor, I am told these need to be put in...
Is it possible to make a javascript object property read-only? I want to set a property that cannot be modified...
...
Is it possible to access kernel objects on remote computers? I was reading that you could access remote kernel objects by using a symbolic link to \Device\Mup\server\object but I am not sure if that would work. Thanks for the help!
...
I have a function called "Colorbox" (jQuery plugin) that takes a number of parameters like so:
$(this).colorbox({
width : "500px",
height : "500px"
});
I have several different types of "this", though, each with their own properties. Like so:
var Type = {
video: {
width : "500px",
height : "500px"
},
gallery: {
...
I'm not sure really how to ask that question.. hopefully my explanation will clarify:
I have a public method in a class, say Widget that takes a list of Widgets and makes changes to them. However, sometimes, the Widget calling the method is in that list. Is there any way to set the current object as one of the items in the list?
For ex...
Bill Karwin has a blog post called "Why Should You Use An ORM?" which is being discussed on Reddit and I was confused about a couple of points.
In it he says in the comments section:
OODBMS and ORM works only on objects
that we've instantiated in the
application layer. I.e. there's no way
to do a query like this:
UPDATE B...
Can anyone link to or list out the object types that the iphone sdk has built in? For the moment I'm just looking for the simple data types. I'm looking for variable types that are accepted in @interface definitions and also can be made into properties.
For example: NSNumber is for integers, right? BOOL is for booleans.
What are t...
I am trying to free up some unused resources in my app. I have a couple MBs of an (object?) of category GeneralBlock and I have no clue what this is or how I should be approaching the freeing up of this GeneralBlock.
GeneralBlock has no apparent use. When I start my app there is a MENU screen at which point in time I have about 300kb o...
In Wordpress it's possible to create own WP Querys for the loop. An example is this:
$my_query = new WP_Query(array('post_parent' => 3, 'post_type' => 'page'));
Another example is this:
$my_query = new WP_Query(array('cat' => 1, 'post_type' => 'post'));
I want a loop that presents pages AND posts from the same loop.
Now to my ques...
For more info, see my other question, here. So anyway, I'm using BigDecimals to represent currency in my application (it deducts a markdown percentage and adds sales tax), but it seems that If I use a BigDecimal for the price, everything needs to be BigDecimals. Is it OK to use a BigDecimal for the markdown percentage field (instead of a...
Javascript is pretty shaky for me, and I can't seem to find the answer to this. I have some code along the lines of
var Scheduler = function(divid,startDate,mode){
this.setHeader = function(){
header.innerHTML = '<a href="#" onclick="this.showScheduler(1);">Show</a>';
}
this.showScheduler = function period(){
...
I have a traceback object that I want to show in the nice format I get when calling traceback.format_exc()
Is there a builtin function for that, or a few lines of code?
...
I am looking at code which has the correct using statements declared but yet the objects within the code are fully qualified when they don't need to be due to the fact that the using statement is declared.
Is there a reason why the objects are fully qualified but yet still have the using statement declared?
...
I am working on a Javascript object that contains some YUI objects. The key thing is, my object needs to contain it's own set of YUI tabs so that I can display multiple instances of my object on the same page and have the tabs control their own object instance.
I set it up as follows:
var Scheduler = function(divid,startDate,mode){
...