rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. Then for all of these, using the list-to-array-sort-back-to-list methodology is the most straight forward in my experience. Using qsort() for an array is trivial - you just need a comparison function, which is also valid for bubble and insertion sorts. For your case, you will likely find that the insertion sort is the most efficient, if implemented properly - consider head/tail optimizations for large lists. Use memmove() to move the data elements down one index location in the array instead of moving each separately from the insertion point. Think about these points and see what you can do to implement them, and at that point I will critique your work if you are still having problems.

Finally, consider writing out the algorithms you are going to implement in pseudo code. I will be happy to comment on that as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Myself, I use Linux to create a system bit-image of both Linux and Windows system discs. I copy the image to an external hard-drive using the dd command piped to gzip to compress it, and if something mungs the system it is an image of, I can restore it pretty quickly (depending upon speed of the backup disc and the interface to the target system). This has saved my bacon on many occasions. Personally, I have not had happy experiences with commercial system backup software. My personal approach has never failed to work for me.

FWIW, I also use this approach to make forensic copies of discs because it does not alter a single bit on the source disc. Then, I can clone that copy, and then use the clone for investigative analysis. Since I have not altered the source disc, and have a faithful copy of it that is also not altered (other than the lossless compression of gzip), I can testify in court as to the validity of my findings. I can prove that by decompressing the original copy and run an SHA-256 checksum on it and the original disc, and the fact that they are equal is proof that they are identical for all intents and purposes. Actually, I do that before I make the clone copy as a "paper trail".

Do bear in mind that if the original source disc is encrypted, this process becomes a LOT more difficult! It works for a disc backup capability, …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Chimei is a major Taiwanese electronics manufacturer. Their monitors have a decent reputation, and I believe they have a good (3 year) warranty. If you can get one at a competitive price, it should do you well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The other option is Firefox (Mozilla). Myself, I primarily use Chrome, but I also use Firefox on some systems that Chrome doesn't support.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Try manually mounting the partition at /dev/sda4 without all the options you are using, but with a read-only option. What Linux OS are you trying to use to recover your data? I assume that you are booting from a Linux CD or DVD? Or is your system dual-booted?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What James said. Also, if we give you the code, do we get your degree? :rolleyes:

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

That's a good start on the Use-Case diagram. It still isn't complete. For example, in item #3, "Passenger seeks information on fare, train timings, and availability of tickets.", you only have one use-case, that of availability. So, go back through all of the points and make sure you cover all contingencies.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

An approach I have used in the past quite effectively was to create an array with the data in the list, sort that, and then use the sorted array to recreate the linked list. Sorting a linked list directly is a real PITA, and AD's suggestion is one possible method. BTW, what ARE the 3 sorting algorithms you are to use. Obviously, from your post, an insertion sort is one. I am going to assume (possibly wrongly) that the others are a bubble sort, and a quicksort?

For the insertion sort, walk through the list and insert the data into an array at the appropriate position (possibly needing to move the items below it down one element, hence the "insertion"). Then you can move the data from the array back into the list on a 1-to-1 basis.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, get the program and the eval license. You have 30 days to try it out - and it has some very good tutorials, docs, and such. Since you can try it for free (full version - no limitations that I am aware of) for 30 days, you can get a good feeling if it will be suitable for you. I have used many other similar tools, both commercial and open source, and this is the best I have worked with. It has a proud place on my system for about 8 years now.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You want us to help you cheat on your assignment? Do we get your degree when you graduate also? :-(

Post your code, and we may help you, but you haven't started on a good foot.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you want to figure out how to write your on DOS (Disc Operating System), look at FreeDOS - an open source version of MS-DOS: http://www.freedos.org/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go here for official nVidia GeForce driver downloads: http://www.geforce.com/drivers

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It looks like a fairly straight forward recursive algorithm. Work it through in words (pseudo code) what you need to solve it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ah, prime numbers! One of my favorite subjects when I was studying public key encryption algorithms back in 1984-1985. I wrote some interesting prime factorization algorithms that were quite efficient so I could generate Goedel numbers from random strings, and extract the strings from the numbers in turn. Over the years, other stuff caught my interest, such as efficient algorithms to distribute computational loads over large networks of dis-similar systems. I'm working a lot in big data analytics today... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Do I hear an echo, echo, echo? We don't do your homework for you... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What deceptikon is trying (in his inimcable way) that you need to first try to solve the problem, post the code here, and wait and see if we decide to help you... :-) We will, if you make an honest effort to work it out - we do NOT do your homework for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As shown by Labdabeta, make sure you "guard" your header files from multiple inclusions.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Was this a socketed chip, or soldered into the board? If soldered, did you do it yourself, or have someone else do it? Soldered chips in systems like this need to either be reflow soldered, or done very, very carefully. Myself, I can solder pretty well, but I wouldn't try it. My grandson, on the other hand, can solder just about anything. If it is a socketed chip, then check to be sure that the pins are properly seated in the socket, and that the socket itself doesn't have any solder faults to the motherboard.

