reference

Refer a dll which is inside another dll in WPF

How to refer a dll which is inside another dll in WPF? For example if I have two dlls A.dll and B.dll. A.dll contains a reference to B.dll and I build A.dll. Now I want to get a component in B.dll from A.dll I use as /A;component/B;component/Original.xaml" But it is not working? ...

assembly in deployed asp.net application is referencing an absolute path on my pc

I do not know why this is happening: [NullReferenceException: Object reference not set to an instance of an object.] DataWeb.Core.HttpHandler.ProcessRequest(HttpContext Context) in X:\projects\visualstudio\work_projects\Production\DataWeb\DataWeb.Core\HttpHandler.cs:23 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication...

How to dereference a pointer passed by reference in c++?

I'm doing (something like) this: void insert(Node*& node, string val, Node* parent) { if (node == NULL) instantiateNode(node, val, parent); else insert(node->child, val, node); } The thing is, that instantiateNode(..., parent) seems to modify the original *&node passed into the function when setting the *parent. instan...

Why Does List Argument in Python Behave Like ByRef?

This may be for most languages in general, but I'm not sure. I'm a beginner at Python and have always worked on copies of lists in C# and VB. But in Python whenever I pass a list as an argument and enumerate through using a "for i in range," and then change the value of the list argument, the input values actually changes the original ...

PHP How to know if a variable is a reference ?

Hello, I want to call a function with call_user_func_array but i noticed that if an argument is a reference in the function definition and is a simple value in call_user_func_array, the following warning appears: Warning: Parameter 1 to test() expected to be a reference, value given Here is a simple example of what i am trying to do: ...

relative references in .net

I browse to a a dll and add it as a reference. The problem is the reference absolute path is being stored. How do I change this to be a relative reference instead? ...

Weird problem with Visual Studio 2008 website reference

I'm trying to add a reference to the GAC version of System.Xml in a Visual Studio 2008 web site project. I right-click the project icon in the Solution Explorer, and click Property Pages. Under the References tree option, I click the 'Add' button on the right. I navigate to System.Xml in the .NET tab, and double click it (the Path it ...

How to use string and string pointers in C++

I am very confused about when to use string (char) and when to use string pointers (char pointers) in C++. Here are two questions I'm having. which one of the following two is correct? string subString; subString = anotherString.sub(9); string *subString; subString = &anotherString.sub(9); which one of the following two is correct?...

Recommended OpenGL / GLUT Reference

What OpenGL / GLUT reference is the best around? Ideally I'm looking for something with C++ sample code to help me learn OpenGL as well as details about the APIs similar to what MSDN provides for .net programming. If there isn't a one stop shop, then please list the set of references I should use and what the strengths of each one is. ...

How come a non-const reference cannot bind to a temporary object?

Why is it not allowed to get non-const reference to a temporary object, which function getx() returns? Clearly, this is prohibited by C++ Standard but I am interested in the purpose of such restriction, not a reference to the standard. struct X { X& ref() { return *this; } }; X getx() { return X();} void g(X & x) {} int f(...

Is it possible to change the temporary object and to pass it as an argument?

Is it possible to change the temporary object and to pass it as an argument? struct Foo { Foo& ref() { return *this; } Foo& operator--() { /*do something*/; return *this; } // another members }; Foo getfoo() { return Foo(); } // return Foo() for example or something else void func_val(Foo x) {} void func_ref(const Foo & x) ...

Returning a const reference to vector of an object

Hi there, I have 2 questions related to the same problem: 1) How to return a reference to a vector which belongs to a class. I have this class: class sys{ protected: vector<int> s; public: sys(); vector<int>& getS() {return s;} //(1) }; (1) should return the reference of the vector s. However in the main: main(){ ...

How is reference to java object is implemented?

Is pointer is just used for implementing java reference variable or how it is really implemented? Below are the lines from Java language specification 4.3.1 Objects An object is a class instance or an array. The reference values (often just references) are pointers to these objects, and a special null reference, which refers ...

Calling method that uses method<Type>(paramaters)

Given the example below, can someone please show me how this could be called? bool WithinDelta<T>(T input1, T input2, T delta) Ive tried various ways such as bool foo = GenericMath.WithinDelta(1, 50, 75); bool foo = GenericMath.WithinDelta<int>(1, 50, 75); but the Type <T> is throwing me off. Sorry for the basic question, but ...

[C++] Optional parameter for reference to pointer?

Hi, how do I the second parameter become optional? template <typename T> inline void Delete (T *&MemoryToFree, T *&MemoryToFree2 = ){ delete MemoryToFree; MemoryToFree = NULL; delete MemoryToFree2; MemoryToFree2 = NULL; } I tried several things after the = operator, like NULL, (T*)NULL etc can this be done? the only way the c...

Value vs Reference

What decision should I take about Equals(), ReferenceEquals(), and == from the following results? What do they produce actually? #region int integer = 1; int integer2 = integer; bool referenceEquality = (integer == integer2);//true bool valueEquality = integer.Equals(integer2);//true bool valueEqualityMore = object.Equals(integer, inte...

CSharp Generics Samples

Like Linq 101 samples form Microsoft site,is there any site shows examples on Generics? or like albhari on threading can i get any ebook? ...

How to identify & use OSType in Cocoa

In Cocoa/Mac OSX 10.6 OSType IOSurfaceGetPixelFormat(IOSurfaceRef buffer) returns a type OSType where can I find some documentation/reference on the supported OSType with regard to the context of this function. What sort OSType should I expect with IOSurfaceGetPixelFormat? do you have any ideas on the various expected values from t...

C# .NET String object is really by reference?

Hi, I have being studying (newbie) .NET and I got some doubts. Reading from a book examples I learnt that String are object then Reference Type. So, I did this test and the result was different what I expected: I'm really curious, is this an exception because "string" are special types? class Program { static void Main(string[]...

Have you ever used Phantom reference in any project?

The only thing i know about phanom reference is, if you use its get() method it will always return null, and not the object. [ then whats the use of it ] By using phantom reference you make it sure that the object cannot be resurrected from finalize method; But what is the use of this concept/class? Have you ever used this in any of...