Skip to main content

Posts

bower install Error (ECMDERR Failed to execute "git ls-remote ~~)

I found funny error during doing with "bower install". I google and some guys recommended to change from "git://" to "https://". but I was curious and just changed the network connection to smartphone tethering". Everything was OK. In my network, using git is not permitted? funny! Anyway, I leave my experience as below.  Total 13ms         Warning: Errno::ENOENT on line ["33"] of /Users/mac/.rvm/gems/ruby-2.0.0-p247/gems/compass-0.12.2/lib/compass/exec/global_options_parser.rb: No such file or directory - /Users/mac/git/example/app/bower_components     Run with --trace to see the full backtrace Use --force to continue.                 Aborted due to warnings. or bower jquery#~1.10.2           ECMDERR Failed to execute "git ls-remote --tags --heads git://github.com/components/jquery.git", exit code of #128 => change network (SSL -> normal or hotspo ?) cf. git conf...

Angular.js html5Mode and 404 error solution with Spring framework.

ㅇ the way to get rid of # from url   http://localhost:8080/#/centers   =>   http://localhost:8080/centers     add line in app.js   $locationProvider.html5Mode(true).hashPrefix('!'); ㅇ Other problem #1 involed in html5Mode   When you access the page with url directly like below, then you'll get 404 error.       http://localhost:8080/centers     => Need to solve it in server setting for that.     1. Devide the servlet for the direct call url service from other request.       <servlet-mapping>       <servlet-name>restful</servlet-name>       <url-pattern>/rest/*</url-pattern>    => for other request     </servlet-mapping>       <servlet-mapping>       <servlet-name>dispatcher</servlet-name>       <url-pattern>/page/*<...

sample nested view with ui-view in Angular.js

ㅇ template main template /sheepgrid/app/index.html /sheepgrid/app/views/centers.html nested view /sheepgrid/app/views/layout/default.html /sheepgrid/app/views/tab1/welcome.html /sheepgrid/app/views/tab1/userTabs.html ㅇ directive   <div class="container" ui-view/>   => for main template     <div class="panel-body">       <ul data-ui-view="tabs"></ul>       <ul data-ui-view="view"></ul>       => for nested view     </div> ㅇ route       // default route       $stateProvider.state('default', {         templateUrl : '/views/layout/default.html',         controller : 'DefaultCtrl',         abstract : true       }).state('default.centers', {         templateUrl : './views/centers.html',         cont...

Spring MVC on Heroku

https://devcenter.heroku.com/articles/getting-started-with-java https://devcenter.heroku.com/articles/getting-started-with-spring-mvc-hibernate#declare-process-types-with-procfile 1. pom.xml : add plugin   <!-- for heroku -->   <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactId>maven-dependency-plugin</artifactId>     <version>2.3</version>     <executions>       <execution>         <phase>package</phase>         <goals>           <goal>copy</goal>         </goals>         <configuration>           <artifactItems>             <artifactItem>               <groupId>org.mortba...

jetty / tomcat maven plugin example

1. pom.xml modification     <!-- context path -->     <finalName>tz.sheepshare</finalName>     <!-- ibatis mapping xml copy -->     <resources>       <resource>         <directory>${basedir}/src/main/java</directory>         <excludes>           <exclude>**/*.java</exclude>         </excludes>       </resource>     </resources>     <!-- ㅇ maven goal : tomcat:run -->     <plugin>       <groupId>org.codehaus.mojo</groupId>       <artifactId>tomcat-maven-plugin</artifactId>       <version>1.1</version>       <configuration>         <path>/</path>   ...

Closure와 lambda 설명

ㅇ Closure lambda 차이 - lambda : 익명 함수 - Closure : 자신의 정의된 영역의 변수를 에워싸고(close over) 있는 것. 또는, 자신이 정의된 영역의 변수에 접근할 수 있는 것. Closure를 사용하기 위해서 lambda(익명함수)가 사용됨 ㅇ Closure설명 https://docs.google.com/viewer?a=v&pid=forums&srcid=MTg0MjU3MDM2ODU0NjA0MzI4MzgBMTU5MDc0MTU3NDM3MzU5MTIwMjEBUUI4NE5VVjlFLVVKATQBAXYy lambda는 람다 표현식 또는 람다 함수, 그리고 이름 없는 함수(anonymous function)라고 불리우며, 그 성질은 "함수 객체(functor)와 동일하다" 할 수 있다. // Iterative version List<Sale> salesOfAHyundai = new ArrayList<Sale>(); for (Sale sale : sales) {  if (sale.getCar().getBrand().equals("Hyundai")) {  salesOfAHyundai.add(sale);  } } // Functional version  => lambda 표현식 val salesOfHyundai = db.sales.filter(_.car.brand == "Hyundai") ㅇ javascript Closure설명 => lambda : 익명함수 function exampleClosureForm(arg1, arg2){     var localVar = 8;     function exampleReturned(innerArg){         return ((arg1 + arg2)/(innerArg + loca...