blog.visualp.com
<table id="test" />
<button type="button" onclick="tableToExcel('test')" />
페이징이 없는 테이블 데이터를 받을 때 쓸만합니다.
한글 처리 핵심은 %EF%BB%BF
function
tableToExcel(id) {
var
data_type =
'data:application/vnd.ms-excel;charset=utf-8'
;
var
table_html = encodeURIComponent(document.getElementById(id).outerHTML);
var
a = document.createElement(
'a'
);
a.href = data_type +
',%EF%BB%BF'
+ table_html;
a.download = id+
'_excel'
+
'.xls'
;
a.click();
}
날짜 중복확인:
(('사용자입력시작일' <= DB시작일 and DB시작일 <= '사용자입력종료일') or ('사용자입력시작일' <= DB종료일 and DB종료일 <= '사용자입력종료일') or (DB시작일 <= '사용자입력시작일' and '사용자입력종료일' <= DB종료일))
이미지 외부링크 차단하기 에 대한 설명이며
Nginx 기준입니다.
nginx.conf file에 아래의 정보를 추가하시면 됩니다.
localtion ~\.(jpg?g|png|gif)${
1. 맨 끝에 있는 콤마(,)를 제거하는 경우
<update id="updateAuthorIfNecessary" parameterType="domain.blog.Author">
-- Maria DB max connection 수 확인
SHOW VARIABLES LIKE '%max_connection%'
-- Maria DB에 접속되어 있는 client 정보 리스트
SHOW PROCESSLIST;
-- Maria DB max connection 수 조절
SET GLOBAL max_connections = 10000;
//status 관련 값
show status like '%CONNECT%';
Max_used_connections <--현재 연결된 접속수
Threads_connected <-- 연결되었던 최대 접속수
using System;
class Program {
static void Main(string[] args) {
System.AppDomain.CurrentDomain.UnhandledException += UnhandledExceptionTrapper;
throw new Exception("Kaboom");
}
static void UnhandledExceptionTrapper(object sender, UnhandledExceptionEventArgs e) {
Console.WriteLine(e.ExceptionObject.ToString());
Console.WriteLine("Press Enter to continue");
Console.ReadLine();
Environment.Exit(1);
}
}
// c#에서 Console(콘솔) 어플리케이션에서 글로벌 에러 처리
반복 작업시 유용하게 이용