One final thing is that there may be other motherboard issues, such as some failing capacitors and such. Look at the caps and see if there are any that are swolen or leaking dialectric. If you find any such, then they also need to be replaced. If you find resistors that are scorched, then replace them also.

FWIW, I have had my Dell D630 plugged in for 6 years, and it is just fine...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Good find caperjack! :-) Gets an upvote from me, and I work for Nokia Mobile Phones! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There were some related bugs in the original release of Mavericks. Have you installed the latest updates?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried using the wildcard '*' as in:

dir_src = "C:\\Python25\\ATest1\\*"

? I'm not a python expert, but I would think this should work. Worth a try in any case.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Thanks Mike. I'll have to check into libav. I've been using ffmpeg for so long that old habits are hard to break! IE, if it ain't broke, don't fix it! :-) And I do use VLC for most of my video display work, both in Windows and Linux.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

In C++, interface classes are pure virtual classes. There is no such thing as an interface class per-se in C++, unlike Java and some other languages. The advantage is that you can have default behaviors (not all methods need to be pure virtual) that can be used or overridden by child classes. It can help reduce the amount of redundant code significantly, while allowing specialization for the child class as necessary. My main objection to interface classes in Java and other languages is that if a class is derived from an interface class, it MUST implement each method, whereas in C++ you can have implemented methods in the root class (pure virtual) that will suit 90% of the derived classes, eliminating this major source of errors in Java code. In fact, in C++, you can create a pure virtual class like this:

class virtualfoo {
private:

    int m_int;
    float m_float;

public:

    virtualfoo(int i = 0, float f = 0.0) : m_int(i), m_float(f) {}
    virtual ~virtualfoo() = 0; // This makes it a pure virtual class.

    int getInt() const { return m_int; }
    float getFloat() const { return m_float; }
};
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It may be the swiss-army knife of modeling tools, but I have been working happily with Sparx Enterprise Architect (found at www.sparxsystems.com) for years. They fully support relational and entity-relational diagrams, as well as UML, and other design methodologies. They have a reasonably priced student license (assuming you are a student) as well as a fully-featured 30 day eval license, which I have found them willing to extend if necessary. FWIW, the full professional edition is $199 USD (non-expiring license - you only need to pay annual update fees if you want to keep getting updates after the initial 12 month support period). The student version of the professional edition is $105 USD. You can get the desktop edition for as little as $65 USD. Here is a link to the academic/student pricing page: http://www.sparxsystems.com/products/academic_pricing.html

One final thing is that this is a Windows application, but they have put a lot of work into making it compatible with Wine under Linux. I use it in both environments, very happily! Also, you can install it in multiple environments, assuming you are the only user. I have my personal version installed on several of my Linux systems, and since I only can run one at a time, that is totally within their terms of service. I have even gone as far as to verify that with their support staff, and have been assured that this is not a problem for them!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show your code and logic, and then we may be able to help you get through the knottier parts.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Note that the java compilers generally require that the last line is terminated with a new-line sequence. Try adding an empty line after the end of the code. Many C/C++ compilers have the same problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As said, just install Linux (either on your HD or a virtual machine) and get started! You can ask for help here, or you can go to http://www.linuxforums.org/forum and post there - it is a Linux only forum (the other one I help on) and there are a LOT of very experienced linux experts that lurk there. You'll find my Rubberman handle there pretty easily! :-)

