Jump to content

whackatre

Member
  • Content count

    102
  • Joined

  • Last visited

  1. whackatre

    Web-Crawler

    cool. you could use something like [url]http://jsoup.org/[/url] next time.
  2. Separate the logic from the UI stuff. For small programs, disorganization is fine. If you plan to make anything larger, consider thinking about design; maintainability is very important.
  3. You put SVN and not Mercurial? Anyway, - [url]http://mercurial.selenic.com/[/url] - [url]http://hginit.com/01.html[/url] Also Clang is cooler and arguably nicer than GCC.
  4. spaces as delimiters is kinda ehh but hi sini
  5. whackatre

    Loops

    [code]Welcome to Racket v5.3.4.1. > (define (wat-do n) (displayln (string-append "Day " (number->string n) ": Learn recursion because it's cool.")) (sleep 0.5) (wat-do (add1 n))) > (wat-do 0) Day 0: Learn recursion because it's cool. Day 1: Learn recursion because it's cool. Day 2: Learn recursion because it's cool. Day 3: Learn recursion because it's cool. Day 4: Learn recursion because it's cool. Day 5: Learn recursion because it's cool. Day 6: Learn recursion because it's cool. Day 7: Learn recursion because it's cool. Day 8: Learn recursion because it's cool. Day 9: Learn recursion because it's cool. Day 10: Learn recursion because it's cool. Day 11: Learn recursion because it's cool. Day 12: Learn recursion because it's cool.[/code]
  6. [quote name='Ishana']Maybe you could explain to me what does "type of abstraction" is? or what does it mean? I seriously don't know :/ [MENTION=235]Ryan[/MENTION] I did not need someone to spoonfeed me, I wanted some examples so I can understand enums. Anyways [code] static { for (Bow bow : Bow.values()) { bows.put(bow.id, bow); } } [/code] I understand the loop here, but I need to know why do we use static { before it?[/QUOTE] i'm probably shit at explaining what it is, so just look it up [url]http://en.wikipedia.org/wiki/Abstraction_(computer_science)[/url] [quote name='Ishana']Like a class constructor but instead it works even if it is not called?[/QUOTE] read up on initialization types and check out how the static block works you don't _need_ a key => val structure (map) in an enum, but some people like to do it for whatever reason
  7. you might want to try the enum solution as Ryan demonstrated. having multiple hard-coded multi-dimensional arrays whose data can be represented much better as other data types tends to be ugly and bad. by the way, your question is very bad and you should feel bad. "which one is better" is a terrible question; your question is much better reworded as "which one would be the most appropriate type of abstraction to use in my current task of data representation".
  8. [quote name='J i m b o']You guys are awesome, and I appreciate the feedback. Thanks for providing your code, I really enjoy going over it! I'm really just using this to keep my mind in the mode of it until I go to college in the fall for "Computer programming - AAS". My main issue right now is just simply figuring out how to break problems down (which from my understanding is the JUST of programming), so as of right now I'm still trying to work on that "Programmer's state of mind." haba [MENTION=153]Trey[/MENTION] Math is a horrible subject for me, which could possibly be my downfall. From my understandings none of the classes I'll be attending have a math prerequisite.[/QUOTE] don't understand the structure of program? read SICP it is the _definitive_ book on program structure and logical analysis and will definitely make you a better programmer also do the exercises and to be honest with you i've only done lisp for about a month so i wouldn't consider myself even close to being an expert at it but already it's a terrific language (read SO and the XKCD comics on fp and lisp enlightening.) also this was used as a mandatory course in MIT and a few other superior universities a while ago (most of them got rid of it and replaced it with java (lol) because it was too hard and too many students flunked the class.) so yeah, it will probably be a challenge. sicp in pdf format: [url]https://github.com/sarabander/sicp-pdf[/url] gr8 impl of scheme: [url]http://racket-lang.org/[/url] have fun
  9. on chrome clicking "prevent this page from creating additional dialogs" is a huge mess... either make your program check for eof or don't use an infinite loop. is there another way to get source code other than right click -> view source? that was annoying too.
  10. if you're running debian/ubuntu: sudo apt-get install apache2 sudo apt-get install php5 php5-mysql libapache2-mod-php5 you might want this too: sudo apt-get install phpmyadmin
  11. [quote name='Steve']ok so this is pretty much stackoverflow?[/QUOTE] except it's full of idiots (ie. [url]http://rawpaste.com/questions/514784303fc1c/What-does-PHP-stand-for[/url])
  12. [url]http://stackoverflow.com/questions/7352493/failed-to-load-the-jni-shared-library-jdk[/url]
  13. If the server administrator can't bother using SSH to manage his or her server (I'm sure there's a client for the iOS) then I would assume he is either a lazy fuck or incompetent (or in other words, unsuitable to run a server). For convenience purposes which are used occasionally, yes. I think your idea of a frontend might be useful for certain individuals. A few questions you should consider: - Design: what approach will you use? I'm assuming you're going to make this compatible with as many server bases as you can, so what design pattern(s) will you use to make it less tedious for people to integrate? - Practicality: are people actually going to use this? Balance between that and user-friendliness? If you always can't be fucked, my idea is using an IRC bot that serves as a gateway between the game server and the VPS. Security's always a massive issue to consider, though (this goes for all approaches already, but I think you already know that).
  14. [quote name='JaguarNCS']You need to reword your post. It's confusing. Although there is a way, it's called Dropbox. [video=youtube;texcunJ_ZFQ]https://www.youtube.com/watch?v=texcunJ_ZFQ[/video][/QUOTE] u need to stfu. Dropbox is great for the general user (to manage homework, pictures, and other files) but it's a terrible version control system, in that it's extremely tedious and lacking functionality. Using something actually designed for programming like Git, SVN, Mercurial, etc. would be optimal (careful: the learning curve may initially throw you off were you to try one of those). However, if you don't really care about your project (keeping a long history of past versions, etc.) then Dropbox might suffice. If you take a look at any large open-source project you won't be finding anybody using Dropbox. Use Git; I highly recommend it. There's even GUIs for it if you don't like using the command line interface.
×