reference

Documenting webservice API Reference guide?

Online webservice API/reference guide - What software application do you use to document your webservice/API technical specification/reference guide? ...

What is the proper way to return an object from a C++ function ?

I am confused between : returning an object (but then the object is copied from the local variable in the function, which consumes memory) returning a pointer (but then you have to remember to delete it, in the calling code, which is weird) returning a reference (but this is not possible because this would be a reference to a local var...

Silly C++ reference question

I do not know how to call a function with a reference in it :( It is a silly noob question I know. The header is let's call it ref.h has a function in it that is: virtual int funcName (Bike &biker, BikeArray &bikearray, int x, int y .... ) Within ref.h there is another header that is called Bike.h. How do I call funcName from my m...

Why can't a function have a reference argument in C?

For example: void foo( int& i ); is not allowed. Is there a reason for this, or was it just not part of the specification? It is my understanding that references are generally implemented as pointers. In C++, is there any functional difference (not syntactic/semantic) between void foo( int* i ) and void foo( int& i )? ...

Ensuring a reference that will not become invalid is given

I'm making a TextField class, which at the moment stores a reference to a variable, and whenever the programmer wants, they can call TextField.show() and the referenced variable will be read and displayed on-screen. This however can result in problems if the reference becomes invalid. For example, if the variable referenced goes out of ...

I cann't access a namespaces in referenced assemblies in MVC Views

Some times there are an intellisense problem in the views, the namespaces in the referenced assemblies don't appear in the intellisense only in views but the do appear in .cs code files in the same project.. i've tried these ways: <pages> <namespaces> <add namespace="MyNameSpace" /> </namespaces> </pages> in the web.config fi...

Add a reference to a .js file in a javascript file?

What is the correct syntax for adding an external reference to a JavaScript file (.js) within another JavaScript file? ...

Returning a reference to an object in PHP

I'm using PHP 5.2.14 and PearLog 1.12.3. The latest documentation from the singleton method in Log.php (PEARLog) states: You MUST call this method with the $var = &Log::singleton()syntax. Without the ampersand (&) in front of the method name, you will not get a reference; you will get a copy. However, doing so generates the...

Any good books to pick up for a well-rounded reference to Entity Framework 4?

Hi guys. Been reading through Manning's NHibernate in Action book, and it has absolutely been terrific for laying out a good, solid, easy-to-digest (relatively) foundation on NHibernate. Question is, are there any comparable [reference] books for MS' Entity Framework 4 as well? I'm feeling mighty biased for NHibernate right now, and tha...

How do I write a const accessor that returns a reference to a member object, so it might be edited?

Here is the problem. I wrote this function to return a reference to the i element of a member vector, so this element could be edited. Here is the code: Letter& Literal::get (int i) const { return lit_m.at (i); //Vector of Letter objects } But g++ won't let me assign that element to a non-const reference: g++ -o literal.o -c lite...

Incorrect reference PcapDotNet.?.dll

Hello I try to use PcapDotNet dll but I can't add reference to my project. It doesn't matter which dll it is. PcapDotNet.Core.dll, PcapDotNet.Base.dll etc. I have yellow exclamation mark near this reference and can't use any methods from this dll. Ofc "using PcapDotNet.Core;" is underlined too and compiler shows me: "The type or namespac...

C++ - dynamically use either reference or local variable

Hi! I would like to do something like this (I'm aware that this won't compile): struct Container{ vector<int> storage; }; float foo(Container* aContainer){ if(aContainer!=NULL) vector<int>& workingStorage=aContainer->storage; else vector<int> workingStorage; workingStorage.reserve(1000000); ....u...

CS-Script "Could not load file or assembly"

I'm using CS-Script (link: http://www.csscript.net/) to compile a script file. According to their documentation, I'm doing it right. new AsmHelper(CSScript.Compile("test.cs"), null, true); However at runtime, I get: Could not load file or assembly 'file:///C:\Users...\CSScriptLibrary.dll' or one of its dependencies. Operation...

What do I often see references in operator overloading definitions ?

For example, in the OGRE3D engine, I often see things like class_name class_name :: operator + (class_name & object) Instead of class_name class_name :: operator + (class_name object) Well it's not that I prefer the second form, but is there a particular reason to use a reference in the input ? Does it has special cases where it is...

WebOperationContext Object reference not set to an instance of an object

When I try to use WebOperationContext.Current in a WCF project, the Current is null. Below is the example. Could anyone please shed a light on it? WebForm - default.aspx: ServiceClient sc = new ServiceClient(); Response.Write(sc.DoWork(1) + "<br />"); WebOperationContext c = WebOperationContext.Current; --Current is null...

Referring to Code in IBM.Data.DB2 makes that Assembly Unavailable to the rest of my Solution

I have a C# console application with three assemblies: Main, Common and Utilities. In a file in the Main assembly, Main.cs, I have the line: using Utilities; In a directory within the Common assembly, I have the DLL IBM.Data.DB2.dll. In the Utilities assembly, I have a source module which accesses said dll. Utilities has a Reference...

AS2 fileReference.download not downloading?

I am trying to force the download of a file (image) vie fileReference. It works great when tested in the flash publish preview, but not when its posted online. Im publishing to AS2 from CS3, by browser has flash player 10 installed. When i click my download link, i couldn't get the save file dialog box. How this can be solved? ...

Reference to uninitialized object iniside constructor

It is possible to pass uninitialized object to a parent class like in the following example class C { public: C(int i): m_i(i) {}; int m_i; } class T { public: T(C & c): m_c(c) { }; C & m_c; }; class ST : public T { public: ST(): ...

Loading wrong assemblies on non-dev machines?

I think I'm falling into a common category of, "It works perfectly in my dev environment, but anywhere else I get strange results," and for all my efforts I'm only more confused. I have 2 applications. One of them is .NET 4 C# app, and the other is (I think) .NET 3.5 VB. The C# app creates a DLL, that for the time being, I have a versi...

Basic question on passing references of HashMaps

Hi ! I have defined a HashMap which uses a double type key and another HashMap as value as shown HashMap<Double, HashMap<Double, String>> HM1 = new HashMap<Double, HashMap<Double, String>>(); Now for each entry of this HashMap I have a reference to a different HashMap; the name of which is derived from the key value of that entry in t...