IRC Networks
Irc Logs Stats
Start date: 2007-09-27 02:48:27
Last update: 2008-10-24 20:19:38
Channels: 41
Logged Lines: 6230436
Size: 1825.85 MB
Powered by
Channel Info
Network: freenodeChannel: #java |
Search in www.irclog.org
Log from #java at freenode 2006-05-19
[02:50]<rd2nznrf>JohnnyL: it depends on what the app needs, what error are you getting?
[02:51]<rd2nznrf>JohnnyL: also, where did you get the source?
[02:52]<rd2nznrf>JohnnyL: look at the file in samples/KitchenSink called KitchenSink-compile, it's a shell script
[02:53]<njjcsvnz>cybereal
[02:53]<rd2nznrf>yeah?
[02:53]<njjcsvnz>if i do, bankersOffer = 1657; bankersOffer -= (bankersOffer % 50);
[02:53]<njjcsvnz>it will return me 16
[02:53]<njjcsvnz>;/
[02:54]<rd2nznrf>I did it and got 1650
[02:55]<rd2nznrf>I'll need you to put your test case showing the problem into the pastebin
[02:55]<njjcsvnz>it must be the problem with my convertValue code then, i'll put that in there if you'll take a look?
[02:55]<jjxggdl>http://pastebin.com/725729
[02:55]<rd2nznrf>Nookster: that's fine
[02:55]<jjxggdl>oh ok
[02:55]<jjxggdl>good call.
[02:56]<rd2nznrf>JohnnyL: You don't use javac, it's just a java app that does the compiling
[02:56]<rd2nznrf>apparently...
[02:56]<rd2nznrf>JohnnyL: maybe this weekend I'll play around with gwt, so I can be more helpful in here :)
[02:58]<njjcsvnz>cybereal: http://pastebin.com/725736
[02:58]<njjcsvnz>after cutting the value it puts it through that to convert it into £
[03:00]<rd2nznrf>Nookster: I think what's happening is on line 8, it's casting the result of your division to an int, and when that happens, it truncates the decimal and everything after it
[03:00]<rd2nznrf>I don't know what that "decF" variable is though
[03:00]<njjcsvnz>ah thats just a new DecimalFormat instnace
[03:01]<rd2nznrf>so DecimalFormat decF = (DecimalFormat)NumberFormet.getInstance(); or similar?
[03:02]<rd2nznrf>hey try changing 100 to 100.0 for kicks
[03:02]<njjcsvnz>private static DecimalFormat decF = new DecimalFormat();
[03:02]<njjcsvnz>ok
[03:03]<rd2nznrf>1657 / 100 does integer division, which in essence, makes 16.57 then truncates the .57 off
[03:04]<rd2nznrf>but 1657 / 100.0 does double or float division (not sure which) and gives a result with 16.57
[03:04]<njjcsvnz>hehe i get 16.5 instead of 16
[03:04]<rd2nznrf>which is what you wanted isn't it?
[03:07]<njjcsvnz>but when using the -= it chops the end off
[03:07]<rd2nznrf>no, it does not
[03:07]<rd2nznrf>convertValue() what are you passing to it?
[03:07]<pzggjgg1000>Pennies? Pounds?
[03:07]<njjcsvnz>a random value in pennies
[03:07]<pzggjgg1000>Ah. UK. Nvm.
[03:07]<njjcsvnz>to convert to pounds
[03:08]<njjcsvnz>then once converted, i want it to round to the nearest 50
[03:08]<rd2nznrf>Nookster: is that after you round to the nearest 50?
[03:08]<njjcsvnz>yea
[03:08]<njjcsvnz>no
[03:08]<pzggjgg1000>Which?
[03:08]<njjcsvnz>after the conversion it should be rounded, sorry
[03:08]<rd2nznrf>Nookster: you want it to round to the nearest 50 what?
[03:08]<njjcsvnz>50£'s
[03:08]<rd2nznrf>5000 pennies
[03:08]<njjcsvnz>hehe
[03:08]<njjcsvnz>yea
[03:09]<rd2nznrf>16.57 pounds rounds to 0 pounds in that case, what will you do there?
[03:09]<njjcsvnz>there are a set choice of values, which it works out the average of
[03:09]<njjcsvnz>you ever seen Deal or No Deal? its that
[03:10]<rd2nznrf>no
[03:10]<njjcsvnz>values range from 1p to 250,000£
[03:11]<rd2nznrf>I know if you do 1657 / 100.0, it does NOT truncate the 7
[03:11]<rd2nznrf>you get 16.57
[03:11]<rd2nznrf>But your decimalformat object might be truncating it in the formatting stage
[03:12]<njjcsvnz>hmm
[03:12]<rd2nznrf>And if you want to round x pennies to the nearest 50 pounds, do % 5000, instead of % 50, it should work
[03:13]<rd2nznrf>anything under 50 pounds won't be changed though
[03:13]<njjcsvnz>ok, thanks
[03:14]<rd2nznrf>yark, I should've left 15 min. ago. L8r.
[03:30]<zdzzd_zfzzzsjg>Evening.
[03:49]<ffd>hi, i am trying to decompress and view a .class file - how is this possible?
[03:49]<zdzzd_zfzzzsjg>~jad
[03:49]<rrvr2jv>ricky_clarkson, jad is a Java decompiler, see http://www.kpdus.com/jad.html - It's also a MIDlet download descriptor.
[03:49]<ffd>thank you
[03:53]<l-----d>ricky_clarkson: hello
[03:54]<zdzzd_zfzzzsjg>ni hao
[03:55]<vynvyvq>ricky busting out the chinese
[03:56]<njjcsvnz>lei ho
[03:56]<l-----d>ricky_clarkson: how many language can you speak?
[03:56]<zdzzd_zfzzzsjg>1
[03:56]<l-----d>Nookster: lol
[03:57]<l-----d>ricky_clarkson: so, that's Java?
[03:57]<l-----d>;P
[03:58]<ffd>ricky_clarkson: some of the files give me errors when decompiling, errors like: "couldnt fully decompile method b" etc etc
[03:58]<zdzzd_zfzzzsjg>llm: Then they were probably compiled without debugging info.
[03:59]<zdzzd_zfzzzsjg>Or obfuscated.
[03:59]<ffd>ricky_clarkson: so .class files can be completely decompiled, nothing is 'secret' ?
[03:59]<zdzzd_zfzzzsjg>llm: Right.
[04:10]<ffd>ricky_clarkson: http://papernapkin.org/pastebin/app/view/687
[04:11]<zdzzd_zfzzzsjg>I'm not interested.
[04:11]<ffd>ricky_clarkson: do any of those errors mean that the files could not be decompressed correctly?
[04:11]<ffd>oh
[04:14]<zdzzd_zfzzzsjg>Sounds too much like warez for me.
[04:15]<ffd>infact, very far off.
[04:16]<l-----d>that's depends on how you use the tech
[04:18]<zdzzd_zfzzzsjg>Yes, I've used it for legal purposes before.
[04:19]<zdzzd_zfzzzsjg>The terminology used by llm suggests newbie, or scriptkiddie.
[04:19]<zdzzd_zfzzzsjg>.class files aren't compressed, for example.
[04:23]<ffd>ricky_clarkson: sue me for using the incorrect terminology, damn...
[04:28]<njjcsvnz>~.~
[04:28]<rrvr2jv>Nookster, I have no idea what .~ is.
[04:28]<l-----d>lol
[04:28]<njjcsvnz>its half a tired smiley
[04:28]<zdzzd_zfzzzsjg>llm: It's my right to ignore you, based on any reasoning. I have no objetion to other people helping you.
[04:30]<njjcsvnz>;o
[04:33]<njjcsvnz>woot my assignment is complete with 10 hours to spare







