Page 18 of 22

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:19 am
by johnnywishbone
AndroidMan wrote:
neither your code or my suggestion would work. We both left out the R in AndroidMan. Fail on both of us.


You can't pass Object[] args to the main method. I didn't think you could but I was looking for an easy way to show reflection.

And that's why when you get out of school you should avoid string literals. a better way would have been:

if(args[0].equalsIgnoreCase(AndroidMan.class.getName())

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:23 am
by AndroidMan
johnnywishbone wrote:
AndroidMan wrote:
neither your code or my suggestion would work. We both left out the R in AndroidMan. Fail on both of us.


You can't pass Object[] args to the main method. I didn't think you could but I was looking for an easy way to show reflection.

And that's why when you get out of school you should avoid string literals. a better way would have been:

if(args[0].equalsIgnoreCase(AndroidMan.class.getName())


well that's making the assumption we are even doing a search for AndroidMan which isn't even evident in your code. Silly piece of code, which I even laughed at for the humor, only noticed the R later missing on.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:24 am
by johnnywishbone
AndroidMan wrote:
johnnywishbone wrote:
Now my turn. Please describe the difference between inheritance and interface and when you would use one over the other.


I believe inheritance you have to initialize some variables and methods, while interfaces are implemented, rather then instantiated. As for their usage, I believe interfaces are used when you don't know what the values of certain variables or parameters may be until runtime. Thereby you kind of implement on the fly.


An object can only inherit from one class but an object can implement many interfaces. Interfaces only define the methods that an object has to implement. You can inherit an instance variable from your super class but not from an interface. Interfaces are often used in delegation.

You get a C on that. Show a method in any language where two instance variable swap their values.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:34 am
by AndroidMan
johnnywishbone wrote:
AndroidMan wrote:
johnnywishbone wrote:
Now my turn. Please describe the difference between inheritance and interface and when you would use one over the other.


I believe inheritance you have to initialize some variables and methods, while interfaces are implemented, rather then instantiated. As for their usage, I believe interfaces are used when you don't know what the values of certain variables or parameters may be until runtime. Thereby you kind of implement on the fly.


An object can only inherit from one class but an object can implement many interfaces. Interfaces only define the methods that an object has to implement. You can inherit an instance variable from your super class but not from an interface. Interfaces are often used in delegation.

You get a C on that. Show a method in any language where two instance variable swap their values.


Damn, I was really trying to ace this internet pop quiz as well. i didn't even bother google the info. Damn it.

swap(int a, int b)
{
int temp = a;
a = b;
b = temp;
}

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:40 am
by johnnywishbone
AndroidMan wrote:
Damn, I was really trying to ace this internet pop quiz as well. i didn't even bother google the info. Damn it.

swap(int a, int b)
{
int temp = a;
a = b;
b = temp;
}


Sure you didn't? http://stackoverflow.com/questions/1039 ... es-in-java

:lol: :lol: :lol: :lol:

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:44 am
by AndroidMan
johnnywishbone wrote:
AndroidMan wrote:
Damn, I was really trying to ace this internet pop quiz as well. i didn't even bother google the info. Damn it.

swap(int a, int b)
{
int temp = a;
a = b;
b = temp;
}


Sure you didn't? http://stackoverflow.com/questions/1039 ... es-in-java

:lol: :lol: :lol: :lol:


certainly didn't google for inheritance and interfaces, but most def did for swap function. Even better if using instance variables for classes, assuming there are appropriate setter and getter methods contained in the skeleton of the class as required, which I'm not writing out.

public void swap( AndroidMan a, AndroidMan b ) {
int JInt;

JInt; = a.getJInt();
a.setJInt(b.getGetJInt());
b.setJInt(JInt);
}

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:50 am
by johnnywishbone
AndroidMan wrote:
certainly didn't google for inheritance and interfaces, but most def did for swap function. Even better if using instance variables for classes, assuming there are appropriate setter and getter methods contained in the skeleton of the class as required, which I'm not writing out.

public void swap( AndroidMan a, AndroidMan b ) {
int JInt;

JInt; = a.getJInt();
a.setJInt(b.getGetJInt());
b.setJInt(JInt);
}


That code makes no sense. And it certainly wouldn't compile.

if you want to swap the values of two AndroidMan objects it would have to be

void swap(AndroidMan a, AndroidMan b) {
AndroidMan x = a;
a=b;
b=x;
}

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 2:56 am
by AndroidMan
johnnywishbone wrote:
AndroidMan wrote:
certainly didn't google for inheritance and interfaces, but most def did for swap function. Even better if using instance variables for classes, assuming there are appropriate setter and getter methods contained in the skeleton of the class as required, which I'm not writing out.

public void swap( AndroidMan a, AndroidMan b ) {
int JInt;

JInt; = a.getJInt();
a.setJInt(b.getGetJInt());
b.setJInt(JInt);
}


That code makes no sense. And it certainly wouldn't compile.

if you want to swap the values of two AndroidMan objects it would have to be

void swap(AndroidMan a, AndroidMan b) {
AndroidMan x = a;
a=b;
b=x;
}



wouldn't that just swap the class instances of AndroidMan themselves and all of its memeber values? If we just wanted to swap an instance variables from 2 separate androidMan instances my code is applied for that, as I assumed we were speaking of specific instance variables inside of a class to swap.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 3:10 am
by johnnywishbone
AndroidMan wrote:
wouldn't that just swap the class instances of AndroidMan themselves and all of its memeber values? If we just wanted to swap an instance variables from 2 separate androidMan instances my code is applied for that, as I assumed we were speaking of specific instance variables inside of a class to swap.


FIrst there are a bunch of compilation problems - I'll overlook those as typing into a text box.

Second, the test was to swap the value of two instance variables. Objects can be instance variables, just like a primitive. So I don't know why you are trying to show two objects swapping values of a specific attribute? Really the answer I was looking for (if you were going to use Java) was something like this:

void swap(Object a, Object b) {
Object x = a;
Object b = a;
Object a = b;
}

Then you could use the same method to swap values of different types (provided it's not a primitive)...

GTG - can't believe how much time I spent in here today.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 3:20 am
by AndroidMan
johnnywishbone wrote:GTG - can't believe how much time I spent in here today.


Yep, way too much time spent here myself as well. Till next time.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 3:32 am
by Knicksfan20
Brooklyn_Yards wrote:[youtube]http://www.youtube.com/watch?v=gWQPZ-taYBs[/youtube]

So I've been loosely following AJ for years because my bf is a CT and here's another one of his EPIC rants, this guy sounds like all the other freakjobs afraid of loosing their precious weapons,



Hes right though. Not that i think there ever will be a zombie apocolipse.. but if there was...Not having an assault rifle would suck balls.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 3:51 am
by QueenzAllDay
Stephen A. I CHOOSE YOU.

I used to listen to Alex Jones for pure entertainment before. His ego has been increasing every year. This right here. My god. He can't get worse than this.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:14 am
by E86
weird triple post

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:14 am
by E86
weird triple post

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:14 am
by E86
Image

this thread took the weirdest direction

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:15 am
by Knicker23
That guy looks like such a buffoon it's actually hilarious. He looked like a mentally unstable schizophrenic himself. Bouncing around from voice to voice, idea to idea, factoid to factoid. Incapable of sitting still, answering a question etc.

And fact is, these are the types of people that make up a large portion of the "pro gun" stronghold. Type that think they need bazookas to protect themselves from Obama taking over the world. That 9/11 was a inside job.

He memorizes little facts and statistics and then nonsensically spits them out as rebuttals to everything and anything as if they're the answer. And yet, he can't answer the simple question: why do you need a semi-auto.

He's so blinded by just pure hate & disdain, combined with this passion that he's unquestionably right.. that he looks like some sort of character... And frankly, make pro-gun people look like lunatics.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:18 am
by E86
Knicker23 wrote:That guy looks like such a buffoon it's actually hilarious. He looked like a mentally unstable schizophrenic himself. Bouncing around from voice to voice, idea to idea, factoid to factoid. Incapable of sitting still, answering a question etc.

And fact is, these are the types of people that make up a large portion of the "pro gun" stronghold. Type that think they need bazookas to protect themselves from Obama taking over the world. That 9/11 was a inside job.

He memorizes little facts and statistics and then nonsensically spits them out as rebuttals to everything and anything as if they're the answer. And yet, he can't answer the simple question: why do you need a semi-auto.

He's so blinded by just pure hate & disdain, combined with this passion that he's unquestionably right.. that he looks like some sort of character... And frankly, make pro-gun people look like lunatics.



They're not the large portion, they are just the loudest and what the media wants you to see to discredit the rational ones. Just like when the news only shows videos of the crazy flag burning Muslims.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:19 am
by duetta
Alex Jones deserves to be heavily medicated - again, and again, and again...

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:33 am
by Mr_Perfect
Alex Jones is a huge moron and I have to question the sanity of anyone who follows him.

Re: OT: Alex Jones freaks out on CNN

Posted: Wed Jan 9, 2013 4:39 am
by frogfood
Looking at the # of posts in this thread, I'm gonna guess there are a few.