reference

How to access API reference from Xcode ?

I'm tired of switching between xcode and the browser to check iPhone API reference from Apple web site. Any better way to to it directly from Xcode ? Ideally I'd like to select a word and search for it in the APi reference automatically. ...

Do you know any style guide for Python?

Do you know any style guide for Python like "Code Like a Pythonista"? I found chapter 2.3.4 of Expert Python Programming very interesting too. ...

Returning references while using shared_ptrs

Suppose I have a rather large class Matrix, and I've overloaded operator== to check for equality like so: bool operator==(Matrix &a, Matrix &b); Of course I'm passing the Matrix objects by reference because they are so large. Now i have a method Matrix::inverse() that returns a new Matrix object. Now I want to use the inverse directl...

Object pointer value as key into dictionary

I want to use the object's reference value as a key into a dictionary, as opposed to a copy of value of the object. So, I essentially want to store an object associated with a particular instance of another object in a dictionary and retrieve that value later. Is this possible? Is it completely against the idea of NSDictionary? I can te...

Boost binding a function taking a reference

Hi all, I am having problems compiling the following snippet int temp; vector<int> origins; vector<string> originTokens = OTUtils::tokenize(buffer, ","); // buffer is a char[] array // original loop BOOST_FOREACH(string s, originTokens) { from_string(temp, s); origins.push_back(temp); } // I'd like to use this to repl...

pointer reference type

I am trying to write a function that takes a pointer argument, modifies what the pointer points to, and then returns the destination of the pointer as a reference. I am getting the following error: cannot convert int*** to int* in return Code: #include <iostream> using namespace std; int* increment(int** i) { i++; return ...

Where is the api reference for nhibernate?

I may be going mental, but I can not find any api reference material for nhibernate. I've found plenty of manuals, tutorials, ebooks etc but no api reference. I saw the chm file on the nhibernate sourceforge page, but it doesn't seem to work on any of my PCs (different OSes) Can someone please point me in the right direction? ...

List of hackathons

Since I cannot find my answer in the almighty Google I decided to try Stackoverflow. I would like to know if there is such a thing as a list of hackathons or projects supporting them. The wikipedia article mostly talks about OpenBSD but I am quite sure that other projects have done such thing (I believe KDE and GNOME have done so) ...

Removing items from lists and all references to them.

I'm facing a situation where I have dependent objects and I would like to be able to remove an object and all references to it. Say I have an object structure like the code below, with a Branch type which references two Nodes. public class Node { // Has Some Data! } public class Branch { // Contains references to Nodes pu...

C++ vector reference parameter

Hello folks, let's say we have a class class MyClass { vector<vector<int > > myMatrice; public : MyClass(vector<vector<int > > &); } MyClass::MyClass(vector<vector<int > > & m) { myMatrice = m; } During the instanciation of MyClass, I pass a big vector < vector < int > > and I find that the object is actually copied and not ...

Does Array.sort changes references in C#?

In my C# code, I have a array of objects. And many of these objects are referenced in another class. If Array.sort method is used to somehow sort this array of objects, then will it affect those references? Is it same for the arrays and lists? ...

Difference of function argument as (const int &) and (int & a) in C++

I know that if you write void function_name(int& a), then function will not do local copy of your variable passed as argument. Also have met in literature that you should write void function_name(const int & a) in order to say compiler, that I dont want the variable passed as argument to be copied. So my question: what is the difference...

Extracting a reference from a c++ vector

Hello folks, I have a vector< vector< vector< int>>> and I would like to extract from it a vector< vector< int>> to process it individually. The problem is that when I write : myMatrix = myCube[anIndex]; the matrix is copied but I only want a reference in order to save memory. Can you please help me out ? Thanks a lot! ...

C++ standard: dereferencing NULL pointer to get a reference?

I'm wondering about what the C++ standard says about code like this: int* ptr = NULL; int& ref = *ptr; int* ptr2 = &ref; In practice the result is that ptr2 is NULL but I'm wondering, is this just an implementation detail or is this well defined in the standard? Under different circumstances a dereferencing of a NULL pointer should re...

How to get the field name of a java (weak) reference pointing to an object in an other class?

Imagine I have the following situation: Test1.java import java.lang.ref.WeakReference; public class Test1 { public WeakReference fieldName; public init() { fieldName = new WeakReference(this); Test2.setWeakRef(fieldName); } } Test2.java import java.lang.ref.WeakReference; public class Test2 { ...

healthy DLL reference broken after compile multi-project solution

Hi. I have a solution with multiple class libraries. When I compile each individual library (and the web site by itself) compilation always succeeds. But, when I compile the solution as a whole, one of the library references fails with a little yellow exclamation mark next to the failed library. In the Error List I have: The t...

An exception for a circular reference database - is this one?

I have 4 tables, linked in a circular reference - I remember from college that I was told this is bad however there are exceptions...I am hoping that this is one of them :) My database contains 4 tables; teachers, classes, subjects and teachers_classes. The following sums up my relationships: A teacher can have many classes A class ...

No System.Web In VS2010

In a WPF project, I'm trying to add System.Web as a reference but in Project -> Add Reference -> .NET there's no System.Web. Any ideas? Thanks. ...

Can operations be auto-vectorized on struct's field referenced by pointer?

This is my code. struct Vector { float x, y, z, w; }; typedef struct Vector Vector; inline void inv(Vector* target) { (*target).x = -(*target).x; (*target).y = -(*target).y; (*target).z = -(*target).z; (*target).w = -(*target).w; } I'm using GCC for ARM (iPhone). Can this be vectorized? PS: I'm trying some kind of optimization...

javascript "this" points to Window object again

Hello, I asked a question on http://stackoverflow.com/questions/2719643/javascript-this-points-to-window-object regarding "this" points to Window object. here is source code var archive = function(){} archive.prototype.action = { test: function(callback){ callback(); }, test2: function(){ console.lo...