One little bit of advice. On Linux, when you have a problem with a command, try the man pages. Example, you need help with the bash shell for scripting, then execute in a terminal window the command: man bash

Man pages allow searching - just enter a /searchterm from the keyboard. IE, you want to find references to the "set" sub-command, then just input "/set" (without the quotes).

And FWIW, I am running the Scientific Linux version of Red Hat Enterprise Linux right now! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I use ffmpeg for this sort of work, exclusively. There are Windows builds available (it is free, open source software) here: http://ffmpeg.zeranoe.com/builds/

I have used Windows-specific tools in the past, but nothing has the options and effectiveness of ffmpeg. You can also change the audio from mp3 to other encodings as necessary, change the aspect ratio, etc. The options are massive and take some time to sort out (it is a command-line tool). Mostly I do this: ffmpeg -i inputfilename -target ntsc-dvd -q 0 -async 20 outputfilename.mpg

These options are to encode the video into mpeg2 suitable to burn to a DVD, keep the natural resolution of the source, and sync the sound every 20 milliseconds (helps when the sound is out-of-sync with the video). This is suitable about 99.9% of the time.

FWIW, ffmpeg can transcode just about any known format into any other as desired.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Burn and boot a live Linux CD/DVD image disc (a recent distribution that supports NTFS partitions). Then, assuming the disc is /dev/sdb (your normal system disc should be /dev/sda, but use fdisk -l to see for sure), use this command: fsck -f /dev/sdbN where N is the number of the bad partition. That should fix (as much as is possible) the bad partition. Alternatively, you can boot into Windows, and mark the bad partition to be checked and recovered on reboot. Then, reboot, and the Windows chkdsk tool should recover anything that is possible. Myself, I prefer the Linux tools - I generally find them more reliable when a disc and/or partition is really munged up.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Burn a live Linux DVD/CD. Boot it up. Login as root (administrator). Then, wipe the disc with the dd command. Assuming that this is the only HD on the system at the time, it will be /dev/sda. The command line would be this: dd if=/dev/zero of=/dev/sda bs=1M
This will write zeros to the drive in 1MB chunks. There may be Windows tools that can wipe a drive also, but this is the method I use to wipe client system discs when they want to sell/repurpose their systems. FWIW, this is NOT a forensic wipe - to do that, you need to write different data patterns to the disc at least 7 times. It is time-consuming, but effective.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sounds kind of like what we were saying. Glad you got the event handling code working! :-)

And for whatever it's worth, this is serious programming chops! I'm giving you an up vote, if only for your persistence in solving your own problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A couple of issues. MPI is a parallel computation framework. Where do you distribute the work to other members of the computational cluster? What I see is what would run on one system (cpu/core etc).

Anyway, go here for more help/tutorials and such: http://www.mcs.anl.gov/research/projects/mpi/

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Mapping physical neural networks to computer constructs is PhD level R&D - some of the smartest people on the planet have been working on this problem for years. As I said in another thread, you do it, and then you get a Nobel Prize in Medicine... :-) I think that you should scale back your asperations a bit at this point in your career.

That said, there are plenty of topics in neural network programming that should be of great interest, and useful in the biomedical field, such as some of the recent work in interfacing prosthetic limbs to the human nerve system. They require serious neural network software/hardware in order to properly interpret user muscular inputs and synaptic nerve firings to appropriately animate the prothestic device. They have even recently been able to generate sensory feedback so the user can "feel" things, such as touch, weight, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What do you mean by "receiver"? Do you mean to be able to simply use it as a WiFi access point? This is not hard to do. I have done that with one of my Linksys routers. You disable the routing capabilities and the DHCP server, and connect it to the actual LAN router (a Netopia router in my case). Then it is just a WiFi terminal with SSID. IE, we can connect to either the Linksys AP or the router's AP using different SSID's. One has better reception in the back of the house, and the other in the front. We configure our wireless gear (phones, ipads, etc) to connect to the stronger connection.

