reference

Store a reference to a single SecureRandom in Java?

Coming from the C++ world here, thus the nature of the question... I want to use a single SecureRandom generator in a Java application, but I need several instances of a class to store a reference to it in the constructor, rather than copies. So, public class MyClass { private SecureRandom random; public MyClass(SecureRandom _...

How do I reference a static method of a variable class in PHP?

Hi folks! I'm writing a factory class that should be able to return singleton instances of a number of different types, depending on the given parameter. The method would look something like this, but the way I'm referencing the singleton's static method is obviously wrong: public function getService($singletonClassName) { return $...

Crossbrowser JavaScript + DOM documentation

I'm already aware of some browser-specific DOM documentation out there (Gecko DOM Reference for Firefox, MSDN for Internet Explorer and, of course, the ECMA and W3C specs) but I wonder if someone has compiled a good API reference that covers all common browsers (Firefox, Internet Explorer, Opera, Safari, Chrome...). The compatibility ta...

Generic Lists copying references rather than creating a copiedList

I was developing a small function when trying to run an enumerator across a list and then carry out some action. (Below is an idea of what I was trying to do. When trying to remove I got a "Collection cannot be modified" which after I had actually woken up I realised that tempList must have just been assigned myLists reference rather t...

Add reference to VB Script Task in SSIS 2008

I am trying to add a standard .NET reference (System.DirectorySearcher) to a VB Script Task in SSIS 2008. I was able to do this in SSIS 2005, but when I try to add the reference in 2008, I get the following error: No template information found. See the application log in Event Viewer for more details. To open Event Viewer, clic...

Call by reference in C++

What is actually passed in call by reference to a function? void foo(int &a,int &b) when I write foo(p,q) what is actually passed to the function. Is it the address of p and q? ...

Undefined Reference Problem in Eclipse

Hello, I am using Eclipse Galileo 3.5 with CDT 6.0 I am having a problem in including the header files located in c:\cs106 ... I searched on google and found that I have to go to Project Properties > C/C++ General > Paths and Symbols and in GNU C++ I have added the path c:\cs106 And eclipse is able to find them now but the other probl...

What are the differences between value types and reference types in C#?

I know a few differences, Value types are stored on the stack where as reference types are stored on the managed heap. Value type variables directly contain their values where as reference variables holds only a reference to the location of the object that is created on the managed heap. Is there any other difference i missed... If s...

Pass Variables By Reference in Javascript?

Hy i dont know if that is possible but i want to set a given variable in js per reference. What i want to do is, that each time i pass a string to the function addstring that the value of the textfield is added like += function addstring(string) { document.getElementById("string").value = string; // its a textfield } How can i d...

How can you make a variable/Object read only in Javascript?

Possible Duplicate: Can Read-Only Properties be Implemented in Pure JavaScript? I have an Object that I only want to be defined when constructed. How can I prevent the Object reference from being changed? ...

Modifying reference member from const member function in C++

I am working on const-correctness of my code and just wondered why this code compiles: class X { int x; int& y; public: X(int& _y):y(_y) { } void f(int& newY) const { //x = 3; would not work, that's fine y = newY; //does compile. Why? } }; int main(int argc, char **argv) { int i1=0, i2=0...

What should happen when a reference is deleted?

I have a vb.net 3.5 application which references a dll (abc.dll, also in .net 3.5) This dll is accessed by the application from time to time. If at anytime during execution, if I delete the dll, I expect the application to throw an error the next time it tries to use a class from the dll. But, this is not the behaviour I see. If I delet...

C# WPF Apllication class

My application consists of App.cs/App.xaml and some other files. Everything is compiled to an exe file. However, I want a 2nd application, which should reference the first one. In this application is a class derived from App. But when I call the the Run() function I get an very strange error in the XAML code of the first application, say...

Storing expression references to data base

I have standard arithmetic expressions sotred as strings eg. "WIDTH * 2 + HEIGHT * 2" In this example WIDTH and HEIGHT references other objects in my system and the literals WIDTH and HEIGHT refers to a property (Name) on those objects. The problem I'm having is when the Name property on an expression object changes the expression won...

Excel formula to show linked cell ID

In an excel cell, I've placed a simple formula =C4 The cell typically displays the value of cell C4, but instead I want to see the linked cell ID instead, which in this case is "C4". Is there a formula to show me this? like: =SHOWCELL(C4) The reason I need this instead of simply typing the value of "C4" into the cell, is so Excel ...

vb6: get reference with given hwnd

hi, how can i get a control's reference with given hwnd? (i dont want to do it by querying eg. Form1.controls), it should work with the AccessibleObjectFromWindow api. unfortunately i couldn't figure it out how to use it. anyone would have a little code snippet? thanks ...

C# Microsoft.DirectX.AudioVideoPlayback.Video reference?

What reference do I have to add to use "Microsoft.DirectX.AudioVideoPlayback.Video"? It is not recognized currently. ...

How to retrieve stored reference to an NSManagedObject subclass?

Hi! I have a NSManagedObject subclass named Tour. I stored the reference to it using this code: prefs = [NSUserDefaults standardUserDefaults]; NSURL *myURL = [[myTour objectID] URIRepresentation]; NSData *uriData = [NSKeyedArchiver archivedDataWithRootObject:myURL]; [prefs setObject:uriData forKey:@"tour"]; Now I want to retrie...

Referencing to objects from anywhere in Cocoa

What's the best way to reference to a dynamically allocated object (particularly interface elements) so I can access them from everywhere in the current class? @synthesize? declaring the object in the interface section? anything else? ...

Reference Git branch start commit.

Hi I am trying to find how to reference branch start commit from script. I mean the commit sha at which branch was forked. Moreover I expect it work for history made from svn repo. http://stackoverflow.com/questions/1006775/git-how-to-reference-the-initial-commit/1007545#1007545 just gives first commit of repo creation and not feature...