littlewhitey's Servers Forum (SA-MP/VC-MP/MTA/Zomboid)
Other => Off-Topic => Programming => Topic started by: SKY on October 09, 2012, 09:20:05 PM
-
Hi guys i just wanted to know if any one else is into coding with languages such as java. I know blewert codes with similar languages, but i wanted to know if anyone else is itnerested in this stuff :D
-
Why?
-
i can do java, a little html and i am decent with c++
-
i can do java, a little html and i am decent with c++
nice :D im just learning it so far but its intresting if you ask me :P
-
A bit all of them: VB, C++, Pawn.
-
i hate java.. shit never works. i copy some shit into it, compiler says 73 errors. all this fucking classes... your programs are a fucking maze in the end. so freaking annoying.
i love c++. its so... rustic and fundamental
but i still prefer my sage editor for command and conquer generals.. :)
-
Im trying to learn HTML5 at school but its not going that well. Basically they just want us to copy stuff from the book and learn it that way lol... I wanne be able to learn HTML5 and CSS3 but its hard for me.
-
Im trying to learn HTML5 at school but its not going that well. Basically they just want us to copy stuff from the book and learn it that way lol... I wanne be able to learn HTML5 and CSS3 but its hard for me.
nub:)
luckily our HTML teacher is awesome.
we use phase5, he usually gives us a screenshot of a website we have to rebuild. and we use some online help database (selfhtml) if there is something we dont know yet.
-
i once did some nubzord stuff with java, but i prefer programming with erlang.
-
C Sharp all the way.
-
Im trying to learn HTML5 at school but its not going that well. Basically they just want us to copy stuff from the book and learn it that way lol... I wanne be able to learn HTML5 and CSS3 but its hard for me.
nub:)
luckily our HTML teacher is awesome.
we use phase5, he usually gives us a screenshot of a website we have to rebuild. and we use some online help database (selfhtml) if there is something we dont know yet.
We use different kinds of editors, but im using Coffee Cup, and we use w3schools to check if we dont know something. And we also have to check our codes every time on some website if our code is HTML5 or not.
-
Java is my primary due to both my university and Android depending on it. Other languages I am familiar with include C, C++, C# and obviously Pawn.
I would love to get fully into Python, it's just a matter of time. Perhaps I will have more time at the end of the year to learn it.
C Sharp all the way.
I love C# and the tools Microsoft provides. Microsoft generally treats the developers very well in terms of tools. I would prefer C# to Java (I don't like Oracle) as it seems to be more modern.
-
I was deciding to learn java at school but i did something else :P
-
if anyone is interested i can post my codes for my basic programs here :P. As i said im just learning , i mean the best thing im making so far is a calculator LOL.
-
if anyone is interested i can post my codes for my basic programs here :P. As i said im just learning , i mean the best thing im making so far is a calculator LOL.
Are you self-teaching or learning as part of a course? You should get a Bitbucket or Github account to store your code.
-
Well i asked in a conversation with my coach/mentor at school and im getting a bit of java as well. Oh joy... lol
-
Srrry for the double post.
But does anyone have a good website with all kinds of info on java like tutorials and such. I kinda want to get a headstart at java before we get it at school so i know what they are actually talking about.
im thinking w3schools.org is good ? I learned pretty much everything i know now about html5 and css3 there.
-
Hey Benny
Especially for you, the best java lectures I've found so far. Enjoy!
http://www.youtube.com/playlist?list=PL84A56BC7F4A1F852 (http://www.youtube.com/playlist?list=PL84A56BC7F4A1F852)
-
cool.
ill give it a try tomorrow since my java teacher is fully retarded
-
Hey Benny
Especially for you, the best java lectures I've found so far. Enjoy!
http://www.youtube.com/playlist?list=PL84A56BC7F4A1F852 (http://www.youtube.com/playlist?list=PL84A56BC7F4A1F852)
Im not gunna be watching all those vids. I need something more simple like w3schools or something you know. Plus those vids are a guaranteed bore for me and ill be likely to fall asleep
-
I can "code" pawn
-
If you can do pawn, you also can do C.
If you can do C, you'd also have no great problems doing java.
-
If you can do pawn, you also can do C.
If you can do C, you'd also have no great problems doing java.
With C you mean C++ ?
-
If you can do pawn, you also can do C.
If you can do C, you'd also have no great problems doing java.
With C you mean C++ ?
No C and C++ , are both differnt programming C++ > C
-
Hey guys im back with a question, im making a tic tac toe game in java eclipse. The game is based on using an array so its 2d and it jusy takes the users x and y coordinate to play a X were they want and they try to beat a dumb cpu. Anyways for those using java or who wanwt to help, i was wondering how i would go upon checking the winner for the game? I tried using if statements and for loops but i couldnt get how to specifically get it working. I currently have everything working except the win check.
if you need my code ill post here. Thank please reply or leave a comment
-
beat a dumb cpu.
a PLC u mean ? (those are dumb CPU's just FYI)
-
beat a dumb cpu.
a PLC u mean ? (those are dumb CPU's just FYI)
its just a stupid ai lol
-
Well, winning tic tac toe is (obviously) a matter of getting 3 stones in either one vertical, horizontal or diagonal line, right? Supposing the tic tac toe field is 3x3 there should be exactly 8 possible ways of achieving this, 3 vertical, 3 horizontal, 2 diagonal. For the sake of simplicity and through sacrificing some efficiency you could simply save those 8 combinations, and compare it with the player's draws. If the pattern the player klicked contains such a row, he wins. Same for ai. If none, no-one wins.
Would be my first idea so far, haven't played it in a while yet, might think about something more later.
-
Hey guys im back with a question, im making a tic tac toe game in java eclipse. The game is based on using an array so its 2d and it jusy takes the users x and y coordinate to play a X were they want and they try to beat a dumb cpu. Anyways for those using java or who wanwt to help, i was wondering how i would go upon checking the winner for the game? I tried using if statements and for loops but i couldnt get how to specifically get it working. I currently have everything working except the win check.
if you need my code ill post here. Thank please reply or leave a comment
how do you read the color of the one field?
if you know that then its a piece of cake because you can simply write all possible winning combinations down stupidly. as enzo said those are only 8 different ways to win.
like this, considering that the colors are black and white and that the fields are named like this:
1 2 3
4 5 6
7 8 9
*IF*
Field 1 = white
and
Field 2 = white
and
Field 3 = white
*OR*
Field 4 = white
and
Field 5 = white
and
Field 6 = white
*OR*
Field 7 = white
and
Field 8 = white
and
Field 9 = white
*OR*
Field 1 = white
and
Field 4 = white
and
Field 7 = white
*OR*
Field 2 = white
and
Field 5 = white
and
Field 8 = white
*OR*
Field 3 = white
and
Field 6 = white
and
Field 9 = white
*OR*
Field 1 = white
and
Field 5 = white
and
Field 9 = white
*OR*
Field 3 = white
and
Field 5 = white
and
Field 7 = white
*THEN*
White wins
unfortunatly i have no idea how your program works so all i can provide is this pseudo code. of course the above code is simplified to the max.
-
I obviously need to do some research before i dive into the world of java head first :o
-
im learning code as well ;) i can change it any wich way i wish usually, but i cant ever write it all from scratch.. i also gotta self teach myself.. any tips for me as well would be much appreciated! awesome! any websites and book names would be good too ;) ima learn C++ and java.. currently reading up on java.. is that bad? i hear u guys dont like it. lol
-
Anyone started to use java recently? Im beginning to learn it at my computer science class. ;D
-
http://imgur.com/gallery/o3I3R (http://imgur.com/gallery/o3I3R) i found this very useful.
-
Hi guy's for my computer science class I been practicing using the string class, I created a method to create three random letter where the first and last are consonants and the middle is a vowel. The method tries to create the word cat. Here is my code http://pastebin.com/VFC1J53T (http://pastebin.com/VFC1J53T) if anyone know's a simpler way to do this please let me know. Also can someone explain why for k = r.nextInt(21) + 1; , were r is a random object to create a random integer between 1 and 21, I had to add 1? :)
-
return word;
word = firstWord + secondWord + thirdWord;
System.out.println(word);
the two bottom lines are unreachable code. Return obviously returns from the method to the main program, thus ends the execution flow of the method before your word is set, your return should be NULL. Have you tried this method even once? ???
(Also Eclipse should mark unreachable code)
Simpler way:
public static String createWord() {
String word = "cat";
return word;
}
r is a random object that is used for random real values between 0 and 1. The method nextInt(int n) returns a pseudorandom integer number between 0 (inclusive) and n (exclusive) on a random object.
Thus r.nextInt(21) gives a random int between 0 and 20, adding +1 shifts the range from 1 to 21.
while(true){
My laptop overheats just by seeing this.
-
I made my own version of your code in pawn.
Check it out and you might learn a thing or two, if you're lucky.
http://pastebin.com/wxZfZU9f (http://pastebin.com/wxZfZU9f)
As enzo said above though, there are easier ways to do this, but i guess it's for educational purposes.
-
I made my own version of your code in pawn.
Check it out and you might learn a thing or two, if you're lucky.
Lol not even my professors are so "modest", and they are genius ;D
Btw i don't know how much it could help him since it's another programming language
while(true){
My laptop overheats just by seeing this.
lmao
-
Lol not even my professors are so "modest", and they are genius ;D
what exactly are you implying here? lol
-
Thank's Fuse and Enzo for the help, also I noticed i pasted the wrong code but its the same thing but without the error after the return. http://pastebin.com/jBB61mfr (http://pastebin.com/jBB61mfr)