Alright, I may just need a terminology update, but I have been playing in Magento and Joomla, and they do references like
$mage = new Mage;
$mage->block('blockname');
where class Mage through some process I am failing to figure out is calling:
class blockname extends something{
}
Don't quote me on that code, however I am looking t...
Hi.
I'm a newbie to WCF, trying to perform relatively simple task.
I'm trying to return list of objects read from the database but cannot overcome some really annoying exceptions.
The question is very simple? What's wrong with the picture?
[ServiceContract]
public interface IDBService
{
[OperationContract]
string Ping(st...
I want to know, in c++, when does the initialization of objects take place?
Is it at the compile time or link time?
For ex:
//file1.cpp
extern int i;
int j=5;
//file2.cpp ( link with file1.cpp)
extern j;
int i=10;
Now, what does compiler do : according to me, it allocates storage for variables.
Now I want to know :
does it also p...
I have a List called myData and I want to apply a particular method (someFunction) to every element in the List. Is calling a method through an object's constructor slower than calling the same method many times for one particular object instantiation?
In other words, is this:
for(int i = 0; i < myData.Count; i++)
myClass someObje...
Sorry, I am being both thick and lazy, but mostly lazy. Actually, not even that. I am trying to save time so I can do more in less time as there's a lot to be done.
Does this copy the reference or the actual object data?
public class Foo
{
private NameValueCollection _nvc = null;
public Foo( NameValueCollection nvc)
{
...
Hello, I am new at java. I am doing the following:
Read from file, then put data into a variable.
I have declared the checkToken and lineToken as public strings under the class.
public static void readFile(String fromFile) throws IOException {
BufferedReader reader = new BufferedReader(new FileReader(fromFile));
St...
I need to suck data from stdin and create a object.
The incoming data is between 5 and 10 lines long.
Each line has a process number and either an IP address or a hash.
For example:
pid=123 ip=192.168.0.1 - some data
pid=123 hash=ABCDEF0123 - more data
hash=ABCDEF123 - More data
ip=192.168.0.1 - even more data
I need to put this data...
This question of mine (currently unanswered), drove me toward finding a better solution to what I'm attempting.
My requirements:
Chunks of code which can be arbitrarily added into a document, without an id:
<div class="thing">
<elements... />
</div>
The objects are scanned for and found by an external script:
var things = yd.ge...
I am designing a program behind excel and using VBA 6.5. I am having some problems with the built in dictionary object. I understand the basics and have found numerous examples on how to add simple data to them but I'm more concerned with custom objects.
My problem: I have an object with several constructors - X, Y, Yf, A, P, etc. Now t...
Hi,
So I wanna sort an array of Points using the built in sorting method, by a specific coordinate, say x. How can I do this? Heres a sample code:
Point A[] = new Point[10];
// ... Initialize etc.
Arrays.sort(A, x-coordinate);
Is there a built-in comparator for x-coordinates in Point Class? If not, how can I create one and use it. An...
Hi,
I am trying inherit objects in JavaScript. Take a look at this example:
var BaseObject = function() {
};
var ChildObject = function() {
};
ChildObject.prototype.childMethod = function() {
};
ChildObject.prototype = new BaseObject();
ChildObject.prototype.constructor = ChildObject();
However, as soon as I do prototypal inherita...
I'm new to Java programming.
I am curious about speed of execution and also speed of creation and distruction of objects.
I've got several methods like the following:
private static void getAbsoluteThrottleB() {
int A = Integer.parseInt(Status.LineToken.nextToken());
Status.AbsoluteThrottleB=A*100/255;
Log.level1("Absolute T...
I have an Ext.Container and I need to add to it a user-movable object.
I see elsewhere that an Ext.Window is not supposed to be nested into objects, thus what are my options regarding other movable Ext objects?
Regards, Casper
...
I'm using PHP to fetch "tasks" from my database and encoding it as JSON. When I transfer the data over to javascript, I end up with something like this:
Array {
[0] => Task {
id: 2,
name: 'Random Task',
completed: 0
}
[1] => Task {
id: 8,
name: 'Another task',
completed: 1
}
}
etc.
I gu...
I'm not sure exactly how to describe this question, but here goes. I've got a class hierarchy of objects that are mapped in a SQLite database. I've already got all the non-trivial code written that communicates between the .NET objects and the database.
I've got a base interface as follows:
public interface IBackendObject
{
void Re...
This has been an age old question and I am aware of the usual reasons for not using for..in or perhaps even objects when any sort of ordering is needed, but I recently came across this article from MDC on the delete operator.
Cross-browser issues
Although ECMAScript makes iteration order of objects implementation-dependent, it may app...
Hi all,
I have a red box called mc1_mc and every time when you drag on it you get a new little blue box added to the stage. Yhe idea is that you can drag those blue boxes too. however I dont know how to detect them.
this is the code:
var newBlok:Boolean;
var blokIndex:int = 0;
var blokje:blok;
var huidigBlok:DisplayObject;
var prullen...
Hello all,
i would like to effeciently generate positions for objects on a given surface. As you probably guessed this is for a game. The surface is actually a 3D terrain, but the third dimension does not matter as it is determined by terrain height.
The problem is i would like to do this in the most effecient and easy way, but still g...
What is the easiest way to create a global object. I have tried declaring the object outside the method with no luck.
@implementation UV_TouchpadViewController;
NSMutableString *string = [NSMutableString stringWithFormat:@"text"];
...
I heard that iframes are deprecated in HTML5, and object tags should be used instead. But the page does not load from the frame.
Im not familiar with object tags, do i need to specify a classid or type text/html? Here's the tag:
<object src="http://site.com/"></object>
Am I missing something, or has my browser(Chrome 6) not ...