1,684 Posted Topics
Re: Record the time whenever the program closes. If the time when it opens is earlier than the previous closing time, it's been reset. Or you could connect to one of your servers on the Internet and have it tell you what time it is, ignoring the user's clock completely. | |
Re: For the getdata member function to be called, it has to be defined first. | |
Re: To swap Perl scalars without writing a third variable: [code]($x, $y) = ($y, $x);[/code] If you want to swap Perl arrays, well, you'd be better off having used array references and swapping those like above. | |
Re: [QUOTE=shiq]Hello, I've a question: is it possible to pass a variable from perl script to HTML form. I want this variable $ztable value to be send to this form. <input name="dirname" size=15> its post method form. Thank you in advance.[/QUOTE] What is stopping you from something like [code]print "<input name=\"dirname\" … | |
![]() | Re: He said "factorial," zyruz. Iamthwee, you know what a for loop is, right? Start 'answer' at 1 and multiply answer by all the numbers from 1 to n. |
Re: [QUOTE=cjm771] [CODE] char a1='-'; char a1='x'; [/CODE] [/QUOTE] The first time you mention 'a1', you have to indicate what type it is. This is what you did in [font=monospace]char a1='-';[/font]. But afterwards, when assigning a new value to a1, you don't need (or want) to specify the type. So use … | |
Re: [url]http://phpservers.com[/url] Invalid XHTML. [url]http://phpservers.info[/url] Invalid XHTML. [url]http://enovanti.com[/url] Valid. Haven't checked CSS. Validation doesn't matter anyway. | |
Re: It might depend: What operations do you specifically mean by "boolean operations"? Unless you have a wide-ranging definition of "boolean operations", the answer's no. | |
Re: Of those three, I'd guess you'd have the best time with Java. If not that, then C++. But get around to learning Python anyway, because isn't learning a programming language fun in itself? ;-) I don't really know anything about Geographic Information Systems, but I am guessing that right now … | |
Re: Definitely way less than 1/2 gram. A cubic centimeter of water is one gram. | |
Re: [code]int main(int argc, char *argv[])[/code] You can name them whatever you want, but these are the normal names. argc is non-negative. It gives the number of useful elements in argv. If argc is positive, argv[0] contains the program name. Then argv[1] through argv[argc - 1] point to character arrays that … | |
Re: Of the syntax you used to state the problem and the syntax in your sample input, I'm not sure which makes the least sense. You could be helpful and explain your problem better. Using sentences. Right now, I'm thinking that _maybe_ you're trying to solve a three-by-three linear system. And … | |
Re: Don't wait. The PPC platfom will remain supported for years -- developers won't just suddenly abandon a chip when 99% of users are still using it. Also, it's not as if creating cross-processor software will be that difficult -- Apple has been doing this with an entire operating system, after … | |
Re: [QUOTE=Catweazle]People should be free to say whatever they like so long as what they say does not hurt or offend others.[/QUOTE] This offends me! | |
| |
Re: I do not understand the need for polymorphism in this case. Could you explain it? | |
Re: Use CODE tags and post the code for all relevant datatypes. | |
Re: t + 1 moves t over one position, based on the width of the datatype t is addressing. For example, if t is a pointer to doubles (which usually take eight bytes of memory), t + 1 will return a memory address eight bytes away from t. If t is … | |
Re: Go to google, type in "compare C++ maps", and press the I'm Feeling Lucky button. | |
Re: By "run them together" do you mean end one of the threads? Or do you mean simply to have them run concurrently? I am guessing you already found both of these resources, but here they are anyway: [url]http://www.rubycentral.com/book/tut_threads.html[/url] [url]http://www.rubycentral.com/ref/ref_c_thread.html[/url] What code do you have right now? | |
Re: You don't need old hardware and you don't need a serious understanding of Unix in general or Linux in particular. But you do need (c) -- if you need a _particular_ application that does not run on Linux, then obviously Linux is not for you. | |
Re: [QUOTE=Acidburn][COLOR=Red]hyperlink removed by moderator[/COLOR] basically the buttons dont work like they should, I've made the buttons using photoshop and importing them to dreamweaver, from there creating the button as a hyperlink. In theory the button should therfore on mouseover display the behaviour as an active link.[/QUOTE] I don't understand what … | |
Re: [quote]Is it wrong to have a very long program if i did not find another way?[/quote] It is if you should have found another way. Why do you have your offsets in some crazy order? (15, 5, 9, 14, ...) | |
Re: No prob. [URL=http://www.sethwhite.org/images/animals/antarctic%20cod.jpg]Here you go.[/URL] | |
Re: It's not pure C, because C does not have namespaces. So it's C++. The C++ compiler chokes because the <stdlib.h> and <stdio.h> header files do not use the std namespace. There is no 'std' namespace as far as the compiler is aware, since none of the source files mention it. … | |
Re: Get the MingW compiler with Dev-C++ 5. This is free too, and it's not a zillion years old. This should resolve your problem (of getting a compiler). | |
Re: You could try paying attention in class. You should not be producing anything so misformed as that. | |
Re: Maybe it's just that more people need help with C++ than need help with Java :-) | |
Re: I'd go with the doubledouble special datatype, since the regular double can only barely hold enough precision for your digits -- and if you do any interesting math with the numbers, the floating point error will be too much. | |
Re: These are simple. Now code multiply to work in O(n log n) time instead of O(n*n) time. Come back when ready ;-) | |
Re: What rules do you want to use for generating the HTML? How is your text file formatted? Do you just want empty lines to divide paragraphs? | |
Re: Instead of ((expected1 / hours1) + (expected2 / hours2) + ...) / N, use ((expected1 + expected2 + ...) / (hours1 + hours2 + ...)). It makes more sense for me to use total time over total time, because if somebody takes 1 hour for one task and 199 for … | |
Re: It's not a good idea to try to learn calculus without having learned algebra. | |
Re: Juls, your real problem is that the Location HTTP header must use an _absolute_ path. E.g. "Location: http://www.example.com/path/file.html" instead of "Location: ../file.html" | |
Re: Gates would have some assistant do the search for him, and Yang would already know the answer. | |
Re: Generally speaking, the more you learn about and think about algorithms (of any kind), the better programmer/problem solver you become. Sorting algorithms are one prevalent example, but in general, it's always a good idea to learn how things work. That way you'll end up thinking, "I need this done, and … | |
Re: atoi expects a pointer to a nul-terminated array of characters, that is, a "c-style string". You're passing it a character, not a pointer to an array of characters. When a character gets interpreted as a pointer, it ends up refering to some arbitrary address of memory that the program has … | |
Re: You won't be confused by learning Java and C++ at the same time; it's like trying to learn to drive while you happen to be in culinary school. Except that in the case of Java and C++, much of the knowledge maps over. After you learn a few programming languages, … | |
Re: [code]#include <cmath>[/code] Use the 'log' function (which computes the natural logarithm). | |
Re: To find a duplicate in the array, you have a few options. One way is, make a for loop, looping the variable I from 0 to N. Then, inside that, make a loop that moves the variable J from I + 1 to N. Inside that, see if the I'th … | |
Re: That's such a SAAD holiday. | |
Re: My crystal ball is in the repair shop, unfortunately, so I don't know whether any solution I might come up with is shorter or longer than yours. | |
Re: The first element of an array is at index zero. That is, [font=monospace]myArray[0][/font] contains 1, and [font=monospace]myArray[10][/font] contains 11. Right now, your for loop iterates i from 1 to 9, and you probably want to iterate from 0 to 9. | |
Re: The main good feature of this design is that I don't have to scroll right every time I load a page. But I would prefer the old one with the navigation flipped to the right side. | |
Re: Use #include <cstdlib> at the top of your program, and then use srand once to seed the random number generator. Then use rand() to produce a random number between zero and RAND_MAX. Use some math to scale the random number to the range you want. You might want to try … | |
Re: You can't use initializers with vectors. You need to use something like [code] vector<int> ray; ray.reserve(7); // Not necessary -- this just prevents extra reallocations. ray.push_back(3); ray.push_back(431); ray.push_back(4); ray.push_back(123); ray.push_back(4); ray.push_back(52); ray.push_back(52);[/code] Another option is to make an array with the initializer and use some kind of loop to push … |
The End.