references

Isn't a pointer just a reference when you don't dereference it?

Isn't a pointer just a reference when you don't de-reference it? #include "stdafx.h" #define BOOST_TEST_MODULE example #include <boost/test/included/unit_test.hpp> std::list<int>* user_defined_func( ) { std::cout << "BEGIN: user_defined_func" << std::endl; std::list<int>* l = new std::list<int>; l->push_back(8); l->pu...

Newbie Q on using reference and generics

Hi everyone, this is the first time I need to use generics and references and I'm having a difficult time of it. I know it's something obvious. public class Program { void SWAP<T>(ref T a, ref T b) { T dum = a; a = b; b = dum; } static void Main(string[] args) { double a = 1; double b = 2; double c = SWAP(a,...

PHP calling a function with variable amount of parameters.

So I've run into a bit of an issue. I know of a solution but it doesn't seem very clean and I'm wondering if there's a better one. I'm writing a MySQLi wrapper for running prepared statements. As it's a wrapper and is meant to be reused (dynamic) the amount of columns returned depends on the query and isn't static. The one solution to ...

Error during Team Build: The type or namespace name 'Serializable' could not be found

New problem with VS2005 Team Build: Building locally a solution of a mobile client for a platform of the company, everything goes pretty neat and compilation occurs without major hiccups, but using the very same solution on a Team Build gives me the following problem: Solution: TB Client.sln, Project: Client.PocketPC.UIAPI.csproj,...

Project References DLL version hell

We're having problems getting visual studio to pick up the latest version of a DLL from one of our projects. We have multiple class library projects (e.g. BusinessLogic, ReportData) and a number of web services, each has a reference to a Connectivity DLL we've written (this ref to the connectivity DLL is the problem). We always point ...

PHP dereference array elements.

I have 2 arrays. $result = array(); $row = array(); Row's elements are all references and is constantly changing. For each iteration of $row I want to copy the values of row into an entry of $result and not the references. I have found a few solutions but they all seem rather awful. $result[] = unserialize(serialize($row)); $result[...

Using System.Reflection to determine ALL references

I am trying to determine every single reference inside a dll with System.Reflection. However, GetReferencedAssemblies only lists the ones in the "References" (visible in solution explorer). I would like to determine references from within the code itself, such as an imports statement. Even things like if/then statements, try/catch, abs...

PHP's real SESSION object

EDIT: (UPDATED) Maybe my question was not clear enough. Ok, lets put it this way: $arr["a"] = 10; var_dump($arr); $arr["b"] =& $arr["a"]; var_dump($arr); the first var_dump returns: array 'a' => int 10 While the second one returns: array 'a' => &int 10 'b' => &int 10 If I unset($arr["a"]) it will return: array 'b' => ...

Why am I getting a syntax error when I pass a coderef to this prototyped Perl subroutine?

This is the code: sub function($&) { my $param1 = shift; my $code = shift; # do something with $param1 and $code } If I try to call it like this: function("whatever") { print "i'm inside the coderef\n"; } I get Not enough arguments for MyPackage::function at x.pl line 5, near ""whatever" { ". How can I call it witho...

.NET Assembly References going all circular on me.

Update: Last night, I decided that this is just too much work to change the folder where some reports are saved. My work-around here is to rename the folder, run the batch job I need done, and then change the folder name back to what it was originally. I feel like I could spend the rest of today and all of next week working on this and...

Project references each refer to different assembly versions

I have a class library project that references the version 4.1 Microsoft.Practices.Common dll. I also reference a 3rd party DLL that utilizes a different version of the Microsoft.Practices.Common DLL. I create a windows app that references both of these DLL's. I receive an error when running MSBUILD: "No way to resolve conflict betwe...

BizTalk: Can't deploy two schema assemblies that both reference that same base assembly.

Hi, I'm having trouble deploying some schemas: I have assemblyA containing schemaA, assemblyB containing schemaB which references assemblyA and assemblyC containing schemaC and also referenceing assemblyA. I can deploy asssemblyA fine and see schemaA in schemas in BizTalk Admin. I can deploy EITHER assemblyB or assemblyC fine and see...

PHP, SPL predefined constants

where can i get some references about SPL predefined constants like SELF_FIRST,CHILD_FIRST ? on php.net i don't get much(just their type). ...

Faster/better way to compare .NET References' properties?

I am in the process of upgrading an older component which shares references to custom assemblies of differing versions. To compare the properties of references from two different projects I have been copying and pasting the property values individually from the two different references to a text file for easier overview and comparison....

Alternatives to C++ Reference/Pointer Syntax

What languages other than C and C++ have explicit reference and pointer type qualifiers? People seem to be easily confused by the right-to-left reading order of types, where char*& is "a reference to a pointer to a character", or a "character-pointer reference"; do any languages with explicit references make use of a left-to-right readin...

Check if row already exists, if so tell the referenced table the id

Let's assume I have a table magazine: CREATE TABLE magazine ( magazine_id integer NOT NULL DEFAULT nextval(('public.magazine_magazine_id_seq'::text)::regclass), longname character varying(1000), shortname character varying(200), issn character varying(9), CONSTRAINT pk_magazine PRIMARY KEY (magazine_id) ); And another table ...

Web Site in solution where "Rebuild Solution" compile succeeds cannot launch debugger

I have a solution that includes a Web Site (created using the web site template not the web app project template - converting isn't an option, btw). When I rebuild all, the compile succeeds, but strangely displays 3 errors, all of which are "Could not get dependencies for project reference 'PROJNAME'". When I try to launch the debugger...

Using different versions of the same assembly in the same folder

I have the following situation Project A - Uses Castle Windsor v2.2 - Uses Project B via WindsorContainer Project B - Uses NHibernate - Uses Castle Windsor v2.1 In the bin folder of Project A I have the dll Castle.DynamicProxy2.dll v2.2 and NHibernate dlls. Now the problem is that NHibernate is dependent on Castle.Dynamic...

How to detect circular references between assemblies in a .NET solution?

Do you know of an effective way to detect circular references between .Net assemblies? The situation I would like to detect/prevent is such as: A references B B references D D references A ...

How can I declare classes that refer to each other?

It's been a long time since I've done C++ and I'm running into some trouble with classes referencing each other. Right now I have something like: a.h class a { public: a(); bool skeletonfunc(b temp); }; b.h class b { public: b(); bool skeletonfunc(a temp); }; Since each one needs a reference to the other, I've...