29 Topics
| |
I am parsing below sample file in below code snippet. {"requestType":"INVOCATION", "hostName":"localhost", "serviceName":"bucky", "serviceType":"DISCRETE", "serviceParameters":"sampleData", "servicesList" :[ { "serviceName" : "ABC", "serviceParameters" : {"para1" : "value1", "para2" : "value2", "para3" : "value3"} }, {"serviceName" : "CBA", "serviceParameters" : { "para1" : "value90", "para2" : "value", "para3" : "value"} } ], … | |
In below code i am writing file contents in backup serialize file through boost serialization library, but what i observed that every time i need to store all the data in file then only i would be able to read the entire data. so in case if i perform single … | |
I'm trying to develop an app that realises the communication between a gameserver and an applcation. My code so far is: #include <cstdlib> #include <iostream> #include <boost/bind.hpp> #include <boost/asio.hpp> #include <boost/asio/ssl.hpp> using namespace std; enum { max_length = 1024 }; class client { public: boost::asio::streambuf receive_buffer; client(boost::asio::io_service& io_service, boost::asio::ssl::context& context, … | |
Is there any program for boosting my headphones i have searched on internet but all i get is the same steps (right click on volume>Playback Devices > Properties>Enhacements> Enable Sound Equalizer) | |
Hi, I have the following map : listOfPolicyRuleInfo CPCRF::m_mlistOfCliConfiguredPolicyRules; where typedef map<string, PolicyRuleInfo> listOfPolicyRuleInfo; where PolicyRuleInfo is a struct struct PolicyRuleInfo{ BearerQoSInfo stBearerQoS; TFTInfo stTFTInfo; PolicyRuleInfo(){}; PolicyRuleInfo( BearerQoSInfo const& qos, TFTInfo const& tft) : stBearerQoS(qos), stTFTInfo(tft) { } }; listOfPolicyRuleInfo m_mlistOfCliConfiguredPolicyRules = boost::assign::map_list_of("PolicyRule_Fred", PolicyRuleInfo( BearerQoSInfo(9), TFTInfo())) ("PolicyRule_Voice_C", PolicyRuleInfo( BearerQoSInfo(5), TFTInfo())) … | |
The problem is that i can't manage to compile the simplest (int main(){}) boost asio program with Code Blocks. I'm using Windows 7. Googling gave me some controversial suggestions: 1) to add -lwsock32 key - Done(Compiler settings->Other options-> -lwsock32) 2) to link with ws2_32.dll and wsock32.dll - Done (Linker settings->paths … | |
Hi Kind-DaniWebbers, How do you initialise a boost::archive:binary_oarchive in a different place to where you declare it? So: class CBase { std::ofstream m_ofs; boost::archive:binary_oarchive m_binOA(); // <== default constructor virtual void Open(std::string& s) = delete; }; class CDerived : CBase { void Open(std::string& s) override { CBase::m_ofs("filename.bin", std::ios::binary); CBase::m_binOA(CBase::m_ofs, /*flags*/); … | |
Hello, I am currently trying to use boost asio for IPC. I ran into 2 strange issues: 1) when using the acceptor class, when I bring my process up, I get the error 'Already open' when trying to listen. The port I am trying to bind to is definitely not … | |
I've implimented this snippet of code dijkstra_shortest_paths( g, name2v[tempName1], get(&VertexProperty::predecessor, g), get(&VertexProperty::distance, g), get(&EdgeProperty::weight, g), boost::identity_property_map(), // index-map std::less<double>(), // compare std::plus<double>(), // combine std::numeric_limits<double>::infinity(), // infinity 0.0, // zero do_nothing_dijkstra_visitor(), get(&VertexProperty::color, g)); to use dijkstra's on a map created from a text file, but I have no idea how … | |
I currently have a program that can take a text file and inport the data that I need (names or locations as well as the distances between them) and I need to take that data and for a graph in boost so that I can do one of three things, … | |
I have 2 processes (producer and consumer) sharing an int deque in shared memory, I have the producer process put 2 numbers in the deque and then it gets in a wait state losing its mutex lock. I then have the consumer process removing the numbers and printing them. It … | |
Hello everyone, New here to the forum. Just wanted to introduce my business to the community: ThousandLikes.com . We offer solutions to increase social presense of your business. We offer your facebook page fans, youtube video views, twitter followers. Happy to be part of the community. Drop me an e-mail … | |
My laptop has only 257MB RAM, so it does works soo slowly, it always hangs, I heard that windows users can increase RAM space with pendrive... I know it works windows 7 but does it work in XP ?? and Does hardrive memory also slow down your computer ? | |
0 down vote favorite I have a huge vector of boost dynamic_bitset. I want to write the dynamic_bitset vector to a file and later read the file back into a dynamic_bitset vector. Is the memory for dynamic_bitset allocated as a contiguous block of memory (so that I can write the … | |
Hey all, I usuallly don't like asking for help on these sites but I have been kicking myself for a while now implementing boost regex for a program (i have never had any prior issues). I believe the issue is with my regex syntax but i have tried numerous variations … | |
Hello I'm trying to read files of file extension .obj or .txt and for certain characters using boost iostreams How would I implement that using this current code as a basis [CODE] typedef ex::container_source<string> string_source; string input = "hello"; string output; io::stream<string_source> in(input); getline(in, output); assert(input == output); cout << … | |
I need helping trying to retrieve data held in a [CODE]std::list<boost::shared_ptr<boost::any>>[/CODE] I am working on a Singleton Controller class with a private [B]std::list[/B]. Client class(es) will be able to [B]Add/Remove/Edit[/B] concrete class objects to be used by the program through this Controller class. The reason for using [B]boost::shared_ptr[/B] is because … | |
Hi, I have a problem with linking boost libraries in codeblocks using gcc 4.6.1. I'm getting following errors: undefined reference to `vtable for boost::unit_test::unit_test_log_t' How can I solve it? | |
Hey, I have a set of types which are all arithmetic (have operators for addition, subtraction, multiplication, etc.). I want to aggregate any number of them into a single object, so I'm using the std::tuple class template and the <tuple> library (and Boost.Tuple for backward compatibility). My question is a … | |
Anyone who knows how I can download boost library manual in zipped html chm or pdf? I'm not always working with internet and I will be working with some boost libs(latest). Thanks | |
Hi Daniweb, I've been programming a base class resource manager for a game I'm working on, and so read up on boost's shared_ptr and weak_ptr. I'm done with it and it works and I would really appreciate some feedback on my choice of implementation and design. Am I using the … | |
[CODE]Server::Server(boost::asio::io_service& io_service,std::string ip,short port,std::shared_ptr<ConnectionFactory> factory) : acceptor_(io_service, boost::asio::ip::tcp::endpoint(boost::asio::ip::address_v4::from_string(ip.data()), port)){ m_factory = factory; start_accept(); std::cout<<"Socket accepting connections..."<<std::endl; } Server::~Server() { } void Server::start_accept(){ boost::asio::io_service io_service; std::shared_ptr<Connection> conn = m_factory->create(io_service); acceptor_.async_accept(conn->socket(), boost::bind(&Server::handle_accept, this,conn, boost::asio::placeholders::error)); } void Server::handle_accept(std::shared_ptr<Connection> conn,const boost::system::error_code& error){ if (!error) { std::cout<<"on connected"<<std::endl; conn->OnConnected(); start_accept(); } } [/CODE] when i … | |
[CODE]class Connection { public: typedef boost::shared_ptr<Connection> pointer; static pointer create(boost::asio::io_service& io_service){return pointer(new Connection(io_service));} explicit Connection(boost::asio::io_service& io_service); virtual ~Connection(); boost::asio::ip::tcp::socket& socket(); -->>>virtual void OnConnected()=0; void Send(uint8_t* buffer, int length); bool Receive(); private: void handler(const boost::system::error_code& error, std::size_t bytes_transferred ); boost::asio::ip::tcp::socket socket_; };[/CODE] when am trying to use virtual void OnConnected()=0; it … | |
is there is a tutorial about how to use boost:asio how to send how to recive , coz all the tutorials i checked is only showin me an example of server source or a client source. so please if there is one link me to it thnx alot :) | |
[code] std::tr1::array<double, 10> alpha; std::iota(alpha.begin(), alpha.end(), 0); using namespace boost::accumulators; size_t const SIZE = 1000000; accumulator_set<double, stats<tag::mean, tag::lazy_variance > > acc; std::for_each(alpha.begin(), alpha.end(), [&](double const VALUE){ acc(VALUE);}); [/code] How could I clear the contents of the acc if I want to evaluate a new mean and variance? Thank you very … | |
I try to transmit an OpenCV IplImage from a Server (Ubuntu x64) to a Client (Win7 x64) The following code works fine if both (Client and Server) are on the same operating system. But when the server is on Ubuntu and the client on Win7 it doesn't work. The image … | |
Is there a way to add months and their respective days in my + operator?[code]Date operator + (Date const& dt, Month const& m) { jdn_type months_to_add = m.month_; jdn_type days_to_add; gregorian_type g = dt.gregorian(); long d = std::get<1>(g); if(d == 1){ days_to_add = 31*m.month_; } else if(d == 2){ days_to_add … | |
Is it the boost library? Regex in particular? I have searched and searched, but this is all I could come up with. If this is the correct library, then how do I get it to work in Dev-C++? I managed to add all the boost .h files to my Dev-C++ … | |
Hi guys, Im working on a small console app to seek out all those pesky and disk consuming .ncb files and debug folders left from VS and destroy them so the space i need to backup the files is considerably reduced. I have got my recusrion algorithm to scan as … |
The End.