This file contains hidden or 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
-- insert | |
insert into account_history (email, create_time, description) values (:email, CURRENT_TIMESTAMP, :description) | |
-- select | |
select email, create_time, description from account_history where email = :email | |
-- delete | |
delete from account_history where email = :email |
This file contains hidden or 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.daumcorp.be; | |
import org.junit.Test; | |
import org.postgresql.ds.PGSimpleDataSource; | |
import java.util.List; | |
import static org.hamcrest.CoreMatchers.is; | |
import static org.junit.Assert.assertThat; |
This file contains hidden or 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
/** | |
* This method ensures that the output String has only | |
* valid XML unicode characters as specified by the | |
* XML 1.0 standard. For reference, please see | |
* <a href=βhttp://www.w3.org/TR/2000/REC-xml-20001006#NT-Charβ>the | |
* standard</a>. This method will return an empty | |
* String if the input is null or empty. | |
* | |
* @param in The String whose non-valid characters we want to remove. | |
* @return The in String, stripped of non-valid characters. |
This file contains hidden or 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
<dependency> | |
<groupId>org.postgresql</groupId> | |
<artifactId>postgresql</artifactId> | |
<version>9.3-1100-jdbc41</version> | |
</dependency> |
This file contains hidden or 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.daumcorp.be; | |
/** | |
* Created by karian7 on 1/20/14. | |
*/ | |
public interface AccountRepository { | |
Account findByEmail(String email); | |
void save(Account account); | |
int deleteByEmail(String email); | |
} |
This file contains hidden or 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.daumcorp.be; | |
import org.junit.Before; | |
import org.junit.Test; | |
import javax.sql.DataSource; | |
import java.sql.Connection; | |
import java.sql.PreparedStatement; | |
import java.sql.SQLException; | |
import java.util.HashMap; |
This file contains hidden or 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.springapp.mvc; | |
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*; | |
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*; | |
import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*; | |
import java.util.List; | |
import org.junit.Before; | |
import org.junit.Test; | |
import org.junit.runner.RunWith; |
This file contains hidden or 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
<div id="emptySwf"></div> ## μ΅μ ν¬λ‘¬λΈλΌμ°μ μμ iframeλ΄μ νλμλ‘λμ νλ©΄κΉλΉ‘μ λ°μλ²κ·Έλ₯Ό ννΌνκΈ°μν΄ κ°μ§ νλμλ₯Ό μλ² λμν¨λ€. | |
<script type="text/javascript"> | |
//<![CDATA[ | |
try { | |
if(daum.Browser.chrome) { | |
var swfParam = { | |
swfurl: 'http://cafeimg.daum-img.net/swf/', | |
params: { | |
wmode: 'transparent', | |
base: 'http://cafeimg.daum-img.net/swf/' |
This file contains hidden or 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
import java.security.MessageDigest; | |
import java.security.NoSuchAlgorithmException; | |
public class MessageDigestHelper { | |
/** | |
* input μ SHA1 ν΄μλ‘ λ³νν¨. | |
*/ | |
public String toSHA1Hash(String input) { | |
MessageDigest sha1; | |
try { |
This file contains hidden or 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
public abstract class AntiLogarithm62 { | |
private static final long base = 62; // 62μ§μλ‘ ννμν΄ λλλ λ³μ κ° | |
/** | |
* 10μ§μλ₯Ό 62μ§μλ‘ λ³ν. | |
* | |
* @param num10 | |
* long typeμ 10μ§μ. | |
* @param length |