Skip to content

Instantly share code, notes, and snippets.

View yangwansu's full-sized avatar
:octocat:

양완수 Wansu yang yangwansu

:octocat:
  • coupang.com
  • seoul, korea
View GitHub Profile
@yangwansu
yangwansu / gist:5330986
Last active December 15, 2015 22:09
HTML

HTML 스터디를 해야하는 이유

우리 모두 WEB 이라는 플랫폼 위에서 돌아가는 제품에 기여하는 사람들이기 때문에.

각 롤 별 스터디의 최종 목표

  • 서버개발자 프론트에서 할 수 있는 일이 무엇인지 알 필요가 있다. 프론트 개발자를 이해하고 사랑 할 수 있게 된다.
  • 프론트개발자 책임과 역활의 분리에 대해 고민하고 맑고 화창한 결과물을 만들수 있다. MVC 는 프론트도 할 수 있다.
@yangwansu
yangwansu / slipp-clojure-3th.clj
Last active December 30, 2015 10:29
http://www.slipp.net/wiki/pages/viewpage.action?pageId=16711765 에서 계산기에 대해 여러가지로 작성해보았습니다.
(use ['clojure.string])
(defn t [actual expected]
(if (= actual expected)
(do
(println 'sucess)
true )
(do
(println (str 'fail!! " actual: " actual " expected " expected ))
false)))
(t 1 1)
@yangwansu
yangwansu / euler.p1.clj
Last active January 2, 2016 16:19
http://euler.synap.co.kr/prob_detail.php?id=1 10보다 작은 자연수 중에서 3 또는 5의 배수는 3, 5, 6, 9 이고, 이것을 모두 더하면 23입니다. 1000보다 작은 자연수 중에서 3 또는 5의 배수를 모두 더하면 얼마일까요?
(#(range %1 %2 %1) 3 10)
(#(range %1 %2 %1) 5 10)
;; 렉시컬 범위의 함수를 이용하고 3 과 5의 배수 리스트를 더한후 유니크한 Set 만 추출 하여 계산
(letfn [(multiful [number limit]
(seq (range number limit number)))]
(apply +
(set (concat (multiful 3 1000) (multiful 5 1000))))
)
@yangwansu
yangwansu / euler.p1.groovy
Created January 9, 2014 05:38
http://euler.synap.co.kr/prob_detail.php?id=1 10보다 작은 자연수 중에서 3 또는 5의 배수는 3, 5, 6, 9 이고, 이것을 모두 더하면 23입니다. 1000보다 작은 자연수 중에서 3 또는 5의 배수를 모두 더하면 얼마일까요?
def func={start,end ->
sum=0;
(start..<end).each {
if(it%3 == 0 || it%5==0){
sum+=it
}
}
return sum;
}
package com.springapp.mvc;
import static com.google.common.base.Preconditions.*;
import static java.lang.System.err;
public class GuavaTest1 {
private final boolean initialzed = false;
public void testForNonNullArgument(final String parameter)
{
final String localPrameter = checkNotNull(parameter, "null값은"
@yangwansu
yangwansu / GuavaTest1.java
Created March 10, 2014 22:49
최대한 동일한 형태를 만들기 위해 모든 Exception type 을 바꿈...
package com.springapp.mvc;
import static com.google.common.base.Preconditions.*;
import static java.lang.System.err;
public class GuavaTest1 {
private final boolean initialzed = false;
public void testForNonNullArgument(final String parameter)
{
final String localPrameter = checkNotNull(parameter, "null값은"
@yangwansu
yangwansu / GuavaTest1.java
Created March 10, 2014 22:52
catch 안에 예외의 변수 이름까지도 동일하게 함
package com.springapp.mvc;
import static com.google.common.base.Preconditions.*;
import static java.lang.System.err;
public class GuavaTest1 {
private final boolean initialzed = false;
public void testForNonNullArgument(final String parameter)
{
final String localPrameter = checkNotNull(parameter, "null값은"
@yangwansu
yangwansu / GuavaTest1.java
Created March 10, 2014 22:57
이번 에도 또한 최대한 비슷하게 만들려고 노력...
package com.springapp.mvc;
import static com.google.common.base.Preconditions.*;
import static java.lang.System.err;
public class GuavaTest1 {
private final boolean initialzed = false;
public void testForNonNullArgument(final String parameter)
{
final String localPrameter = checkNotNull(parameter, "null값은"
@yangwansu
yangwansu / GuavaTest1.java
Created March 10, 2014 23:01
각각의 블럭을 의도가 들어나도록 메서드 추출함..
package com.springapp.mvc;
import static com.google.common.base.Preconditions.*;
import static java.lang.System.err;
public class GuavaTest1 {
private final boolean initialzed = false;
public void testForNonNullArgument(final String parameter)
{
final String localPrameter = checkNotNull(parameter, "null값은"