전체 글(1189)
-
Mybatis 반복문 처리
쿼리 쿼리 쿼리
2025.01.15 -
Mybatis ${} 사용시 SQL Injection 피하기
// Example: Validate column names and operatorsList validColumns = Arrays.asList("column1", "column2", "column3");List validOperators = Arrays.asList("=", "", "=", "like");for (Map condition : conditions) { String column = (String) condition.get("data"); String operator = (String) condition.get("compare"); if (!validColumns.contains(column)) { throw new IllegalArgumentException("..
2025.01.15 -
Sencha grid csv 데이터 로딩
tbar: [ { text: 'Load CSV', handler: function() { // Trigger a file input dialog to select a CSV file const fileInput = document.createElement('input'); fileInput.type = 'file'; fileInput.accept = '.csv'; fileInput.onchange = function(event) { const file = event.target.files[0]; if (file) { ..
2025.01.15 -
Sencha grid의 내용 csv로 저장하기
tbar: [ { text: 'Export to CSV', handler: function() { const grid = this.up('grid'); // Get reference to the grid const store = grid.getStore(); // Get the grid's store // Filter columns to exclude those with dataIndex '_$_' const columns = grid.getColumns().filter(column => column.dataIndex !== '_$_'); // Extract column hea..
2025.01.15 -
Sencha grid header filter
const columns = grid.getColumns().filter(column => column.dataIndex !== '_$_');'_$_'는 row의 상태값 컬럼의 header
2025.01.15 -
Java String[]에 원하는 문자가 있는지 확인
Arrays.asList 이용String[] array = {"apple", "banana", "cherry"};String valueToCheck = "banana";boolean isIncluded = Arrays.asList(array).contains(valueToCheck);if (isIncluded) { System.out.println(valueToCheck + " is in the array.");} else { System.out.println(valueToCheck + " is not in the array.");}for문 이용String[] array = {"apple", "banana", "cherry"};String valueToCheck = "banana";boolea..
2025.01.15