×

Langue

Fermer
Atelier 801
  • Forums
  • Dev Tracker
  • Connexion
    • English Français
      Português do Brasil Español
      Türkçe Polski
      Magyar Română
      العربية Skandinavisk
      Nederlands Deutsch
      Bahasa Indonesia Русский
      中文 Filipino
      Lietuvių kalba 日本語
      Suomi עברית
      Italiano Česky
      Hrvatski Slovensky
      Български Latviešu
      Estonian
  • Langue
  • Forums
  • /
  • Atelier 801
  • /
  • Hors-sujet
  • /
  • Programming
« ‹ 7 / 9 › »
Programming
Todorovski
« Citoyen »
1360755960000
    • Todorovski#0000
    • Profil
    • Derniers messages
    • Tribu
#121
  0
Already on the second page. :C
Bump!
Magicallina
« Citoyen »
1361158260000
    • Magicallina#0000
    • Profil
    • Derniers messages
    • Tribu
#122
  0
Meh, it would be nice if someone can correct or help me finish an Alphabetizer. (Preferably correct, since I'm pretty desperate)

a dit :

<form>
<textarea name="inputText" rows="5" cols="80" wrap="on"></textarea>
<p>
<input name="SortButton" type="button" onclick="SortText(this.form.inputText, this.form.outputText)" value="Alphabetize Words
">&nbsp;
<script language="JavaScript" type="text/javascript">
function reverseStrings(a, b)
{
if(a > b) //a comes after b, alphabetically
return(-1); //so sequence it earlier
if(a < before="" b,="" alphabetically
return(1); //so sequence it later
return(0);
}
</script>
</p>
<textarea readonly="" name="outputText" rows="5" cols="80" wrap="on"></textarea>
</form>

I was going to add a "while" or "for" loop, but I ended up derping.
I probably mixed up a lot things, in advance thanks... if someone decides to help, yep.
Fxie
« Citoyen »
1361159640000
    • Fxie#0000
    • Profil
    • Derniers messages
    • Tribu
#123
  0
Moepl a dit :
Actually, you can't really write a tfm-bot in javascript that runs _clientside_. You can try a workaround by running it on server with node.js which I think is a terrible idea. Even if want to do that, there are some parts which no sane person would do in javascript (e.g the bypassing the anti-bot-protections). Then there are some other parts in TFM like that it is not working with utf-8 but some other encoding and therefore you get problems like generating the passwordhash (for the htmlforums I did, I simply let php do that, cause I couldn't get it working in js).

The point is: a tfmbot in js is impossible just on the clientside and a very bad idea in general. Don't do it :P

How do you know it's impossible if you don't know everything about JS? I've never gotten into it, so I'm not sure how to make a bot myself to begin with, but I assume it's as simple as sending data, which could easily be done with websockets?

If you can give me source code for a bot in whatever language you use, I could probably figure it out in JS. Unless it's more work than I'm willing to put forth for this game (the security bits).
Cptp
« Citoyen »
1361159880000
    • Cptp#0095
    • Profil
    • Derniers messages
    • Tribu
#124
  0
Magicallina a dit :
Meh, it would be nice if someone can correct or help me finish an Alphabetizer. (Preferably correct, since I'm pretty desperate)
I was going to add a "while" or "for" loop, but I ended up derping.
I probably mixed up a lot things, in advance thanks... if someone decides to help, yep.

Why are you writing your own comparison function? Your function should:
a) Split the string into words using `split`
b) Sort the words using `sort`
c) Join the words back into a string using `join`

You can get and set the form fields using the `value` property.
Dingleberey
« Citoyen »
1361163360000
    • Dingleberey#0000
    • Profil
    • Derniers messages
#125
  0
Fxie a dit :
but I assume it's as simple as sending data, which could easily be done with websockets?

I lol'd
Fxie
« Citoyen »
1361171400000
    • Fxie#0000
    • Profil
    • Derniers messages
    • Tribu
#126
  0
Dingleberey a dit :
I lol'd

If you'd like to elaborate, explain, or just plain contribute anything it'd be appreciated.
Cptp
« Citoyen »
1361176800000
    • Cptp#0095
    • Profil
    • Derniers messages
    • Tribu
#127
  0
Since when does JS have TCP sockets? If it doesn't, it's impossible to make a bot using only client side JS. WebSockets are different to TCP sockets.
Fxie
« Citoyen »
1361181660000
    • Fxie#0000
    • Profil
    • Derniers messages
    • Tribu
#128
  0
It would be nice if that clarification, along with further clarification was made considering this thread contains programmers of all levels and specializations.

I work client-side and have only done anything with servers rushed and messily in the past, and if you're knowledgeable about it I think you should probably share instead of "lol" or merely assuming that if you know something, everyone must (which many people appear to do, and it comes off as very arrogant).

To be honest, I don't know much of the terminology, but from a quick search it sounds like WebSockets is TCP-based. I'm not sure if that's what you mean, and if not can you clarify?
Cptp
« Citoyen »
1361209680000
    • Cptp#0095
    • Profil
    • Derniers messages
    • Tribu
