5,331 Posted Topics

Member Avatar for andrew.mendonca.967

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; } }

Member Avatar for phorce
0
4K
Member Avatar for J_SON

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 …

Member Avatar for J_SON
0
271
Member Avatar for nIcks123

I would advise reading the code for open source tools such as Calibre to figure out how to do this.

Member Avatar for rubberman
0
39
Member Avatar for iamsponge

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 …

Member Avatar for rubberman
0
264
Member Avatar for ameen2much

Are you trying to understand the format of these reports so you can emulate them, or something else?

Member Avatar for rubberman
0
112
Member Avatar for Prithwish

@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 …

Member Avatar for rubberman
0
319
Member Avatar for Slappey

@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 …

Member Avatar for mmcdonald
0
197
Member Avatar for smart.brute.force

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! :-)

Member Avatar for djbobyd
0
113
Member Avatar for kofispark

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.

Member Avatar for dom246
0
177
Member Avatar for shiji91

Are you specifying the correct port that the MySQL server has been configured to respond to?

Member Avatar for CimmerianX
0
129
Member Avatar for srivardhanms

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 …

Member Avatar for srivardhanms
0
484
Member Avatar for Fammer

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). …

Member Avatar for rubberman
0
112
Member Avatar for Casey_1

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 …

Member Avatar for rubberman
0
273
Member Avatar for prajeet10
Member Avatar for manel1989

This may help: http://stackoverflow.com/questions/2693740/how-to-call-system-commands-from-a-java-program

Member Avatar for stultuske
0
274
Member Avatar for Muhammad Waqar_1

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.

Member Avatar for Ancient Dragon
0
293
Member Avatar for Ancient Dragon

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 …

Member Avatar for farmwife
0
623
Member Avatar for Himanshu Chawla

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 };

Member Avatar for Himanshu Chawla
0
285
Member Avatar for somjit{}

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 …

Member Avatar for farmwife
0
367
Member Avatar for khakilang

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 …

Member Avatar for khakilang
0
159
Member Avatar for SpottyBlue

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 …

Member Avatar for kal_crazy
0
477
Member Avatar for happygeek

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 …

Member Avatar for MidiMagic
2
538
Member Avatar for sonu_1

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 …

Member Avatar for deceptikon
0
333
Member Avatar for pars99

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.

Member Avatar for deceptikon
0
156
Member Avatar for blob84

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 …

Member Avatar for Nutster
0
11K
Member Avatar for PatMcC

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 …

Member Avatar for PatMcC
0
232
Member Avatar for 2Ngyunupsints

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 …

Member Avatar for rubberman
0
143
Member Avatar for CimmerianX

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++).

Member Avatar for rubberman
0
329
Member Avatar for Jenc326

Or you are using the wrong driver. What OS + version are you using? What printer make + model are you trying to use?

Member Avatar for rubberman
0
80
Member Avatar for Alex_13
Member Avatar for rubberman
0
466
Member Avatar for z_zendegi

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

Member Avatar for rubberman
0
183
Member Avatar for somjit{}

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. …

Member Avatar for somjit{}
0
212
Member Avatar for lusqd

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?

Member Avatar for lusqd
0
524
Member Avatar for Lp_baez
Re: c++

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() { . . . }

Member Avatar for cambalinho
0
196
Member Avatar for cj.pok.9

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 …

Member Avatar for rubberman
-2
78
Member Avatar for stevanity

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 …

Member Avatar for rubberman
0
124
Member Avatar for Falcon143

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 …

Member Avatar for Falcon143
0
183
Member Avatar for nakiyingi

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 …

Member Avatar for rubberman
0
148
Member Avatar for captain_colt

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 …

Member Avatar for JorgeM
0
271
Member Avatar for joshl_1995

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.

Member Avatar for joshl_1995
0
341
Member Avatar for BagelAnne

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. …

Member Avatar for rubberman
0
98
Member Avatar for Pinku Deb

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.

Member Avatar for Pinku Deb
0
279
Member Avatar for chase.lewis.3114

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... :-)

Member Avatar for vijayan121
0
196
Member Avatar for cuivenion

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 …

Member Avatar for cuivenion
0
377
Member Avatar for dasdgfds

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.

Member Avatar for rubberman
0
122
Member Avatar for khgcvjnhgvb

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 …

Member Avatar for rubberman
0
435
Member Avatar for williamdbibb

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 …

Member Avatar for rubberman
0
224
Member Avatar for nissy

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 …

Member Avatar for rubberman
-1
80
Member Avatar for Inlovewithnight

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.

Member Avatar for gerbil
0
1K
Member Avatar for thephoenix.21

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 …

Member Avatar for Kenney_1
0
201

The End.