Skip to main content

Posts

Jack Layton's letter to Young Canadians

And finally, to all Canadians: Canada is a great country, one of the hopes of the world. We can be a better one – a country of greater equality, justice, and opportunity. We can build a prosperous economy and a society that shares its benefits more fairly. We can look after our seniors. We can offer better futures for our children. We can do our part to save the world’s environment. We can restore our good name in the world. We can do all of these things because we finally have a party system at the national level where there are real choices; where your vote matters; where working for change can actually bring about change. In the months and years to come, New Democrats will put a compelling new alternative to you. My colleagues in our party are an impressive, committed team. Give them a careful hearing; consider the alternatives; and consider that we can be a better, fairer, more equal country by working together. Don't let them tell you it can't be done. My friends, ...

The power of jQuery - how to disable all the input in html page

I need to implement a function about: when current user is not active, all the content should be disabled. With jQuery, it's pretty easy ,   var active = "${active}";    if(active =='false' ){   $(".form-input :input").each( function(i) {   $(this).attr('disabled', 'disabled');    }); comments: line 1:  get the  user's active status line 2:   if user is not active line 3:    loop to get all the input elements(like text, checkbox, radio line 4:         disable all the input if the user is not active

Google to Acquire Motorola Mobility

Combination will Supercharge Android, Enhance Competition, and Offer Wonderful User Experiences MOUNTAIN VIEW, CA and LIBERTYVILLE, IL – AUGUST 15, 2011  – Google Inc. (NASDAQ: GOOG) and Motorola Mobility Holdings, Inc. (NYSE: MMI) today announced that they have entered into a definitive agreement under which Google will acquire Motorola Mobility for $40.00 per share in cash, or a total of about $12.5 billion, a premium of 63% to the closing price of Motorola Mobility shares on Friday, August 12, 2011. The transaction was unanimously approved by the boards of directors of both companies. The acquisition of Motorola Mobility, a dedicated Android partner, will enable Google to supercharge the Android ecosystem and will enhance competition in mobile computing. Motorola Mobility will remain a licensee of Android and Android will remain open. Google will run Motorola Mobility as a separate business. Larry Page, CEO of Google, said, “Motorola Mobility’s total commitment t...

Web Service(Axis2) over https

in sever.xml: Add     <Connector port="80" protocol="HTTP/1.1"                connectionTimeout="20000"                 redirectPort ="443" />   <Connector acceptCount="100" connectionTimeout="20000" executor="tomcatThreadPool" maxKeepAliveRequests="15" port="${bio.http.port}" protocol="org.apache.coyote.http11.Http11Protocol" redirectPort="${bio.https.port}"/>                 <Connector port="443"                protocol="HTTP/1.1"                SSLEnabled="true"                maxThreads="150"                scheme="https"                secure="true"                clien...

Write simple codes

Rule #1: codes should simple Struggling for fixing the bugs within the complex and repeatable codes in the projects. Codes should always be  simple and readable.  If you have to write complicated codes, refer to rule #1.

Lesson learned from current projects(ongoing)

Took a few months to be familiar with existing projects and try to fix bunch of issues reported by customer and team. Learned huge amount of things from the codes, 1. Use hibernate instead of jdbc sql. This will be extremely help to deal with the change of requirements. 2. Nice convention is necessary. The Java Class should have  the same pre-file name with the Jsp page; Should put all those similiar function codes in one place(e.g. pojo in folder Model , dao in Dao, controller in Controller ,service in folder service), put all the constants in one file(it's really helpful when you have to change them) 3. Test is important( need to plan the test before you commit the codes in production) 4. Version control. Currently, the projects running on three places. The development, staging and production. The production running the stable codes retrieved from trunk, the staging always have the tested codes from development environment; development environment have the lat...