
Nick and Glen conspire

Good questions as always

Interesting punch-lines! :)
Good work guys! :)
Many thanx to the wonderful folks @ VLC for hosting and giving us the opportunity to work on such an interesting project.



| Reactions: |




| Reactions: |
public interface JavaMouseEvent {}
public interface JavaMouseListener {
void mouseClicked(JavaMouseEvent e);
void mousePressed(JavaMouseEvent e);
void mouseReleased(JavaMouseEvent e);
void mouseEntered(JavaMouseEvent e);
void mouseExited(JavaMouseEvent e);
}
public abstract class JavaMouseAdaptor implements JavaMouseListener {
@Override
public void mouseClicked(JavaMouseEvent e) {}
@Override
public void mouseEntered(JavaMouseEvent e) {}
@Override
public void mouseExited(JavaMouseEvent e) {}
@Override
public void mousePressed(JavaMouseEvent e) {}
@Override
public void mouseReleased(JavaMouseEvent e) {}
}
public class JavaEventHandler extends JavaMouseAdaptor {
@Override
public void mouseClicked(JavaMouseEvent e) {
System.out.println("The mouse has been clicked! Call the mouse brigade");
}
}
trait ScalaMouseEvent
trait ScalaMouseListener {
def mouseClicked(e: ScalaMouseEvent): Unit = {}
def mousePressed(e: ScalaMouseEvent): Unit = {}
def mouseReleased(e: ScalaMouseEvent): Unit = {}
def mouseEntered(e: ScalaMouseEvent): Unit = {}
def mouseExited(e: ScalaMouseEvent): Unit = {}
}
final class ScalaEventHandler extends ScalaMouseListener {
override def mouseClicked(e: ScalaMouseEvent): Unit = {
println("The mouse has been clicked! Call the mouse brigade")
}
}
public interface Process {
void start();
void step1();
void step2();
void step3();
void process();
void end();
String getProcessName();
}
public abstract class AbstractProcess implements Process {
public void start() {
System.out.println("Starting process: " + getProcessName());
}
public abstract void step1();
public abstract void step2();
public abstract void step3();
public void process() {
start();
step1();
step2();
step3();
end();
}
public void end() {
System.out.println("ending process: " + getProcessName());
}
public abstract String getProcessName();
}
public final class ReviewProcess extends AbstractProcess {
@Override
public String getProcessName() {
return "Review Process";
}
@Override
public void step1() {
System.out.println("processing step1");
}
@Override
public void step2() {
System.out.println("processing step2");
}
@Override
public void step3() {
System.out.println("processing step3");
}
}
new ReviewProcess().process();
Starting process: Review Process
processing step1
processing step2
processing step3
ending process: Review Process
trait Process {
def start:Unit = println("starting process: " + processName)
def step1:Unit
def step2:Unit
def step3:Unit
def end:Unit = println("ending process: " + processName)
def process():Unit = {
start
step1
step2
step3
end
}
def processName: String
}
final class ReviewProcess extends Process {
override def step1(): Unit = println("processing step1")
override def step2(): Unit = println("processing step2")
override def step3(): Unit = println("processing step3")
override def processName(): String = "Review Process"
}
new ReviewProcess().process
starting process: Review Process
processing step1
processing step2
processing step3
ending process: Review Process
final class AutomationProcess extends Process {
override def step1(): Unit = println("automating step1")
override def step2(): Unit = println("automating step2")
override def step3(): Unit = println("automating step3")
override def processName(): String = "Automation Process"
override def start = println("Commencing the following process: " + processName)
}
new AutomationProcess().processyeilds:
Commencing the following process: Automation Process
automating step1
automating step2
automating step3
ending process: Automation Process
final def start:Unit = println("starting process: " + processName)
| Reactions: |
| Reactions: |
For information on a specific class of device (the classes can be retrieved by the above command) such memory:
H/W path Device Class Description
=========================================================
system Desktop Computer
/0 bus K8M800-8237
/0/0 memory 128KB BIOS
/0/4 processor AMD Sempron(tm) Processor 2800+
/0/4/8 memory 128KB L1 cache
/0/4/9 memory 256KB L2 cache
/0/18 memory 1536MB System Memory
/0/18/0 memory 1GB DIMM 400 MHz (2.5 ns)
/0/18/1 memory 512MB DIMM 400 MHz (2.5 ns)
/0/e4000000 bridge K8M800 Host Bridge
/0/e4000000/1 bridge VT8237 PCI bridge [K8T800/K8T890 South]
/0/e4000000/1/0 display S3 Unichrome Pro VGA Adapter
/0/e4000000/9 scsi0 storage VT6421 IDE RAID Controller
/0/e4000000/a eth0 network DGE-530T Gigabit Ethernet Adapter (rev 11)
/0/e4000000/f scsi3 storage VIA VT6420 SATA RAID Controller
/0/e4000000/f/0 /dev/sda disk 186GB WDC WD2000JS-60M
/0/e4000000/f/0/1 /dev/sda1 disk Linux filesystem partition
/0/e4000000/f/0/2 /dev/sda2 disk 166GB Extended partition
/0/e4000000/f/0/2/5 /dev/sda5 disk Linux filesystem partition
/0/e4000000/f/0/2/6 /dev/sda6 disk Linux swap / Solaris partition
/0/e4000000/f/1 /dev/sdb disk 298GB ST3320620AS
/0/e4000000/f/1/1 /dev/sdb1 disk 298GB Extended partition
/0/e4000000/f/1/1/5 /dev/sdb5 disk Linux filesystem partition
/0/e4000000/f.1 storage VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE
/0/e4000000/f.1/0 ide0 bus IDE Channel 0
/0/e4000000/f.1/0/0 /dev/hda disk PIONEER DVD-RW DVR-110
/0/e4000000/f.1/0/0/0 /dev/hda disk
/0/e4000000/10 bus VT82xxxxx UHCI USB 1.1 Controller
/0/e4000000/10/1 usb1 bus UHCI Host Controller
/0/e4000000/10.1 bus VT82xxxxx UHCI USB 1.1 Controller
/0/e4000000/10.1/1 usb2 bus UHCI Host Controller
/0/e4000000/10.2 bus VT82xxxxx UHCI USB 1.1 Controller
/0/e4000000/10.2/1 usb3 bus UHCI Host Controller
/0/e4000000/10.3 bus VT82xxxxx UHCI USB 1.1 Controller
/0/e4000000/10.3/1 usb4 bus UHCI Host Controller
/0/e4000000/10.4 bus USB 2.0
/0/e4000000/10.4/1 usb5 bus EHCI Host Controller
/0/e4000000/11 bridge VT8237 ISA bridge [KT600/K8T800/K8T890 South]
/0/e4000000/11.5 multimedia VT8233/A/8235/8237 AC97 Audio Controller
/0/100 bridge K8M800 Host Bridge
/0/101 bridge K8M800 Host Bridge
/0/102 bridge K8M800 Host Bridge
/0/103 bridge K8M800 Host Bridge
/0/104 bridge K8M800 Host Bridge
/0/105 bridge K8 [Athlon64/Opteron] HyperTransport Technology Configuration
/0/106 bridge K8 [Athlon64/Opteron] Address Map
/0/107 bridge K8 [Athlon64/Opteron] DRAM Controller
/0/108 bridge K8 [Athlon64/Opteron] Miscellaneous Control
*-cpu
description: CPU
product: AMD Sempron(tm) Processor 2800+
vendor: Advanced Micro Devices [AMD]
physical id: 4
bus info: cpu@0
version: AMD Sempron(tm) Processor 2800+
slot: Socket 754
size: 1600MHz
capacity: 4GHz
width: 64 bits
clock: 200MHz
capabilities: fpu fpu_exception wp vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 syscall nx mmxext fxsr_opt x86-64 3dnowext 3dnow up pni lahf_lm
| Reactions: |