View RestCall.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private fun getResponse(disqusOauthUrl: String): ResponseEntity<String> { | |
val endpoint = URI.create(disqusOauthUrl) | |
val req = RequestEntity<Any>(HttpMethod.GET, endpoint) | |
val resType = object : ParameterizedTypeReference<String>() {} | |
return RestTemplate().exchange<String>(req, resType) | |
} |
View AspectTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.test.aop; | |
import org.aspectj.lang.JoinPoint; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.aspectj.lang.annotation.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; | |
import org.springframework.aop.support.AopUtils; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.context.annotation.Bean; |
View Test.jsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int count = 3; // main count1; | |
int count2 = 3; // main count2; | |
int count3 = 3; // main count3; | |
int count4 = 3; // main count4; | |
int causeCategoryCount = 3; // main count1; |
View effecitve-java.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I hope this edition captures my continued enthusiasm for the platform and helps make your use of the platform and its new features more effective and enjoyable. |
View commands.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo tcplay -c -d /dev/loop0 -a whirlpool -b AES-256-XTS | |
sudo mkfs.ext4 /dev/mapper/source.tc | |
losetup /dev/loop0 source.tc | |
tcplay -m source.tc -d /dev/loop0 | |
mount /dev/mapper/source.tc /mnt/source/ |
View presentation-framework.md
Slidy
장점
- 한 슬라이드 내에서 스크롤 지원
- Asciidoc 지원
- 프린트, PDF변환 자연스럽게 됨.
단점
- Markdown, Asciidoc을 쓸 때 명시적으로 페이지 구분자를 넣을 수 없음.
- H2 태그 기준으로만 페이지 전환
View java-string-concat.md
jdk1.5에서 String 더하기의 컴파일시의 최적화]
String 클래스를 "+"로 반복해서 더하는 연산을 어떤 경우에 컴파일러에서 자동으로 최적화해주는지 알고 있다면 보다 융퉁성 있게 쓸 수가 있습니다.
몇년전에 javaservice.net에서의 String vs StringBuffer에 대한 논의에서도 이 이야기가 오고 갔었고, 그를 통해 제가 알게 되었던 바는 다음과 같습니다.
- 한줄에서 상수 String끼리만 더하는 것은 모두 합쳐진 문자열로 바꿔준다. 즉 String a= "a" + "b" + "c"; 라고 쓰면 String ="abc"; 로 알아서 컴파일해준다는 거죠.
- 한줄에서 상수와 다른 String 클래스를 더하는 것은 StringBuffer의 append, toString 메서드를 쓰는 코드로 준다. jdk 1.4 javadoc 의 StringBuffer API설명 에 명시되어 있네요.
String buffers are used by the compiler to implement the binary string concatenation operator . For example, the code:
View README.md
활용요소
- IFTTT
- Dropbox
- Google TTS API
- mplayer (Linux mp3 player)
- Python watchdog 라이브러리
사용방법
- IFTTT가입
- 레서피 복사하여 활성화
View pad.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo xinput map-to-output for Multi-Touch-V3004 | |
input_id=`xinput | grep Multi-Touch-V3004 | awk '{print substr($5,4,length($5)-3)}'` | |
echo Input device id: $input_id | |
output_id=$1 | |
if [[ -z $output_id ]]; then | |
output_id=2 | |
fi |
NewerOlder