One last point - connecting the AP to the router. In my case, I didn't want to run twisted pair through the house, so I bought a power-line ethernet adapter set. Connect AP into one (in my wife's office), and the router (in the basement) to the other. Works great!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. That has worked for me in the past. Sometimes it takes a few minutes for it to be detected, but then my last Ubuntu distribution that I used for any such purposes was 9.04. That one worked great with plug-in projectors - I used it to teach classes and give IEEE seminars without any issues at all. The newer versions of Ubuntu have the 3.x kernels and there may have been some regressions with regard to dynamic hardware detection.

Video driver issues may also be in effect here. If the internal chip set is nVidia and you are using the default nouveau driver, this can be a cause of the problem. If that is the case, then blacklist the nouveau driver and install the proprietary nVidia driver (download from the nVidia.com web site - not install from the Synaptic repository). That may work better for this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't say if this is a Windows or Linux/other system? For Windows, both triumphost and Slavi have good suggestions. For Linux systems, both C++ and Java compilers are available in the standard package repository for your distribution. For a Windows IDE, some people like codeblocks. Myself, I prefer eclipse. In Linux I prefer to use the standard make tools and my editor of choice (nedit).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What is the map using for the key? The SN? If so, then it should be the last element in the collection, and you should be able to use the map::crbegin() method on the map (reverse iterator to quickly access the biggest SN since it will be the key for the last element). Show the code that is being used now. And by SN, I assume mean the sequence number and that this is a networking application? What OS?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The images are too small and are unclear when expanded to a reasonable size. Please repost the images at a larger scale.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

When you figure them out, apply for that Nobel Prize in Medicine... This is an area of serious ongoing academic research, and there have been a number of recent articles about mapping human neural networks to machine neural networks. Remember, Google is your friend.

If you are referring simply to computer neural networks, then there is a large body of work available to learn from. One of the related topics in computer learning is called simulated annealing.

FWIW, just to get started in that field I had to take an entire course at MIT, and it just covered the basics. I think that was about 15 years ago.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Note that most commercial games are DRM-encumbered. They post a key file or a key in the registry and if you used their tools to install the game on your system, you may have to alter the registry to find the new location of the game files themselves. IE, just copying the visible files may or may not work for you, and you may have to some additional futzing about to make it work.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What operating system is this for? In any case, you can get it here: http://freecode.com/projects/minicom

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have also found that if you go into the System->Preferences->Display page, you can usually get it to find the new display device (projector) and set that to be the output device, or set the display to mirror the output on both the laptop and projector at the same time.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you do subscribe to an Amazon or similar cloud-based server solution, remember that they charge you for the data going out of the cloud, so if people are using tools on their client systems that access the database, that is an extra cost to consider.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A complex number is expressed as a number with 2 parts, the real part, and the imaginary part. Usually both are notated as either floats or doubles. This means that the complex number is a structure, and your allocation is actually more or less correct in that you need to multiply the size of the complex structure by the number of elements in order to get the appropriate array allocated. Hoever, do remember if you are using a 64-bit architecture, and noting that floats are 32-bit values, your allocated space will be twice the size that you expect, in that each element will be 128 bits, not 64 as expected (due to padding required for word alignment in the structure).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not only do a, b, and c need to be declared, they also (in Rahul47's example) need to be initialized to non-zero values. So, in your case, that IS the problem! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is getting tedious. DO NOT ask us to do your homework for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

See my response to your previous post... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you. Make an attempt to code it and we may help you through the knotty parts.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

First, make sure you are versant in predicate logic - all computer languages use that for decision making. Learn (master) C++. A lot of other languages are based upon it, such as Java, PhP, etc. SQL is another beast, and studying Codd and Date is appropriate for that - understanding relational algebra and calculus, as well as the SQL query language itself. As far as I'm concerned, Javascript is a b@sT@rd language, and should be purged from human memory! I've had to work with JS recently, and to tell the truth, it has given me a massive headache!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It all depends upon the word size of the architecture. A 32-bit system will be 4 byte aligned. 64-bits will be 8 byte aligned. This is a definite case of caveat programmer (programmer beware)! :-) A lot of new developers have been bit by this.