Okay, so this probably sounds terribly nefarious, but I need such capabilities for my senior project. Essentially I'm tasked with writing something that will cut down outbound spam on a zombified pc through a system of packet interception and evaluation. We have a number of algorithms we'll use on the captured messages, but it's the actu...
In C++0x I would like to write a function like this:
template <typename... Types>
void fun(typename std::tuple<Types...> my_tuple) {
//Put things into the tuple
}
I first tried to use a for loop on int i and then do:
get<i>(my_tuple);
And then store some value in the result. However, get only works on constexpr.
If I could get...
Microsoft WPF? Adobe AIR/Flex? Adobe Flash? Curl programming language?
How does AJAX fit in?
Given a server written in C++ .NET.
...
I am working on a legacy project in VC++/Win32/MFC. Recently it became a requirement that the application work on a tablet pc, and this ushered in a host of new issues.
I have been able to work with, and around these issues, but am left with one wherein I could use some expert suggestions.
I have a particular bug that is induced by the ...
While refactoring some old code I have stripped out a number of public methods that should actually of been statics as they a) don't operate on any member data or call any other member functions and b) because they might prove useful elsewhere.
This led me to think about the best way to group 'helper' functions together. The Java/C# wa...
I've started refactoring some legacy code recently and came across two functions for drawing a coordinate grid, the problem is that these functions differ only in orthogonal variables they treat, something like that
void DrawScaleX(HDC dc, int step, int x0, int x1, int y0, int y1)
{
for(int x = x0; x < x1; x += step)
{
...
There is a Microsoft knowledge base article with sample code to open all mailboxes in a given information store. It works so far (requires a bit of copy & pasting on compilers newer than VC++ 6.0).
At one point it calls IExchangeManageStore::GetMailboxTable with the distinguished name of the information store. For the Exchange 2007 Tria...
I'm working an a very large scale projects, where the compilation time is very long. What tools can I use (preferably open source) on Linux, to find the most heavily included files and that optimize their useages?
Just to be clearer, I need a tool which will, given the dependencies, show me which headers are the most included. By the way...
What free and commercial garbage collection libraries are available for C++, and what are the pros and cons of each?
I am interested in hard-won lessons from actual use in the field, not marketing or promotional blurb.
There is no need to elaborate on the usual trade offs associated with automatic garbage collection, but please do ment...
I'm desperately looking for cheap ways to lower the build times on my home PC. I just read an article about disabling the Last Access Time attribute of a file on Windows XP, so that simple reads don't write anything back to disk.
It's really simple too. At a DOS-prompt write:
fsutil behavior set disablelastaccess 1
Has anyone ...
We're using the Eclipse CDT 5 C++ IDE on Windows to develop a C++ application on a remote AIX host.
Eclipse CDT has the ability to perform remote debugging using gdbserver. Unfortunately, gdbserver is not supported on AIX.
Is anyone familiar with a way to debug remotely using Eclipse CDT without gdbserver? Perhaps using an SSH shell ...
I am using mysql++ in order to connect to a MySQL database to perform a bunch of data queries. Due to the fact that the tables I am reading from are constantly being written to, and that I need a consistent view of the data, I lock the tables first. However, MySQL has no concept of 'NOWAIT' in its lock query, thus if the tables are locke...
For many questions, especially for C-related ones, the answer seems to be found in "the standard". However, where do we find that - online?
Googling can sometimes feel futile, again especially for the C standards, since they are drowned in the flood of discussions on programming forums ;)
To get this started, since these are the ones I...
Is it possible in standard C++ to print a variable type. I think this is being addressed in C++0x but not sure it already exists.
I would like something like this:
int a = 12;
cout << typeof(a) << endl;
That would print:
int
...
I knew G3D, but it seems to me too much heavy. I want to know some light library which able to generate basic bar or pie charts.
...
Newer ARM processors include the PLD and PLI instructions.
I'm writing tight inner loops (in C++) which have a non-sequential memory access pattern, but a pattern that naturally my code fully understands. I would anticipate a substantial speedup if I could prefetch the next location whilst processing the current memory location, and I ...
I was checking out Intel's "whatif" site and their Transactional Memory compiler (each thread has to make atomic commits or rollback the system's memory, like a Database would).
It seems like a promising way to replace locks and mutexes but I can't find many testimonials. Does anyone here have any input?
...
I have a template class that I serialize (call it C), for which I want to specify a version for boost serialization. As BOOST_CLASS_VERSION does not work for template classes. I tried this:
namespace boost {
namespace serialization {
template< typename T, typename U >
struct version< C<T,U> >
{
typedef mpl::int_<1> t...
Hello
We need to programatically burn files to CD in a C\C++ Windows XP/Vista application we are developing using Borlands Turbo C++.
What is the simplest and best way to do this? We would prefer a native windows API (that doesnt rely on MFC) so as not to rely on any third party software/drivers if one is available.
Any good examples ...
What is the preferred way to remove spaces from a string in C++? I could loop through all the characters and build a new string, but is there a better way?
...