WITH table1 AS ( SUB쿼리 ) ,table2 AS ( SUB쿼리 ) SELECT a.*, b.* FROM table1 a, table2 b where a.idx = b.idx ;
엑셀에서 lastIndexOf 와 같은 기능을 찾으려 보니 없드라
엑셀에서 lastIndexOf 와 같은 기능을 찾으려 보니 없드라... 그래서 찾은 자료임 "E2" 자리에 있는 문자가 아래와 같을 경우 \jtnet-backoffice-system\jms\src\main\webapp\index.jsp 여기서 파일명(index.jsp)만 추출하고자 할 경우 아래 함수 적용 =RIGHT(E2,LEN(E2)-FIND("@",SUBSTITUTE(E2,"\","@",LEN(E2)-LEN(SUBSTITUTE(E2,"\",""))),1)) 결과값 : index.jsp 또, 폴더명(index.jsp 이전 텍스트)만 추출하고자 할 경우 아래 함수 적용 =LEFT(E2,LEN(E2)-(LEN(E2)-FIND("@",SUBSTITUTE(E2,"\","@",LEN(E2)-LEN(SUBSTITUTE(E2,"\",""))),1))) 결과값 : \jtnet-backoffice-system\jms\src\main\webapp\
text-decoration : underline 밑줄 위치 더 아래로
text-decoration: underline;text-underline-positoin: under; under 외에 다른 옵션(auto, inherit, initial, unset)들도 있지만, 동일하였다.
Mybatis 쿼리를 바인딩된 String으로 가져오는 방법
마이바티스에서 수행되어 만들어진 쿼리를 추출하고 싶을 때 사용합니다. @Autowired SqlSession sqlSession 을 사용합니다. 1. Mapper.xml 에 쿼리가 아래와 같다고 가정하고 <select id="selectTest"> select * from test where idx1 = #{param.idx1} and idx2 = #{param.idx2} and userid = #{param.session.userid} and testList in ( <foreach collection="param.testList" item="testList" separator=","> #{testList} </foreach> )</select> 2. 파라미터를 HashMap 형식일 경우(기본적으로 모두 … 계속 읽기 Mybatis 쿼리를 바인딩된 String으로 가져오는 방법
PDF 파일 처리 – JPG>PDF, PDF+PDF, 비밀번호 주입
import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.OutputStream; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.itextpdf.text.Document; import com.itextpdf.text.DocumentException; import com.itextpdf.text.Image; import com.itextpdf.text.PageSize; import com.itextpdf.text.pdf.PdfContentByte; import com.itextpdf.text.pdf.PdfImportedPage; import com.itextpdf.text.pdf.PdfReader; import com.itextpdf.text.pdf.PdfStamper; import com.itextpdf.text.pdf.PdfWriter; public class PdfUtils { private static final Logger logger = LoggerFactory.getLogger(PdfUtils.class); /** * PDF파일에 비밀번호를 주입한다. * @Param input … 계속 읽기 PDF 파일 처리 – JPG>PDF, PDF+PDF, 비밀번호 주입
JAVA URL인코딩, 디코딩 – URLEncoder, URLDecoder
URLEncoder.encode(String encodingString, String charsetName); //인코딩할 문자, 케릭터셋("UTF-8") URLDecoder.decode(String decodingString, String charsetName); //인코딩할 문자, 케릭터셋("UTF-8") 예제 import java.io.UnsupportedEncodingException; import java.net.URLDecoder; import java.net.URLEncoder; try{ String txt = "아부탱"; String txtEnc = URLEncoder.encode(txt, "UTF-8"); System.out.println(URLEncoder.encode(txt, "UTF-8")); //%EC%95%84%EB%B6%80%ED%83%B1 System.out.println(URLDecoder.decode(txtEnc, "UTF-8")); //아부탱 }catch(UnsupportedEncodingException e){ e.printStackTrace(); }
POI 배경색상 표
POI에서 배경색상 지정할 때 아래 코드를 참고할 수 있겠다. CellStyle cs = workbook.createCellStyle();cs.setFillForegroundColor(HSSFColor.AQUA.index);cs.setFillPattern(CellStyle.SOLID_FOREGROUND); 색감순 WHITE LEMON_CHIFFON LIGHT_YELLOW YELLOW GOLD LIGHT_ORANGE ORANGE TAN LIGHT_GREEN BRIGHT_GREEN LIME GREEN DARK_YELLOW OLIVE_GREEN DARK_GREEN SEA_GREEN TEAL AQUA LIGHT_TURQUOISE TURQUOISE SKY_BLUE ROYAL_BLUE LIGHT_BLUE BLUE DARK_BLUE DARK_TEAL INDIGO BLUE_GREY PALE_BLUE LIGHT_CORNFLOWER_BLUE CORNFLOWER_BLUE LAVENDER ORCHID VIOLET PLUM MAROON CORAL ROSE PINK RED BROWN … 계속 읽기 POI 배경색상 표
curl 예시
참조사이트 : https://www.lesstif.com/pages/viewpage.action?pageId=14745703 도움말curl --help 파라미터 전송(http://www.test.co.kr?param1=111¶m2=222)curl -d "param1=111¶m2=222" http://www.test.co.kr https 전송curl -k https://www.test.co.kr https 파라미터 전송curl -kd "param1=111¶m2=222" https://www.test.co.kr
vi 줄번호 보이게 하기
esc:set number
리눅스 특정폴더 파일개수 세는 방법
리눅스에서 특정 폴더의 파일 개수를 세는 방법은 아래와 같습니다. ls folder_location | wc -l ls로 특정 폴더에 내용이 출력되는 것을 파이프로 wc에 넘겨서 행의 숫자를 파악하는 형태가 되네요. wc는 저도 몰랐는데 파일내의 단어나 문자, 행의 개수를 파악하는데 사용하는 커맨드라인 명령어네요. 즉 /var/www에 있는 파일 개수를 세기 위해서는 ls /var/www | wc -l 위와 같이 하시면 … 계속 읽기 리눅스 특정폴더 파일개수 세는 방법