Javanian's Posts
Nairaland Forum › Javanian's Profile › Javanian's Posts
1 2 3 4 5 6 7 8 ... 30 31 32 33 34 35 36 37 38 (of 57 pages)
@ all the Programmers here, why are you guys never in the programming section??... ![]() |
Your welcome, happy you solved it... |
Temas: Thanks for your response, am using the isalpha to make sure the input or text are all alphabet. Will try ur suggestion and get back.Your welcome but my previous suggestions may not work if isAlpha() does not see a white space as a character... |
You can also try something like this... if (ourinput[count]==' ') |
Temas: the program only takes the 1st string and encrypt it (how) and neglect the rest, but if. First of all some methods/functions are missing in your program. BUT i think this happens because a 'white space' is not seen as a character and you are using a char[]. So it stops the encryption when it reaches the white space. I would have loved to see what isalpha() does... OPTION 1: use a String[] instead of a char[] OPTION 2 convert the String to a char[] before encryption But it all depends on what the isalpha() does...Hope this helps... |
Paste your code here... |
Your question is too vague ![]() |
A-ZeD:still < 18 ![]() |
Capnd143: Actualy any programer who has passion for games can dive into game programing without much stress.i disagree!! In other news, Na who carry this thread come front page?? ![]() |
Danyl: thanks 4dat piece,actually am building a kinda Q & A engine and arrays wönt handle d problem,der will b times wen i might want to remove an element frm d storage,dats not possible with array, Wrong! It is possible. Just that using a list in the java.util package is easier and would save more time... List should do it but I'm looking 4 a datastructure dat stores using a key-value mapping that is y i used Maps in d first plc. Searching for key value pairs workd on it, but when trying to print the all d stored key-value entries only one record ws returned,so am trying 2figure a way out.well, i don't know exactly what you have in mind to acheive but if it is the Q and A game i have in mind, i see no reason why i should use a map...all the same use what ever works... |
I think you are just playing around with these data structures. A map and a list have different uses, each has its strength and weakness. It all depends on what you are trying to acheive. If the size of the data is known, then a list is even an overkill. You could have just used a simple array. Maps are mostly used when you want to store data in a key-value system. It could be a hash map, TreeMap a dictionary e.t.c. I don't know if there is a data structure that would efficiently help you in what you are trying to acheive but to find duplicates in your data structure you can search through it for duplicates before inserting. I suggest you use something like a binary search which would run in O(logN) time (i think) but its way better than looping through it which would run in O(N) time at best case. But for effieciency you would have to sort the data with preferably a quick sort or anyother type of sort before searching. I think there is a data structure like a set(Set, HashSet and linkedHashSet) that doesn't allow duplicates. I once used it, you can go with this if you are looking for an easy way out but am not too sure of the efficiency...Hope this helps... |
expertfingers: A game developer is still aTrue, but a not every 'programmer' can be a game developer... |
Afam4eva: Whether it is childs play or not does not mean that programming is not programming.Programming is NOT programming. Most of the 'programmers' i see here only know how to create database applications... I'm not the type that knows how to argue much...Talk is cheap!..., take a crash course on game programming, graph theories, game trees, or try implementing something as simple as minimax algorithm with Alpha-beta prunning for a simple game like X and O's or even chess. Even try laying your hands on something like dijkstra's algorithm. Try creating an A.I. For any of these games, only then would you understand what i mean...Talk more of creating a more complex games like the Pro Evolution soccer you see. This isn't PHP my brother, this is basically C++ and less of JAVA. |
Afam4eva: Programming is programming irrespective of what you're programming. It's just that some people prefer to program stand alone desktop application while some others prefer to code game applications. That doesn't mean they can't do either if they want.i beg to disagree...Programming is not programming @o.p. Game Programming aint childs play... |
@ omo_to_dun please make out time and visit this thread later https://www.nairaland.com/1198612/matrix-permutation-problem-applicable-cluster Am out! |
. |
. |
. |
. |
. |
. |
. |
. |
. |
1 2 3 4 5 6 7 8 ... 30 31 32 33 34 35 36 37 38 (of 57 pages)

