« first day (843 days earlier)      last day (4112 days later) » 

12:08 AM
anyone there?
 
Hello
 
hi @Code !
 
hey
I kinda need help with eclipse
 
ok
@javawarr
 
the jar file for my one library won't export properly
 
12:11 AM
@javawarrior ask away. If someone can, and is willing, they will help.
 
i just said
 
Don't ask to ask, just ask. (I'm surprised you didn't say that @Code-Guru :P)
 
@Doorknob ;-)
@Doorknob well, he wasn't exactly asking to ask...
 
yeah I guess :P
 
@javawarrior What do you mean that it won't export properly? What are you doing? What do you expect? And what actually happens?
 
12:13 AM
Ok
It's a jar file called xmlwise
i do export and do the default options for exporting
i expect it to act like it did in the debugger
but instead it freezes
 
with an exception?
or not
hey @Lews !
 
no
in jar form
 
try using JOptionPanes and making one pop up a bunch of places in your code
@javaw
so then you can see where it freezes and debug more
 
no
that's not the problem
 
12:15 AM
?
 
it won't export properly
 
1 min ago, by javawarrior
but instead it freezes
 
because it can't find the jar file
 
well how do you make the jar?
jar -cvfm output.jar manifest.mf *.class something like that?
 
right click project ->export->runnable jar file->next
then finish
 
12:16 AM
Eclipse?
 
library options extract required libraries into generated jar
javawarrior
hey
I kinda need help with eclipse
 
do it from the command line
 
i know how to do this
i just want to do it from eclipse
 
why
 
because
eclipse handles the dirty work for me
 
12:23 AM
it's not that hard
and if it won't work in eclipse then you can't do it in eclipse anyway
I always make my jars by hand anyway; it's easier
 
i just need to get my library working
 
then make a jar
 
i did
 
jar -cvf output.jar *.class
also you seem to be asking many more question on chat than on Stack Overflow itself...
 
I like the chat
 
12:30 AM
Where's a good place to download music?
 
@Code-Guru youtube
 
@CCInc for my MP3?
 
darn it link shortener, chopping off two letters
 
@Code-Guru yeah, use youtube2mp3.tv
 
@CCInc That didn't work...
 
12:33 AM
 
@LewsTherin Bah! You beat me to an answer!
 
@Code ?
 
@Doorknob hmm?
 
1 min ago, by Code-Guru
@LewsTherin Bah! You beat me to an answer!
?
 
He he, a minute roughly ha
3
A: How to implement a mouseListener

Lews TherinIf you look at the javadocs.. there are a bunch of methods that come with MouseListener. In other not to implement everything, you can use a MouseAdapter which implements MouseListener and other interfaces, but already providing stub methods. mouseClicked, mouseEntered etc..

You are way past moi don't worry :P
 
12:42 AM
+1 to both :P
 
Ha ha thanks ;)
I also missed a question, that a guy beat me to.
I knew I was right, but I hesitated.
 
I sometimes don't get the first answer because I often go into detail explaining why the problem occurs and offering solutions (more than one if I can).
 
yay!
 
@Code-Guru The recommended way is to post the important bit, then expand later.
 
maze gen algorithm works!
 
12:46 AM
Woop! Congratz :P
 
@Lews yes, FGITW combined with good answer = many +1s
 
@LewsTherin Sometimes I do that. I need to remember to do it more often.
 
@Doorknob Oh yeah very much so :P
@Code-Guru Most people probably know you are going to expand so don't downvote immediately. Noobs might be downvote happy though.
 
20
Q: What is FGITW and SCITE on MSO?

Alex AngasI only read MSO every so often. I'm reading lots of talk about SCITE and FGITW but have no idea what these are. Can someone please define and explain these abbreviations?

Had to look up that abbreviation ;-)
 
Me too xD
 
12:53 AM
@LewsTherin I'm not all that worried about downvotes. I'd have to get a lot to kill my rating.
 
