679 Posted Topics

Member Avatar for Mr.

Since you already have the textbook's answers... [QUOTE=Mr.] "Every dog owner is an animal lover" Mine: Ax Ey dog(y) AND onws(x,y) => animallover(x) Book: Ax (Ey Dog(y) AND Owns(x,y))=>AnimalLover(x) - This is almost equal... are the () significant? [/QUOTE] They're significant for readability. The book's solution makes it much clearer …

Member Avatar for gusano79
0
146
Member Avatar for guino

I don't have any code samples handy, but if you'd like to create your files the Cowboy Way, try [url=http://ccrma.stanford.edu/CCRMA/Courses/422/projects/WaveFormat/]this introduction to the Microsoft PCM WAVE file format[/url]. Most wave-file-creating software that I'm aware of doesn't go beyond this subset of the RIFF specification, but there are some [url=http://www.saettler.com/RIFFMCI/riffmci.html]gory specification …

Member Avatar for gusano79
0
175
Member Avatar for gusano79

I have a wireless router (D-Link DI-524) and a cable modem (Motorola SURFboard 3100) which I cannot get to talk to each other. The modem works beautifully when connected to the computer via my Ethernet device (as it is right now), and the wireless router is also performing as expected …

Member Avatar for DMR
0
1K
Member Avatar for Toba

[QUOTE=Toba]I've been wondering about this for awhile now: does random data compress? ... Does this or does this not prove that only 1/255 of random data files can be compressed, and is my math correct?[/QUOTE] That sum is a lot more complicated than it has to be. It turns out …

Member Avatar for Real-tiner
0
413
Member Avatar for Asif_NSU

[QUOTE=GDFans]You can do this by capturing keybord interrupt.(09h?yes) I remember I have seen an article solving this problem.Actually,it is not an easy stuff,but Im not sure I can check it out.:~) ...[/QUOTE] Correct; hardware interrupt 9h is the keyboard interrupt, and it's possible to use that to get keyboard states. …

Member Avatar for gusano79
0
184
Member Avatar for kohkohkoh

The second parameter to [font=courier]strcmp[/font] up there is actually a pointer--that's half of what an array is, just a location in memory (the other half is the field size, in this case [font=courier]char[/font], to use when making offsets into the array). [QUOTE=koh]... if ( strcmp( words[i],words) == 0 ) ... …

Member Avatar for gusano79
0
147
Member Avatar for nanosani

[QUOTE=nanosani]I am doing some very nasty computation using java but it always gives me a java.lang.OutOfMemory Error,after this nothing on the GUI works.i think its ok to have that error but atleast things should work afterwards. Please Advise[/QUOTE] It's [i]not[/i] okay to have that exception. My "Please Advise" is that …

Member Avatar for nanosani
0
149
Member Avatar for biel_andrada

Well, here's an easy one--you've spelled a method two different ways (the first is correct): [QUOTE=biel_andrada]... Temp Celsius( ); //needed to work on ... <<theTemp.Celcius() ... [/QUOTE] Also, it won't compile until you actually define a body for that method like you did for [font=courier]Temp::Fahrenheit[/font]. Hm, also noticed you have …

Member Avatar for gusano79
0
107
Member Avatar for Dragon Master

