If I do date +%H-%M-%S on the commandline (Debian/Lenny), I get a user-friendly (not UTC, not DST-less, the time a normal person has on their wristwatch) time printed.
What's the simplest way to obtain the same thing with boost::date_time ?
If I do this:
std::ostringstream msg;
boost::local_time::local_date_time t =
boost::local_t...
Hi there,
For my bachelors thesis, I am implementing a distributed version of an algorithm for factoring large integers (finding the prime factorisation). This has applications in e.g. security of the RSA cryptosystem.
My vision is, that clients (linux or windows) will download an application and compute some numbers (these are indepen...
Hi,
I am writing an application which requires me to use another file system and file engine handlers and not the qt's default ones. Basically what I want to be able to do is to use qt's file dialog but have an underlying file system handler (for example built using boost file system library) of mine handling all the operations with reg...
Hi, all. I'm pretty new to C++, and I'm writing a small library (mostly for my own projects) in C++. In the process of designing a type hierarchy, I've run into the problem of defining the assignment operator.
I've taken the basic approach that was eventually reached in this article, which is that for every class MyClass in a hierarchy ...
I have a Visual Studio 2008 C++ application that does something like this:
template< typename Fcn >
inline void Bar( Fcn fcn ) // line 84
{
fcn();
};
template< typename Fcn >
inline void Foo( Fcn fcn )
{
// this works fine
Bar( fcn );
// this fails to compile
boost::bind( Bar, fcn )();
};
int main()
{
SYSTEM_...
I found one SOF http://www.codeproject.com/KB/library/SOF_.aspx ,
Are there anyother stable frameworks for modularization in C++ ?
...
Hi there,
In our compass mapping, we're boosting "better" documents to push them up in the list of search results. Something like this:
<boost name="boostFactor" default="1.0"/>
<property name="name"><meta-data>name</meta-data></property>
While this works fine for fulltext search, it does not when doing a field search, e.g. the boost...
I am trying to compile a package on ubuntu 8.1
when executing this command: ./configure I get the follwoing error:
checking for Boost headers version >= 103700... no
configure: error: cannot find Boost headers version >= 103700
knowing that I installed needed boost packages using these command:
$ apt-get install libboost-dev libboost...
What is a good step by step explanation on how to use BOOST in an empty project in Visual Studio 2010.
...
void main()
{
typedef boost::ptr_map<int, char> MyMap;
//typedef std::map<int, char *> MyMap; // in contrast with std type it works
MyMap mymap;
mymap[1] = new char('a');
mymap[2] = new char('b');
mymap[3] = new char('c');
BOOST_FOREACH(MyMap::value_type value, mymap)
{
std::cout << value.first << " " << value....
I'm trying to use boost.python library in a C++ project (Windows + VS9) but it always tries to link against pyton25.lib.
Is it possible to link with version 2.6.x of python?
thanks
...
Suppose the following two functions:
#include <iostream>
#include <cstdlib> // atoi
#include <cstring> // strcmp
#include <boost/bind.hpp>
bool match1(const char* a, const char* b) {
return (strcmp(a, b) == 0);
}
bool match2(int a, const char* b) {
return (atoi(b) == a);
}
Each of these functions takes two arguments, but can...
I am reluctant to say I can't figure this out, but I can't figure this out. I've googled and searched Stack Overflow, and come up empty.
The abstract, and possibly overly vague form of the question is, how can I use the traits-pattern to instantiate member functions? [Update: I used the wrong term here. It should be "policies" rather ...
hello.
Is it possible to have scoped macros using custom defined macros through boost wave?
I know it should a possible with C++0x however I am working with regular C++.
If it is possible, can you provide link or reference how to accomplish this?
Thanks
...
I am tackling the challenge of using both the capabilities of a 8 core machine and a high-end GPU (Tesla 10).
I have one big input file, one thread for each core, and one for the the GPU handling.
The Gpu thread, to be efficient, needs a big number of lines from the input, while
the Cpu thread needs only one line to proceed (storing mul...
Hi,
After combing through the Boost::Interprocess documentation and Google searches, I think I've found the reason/workaround to my issue. Everything I've found, as I understand it, seems to be hinting at this, but doesn't come out and say "do this because...". But if anyone can verify this I would appreciate it.
I'm writing a series...
I'm programming an agent-based simulation and have decided that Boost's MultiIndex is probably the most efficient container for my agents. I'm not a professional programmer, and my background is very spotty. I've two questions:
Is it better to have the container contain the agents (of class Host) themselves, or is it more efficient fo...
I currently have the following code:
using boost::bind;
typedef boost::signal<void(EventDataItem&)> EventDataItemSignal;
class EventDataItem
{
...
EventDataItemSignal OnTrigger;
...
}
typedef std::list< shared_ptr<EventDataItem> > DataItemList;
typedef std::list<boost::signals::connection> ConnectionList;
class MyClass
{
void OnSta...
I am working on a research project that deals with social networks. I have done most of the backbone of the program in C++ and am now wanting to implement a way to create the graph of nodes and the connections as well as a way to visualize the connections between people. I have looked a little into Lemon and the Boost graph library, but ...
Greetings all,
I'm trying to implement middleware (driver) for an embedded device with generic communication media layer. Not sure what is the best way to do it so I'm seeking an advice from more experienced stackoverflow users:). Basically we've got devices around the country communicating with our servers (or a pda/laptop in used in f...