rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sounds like school work. We don't do it for you. First, make an effort to solve the assignment. Then, post your code here. We will be happy to help you understand/fix your issues/problems at that point.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@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 virus itself), but MS "monetizing" your browsing habits. So, install and use a 3rd party browser such as Firefox or Chrome, and then install an ad blocker such as AdBlockPlus.

AFAIK, there is also a popup blocker available for Internet Explorer, but how well it will work for you is to be determined. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 32-bit word (mantissa, exponent, sign, etc), then you cannot know how the operation will alter the value, including turning it into an invalid value (NAN), resulting in a floating point exception in your program as soon as you try to do anything with it as a floating point number.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Boot into Linux and post the output of the commands "lspci" and "lsmod" here. We need to see what the chip set is that this device uses (lspci), as well as any drivers that may be associated with it (lsmod).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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). On an Intel x86 processor system, you can disable secure boot, but on an ARM processor system you cannot...

As for which device type Win8 supports best, it would by anything with a touch-enabled screen, and one that supports what is called "multi-touch". Yes you can use your touchpad and such, but it was designed for touch interfaces.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 data to the standard Windows partition(s). If you don't have enough space, then you will need to get another drive, format it for Windows (NTFS - NOT FAT), and then copy the data from the Netgear drive to that.

Alternatively, if it IS using a Linux partition, then you can find Linux disc drivers for Windows on the web. Google is your friend! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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.

bradly.spicer commented: Pointless downvote. Have an upvote. +3
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My comments about ss125 being a blackhat or working for the NSA was tongue-in-cheek. No disrespect was meant. I have written stuff like keyloggers in order to implement remote control apps like VNC long before such tools were available.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 
};
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 element to the top of the list, and a pull removes the bottom of the list. In this case, you want to keep pointers to both the head and tail of the list. In many cases, a linked list is more efficient than an array (as which stacks are often implemented). With a linked list you also don't have to resize an array, which adds non-deterministic overhead (important if you need real-time behavior).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 well as random number generators: http://www.phy.ornl.gov/csep/CSEP/BMAP.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a variety of an insertion sort - inserting an element in the proper location of a sorted list so that the list / array remains sorted. I developed code for this 20 years ago (in C/C++). I used a modified combination of bsearch and qsort. It would search for the insertion index of the array, push the following elements down one position, and then set the element in the index provided. Doing this efficiently means that you want to intellegently resize the array so that you aren't doing reallocs for each insert, especially if you are dealing with 10's of thousands (or 100's of thousands) of records, which we had to deal with. I used a binary reallocation scheme, so that every time I had to reallocate the array, I would double the number of elements.

I'd provide sample code, but it belongs now to Applied Materials (the 800lb gorilla of semiconductor manufacturing equipment and software).

In any case, the algorithm goes like this:

  1. Use a binary search of the array for the location to place the new element.
  2. If necessary, reallocate the array to hold the new element.
  3. Move the rest of the data down one element (memmove() works well for that).
  4. Set the array location found to the new element.
  5. You are done. :-)

FWIW, you only need 32 comparisons to find the location in an array of 4 billion elements.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 to insert the new data to the position just past the length of the new data, and then re-seek to the that position and write the new data. This is a major PITA honestly, and the source of a LOT of data errors! The ONLY reason to NOT write to a second file is because you are short of disc space, because doing that is a lot easier and less error prone.

This is a good example of violating the KISS principle! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Momerath - I guess you weren't interested in MicroFocus COBOL? :-) It is (as far as I recollect - I haven't done anything with COBOL in a donkey's age) pretty compatible with most mainframe COLBOL compilers.

But yes, the other posters (Ancient Dragon and Momerath) are absolutely correct.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 Qt very successfully on a number of differnt operating systems as a result. I used to use WxWin, but I think Qt is more complete for GUI application development.

So, all that aside, what is it about these tools that makes you uncomfortable in the Windows environment?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I assume you mean "use the dot operator"... :-) If so, the answer is yes!

pars99 commented: Yes, sorry about that. Thank you. :-) +1
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

No matter the OS (Windows or Linux), download and user the VLC media player. It will handle just about anything, which the normal media players on either Windows or Linux will not without installing a number of obscure codes (if available). You can get VLC at www.videolan.org.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 fact, it may not look so good to the eye.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 ready to commit it to compilable/executable code as yet.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