I found the same page ha ha
@Code-Guru I hate seeing red stuff on my profile. Eww. Even if it is a -1
20 more and the votes stop... typical
 
@LewsTherin 20 more what?
@LewsTherin meh, doesn't bother me.
 
@Code-Guru rep. Technically, 11..
@Code-Guru How much will bother you?
 
@LewsTherin Downvotes? Well, maybe after 3 or 4, I might just delete my questions/answer, but mostly because there's a badge for that ;-)
 
Ah that's right.. can't remember what that's called.. let me check
Peer pressure I think
 
1:13 AM
@LewsTherin That sounds right
 
There is another one Disciplined, but the opposite.
6k! :D
 
Who are they?
 
Taylor Swift
 
1:20 AM
hey yaaaal
got a quick question on why my code isn't workin
 
@LewsTherin Are you asking who Taylor Swift is?
 
problem is:
Given the integer variables x , y , and z , write a fragment of code that assigns the smallest of x , y , and z to another integer variable min .

Assume that all the variables have already been declared and that x , y , and z have been assigned values.
I wrote:

if ( (x<y) && (x<z) ) {
x = min;
}

if ( (y<x) && (y<z) ) {
y = min;
}

else {
z = min;
}
not sure why it's not working,
 
Do you mean min = ...?
 
I tired it that way, and the computer say's it's still wrong
 
@Nathvi Well, at the moment, you are assigning a new value to x, y, or z, but you are supposed to assign a value to min.
@Nathvi And what do you mean that "the computer says it's wrong"?
 
1:23 AM
It's a code lab exercise
 
@Code-Guru Just messing :P She's cute, but I listen to none of her songs.
 
I submit the solution, ive tried ? = min and min = ?
idk wtf is wrong with this. it should work
 
@LewsTherin She's a little more than cute!
 
she's a stupid whore
 
Ok I admit it.. but she seems desperate
@Nathvi Lol
 
1:27 AM
@LewsTherin exactly
 
@Nathvi Back up a minute. min = ? is correct. There may be another problem somewhere else. Start by describing some example input and what you expect the output to be.
@Nathvi Careful!
 
Hi again
 
I ran it on my computer, and it worked perfect
 
@LewsTherin desperate? In what way?
 
trying to get attention
 
1:28 AM
@Nathvi That doesn't answer my question...
 
In code lab, you submit your code, and the server tells you if it's right or wrong.
 
Describe some example input and what you expect the output to be.
 
x = 2; y = 4; z=5 then min would be 2
 
