I'm coming from a C# background where this stuff is super easy—trying to translate into Python for Maya.
There's gotta' be a better way to do this. Basically, I'm looking to create a Vector class that will simply have x, y and z coordinates, but it would be ideal if this class returned a tuple with all 3 coordinates and if you could edi...
Folks,
Does anyone have a good understanding of Object Oriented Metrics; I am looking for some guidance on where can I start.
I found the below resource:
http://yunus.hacettepe.edu.tr/~sencer/oom.html
Thanks,
Amit
...
Hi
I am using string template to render some content, but the content may be variable so not sure how to pass it in (using .net / c#)
Basic idea is I have a List> which need to end up as parameters, e.g.
List<KeyValuePair<string, object>> ret = new List<KeyValuePair<string, object>>();
ret.Add(new KeyValuePair<string, object>("elem1",...
Hello everyone I am trying to cast two objects to, both, a specific type based on property reflection information. I want to do this dynamically so I don't need a bunch of switch cases and such for each type that the two objects can be in this class. Overall they will mostly be int or float. At the moment I currently tried using 'var' an...
I am sending objects to a server in java, however I want to ensure that it has not been tampered with, in addition to the already provided security. I understand how to take do use a message digest, however, should the checksum ideally be placed in the object? and if so wouldnt this change the checksum at the end. How do you go about thi...
i have 2 tables without any cascade deletind. i wont to delete parent object with all child objects. i do like this
//get parent object
return _dataContext.Menu.Include("ChildMenu").Include("ParentMenu").Include("Pictures").FirstOrDefault(m => m.MenuId == id);
//then i loop all child objects
var picList = (List<Picture>)menu.Pictures.To...
I have a bare repository I access over a SMB network. Quite often I suddenly get fatal error from clients trying to connect. Most of the time some push / pull / clone dance manage to solve it. This time, it's not even possible to clone the repos, I get :
fatal: git upload-pack: cannot find object 002d4400052e62e9047763229bef7ee69cf2c95f...
Is one of these two ways to create and initialize an object preferable?
MyClass oClass = [[MyClass alloc] init];
oClass.length = 5;
oClass.text = @"Hello";
or using a class method that contains about the same code but looks like this:
MyClass oClass = [MyClass initWithLength:(int) 5 andText:(NSString *) @"Hello"];
I hate it when I ...
>>>a=123>>>b=123>>>a is bTrue>>>id(a)==id(b)TrueMy question is, why is id(a) the same as id(b)?. Aren't they two different instances of class int?
...
I have to do through Action like this:
Action action = () => { ..// };
object o = action;
any way to do this:
object o = () =>{}; //this doesn't compile
...
Possible Duplicate:
Can Read-Only Properties be Implemented in Pure JavaScript?
I have an Object that I only want to be defined when constructed. How can I prevent the Object reference from being changed?
...
Is there best practice for managing Object shared by 2 or more others Object. Even when running on different thread?
For example A is created and a pointer to it is given to B and C.
ObjA A = new ObjA();
B->GiveObj(A);
C->GiveObj(A);
Now how can I delete objA?
So far what I though about is A monitor how many ref there are to it and w...
is it possible to insert an object into a session instead of creating a different sessions (in PHP)???
...
I have a datagrid that uses an array of objects as the data provider. The objects are essentially key/value pairs:
{ foo:"something"}
{ bar:"hello"}
{ caca:"lorem"}
The datagrid has 2 columns. The first column is the key and the second column is the value. Right now my grid looks like:
...
Hi,
My project is based on MVC architecture and I have a UI design pattern problem.
I have several tabs which contain object as show in the picture.
My first idea was to link a tab to one view (phtml) so in the document each tabs is an embedding document.
The tab contains an element with an url to a page. I show you a piece of code. T...
Hi
I want to achive the following behavior:
when a user clicks on a button in an control some data will be processed in background and another control from the page will be updated when the job is finished (both controls are in updatepanels (or not) -> doesn't work anyway). My code looks something like this:
Control1 (which makes the ...
Hi,
I have a combobox whose ItemTemplate is a Checkbox. This is checkbox is bound to an object which has a bool and a string. The checkbox checked state is bound to the bool and the content is bound to the string.
I want a select all option at the top of the combobox collection, which has an indeterminate state, according to the other ...
Why doesn't this work?
define("STR_TEST", "qwerty");
class Test
{
public $arrTest = array(
"test"=>"Bla bla bla ".STR_TEST
);
}
$objTest = new Test();
print($objTest->arrTest["test"]);
...
Hi, here is what my code looks like
i have two forms:
class Form_1 extends Form_Abstract {
public $iId = 1;
}
class Form_2 extends Form_1 {
public $iId = 2;
}
i expect the code behave like this:
$oForm = new Form_2;
echo $oForm->getId(); // it returns '2'
echo $oForm->getParentId(); // i expect it returns '1'
here is m...
Hi,
I need a random object generator in JavaScript that generates a variety of objects with different fields and values. Any ideas where I can find such tool?
I need to generate random objects with various complexity.. My goal is to use JSON in order to serialize these objects and fuzz test my application http api.
...