rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You want to use a vector, and a bsearch-based insertion sort for this, so that the vector is always kept sorted. I wrote such code in C++ for a commercial application development framework (SDK) years ago (in the 1990's). Based upon the bsearch (binary search) algorithm, it would find the proper spot to insert the item, and then move the elements below down and stick the new one in that spot. It would detect if the array needed to be resized, and do that automatically. At that time, the STL collection classes were still a dream, or I would have used a std::vector instead of rolling my own. It handles the resizing and insertion stuff quite nicely, pushing the data down and resizing as needed. That would have saved me a couple of days coding effort! :-)

An additional tidbit - I also did head/tail optimizations for large arrays. Since we were dealing with collections of up to 100,000+ elements, that made a huge performance improvement, especially when dealing with inserting already sorted data, such as from a database query that utilized an "order by" clause.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If your system is running Linux, then you can use the Alsa and pulseaudio sound libraries. Windows has its own stuff to use. These may be C libraries, but you can use them in C++. That said, if you want to do low-level sound programming to a sound card and not just the computer's tiny speaker, then you will have to get the programming documentation and/or software libraries for your particular card. In any case, there are a lot of SDK tools out there to help write audio processing code. In the deep dark past I have written code to make non-trivial sound streams to play through the computer speaker. It requires a LOT of diddling of the analog output ports of the sound chip.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This may help: http://www.linuxjournal.com/article/7268

As to why the network manager failed after deleting the VLAN, I can't say, but you may want to check in /etc/sysconfig/network-scripts to see if there are any vlan scripts, and if there are scripts such as ifcfg-eth0 or ifcfg-eth1, etc. You may want to know that I am basing this from my Red Hat Enterprise Linux 6.x clone. Since you mention apt-get I have to assume you are running a Debian-based system, and there are likely differences between those and RHEL systems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This may help: http://www.linuxjournal.com/article/7268

As to why the network manager failed after deleting the VLAN, I can't say, but you may want to check in /etc/sysconfig/network-scripts to see if there are any vlan scripts, and if there are scripts such as ifcfg-eth0 or ifcfg-eth1, etc.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Usually VPS in the computing world stands for Virtual Private Server. So, what is the intent of your comment "leave them"?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What are you trying to learn. Oracle has it's own magazine that isn't too shabby that you can subscribe to. I get it myself. No cost.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Reading my mind I see Mr. Proffitt... :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

We do NOT do your homework for you. Make an honest effort to solve the problem / assignment and post what you did here, along with any issues and/or errors you encountered doing it. THEN, and only then, will we consider helping you!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Lacking hardware, you can use virtual machines to set up, configure, and manage a network.

knggee commented: Thank you rubberman. +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If both tables have 1M rows, then you potentially have 1T (trillion) rows of output. How many years can you wait for an answer? Show the schema of T1 and T2 please.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You cut off the output. Why is it saying that the build stopped? Also, there is no terminating output data indicating the score, plus I think that the round + level information shown in the output is wrong.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to fill the strings ttrack and htrace with dashes after you create them. Then your code to substitute the dash with 'T' or 'H' will work. You also need to display the strings after each round of moveRacers(). Also, your code will not set the correct element in the string unless you also keep track of their current position, and set that position with the 'T' or 'H', and not the element at 'tort' or 'hare'. IE, you need to add that computed value to the last position to determine where each is in the race.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Yes. Your data should be ok after updating the OS. Make sure you disconnect the drives when the system is shut down, before the upgrade. After the upgrade, shut the system down again, attact the array, and then power it back up. The OS should see the array and install the appropriate "new hardware" drivers.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sorry, but we don't do your homework for you. Make an effort and post your code along with compiler and runtime errors here. Then we may be able to help critique your work, and make suggestions on how to fix it.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

This is not a helpful post. Please describe the use case, what programming languages you will use, and the environment where you are asking the user to identify the color in question.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to study UML diagrams and such first. A sequence diagram is basically a visual description of how data and actions propagate between classes and entities in a system. Here is the wikipedia article on that: https://en.wikipedia.org/wiki/Sequence_diagram
And here is an IBM/Rational article: http://www.ibm.com/developerworks/rational/library/3101.html

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Sometimes a raid array has so much data that backups are not feasible, which is why I suggested disconnecting the RAID before the update. RAID0 however, is basically a mirrored disc, so backups only need one drive that is as big as one of the RAID devices. My RAID arrays are all RAID5, which is why I was thinking what I did. Backing up 8+TB of space is not always feasible. :-)

rproffitt commented: While it's OK advice the number of times I've seen folk lose it all is too many. If backup is not feasible then my advice is don't do this. +6
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

I'm not aware of such, not that they cannot exist. Most computer/phone/tablet internet / network connections require either a direct ethernet connection, or a WiFi (wireless ethernet) connection.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Assuming that the boot/system drive is not on the RAID, then it should not be a problem. That said, you may want to disconnect the RAID before you do the update, "just in case". Unlike Linux systems, you NEVER know exactly what Windows will do in these situations.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Did you log into the ftp server with valid user credentials?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

As said, the manual (found on the PHP web site) will help a LOT in dealing with this. That's how I learned.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Is this a CRT (cathode ray tube) monitor? How is it connected? VGA? DVI? Other?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Nope! Why not use the same handle here like I do? :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What exactly do YOU mean by "archive" an architecture? What precisely are you trying to accomplish?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Welcome to Daniweb. Good help here as well as on the Linux Forums.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Also, self-analysis of your own code can be very illuminating. So, along with the code, post your on analysis and critique of the code. Then we can have a real conversation about this.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

