분류 전체보기(848)
-
Javascript array 및 map 처리
Ext.Array.each(selection, function (node) { if(node.getData().id.startsWith('extModel')) { node.remove(); } if(node.hasChildNodes()) { Ext.Msg.alert('Warning', '하위 record가 있으면 삭제할 수 없습니다!'); return; }});const selecteRecords = selection.map(record => record.getData());
2024.12.05 -
Sencha treepanel에서 값은 바뀌지 않고, depth에 따라 indent처리해서 보여주기
Ext.application({ name: 'ImageApp', launch: function () { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'panel', title: 'Image Display', html: '' } ] }); }});{ text: '순서', dataIndex: 'index', flex: 1, editor: { xtyp..
2024.12.05 -
Java 이미지 타입 정보 얻기
import javax.imageio.ImageIO;import javax.imageio.ImageReader;import javax.imageio.stream.ImageInputStream;import java.io.File;import java.io.IOException;import java.util.Iterator;public class ImageTypeDetector { public static void main(String[] args) { String imagePath = "/path/to/your/image.jpg"; try { File imageFile = new File(imagePath); String formatNa..
2024.12.05 -
Spring boot 이미지 stream 또는 base64로 넘기기
StreamSpring bootimport org.springframework.core.io.Resource;import org.springframework.core.io.UrlResource;import org.springframework.http.HttpHeaders;import org.springframework.http.MediaType;import org.springframework.http.ResponseEntity;import org.springframework.web.bind.annotation.GetMapping;import org.springframework.web.bind.annotation.RequestMapping;import org.springframework.web.bind.a..
2024.12.05 -
Sencha 이미지 사이즈 정보 가져오기
Case1Ext.application({ name: 'ImageSizeApp', launch: function () { Ext.create('Ext.container.Viewport', { layout: 'fit', items: [ { xtype: 'image', src: 'https://via.placeholder.com/150', // Replace with your image URL alt: 'Example Image', listeners: { ..
2024.12.05 -
Javascript 윈도우, 리눅스 상관없이 파일 경로 처리 하기
const filePath = "C:\\Users\\Public/Documents/file.txt";// Split the path into componentsconst components = filePath.split(/[\/\\]/);console.log(components);// Output: ['C:', 'Users', 'Public', 'Documents', 'file.txt']
2024.12.05