5,331 Posted Topics
Re: 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. | |
Re: 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 … | |
Re: So, show what you would do. Then we can help you. The main thing is whether you want a doubly linked list (each node points to the previous and the next), or a singly linked list (each node just points to the next). It either case, the last node has … | |
Re: Circular queues confuse a lot of programmers since they are not generally supported directly by computer languages. Key points: head of queue, and tail of queue. Circular queues are generally organized as an array, and the biggest issue is usually the one of "wrapping around" from head to tail, or … | |
Re: I'd boot from a live Linux DVD/CD, and then wipe the drive entirely with the dd command. Assuming that the drive is /dev/sdb, to this: dd of=/dev/sdb if=/dev/zero bs=1M That will erase the drive, writing 0x00 to each position (byte) on the disc. Then you should be able repartition it … | |
Re: Hibernate, spring, and struts are all pure Java. They have nothing to do with JSP, servlets, et al. RTFM - Google is your friend! | |
Re: This is not clear enough. If you have C++ code to run, of course you need to compile it before using it. What do you mean by a pdf viewer embedded in a webpage? Do you just want to view the source? Or do you want to run the C++ … | |
Re: This isn't C++, it is php. since you are already in the php environment, why do you use the '<php print... ?>' construct in the fwrite function on line 14? | |
Re: What AD said, and thanks for posting your code. We get a lot of people just asking for us to do their homework for them, without trying to solve the problem(s) themselves. You get an up-vote from me for that! :-) | |
Re: I'll have to look closely at the code later. Exactly what IS the problem? Why should logging care whether test mode is true or false? You definitely want to log errors/warnings/etc no matter whether or not you are in test mode. At least the author wrote clean code, and commented … | |
Re: Not much different from overloading any class/function. Please show an example of what you are trying to accomplish. | |
Re: Have you read this? http://scriptasylum.com/tutorials/infix_postfix/algorithms/infix-postfix/ | |
Re: A lot depends upon whether this has the HM76 or HM86 chipset. The HM86 can support i3, i5, and i7 chips, but the socket may be a problem. As for memory, it should be able to support 4-16GB of RAM, depending upon the simms that you install. Go into the … | |
Re: I haven't analyzed Banfa's answer for correctness, but it looks good! IE, in n days, 2^(n-1) == really big number for medium sizes of n. Example, 2^(16-1) == 32768, 2^(32-1) == 2147483648. So, in 31 days (about a month) they'd owe about a billion $. :-) Of course, in a … | |
Re: For C++, there isn't much of a problem. With C, it is preferable to use malloc/realloc to resize arrays. The nice thing about realloc is that that data in the old array will end up in the new one. You only need to zero out the new elements. I have … | |
Re: Since this is C++, use 0 to initialze these variables. IE: double* data_list = 0; double* filter_list = 0; | |
Re: For a system drive (read-mostly, write occasionally) then an SSD is a good choice (mirrored drives for reliability). For data storage (a lot of writing and over-writing, database, etc) then you want spinning media in a RAID-5 or RAID-10 configuration. The reason for this is that current generation SSD's have … | |
Re: Deceptikon, I'm not sure your answer was apropros to the question. It was being unable to declare a static variable inside a class defined inside a function. Honestly, I have never done that! IE, something like this I think is what (in my interpretation of the post) he meant (I … | |
Re: First, build your code::blocks to be debuggable. There is probably a build option for that. Next, build wx to be debuggable as well. Finally, rebuild your project from scratch. More information required. It seems you are building this with GCC in Windows. Is this the MingW compiler, or in Cygwin? | |
Re: Ok. Explain yourself! :-) You obviously fixed it, but others may benefit from your "discovery"... | |
Re: Please note that we don't do your homework for you! Write the code, and we can critique it, but until you make a reasonable effort to solve the problem on your own, don't expect much from us... | |
Re: Actually, usually the temporary variables, arguments, call and return points are pushed onto the stack, for normal function calls. Inline code just gets converted into code as though you typed it directly into the translation unit (as you indicated toward the end of the post). As you indirectly pointed out, … | |
Re: Question. Is this on a Linux system, or is it Windows? The standard Linux/Posix C/C++ libraries have some common interval timer functions that can get you down to millisecond to microsecond or nanosecond intervals. Not sure about Windows. I use these in Linux frequently in order to determine if stuff … | |
Re: What L7Sqr said, with emphasis! You are working for an advanced degree and have no idea what problems you are interested in solving? Good luck is all I can say! If the two subjects you mention (network and web/android development) are both of interest to you, then flip a coin. … | |
Re: Create public getter/setter methods for your class member variables and use those to get/set the member values. If you do that, you won't have to cast the child to parent class. Just call the methods on the Camion object. Also, you have your assignment reversed. It should be ptrMovil=&camionObject. Also, … | |
Re: We run thousands of servers in the Amazon "cloud". You can rent either virtual or physical servers. Physical ones are more expensive. They have a lot of options about storage, I/O performance, memory size, number of virtual cores, clustering, etc. My department, performance engineering and testing, runs about 100 servers … | |
Re: 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 … | |
Re: So, what is your question? Have you written some sample code for us to look at? In any case, heap management is what you are talking about, and there are a lot of techniques to properlyl manage it. How you do it in C vs C++ are very different, and … | |
Re: This is because the function "threadfunc()" is not a member of the class test. You need to pass threadfunc() an argument to fun. Example: void test :: start() { pthread_create(...,threadfunc, (void*)fun); } void static threadfunc(void *pFun) { Fptr fun = (Fptr)pFun; fun(¶m); // getting error here } I don't know … | |
Re: You have a hardware failure. Remove the disc drives and send it in for repair. If you send it in with the drives, they will probably reformat them, unless you specifically tell them not to, but that is no guarantee that they won't... | |
Re: I up-voted ddanbe's post. That said, operator overloading can be very useful, especially output/input operators and such. As mentioned in ddanbe's post, date classes often overload the + operator. Example, adding a number of days to a date. IE, today + 7 = same-day-next-week. | |
Re: Is this Win 7, or 8? That will probably make a difference. Have you tried booting the recovery partition to reinstall the OS (after backing up all your data, of course)? My guess is that the installation put a new DLL on the system that replaced one of the standard … | |
Re: Go read Donald Knuth's "The Art of Computer Programming" Volume 3 - Sorting and searching. He gets into this in quite a bit of detail. In fact, this is considered the "Bible" of the subject, especially binary tree algorithms. It has held an honored central location on my 6' x … | |
Re: I agree with Mike that the preferable construct is `int* var` - indicating that it is an integer pointer, which is an actual type. Moving the `*` to either next to the variable name, or between the int and variable name as your last example shows, kind of obfuscates that … | |
Re: Contact Apple's iOS support team, or post this in their user forums. | |
Re: Contact MS Hotmail support. This is not something we can help you with. It is an application-specific issue, no matter if someone else has had this problem. | |
![]() | Re: 64-bit system? Run a 64-bit OS. Yes, 64-bit pointers in your software take more space, but not enought to make any significant difference. In any case, your system can take better advantage of available memory, and swap (virtual memory) space, and will perform better since the CPU is designed to … ![]() |
Re: Is this a school project? We won't write your code for you, but we will help you sort it out if you make a reasonable attempt at solving the problem. Your first problem is to model the system. Java is object-oriented. Before you even get into the code, think about … | |
Re: I vote for subtropical gardening! At least it is warmer there than where I am right now (minus 3 F). That said, shell scripting is important if you are going to do system admin cruft. Most of my work is in the Linux environment, so PowerShell is pretty much a … | |
Re: In Unix/Linux and similar systems, you can set the file's attributes so that ONLY the owner or administrator (root) can access the file. As for program access only, then the only means is to encrypt the file, and allow the user to specify the password on the command line. Combined … | |
Re: So, you post code, but ask no question. What is it? | |
Re: Sorry, but we don't do your homework for you. Please write the code, and post it here. Then we may be inclined to help sort out your problems. | |
Re: It depends upon your intention. Normally in recursive functions you would do this (assuming you don't want duplicate numbers): node* insert_in_tree(int number,node* p_tree) { if(p_tree == 0) { p_tree = new node; p_tree->num = number; p_tree->p_left = 0; p_tree->p_right = 0; } else if(number < p_tree->num) { p_tree->p_left = insert_in_tree(number,p_tree->p_left); … | |
Re: There are plenty of programs to do that. Programming from scratch something like this is NOT an exercise for a "noob"... :-) Remember, Google is your friend! You also do not mention whether you are running Windows, Linux/Android, or what. That will make a BIG difference in the tools and … | |
Re: This is not C++. What are the '^' tokens doing in the argument list? Also, is rbFromInches->Checked a member variable, or a method. You are using it as a variable. Finally, this is not enough code and context to know what you are doing. :-( | |
Re: Generally I agree with gerbil; however, I do set my update policies to *inform me* when updates are available. Then, I go to the MS update site, and individually decide if I want to install them. Usually I will install some, or even most of them, but RARELY (never) will … | |
Re: You need a Java native code compiler. Java normally compiles to JVM byte code, and can use the Just In Time (JIT) internal compiler of the JVM to convert your code to native code, but that code only exists until the program terminates. IE, you compile your code to Java … | |
Re: C# is, like C++ and Java, an object-oriented language. Think about classes (things), methods (how to affect those things), and member variables (bits of the thing). Then, use a modeling language such as UML to model your system - classes, methods, members. A good place to start with that is … |
The End.