verbose

How to capture a Powershell CmdLet's verbose output when the CmdLet is programmatically Invoked from C#

BACKGROUND I am using Powershell 2.0 on Windows 7. I am writing a cmdlet in a Powershell module ("module" is new to Powershell 2.0). To test the cmdlet I am writing Unit tests in Visual Studio 2008 that programmatically invoke the cmdlet. REFERENCE This Article on MSDN called "How to Invoke a Cmdlet from Within a Cmdlet" shows how ...

What is good practice for generating verbose output?

what is good practice for generating verbose output? currently, i have a function bool verbose; int setVerbose(bool v) { errormsg = ""; verbose = v; if (verbose == v) return 0; else return -1; } and whenever i want to generate output, i do something like if (debug) std::cout << "deleting interp" << std:...

Can gcc be configured to not print out a full path in warning/error messages?

When gcc prints out a warning or error, it shows the full path of the file that contains the error. Is there a flag to shorten the output to just the filename? ...

How can I get access to a Django Model field verbose name dynamically ?

I'd like to have access to one my model field verbose_name. I can get it by the field indice like this model._meta._fields()[2].verbose_name but I need to get it dynamically. Ideally it would be something like this model._meta._fields()['location_x'].verbose_name I've looked at a few things but I just can't find it. ...

How to know if your Unit Test Fixture is “right-sized”?

How do you know if you "Test Fixture" is right-sized. And by "Test Fixture" I mean a class with a bunch of tests in it. One thing that I've always noticed with my test fixtures is that they get to be kind of verbose; seeing as they could also be not verbose enough, how do you get a sense of when your unit tests are the right size? My ...

Adding data to an NSDictionary... SRSLY? Isn't there a quicker way?

I'm from a Flash ActionScript background. Where I'm from, I can set a dictionary-like object like this: var data:Object = {startPoint:5, endPoint:12}; So coming to Objective-C, I was surprised to discover that the equivalent to this appears to be: NSMutableDictionary *data = [NSMutableDictionary dictionary]; [data setObject:[NSNumber...