reference

How to reference a map name for a subquery in an HQL order by clause

I've got an HQL statement like this: select new map (f1 as field1, (select ...) as field2) from ... where ... order by field2; It fails saying "Unknown column 'field2'". I experienced this in general that when using the "new map" statement, I can't reference the map names in the order by field. As HQL subqueries are only allowed in t...

Objective-C Mutlithreading and Data Containers

Hey guys, I have sort of a simple question. I am writing an Objective-C program with some multithreading. I have a global NSArray, and I add objects into that NSArray from a method that is called in a new thread. If the objects I add into that NSArray are new objects created in that method (local), will that create memory access and/or ...

Working around the C++ limitation on non-const references to temporaries

I've got a C++ data-structure that is a required "scratchpad" for other computations. It's not long-lived, and it's not frequently used so not performance critical. However, it includes a random number generator amongst other updatable tracking fields, and while the actual value of the generator isn't important, it is important that th...

What's the best way to reference an element via ID in jQuery?

Should I be using $("#myElement") or $(myElement)? Both appear to work. ...

How to reference a system property within a user-defined .properties file?

I want to define a property for a working directory(say work.dir=/home/username/working-directory), for my production .properties file, without hard-coding the /home/username.I want to reference the system property user.home in place on the hard-coded /home/username, to make work.dir more generic. How do I reference the system property a...

Reference - What does this symbol mean in PHP?

What is this? This is a collection of questions that come up every now and then about syntax in PHP. This is also a Community Wiki, so everyone is invited to participate in maintaining this list. Why is this StackOverflow does not allow searching for particular characters. As a consequence, many questions about operators and other sy...

Non type template parameters of reference

What is the use of 'non type template' parameters which are of 'reference' type? Why are such parameters also treated as 'rvalues'? template<int &n> void f(){ &n; // error } int main(){ int x = 0; f<x>(); } ...

How can i reference Server.UrlEncode in an ASP.NET class?

I have created an ASP.NET class. In that class i would like to use the Server.UrlEncode. Why intellisense is not helping me at all and instead of Server.UrlEncode it displays the HttpServerUtility? I have already a reference to system.web ...

How to change implementation of returned object base class's function when object is returned C++

I have an existing application in C++ with a custom ArrayBase class that manages storage and access to a contiguously allocated region of memory. I have a separate ItrBase class that is used to access data in that ArrayBase. ArrayBase has a createItr() function that currently returns an ItrBase object. I need to extend ArrayBase to us...

C++ function parameter as reference

Hi, I have a question. Can anyone tell me why someone would declare parameter r like that ? Whats the difference between Record& r and Record(&r) ? QDataStream& operator>>(QDataStream &s, Record(&r)) { } Thanks :) ...

PHP: can one determine the parent array's name and key from a reference to an array element?

let's assume we have an array like this $arr=array(array('a'=>1,'b'=>2),array('c'=>3,'d'=>4)); and a reference to one of its elements $element=&$arr[1]['c']; My question is is it possible to get back to the original array using the reference alone? That is to get back to the parent array in some way without knowing it by name... Th...

Cannot find missing reference

I am trying to copy code from one project to another. There is one problem however: The type 'Microsoft.Practices.EnterpriseLibrary.Data.Sql.SqlDatabase' is defined in an assembly that is not referenced. You must add a reference to assembly 'Microsoft.Practices.EnterpriseLibrary.Data, Version=3.1.0.0, Culture=neutral, PublicKeyToken=nu...

Illegal Forward reference, Object visibility Issues will compiling.

Thanks for taking the time to read. =) The problem I am having is mainly Object visibility. I'm creating objects and attempting to create references to them before they have been initialized or have any data in them. You can get an idea what I'm trying to do here with the code provided. Certain Squares can see other square ect. Now my ...

.NET 'Private' Application

I create a .NET (WPF) Application, and compile it to .EXE. Then I create a second project, and add a reference to the compiled .exe, I can see all the classes and forms, and can use them for automation, etc. I want to prevent other people from using my compiled .exe as a .dll, so I changed all my classes to 'Friend' instead of 'Public',...

Unable to generate a temporary class

I recently upgrade my machine to XP 64 bit and also made some code changes to our software and when I'm doing new XmlSerializer(valueType), where valueType is a type that is using DirectoryItem, I'm getting the following error: Unable to generate a temporary class (result=1). error CS0012: The type 'XYZ.Blob.DirectoryItem' is defin...

Git : fatal: Ambiguous object name: 'origin/release_2.6'.

I am getting this error when trying to create a remote tracking branch git co -b release_2.6 origin/release_2.6 warning: refname 'origin/release_2.6' is ambiguous. warning: refname 'origin/release_2.6' is ambiguous. fatal: Ambiguous object name: 'origin/release_2.6'. I only have these two refs defined with release_2.6 git show-ref | ...

Type conversion for function parameters

class A{ }; class B{ public: B(); B(const &A); }; void foo(A &a){ } int main(){ B b; foo(b); //error: invalid initialization of reference of type ‘A&’ from expression of type ‘B’ return 0; } In the above code, I have a compilation error error: invalid initialization of reference of type ‘A&’ from expression of ty...

Reference "to any" with JPA

Hi there, is it possible to model a reference to "any" (entity) with JPA? Similar to a reference of type Object in Java, which can hold any object. Thanks for your answer, Dominik ...

What is the difference in ECore between containment and reference?

When creating references between ECore entities there is the possibility to mark a reference as "containment". Can somebody explain me in easy words what's the difference between a plain reference and a containment? The definitions and explainations I found so far didn't do the trick for me. ...

Javascript References Array

I have a big multidimensional array that holds references to objects and I need to be able to move a reference from one spot in the array to another and then delete the original reference (or set it to undefined). The problem with this is it then deletes the recent reference. var data = [[new Obj, new Obj], [new Obj, new Obj]]; functio...