#129
  0
WebSocket is a message passing protocol on top of TCP. You can't use JS to open a "raw" TCP socket to send and receive arbitrary bytes. If you could it would be a massive security problem.
Magicallina
« Citoyen »
1361238360000
    • Magicallina#0000
    • Profil
    • Derniers messages
    • Tribu
#130
  0
Cptp a dit :
Why are you writing your own comparison function? Your function should:
a) Split the string into words using `split`
b) Sort the words using `sort`
c) Join the words back into a string using `join`

You can get and set the form fields using the `value` property.

Alright, thank you very much! o/
Lunoru
« Citoyen »
1361347680000
    • Lunoru#0548
    • Profil
    • Derniers messages
    • Tribu
#131
  0
Nice, I've read a lot from this threat althow Understood not so much as I read. I wana ask, what and where should I learn (Or atleast gain basics) to code a standalone like bafflers, or dualmouses?
Tummnus
« Citoyen »
1363046100000
    • Tummnus#0000
    • Profil
    • Derniers messages
    • Tribu
#132
  0
Sonicherois a dit :
Nice, I've read a lot from this threat althow Understood not so much as I read. I wana ask, what and where should I learn (Or atleast gain basics) to code a standalone like bafflers, or dualmouses?

Don't just simply pop out without knowing a lot and just make a program,Start to simply learn Java &amp; C++ those I would say are the most important. Or they are to me,atleast.

Contact me in Cheese.formice.com if you would like.

I love this thread <3
Greekyogurt
« Citoyen »
1363047660000
    • Greekyogurt#0000
    • Profil
    • Derniers messages
    • Tribu
#133
  0
My grandmother is more knowledgeable about the computer than I am. Would someonly kindly brief and summarize programming to me, explaining how difficult you'd think programming would be for me to learn?
Force_shaman
« Censeur »
1365708120000
    • Force_shaman#0000
    • Profil
    • Derniers messages
    • Tribu
#134
  0
Greekyogurt a dit :
My grandmother is more knowledgeable about the computer than I am. Would someonly kindly brief and summarize programming to me, explaining how difficult you'd think programming would be for me to learn?

Kind of a necrobump, but if you haven't gotten your answer yet it's not that complicated to learn the basics. VB was what i started with and it was a breeze.
Deletedaccount
« Citoyen »
1366248300000
    • Deletedaccount#6007
    • Profil
    • Derniers messages
#135
  0
What other programming languages would be somewhere simple to start with? Or are Java and C++ the two major ones for newcomers into the field?

I ask because this summer after Uni, I'll have about 4 months off to do...nothing. So learning some code would be nice :D
Tranna
« Citoyen »
1373210340000
    • Tranna#0000
    • Profil
    • Derniers messages
    • Tribu
#136
  0
Please mute/warn me if needed .3.

Anyway, I know HTML, CSS and PHP, I'll learn Javascript soon. Hopefully.. And Thunder, PhP is easy. You only need a knowledge of HTML.
Tailtong
« Citoyen »
1373212500000
    • Tailtong#0000
    • Profil
    • Derniers messages
    • Tribu
#137
  0
writing stuff with html is easy
Baasbase
« Citoyen »
1373388360000
    • Baasbase#0095
    • Profil
    • Derniers messages
#138
  0
If you're into making desktop applications it's either java or a C based language. Java being the simplest to learn (syntax and codestyle wise) and C++ being the older and slightly more powerful variant, that is if you know what you're doing. If you're into making web-pages/applications you should consider using a combination of html and javascript and/or php.
Everyone has their own taste in either language and/or coding style so there's really no point in argueing which/who is better.

o/

Edit: As for some more random info
I'm in the process of creating a 2D gaming engine solely written in Java. This includes both the client and server framework. For those in doubt of the powers of Java should know that you can do pretty much whatever you please for both windows and unix platforms.
Cheesehogga
« Citoyen »
1373597640000
    • Cheesehogga#0000
    • Profil
    • Derniers messages
    • Tribu
#139
  0
Todorovski a dit :
Hello programmers! *-*
Here you can talk about the programming languages you know!
Everything is allowed-- From Paskal to Scratch, from C++ to Java, etc!
You can also share some programs/games/apps YOU made if you want to.
Also, if you need any help for your programs you can ask here.

Note: There's a free Javascript compiler online which is alot easier than the real Javascript .js programming. http://www.khanacademy.org/cs/

try codeacademy.com

_________

Html is easy. Im learning python command line and javascript from Codeacademy Its completly free
Bumblet
« Citoyen »
1382990580000
    • Bumblet#0000
    • Profil
    • Derniers messages
#140
  0
Cheesehogga a dit :
try codeacademy.com

_________

Html is easy. Im learning python command line and javascript from Codeacademy Its completly free

I learnt most of my coding from Codeacademy
  • Forums
  • /
  • Atelier 801
  • /
  • Hors-sujet
  • /
  • Programming
« ‹ 7 / 9 › »
© Atelier801 2018

Equipe Conditions Générales d'Utilisation Politique de Confidentialité Contact

Version 1.27