Hi,
I am making an object tracking application. I have used Emgucv 2.1.0.0
to load a video file
to a picturebox. I have also taken the video stream from a web camera.
Now, I want
to draw an unfilled square on the video stream using a mouse and then track the object enclosed
by the unfilled square as the video continues to stream.
T...
Hi guys, has anyone come across any scenario wherein you needed to merge one object with another object of same type, merging the complete object graph.
for e.g. If i have a person object and one person object is having first name and other the last name, some way to merge both the objects into a single object.
public class Person
{
p...
Given a very basic xml structure and a generic Object declaration with a property already defined (location), how can I add the nodes of the xml structure (id & name) to the object's properties without statically referencing the names of the nodes?
XML:
<record>
<id><![CDATA[SS001]]></id>
<name><![CDATA[SubstationName]]></name>...
Given an object like this:
var obj = {
first:{
second:{
third:'hi there'
}
}
};
And a key like this "first.second.third"
How can I get the value of the nested object "hi there"?
I think maybe the Array.reduce function could help, but not sure.
...
I'm using PHP to return a json_encode()'d array for use in my Javascript code. It's being returned as:
{"parent1[]":["child1","child2","child2"],"parent2[]":["child1"]}
By using the following code, I am able to access parent2 > child1
$.getJSON('myfile.php', function(data)
{
for (var key in data)
{
alert(data[key]);
}
...
I have a page that has a table with each row corresponding to an audio file. The last cell in each row embeds a simple flash audio player. The problem is that the flash file for the player is being downloaded for each row separately and as soon as rows go beyond 40-50 it crashes the browser.
I tried using different players (1pixelout, f...
I have an NSTableView which is populated via a CoreData-backed NSArrayController. Users are able to edit any field they choose within the NSTableView. When they select the rows that they have modified and press a button, the data is sent to a third-party webservice. Provided the webservice accepts the updated values, I want to commit tho...
I've got a very weird and unexpected problem.
empty() is returning TRUE on a non-empty property for a reason unknown to me.
class MyObject
{
private $_property;
public function __construct($property)
{
$this->_property = $property;
}
public function __get($name)
{
$priv_name = "_{$name}";
...
Okay, im making a pretty big file in my opinion, so i wanted to separate it into several files for cleaner code. so i have my main .cpp file and two header files holding my classes. well the header files dont hold strings, it aboslutely wont budge. i call the library in both my .cpp file and even tried it in my header file.
another is...
I want to set a youtube video to 100% width so that it scales appropriately in a dynamic width column on a web page I am designing.
The problem is that the height doesn't behave like the height of an image. Instead of scaling proportionately, it either collapses (if set to "auto" or left blank) or it scales seemingly random if set to a...
Hi!
I am using some XML parser to get some information from API, blah blah... :)
In one place in my script, I need to convert string to int but I'm not sure how...
Here is my object:
object(parserXMLElement)#45 (4) {
["name:private"]=>
string(7) "balance"
["data:private"]=>
object(SimpleXMLElement)#46 (1) {
[0]=>
strin...
I have a python Interpreter written in C++, the PyRun_String function from the Python API is said to return a handle, however in my code I have it assigned to pointer to a PyObject?
PyObject* presult = PyRun_String(code, parse_mode, dict, dict);
Is this actually correct? Can you implicitly cast this handle to this object pointer?
S...
I have an object I created in JavaScript. Let's say it looks like this:
function MyObject() {
this.secretIdea = "My Secret Idea!";
};
MyObject.prototype.load = function() {
this.MyButton = $(document.createElement("a"));
this.MyButton.addClass("CoolButtonClass");
this.MyButton.click = MyButton.onButtonClick;
someRan...
Hi,
How do I inherit with the Object.create()? I tried these, but none are working:
var B = function() {};
var A = function() {};
A = Object.create(B);
A.prototype.C = function() {};
and
var B = function() {};
var A = function() {};
A.prototype.C = function() {};
A = Object.create(B);
and
var B = function() {};
A = Object.create(...
In JavaScript, what's the difference between
var x = Object();
and
var x = new Object();
?
...
I'm creating XML file which will hold couple of values regarding TCP Connection (IP (string), PORT (int), RetryCount (int), StartAutomatically (bool) and so on. There will be a number of TcpConnections defined like that (unknown to me).
What i thought is to create some kind of object called TcpConnectionHolder which i could create dyna...
object, contains 'array1'.
$Obj -> array1 [12]; // works fine.
however, dynamically generating that array name - you can't use square brackets...
$var = 'array1';
$Obj -> $var [ 12] ; // nothing. no error, but no result.
I had to do
$ar = $Obj -> $var ; // copy out array
$ar [12] ; // get value in array.
note:
$Obj -> $$var ...
I'm creating my class like I always do. I create the member variables, I setup the setter and getter and the I use $this to call the values of the member variables. but for some reason now I'm get the fatal error: Using $this when not in object context
Here is the regular php file which should populates the member variables with their v...
OK, I've been messing around with this for ages and I'm not getting any closer.
My current version is as below. The comments are what I think I'm doing.
The semantic is basically an index number (like a house number) and a list of attributes in an array. Then create an array 'street'. I want to be able to update the values of all element...
Hi,
I have two possibilities:
1) Store an object in a variable and use that variable in my code. But this uses memory to store the object right?
NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults];
BOOL bool1 = [userDefaults boolForKey: key1];
BOOL bool2 = [userDefaults boolForKey: key2];
2) Don't store it in a vari...