kid
1.AniWorld Lite
2.HomeWork
3.Pineapple Studio Jigsaw Puzzles
4.iStory Books
5.Ant Smasher
6.TomnJerry Tube
7.Steamy Window - make picture
8.Classic Simon
++++++++++
1.Science360
2.HowStuffWorks
3.Google Sky Map
4.beebPlayer -radio
Monday, 28 November 2011
iPad app
1.Adobe Ideas
2.Bloomberg
3.Dictionary.com
4.Dropbox (universal)
5.Evernote (universal) online service for saving ideas – text documents, images and web clips
6.The Guardian Eyewitness - showcase for engaging photography
7.PaperDesk Lite for iPad
8.Reuters News Pro for iPad
9.Wikipanion for iPad
10.Google Earth
11.Explore Flickr (universal)
12.BBC News (universal)
13.Epicurious (universal) - ens of thousands of recipes
14.Adobe Photoshop Express
15.Find my iPhone
16.Read It Later Free
17.TED - talks by remarkable people
18.Virtuoso Piano Free 2 HD
19.BBC iPlayer
20.Sky News for iPad
21.Fotopedia Heritage - beautiful locations worldwide
22.Yell - unfamiliar place or travelling somewhere new
23.XE Currency for iPad
24.Classical Guitar
++++++++phone
1.iHandy Level Free
2.TVGuide.co.uk
3.Zoopla Property Search
4.Virtuoso Piano Free 3
5.TuneIn Radio - Don't bother buying a DAB radio
6.Google Translate
++++++++game
1.Air Hockey Gold (universal)
2.Bub - Wider
3.Checkers Free HD
4.GodFinger All-Stars for iPad
5.Hole-in-a-wall HD
6.Pocket Legends for iPad
7.Pilgrim's Punch-Out (universal)
8.New York 3D Rollercoaster Rush HD Free
9.SLS AMG HD - car stun
10.Drop7 Free (universal) -puzzle game
11.TinkerBox - construction
12.Doodle Jump: HOP The Movie (universal)
13.Paper Toss: World Tour HD
14.NinJump - HD - ninja
15.AlexPanda (universal)
2.Bloomberg
3.Dictionary.com
4.Dropbox (universal)
5.Evernote (universal) online service for saving ideas – text documents, images and web clips
6.The Guardian Eyewitness - showcase for engaging photography
7.PaperDesk Lite for iPad
8.Reuters News Pro for iPad
9.Wikipanion for iPad
10.Google Earth
11.Explore Flickr (universal)
12.BBC News (universal)
13.Epicurious (universal) - ens of thousands of recipes
14.Adobe Photoshop Express
15.Find my iPhone
16.Read It Later Free
17.TED - talks by remarkable people
18.Virtuoso Piano Free 2 HD
19.BBC iPlayer
20.Sky News for iPad
21.Fotopedia Heritage - beautiful locations worldwide
22.Yell - unfamiliar place or travelling somewhere new
23.XE Currency for iPad
24.Classical Guitar
++++++++phone
1.iHandy Level Free
2.TVGuide.co.uk
3.Zoopla Property Search
4.Virtuoso Piano Free 3
5.TuneIn Radio - Don't bother buying a DAB radio
6.Google Translate
++++++++game
1.Air Hockey Gold (universal)
2.Bub - Wider
3.Checkers Free HD
4.GodFinger All-Stars for iPad
5.Hole-in-a-wall HD
6.Pocket Legends for iPad
7.Pilgrim's Punch-Out (universal)
8.New York 3D Rollercoaster Rush HD Free
9.SLS AMG HD - car stun
10.Drop7 Free (universal) -puzzle game
11.TinkerBox - construction
12.Doodle Jump: HOP The Movie (universal)
13.Paper Toss: World Tour HD
14.NinJump - HD - ninja
15.AlexPanda (universal)
Wednesday, 26 October 2011
First Cup
Architecture
4 components:
1.DukesAgeResource - JAX-RS RESTful web service;
2.DukesBirthdayBean - enterprise bean;
3.FirstcupUser - JPA entity;
4.firstcup, web app created with JSF Facelets technology
4 components:
1.DukesAgeResource - JAX-RS RESTful web service;
2.DukesBirthdayBean - enterprise bean;
3.FirstcupUser - JPA entity;
4.firstcup, web app created with JSF Facelets technology
Monday, 10 October 2011
GWT + Dynamic Web Project
[ERROR] Unexpected
java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
To fix:
- Right-click project > Properties
- Java Build Path > Order and Export
- Move the GWT SDK above the Server Library (Apache Tomcat)
java.lang.NoSuchFieldError: reportUnusedDeclaredThrownExceptionIncludeDocCommentReference
To fix:
- Right-click project > Properties
- Java Build Path > Order and Export
- Move the GWT SDK above the Server Library (Apache Tomcat)
Tuesday, 27 September 2011
Sunday, 25 September 2011
GWT Tut - RPC
To use RPC, write 3 components:
1.Define (ClientService interface) extends RemoteService & lists all RPC method.
2.Create (ServerServiceImpl class) extends RemoteServiceServlet & implements methods.
3.Define (ClientServiceAsync interface) to be called from client-side code.
Calling the remote procedure call:
1.Create the proxy class
private ClientServiceAsync clientServiceSvc = GWT.create(ClientService.class);
2.Initialize proxy , set up callback object & make call to the remote method.
Initialize: clientPriceSvc = GWT.create(ClientPriceService.class);
Set up callback: AsyncCallback
1.Define (ClientService interface) extends RemoteService & lists all RPC method.
2.Create (ServerServiceImpl class) extends RemoteServiceServlet & implements methods.
3.Define (ClientServiceAsync interface) to be called from client-side code.
Calling the remote procedure call:
1.Create the proxy class
private ClientServiceAsync clientServiceSvc = GWT.create(ClientService.class);
2.Initialize proxy , set up callback object & make call to the remote method.
Initialize: clientPriceSvc = GWT.create(ClientPriceService.class);
Set up callback: AsyncCallback
Wednesday, 14 September 2011
GWT Tut - gc
Development : in the "edit - refresh - view" cycle.
1.add the widgets to specific [div]
RootPanel rootPanel = RootPanel.get("stockList");
rootPanel.add(mainPanel);
2.Event
*Listen for mouse events on the Add button.
addStockButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
3.Alert dialog box
Window.alert("'" + stockcode + "' not a valid code.");
4.Refer to widget value
String stockcode=newSymbolTextBox.getText().toUpperCase().trim();
5.Widget inside widget
Button removeStockButton = new Button("x");
stocksFlexTable.setWidget(row, 3, removeStockButton);
6.Timer
*Setup timer to refresh list automatically.
Timer refreshTimer = new Timer() {@Override
public void run() {
7.Generate random stock prices.
double price = Random.nextDouble() * MAX_PRICE;
8.From Double to String
String priceText = NumberFormat.getFormat("#,##0.00").format(price.getPrice());
9.Last update date and time
lastUpdatedLabel.setText("Last update : "+ DateTimeFormat.getShortDateTimeFormat().format(new Date()));
10.Debug
Run as debug. Resume, Step over, Step into.
11.Apply css style
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
12.Creat sec. styles dependent on primary style
removeStockButton.addStyleDependentName("remove");
13.Dynamic style
Label changeWidget = (Label)stocksFlexTable.getWidget(row, 2);
changeWidget.setText...
+if (price.getChangePercent() < -0.1f) +{changeStyleName = "negativeChange"; changeWidget.setStyleName(changeStyleName) 14. Generate stock data in JSON(Server). +PrintWriter out = resp.getWriter(); +out.println('['); out.println(" {"); out.print(" \"symbol\": \""); C1-Use JavaScript Native Interface (JSNI) and GWT overlay types to work with the JSON data. class StockData extends JavaScriptObject {... JSNI methods to get stock data. public final native String getSymbol() C2-Make HTTP call to retrieve the JSON data(Client). private static final String JSON_URL = GWT.getModuleBaseURL() + "stockPrices?q="; use the HTTP client classes in the com.google.gwt.http.client package [inherits name="com.google.gwt.http.HTTP" />
1.add the widgets to specific [div]
RootPanel rootPanel = RootPanel.get("stockList");
rootPanel.add(mainPanel);
2.Event
*Listen for mouse events on the Add button.
addStockButton.addClickHandler(new ClickHandler() {
public void onClick(ClickEvent event) {
3.Alert dialog box
Window.alert("'" + stockcode + "' not a valid code.");
4.Refer to widget value
String stockcode=newSymbolTextBox.getText().toUpperCase().trim();
5.Widget inside widget
Button removeStockButton = new Button("x");
stocksFlexTable.setWidget(row, 3, removeStockButton);
6.Timer
*Setup timer to refresh list automatically.
Timer refreshTimer = new Timer() {@Override
public void run() {
7.Generate random stock prices.
double price = Random.nextDouble() * MAX_PRICE;
8.From Double to String
String priceText = NumberFormat.getFormat("#,##0.00").format(price.getPrice());
9.Last update date and time
lastUpdatedLabel.setText("Last update : "+ DateTimeFormat.getShortDateTimeFormat().format(new Date()));
10.Debug
Run as debug. Resume, Step over, Step into.
11.Apply css style
stocksFlexTable.getRowFormatter().addStyleName(0, "watchListHeader");
stocksFlexTable.getCellFormatter().addStyleName(row, 1, "watchListNumericColumn");
12.Creat sec. styles dependent on primary style
removeStockButton.addStyleDependentName("remove");
13.Dynamic style
Label changeWidget = (Label)stocksFlexTable.getWidget(row, 2);
changeWidget.setText...
+if (price.getChangePercent() < -0.1f) +{changeStyleName = "negativeChange"; changeWidget.setStyleName(changeStyleName) 14. Generate stock data in JSON(Server). +PrintWriter out = resp.getWriter(); +out.println('['); out.println(" {"); out.print(" \"symbol\": \""); C1-Use JavaScript Native Interface (JSNI) and GWT overlay types to work with the JSON data. class StockData extends JavaScriptObject {... JSNI methods to get stock data. public final native String getSymbol() C2-Make HTTP call to retrieve the JSON data(Client). private static final String JSON_URL = GWT.getModuleBaseURL() + "stockPrices?q="; use the HTTP client classes in the com.google.gwt.http.client package [inherits name="com.google.gwt.http.HTTP" />
Thursday, 8 September 2011
GWT Applications
1.First Step
============
1.Ajax (Asynchronous JavaScript and XML)
2.Web App By a.Adobe Flash and Flex b.Microsoft Silverlight c.Java FX
3.Software Engineering for Ajax - GWT most powerful tool for creat Ajax app
4.Can include any JS libraries, & compiles down distributed as Ajax app use only web don’t require runtimes or plugins. Browser appears like Ajax app, developer like build regular desktop app & provide debug support and compile-time error check on fly.
5.desktop like web-app : fast, responsive & visually rich
6.GWT generates JavaScript code from Java code
7.webAppCreator com.gwtapps.tutorial.client.Hangman
============
1.Ajax (Asynchronous JavaScript and XML)
2.Web App By a.Adobe Flash and Flex b.Microsoft Silverlight c.Java FX
3.Software Engineering for Ajax - GWT most powerful tool for creat Ajax app
4.Can include any JS libraries, & compiles down distributed as Ajax app use only web don’t require runtimes or plugins. Browser appears like Ajax app, developer like build regular desktop app & provide debug support and compile-time error check on fly.
5.desktop like web-app : fast, responsive & visually rich
6.GWT generates JavaScript code from Java code
7.webAppCreator com.gwtapps.tutorial.client.Hangman
Wednesday, 7 September 2011
Dojo
Hello
=====
1.[script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"][/script]
2.dojo.ready(function(){}
3.dojo.byId("greeting").innerHTML += ", from " + dojo.version;
4.dojo.require("dojo.fx"); //load module
5.dojo.create("li", {innerHTML: "One"}, list);
6.dojo.place(myfirst, mysecond, "last"); //for list
7.dojo.empty("mylist");
=====
1.[script src="http://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js"][/script]
2.dojo.ready(function(){}
3.dojo.byId("greeting").innerHTML += ", from " + dojo.version;
4.dojo.require("dojo.fx"); //load module
5.dojo.create("li", {innerHTML: "One"}, list);
6.dojo.place(myfirst, mysecond, "last"); //for list
7.dojo.empty("mylist");
Thursday, 1 September 2011
Master Detail
Nothing more than /object1/{object1.id}/object2/{object2.id}
url="{ownerId}/pets/{petId}/edit"
[c:forEach var="pet" items="${owner.pets}">
...
[c:forEach var="visit" items="${pet.visits}">
TABLE: owners
PRIMARY KEY id
TABLE: pets
PRIMARY KEY id
FOREIGN KEY owner_id references the owners table id field
TABLE: visits
PRIMARY KEY id
FOREIGN KEY pet_id references the pets table id field
(1)Database
Like, TABLE: owners
PRIMARY KEY id
TABLE: types
PRIMARY KEY id
TABLE: pets
PRIMARY KEY id
FOREIGN KEY type_id references the types table id field
FOREIGN KEY owner_id references the owners table id field
(2)Business Layer
Like, Entity or Validation
...petclinic.Owner
...validation.OwnerValidator
(3)Business + Persistence Layer (ApplicationContext-jpa.xml)
Like, JPA Clinic Implementation
...jpa.EntityManagerClinic
JPA configuration is provided by orm.xml & persistence.xml
(4)Presentation Layer (controller)
web.xml & petclinic-servlet.xml
url="{ownerId}/pets/{petId}/edit"
[c:forEach var="pet" items="${owner.pets}">
...
[c:forEach var="visit" items="${pet.visits}">
TABLE: owners
PRIMARY KEY id
TABLE: pets
PRIMARY KEY id
FOREIGN KEY owner_id references the owners table id field
TABLE: visits
PRIMARY KEY id
FOREIGN KEY pet_id references the pets table id field
(1)Database
Like, TABLE: owners
PRIMARY KEY id
TABLE: types
PRIMARY KEY id
TABLE: pets
PRIMARY KEY id
FOREIGN KEY type_id references the types table id field
FOREIGN KEY owner_id references the owners table id field
(2)Business Layer
Like, Entity or Validation
...petclinic.Owner
...validation.OwnerValidator
(3)Business + Persistence Layer (ApplicationContext-jpa.xml)
Like, JPA Clinic Implementation
...jpa.EntityManagerClinic
JPA configuration is provided by orm.xml & persistence.xml
(4)Presentation Layer (controller)
web.xml & petclinic-servlet.xml
Wednesday, 31 August 2011
ROO Commands
Relationship
============
1.m:m use "field set"
(one Pizza can have many Toppings & one Topping can be applied to many Pizzas)
~.domain.Pizza roo> field set --fieldName toppings --type ~.domain.Topping
2.m:1 use ""field reference"
(one Pizza can have one base & one base can be applied to many Pizzas)
~.domain.Pizza roo> field reference --fieldName base --type ~.domain.Base
3.Automatic JSON support, including in Spring MVC applications
curl -v -H 'Accept: application/json' -X GET http://localhost:8080/petclinic/owners/
============
1.m:m use "field set"
(one Pizza can have many Toppings & one Topping can be applied to many Pizzas)
~.domain.Pizza roo> field set --fieldName toppings --type ~.domain.Topping
2.m:1 use ""field reference"
(one Pizza can have one base & one base can be applied to many Pizzas)
~.domain.Pizza roo> field reference --fieldName base --type ~.domain.Base
3.Automatic JSON support, including in Spring MVC applications
curl -v -H 'Accept: application/json' -X GET http://localhost:8080/petclinic/owners/
Thursday, 25 August 2011
JSP Custom Tags
1.Make Java public Class "MyTag"
2.Declare the "MyTag" class under file MyTag.tld
3.In JSP, define the <%@ taglib prefix="tagtool" uri="/WEB-INF/tlds/MyTag.tld" %>
& start to use it.
2.Declare the "MyTag" class under file MyTag.tld
3.In JSP, define the <%@ taglib prefix="tagtool" uri="/WEB-INF/tlds/MyTag.tld" %>
& start to use it.
Wednesday, 24 August 2011
ROO project
Task 2 - point to list.jsp & delete.jsp
Task 1 - point to create.jsp & show.jsp
a.Create new Client Form
http://localhost:8080/simple/clients?form
Form:-
1.need (method = RequestMethod.GET) & (method = RequestMethod.POST)
2.POST need (@ModelAttribute("reservation") Reservation reservation,
BindingResult result, SessionStatus status) AS parameter
3.JSP need modelAttribute="reservation"
b.Show Client
http://localhost:8080/simple/clients/2
Answer :- change views.xml +
Task 1 - point to create.jsp & show.jsp
a.Create new Client Form
http://localhost:8080/simple/clients?form
Form:-
1.need (method = RequestMethod.GET) & (method = RequestMethod.POST)
2.POST need (@ModelAttribute("reservation") Reservation reservation,
BindingResult result, SessionStatus status) AS parameter
3.JSP need modelAttribute="reservation"
b.Show Client
http://localhost:8080/simple/clients/2
Answer :- change views.xml +
username : ${client.username}
Wednesday, 17 August 2011
Use Derby
1.For the sake of low memory consumption and easy configuration,chosen Apache Derby
as database engine.
2.For testing purposes, the client/server mode is more appropriate because it allows you to inspect and edit data with any visual database tools that support JDBC. Example, the Eclipse Data Tools Platform (DTP).
3.To start the Derby server in the client/server mode, execute the startNetworkServer script in the bin directory.
4.Under ij
5.connect 'jdbc:derby://localhost:1527/vehicle;create=true' ;
as database engine.
2.For testing purposes, the client/server mode is more appropriate because it allows you to inspect and edit data with any visual database tools that support JDBC. Example, the Eclipse Data Tools Platform (DTP).
3.To start the Derby server in the client/server mode, execute the startNetworkServer script in the bin directory.
4.Under ij
5.connect 'jdbc:derby://localhost:1527/vehicle;create=true' ;
Git usage
To obtain a copy of the source:
From the bash command line, you can use the command
git clone git://git.springsource.org/spring-security/spring-security.git
Git Wiki
http://git-scm.com/download
Git-1.7.6-preview20110708.exe of msysgit (Git for Windows)
git
github
spring git
Eclipse GIT
If
git clone git://site/xxx/abc.git
having error fatal: unable to connect a socket (Invalid argument)
then use (http instead)
git clone http://site/xxx/abc.git
From the bash command line, you can use the command
git clone git://git.springsource.org/spring-security/spring-security.git
Git Wiki
http://git-scm.com/download
Git-1.7.6-preview20110708.exe of msysgit (Git for Windows)
git
github
spring git
Eclipse GIT
If
git clone git://site/xxx/abc.git
having error fatal: unable to connect a socket (Invalid argument)
then use (http instead)
git clone http://site/xxx/abc.git
Maven commands
mvn –version
mvn install
mvn clean install
(remove any pre-built binaries and then install the artifact)
mvn jetty:run-exploded --from ROO GWT
mvn [plugin-name]:[command-name]
================================
mvn dependency:tree
mvn dependency:copy-dependencies
ROO
===
dependency add --groupId org.springframework.integration --artifactId spring-integration-file --version 2.0.0.RELEASE
perform package
dependency remove --groupId org.springframework.integration --artifactId spring-integration-file --version 2.0.0.RELEASE
perform command --mavenCommand install
Phase Description
validate Runs a sanity check on the project itself
compile Compiles source code
test Runs the compiled test classes (delegating to a particular unit testing plugin runner, like jUnit or TestNG)
package Produces an artifact from the compiled code and classpath resources and stores it in the target folder, at the root of the project
integration-test Process and deploy the packaged artifact into an integration testing environment
verify Run checks to confirm that the package is valid
install Installs the packaged artifact in your local repository. Your local repository is a folder where all the downloaded dependencies are kept and cached. Subsequent builds that try to resolve a dependency already in the cache will not redownload the dependency, instead using the one in the local repository. Normally, it's in your home directory, under .m2, in a folder called repository. Thus, on my system, this would be /home/jlong/.m2/repository
deploy Copies the final artifact to another environment. Typically, a shared server so that different teams can share a shared dependency.
mvn install
mvn clean install
(remove any pre-built binaries and then install the artifact)
mvn jetty:run-exploded --from ROO GWT
mvn [plugin-name]:[command-name]
================================
mvn dependency:tree
mvn dependency:copy-dependencies
ROO
===
dependency add --groupId org.springframework.integration --artifactId spring-integration-file --version 2.0.0.RELEASE
perform package
dependency remove --groupId org.springframework.integration --artifactId spring-integration-file --version 2.0.0.RELEASE
perform command --mavenCommand install
Phase Description
validate Runs a sanity check on the project itself
compile Compiles source code
test Runs the compiled test classes (delegating to a particular unit testing plugin runner, like jUnit or TestNG)
package Produces an artifact from the compiled code and classpath resources and stores it in the target folder, at the root of the project
integration-test Process and deploy the packaged artifact into an integration testing environment
verify Run checks to confirm that the package is valid
install Installs the packaged artifact in your local repository. Your local repository is a folder where all the downloaded dependencies are kept and cached. Subsequent builds that try to resolve a dependency already in the cache will not redownload the dependency, instead using the one in the local repository. Normally, it's in your home directory, under .m2, in a folder called repository. Thus, on my system, this would be /home/jlong/.m2/repository
deploy Copies the final artifact to another environment. Typically, a shared server so that different teams can share a shared dependency.
Wednesday, 10 August 2011
Can not find the tag library descriptor for "http://java.sun.com/portlet"
To fix add pluto-taglib.jar
===========================
[!-- To solve porlet taglibs problem --]
[dependency]
[groupId]org.apache.portals.pluto[/groupId]
[artifactId]pluto-taglib[/artifactId]
[version]2.0.0[/version]
[type]jar[/type]
[scope]compile[/scope]
[/dependency]
Need Pluto
Get Pluto
===========================
[!-- To solve porlet taglibs problem --]
[dependency]
[groupId]org.apache.portals.pluto[/groupId]
[artifactId]pluto-taglib[/artifactId]
[version]2.0.0[/version]
[type]jar[/type]
[scope]compile[/scope]
[/dependency]
Need Pluto
Get Pluto
cvc-complex-type.4: Attribute 'version' must appear on element 'portlet-app'.
Before
======
[portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"]
Fix
===
[portlet-app
version="2"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"]
======
[portlet-app
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"]
Fix
===
[portlet-app
version="2"
xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd
http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"]
Subscribe to:
Posts (Atom)