reference

Is there a list of 3rd party Python 3 libraries?

More and more libraries are being ported to Python 3, and I suspect the changes will happen more and more rapidly as time goes on. However, as a non-newbie to Python, there are quite a few 3rd party libraries I use (matplotlib, pygame, pyGTK, Tkinter, among others). I know I should just be able to go to their site(s) to find out if they ...

Animation issue caused by C# parameters passed by reference rather than value, but where?

I'm having trouble with sprite animation in XNA that appears to be caused by a struct passed as a reference value. But I'm not using the ref keyword anywhere. I am, admittedly, a C# noob, so there may be some shallow bonehead error in here, but I can't see it. I'm creating 10 ants or bees and animating them as they move across the scree...

JAXB cyclic reference avoidance using @XmlIDREF

I'm using JAXB in a web service with some slightly complex objects. One of the objects, Sensor, has a list of other objects it can communicate with, which necessarily can include itself (behavior that cannot be changed), leading to a cyclic reference during marshalling to XML. @XmlAccessorType(XmlAccessType.FIELD) public class Sensor e...

Another C++ learning moment: returning strings from functions

I've got some basic questions about C++. Consider the following code in which I attempt to return a string. const std::string& NumberHolder::getValueString() { char valueCharArray[100]; sprintf_s(valueCharArray,"%f",_value); std::string valueString(valueCharArray); return valueString; } I'm attempting to return a stri...

Manage references in source control with Visual Studio

I'm having trouble managing my .dll references in projects in Visual Studio. All the registered .NET and COM references work fine but when it comes to .dll files on disk, if I refer to my files on disk, my colleagues will be missing references because they may have it in a different location on disk etc. Does Visual Studio have a environ...

Non-owning holder with assignment semantics

I have a class that should hold a reference to some data, without owning that data (i.e. the actual data is guaranteed not to go out of scope). In particular, the class cannot make a copy – the data is easily several gigabytes in size. Now, the usual implementation (I assume) is to have a reference to the data: struct holder_ref { ...

Copying data into a reference in java (lack of pointer problem)

So I have an ArrayList in java. And what I'm doing is creating a new list with updated values. But I want to put those new values into the original ArrayList. This is important because I'm passing the original arraylist reference to an object that I no longer have access to, but I need to keep its contents up to date. Is there any way to...

lists in python, with references

How do I copy the contents of a list and not just a reference to the list in Python? ...

How to access a user control's fields and methods without regitering the control?

Hello, I have a ASP.Net project that is setup in such a way that it can be dropped into any site and "just work." All the paths are relative to the current file, not relative to the "~". The paths are determined by ThePath = this.TemplateSourceDirectory; This is working for everything expect registering a custom control that is created...

Visual Studio 2010: Reference Assemblies Targeting Higher Framework Version

Visual Studio 2008 did let you reference an assembly A targeting a higher framework version than that of the assembly B that references it. Visual Studio 2010 doesn't allow for this any more. The full issue is described on MSDN: You can create applications that reference projects or assemblies that target different versions of t...

Maintaining .NET assembly references common to multiple projects

Hey all, My colleagues and I have been wondering the best way to do this for quite some time: what's a good/standard way to maintain .NET assemblies that are referenced in multiple projects? I'll elaborate a little bit: Say you have projects A, B, and C. They could be in the same solution or different solutions, doesn't really matter. ...

Bind function trouble

Hello, I'm using boost (signals + bind) and c++ for passing function reference. Here is the code: #define CONNECT(FunctionPointer) \ connect(bind(FunctionPointer, this, _1)); I use this like this: class SomeClass { void test1() {} void test2(int someArg) {} SomeClass() { CONNECT(&SomeClass::test1); CONNECT(&S...

Why use DllImport Attribute as apposed to adding a reference?

I've seen a couple of examples such as this: [DllImport("user32.dll")] static extern bool TranslateMessage([In] ref Message lpMsg); [DllImport("user32.dll")] static extern IntPtr DispatchMessage([In] ref Message lpmsg); But, what I don't understand is why someone would do that as apposed to just referencing the DLL like they do other...

Set of reference media files

I'm working on testing a software which transcodes different media files. Therefore i need a set of sample media files (Audio/Video) with various combinations for different codecs. Did someone create such a package allready or do i need to create all combinations from scratch? ...

What can I use to create html page-per-chapter/monolithic-page/pdf reference manual?

Howdy, I want to write a reference manual for a project, and I want to make it available both online as a HTML one-page-per-chapter manual (optionally single-monolithic-page would be nice as well) and as PDF version. Prime examples: The Gentoo Handbook (html one page per chapter, html monolithic) Netty's user guide (html one page per...

Strange behavior while modifying array that is being iterated

This is a stupid example, but shows exactly what is my problem. In some situations the array is sucessufully modified and anothers it is not, why? Values are given to foreach by value? And the output is also screwed, some lines seems to have '\r\n' others do not. $arr = file('text.txt'); echo '<pre>'; foreach( $arr as $x => $line)...

C++ Set object member as reference/pointer of member of a different object?

(I'm not sure if that title is worded correctly, as I'm still new to C++) I have two classes, loosely represented here: class SuperGroup { public: LayoutObj theLayout; } class SomeClass { public: LayoutObj myLayout; SuperGroup myGroup; } During SomeClass's constructor, I want to set myGroup.theLayout to be pointing to So...

how to "return an object" in C++

Hello, I know the title sounds familiar as there are many similar questions, but I'm asking for a different aspect of the problem (I know the difference between having things on the stack and putting them on the heap). In Java I can always return references to "local" objects public Thing calculateThing() { Thing thing = new Thing(...

Pointers concept

In C++, what is the difference between: void func(MyType&); // declaration //... MyType * ptr; func(*ptr); // compiler doesnt give error func(ptr); // compiler gives error i thought & represents memory address so // this statement should correct as ptr is only a pointer // or address of some real var. ...

Outlook macro to search mails for text strings

I'm looking to search my emails for particular bits of text (or sender name) to be able to do things to those mails afterwards (i.e. delete, move to folder, remove content, etc.) Being an Outlook macro newbie, where should I start? Any ideas/pointers on the above or useful reference web sites much appreciated. ...