rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Zombie, you are asking the right questions. Post an updated set of classes/code to "reflect" the situation and I will comment further, and help you smooth out the rough edges.

  1. You have an entitiy called "Emergency".
  2. You have another entity called "Reporting Entity".
  3. You have information about the type of the emergency, including the severity (life-threatening or not).
    etc.

So, start working on the details. Those we can help you refine.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I often find that working back-to-front (or right-to-left if you prefer) to be very helpful in determination of root causes of such problems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My friend Conan (CimmerianX) has a point. However, I have to ask what are YOUR concepts, and what do YOU consider their order of importance?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

At this point, you should have some idea what you want to do. The subject (networking) is almost unlimited in breadth and depth. What interests you about the subject? If you cannot answer that question, then I would suggest you go for a degree in business administration, accounting, or law...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You might try 2x4GB sticks of the supported types/speeds. Some systems require both slots are filled.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, for 30+ years I am a professional software engineer. Before that, when my wife was in graduate school, I was an emergency response volunteer EMT and rescue worker for the US Civil Defense. So, I do know something about what you are trying to do.

  1. Break the problem down into smaller bits. What are the items you need to track?
  2. Consider how they are related.

The date stuff is ancillary. Use a static/constant for the date format. That doesn't have much to do with the 911 call, other than how to present the date/time to a user.

Calendar? Why? Doesn't the current date encapsulate that?

You need a couple of support classes, which might be sub-classes of "Emergency", but honestly, that is stretching it a bit. You need a class for "reporting entity", data for "type of emergency" - an enum may (or may not) be appropriate for that information, responding service (may, or may not be another class), location of the emergency, severity and type of the emergency (life-threatening, property damage, etc), and the list goes on.

So, you need to clearly think about all the information this needs to encapsulate, and which parts of that are best reflected by local data entities, and which of those entities are complex enough to have their own class.

You have more work to do! Work on that, and then report back with what you have and we can help you move forward.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There are several good GUI tool kits that are cross-platform for this. One is Wx, and the other is Qt. Qt is the more popular one. Wx may be simpler. I have used both, but Qt is what I have mostly used for professional software development.

FWIW, Qt used to be owned by Nokia, but was spun off a couple of years ago. Before Nokia owned it, it was a small, but popular software vendor. Nokia put a lot of resources into enhancing it, so today it is the most popular high-level GUI development toolkit, capable of handling very complex multi-threading applications. It is very commonly used for stock trading systems (which is where I became familiar with it, in the 2006-2007 time frame), amongst other things such as GUI windowing systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Well, if you already submitted your exam answers, then what can we do to help you? Isn't it a bit late? :rolleyes:

FWIW, we don't do your homework, OR exams for you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If this is for tomorrow, then what have you been doing these past few weeks? I assume you had at least that long to prepare for the test? :-(

Too bad, you lose!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You don't ask much, do you? The answers will depend upon what you intend to do with your gear. Myself, I have an almost 7 year old system that still kicks butt! Dual quad-core Intel CPUs, 8GB of fully buffered ECC RAM, 10+TB disc, nVidia 8800GT dual display video w/ dual 1920x1200 24" displays, dual DVD-RW drives, and other goodies. It cost me about $5000USD at the time. It can play dual HD videos (one on each display) at the same time.

Performance hardware? Get an Intel mobo and CPU's (4-6 cores each of up to 2 cpu chips), with good cooling gear, a 1000watt power supply, low-cost nVidia graphics (unless you intend on high-end gaming - the low-end these days will blow your socks off!), plenty of memory (16-32GB), and plenty of sata-3 drives. Blu-ray? Don't bother unless you plan on using it for backup. The encryption of commercial BD discs is a PITA to deal with. DVD's are a no-brainer. It is easy to backup your DVD's, but BD's are another thing - you have to first extract them to MKV format, and/or then convert to the appropriate format to store to either DVD or BD.

Haswell is a low-power bus and Intel Celeron CPU chip intended for mobile systems. Don't bother for a desktop or server system. The current level for desktop/server systems is Sandy Bridge as far as I understand.