All well and good, but you haven't stated what problems you are having, or errors you are getting.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you... :-(
Make an honest effort to solve the problem, post your code here along with the difficulties/errors you are having, and we may decide to help; however, if you don't make the effort first, you can forget about it!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You shouldn't need it for ffmpeg. Try to transcode your videos into some more compressed stream, such as mpeg4, mkv, etc. It has a zillion options, and learning to use it effectively will take some time, but basic stuff is quite simple. BTW, the avi format is just a wrapper for other stuff, such as mpeg4, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Since you are running Windows 8 on a UEFI secure-boot enabled system, have you enabled secure boot? If so, have you registered the Windows 8 key with the UEFI BIOS?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 other reasons as well. You need to check the load on the physical server, the configuration of the mail server, and look at the messages in question to see if there is some other reason why you might be getting duplicate copies, such as a common sending server/user.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

On the whole, I agree 100% with Mike2k and AsmGuy; however there are a couple of Windows apps that I run in Wine that have no suitable Linux alternatives. The most important one is my UML modeling / software engineering tool, Sparx Enterprise Architect. They have gone to a lot of effort to make sure it works well with Wine since a lot of their customers use it there, yet they aren't a big enough company to support a dual-environment (Windows/Linux) code base. And yes, I have used or evaluated most of the UML tools available for Linux and NONE of them come close to the capabilities of EA, yet it costs under $200USD per seat for a Professional Version license that does everything from requirements collection to forward/reverse code engineering to live model execution/simulation.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 (probably true enough), there is a good likelihood that most of these "attempts" at self-gratification have more innocent reasons for happening.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Characters are 8 bit integers. Use the appropriate printf format strings. To output the hex value of a character you would use %.02x

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your code and then we may help you.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 key (or your computer needs to know it) to connect, and then you can use your browser to connect to the AP's management front end. In either case, you will still need to know the admin password for the device.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The only way is to either install Wine and then see if the exe's Windows installer works and the executable likewise, or to install Windows in a virtual machine and run it there in the normal manner. I use both techniques.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, you need to model your system. Break it down into classes and relationships. For example, you have customers (advertisers), advertisements, locations, etc. They have properties that express the data reflected by the objects of each class, and behavior that reflects how they act under given input and output. This is called object-oriented design, and the most frequently used tool for this modeling is UML (Unified Modeling Language). There are free graphical UML tools available on the internet that can get you started.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 expressed in its most simple terms. Then, you can start encoding it in the language of your choice.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 the algorithms you wish to apply to the data, and that can encompass such things as integral and differential calculus, statistics algorithms, etc. This is not a domain for those who are weak in math... :-)

FWIW, the organization I work for employs a team of mathematics and statistics PhDs who develop these algorithms. IE, it is not a domain you just jump into!

So, if you have such knowledge and capabilities, then you are the one best positioned to decide what research question(s) you would like to explore.

Good luck!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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 that the likely issue is the interface.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to the Apple web site iPod support page. You should be able to post a query there about this issue.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Build it with the debug flags enabled and then run it in the debugger. It is either that, or sprinkling a bunch of print statements through your code to help isolate the problem. For core dump exceptions like this, I find that running in the debugger is the better choice. For non-fatal, but inappropriate behavior (wrong output for given input for example), then diagnostic print statements can be very useful.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If the file is already sorted, then just read it into memory and use bsearch() to find the item you need. You will need to write the compare() function that you pass to bsearch().

If the file is not sorted, then read it into memory and use qsort() to sort it, and bsearch() as above to find records within it. You should be able to use the same compare() function for both.

These are C language functions. If you need C++ specific stuff, then just read the data into an appropriate structure and add it to std::map or std::multimap template instances using the key value as the map key.

Finally, if your professor wants you to deal directly with the file data and not read it into memory first, then you need to answer the questions: is the file already sorted, and are the records and fields of them of fixed length? How you deal with the file depends upon the answers to those questions.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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. Remember, service techs have to do this to replace the drive for repair.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Are the fields fixed width, or delimited in any way. If fixed, then the solution is simple. If delimited it is a bit more difficult, but not very. If neither of those situations is true, then it becomes quite a bit more difficult, especially if more than one field can be blank. If only one field can be blank, then the solution is not simple, but not particularly hard. Please explain which of these scenarios is the case and we can much better advise you how to deal with this situation.

FWIW, I have to deal with this cruft daily, writing tools to process log data that can change at any time.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

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