I'm having a hard time enabling git colored output on windows when using console2.
To trick git I've already SET TERM = 'cygwin'. This enabled the colors from a standard cmd.exe prompt but not in console2. I've verified that console2 can see the env var as well.
Anyone know how to get this working?
...
First some background. I'm parsing a simple file format, and wish to re-use the results in python code later, so I made a very simple class hierarchy and wrote the parser to construct objects from the original records in the text files I'm working from.
At the same time I'd like to load the data into a legacy database, the loader files ...
I'm writing a command-line tool for Mac OS X that processes a bunch of files. I would like to show the user the current file being processed, but do not want a bazillion files polluting the terminal window.
Instead I would like to use a single line to output the file path, then reuse that line for the next file. Is there a character (or...
In C++:
int main()
{
cout << setfill('#') << setw(10) << 5 << endl;
return 0;
}
Outputs:
#########5
Is there any setfill() alternative for C? Or how to do this in C without manually creating the string?
Thanks in advance.
...
Output or Input filtering?
I constantly see people writing "filter you inputs", "sanitize your inputs", don't trust user data, but I only agree with the last one, where I consider trusting any external data a bad idea even if it is internal relative to the system.
Input filtering:
The most common that I see.
Take the form post data or ...
I have a TraceSource object that I use to log the initialization of a VB.Net application. It has several TraceListeners attached:
ConsoleTraceListener
TextWriterTraceListener
EventLogTraceListener
For the first two I want the entry output to be "raw" - that is, without the standard header:
SourceName TraceEventType: Id :
I have im...