Have a look at [url=http://www.libsdl.org/index.php]SDL[/url]--it's pretty nifty.

Member Avatar for Dragon Master
0
121
Member Avatar for c_barnett01
Re: Ai

[QUOTE=Toba]From what I've heard, programs are considered AI when they can fool a human being into thinking they are human (ie. over IRC chat or similar). ...[/QUOTE] It's called the Turing test, after Alan Turing. [url=http://www.kurzweilai.net/meme/frame.html?main=/articles/art0492.html?m%3D19]Here's an article[/url] that may be of interest... I'll throw in a quote from the …

Member Avatar for Chainsaw
0
243
Member Avatar for steelers_fan

[QUOTE=DaveSW]... I think Communication is essential for a programmer.[/QUOTE] Definitely. Programming is basically an engineering discipline, but a programmer is closer to an interpreter or translator than any other kind of engineer. Sure, you can get the job done sitting in a cube and coding, your only companions a stale …

Member Avatar for gusano79
0
402
Member Avatar for tgraves

[QUOTE=red_evolve]... the target in the switch statement works for Integers only. ...[/QUOTE] An expression in a [font=courier]switch[/font] statement can be any of these: [font=courier]int[/font], [font=courier]short[/font], [font=courier]byte[/font], or [font=courier]char[/font]. red_evolve is basically correct, though, since they're all integer types under the hood. --sg

Member Avatar for gusano79
0
203
Member Avatar for bsridhar

[QUOTE=bsridhar]... This function converts a string to a numeric value. ...[/QUOTE] Are you interested in writing the conversion yourself, or do you just need the conversion to happen? These can help:[indent][url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Double.html#valueOf(java.lang.String)]Double.valueOf(String)[/url][/indent][indent][url=http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Long.html#valueOf(java.lang.String)]Long.valueOf(String)[/url][/indent] One approach would be to first try to convert the string to a [font=courier]long[/font]. If it works, then you …

Member Avatar for gusano79
0
162
Member Avatar for mike3x1

[QUOTE=mike3x1]... For the void set how would i set the char mer[] to am or pm. ...[/QUOTE] The [url=http://www.cplusplus.com/ref/cstdio/sprintf.html][font=courier]sprintf[/font] function[/url] should work for that: [code]#include <stdio.h> void Set(char string_time[]) { sprintf(meridian, string_time); } [/code] If you do this with [font=courier]string_time[/font] larger than [font=courier]meridian[/font], it will crash and burn horribly. I …

Member Avatar for K-1
1
192
Member Avatar for Neofite

[QUOTE=kc0arf]... Great idea on the Pascal! It is what I learned first. I do not see a lot of environments out there for it though. Have to see if gcc will compile it. ...[/QUOTE] Straight GCC doesn't do Pascal as far as I know, but [url=http://www.freepascal.org/]Free Pascal[/url] and [url=http://www.gnu-pascal.de/gpc/h-index.html]GNU Pascal[/url] …

Member Avatar for FireNet
2
198
Member Avatar for fasteddie19793

Is that code complete/correct? The two questions don't make much sense. Both ask how many times the [font=courier]while[/font] loop iterates, but what is [font=courier]k[/font] supposed to be? And look at the [font=courier]for[/font] loop closely--how many times will that loop really run? (only two answers to that, depending on what [font=courier]n[/font] …

Member Avatar for fasteddie19793
0
169
Member Avatar for Slade

[QUOTE=slade]I need to create a date updated field for ms sql 2000. The current trigger I have only works for the insertion of data and it is "(getdate())" is there one that I can use for insertion and update of fields? [/QUOTE] You can write a trigger that fires on …

Member Avatar for Slade
0
189
Member Avatar for Dani

[QUOTE=DARKSTAR]String str = JOptionpane.showInputDialog(null,"Enter String");[/QUOTE] Ah, but then you miss all of the stream stuff, which is quite handy for [i]any[/i] sort of input/output situation (and it makes you tough, too). Never mind that (warning: opinion ahead) throwing up a dialog box just to get an input string is annoying …

Member Avatar for gusano79
0
263
Member Avatar for MaxC

[QUOTE=abu_sager]... i don't now why poeple here don't use a c++ feature the are using a c-style[/QUOTE] I think people don't often realize there's more than one kind of cast in C++. If that's news to anyone, go look up casting in a good C++ reference and find out what …

Member Avatar for ivosetyadi
0
217
Member Avatar for Jo_1660

[QUOTE=Jo_1660]... How do I write program to use both the current and previous values for volume? Im sure it can be done, I just can't figure out how to do it. ...[/QUOTE] If you only need one previous value, there is a simple answer to your question: Use two volume …

Member Avatar for Jo_1660
1
158
Member Avatar for eager04

[QUOTE=abu_sager]Hello Why you are using a c-style struct why you are not using a c++ class here you are a good example[/QUOTE] There is [i]nothing[/i] wrong with using a struct for the queue nodes here. If all you're storing are a few pieces of information, there's no need for an …

Member Avatar for gusano79
1
176
Member Avatar for Dani

As an exercise in procrastination and boredom, I found a thread over two years old and posted a reply.

Member Avatar for cybergirl
0
397
Member Avatar for Peewee

Programming languages are all fundamentally equivalent; try a few and pick the one that makes the most sense to you. As far as which one that might be, here's my $0.02: BASIC was designed to be a beginner's language (that's what the B is for). VB has outgrown that purpose …

Member Avatar for Slade
2
319
Member Avatar for dina

You already have the conceptual model, which defines the relationships between the entities you're modeling. A logical model addresses the organization of data within that model, [i]i.e.[/i] what tables and fields will actually be created and how they relate to one another (the "Relationships" diagram in MS Access is one …

Member Avatar for gusano79
0
523
Member Avatar for redelao

One reason why your memory buttons don't work: The array you're using to store the values is declared in the [font=courier]actionPerformed[/font] method. This means that as soon as the method returns, the array goes away forever. If you move the declaration somewhere with a larger scope, [i]e.g.[/i] make it a …

Member Avatar for gusano79
0
201
Member Avatar for Radahl

[QUOTE=Radahl]... the constant blinking that occurs when the repaint method is called has become quite annoying! ...[/QUOTE] Yes it is, especially if you're epileptic. Quick explanation: When you call [font=courier]repaint[/font], that ends up placing a call to [font=courier]update[/font], which does a [font=courier]fillrect[/font] to clear the drawing area and then calls …

Member Avatar for gusano79
0
406
Member Avatar for johnroach1985

[QUOTE=johnroach1985][CODE] ... Thread th_ciz; ... th_ciz=new Thread(this); ... bt_ciz.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ th_ciz.start(); } }); [/CODE][/QUOTE] Try this: Remove the declaration and definition of th_ciz (first two lines quoted above). Roll it all into the ActionListener: [CODE] bt_ciz.addActionListener(new ActionListener(){ public void actionPerformed(ActionEvent ae){ (new Thread(this)).start(); } [/CODE] Hm, …

Member Avatar for johnroach1985
1
176
Member Avatar for Radahl

[QUOTE=Radahl]... create a target with a recognizable boundary ... I need the boundary to be the exact shape of the circle ... Am I approaching this the right what? Do I need a special algorithm?[/QUOTE] All of that "isInQuad" setup is more complicated than it has to be, and it …

Member Avatar for gusano79
0
191

The End.