For MacBook: http://www.extremetech.com/article2/0,2845,2363244,00.asp.
For Mac mini: http://www.applefritter.com/Mac_Mini_Take_Apart_Guide.
Bluetooth keyboard
Details in ReadMe file.
Maybe also (books code):
User-Space Java Bluetooth (JSR-82) Keyboard Driver.
JSR-82 implementation on Java Standard Edition (J2SE). I had some problems making it work on Mac OSX 10.6, but this seems to be fixed by a beta version 2.1.1-SNAPSHOT (cf. BlueCove does not work with Mac OS 10.5.x, Java 1.6.0 - 64 Bit).
To get tester running I had to use 32-bit mode from command-line:
Put in deli tag bluekey.
Dr. Dobbs article Java & Bluetooth.
SDN Article The Java APIs for Bluetooth Wireless Technology.
Nokia's Bluetooth RFCOMM and L2CAP Examples.
Articles on javabluetooth.com.
| Code | Points
to make |
class PhoneNumber( val kind: String, var no: String ) { |
switch to name: type
val / var / def primary constructor Concise |
object PhoneNumber{ |
object, no statics
apply is "default method" |
val phonebook = Map( |
Expressive |
| println( phonebook("Tommy mobil" ).no ) | Concise |
| phonebook.foreach(tuple => println( tuple._1 + ":" + tuple._2 )) | High-level
functional iteration |
| 1.1.+(2.2)
1 until 10 |
Pure OO
operator mode for methods |
val xmlE = <a href="index.html"> {3 + 4} </a> |
Pragmatic |
| Code | Points to make |
| TestServer | object and main |
| client.v2.Notifier | operators |
client.ServiceBrowser:
| traits
Function is first-class object Option + match |
| sclanb.Main.recurse2 | Closures, and how crazy I got |
| sclanb.Main |
|
| client.ServiceBrowserListener | abstract, no interface |
| FirstSwingApp. | DSL, Swing |
| Code from ch30 | Actors |
grails create-app mapp
cd mapp
grails create-domain-class mapp.site.Site
grails create-controller mapp.site.Sitegrails run-app
grails generate-all mapp.site.Site
grails install-plugin app-enginegrails install-plugin gorm-jpa
grails app-engine run
grails set-version 1
grails app-engine package
grails app-engine deploy
grails-debug run-app) on port 5005Use a wizard to fill in data piecewise. Spring web-flow (plugin) is recommended. An alternative is to use scope and ModelDriven interceptors together and have them use the same object. Here's the idea coded:
public class SomeAction extends ActionSupport implements ModelDriven<somemodel> {
private SomeModel model;
public SomeAction ( ... ) {
model = new SomeModel( ... );
}
/** @see ModelDriven */
public SomeModel getModel() {
return model;
}
/** for scope interceptor */
public SomeModel getSessionModel() {
if ( ! clearSession )
return model;
clearSession = false;
return null;
}
public void setSessionModel( SomeModel newValue ) {
if ( newValue == null )
model.reset();
else
model.copyFrom( newValue );
}
}
NB! we're stuck with the object returned by getModel(), so we should only change it's content, not the object reference.
Action setup:
<action name="someAction" class="SomeAction">
<interceptor-ref name="scope">
<param name="session">sessionModel</param>
<interceptor-ref name="defaultStack" />
<result name="page1">/WEB-INF/jsp/page1.jsp</result>
<result name="page2">/WEB-INF/jsp/page2.jsp</result>
</action>