references

C# Class library within Class Library

I have a C# solution in VS2010 that contains three projects. This solution has a client project (A) and a server project (B) which both build into applications. The third project (C) is where my classes that are common to both projects go (like a utility library) and this is built into a class library, which I reference in both the clien...

Visual Basic 2010: How do I reference one of many objects through an additional object? (Pointer-like behaviour?)

Hi, I am writing an application in Visual Basic 2010 Express. I have two objects of a class from a driver DLL that is provided to me. They have some of their own subroutines that I'd like to call, and I'd like an easy way to toggle between them. Instead of writing a whole bunch of code like this: selected = x ... If selected = x then ...

overloading ostream for any function that returns a vector

Hi assume that I have class A : using namespace std; template <class T> class A{ private: vector<T> my_V; public: // assume initializations etc are done inline vector<T> get_v() { return my_v; } }; and some where else I have overloaded ostream of std::vector template <class T> ostream & operator<<(ostream& out, vector<T> &vec...

Why does storing references (not pointers) in containers in C++ not work?

In my program I have a STL set. set<string> myStrings; To improve efficiency I changed it to only hold pointers. (I don't need actual string copies to be stored.) set<string*> myStrings; I read that it is a good practice to substitute pointers with references when possible. (Of course only if the actual functionality of a pointer i...

Visual Studio Reference Not Being Copied Over In Multiple Project Environment

Hi I have a solution file in VS 2010 and it has multiple projects in it. Now, I have a reference to this dll call MySql.Data.Entity.dll. As an example, I have the following projects setup in the solution: Domain (reference to MySql.Data.Entity.dll) Domain.Test (reference to the project "Domain") I want that Domain.Test to copy ...

== Compares references in Java?

As it is stated the == operator compares object references to check if they are referring to the same object on a heap. If so why am I getting the "Equal" for this piece of code? public class Salmon { public static void main(String[] args) { String str1 = "Str1"; String str2 = "Str1"; if(str1 == str2){ System.out.println("Eq...

Latex: Wrong reference number

Hi, I have 6 figures in my .tex file. Wherever I put a reference to the 6th image, in the pdf I get Figure1.5 instead of Figure1.6 (1 less) but upon clicking the link I go to the right figure Figure1.6. Similarly, when I refer to 5th image, in the pdf I get Figure1.4 instead of Figure1.5, once again when I click the link I go to Figure...

How to find type specific references to equals() in the workspace in Eclipse?

I've got a class which overrides equals() and I want to see where this equals method is being used in the workspace. Using Eclipse, I generally do Ctrl-Shift-g which finds all references in the workspace. Unfortunately, for equals(), its pulling back every single reference of equals in my workspace from any type, not just the one where...

PHP Performance : Copy vs. Reference

Hey there. Today I wrote a small benchmark script to compare performance of copying variables vs. creating references to them. I was expecting, that creating references to large arrays for example would be significantly slower than copying the whole array. Here is my benchmark code: <?php $array = array(); for($i=0; $i<100000; ...

referencing images in app_themes/images folder after combining css scripts ...

Hi, I wanted to combine app_themes css files into one on the fly. I did so using Mads Cristensen technique. But now all elements that has background image defined through css (see picture) don't display image. . I believe that is because css files are not relatively referenced anymore (../), but through axd file. I'm trying to fix this ...