reference

Why do I see HASH(0xABCDEF) in my Perl output?

I am running perl, v5.6.1 built for sun4-solaris-64int I am calling print on an array print "@vals\n"; and the output looks like HASH(0x229a4) uid cn attuid or another example @foo = {}; push(@foo, "c"); print "@foo I am done now\n"; with output of HASH(0x2ece0) c I am done now Where is HASH(0x2ece0) comming from? Thanks...

rules with temporary objects and args by reference

say I have a class: class A { public: A() {} }; and a function: void x(const A & s) {} and I do: x(A()); could someone please explain to me the rules regarding passing temporary objects by reference? In terms of what the compiler allows, where you need const, if an implicit copy happens, etc. From playing around, it seems like...

VB.NET Invoke DLL method with ByRef Arguments

Using VB.NET, is there a way to pass a reference argument when invoking a function in a dll. Suppose I want to pass arg2 as a reference argument, how would I do that? method.Invoke(obj, New [Object]() {arg1, arg2, arg3}) In other words I want to point arg2 to something else within the invoked function. ...

How do you pass an array by reference in Delphi?

I already read up about passing by reference and so procedure test(var x:integer); begin x:=x+5; end; so the above code updates 5 by reference. I assumed if I was updating an array by reference I could declare var X: array of blah... having some bound bugs and just wanted to know if I should be using the type of data for the pointer...

Referencing a COM assembly in Visual Studio vs converting a COM assembly via tlbimp.exe

When I import a COM assembly (dll) in to a Visual Studio project by adding it as a reference I can use the generated equivalent common language runtime assembly without issue. However if I try and convert the same COM assembly into a common language runtime assembly using tlbimp I run in to all kinds of problems. Is there a way to repl...

Is there a javascript function library like php has?

When I search for a function in PHP I just go to php.net and search for the function I am using jQuery but am always looking for functions since I am a beginner in terms of advanced javascript usage. Is there a cool reference page like php has? I am not only looking for a jQuery documentation but a documentation of all javascript functi...

How can I create an anonymous hash from an existing hash in Perl?

Hello, How can I create an anonymous hash from an existing hash? For arrays, I use: @x = (1, 2, 3); my $y = [@x]; but I can't find how to do the same for a hash: my %x = (); my $y = ???; Thanks ...

Should Java method arguments be used to return multiple values ?

Since arguments sent to a method in Java point to the original data structures in the caller method, did its designers intend for them to used for returning multiple values, as is the norm in other languages like C ? Or is this a hazardous misuse of Java's general property that variables are pointers ? ...

call F# dll in C#

How can I create F# dll and call it in C#? Thank you ...

How can I convert a function return value from reference to array?

I have this code in Perl: sub f { return [1,2,3] } print f; The function f returns reference to array, how can I convert returned value to array without additional variable, like here? sub f { return [1,2,3] } $a = f; print @$a; ...

const float & x = something; // considered harmful?

There was some code like this: // Convenience to make things more legible in the following code const float & x = some.buried.variable.elsewhere; // Go on to use x in calculations... I have been told that the "const float &" is "bad" and should just be a plain float or const float. I, however, could not think of a compelling reason ...

C# WCF: Having a single app.config in a shared library that provides access to the Service

I currently have a solution with a couple of projects and one of them is a WCF Service. I created another projected with a static class that basically provides a gateway to an instance of the WCF client, like such : public static class WSGateway { public static DBInteractionGatewayClient MR_WebService { get { ...

Is there an official Windows XP registry reference?

Is there an official Windows XP registry reference online somewehere? I see there's a reference for Win 2000 and Win 2003 servers on MS technet, but I can't seem to find one for XP. Yes, I know that Win 2000 reference would be good enough (most things will be the same in XP anyway), but if there's an explicit reference for XP, I'd like t...

Is it good to have all the setter functions return a reference to the object in c++?

Is it good to have all the setter functions return a reference to the object in c++? ...

ASP.NET - How do you reference a class that is not in app_code

I have created a MasterPage called MyMasterPage. public partial class MyMasterPage : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { } } I have also created a class called Class1 in app_code: public class Class1 { public Class1() { MyMasterPage m; } } In Class1 I woul...

Const reference to temporary

After reading this article on Herb Sutter's blog, I experimented a bit and ran into something that puzzles me. I am using Visual C++ 2005, but I would be surprised if this was implementation dependent. Here is my code: #include <iostream> using namespace std; struct Base { //Base() {} ~Base() { cout << "~Base()" << endl; } };...

Search Engine Optimization reading material and references request.

Search Engine Optimization (SEO) seems to be a topic I'm running into more and more and I would like to know a little more about it. However, it seems to be very difficult to find any solid information about it. The Wikipedia page on SEO has some general information and little bit of history, but nothing really concrete. Googling for a...

Undefined reference? Is there something I'm not seeing? (c++, singleton class)

I can't seem to make this undefined reference go away. http://imgur.com/1qqDi.png (screenshot of issue) I have this code under the private section of Scene.h: static Scene * scene_; There is a #include "Scene.h" at the very first part of the header of Scene.cpp This is the only error I'm receiving at the moment, any ideas? I'll s...

Java variable aliasing workaround

I've recently moved to Java, but I've had some problems with variable aliasing. I've searched everywhere, but I can't seem to find the proper way to copy the contents of one object to another object without just referencing to the same object. Does anyone have any suggestions? Edit: What if it is an int that I am having aliasing problem...

Add reference DLL issue in Visual Studio

Hello everyone, I am using VSTS 2008. I have two projects (both are written in C#) in one solution file. Project 1 depends on the output (DLL2) of project 2. So, in project 1, I am using "References --> Add Reference --> Browse", then find and select the DLL2 generated by project 2. My question is, I am not sure whether using such meth...