PC Gaming News
Page 10 of 11 FirstFirst ... 67891011 LastLast
Results 91 to 100 of 108
  1. #91
    GWOnline Content Team
    GWOnline Site Pal
    Achievements:
    Social10 PostsVeteranCreated Blog entry10K Posts
    Alaris's Avatar
    Server

    Kaineng
    Guild

    The Order of Dii [Dii]
    Posts

    29,751
    My goal for today: enter the stats for all weapons and ammo, and time permitting, self-heals and utility as well.

    I have a lineup of 17 types of weapons or ammo for a total of 85 skills. There is some redundancy in there, mostly because some skills are likely to be favorites and thus I provide more than one way to have them equipped.
    == Alaris & clone ==
    Proud Officer of The Order Of Dii [Dii] - join us
    You can tell the quality of life of people by what they complain about

  2. #92
    Achievements:
    Social10 PostsVeteran10K Posts1,000 Posts
    Mehtis's Avatar
    Server

    Gandara
    Guild

    Dii
    Posts

    11,162
    Made a program today (for school, in Java) that count binomial coefficients and prints out the Pascal's triangle. One last requirement is to print out 2^n so that the n is nicely up there as a power, but just can't find (google) the answer. Any help?

  3. #93
    Quote Originally Posted by RealMehtis View Post
    Made a program today (for school, in Java) that count binomial coefficients and prints out the Pascal's triangle. One last requirement is to print out 2^n so that the n is nicely up there as a power, but just can't find (google) the answer. Any help?
    Are you asking about how to print superscript (little numbers above, like 2²)?

    There are Unicode characters for all superscript numbers.

  4. #94
    Achievements:
    Social10 PostsVeteran10K Posts1,000 Posts
    Mehtis's Avatar
    Server

    Gandara
    Guild

    Dii
    Posts

    11,162
    Superscript. That's the word. Thank you.

    EDIT: Well, can't still figure out how to put one of those Unicode characters in text.
    Last edited by Mehtis; 20-02-2012 at 14:25.

  5. #95
    Quote Originally Posted by RealMehtis View Post
    Superscript. That's the word. Thank you.

    EDIT: Well, can't still figure out how to put one of those Unicode characters in text.
    If you're using System.out.println() or something, it's up to the terminal, but if the terminal is Unicode-enabled, you should just be able to print the characters. Copy-paste them into print statements or something, or use the \U syntax (I think it is, \U followed by four hex digits specifying which Unicode character to print)

    If you're printing to a graphical thingy, you can either print them directly, or you can fiddle around with Font and TextAttribute classes.

  6. #96
    Achievements:
    Social10 PostsVeteran10K Posts1,000 Posts
    Mehtis's Avatar
    Server

    Gandara
    Guild

    Dii
    Posts

    11,162
    Yes, println, yes, terminal, usin \u syntax, but it gives a question mark (a weird one) in text, if I try to fiddle somehow, it gives the correct character in the error statement stating something about variables and nots.

  7. #97
    Uhuh, I'd have to see that myself before I can say anything intelligent about it.

    In other words post some code

  8. #98
    Achievements:
    Social10 PostsVeteran10K Posts1,000 Posts
    Mehtis's Avatar
    Server

    Gandara
    Guild

    Dii
    Posts

    11,162
    It's in Finnish, but the relevant parts should be there. Nothing special at all. The attempt at Superscript-n is bolded.

    System.out.println("Huomiona: Pascalin kolmion rivisumma rivillä n on 2 \u207F.");

  9. #99
    Yeah, that gives a weird "?" for me too. My terminal is UTF-8 Unicode (8-bit Unicode), which only have ² and ³ (superscripted 2 and 3), not the rest. Since you use a 16-bit character code, that doesn't work, causing the "?". You have to have UTF-16 set, if you do, then your code should work. If it doesn't, then try to build a String from the component bytes, as thus:

    byte[] b={0x20,0x7f};
    System.out.println(new String(b,"utf-16"));

    You'll have to enclose that in a try/catch. If that doesn't work either... Gah, I wish I was home where I can set UTF-16 terminal.

  10. #100
    Achievements:
    Social10 PostsVeteran10K Posts1,000 Posts
    Mehtis's Avatar
    Server

    Gandara
    Guild

    Dii
    Posts

    11,162
    Well, it's due on Thursday, and even then I can ask there before turning this in, so no worries. A big thanks anyway.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •