This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Messages - calcdude84se
Pages: 1 ... 34 35 [36] 37 38 ... 161
526
« on: March 16, 2011, 12:51:15 am »
:'( Not again... We'll miss you DJ... I understand how you feel... Things have been stressed lately, and Souvik pushed things over the edge for you. I'm sorry about all this. We understand and won't stop you from leaving, but you're always welcome back if you change your mind. Others will write more heartfelt things, trust me.
527
« on: March 15, 2011, 11:22:22 pm »
That's the entire idea Using your 84+(SE) with a directlink cable and some software to use gCn! Edit: Ninja'd (This is what I get for not completing a post as soon as I start...)
528
« on: March 15, 2011, 11:13:35 pm »
My meaningless comment came from a misunderstanding about how it worked (I never used it ) You may now ignore it. Darl, so it sounds like it works. Ikemike, could you elaborate?
529
« on: March 15, 2011, 11:08:13 pm »
Note that this development is for the 84+(SE) only, not the ones without the USB ports Great progress Kerm and others!
530
« on: March 15, 2011, 11:03:24 pm »
Probably the difficulty part. Signing shouldn't be a problem AFAICT.
531
« on: March 15, 2011, 08:40:19 pm »
Something I forgot to mention about generics: You can have more than one generic type. An example would be Dictionary<K, V>.
532
« on: March 15, 2011, 08:36:59 pm »
An example generic class, with two methods, display() and setThing(T): class GenericClass<T> { //T stands for a certain class. Could be anything. public T thing; public void display() { System.out.println(thing.toString()); } public void setThing(T thing) { this.thing = thing; //this.thing refers to the thing in this object, not the argument thing } public class Main { public static void main(String[] args) { GenericClass<String> test = new GenericClass<String>(); test.setThing("Hello World!"); test.display(); GenericClass<Object> test2 = new GenericClass<Object>(); test.setThing(new Object()); test.display(); } } So we use GenericClass in two ways: one where T is String, the other where T is Object. When you do that, you can pretty much pretend that all the T's in the class definition were replace with either String or Object. setThing(T) works as either setThing(String) or setThing(Object) depending on whether the object is a GenericClass<String> or GenericClass<Object>. Generics are extremely powerful, and C#, C++, Java, and possibly others have them. Edit: Is it really called the diamond operator? Also, aren't generics like templates?
533
« on: March 15, 2011, 08:15:48 pm »
Binder hinted at them, so who wants to do generics? Binder: just a personal preference, but I would declare contacts as a List<ContactInfo> (obviously it's still an ArrayList<ContactInfo>, but it encourages you to type your methods and other code for the more generic List<ContactInfo> (and it lets you quickly swap ArrayList<> for another type of List<> if need be). Others may differ.
534
« on: March 15, 2011, 07:51:26 pm »
EDIT: I've noticed you've been posting a lot, momrocker. Why don't you create an account and join us?
We don't have guest posting. momrocker was here but was permbanned for trolling
535
« on: March 15, 2011, 07:48:31 pm »
Before you do, make sure that the other ASM programs won't crash because of what I said (addresses no longer work because of shift). lookitsanoob, did you take this into account? (Not saying you didn't, but that's the most possible problem if there is one and simple test programs like "ret" wouldn't be affected)
536
« on: March 15, 2011, 07:45:03 pm »
Encapsulation and polymorphism (along with inheritance) are probably the key features of OOP. They make your code modular, flexible, extensible, and many other things. Encapsulation (namely private variables) allows you to ignore the inner workings of another class/object and use the methods it provides. It frees you from having to deal with all the underlying things directly (like the networking and display examples) and allows delegation of tasks. Polymorphism and inheritance also allow a common interface to classes. Example (Java): abstract class IntegerOperation { public abstract int selfOperation(); public abstract int binaryOperation(int otherArgument); //"abstract" just means that I'm not defining these methods } //IntegerOperation is a class that names two methods, selfOperation() and binaryOperation(int), that both return an int //It is extended twice here: class IncrementAdd extends IntegerOperation { public int number; public int selfOperation() { return number+1; } public int binaryOperation(int otherArgument) { return number+otherArgument; } } //Also here: class DecrementSubtract extends IntegerOperation { public int number; public int selfOperation() { return number-1; } public int binaryOperation(int otherArgument) { return number-otherArgument; } } //And the main code here: public class Main { public static void main(String[] args) { IntegerOperation intOp = new IncrementAdd(); intOp.number = 5; System.out.println(intOp.selfOperation()); //Prints 6 intOp = new DecrementSubtract(); intOp.number = 20; System.out.println(intOp.binaryOp(13)); //Prints 7 } } So, despite the two methods having different definitions in the two classes, we can use each as an IntegerOperation and invoke its methods. Yay polymorphism! Note: And yeah, we're trying to sell you OOP Edit: And this was written before Ashbad's post. It demonstrates inheritance and polymorphism.
537
« on: March 15, 2011, 06:25:56 pm »
Woo, a real worm! Anyway, make sure that you run the nostub programs correctly (get rid of the worm portion from the executing copy before executing so all addresses are correct) I might duplicate this at some point... Sounds like a fun coding exercise.
538
« on: March 15, 2011, 06:22:33 pm »
A 2.75hr drive from here... Too far, sorry
539
« on: March 15, 2011, 05:17:28 pm »
I almost forgot about this O.o Anyway, I can't wait to see how this goes after KOS comes out! Edit: 1 th (1666 ) post!
540
« on: March 15, 2011, 05:12:00 pm »
Haha, nice find
Pages: 1 ... 34 35 [36] 37 38 ... 161
|