@Hamza_9 - thanks for the up-vote. Not necessary but appreciated. Let's start small. Choose a function or method that you want to improve, post it here, and then we can work with that, and then go on to others.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

One of my rules is that you NEVER use a function as the terminating condition in a loop. This is only necessary if the output of that function may change during the loop. In this case, it does not, so do this instead (taken from the cplusplus.com article:

for ( int ix = 0, jx = strlen(a_str); ix < jx; ix++)
{
     a_str[ix] = tolower( (unsigned char) a_str[ix] );
}
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Intel makes very solid mobos that will probably meet your requirements. Go to their web site and check out their system boards. I've been running a dual processor server/workstation mobo for almost 8 years without any problems.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you have a bachelor degree in one of the STEM subjects then with your network cert you should be able to get an entry-level position somewhere.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Double posting doesn't buy you anything. Please ask for this copy to be removed as the answers you want are already on the other thread.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Asking people to analyze over 500 lines of code for you is not a "nice" thing to do. As David W. suggests, use std::string objects instead of char arrays. They are much more efficient and C++ capable.

Another non-portable construct is system("cls"); - that is a Windows-only construct. If you do want to do that to clear the terminal, then you should use an

#ifdef _WIN32
   system("cls");
#else
   system ("clear");
#endif

conditional compilation block. That said, since you use this in many places, then you should define your own clear_screen() function that calls the appropriate code to clear the screen. Then, all you need in the rest of the code is to call clear_screen().

Hamza_9 commented: I am sorry that you have to go through all this :P +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What system are you running on - Windows? Can't help you other than suggest a Google search. Linux? Then what OS distribution and version are you running (such as Ubuntu 15.04, etc)? On my Red Hat Enterprise System clone I find xvidcap in the atrpms optional repository. If you are running Fedora or something like CentOS, then you can install the atrpms repository and then install xvidcap with the yum command, as in "yum install xvidcap".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Your computer or cell phone will scan the area for open access points. Those typically would be "hotspots".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

It depends upon what you want to do with it and what your needs are. Be more specific.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Safer, more flexible, most software is free (and open source), and YOU are in control, not the vendor of the operating system!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you just want to learn Linux, then Ubuntu or Mint (a derivative of Ubuntu) are good choices. If you want to learn enterprise linux such as are used in big data centers, then CentOS is the way to go. It is a clone of Red Hat Enterprise Linux, but without the support subscription costs involved. Since you are going to run this in a VM and it appears that you want to run a 64-bit distribution, then you need to boot into your BIOS and make sure that the virtualization options are enabled. I assume you are running a 64-bit version of Windows?

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

So, don't bother me with this any further. Find another sucker, or figure it out on your own!

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Ok. We are having an argument that is going nowhere, mostly because you have not told me anything to change my mind about the use of ssl/https/tls for these so-called "web sockets". You either need to be much more forthcoming, or find some other sucker to punch... :-(

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

If you are talking to a web site, and the data stream is encoded (encrypted), then it is likely using https (ssl/tls). Why do you say it isn't? You have not said anything to change my mind about that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The https protocols use the secure sockets library (ssl) to do the encryption. What did YOU think the answer was? Read this article, and cancel your downvote: https://en.wikipedia.org/wiki/HTTPS - and fyi, this IS my business and career.

Chris.T commented: The website in question does NOT use https, so I dont see why you keep saying https? What makes you so sure it is ssl encoded? U gave 2 downvotes +0
rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Please show you code, and class definitions.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Look at it this way:

int anArray[10];
for (int i = 0; i < 10; i++)
{
    anArray[i] = i+1;
}

So if you print out the array values, they will go from 1 to 10. :-)

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

You need to post your source code here. Also, if you run your program in the debugger, does it still fail? If it does, then you will be able to see where it fails and can look at data values. You may have a buffer overrun or memory exhaustion issue. Without the source to review, there is no way to tell.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

fgets requires a char* as the first argument. You are passing a toDo* type. I assume that the day element of toDo is equal to the line number? In any case, pass fgets t[i].task into fgets and then set t[i].day to i.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

The last time I did anything with Bayesian algorithms was back in the dark ages when we had to write everything from scratch... :-) Sorry that I don't know what C libraries are out there for that. I think that the Boost C++ libraries has support for this, but I'm not sure as I haven't had to do anything like that "since the dark ages".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

C++ is an object-oriented language which allows much more complex applications to be written in a shorter period of time than C. You can model the structure and behavior of the "things" you are dealing with using classes and inheritance with much less programming. You should do some reading about object-oriented programming in C++. There are tonnes of online resources and tutorials for that.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Upgrading from Win7 to Win10 right now? HUGE mistake! Mostly, it doesn't work... :-( Try running the recovery option and revert back to Win7 first.

FWIW, the Win7->Win10 upgrade messed up my brother-in-law's computer and that is what he had to do. He got all of his data back then.

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

Power saving mode will either decrease the speed of the CPU, or possibly put the system to sleep or hibernate it. In the docking bay where you see things like your running program icons, your battery/power condition, network, etc, then right click (maybe right click - not sure which) on the batter/power icon and select the configure, profile, or properties entry. There you can change your power profile. If this is a desktop machine and not a laptop, then set power-saving mode to "never".

rubberman 1,355 Nearly a Posting Virtuoso Featured Poster

What you call "switch" should be the network router. If the "wifi router" (I assume it is your WiFi access point) is configured as a router and not a bridge/switch, then that is your problem. If not, try connecting the NAS directly to the switch. IE, make sure "switch" is configured as your router, and the WiFi "router" is configured as a bridge/switch. Then you should be OK.