Thursday, July 2, 2015

mvn command not found in MAC Terminal


  1. vi ~/.bash_profile
  2. #set JAVA_HOME
  3. JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_71.jdk/Contents/Home
    export JAVA_HOME


    M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3
    export M2_HOME

    PATH=$PATH:$JAVA_HOME/bin:$M2_HOME/bin
    export PATH
  4. esc
  5. :wq
  6. source ~/.bash_profile




Tuesday, June 23, 2015

angularjs Failed to instantiate module oc.lazyLoad due to:

When I open browser Internet Explorer 7 (7.0.5730)
Status tools appear error:
[$injector:modulerr] Failed to instantiate module oc.lazyLoad due to:
[$injector:nomod] Module   ‘undefined’ is not available!

But chrome (43.0.2357) is great.Console not appear error.

Friday, June 19, 2015

mac virtualbox xp ,It can't open internet


Install VM VirtualBox Guest Addtions.
Update network is Net and choose  PCnet-Fast III

Tuesday, June 2, 2015

angularjs directive not working

js 

app.directive('onlyLabelName', function($http) {
......
}

html

<input onlyLabelName><input>


when I open AngularJS websites(https://docs.angularjs.org/guide/directive),I see information on below:

The normalization process is as follows:
  1. Strip x- and data- from the front of the element/attributes.
  2. Convert the :-, or _-delimited name to camelCase.
So,I  need change onlyLabelName to only-label-name

Error: Failed to load template: template/modal/window.html

Error: Failed to load template: template/modal/window.html
Error: Failed to load template: template/modal/backdrop.html

I have resolved it by including $templateCache as app dependency (the one that posess function that calls open). 
app.run(function($rootScope, $templateCache) {
    $rootScope.$on('$viewContentLoaded', function() {

        $templateCache.removeAll();
        console.log('removeAllCache');
    });
});

Friday, May 29, 2015

How to lazy load my file(js) on my Angularjs application


Before I want use RequireJS my Angularjs application, But I felling it very useful for me .

I find  Oclazyload. It's very good,

Tuesday, May 26, 2015

Error: [$injector:unpr] Unknown provider: $templateRequestProvider <- $templateRequest <- $modal

Error: [$injector:unpr] Unknown provider: $templateRequestProvider <- $templateRequest <- $modal
http://errors.angularjs.org/1.2.28/$injector/unpr?p0=%24templateRequestProvider%20%3C-%20%24templateRequest%20%3C-%20%24modal
    at VALIDITY_STATE_PROPERTY (http://localhost:8080/bower_components/angular/angular.js:78:14)
    at http://localhost:8080/bower_components/angular/angular.js:3801:21
    at Object.getService [as get] (http://localhost:8080/bower_components/angular/angular.js:3929:41)
    at http://localhost:8080/bower_components/angular/angular.js:3806:47
    at getService (http://localhost:8080/bower_components/angular/angular.js:3929:41)
    at Object.invoke (http://localhost:8080/bower_components/angular/angular.js:3956:21)
    at http://localhost:8080/bower_components/angular/angular.js:3807:39
    at getService (http://localhost:8080/bower_components/angular/angular.js:3929:41)
    at invoke (http://localhost:8080/bower_components/angular/angular.js:3956:21)
    at Object.instantiate (http://localhost:8080/bower_components/angular/angular.js:3976:25) <div class="container ng-scope" ng-view="">(anonymous function) @ angular.js:10126$get @ angular.js:7398nodeLinkFn @ angular.js:6755compositeLinkFn @ angular.js:6146publicLinkFn @ angular.js:6042$get.boundTranscludeFn @ angular.js:6166controllersBoundTransclude @ angular.js:6773update @ angular-route.js:865$get.Scope.$broadcast @ angular.js:13093(anonymous function) @ angular-route.js:547deferred.promise.then.wrappedCallback @ angular.js:11682deferred.promise.then.wrappedCallback @ angular.js:11682(anonymous function) @ angular.js:11768$get.Scope.$eval @ angular.js:12811$get.Scope.$digest @ angular.js:12623$get.Scope.$apply @ angular.js:12915done @ angular.js:8450completeRequest @ angular.js:8664xhr.onreadystatechange @ angular.js:8603
VM708:71 TooltipManager.cs: Processing http://localhost:8080/#/foundation/termcontent
TooltipBootstrapper.js:1 tooltipBootstrapper.cs: tt_process got a response of false


I use angular 1.2.28 and ui.bootstrap 0.12.1

If I use Jetty run my App on Chrome ,Then console will display 'Unknown provider: $templateRequestProvider <- $templateRequest <- $modal',But If I run my App on Safari will not display error.


I fell both difference at is use NodeJS.

When I update NodeJS from 0.12.3 to 0.12.4 and restart my MAC , finally Chrome not display error.

Error: [$injector:unpr] Unknown provider: $routeProvider

http://stackoverflow.com/questions/19197182/error-injectorunpr-unknown-provider-routeprovider?rq=1


It looks like you forgot to include the ngRoute module in your dependency for myApp.
In Angular 1.2, they've made ngRoute optional (so you can use third-party route providers, etc.) and you have to explicitly depend on it in modules, along with including the separate file.
'use strict';

angular.module('myApp', ['ngRoute']).
    config(['$routeProvider', function($routeProvider) {
$routeProvider.otherwise({redirectTo: '/home'});
}]);

Tuesday, May 5, 2015

Jetty

http://localhost:8080/rest-api/


I want remove /rest-api/


/Users/chenxingjun/IdeaProjects/rest-api/pom.xml

add

<contextPath>/</contextPath>


to

<plugin>
    <groupId>org.mortbay.jetty</groupId>
    <artifactId>maven-jetty-plugin</artifactId>
    <version>6.1.10</version>
    <configuration>
        <scanIntervalSeconds>10</scanIntervalSeconds>
        <contextPath>/</contextPath>
        <stopKey>foo</stopKey>
        <stopPort>9999</stopPort>
    </configuration>


</plugin>

Sunday, May 3, 2015

Rich text

I feel Tinymce is good open source software. It's same google docs.

Wednesday, April 15, 2015

4/20/2015 Wednesday Holidays

April fifth, two hundred and fifteen Wednesday Holidays
Today,I want write some holidays.

China Holidays

Months
Holidays
Dates
January
New Year’s Day
1st
Thursday
February
Spring Festival's Day
nineteenth
Thursday
March
Lantern Festival's Day


Women's Day

Arbor Day

fifth
Thursday
eighth
Sunday
twelfth
Thursday
April
Tomb-sweeping Day
fourth
Saturday
May
Mother’s Day
Memorial Day
(varies- 2nd Sunday)
(varies- final Monday)
June
Father’s Day

Dragon Boat Festival
(varies- 3rd Sunday)
twenth
July
Independence Day
4th
August
~~~
~~~
September
Labor Day
(varies- 1st Monday)
October
Columbus Day
Halloween
(varies- 2nd Monday)
31st
November
Veteran’s Day
Thanksgiving
11th
(varies- 4th Thursday)
December
Christmas
New Year’s Eve
25th
31st

Thursday, April 2, 2015

IE Catch Spring MVC IE7 redirect

PCS System work in chrome is well.
But work in IE so bad.
example:

Use Ajax in IE,Just frist load data.

Spring MVC IE7 redirect


First, I execute save.do in edit.jsp
@RequestMapping(value = "/saveUser.do")
public String saveUser(User user) {
    userService.save(user);
    return "redirect:/listUser.do";
}
I then system redirect to list.do
@RequestMapping(value = "/listUser.do")
public String listUser(User user, HttpServletRequest request) throws Exception {

    List<User> list = userService.getAll(user, getRowBounds(request));
    request.setAttribute("list", list);
    return "/framework/system/user/listUser";
}
When I use chrome, the page will view new data. But if I use IE7, the page does not view new data, only views the old data. But with IE11 seems to be working fine.
Tanks for every one. I find the answer.
Add
<mvc:interceptors>
    <bean id="webContentInterceptor" 
          class="org.springframework.web.servlet.mvc.WebContentInterceptor">
        <property name="cacheSeconds" value="0"/>
        <property name="useExpiresHeader" value="true"/>
        <property name="useCacheControlHeader" value="true"/>
        <property name="useCacheControlNoStore" value="true"/>
    </bean>
</mvc:interceptors>

Wednesday, April 1, 2015

Caused by: java.sql.SQLException: Io exception: Broken pipe



When used Spring security of login.jsp ,I writing Username is 'user_bate_the_to_be_20150909'.

Yes,This is a long name. Next i writing password '222222'. Final,I submit this form.

Eclipse Console:


Caused by: java.sql.SQLException: Io exception: Broken pipe

Eclipse Console:

 Caused by: java.sql.SQLException: ORA-12899: value too large for column "PCS"."S_LOG"."CREATOR_NAME" (actual: 46, maximum: 20)




PCS System not working in IE7



IE7 status bar report 'console is not defined'

So,I search question in Google.

I found solution is below:

http://www.uglybugger.org/software/post/console_log_equivalent_for_internet_explorer