references

VS 2010 .NET Framework issue w/ an assembly targeting 3.5 complains that it needs later version of .NET framework

Hi guys, I'm having an odd issue with an assembly that is targeting .NET 3.5. When including this assembly via Add References/Browse to DLL - it complains: "MyAssembly.dll", or one of its dependencies, requires a later version of the .NET Framework than the one specified in the project. You can change the .NET Framework target by cli...

Visual Studio 2008 Explicit Reference Error

I have a project which references a dll in the same solution (called "Common"). Common has two types of errors with the same names but different namespaces i.e. Common.Login.UserDeleted Common.Imaging.UserDeleted When I type UserDeleted visual studio recognizes both of these and asks for which it is ("ambiguous reference"). I right-cli...

GetRef to capture methods?

I've just discovered VBScript's GetRef function, which gets a reference to the function named by its argument. Is there any way to get a reference to a method in this way? I have a hunch that VBScript doesn't offer the sophistication of binding needed to do so, but it would sure be nice. ...

php/mongodb: how does references work in php?

hello, i asked this in the mongodb user-group, but was not satisfied with the answer, so -- maybe someone at stackoverflow can enlighten me: EDIT: i've re-written my question, because apparently it wasn't clear, what was happening -- please try my test-code before answering. thanks! <?php // test: a $data = array('x' => 1); functio...

Compiling .NET component that uses a non specific required version of a 3rd Party Vendor component

If someone were to develop a .NET component that relied on non specific versions of a vendor DLL - let's say it worked with My3rdPartyComponent.dll which is a .NET assembly, but it didn't matter which version. Some instances of classes found in this component would need to be passed into my component. Developers would reference my comp...

LINQ-to-entities changeset references object type

After objects get committed to the db, I sometimes want to update a separate index. The simplest version is something like: if(ChangedObject.getType() == typeof(User)) Update(((User) ChangedObject).UserID); The problem is, if it's a related table, then the changed object won't be of the type User, just one of its properties will. ...

C++ const-reference semantics?

Consider the sample application below. It demonstrates what I would call a flawed class design. #include <iostream> using namespace std; struct B { B() : m_value(1) {} long m_value; }; struct A { const B& GetB() const { return m_B; } void Foo(const B &b) { // assert(this != &b); m_B.m_value += b.m_value; m_B.m_value += b...

How to use unset() for this Linear Linked List in PHP

I'm writing a simple linear linked list implementation in PHP. This is basically just for practice... part of a Project Euler problem. I'm not sure if I should be using unset() to help in garbage collection in order to avoid memory leaks. Should I include an unset() for head and temp in the destructor of LLL? I understand that I'll use...

How do I reference my MainViewController from another class?

Hi, I am building an iPhone Utility app that uses UIImageView to display an animation. Within the MainViewController's viewDidLoad() method, I am creating an instance of a CustomClass, and then setting up the animations: - (void)viewDidLoad { [super viewDidLoad]; cc = [CustomClass new]; NSArray * imageArray = [[NSArray alloc] i...

Project reference vs. DLL Reference - Which is better?

I know there are other questions regarding this subject, and I've looked at this question, but I'd like to see a little bit more discussion and information on both sides of this - is it a better practice to add a project to a solution and reference the project, or to add a reference to the .dll? ...

What determines when a destructor is called for a temporary object in C++?

Guys I've asked few days ago a question and didn't have really time to check it and think about it, but now I've tried one of the solutions and I can't understand why does it work? I mean why destructor is called at the end of line like this: #include "stdafx.h" #include "coutn.h" #define coutn coutn() int _tmain(int argc, _TCHAR* arg...

WPF MVVM Pattern - References

Hi everyone I wanted to know if some of you guys can post some articles, blog posts etc. that explain the MVVM Pattern in detail. There are not much explainations out there I think ( except Tutorials). I'm going to write my exam about WPF and also want to build in the MVVM Pattern. So I need some good references that are also digging a ...

Circular references when I create my own Unity wrapper

Hi, I've just started an MVC 2.0 solution using Unity 2.0. I thought it would be a good idea to create my Unity Container with all the RegisterType calls within a separate assembly to allow me to reuse it throughout my Unit Tests. However, I quickly realised I'd end up with circular references regardless of unit testing. My MVC appli...

Why are references compacted inside Perl lists?

Putting a precompiled regex inside two different hashes referenced in a list: my @list = (); my $regex = qr/ABC/; push @list, { 'one' => $regex }; push @list, { 'two' => $regex }; use Data::Dumper; print Dumper(\@list); I'd expect: $VAR1 = [ { 'one' => qr/(?-xism:ABC)/ }, { 'two' => qr/(?-xism:ABC...

Visual Studio 2010 Solution Find all References Not Working

I have a Visual Studio 2010 Solution that was imported from a Visual Studio 2008 solution that the Find all References does not work on. I've tried doing some searches on Google to try and figure this out but have come up empty handed. The find all references in VS2008 worked like a charm, we upgraded to 2010 and now no matter what f...

Can a reference variable in PHP be used to as an alias for long variable names?

This may be a silly question to some, but I was curious how would PHP react to something such as: $blog_title = &$author->get_blog()->get_title(); I'm assisting someone with some upgrades to an in house php framework. There is some serious method chaining going on, repeatedly in some places. I'd like to make the code more readable w...

c++ must delete a references?

hello community, how are you? in the following code: class x { private: someRef& m_ref; public: x(someRef& someRef):m_ref(someRef) { } do I need to do: ~x() { delete m_ref; } which by the way doesnt work without getting the pointer... basically I'm asking: Do I need to call a destructor on a reference member? ...

c++ current date and pointers problems!

in c++ .. first of all I need to make a constructor of class Date d() that creates the current date.. what should i do? after that i have a problem with this program: class Noleggio { public: //Noleggio(unsigned f, unsigned n, unsigned c) : inizio() { film = f; copia = n; cliente = c; restituito = false; } bool restituito;...

Could not load type '<typename>' from assembly '<assemblyname>'.

I decided to modify some code today, and encountered an error that doesn't make any sense to me. I have an interface called IDatabase and a class that inherits from it, called Database. I originally just put IDatabase in the same assembly as Database, but I didn't like this because it would prevent another person from creating a new ty...

Problem with passing around Object references in Java...

hi there! i'm writing some stuff in java and i ran into some problems lately. cut short, i need to compare an object i created to another instance of this very class i instantiazed before with different data. looks like this: a newA = null; a oldA = null; while(someBreakCondition) { newA = new a(); newA.x = getSomeValue(); ...