5,331 Posted Topics
![]() | Re: Myself, I would use a map to map words to occurances: std::map<std::string,size_t> wordcount; to store the counts of words. Simple enough. Just increment the count on each occurance. void addWord(const std::string& word) { if (wordcount.find(word) == wordcount.end()) { wordcount[word] = 1; } else { wordcount[word] += 1; } } |
Re: Since floats are 32-bit values, you could pun them to an unsigned 32-bit integer, do the bit-wise operations, and then cast it back to a float. The rest of what decepticon said is correct. If you don't know PRECISELY how the float is represented in the specific bits of the … | |
Re: I would advise reading the code for open source tools such as Calibre to figure out how to do this. | |
Re: Please don't ask us to do your homework for you! :-( Visual Studio C++ aside, the code will be common to all C++ compilers. Read the VS documentation and then write the code. At that point, if you have problems, we might be able to help you. BTW, which country's … | |
Re: Are you trying to understand the format of these reports so you can emulate them, or something else? | |
Re: @Adak 100% correct. Most of the time, you connect to the device and then send it text strings or codes to control the device. This is considered "high level" control. For low-level control, you can use direct hardware I/O instructions, which depend upon the device connectivity, such as RS-232 serial … | |
Re: @mmcdonald This is likely a Windows 8 laptop or tablet, hence the location of the post. Since it is Win8, it is 99% likely to be the version if IE it runs. My guess is that it is NOT a virus (unless you, as do I, consider Windows 8 a … | |
Re: There are tonnes of people who would be interested. I would suggest that you post to a Linux forum, such as www.linuxforums.org/forum, with this request. Also, post what your rationales are for making this effort. You won't be the first (or last) person to do this! :-) | |
Re: There are plenty of resources on the web for this - just do some Googling... FWIW, it is pretty easy to crack WEP encryption, but not so easy for WPA. | |
Re: Are you specifying the correct port that the MySQL server has been configured to respond to? | |
Re: And when asking us to help you with your homework, please post some code that you have written to solve this problem. Part of your education in computer science is to work up algorithms to solve these sort of problems. FWIW, the code can be pseudo code if you aren't … | |
Re: New systems (either tablets or laptops) that are shipped with Windows 8 are UEFI/SecureBoot enabled. In my opinion, this is an abomination since it pretty much restricts you to Windows 8, even though Linux developers are working on resolving this issue (with some success, but not simple for most folks). … | |
Re: A lot of these storage devices use an embedded Linux OS to provide access to your data. It may not be directly accessible from Windows. I would suggest that you download/burn a Live Linux CD/DVD, boot that, mount the external drive as well as your Windows drive, and copy the … | |
| |
Re: This may help: http://stackoverflow.com/questions/2693740/how-to-call-system-commands-from-a-java-program | |
Re: The main() function is the first function run in a C program (not necessarily so in a C++ program). You can't just pass output from another function to main(), but you can call them from main() and use the output of them for whatever needs you have. | |
Re: Windows 8 has enabled EUFI secure boot. You need to disable that via the BIOS settings, or you need to be sure that the Linux distribution you are installing is secure boot enabled (signed kernel and drivers). This is a serious problem these days. IE, don't purchase ANY computer with … | |
Re: Also, specifying each element as a char means they only can have one character! I suspect that you don't want to do that... :-) Use this (or something similar): class Book { private: std::string author, publisher, ibn; double price; public: Book(); // Default constructor }; | |
Re: In the vm case, you are running a 32-bit host os. You need to run a 64-bit host os and enable the VT-x and such in the bios in order to run a 64-bit guest. Try running a 32-bit Linux system instead. It will give you a much better experience … | |
Re: There can be a number of innocent reasons for this. One is that your servers aren't acknowledging receipt of the message in a timely manner. Another is if the messages are "return receipt requested" and the user dont's respond in a timely manner, the message may be resent. There are … | |
Re: And, if you are writing a casino game, then I would suggest you research the topic of Monte Carlo algorithms. This is where your code is headed, so you might as well do it properly. :-) So, here is a great site for these subject, both Monte Carlo algorithms as … | |
Re: The trouble with these blacklists is that a lot of the sites blocked are not porn - probably more than 1/2 of them. So, though the statistics (there are lies, damned lies, and then there are statistics) indicate that the UK Parliament consists of a bunch of horny, unfulfilled pricks … | |
![]() | Re: You cannot just open a file for read+write, seek to some position, write some data, and expect it to move all the rest of the file's data down - it will be overwritten... You have to write the rest of the file's data the from the location you are going … |
Re: Simply put, the dot (.) operator is used to access members of either a full instance or reference to and instance of an object. The pointer-to (->) operator is used to access members of a pointer to an instance. Ancient Dragon gave you some good examples. | |
Re: A stack structure can work well for a FIFO queue. You push an element on the queue, and pull one off of it. The push makes that element the last in, and the pull gets the first in. A linked list is also good for this - push attaches the … | |
Re: Both Wx and Qt are very viable GUI tool sets for Windows systems. If you want cross-platform operations / code, then you cannot use native Windows API's without some similar toolkit. They mask the underlying system API's so you can use the same code on all supported systems. I use … | |
Re: The number of pixels a camera supports is a hardware, not a software issue. You cannot exceed the total resolution capabilities of the camera itself. There may be software that would allow extrapolation of the physical pixels to simulate a larger image, but you would not gain in resolution. In … | |
Re: To build a native Windows application using Linux code, try installing and using the MingW compiler - it is a GCC (GNU) compatible compiler suite (C and C++). | |
Re: Or you are using the wrong driver. What OS + version are you using? What printer make + model are you trying to use? | |
Re: All well and good, but you haven't stated what problems you are having, or errors you are getting. | |
Re: You will need IPX client software for your XP system. It is not a normal part of the Windows OS protocol stack. Here is a link to a Microsoft article on the subject that may help you: http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/ras_lan_protocols_ipx.mspx?mfr=true | |
Re: Performance engineering. Add C++ to your skill set - consider Java as C++ with training wheels (like a kid's bike). I make a good 6 figure salary doing performance engineering for a world-wide networking operation. I use C++ w/ C to develop network and application performance monitoring and diagnostic tools. … | |
Re: What version of Windows on what hardware are you running, and which version of Adobe Flash are you trying to install? Did you get the Flash installer from the Adobe web site, or elsewhere? | |
Re: You have a semi-colon at the end of the declaraion line. Remove that. Ie where you have void playerCMD(); { . . . } You should have void playerCMD() { . . . } | |
Re: JorgeM was trying to tell you, that if you are connected to the access point via wired ethernet, then you can use your browser to connect with the AP and retrieve the keys for the SSIDs that it uses. If you are using WiFi then you need to know the … | |
Re: Well, it seems you are starting to think about the problem. Continue to break it down in your mind and start with some pseudo-code that expresses what you are trying to accomplish. IE, write it all down, break it down, write it down again, and iterate until the problem is … | |
Re: The bitwise & operator looks at the left-hand-side (lhs) and the right-hand-side (rhs) of the expression and returns a word that has the common bits set (all the bits in the lhs that are 1's that correspond to the same bits that are 1's in the rhs). So, in your … | |
Re: Big data is often the term used when referring to nosql database tools such as Hadoop, Red Shift, etc. Analysis of the data such databases contain requires specialized tools that can distribute the load, which Hadoop tools like Map Reduce can provide. You have to provide the code to implement … | |
Re: Assuming you checked all the cable connections between the PC and monitor, the problem may be a simple failure. See if you can get the monitor to bring up its internal configuration options/menu and such. If they display, then you know that the monitor's basic display functions are ok and … | |
Re: Sounds (sic) like there is either an incompatibility between the old dock and the new iPod, or the iPod docking port is defective. Take them both down to your local Apple store for the "gurus" to look at and advise you. | |
Re: You should be able to replace the drive, and it is likely the spots are glue. I'd just use some super glue to affix the strap. Use an x-acto blade, or razor blade to detach the strap from the old drive, but carefully so as to not damage the strap. … | |
Re: It isn't helpful to post a link to a site that requires registration and login to view the contents. Please post a copy or snapshot of the question here. | |
Re: Use doubles instead of floats, or long doubles and then cast the final output to a float. This is exactly why the 8087 processor family used 80 bit precision for all intermediate calculations for floats and doubles - no lost precision... :-) | |
Re: Physically, any 2.5" laptop sata drive will work. However, a lot of the Sony Vaio hardware has embedded identifiers that the BIOS interrogates and if they aren't Sony "branded" devices, they won't work. The only way to tell for sure is to try one. I know we had issues of … | |
Re: Rather than posting a link to pastebin, post it here directly. That will make it simpler for us to post modifications for you. Also, post your class structures. | |
Re: Not reading your code, collision detection isn't as much a matter of coordinates, as it is a matter of vectors - current location + direction (in 3 dimensions) + speed of all relevant airplanes. If the vectors intersect, then you have the possibility of a collision. If they don't then … | |
Re: Try to boot from a Linux Live CD/DVD, then try to mount the Windows file system and see if you can access any of your data. Regarding Vista, it is notoriously unreliable. If you MUST use Windows, then upgrade to Windows 7 - it is much more stable. Otherwise, switch … | |
Re: Most android applications are Dalvik ones. Dalvik applications are written with Java code, but compiled with the Dalvik compiler to the Dalvik virtual machine byte code, just like the Java compiler compiles the code to the Java virtual machine (JVM) byte code. IE, the language is the same, but the … | |
Re: The "warranty center" owes you two things: one is a new set of Windows restore discs. The other is to install the restore partition as per OEM requirements. If they will not do so, then file a formal complaint with Toshiba and your state attorney general. | |
Re: The key thing about C++ is object-orientation. Learn how to model your classes, their relationships, and behaviors. Then, turning that into class structures and code becomes a lot simpler. I can say this without reservation after 20+ years of C++ and object-oriented system design and development as senior and principal … |
The End.