There are a lot of motherboard manufacturers out there that make good gear, and they are …

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Without more information (not sure what that would be), I don't think we can tell you more than you already know. The fact that Chrome seems to act similarly to IE is interesting, and suggest that this may be some sort of system behavior. So, what versions of Windows and IE and Chrome are you running?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

My lawyer switched from Windows to Mac a year or so ago - and he will NEVER go back! If you have questions, go to your local Apple store and ask the "gurus" there to help you, if you cannot find the answer on the system or online.

FWIW, I am his tech guru, but I am a Linux/Unix wizard. My wife is the Mac guru of the family, and I refer to her when I am clueless (not too frequently).

The Mac OSX is a Unix variant (Berkeley Software Distribution - BSD) at its heart, but with Apple's GUI as the user front end.

In any case, there are tonnes of documents on the internet to help you, not to mention on Apple's web site as well. Just do some Google searches for issues you are confused about! :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What mike2k just said. Also, since this is a multi-threaded bit of code, it is possible that you have a race condition. However, as mike said, we need more of your code to tell anything helpful.

And yes, Mingw's debugger is GDB, and it is obvious you don't understand how it works... RTFM so you can use it more effectively is my advice.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need T used inside the class, like this:

template <class T>
class events : public T
{
public:
    events(){}
    ~events(){}
    bool operator==( const T& aTee ) const     // Explicit cast
    { return (aTee == *(static_cast<T*>(this)); }
    const T* getTpart() const { return this; } // Implicit cast
};

The comparison operator is a case where you would preferably use static_cast<T*> instead of a dynamic_cast<T*>.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I haven't written prolog for 30 years, but I think that your problem is that (from what you are indicating) ne(b) is not returning an entity in your database, hence is null, and comparing a non-null with null value is an ERROR as it can't be evaluated either true or false (basic predicate logic). IE, it is doing the right thing, and you need to deal with that possibility.

If you wanted to force an error to return false from a boolean function in C or C++ (and some other languages) you could do something like this (assuming results is a true/false value as the call evaluated and HAVE_ERROR indicates that an error was caught): return (HAVE_ERROR) ? false : results;

Unfortunately I have no clue how you would do that in prolog, and right now I don't have time to dust off my copy of Clocksin & Mellish and look it up... :-)

I hope this is heading you in the right direction in any case.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What gusano79 and assembly guy said. The sources and description of function of the md5 and sha-nnn hash functions are freely available on the web. Here is a link to the md5 article on wikipedia, including very clearly written pseudo-code that should be easily converted to most any computer language. http://en.wikipedia.org/wiki/MD5

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Mingw is a gcc/g++ (gnu compiler collection) compiler for Windows. It is ansi/posix compliant so the code you write on windows has a better than even chance of running on other systems, such as Linux, Unix, or OSX. It is also open source.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried rebooting, including a cold shutdown and restart, with the tv plugged in? Or plugging the TV into the laptop after you have plugged in the laptop and done a cold reboot as above?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

There is a tonne of information on these subjects on the internet. Wikipedia alone has a lot of excellent articles to draw from - just don't copy them (cheat)... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show the contents of eight.txt.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you need to use a different provider, you can take it to the provider of the network it is locked on to get it unlocked. That is the law today, at least in the USA.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You should be able to see how the "Slick RSS" news reader does this as well. I use it in my Chrome browsers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Not a simple situation. You need to write a program (in C, C#, or C++) to monitor all system keyboard activity for all windows (passing valid input events through to the proper window), and only send a shutdown event to the revelant window when the specified time expires. Not a good idea in any case, in my opinion. So, just exactly WHY do you want to do this?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Go to the cisco.com web site...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can disable popups in chrome. See if that helps.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you post this so we can also be "infected"?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Have you tried using ssh to connect? Most servers like the one you are trying to connect with will use ssh instead of telnet these days.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but my first Dell laptop was a D600 and current one is a D630, yet I have never experienced this problem. Have you contacted Dell tech support?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This may help (results of quick Google search): http://en.softonic.com/s/m-x-video-player:windowsmobile

I haven't had a chance to try it out on my own Lumia 920 as yet... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Both Unix (AIX) and Linux use the same text formats, so translation is not required. I have migrated millions of lines of code without issue from one to the other over the years. The only issue may be if you used FTP in text mode to first copy the data to a Windows machine. Then you should use FTP in text mode to copy it back to the target system - ftp handles platform text new-line conversions without problem.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need the Android SDK and simulator (available from Google). Android devices run Dalvik, which is a virtual machine different from Java, but that compiles Java code to the appropriate byte code for the Dalvik VM. You don't just "install" these applications, you need to build them with the Dalvik compiler and then to test them you either run them in the simulator, or you upload them to a rooted device (final testing).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What kind of "small programs"? You can send me private mail about what you need, why, how much you will pay, and how you will pay. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Did you install a new operating system on the drive? You can't just boot from a new drive - you need an operating system on it, and a valid boot loader installed as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Looks like a phishing attempt - since it keeps popping up in Chrome, it is likely a virus you already contracted that is causing the popups. You can try disabling popups in Chrome (not hard to do), but I suspect that the malware already on your system will block that... Have you run at least 2 different anti-virus scanners on your system? What A/V are you currently using?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please be more specific and provide more details. Also, what do you mean by "SCAN whole laptop with C Drive"?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Running a checksum calculation on the data is the only sure way to be sure that the copy was successful. Size alone is not definitive.

As for your process of running this in an open terminal is concerned, that is not the best approach to use. I would run it detached with nohup and redirect stdout and stderr to specific files. If you run it as a shell script, then after the transfer you can compare checksums of the source and destination files to validate the transfer, writing the results (success or failure) to stderr (the specified file) which you can review later. You could also email that info to you or a mail list as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

A common cause of WiFi network slow-downs is due to using the default signal channel. Example: on 802.11b networks, there are 13 channels. The default that all WiFi routers (access points) use is channel 6. Other AP's that your systems can see are likely using channel 6 as well. So, go into the configuration tool for the router/access-point and change the channel to something other than 6. I have found that in many situations this helps tremendously, especially in an environment where there are other AP's in visible operation - common in commercial (business) buildings.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

TCP/IP is not deterministic, nor is ethernet. As my signature says, "Real fast is ALMOST as good as real-time"... The only deterministic real-time networks that I am aware of are Arcnet (up to 20mbps) and Token Ring, and then you need a real-time operating system to support them (QNX does, Linux and Windows do not). With the QNX operating system, you can get deterministic behavior (depending upon traffic patterns) from a switch-based ethernet that does not use a router - ie, all nodes are directly connected via real-time switches that have worst-case specified latencies for port-to-port transmission. In such a case, you can still apply real-time RMA (rate monotonic analysis) computations to determine if you can keep your required schedules.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is a good example of why you want to write pseudo-code and model your processes first - how to solve the problem in abstract terms - before you write the program. I have been writing a LOT of complex software for over 30 years, and I NEVER start a project before I design and model what it is going to do. It is an iterative process, and as I begin the implementation I change the model to reflect what I have learned when writing the program. My current project is a PHP web-based project - a language I never worked with directly until last week. This process has helped me to get over the many hurdles of presenting forms, getting data into other modules, and then using that to extract the desired data from a MySQL database.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

On linux systems, the shell command to clear the screen is "clear", not "cls". Sometimes a form-feed output will do this as well.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

All great answers. Just remember that K&R is (in internet time) from the dark ages! At the time K&R wrote the book on their invention, the C language, they were using a system (PDP-7 or such as I recall) which had a 16 or 32-bit architecture. Integers (and long ints) were 32-bits, and (as today) shorts were 16-bits and chars 8-bits. Modern systems (64-bit cpus) have 32-bit ints, 64-bit longs, 16-bit shorts (still), and 8-bit chars (still). On 32-bit systems today, you can specify a 64-bit integer as a 'long long int', which should be the same on a 64-bit system, though depending on the compiler, a long long int may be 128 bits on a 64-bit processor system - caveate programmer! :-)

