Dmitri Makovetskiy

Ranch Hand
+ Follow
since Jun 21, 2010
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Dmitri Makovetskiy





did i do it right. first, make a function to check the head , whether to remove it, and then call for a function to remove nodes from the body, and transfer the chain underneath to another node..

one thing that i didnt understand is why do you need addUnit(right), addUnit(left) .. in the order described in the remove functions?
14 years ago

David Newton wrote:Please KeepItDown.

So, follow the code: I'm still not convinced you ever work out anything on paper--this is a *critically* important skill.

1) What does BTree.add(int) do?
2) What does the Node constructor do?
3) Question answered, correct?

That's all it takes: you only had to look at a few lines of code to determine the answer.



Newton , i scanned the whole thing. i know where the info comes from

but what value does the current.info has got?
14 years ago

David Newton wrote:...

Is this code that you wrote yourself?



NO, NEWTON, it is my teachers code. i understand that. but i dont understand the line which i marked
14 years ago


the algorithm above should give me a binary tree. i have one question. what current.info represent? what number?
14 years ago

David Newton wrote:You're a ways off from being able to provide those services--best to focus on basics for now.



we are not talking about now, we are talking about future.


how difficult is it to convert a webpage from pc to iphone?
14 years ago
iOS

John Todd wrote:Man, you should really decide by now.
https://coderanch.com/t/505960/iphone/Mobile/learning-program-iphone-worth-it



TOD, i thought to combine iphone with my webmaster course that i am taking. may be i could offer a service that combines iphone with webdesign.

i wondered if that thing is possible
14 years ago
iOS

David Newton wrote:You start on the Apple iOS developer site, possibly by picking up a book or two, learning Objective-C, and buying a Mac if you don't already have one.

Yes, it will confuse you learning both at the same time: if you were more advanced at Java/programming in general, I don't think it would be a major issue. But it's even *more* important when using C-like languages to pay very close attention to what you're doing. And if your OO fundamentals are weak, the combination of C and Smalltalk isn't likely to go over very well.



thank you for pointing this up.

i need to be patient :(

what if i learned iphone first and java then, a question, just for curiousity
14 years ago
iOS
and where do you start.


i learn java now. will it confuse me learning them simultaneously?
14 years ago
iOS

Campbell Ritchie wrote:Do you have Pawn objects and Bishop objects and Knight objects, etc?



i do have all that!!!

here is my array of pieces in the main:

The class that is called ChessInterface






ChessPiece is the name of my abstract class:




all the algorithm of hte chess piece collsion is inside the method in the rook (or bishop class, they are quite similar..but different enough)



what intrigues me. how that pieces array behaves? may be it doesnt work cause of jumbing between classes and methods\| cause i have an if condition that counts or is aware of whether there is an object or condition
14 years ago

David Newton wrote:The code above will not compile--do you understand that? You need to post the exact code that doesn't work the way you expect, you need to state how you want your code to work, and so on.




my code does compile. i used it for 3 days, i feed it with different values.


try to see whats the problem when you copy it and paste it. may be you are missing a bracket
14 years ago

David Newton wrote:If the debugged bishop code works, what's the issue? The rook code?

You're confusing on several levels... And please, *please* format your code.




The debugg works. cause i put everything in a class. but in my original code i put the things in one method and call it from the main. that kind of order makes it fail..
it doesnt pay attention to the objects.. it counts every piece as a null
14 years ago

David Newton wrote:(And I can't tell if you have a cut-and-paste error in your code, or if it's what you really mean: perhaps posting an explanation of your algorithm would also be useful to the dwindling number of people that are still trying to help.)



The bishop and the rook algorithm is based on the same principle they both dont work on the same principle


here is bishops debugged code. works..

just feed new numbers and see for yourself. you could also add or remove the nulls from an array.


>
14 years ago

David Newton wrote:I think you misunderstood me: an "error" is anything that doesn't work the way you want it to. What I asked for was a board configuration that exhibits the error--rather than making us reverse engineer *everything*, provide an SSCCE for us to examine. It's difficult enough to read your code without having to also figure out how to create a scenario that causes the undesired behavior.




newton, i can give you the code after i debugged it. it has a different array (of strings) and 4 variables to change to move the pieces (rowstart, columnstart.....), other than that everything else is the same. all the algorithm
is copied and pasted....



i think conceptually something happens that prevents my if test to be executed. i dont know how to reach teh sscce code
14 years ago

David Newton wrote:It'd be a lot easier to help if you posted a board configuration that exhibits the error/




it doesnt show any error. the bishop piece simple moves to any position i ask it too and the game continues.
so for example,

bishop from 1,1 to 8,8. it will be there. and it doesnt listen to the rule .. if(pieces[][]==null... it considers everything as null
14 years ago