for (int row = 0; row < max_rows; row++)
{
for (int col = 0; col < max_cols; col++)
{
// do something at row/col
}
}
This may make the logic more accessible.
for (int row = 0; row < max_rows; row++)
{
for (int col = 0; col < max_cols; col++)
{
// do something at row/col
}
}
This may make the logic more accessible.
Lucaci is being nice. We don't do your homework for you. At least he was willing to give you a link to a relevant web site. Now, you have to figure out how to code it! Once you do that, we MAY be willing to help you sort out the errors... :-)
Do note that if you are serious about "millions of records", then you might be better off to store the data in a hadoop database and use mapreduce to process the data.
I assume you are using a Linux or similar *nix type of oeprating system? So, look at the man page for the 'diff' command. It will do what you want. The purpose of the 'patch' command is to apply diff's to an original file. I believe that with the correct options, diff can do what you want without using 'patch'.
Windows is the ONLY system (currently in common use) that uses backslashes for directory delimiters. It can also handle regular forward slash delimiters. The way any particular XML tool/library handles this is - well "indeterminate" comes to mind! Use forward slashes - which Windows can normally handle just fine, such as "C:/root/branch/node/file" instead of "C:\root\branch\node\file". If you do that, then your code should work also on non-windows systems!
If you are using Linux for an OS, the man pages are terribly helpful, such as "man rand". If you aren't running Linux, then you can search the web. In this case, the google search terms "man rand" will point you to a page (many pages) with the same information, and many more pages with totally irrelevant (but interesting) information that matches your search terms! :-)
As AD said, but to elaborate - there are a number of C++ GUI tool kits that you can use, some of which are nicely multi-platform (Windows/Unix/Linux) and only require a recompile to run on any of them. The GUI tool kits that I see most often for this are things like wx and qt. Both are good, though wx is simpler and qt is more complete. Either will let you build nice GUI applications without a lot (but some) of effort.
Modern systems can decrement a 10K value in about 10 nanoseconds. This is not the approach you want to take. There are system timers that will handle timers in nanosecond scales quite nicely. Is this a Java application?
Think of it like this:
As for your program running slowly, it is likely you are doing an in-depth search which is terribly inefficient. Using hash lists is a good way to deal with situations where there can only be one of each entity in the list, such as students in the school, or class.
Note, that there is an error in my previous posting. It is your task to determine what it is... :-)
We don't do your homework for you. Try first and we can critique your efforts. Quick PS for this, to get you started.
1. Get input number.
2. If < 0 emit error and exit
3. If >= 0 see if is prime number.
4. If prime, huzza!
5. Else emit error and exit.
The pointer 'p' references a stack-based (automatic) variable. It cannot be deleted. As mentioned, only items that are created with operator new can be deleted. This can be a painful lesson to learn as it is a quick path to a core dump.
That said, an advanced C++ technique to deal with this may be to implement your own class operators new and delete (which is allowed, and often useful). The operator new would remember the pointer created in some collection, and delete would look it up. If it wasn't in the collection, it would do nothing. If it was, then it would delete the object and remove it from the collection (to avoid multiple deletes which is another quick path to core dump).
You are using what is called a surrogate key. An auto-increment column is going to be unique, period. You need a primary key that is part of the data in the row. It can be one or more columns, but DO NOT use an auto-increment column for that! So, define an index on the auto-increment (unique_id) column for fast lookups. An example of this would be for things like an invoice number. However, that is not adequate for your purposes.
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 until you are ready to go full 64-bit operational.
There are 2 wires each for tx and rx because the hardware uses what are called line-drivers to move the signal. This minimizes interference and increases distance for the transmitted signals and greatly increases the reliability of the media. FWIW, you CAN transmit and receive at the same time, if the system is set up for full-duplex operation. Most modern switches and NICs allow this, although you can configure them for half-duplex operation, where you can only send or receive at any particular time. If one end is configured full-duplex and the other half, then the thruput is greatly diminshed.
CimmerianX is correct about hubs vs. switches, which is why most networks these days use switches to eliminate (or greatly reduce) collisions.
Do you want to change the environment variables for all users, or just your own account? Files that start with a dot are not visible. If you want to see them, run the command "ls -a ~". You should see all the files and directories, including the dotted ones, in your home directory. In any case, don't make the changes in .bashrc - it is better to set them in .bash_profile.
One sentence - check your firewall QOS (quality of service) rules.
Please don't ask us to do your homework for you, and if it isn't homework/school work, but real work, there are well-known algorithms on the Internet that will help you. Try some Google and Wikipedia searches.
Create the mysql table with a unique primary key. Duplicates will be automatically rejected with a 1062 SQL error code. I use that technique to handle duplicate rejects when storing performance log records in our data centers. It is more efficient than searching for a duplicate, and avoids the overhead of handling the return data, even if you use a key to find it.
Another option (though I generally recommend the virtual machine method mentioned by Mike2k) is to use the tool unetbootin to create a bootable live thumb drive of various distributions and try them out. It will let you boot/run a live Linux system from USB, and not take up any system disc space, require repartitioning, install a virtual machine manager (such as VirtualBox), etc. You can get unetbootin here: http://unetbootin.sourceforge.net/
What here2serve said. Most systems these days disable stuff like rsh because it is insecure. You can run scripts with ssh much like rsh, but it is much more controllable and secure. See the ssh man page for more information.
255.255.255.255 is the global broadcast address. Your lan needs that to run. The other (starting with 239) may be the multicast address for a network printer. You should be able to configure your router to block any broadcast messages outside of your LAN. You may also be able to block messages to the 239 address. Normally multicast messages are not forwarded by a router, so I suspect they are simply "dropped at the border" and are not being sent to the Internet. IE, you will see broadcast and multicast traffic, but it is going nowhere.
Linux/Unix/Posix - the latter is the key. QNX (now the Blackberry OS) is also a Posix operating system. Posix defines a set of common APIs and services that a posix-compliant OS has to support. Software written to the standard will compile/build on any posix-compliant system. I write software for all of these systems, and generally I can simply move the code to another, recompile, and it will run as expected.
Also, besides the == operator as mentioned by ddanbe, you want to use conditional logic, or a switch statement. IE,
// Conditional logic
if (operator1 == '+')
{
result = num1 + num2;
}
else if (operator1 == '-')
{
result = num1 - num2;
}
else if (operator1 == '*')
{
result = num1 * num2;
}
else
{
cout<<"Illegal operation!"<<endl;
}
Or:
// Using switch statement
switch (operator1)
{
case '+':
result = num1 + num2;
break;
case '-':
result = num1 - num2;
break;
case '*':
result = num1 * num2;
break;
default:
cout<<"Illegal operation!"<<endl;
break;
}
Also, can you use standard template library collection classes, such as std::vector<T>? Or do you need to support your own collection classes/functions/methods?
Speak with your advisor if you can't come up with a suitable subject on your own. Part of the educational process is learning how to explore the domain you are interested in, and choosing a thesis project is part of that. This is not the place to ask this question as the subject matter is pretty much limitless.
I would agree with JorgeM. There are rootkits out there that hide in RAM and cannot be detected by current malware scanners.
Finite-state machines are your friends for parsing data like this! IE:
I think the hardware is already interrupt driven (most likely). Some example of your code would be helpful as to how you determine when there is data to read and/or write.
Besides, the Linux/Unix man pages for toupper() will also show tolower() - they are usually implemented as macros in the associated header file.
I was hoping the original poster would be able to catch that! :-)
Google is your friend! You need to understand the structure of TCP/IP packets - this information is widely available, and I'm sure there are good Wikipedia articles on the subject that will lay it out for you. Then, you create a structure to contain the information, and populate it accordingly.
Re. Caperjack. There may be a boot manager that could allow that, as long as the OS's in question can boot from an image file or an extended partition, otherwise you are limited to 4 (max primary partitions on standard PC MBR - not such a limit with newer boot records).
What file system type is on this array? Have you tried replacing the bad drive and letting the array rebuild it?
Hint: see the C function toupper(char c)
.
If this is a school exercise, please make an effort to solve the problem yourself before posting here. We DO NOT do your homework for you, but will help you with problems once you have made an honest effort to solve them.
This is not enough information. Please explain exactly what you did to install the "upgrades", and was it the operating system itself, or just some applications, you tried to upgrade? What errors did you get? Can you post the output here?
Generally, I agree 100% with JorgeM; however, to answer your question, there are a couple of factors to consider:
Confused yet? :-)
Windows can (or used to) only support installation of the root OS on a primary partition. Linux is not so encumbered - there are only 4 primary partitions in a normal MBR (Master Boot Record - the first sector on the system disc). One of those can host extended partitions. Windows (or used to) only boot from a primary partition on the primary system disc. Linux is not so encumbered (it can boot from any partition on any attached drive, including USB thumb drive).
The MBR has some low-level code that looks for the actual boot loader, which if you have a mix of Windows and Linux systems will usually be one of the Linux systems installed. That will have some data that configures the boot menu, and boot options for the various operating systems you have available, such as where they are located, etc. However, if you remove this operating system that hosts the boot loader, you will have to re-install the boot loader in another OS. This is not always simple. Caveat User!
So, as you might see now, doing multi-boot with even as few as 2 operating systems can be really complex, which is why it is preferable to use a virtual machine manager such as …
This has nothing to do with RAM or CPU speeds. There are some significant differences between 2.3.10 and earlier versions of Gingerbread (android 2.3.x). Try building it with an earlier version, such as 2.3.6.
How are your building/linking this? The errors indicate that you are trying to link multiple versions (or copies) of the named functions, resulting in the "multiple definition" errors.
Remember, we don't do your school projects for you. Show your work, and we can help you fix them, critique them, or resolve issues you are stumped on.
Have you configured the backup tool? That's what the errors seem to indicate, that you have either not configured it, or do not have a suitable device to hold the backup data attached to the system, such as an external USB/Sata drive. What about using some other backup tool?
What browser+version are you running?
First of all, the question is so amorphous that I'd not even want to become employed at that company. Without a specification of what they want to store (besides employee data), there is no way to define a polymorphic class structure. So, basically, this is not an answerable question. What kinds of employees? IE, are there different classes of employee, and each class has their own table? Do they have a table schema defined?
Also, show the server-side code as well as the client.
There are a lot more factors involved with this than just the CPU. The GPU (graphics processor) is much more important. Post the entire build list and specs that you have come up with, including such things as motherboard, power supply, video card, memory (speed and amount), etc.
:-) Yeah, asking us to analyze almost a thousand lines of code is a BIT excessive... :lol: Try to apply the KISS principal first, and then after you restructure your code, post again. :-)
That said, you are, to my mind at least, making good progress for a newbie at programming. Give yourself another year, and I think you might make a decent java programmer. Do remember that programming is NOT the same as software engineering. Work on studying the fundamentals, not just the coding constructs. See the books by Donald Knuth on software engineering as an example. They (all 4 volumes) are published under the title "The Art of Computer Programming". Also, another great one is Niklas Wirth's "Algorithms + Data Structures = Programs". Wirth was the author of both Pascal and Modula programming languages, and the graduate advisor of my college buddy (and still best friend) Bruce Ravenel - one of the co-inventors of the Intel x86 processor family.
That's not accessing sftp... If you were using the ftp protocols, the URL would have been something like "ftp://posting...." and not "http://posting....".
Singing "So Long, It's Been Good to Know You"... No backup? Consider the file as gone.