To reiterate my favorite quote - the nice thing about "standards" is that there are so many!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I have written assembler code for Intel 8048 and 8086 as well as Sparc chip sets. Each target processor has its own instruction set, so assembler programmers (very low level - direct to the processor) generally focus on one processor family. Mostly today, you can write C code that will be translated to the appropriate machine language - only the compiler/assembler writers need to deal with the CPU directly. In fact, modern compilers translate source into an abstract machine language (COFF, ELF, et al), and only the linker needs to take that and turn it into the target processor code.

So, while (in the Linux environment at least) you may need some assembler for kernel development, it is rare. FWIW, my last touch of assembler was for a Sparc (Sun - now Oracle) device driver about 6 or 7 years ago, and before that device drivers for an x86 real-time operating system 20 years ago! :-)

FWIW, my Intel 8086 assembler/machine code reference manual still has a place of honor on my bookshelf...

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

L1, L2, and L3 cache are hardware based. The cache block size is probably determined by the CPU (L1 and possibly L2), or system board BIOS/flash settings (L2 and/or L3). I don't think that the OS has much to do with that, though I may be wrong. The standard Linux memory block size is 4K (4096 bytes).

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, you say it copies the data correctly (you have verified that with cksum or md5sum, right?), but just doesn't close the terminal window when done? There can be many reasons for that, including unintended input in the terminal window, so our being able to determine exactly what is causing this symptom is pretty difficult to accomplish... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Unless you use an arbitrary precision library (such as Boost), this is not possible. All floating point (including double types) are imprecise and cannot be used easily for precise values as can integer types. So, use integers to express dollars and cents. Use the modf() function to extract the dollars and cents into integers from a floating point representation of a value, and finally, use the modulus operator to extract the denominations from each. I will leave the actual solution to you, but post your next effort here and we will probably help you sort it all out.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You can set the function signature to arrayname[][] and pass the x and y sizes in the argument list. However, this really doesn't work well, and can lead to "unintended results". Since this is C++, I advise that you use C++ STL collection templates instead. You can use a vector of vectors to simulate a 2 dimensional array very easily. I do this all the time with great effect. Since std::vector types are dynamically resized/allocated, you don't need to do much besides add a new element to either the outer or inner vector.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Show the equations you need to use, and show the code you are trying to get to express them - as well as all required inputs and outputs.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Unless there is some really good reason to use arrays, why not use std::vector constructs that contain structures with your data?

