Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
22% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
3
Posts with Downvotes
2
Downvoting Members
3
0 Endorsements
~4K People Reached
Favorite Forums
Favorite Tags
java x 16
c++ x 12
Member Avatar for Kuroshi

Hello everyone! I would like to know if there is a way to write false in SWI Prolog instead of error. The situation is the following: I have written a prolog program that says if a statement is a formula or not, for example: ?- fmla(or(a,b)). Answer = true The …

Member Avatar for rubberman
0
178
Member Avatar for Kuroshi

public static void removeEvensVer1( List<Integer> lst ) { int i = 0; while( i < lst.size( ) ) if( lst.get( i ) % 2 == 0 ) lst.remove( i ); else i++; } According to my understanding, shouldn't this method be N^3? Since you have a while loop (N) * …

Member Avatar for JamesCherrill
0
79
Member Avatar for Kuroshi

The question is pretty straightforward, does BigInteger have a limit? From what I know it is only limited to the amount of memory available on the system, nothing else. This question arose when my instructor told me that one could not calculate 50! using BigIntegers, which I believe one can. …

Member Avatar for JamesCherrill
0
158
Member Avatar for Kuroshi

I get this compiler error: `Monster' was not declared in this scope, in this code: [CODE]#ifndef ROOM_H #define ROOM_H #include <stdio.h> #include <stdlib.h> #include <time.h> #include <vector> #include <iostream> #include "Monster.h" using namespace std; const int ROWS = 20; const int COLS = 20; class Room { private: vector<int> indexes; …

Member Avatar for VernonDozier
0
122
Member Avatar for Kuroshi

I am experiencing problems with this function: void move (Room&); For some reason the compiler is saying that this is a variable or field, here is the implementation: [CODE]void Monster::move (Room& room) { vector<int> iCoordinates; vector<int> jCoordinates; for (int i = x - 1 ; i <= x + 1 …

Member Avatar for Kuroshi
0
324
Member Avatar for Kuroshi

I learned that a boolean does not need all the memory space it is provided in order to display true or false (1 or 0), but since the lowest space computers can work with is byte it was expressed as that. I also read that there are ways to store …

Member Avatar for Fbody
0
186
Member Avatar for Kuroshi

I made a program using Sockets, pretty interesting, but I have found some "problems" that bother me, my game is threaded and in its run method it has a lot of if statements for the different behaviors when it receives a certain String from the server. Is there any other …

Member Avatar for Kuroshi
-1
1K
Member Avatar for Kuroshi

I want to learn how to connect computers so I created a game for 2 players that was played on the same computer, now I want it to be played on a network. I have been trying to do this with sockets. I have a server class: [CODE]public class WordsGameServer …

0
95
Member Avatar for Kuroshi

I have been trying to make my program load the images while using web start with no success. The following code is inside an extended JButton class. Image is a string containing the address of the desired image ("0.jpg", for example), I know that this would only work if the …

Member Avatar for Kuroshi
0
141
Member Avatar for Kuroshi

Lets say I need to compare the x position of a ball with the x position of a rectangle to see if they have collided. Wouldn't it be easier to just declare x in ball as public so I can use ball.x instead of ball.getX()?

Member Avatar for mrnutty
0
90
Member Avatar for Kuroshi

Lets say I have a JPanel and an object called ball inside of it, instead of creating gets so the JPanel can draw the ball image I would like the ball object to draw itself on the JPanel. Is it possible? Thanks :D.

Member Avatar for Kuroshi
0
581
Member Avatar for Kuroshi
Member Avatar for Kuroshi

I tried to create an array that would increase its own size depending on the user's action. For example: The user types the name of one contestant, the array contains only one element (the name), later the user enters another contestant, the array becomes an array of 2 elements, each …

Member Avatar for Kuroshi
0
172
Member Avatar for Kuroshi

I have already done most of the program, ask the user for the move, see if it is a valid move, make the move, test if the perimeter is full, etc... but now I see myself troubled with testing if someone has won the game, I could just make a …

Member Avatar for Kuroshi
0
143
Member Avatar for Kuroshi

I was trying to make a function to take the square root of a number (which does not work completely, yet), but while I was coding it, I found an strange "error", this is the code: [CODE] #include <iostream> #include <cstdlib> using namespace std; int main() { double number; cin …

Member Avatar for WaltP
0
99