2016. 11. 26. 23:39

Inactive Task

Inactive task is when used to cancel a task but keep a record of the task in the project plan. The task remains in the project plan, but does not affect resource availability, the project schedule, or how other tasks are scheduled.





2016. 11. 24. 23:50

마일스톤 배경 색상 변경하기

중요한 일정에 대해 마일스톤을 추가하고, 이를 다른 것들과 구분되도록 하기 위해서 배경 색상을 다르게 표시하고 싶을 때 간단하게 할 수 있다.


Format > Text Styles



2016. 11. 24. 00:14

Health check! Status 칼럼을 아이콘으로 표시하기

Status 칼럼은 다음과 같은 정보를 표시한다.


Name

Value

Description

pjComplete

0

Task complete.

pjFutureTask

3

Task for future.

pjLate

2

Task late.

pjNoData

4

Status not available.

pjOnSchedule

1

Task on schedule.

[참고: https://msdn.microsoft.com/en-us/library/ff863390.aspx]


이 정보를 이용해서 Health 라고 하는 Custom 칼럼을 추가해 보자. 이 칼럼은 Status 값에 따라서 아이콘으로 좀더 효과적으로 보이게 하기 위한 것이다.




1. Health 라는 Custom 칼럼 하나를 추가


2. 해당 칼럼 위에서 오른쪽 마우스를 눌러 'Custom Fields' 를 클릭


3. Formula 를 선택해서 다음을 입력


Switch([Status]=0,'Complete',[Status]=1,'OnSchedule',[Status]=2,'Late',[Status]=3,'FutureTask',[Status]=4,'NoData') 


4. 'Graphical Indicators...' 를 클릭한 후, 아래 그림 처럼  각 값 마다 적절한 이미지를 지정해 준다.



이렇게 하면 Health Column 에는 상태에 따라 아이콘이 표시된다. Status 칼럼은 Start/Finish 그리고 Complete 에 따라서 자동으로 설정되는 값이며 아래와 같다.


How Calculated    If the task is 100 percent complete, then Microsoft Office Project sets the Status field to Complete.

If the task start date is greater than the status date, then the Status field contains Future Task.

If timephased cumulative percent complete is spread to at least the day before the status date, then the Status field contains On Schedule.

If the timephased cumulative percent complete does not reach midnight on the day before the status date, then the Status field contains Late. 


https://support.office.com/en-us/article/Status-task-field-769145ac-e052-45af-a847-e5ef15778bb1


2016. 11. 23. 00:45

Spring Websocket example (웹 채팅)

Spring 으로 push 서버 기능 구현을 알아보다가 HTML5 의 WebSocket 샘플을 스프링에서 제공하는 걸 확인하였다. git 에서 다운받고 gradle 로 실행해보니 바로 기능을 테스트 해 볼 수 있어 좋았다.



https://spring.io/guides/gs/messaging-stomp-websocket/



gradle 일 경우 아래 명령 입력 후,


gradlew bootRun



브라우저에서 아래 주소로 접속하면 보인다.


http://localhost:8080/


아래는 샘플 스크린 샷. 크롬과 IE 간 메시지를 주고 받는 예이다.





2016. 11. 23. 00:34

특정 포트(Port)를 사용중인 프로세스 확인하는 방법

기존엔 netstat -ab 명령으로 확인했었는데, 이 명령은 확인하기가 좀 어렵다. 그래서 구글링 해보니 역시 좋은 방법이 있었네.

Resource Monitor 가 있었어. 그래도 이런건 리눅스 처럼 명령어로 간단하게 뽑아낼 수 있으면 좋겠구만.



2016. 11. 21. 00:28

YAGNI

You Aren't Gonna Need It.


A programmer should not add functionality until deemed(여기다, 생각하다) necessary.


Always implement things when you actually need them, never when you just foresee that you need them.


Do the simplest thing that could possibly work.


https://en.wikipedia.org/wiki/You_aren%27t_gonna_need_it


2016. 7. 21. 13:46

Instant Articles / Apple News / AMP

모바일 콘텐츠 최적화 경쟁


Facebook - Instance Articles


Apple - Apple News


Google - AMP (Accelerated Mobile Pages)



구글의 AMP 는 구글이 정한 규약에 맞게끔 페이지를 구성하면 웹사이트 속도를 올릴수 있다고 한다.


AMP 는 다음 3가지 요소로 구성된다.


AMP HTML - 기존 HTML 문서에서 속도에 부담을 주는 요소를 배제하고, 몇몇 확장 속성들을 추가한 일종의 HTML 확장

AMP JS - AMP HTML 을 읽고 렌더링하는 런타임(Runtime)

Google AMP Cache - 구글이 제ㄱㅇ하는 AMP HTML 문서의 캐싱 서비스


AMP 문서를 만들어 올리면 구글이 자체 CDN 을 통해 더 빠른 액세스를 할 수 있게 해주는 것이다.


참고 : http://www.usefulparadigm.com/2016/02/24/adding-the-google-amp-to-mobile-website/

2016. 7. 21. 13:23

Functions as First-Class Values (1등 시민으로서의 함수)

What is Functions as First-Class Values?


This is translated as "1등 시민으로서의 함수" in Korean. (Why is this translated like that?)

First class? 1등 시민? 


First-class (en-en dictionary)

: If you describe something or someone as first-classyou mean that they are extremely good and of the highest quality.


A class of this term does not mean the class of java. It seems that to distinguish class word from general java class "시민" might be used. 

But it causes me to understand it more confused. 


Anyway, return to the subject.


In Java, we are accustomed to passing objects and primitive values to methods, returning them from methods, and assigning them to variables. This means that objects and primitives are first-class values in Java. 


Java cannot declare any function without a class. Instead java only has methods.

But methods aren't first-class in Java.


You can't pass a method as an argument to another methods, return a method from a method, or assign a method as a value to a variable.


However, most anonymous inner classes are effectively function "wrappers".


Many Java methods take an instance of an interface that declares one method. 



package functions;
import java.awt.*;
import java.awt.event.*;
class HelloButtonApp2 {
 private final Button button = new Button();
 public HelloButtonApp2() {
 button.addActionListener(new ActionListener() {
 public void actionPerformed(ActionEvent e) {
 System.out.println("Hello There: event received: " + e);
 }
 });
 }
}


Let's introduce a abstraction for all these "function objects"!.



package functions;
public interface Function1Void( <A >) {
 void apply(A a);
}


And let's try to use Function1Void like :


package functions;
import java.fawt.*;
import java.fawt.event.*;
class FunctionalHelloButtonApp {
 private final Button button = new Button();
 public FunctionalHelloButtonApp() {
 button.addActionListener(new Function1Void <ActionEvent >() { // 1
 public void apply(ActionEvent e) { // 2
 System.out.println("Hello There: event received: "+e);
 }
 });
 }
}

Abstraction callback function is great but instead of using this, lambda approach on Java 8 is better. 


Refer : Functional Programming for Java Developers by Dean Wampler

2016. 5. 12. 00:59

CGLIB Sample

It's very simple sample for CGLib Proxy being used by Spring.


	public static void main(String[] args) {
	    Enhancer enhancer = new Enhancer();
	    // enhancer.setSuperclass(MemberServiceImpl.class);
	    enhancer.setSuperclass(MemberService.class);
	    enhancer.setCallback(new MethodCallLogInterceptor());
	    Object obj = enhancer.create();
	    MemberService memberService = (MemberService)obj;
	    memberService.regist(new Member());
	}


public class MethodCallLogInterceptor implements MethodInterceptor {
	
	MemberService memberService = new MemberServiceImpl();
    
    public Object intercept(Object object, Method method, Object[] args, 
            MethodProxy methodProxy) throws Throwable {
        System.out.println("before ");
        
        // Object returnValue = methodProxy.invokeSuper(memberService, args);
        Object returnValue = method.invoke(memberService, args);
        
        System.out.println("after ");
        return returnValue;
    }
}



cglib.zip


Refer : http://javacan.tistory.com/entry/114

2016. 2. 9. 23:16

Advanced tips for Chrome Developer Tools

Here are some advanced tips for chrome developer tools.


About Console


You can run javascript function by entering its name. If you set a breakpoint in it, it will work. 





You can see the source code of any function and jump to the definition

: Type a function name without round brackets and hit the enter key then console will show its source 





Then click the right mouse button on the function name as below, then select 'Show function definition'. it will jump to the definition except for native function, 




You can use selectors which are the command line api within the console. 

 : https://developer.chrome.com/devtools/docs/commandline-api






Set or unset a breakpoint using debug and undebug function

: call the debug function passing the function name to debug as below. This is really helpful when you don't know where its source is so you cannot set the breakpoint there.




About source


If you want to search some text within the whole javascripts, use ctrl + shift + f short cut. This will show you the search window.




When you blackbox a JavaScript source file, you will not jump into that file when stepping through code you're debugging. You are able to debug just the code you are interested in.




Pause On Caught Exceptions




Pretty Print

: By clicking on the curly brace  ("Pretty Print") icon in the bottom left corner, the JavaScript is transformed into a more human readable form.




The end.