0
| Thumbs Up: |
| Received: 186 |
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
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?
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.
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.
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.
Uhuh, I'd have to see that myself before I can say anything intelligent about it.
In other words post some code![]()
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.");
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.
Well, it's due on Thursday, and even then I can ask there before turning this in, so no worries. A big thanks anyway.