struct location {
    string city;
    string country;
    double latitude;
    double longitude;
};

void getLocationData(vector<location>& locations, ifstream& inFile );
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Place the "Study making forms" last in your list of stuff to learn. Add "Study C++ GUI tool kits" before that - the forms will be part of that... :-)

So,

  1. Study the basics.
  2. Practice the basics, gradually getting more complex with your code.
  3. Study C networking (sockets, etc).
  4. Study multi-threaded programming and concurrency control.
  5. Study back-end api's. MySQL is a common one and has good C++ support. I use it all the time.
  6. Study C++ GUI api's such as Wx and Qt.

That's the order I'd take if I were starting over (now that I have 20+ years of C++ hind-sight to draw on). Fortunately, I already had the C networking stuff down pat, having implemented an entire C-based TCP/IP stack for a real-time operating system, from the DDN White Book specifications (the TCP/IP "bible").

This week I'm mastering web programming with PHP... Got my first MySQL connection working today. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Just a cursory glance, but you have defined all of your arrays to have 2 columns. Why are you iterating over the passed column count? Also in your sub() function, you define g as a 2x2 array, yet you overrun the size with your g[3][3] = f - e.

You need to do more studying, and understand what you are doing. It is fundamentally, and fatally flawed at a number of levels.

H_beginner commented: I have studied and solve the problem. I wanted to know if I can make the matrix size entered by the user dynamic. Currently I have fixed it as a 2*2 matrix. +0