okay, now let's look at your code one line at a time
if ( (x<y) && (x<z) ) {
What happens here?
@Nathvi Is the condition true or false and why?
 
(2<4)
true
2<4
true
 
1:31 AM
so we also evaluate (2 < 5) which is also true. So the && makes the whole condition true.
So what line executes next?
 
min = 2;
 
nope
unless you changed the code from what you posted earlier...
 
@Code-Guru A lot of guys and writes songs when they leave her.
 
if ( (x<y) && (x<z) ) {
x = min;
}
so x must be less than y AND it must also be less than z, right?
 
@Nathvi So now you set x to whatever value min has, right?
 
1:34 AM
yes, which is correct
 
@Nathvi No, you just overwrote the 2 with something else!
 
ahh
 
And you don't know what that "something else" is.
 
min = x
 
So if you do that instead, min gets set to 2.
Which is what you want.
 
1:35 AM
yea
ok
 
It also means you need to make similar changes. So let's continue assuming that you make those appropriate changes.
After min = x, what is executed next?
 
int x, y, z,min;
x = 2;
y = 5;
z = 7;
if ( (x<y) && (x<z) ) {
min = x;
}

if ( (y<x) && (y<z) ) {
min = y;
}

else {
min = z;
}
even after I run this code, if i print min, min will evaluate to 7
 
@Nathvi okay, so now we say we get up to min = x. min has a value of 2. What line of code get's executed next?
 
if ( (y<x) && (y<z) ) {
min = y;
}
 
@Nathvi exactly. What does that do?
 
1:37 AM
the same thing the last code did
except with y
 
@Nathvi not at all
@Nathvi Go through it in more detail.
 
if y is less than x and y is less than z,
min will then be set to y
which is what we want
 
@Nathvi okay, so what happens with our example values of x, y, and z?
 
@Code (looks in the history) You're so patient! :O
 
@Doorknob Hopefully I'm teaching a man to fish...
 
1:39 AM
you are :D
 
@Nathvi Is the if condition true or false?
 
y = 5, z = 7, x = 2
if ( (5<2) && (5<7) ) {
min = y;
}
ahh
which is true
so it will reassign min
 
@Nathvi why?
 
because
I didn't use an else if
right?
 
is 5<2 true?
 
1:41 AM
no
5>2
 
so the whole condition evaluates to false.
 
its not
 
exactly
So what line is executed.
 
1 min ago, by Nathvi
which is true
 
so i don't understand why it's wrong then...
 
1:41 AM
no which is false.
 
@Nathvi We need to keep going.
 
(5<2) && (5<7) is false, correct? @Nav
 
yes
 
@Doorknob I think he understands that his initial answer was incorrect.
 
because 5>2
 
1:42 AM
yes
 
I just mixed up the < >
 
@Nathvi So now since that if condition is false, what is executed next?
 
else {
min = z;
}
 
@Nathvi Exactly! So min is reassigned as you stated earlier. And you already said what the solution is:
3 mins ago, by Nathvi
I didn't use an else if
 
so, I need to use else if
 
1:44 AM
@Nathvi yup
 
god damnit XD
I thought so
 
The moral of the story is that you can do this step-by-step thing to find many problems on your own. In fact, doing it with a debugger is very useful.
 
thanks
 
no problem
 
there's a debugger to do this?
 
1:45 AM
@Nathvi What do you use to write your code?
 
bluej
btw, I try not to spam chat with stupid questions, so I have tried to figure this out :p
 
@Nathvi In my opinion, Eclipse is the best IDE in existence.
(note: don't say that in the C++ room)
 
K, I use it, but I'm using bluej so I can memorize the functions for the test
 
oh ok
 
guess I can use E for debugging
 
1:48 AM
@Nathvi I've noticed. That's one reason I'm willing to help you ;-)
@Nathvi yes, Eclipse has a very good debugger.
 
@Code-Guru I'll have to figure it out
 
@Nathvi I'm checking out BlueJ. I've never used it before, but it looks like it has a debugger under the View menu.
 
Ic
lol, this code lab is shit
it gives me this error
You might want to use: &
⇒     Are you sure you want to use: &&
yes im sure
 
lol
 
because && is the right syntax
wtf is going on
 
1:53 AM
You can use & instead. The two are similar, but in this case && is the correct one.
 
what's the difference between & and &&?
 
&& = short-circuit
 
&& is called a short-circuit operator. This means that if it's first operand evaluates to false, the second operand is never evaluated.
& always evaluates both operands.
 
and same with || vs |
 
ah
 
1:55 AM
Also & is used as a bit-wise operator.
 
I just found it on Stack overflow
"& is bitwise. && is logical.

& evaluates both sides of the operation.
&& evaluates the left side of the operation, if it's true, it continues and evaluates the right side."
 
yup
 
if (false && someFunction()) //someFunction is never called
if (false & someFunction()) //someFunction is called
 
aww, that didn't show his pic
 
@Code-Guru Lol, that was brought up in the C++ chatroom too :P
 
1:56 AM
that's where I got it from
 
okay, most of my game is debugged
 
weee! 240 rep on Meta Stack Overflow
 
now the only problem is enemies periodically teleporting O_o
@Code I have 867 :P
 
meh, i don't participate there very much
5 Qs, 1 A.
 
Me 15 As 13 Qs
Which I post when bored :P
 
2:04 AM
I guess I don't get bored quite often enough.
But then when I'm bored, I just chat...
 
can you use switch statements in conjunction with comparison operators?
 
@Nath What do you mean?
 
example:

switch (a) {

case < 5:
//code
break;

}
 
@Nathvi No. Switch statements only test for equality.
 
@Nath No you can't
 
2:06 AM
unfortunately
 
damn
 
you just have to use an if statement...or multiple cases
 
that's dumb, given this problem:

In the Happy Valley School System, children are classified by age as follows:
less than 2, ineligible
2, toddler
3-5, early childhood
6-7, young reader
8-10, elementary
11 and 12, middle
13, impossible
14-16, high school
17-18, scholar
greater than 18, ineligible

Given an int variable age , write a switch statement that prints out, on a line by itself, the appropriate label from the above list based on age .
because I would have to write a case for infinity
because there are an infinite number of cases greater than 18
 
You can use default @Nath
 
o... XD
lol forgot about that
 
2:09 AM
case 2:
//toddler
break;
case 3:
case 4:
case 5:
//early childhood
break;
...
case 17:
case 18:
//scholar
break;
default:
//ineligible
break;
 
I didn't know you could do multiple cases
!
this makes things way easier than I thought
thanks :D
 
@Nathvi Technically, this works because some cases don't have a break. This means that execution "falls through" to the next case.
 
makes sense
 
ARGH! Why do my enemies keep teleporting? >:O
Okay I hate myself.
I forgot a break.
 
@Doorknob lol
hmm...got quiet in here. Maybe I should take advantage of that and work on my Android app...
 
2:25 AM
what's ur app do?
 
that's awesome !
 
thanks
 
how long did that take you to make, from concept to store?
 
feel free to download it ;-)
Umm...I started a desktop version in July.
 
2:29 AM
O wow
 
First Android beta release was in Oct.
 
you need a QR code :D
 
QR?
 
QR code reader image
QR code (abbreviated from Quick Response Code) is the trademark for a type of matrix barcode (or two-dimensional bar code) first designed for the automotive industry in Japan. Bar codes are optical machine-readable labels attached to items that record information related to the item. Initially patented, its patent holder has chosen not to exercise those rights. Recently, the QR Code system has become popular outside the automotive industry due to its fast readability and greater storage capacity compared to standard UPC barcodes. The code consists of black modules (square dots) arranged...
 
oh...what for?
 
2:33 AM
so that way people can just scan the QR code to download your app if they are looking it up on their computer
 
Where do I put the QR code?
I'm not exactly in a position to buy advertisement space.
 
You put it on your page, not in your app
let me find an example
like this
hope that helps
I hate developing in java...
lol
 
@Nathvi So I put the QR code on my web page?
 
yep
 
I'll have to look into that ;-)
Of course, I can just put a link directly to my app on a webpage...
 
2:41 AM
@Code-Guru, the site i sent you is just a google extension, but I was trying to show you the idea of how it was supposed to look
 
@Nathvi yah, I got the idea ;-)
and the wikipedia page told me what you were talking about. I didn't know what those barcode thingies are called.
 
QR image
I'll be back, need to finish up these code lab xersizezzzes
:p
 
YAY
fixed
finally
now must upload to website!
 
@Doorknob /clap
 
2:52 AM
gah, stoopid netbeans...imports something that I don't want imported...
 
It's a Javascript game so you can play it on anything with a web browser :D
 
@Doorknob aww, it's blocked.
 
@Code Use Eclipse! :P
oh yeah, must switch to .com soon
 
I'm on a campus library computer.
 
Some things block *.cu.cc
alright, will go to sleep now.
bye!
 
2:53 AM
@Doorknob There are some things I really like about Eclipse, but I haven't gotten myself to commit to it entirely.
Mostly I like how NB integrates with Ant.
@Doorknob gnite
 

« first day (843 days earlier)      last day (4112 days later) »