1,684 Posted Topics

Member Avatar for akoloff

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.

Member Avatar for Rashakil Fol
0
77
Member Avatar for mugilan
Member Avatar for nattylife
0
1K
Member Avatar for nanosani

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.

Member Avatar for Daishi
0
318
Member Avatar for shiq

[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\" …

Member Avatar for shiq
0
122
Member Avatar for iamthwee

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.

Member Avatar for bops
0
387
Member Avatar for cjm771

[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 …

Member Avatar for Rashakil Fol
0
246
Member Avatar for ep2002

[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.

Member Avatar for ep2002
0
207
Member Avatar for -Job-

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.

Member Avatar for -Job-
0
137
Member Avatar for Eman Ramos

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 …

Member Avatar for Rashakil Fol
0
102
Member Avatar for vegaseat

Definitely way less than 1/2 gram. A cubic centimeter of water is one gram.

Member Avatar for YoungCoder
0
682
Member Avatar for indianscorpion2

[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 …

Member Avatar for Rashakil Fol
0
231
Member Avatar for 3265002918

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 …

Member Avatar for 3265002918
0
181
Member Avatar for OppOnn

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 …

Member Avatar for OppOnn
0
178
Member Avatar for Decessus

[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!

Member Avatar for jwenting
0
209
Member Avatar for indianscorpion2
Member Avatar for JoBe

I do not understand the need for polymorphism in this case. Could you explain it?

Member Avatar for Stoned_coder
0
283
Member Avatar for wishes
Member Avatar for Rashakil Fol
0
112
Member Avatar for wu7jian

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 …

Member Avatar for wu7jian
0
188
Member Avatar for winbatch

Go to google, type in "compare C++ maps", and press the I'm Feeling Lucky button.

Member Avatar for winbatch
0
499
Member Avatar for jlimty

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?

Member Avatar for jlimty
0
390
Member Avatar for JeffHeaton
Member Avatar for Sword

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.

Member Avatar for jindalarpan
0
687
Member Avatar for Acidburn

[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 …

Member Avatar for Rashakil Fol
0
424
Member Avatar for angel22

[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, ...)

Member Avatar for Rashakil Fol
0
102
Member Avatar for wishes

No prob. [URL=http://www.sethwhite.org/images/animals/antarctic%20cod.jpg]Here you go.[/URL]

Member Avatar for wishes
0
133
Member Avatar for wu7jian

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. …

Member Avatar for Lerner
0
195
Member Avatar for mtwisd

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).

Member Avatar for mtwisd
0
107
Member Avatar for kerribyrd

You could try paying attention in class. You should not be producing anything so misformed as that.

Member Avatar for kerribyrd
0
163
Member Avatar for mark1048

Maybe it's just that more people need help with C++ than need help with Java :-)

Member Avatar for freesoft_2000
0
507
Member Avatar for ORA-MAN

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.

Member Avatar for Stoned_coder
0
239
Member Avatar for zeek

These are simple. Now code multiply to work in O(n log n) time instead of O(n*n) time. Come back when ready ;-)

Member Avatar for vegaseat
0
284
Member Avatar for ipods#1

You could better explain what you mean by, "linux script."

Member Avatar for xtremeathlete25
0
172
Member Avatar for trsja56
Member Avatar for edemko

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?

Member Avatar for bprakkmr
0
177
Member Avatar for dummy

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 …

Member Avatar for Rashakil Fol
0
92
Member Avatar for lortfan

It's not a good idea to try to learn calculus without having learned algebra.

Member Avatar for nemesisrobot
0
170
Member Avatar for Juls

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"

Member Avatar for Sp!ke
0
1K
Member Avatar for ! !

Gates would have some assistant do the search for him, and Yang would already know the answer.

Member Avatar for jwenting
0
177
Member Avatar for server_crash

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 …

Member Avatar for Narue
0
268
Member Avatar for zeek

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 …

Member Avatar for Narue
0
453
Member Avatar for Rearden

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, …

Member Avatar for freesoft_2000
0
274
Member Avatar for Mike182

[code]#include <cmath>[/code] Use the 'log' function (which computes the natural logarithm).

Member Avatar for Mike182
0
322
Member Avatar for cancer10
Member Avatar for angel22

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 …

Member Avatar for angel22
0
395
Member Avatar for DMR
Member Avatar for mozira

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.

Member Avatar for zyruz
0
229
Member Avatar for mav1

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.

Member Avatar for The Senate
0
226
Member Avatar for Narue

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.

Member Avatar for Dani
0
464
Member Avatar for altheastronut

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 …

Member Avatar for Rashakil Fol
0
228
Member Avatar for beetle
Re: stl

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 …

Member Avatar for Narue
0
172

The End.