679 Posted Topics
Re: 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 … | |
Re: 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 … | |
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 … | |
Re: [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 … | |
Re: [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. … | |
![]() | Re: 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 ) ... … |
Re: [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 … | |
Re: 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 … | |
Re: Have a look at [url=http://www.libsdl.org/index.php]SDL[/url]--it's pretty nifty. | |
Re: [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 … | |
Re: [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 … | |
Re: [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 | |
Re: [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 … | |
Re: [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 … | |
Re: [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] … | |
Re: 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] … | |
Re: [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 … | |
Re: [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 … | |
Re: [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 … | |
Re: [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 … | |
Re: [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 … | |
Re: As an exercise in procrastination and boredom, I found a thread over two years old and posted a reply. | |
Re: 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 … | |
Re: 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 … | |
Re: 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 … | |
Re: [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 … | |
Re: [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, … | |
Re: [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 … |
The End.