Search Results

Search found 36715 results on 1469 pages for 'boost string'.

Page 11/1469 | < Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >

  • How Important is Boost to Learn for C++ Developers

    - by mahesh
    I am curious to learn Boost. But i wanted to ask how important it is to learn. What pre-requisite one should need before jumping on Boost. Why i am curious to know about Boost is that many people are talking about Boost on IRC's channels and here in StackOverflow. Thanks in advance.

    Read the article

  • How to remove compiler flag when building Boost

    - by mlo
    I need to build Boost with a non-standard set of flags (due to a conflict between Boost threading and C++/CLI). I'm adding the required flag (/clr) using CXXFLAGS, but this flag conflicts with the Boost default /EHs flag (/clr implies /EHa which is incompatible with /EHs), so that needs to be suppressed. Is there a mechanism like CXXFLAGS to suppress a default Boost flag or must I edit all of the compiler specification files by hand?

    Read the article

  • Signals and threads - good or bad design decision?

    - by Jens
    I have to write a program that performs highly computationally intensive calculations. The program might run for several days. The calculation can be separated easily in different threads without the need of shared data. I want a GUI or a web service that informs me of the current status. My current design uses BOOST::signals2 and BOOST::thread. It compiles and so far works as expected. If a thread finished one iteration and new data is available it calls a signal which is connected to a slot in the GUI class. My question(s): Is this combination of signals and threads a wise idea? I another forum somebody advised someone else not to "go down this road". Are there potential deadly pitfalls nearby that I failed to see? Is my expectation realistic that it will be "easy" to use my GUI class to provide a web interface or a QT, a VTK or a whatever window? Is there a more clever alternative (like other boost libs) that I overlooked? following code compiles with g++ -Wall -o main -lboost_thread-mt <filename>.cpp code follows: #include <boost/signals2.hpp> #include <boost/thread.hpp> #include <boost/bind.hpp> #include <iostream> #include <iterator> #include <string> using std::cout; using std::cerr; using std::string; /** * Called when a CalcThread finished a new bunch of data. */ boost::signals2::signal<void(string)> signal_new_data; /** * The whole data will be stored here. */ class DataCollector { typedef boost::mutex::scoped_lock scoped_lock; boost::mutex mutex; public: /** * Called by CalcThreads call the to store their data. */ void push(const string &s, const string &caller_name) { scoped_lock lock(mutex); _data.push_back(s); signal_new_data(caller_name); } /** * Output everything collected so far to std::out. */ void out() { typedef std::vector<string>::const_iterator iter; for (iter i = _data.begin(); i != _data.end(); ++i) cout << " " << *i << "\n"; } private: std::vector<string> _data; }; /** * Several of those can calculate stuff. * No data sharing needed. */ struct CalcThread { CalcThread(string name, DataCollector &datcol) : _name(name), _datcol(datcol) { } /** * Expensive algorithms will be implemented here. * @param num_results how many data sets are to be calculated by this thread. */ void operator()(int num_results) { for (int i = 1; i <= num_results; ++i) { std::stringstream s; s << "["; if (i == num_results) s << "LAST "; s << "DATA " << i << " from thread " << _name << "]"; _datcol.push(s.str(), _name); } } private: string _name; DataCollector &_datcol; }; /** * Maybe some VTK or QT or both will be used someday. */ class GuiClass { public: GuiClass(DataCollector &datcol) : _datcol(datcol) { } /** * If the GUI wants to present or at least count the data collected so far. * @param caller_name is the name of the thread whose data is new. */ void slot_data_changed(string caller_name) const { cout << "GuiClass knows: new data from " << caller_name << std::endl; } private: DataCollector & _datcol; }; int main() { DataCollector datcol; GuiClass mc(datcol); signal_new_data.connect(boost::bind(&GuiClass::slot_data_changed, &mc, _1)); CalcThread r1("A", datcol), r2("B", datcol), r3("C", datcol), r4("D", datcol), r5("E", datcol); boost::thread t1(r1, 3); boost::thread t2(r2, 1); boost::thread t3(r3, 2); boost::thread t4(r4, 2); boost::thread t5(r5, 3); t1.join(); t2.join(); t3.join(); t4.join(); t5.join(); datcol.out(); cout << "\nDone" << std::endl; return 0; }

    Read the article

  • Trim a string in C

    - by Orion Edwards
    Briefly: I'm after the equivalent of .NET's String.Trim in C using the win32 and standard C api (compiling with MSVC2008 so I have access to all the C++ stuff if needed, but I am just trying to trim a char*). Given that there is strchr, strtok, and all manner of other string functions, surely there should be a trim function, or one that can be repurposed... Thanks

    Read the article

  • Regarding Java String dollar to cents conversion

    - by arav
    I have a java string which has an dollar value and cents value after decimal points and starting with a + or - sign. I want to convert into cents and store it in a integer (it can have + or -). Also i need to check if the cents part (after decimal point) not more than 2 digits and throw an error message if exists example : String dollval= "12.23" ,"12","-0.09", "-99","-99.0", "-99.23","0.00" int dollint = 1223,12,-9,-99,-00,-9923,0

    Read the article

  • Sql Server string to date conversion

    - by JosephStyons
    I want to convert a string like this: '10/15/2008 10:06:32 PM' into the equivalent DATETIME value in Sql Server. In Oracle, I would say this: TO_DATE('10/15/2008 10:06:32 PM','MM/DD/YYYY HH:MI:SS AM') This question implies that I must parse the string into one of the standard formats, and then convert using one of those codes. That seems ludicrous for such a mundane operation. Is there an easier way?

    Read the article

  • Finding out why Dell Controler is Degraded

    - by Kyle Brandt
    I installed open manage on a couple of my PE 2950s for snmp monitoring of the RAID. All the checks seem to come back okay except for controllerState: [root@aMachine ~]# snmpwalk -v 2c -c bestNotToPostPasswords myMachine -m +StorageManagement-MIB controllerstate StorageManagement-MIB::controllerState.1 = INTEGER: degraded(6) Other checks seems to indicate the battery, LD, and physicals disks are all good unless I missing something. Can anyone tell if I am missing something or neglecting something import in my RAID monitoring/understanding? I get degraded for both these servers I have set up. A walk of the entire storage management tree for on of them: StorageManagement-MIB::softwareVersion.0 = STRING: "3.2.0" StorageManagement-MIB::globalStatus.0 = INTEGER: warning(2) StorageManagement-MIB::softwareManufacturer.0 = STRING: "Dell Inc." StorageManagement-MIB::softwareProduct.0 = STRING: "Server Administrator (Storage Management)" StorageManagement-MIB::softwareDescription.0 = STRING: "Configuration and monitoring of disk storage devices." StorageManagement-MIB::displayName.0 = STRING: "Server Administrator (Storage Management)" StorageManagement-MIB::description.0 = STRING: "Configuration and monitoring of disk storage devices." StorageManagement-MIB::agentVendor.0 = STRING: "Dell Inc." StorageManagement-MIB::agentTimeStamp.0 = INTEGER: 1273842310 StorageManagement-MIB::agentGetTimeout.0 = INTEGER: 5 StorageManagement-MIB::agentModifiers.0 = INTEGER: 0 StorageManagement-MIB::agentRefreshRate.0 = INTEGER: 300 StorageManagement-MIB::agentMibVersion.0 = STRING: "3.2" StorageManagement-MIB::agentManagementSoftwareURLName.0 = "" StorageManagement-MIB::agentGlobalSystemStatus.0 = INTEGER: nonCritical(4) StorageManagement-MIB::agentLastGlobalSystemStatus.0 = INTEGER: ok(3) StorageManagement-MIB::agentSmartThermalShutdown.0 = INTEGER: notApplicable(3) StorageManagement-MIB::controllerNumber.1 = INTEGER: 1 StorageManagement-MIB::controllerName.1 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::controllerVendor.1 = STRING: "DELL" StorageManagement-MIB::controllerType.1 = INTEGER: sas(6) StorageManagement-MIB::controllerState.1 = INTEGER: degraded(6) StorageManagement-MIB::controllerRebuildRateInPercent.1 = INTEGER: 30 StorageManagement-MIB::controllerFWVersion.1 = STRING: "5.0.2-0003" StorageManagement-MIB::controllerCacheSizeInMB.1 = INTEGER: 256 StorageManagement-MIB::controllerCacheSizeInBytes.1 = INTEGER: 0 StorageManagement-MIB::controllerPhysicalDeviceCount.1 = INTEGER: 5 StorageManagement-MIB::controllerLogicalDeviceCount.1 = INTEGER: 1 StorageManagement-MIB::controllerRollUpStatus.1 = INTEGER: nonCritical(4) StorageManagement-MIB::controllerComponentStatus.1 = INTEGER: nonCritical(4) StorageManagement-MIB::controllerNexusID.1 = STRING: "\\0" StorageManagement-MIB::controllerAlarmState.1 = INTEGER: disabled(2) StorageManagement-MIB::controllerDriverVersion.1 = STRING: "00.00.03.05 " StorageManagement-MIB::controllerPCISlot.1 = STRING: "embedded" StorageManagement-MIB::controllerClusterMode.1 = INTEGER: notApplicable(99) StorageManagement-MIB::controllerMinFWVersion.1 = STRING: "5.2.1-0067" StorageManagement-MIB::controllerMinDriverVersion.1 = STRING: "00.00.03.21" StorageManagement-MIB::controllerChannelCount.1 = INTEGER: 2 StorageManagement-MIB::controllerReconstructRate.1 = INTEGER: 30 StorageManagement-MIB::controllerPatrolReadRate.1 = INTEGER: 30 StorageManagement-MIB::controllerBGIRate.1 = INTEGER: 30 StorageManagement-MIB::controllerCheckConsistencyRate.1 = INTEGER: 30 StorageManagement-MIB::controllerPatrolReadMode.1 = INTEGER: automatic(1) StorageManagement-MIB::controllerPatrolReadState.1 = INTEGER: stopped(1) StorageManagement-MIB::controllerPatrolReadIterations.1 = INTEGER: 162 StorageManagement-MIB::controllerEntry.57.1 = INTEGER: 99 StorageManagement-MIB::controllerEntry.58.1 = INTEGER: 99 StorageManagement-MIB::channelNumber.1 = INTEGER: 1 StorageManagement-MIB::channelNumber.2 = INTEGER: 2 StorageManagement-MIB::channelName.1 = STRING: "Connector 0" StorageManagement-MIB::channelName.2 = STRING: "Connector 1" StorageManagement-MIB::channelState.1 = INTEGER: ready(1) StorageManagement-MIB::channelState.2 = INTEGER: ready(1) StorageManagement-MIB::channelRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::channelRollUpStatus.2 = INTEGER: ok(3) StorageManagement-MIB::channelComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::channelComponentStatus.2 = INTEGER: ok(3) StorageManagement-MIB::channelNexusID.1 = STRING: "\\0\\0" StorageManagement-MIB::channelNexusID.2 = STRING: "\\0\\1" StorageManagement-MIB::channelBusType.1 = INTEGER: sas(8) StorageManagement-MIB::channelBusType.2 = INTEGER: sas(8) StorageManagement-MIB::enclosureNumber.1 = INTEGER: 1 StorageManagement-MIB::enclosureName.1 = STRING: "Backplane" StorageManagement-MIB::enclosureVendor.1 = STRING: "DELL" StorageManagement-MIB::enclosureState.1 = INTEGER: ready(1) StorageManagement-MIB::enclosureProductID.1 = STRING: "BACKPLANE " StorageManagement-MIB::enclosureType.1 = INTEGER: internal(1) StorageManagement-MIB::enclosureChannelNumber.1 = INTEGER: 0 StorageManagement-MIB::enclosureRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::enclosureComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::enclosureNexusID.1 = STRING: "\\0\\0\\0" StorageManagement-MIB::enclosureFirmwareVersion.1 = STRING: "1.00" StorageManagement-MIB::enclosureSASAddress.1 = STRING: "50019090B4C67200" StorageManagement-MIB::arrayDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskName.1 = STRING: "Physical Disk 0:0:0" StorageManagement-MIB::arrayDiskName.2 = STRING: "Physical Disk 0:0:1" StorageManagement-MIB::arrayDiskName.3 = STRING: "Physical Disk 0:0:2" StorageManagement-MIB::arrayDiskName.4 = STRING: "Physical Disk 0:0:3" StorageManagement-MIB::arrayDiskVendor.1 = STRING: "DELL " StorageManagement-MIB::arrayDiskVendor.2 = STRING: "DELL " StorageManagement-MIB::arrayDiskVendor.3 = STRING: "DELL " StorageManagement-MIB::arrayDiskVendor.4 = STRING: "DELL " StorageManagement-MIB::arrayDiskState.1 = INTEGER: online(3) StorageManagement-MIB::arrayDiskState.2 = INTEGER: online(3) StorageManagement-MIB::arrayDiskState.3 = INTEGER: online(3) StorageManagement-MIB::arrayDiskState.4 = INTEGER: online(3) StorageManagement-MIB::arrayDiskProductID.1 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskProductID.2 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskProductID.3 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskProductID.4 = STRING: "ST3146755SS " StorageManagement-MIB::arrayDiskSerialNo.1 = STRING: "3LN0LRL0 " StorageManagement-MIB::arrayDiskSerialNo.2 = STRING: "3LN0JYJS " StorageManagement-MIB::arrayDiskSerialNo.3 = STRING: "3LN0LR0V " StorageManagement-MIB::arrayDiskSerialNo.4 = STRING: "3LN0JH97 " StorageManagement-MIB::arrayDiskRevision.1 = STRING: "T106" StorageManagement-MIB::arrayDiskRevision.2 = STRING: "T106" StorageManagement-MIB::arrayDiskRevision.3 = STRING: "T106" StorageManagement-MIB::arrayDiskRevision.4 = STRING: "T106" StorageManagement-MIB::arrayDiskEnclosureID.1 = STRING: "0" StorageManagement-MIB::arrayDiskEnclosureID.2 = STRING: "0" StorageManagement-MIB::arrayDiskEnclosureID.3 = STRING: "0" StorageManagement-MIB::arrayDiskEnclosureID.4 = STRING: "0" StorageManagement-MIB::arrayDiskChannel.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskChannel.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskChannel.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskChannel.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInMB.1 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInMB.2 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInMB.3 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInMB.4 = INTEGER: 139392 StorageManagement-MIB::arrayDiskLengthInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLengthInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInMB.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLargestContiguousFreeSpaceInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskTargetID.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskTargetID.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskTargetID.3 = INTEGER: 2 StorageManagement-MIB::arrayDiskTargetID.4 = INTEGER: 3 StorageManagement-MIB::arrayDiskLunID.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLunID.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskLunID.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskLunID.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInMB.1 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInMB.2 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInMB.3 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInMB.4 = INTEGER: 139392 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskUsedSpaceInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInMB.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskFreeSpaceInBytes.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskBusType.1 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskBusType.2 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskBusType.3 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskBusType.4 = INTEGER: sas(8) StorageManagement-MIB::arrayDiskSpareState.1 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskSpareState.2 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskSpareState.3 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskSpareState.4 = INTEGER: notASpare(5) StorageManagement-MIB::arrayDiskRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskRollUpStatus.2 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskRollUpStatus.3 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskRollUpStatus.4 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.2 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.3 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskComponentStatus.4 = INTEGER: ok(3) StorageManagement-MIB::arrayDiskNexusID.1 = STRING: "\\0\\0\\0\\0" StorageManagement-MIB::arrayDiskNexusID.2 = STRING: "\\0\\0\\0\\1" StorageManagement-MIB::arrayDiskNexusID.3 = STRING: "\\0\\0\\0\\2" StorageManagement-MIB::arrayDiskNexusID.4 = STRING: "\\0\\0\\0\\3" StorageManagement-MIB::arrayDiskPartNumber.1 = STRING: "SG0DR2381253172FLRL0A00 " StorageManagement-MIB::arrayDiskPartNumber.2 = STRING: "SG0DR2381253172FJYJSA00 " StorageManagement-MIB::arrayDiskPartNumber.3 = STRING: "SG0DR2381253172FLR0VA00 " StorageManagement-MIB::arrayDiskPartNumber.4 = STRING: "SG0DR2381253172FJH97A00 " StorageManagement-MIB::arrayDiskSASAddress.1 = STRING: "5000C50002380201" StorageManagement-MIB::arrayDiskSASAddress.2 = STRING: "5000C50002385B89" StorageManagement-MIB::arrayDiskSASAddress.3 = STRING: "5000C50002385AA9" StorageManagement-MIB::arrayDiskSASAddress.4 = STRING: "5000C500023841E1" StorageManagement-MIB::arrayDiskSmartAlertIndication.1 = INTEGER: no(1) StorageManagement-MIB::arrayDiskSmartAlertIndication.2 = INTEGER: no(1) StorageManagement-MIB::arrayDiskSmartAlertIndication.3 = INTEGER: no(1) StorageManagement-MIB::arrayDiskSmartAlertIndication.4 = INTEGER: no(1) StorageManagement-MIB::arrayDiskManufactureDay.1 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureDay.2 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureDay.3 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureDay.4 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.1 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.2 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.3 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureWeek.4 = STRING: "07" StorageManagement-MIB::arrayDiskManufactureYear.1 = STRING: "2005" StorageManagement-MIB::arrayDiskManufactureYear.2 = STRING: "2005" StorageManagement-MIB::arrayDiskManufactureYear.3 = STRING: "2005" StorageManagement-MIB::arrayDiskManufactureYear.4 = STRING: "2005" StorageManagement-MIB::arrayDiskMediaType.1 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskMediaType.2 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskMediaType.3 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskMediaType.4 = INTEGER: hdd(2) StorageManagement-MIB::arrayDiskEntry.36.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.36.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.36.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.36.4 = INTEGER: 1 StorageManagement-MIB::arrayDiskEntry.40.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.40.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.40.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.40.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.2 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.3 = INTEGER: 0 StorageManagement-MIB::arrayDiskEntry.41.4 = INTEGER: 0 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskEnclosureConnectionNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.1 = STRING: "Physical Disk 0:0:0" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.2 = STRING: "Physical Disk 0:0:1" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.3 = STRING: "Physical Disk 0:0:2" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskName.4 = STRING: "Physical Disk 0:0:3" StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskEnclosureConnectionArrayDiskNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.1 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.2 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.3 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureName.4 = STRING: "Backplane" StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionEnclosureNumber.4 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.1 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.2 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.3 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerName.4 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskEnclosureConnectionControllerNumber.4 = INTEGER: 1 StorageManagement-MIB::batteryNumber.1 = INTEGER: 1 StorageManagement-MIB::batteryName.1 = STRING: "Battery 0" StorageManagement-MIB::batteryVendor.1 = STRING: "DELL" StorageManagement-MIB::batteryState.1 = INTEGER: ready(1) StorageManagement-MIB::batteryRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::batteryComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::batteryNexusID.1 = STRING: "\\0\\0" StorageManagement-MIB::batteryPredictedCapacity.1 = INTEGER: ready(2) StorageManagement-MIB::batteryNextLearnTime.1 = INTEGER: 21 StorageManagement-MIB::batteryLearnState.1 = INTEGER: idle(16) StorageManagement-MIB::batteryEntry.13.1 = INTEGER: 0 StorageManagement-MIB::batteryMaxLearnDelay.1 = INTEGER: 168 StorageManagement-MIB::batteryConnectionNumber.1 = INTEGER: 1 StorageManagement-MIB::batteryConnectionBatteryName.1 = STRING: "Battery 0" StorageManagement-MIB::batteryConnectionBatteryNumber.1 = INTEGER: 1 StorageManagement-MIB::batteryConnectionControllerName.1 = STRING: "PERC 5/i Integrated" StorageManagement-MIB::batteryConnectionControllerNumber.1 = INTEGER: 1 StorageManagement-MIB::virtualDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::virtualDiskName.1 = STRING: "Virtual Disk 0" StorageManagement-MIB::virtualDiskDeviceName.1 = STRING: "/dev/sda" StorageManagement-MIB::virtualDiskState.1 = INTEGER: ready(1) StorageManagement-MIB::virtualDiskLengthInMB.1 = INTEGER: 278784 StorageManagement-MIB::virtualDiskLengthInBytes.1 = INTEGER: 0 StorageManagement-MIB::virtualDiskWritePolicy.1 = INTEGER: writeBack(3) StorageManagement-MIB::virtualDiskReadPolicy.1 = INTEGER: noReadAhead(5) StorageManagement-MIB::virtualDiskCachePolicy.1 = INTEGER: not-applicable(99) StorageManagement-MIB::virtualDiskLayout.1 = INTEGER: raid-10(10) StorageManagement-MIB::virtualDiskCurStripeSizeInMB.1 = INTEGER: 0 StorageManagement-MIB::virtualDiskCurStripeSizeInBytes.1 = INTEGER: 65536 StorageManagement-MIB::virtualDiskTargetID.1 = INTEGER: 0 StorageManagement-MIB::virtualDiskRollUpStatus.1 = INTEGER: ok(3) StorageManagement-MIB::virtualDiskComponentStatus.1 = INTEGER: ok(3) StorageManagement-MIB::virtualDiskNexusID.1 = STRING: "\\0\\0" StorageManagement-MIB::virtualDiskArrayDiskType.1 = INTEGER: sas(1) StorageManagement-MIB::virtualDiskEntry.23.1 = INTEGER: 2 StorageManagement-MIB::virtualDiskEntry.24.1 = INTEGER: 0 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskLogicalConnectionNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.1 = STRING: "Physical Disk 0:0:0" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.2 = STRING: "Physical Disk 0:0:1" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.3 = STRING: "Physical Disk 0:0:2" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskName.4 = STRING: "Physical Disk 0:0:3" StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.2 = INTEGER: 2 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.3 = INTEGER: 3 StorageManagement-MIB::arrayDiskLogicalConnectionArrayDiskNumber.4 = INTEGER: 4 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.1 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.2 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.3 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskName.4 = STRING: "Virtual Disk 0" StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.1 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.2 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.3 = INTEGER: 1 StorageManagement-MIB::arrayDiskLogicalConnectionVirtualDiskNumber.4 = INTEGER: 1

    Read the article

  • How can I build the Boost.Python example on Ubuntu 9.10?

    - by Gatlin
    I am using Ubuntu 9.10 beta, whose repositories contain boost 1.38. I would like to build the hello-world example. I followed the instructions here (http://www.boost.org/doc/libs/1%5F40%5F0/libs/python/doc/tutorial/doc/html/python/hello.html), found the example project, and issued the "bjam" command. I have installed bjam and boost-build. I get the following output: Jamroot:18: in modules.load rule python-extension unknown in module Jamfile</usr/share/doc/libboost1.38-doc/examples/libs/python/example>. /usr/share/boost-build/build/project.jam:312: in load-jamfile /usr/share/boost-build/build/project.jam:68: in load /usr/share/boost-build/build/project.jam:170: in project.find /usr/share/boost-build/build-system.jam:248: in load /usr/share/boost-build/kernel/modules.jam:261: in import /usr/share/boost-build/kernel/bootstrap.jam:132: in boost-build /usr/share/doc/libboost1.38-doc/examples/libs/python/example/boost-build.jam:7: in module scope I do not know enough about Boost (this is an exploratory exercise for myself) to understand why the python-extension macro in the included Jamroot is not valid. I am running this example from the install directory, so I have not altered the Jamroot's use-project setting. As a side question, if I were to just willy-nilly start a project in an arbitrary directory, how would I write my jamroot?

    Read the article

  • Solving a difficult incomplete type error

    - by ChAoS
    I get an incomplete type error when trying to compile my code. I know that it is related to includes, but my project is large and it uses several templates so I can't find which type is actually incomplete. The error message doesn't help either: Compiling: ../../../addons/ofxTableGestures/src/Graphics/objects/CursorFeedback.cpp In file included from ../../../addons/ofxTableGestures/ext/boost/fusion/include/invoke_procedure.hpp:10, from ../../../addons/ofxTableGestures/src/oscGestures/tuioApp.hpp:46, from /home/thechaos/Projectes/of_preRelease_v0061_linux_FAT/addons/../apps/OF-TangibleFramework/ofxTableGestures/src/Graphics/objects/CursorFeedback.hpp:35, from /home/thechaos/Projectes/of_preRelease_v0061_linux_FAT/addons/../apps/OF-TangibleFramework/ofxTableGestures/src/Graphics/objects/CursorFeedback.cpp:31: ../../../addons/ofxTableGestures/ext/boost/fusion/functional/invocation/invoke_procedure.hpp: In function ‘void boost::fusion::invoke_procedure(Function, const Sequence&) [with Function = void (tuio::CanBasicFingers<Graphic>::*)(long int, float, float, float, float, float), Sequence = boost::fusion::joint_view<boost::fusion::joint_view<boost::fusion::iterator_range<boost::fusion::vector_iterator<const boost::fusion::vector6<long int, float, float, float, float, float>, 0>, boost::fusion::vector_iterator<boost::fusion::vector6<long int, float, float, float, float, float>, 0> >, const boost::fusion::single_view<tuio::CanBasicFingers<Graphic>*> >, boost::fusion::iterator_range<boost::fusion::vector_iterator<boost::fusion::vector6<long int, float, float, float, float, float>, 0>, boost::fusion::vector_iterator<const boost::fusion::vector6<long int, float, float, float, float, float>, 6> > >]’: ../../../addons/ofxTableGestures/src/oscGestures/tuioApp.hpp:122: instantiated from ‘void tuio::AlternateCallback<C, M, E>::run(tuio::TEvent*) [with C = tuio::CanBasicFingers<Graphic>, M = void (tuio::CanBasicFingers<Graphic>::*)(long int, float, float, float, float, float), E = tuio::TeventBasicFingersMoveFinger]’ /home/thechaos/Projectes/of_preRelease_v0061_linux_FAT/addons/../apps/OF-TangibleFramework/ofxTableGestures/src/Graphics/objects/CursorFeedback.cpp:64: instantiated from here ../../../addons/ofxTableGestures/ext/boost/fusion/functional/invocation/invoke_procedure.hpp:88: error: incomplete type ‘boost::fusion::detail::invoke_procedure_impl<void (tuio::CanBasicFingers<Graphic>::*)(long int, float, float, float, float, float), const boost::fusion::joint_view<boost::fusion::joint_view<boost::fusion::iterator_range<boost::fusion::vector_iterator<const boost::fusion::vector6<long int, float, float, float, float, float>, 0>, boost::fusion::vector_iterator<boost::fusion::vector6<long int, float, float, float, float, float>, 0> >, const boost::fusion::single_view<tuio::CanBasicFingers<Graphic>*> >, boost::fusion::iterator_range<boost::fusion::vector_iterator<boost::fusion::vector6<long int, float, float, float, float, float>, 0>, boost::fusion::vector_iterator<const boost::fusion::vector6<long int, float, float, float, float, float>, 6> > >, 7, true, false>’ used in nested name specifier If I copy the conflictive code to a same file I can compile it. So I know that the code itself is OK, the problem is the way I instantiate it. How can I trace the origin of this error? Is there any way to get the trace of the c++ compiler and preprocessor to get more informative messages?

    Read the article

  • async_write/async_read problems while trying to implement question-answer logic

    - by Max
    Good day. I'm trying to implement a question - answer logic using boost::asio. On the Client I have: void Send_Message() { .... boost::asio::async_write(server_socket, boost::asio::buffer(&Message, sizeof(Message)), boost::bind(&Client::Handle_Write_Message, this, boost::asio::placeholders::error)); .... } void Handle_Write_Message(const boost::system::error_code& error) { .... std::cout << "Message was sent.\n"; .... boost::asio::async_read(server_socket_,boost::asio::buffer(&Message, sizeof(Message)), boost::bind(&Client::Handle_Read_Message, this, boost::asio::placeholders::error)); .... } void Handle_Read_Message(const boost::system::error_code& error) { .... std::cout << "I have a new message.\n"; .... } And on the Server i have the "same - logic" code: void Read_Message() { .... boost::asio::async_read(client_socket, boost::asio::buffer(&Message, sizeof(Message)), boost::bind(&Server::Handle_Read_Message, this, boost::asio::placeholders::error)); .... } void Handle_Read_Message(const boost::system::error_code& error) { .... std::cout << "I have a new message.\n"; .... boost::asio::async_write(client_socket_,boost::asio::buffer(&Message, sizeof(Message)), boost::bind(&Server::Handle_Write_Message, this, boost::asio::placeholders::error)); .... } void Handle_Write_Message(const boost::system::error_code& error) { .... std::cout << "Message was sent back.\n"; .... } Message it's just a structure. And the output on the Client is: Message was sent. Output on the Server is: I have a new message. And that's all. After this both programs are still working but nothing happens. I tried to implement code like: if (!error) { .... } else { // close sockets and etc. } But there are no errors in reading or writing. Both programs are just running normally, but doesn't interact with each other. This code is quite obvious but i can't understand why it's not working. Thanks in advance for any advice.

    Read the article

  • g++ linker error--typeinfo, but not vtable

    - by James
    I know the standard answer for a linker error about missing typeinfo usually also involves vtable and some virtual function that I forgot to actually define. I'm fairly certain that's not the situation this time. Here's the error: UI.o: In function boost::shared_ptr<Graphics::Widgets::WidgetSet>::shared_ptr<Graphics::Resource::GroupByState>(boost::shared_ptr<Graphics::Resource::GroupByState> const&, boost::detail::dynamic_cast_tag)': UI.cpp:(.text._ZN5boost10shared_ptrIN8Graphics7Widgets9WidgetSetEEC1INS1_8Resource12GroupByStateEEERKNS0_IT_EENS_6detail16dynamic_cast_tagE[boost::shared_ptr<Graphics::Widgets::WidgetSet>::shared_ptr<Graphics::Resource::GroupByState>(boost::shared_ptr<Graphics::Resource::GroupByState> const&, boost::detail::dynamic_cast_tag)]+0x30): undefined reference totypeinfo for Graphics::Widgets::WidgetSet' Running c++filt on the obnoxious mangled name shows that it actually is looking at .boost::shared_ptr::shared_ptr(boost::shared_ptr const&, boost::detail::dynamic_cast_tag) The inheritance hierarchy looks something like class AbstractGroup { typedef boost::shared_ptr<AbstractGroup> Ptr; ... }; class WidgetSet : public AbstractGroup { typedef boost::shared_ptr<WidgetSet> Ptr; ... }; class GroupByState : public AbstractGroup { ... }; Then there's this: class UI : public GroupByState { ... void LoadWidgets( GroupByState::Ptr resource ); }; Then the original implementation: void UI::LoadWidgets( GroupByState::Ptr resource ) { WidgetSet::Ptr tmp( boost::dynamic_pointer_cast< WidgetSet >(resource) ); if( tmp ) { ... } } Stupid error on my part (trying to cast to a sibling class with a shared parent), even if the error is kind of cryptic. Changing to this: void UI::LoadWidgets( AbstractGroup::Ptr resource ) { WidgetSet::Ptr tmp( boost::dynamic_pointer_cast< WidgetSet >(resource) ); if( tmp ) { ... } } (which I'm fairly sure is what I actually meant to be doing) left me with a very similar error: UI.o: In function boost::shared_ptr<Graphics::Widgets::WidgetSet>::shared_ptr<Graphics::_Drawer::Group>(boost::shared_ptr<Graphics::_Drawer::Group> const&, boost::detail::dynamic_cast_tag)': UI.cpp:(.text._ZN5boost10shared_ptrIN8Graphics7Widgets9WidgetSetEEC1INS1_7_Drawer5GroupEEERKNS0_IT_EENS_6detail16dynamic_cast_tagE[boost::shared_ptr<Graphics::Widgets::WidgetSet>::shared_ptr<Graphics::_Drawer::Group>(boost::shared_ptr<Graphics::_Drawer::Group> const&, boost::detail::dynamic_cast_tag)]+0x30): undefined reference totypeinfo for Graphics::Widgets::WidgetSet' collect2: ld returned 1 exit status dynamic_cast_tag is just an empty struct in boost/shared_ptr.hpp. It's just a guess that boost might have anything at all to do with the error. Passing in a WidgetSet::Ptr totally eliminates the need for a cast, and it builds fine (which is why I think there's more going on than the standard answer for this question). Obviously, I'm trimming away a lot of details that might be important. My next step is to cut it down to the smallest example that fails to build, but I figured I'd try the lazy way out and take a stab on here first. TIA!

    Read the article

  • What is wrong with this attempt of sending a break-signal?

    - by Jook
    I have quite a headache about this seemingly easy task: send a break signal to my device, like the wxTerm (or any similar Terminal application) does. This signal has to be 125ms long, according to my tests and the devices specification. It should result in a specific response, but what I get is a longer response than expected, and the transmitted date is false. e.g.: what it should respond 08 00 81 00 00 01 07 00 what it does respond 08 01 0A 0C 10 40 40 07 00 7F What really boggles me is, that after I have used wxTerm to look at my available com-ports (without connecting or sending anything), my code starts to work! I can send then as many breaks as I like, I get my response right from then on. I have to reset my PC in order to try it again. What the heck is going on here?! Here is my code for a reset through a break-signal: minicom_client(boost::asio::io_service& io_service, unsigned int baud, const string& device) : active_(true), io_service_(io_service), serialPort(io_service, device) { if (!serialPort.is_open()) { cerr << "Failed to open serial port\n"; return; } boost::asio::serial_port_base::flow_control FLOW( boost::asio::serial_port_base::flow_control::hardware ); boost::asio::serial_port_base::baud_rate baud_option(baud); serialPort.set_option(FLOW); serialPort.set_option(baud_option); read_start(); std::cout << SetCommBreak(serialPort.native_handle()) << std::endl; std::cout << GetLastError() << std::endl; boost::posix_time::ptime mst1 = boost::posix_time::microsec_clock::local_time(); boost::this_thread::sleep(boost::posix_time::millisec(125)); boost::posix_time::ptime mst2 = boost::posix_time::microsec_clock::local_time(); std::cout << ClearCommBreak(serialPort.native_handle()) << std::endl; std::cout << GetLastError() << std::endl; boost::posix_time::time_duration msdiff = mst2 - mst1; std::cout << msdiff.total_milliseconds() << std::endl; } Edit: It was only necessary to look at the combo-box selection of com-ports of wxTerm - no active connection was needed to be established in order to make my code work. I am guessing, that there is some sort of initialisation missing, which is done, when wxTerm is creating the list for the serial-port combo-box.

    Read the article

  • String length differs from Javascript to Java code

    - by François P.
    I've got a JSP page with a piece of Javascript validation code which limits to a certain amount of characters on submit. I'm using a <textarea> so I can't simply use a length attribute like in a <input type="text">. I use document.getElementById("text").value.length to get the string length. I'm running Firefox 3.0 on Windows (but I've tested this behavior with IE 6 also). The form gets submitted to a J2EE servlet. In my Java servlet the string length of the parameter is larger than 2000! I've noticed that this can easily be reproduced by adding carriage returns in the <textarea>. I've used Firebug to assert the length of the <textare> and it really is 2000 characters long. On the Java side though, the carriage returns get converted to UNIX style (\r\n, instead of \n), thus the string length differs! Am I missing something obvious here or what ? If not, how would you reliably (cross-platform / browser) make sure that the <textarea> is limited.

    Read the article

  • Algorithm to see if keywords exist inside a string

    - by rksprst
    Let's say I have a set of keywords in an array {"olympics", "sports tennis best", "tennis", "tennis rules"} I then have a large list (up to 50 at a time) of strings (or actually tweets), so they are a max of 140 characters. I want to look at each string and see what keywords are present there. In the case where a keyword is composed of multiple words like "sports tennis best", the words don't have to be together in the string, but all of them have to show up. I've having trouble figuring out an algorithm that does this efficiently. Do you guys have suggestions on a way to do this? Thanks! Edit: To explain a bit better each keyword has an id associated with it, so {1:"olympics", 2:"sports tennis best", 3:"tennis", 4:"tennis rules"} I want to go through the list of strings/tweets and see which group of keywords match. The output should be, this tweet belongs with keyword #4. (multiple matches may be made, so anything that matches keyword 2, would also match 3 -since they both contain tennis). When there are multiple words in the keyword, e.g. "sports tennis best" they don't have to appear together but have to all appear. e.g. this will correctly match: "i just played tennis, i love sports, its the best"... since this string contains "sports tennis best" it will match and be associated with the keywordID (which is 2 for this example).

    Read the article

  • Finding character in String in Vector.

    - by SoulBeaver
    Judging from the title, I kinda did my program in a fairly complicated way. BUT! I might as well ask anyway xD This is a simple program I did in response to question 3-3 of Accelerated C++, which is an awesome book in my opinion. I created a vector: vector<string> countEm; That accepts all valid strings. Therefore, I have a vector that contains elements of strings. Next, I created a function int toLowerWords( vector<string> &vec ) { for( int loop = 0; loop < vec.size(); loop++ ) transform( vec[loop].begin(), vec[loop].end(), vec[loop].begin(), ::tolower ); that splits the input into all lowercase characters for easier counting. So far, so good. I created a third and final function to actually count the words, and that's where I'm stuck. int counter( vector<string> &vec ) { for( int loop = 0; loop < vec.size(); loop++ ) for( int secLoop = 0; secLoop < vec[loop].size(); secLoop++ ) { if( vec[loop][secLoop] == ' ' ) That just looks ridiculous. Using a two-dimensional array to call on the characters of the vector until I find a space. Ridiculous. I don't believe that this is an elegant or even viable solution. If it was a viable solution, I would then backtrack from the space and copy all characters I've found in a separate vector and count those. My question then is. How can I dissect a vector of strings into separate words so that I can actually count them? I thought about using strchr, but it didn't give me any epiphanies.

    Read the article

  • Boost.python building

    - by Ockonal
    Hi guys, really can't understand, how to build correctly project that uses boost.python. I've included boost_(python/thread/system)-mt. Here is simple module file: #include <boost/python.hpp> #include "script.hpp" #include "boost/python/detail/wrap_python.hpp" BOOST_PYTHON_MODULE(temp) { namespace py = boost::python; py::def("PyLog", &engine::log); } Here is bulid log: http://dpaste.com/179232/. Can't imagine what I forgot. System: arch linux; ls /usr/lib |grep boost : http://dpaste.com/179233/

    Read the article

  • Zlib compression in boost::iostreams not compatible with zlib.NET

    - by Johan
    Hello, I want to send compressed data between my C# to a C++ application in ZLIB format. In C++, I use the zlib_compressor/zlib_decompressor available in boost::iostreams. In C#, I am currently using the ZOutputStream available in the zlib.NET library. First of all, when I compress the same data using both libraries, the results look different: boost::iostreams::zlib_compressor: FF 13 49 48 00 00 01 00 01 00 00 00 63 61 60 60 F8 00 C4 C1 25 45 99 79 E9 23 87 04 00 zlib.NET (zlib.ZOutputStream): FF 13 49 48 00 00 01 00 01 00 00 00 78 9C 63 61 60 60 F8 00 C4 C1 25 45 99 79 E9 23 87 04 00 4F 31 63 8D (Note the 78 9C pattern that is present in zlib.NET, but not in boost). Furthermore, when I decompress data in boost that I compressed in zlib.NET, I am not able to read from the stream suggesting something is wrong. It does work when I try to decompress data compressed in boost. Does anybody know what is going wrong? Thank you, Johan

    Read the article

  • Using boost::iostreams to parse a binary file byte by byte

    - by Zsol
    So I would like to parse a binary file and extract some data from it. The problem I am facing with this is that I need to convert a stream of chars to a stream of unsigned chars. Reading the boost documentation, it seems that boost::iostreams::code_converter should be the solution for this, so I tried this: typedef unsigned char uint8_t; typedef boost::iostreams::stream<boost::iostreams::code_converter< boost::iostreams::basic_array_source<uint8_t> >, std::codecvt<uint8_t, char, std::mbstate_t> > array_stream; The idea was to specify a codecvt with InternalType=uint8_t and ExternalType=char. Unfortunately this does not compile. So the question is: how do I convert a stream of chars to a stream of uint8_ts?

    Read the article

  • Building Boost with LSB C++ Compiler

    - by Alex Farber
    I want to build my program with LSB C++ Compiler from the Linux Standard Base http://www.linuxfoundation.org/collaborate/workgroups/lsb. Program depends on the Boost library, built with gcc 4.4 version. Compilation fails. Is it possible to build the Boost library with LSB C++ Compiler? Alternatively, is it possible to build the Boost library with some old gcc version, what version is recommended? My final goal is to get my executable and third-party Boost libraries running on most Linux distributions. Generally, what can be done to get better binary compatibility for Linux distributions, developing C++ closed-source application depending on the Boost library?

    Read the article

  • Python extension building with boost

    - by user1544053
    Hey guys I'm fairly new to boost c/c++ library. I downloaded boost library and build the library. I created a very simple python library in c++ using boost interface (actually it is example code given in the documentation). I built it into a dll file. In the documentation it reads that this dll is exposed to python and they just show the import function in python and include the created library. I don't understand how to expose that dll to python and load the library inside in tradition ('import') manner. In case if you wanna look at the code then here it is: #include <boost/python.hpp> char const* greet() { return "hello, world"; } BOOST_PYTHON_MODULE(hello_ext) { using namespace boost::python; def("greet", greet); } Please help I really want to build applications with c/c++ and python. I simply want to use hello_ext as: >>>import hello_ext >>>print hello_ext.greet() Thank you.

    Read the article

< Previous Page | 7 8 9 10 11 12 13 14 15 16 17 18  | Next Page >