맥에서 드뎌 맥 앱스토어를 오픈했다..

나올줄 알고있었는데... 막상 나오니... 좋군요!!!ㅋㅋ

사용 방식 및 구매 방법은 기존의 아이폰 앱스토어랑 똑같구요...

아직 어플이 많지는 않은듯 하지만 기존에 사용하던 패키지 제품을 따로따로 살수 있어서

좋은것 같군요.. iLife 나 iWork 같은것들...

밑에는 설치 스샷임.


스크린샷 2011-01-13 오전 9.51.49.png

설치하면 Dock 에 바로 아이콘이 생기네요...

아이폰 앱스토어랑 똑같죠??ㅎㅎ

Posted by 쎄룽
:

ecto라는 유명한 블로그 어플인데...

이것도 newLine이 안되면 어쩌지...

흠...

Posted by 쎄룽
:
맥저널 개행 테스트 이것은 개행이 안되었었다. HTML 개행 태그를 넣어보자<br> <br> 이렇게 된다고 해도 불편하기는 한데... 이건 되나...<br />헐헐... 요거는?? <br> 엔장....내어배ㅔ쟈ㅗㄹ34ㄹ839ㅛ4혿ㄱㄹ미ㅏㅇ푸미ㅏㅇ푸미아 미
Posted by 쎄룽
:
맥북에서 블로그 어플을 찾아보니... 대부분 ecto 라는 어플을 소개한다.(티스토리마져..) 음...근데 유저들의 평이 별로 안좋더라...헐..개행이 안된다던가.. 뭐 그런... 난 다른걸 써보려고 쫌 찾아봤다. 그래서 찾아본 어플이 “MAC JOURNAL” !! 지금 써보고 있는데... 성능은 올려봐야 알것같다. 어느 정도까지 똑같이 올라갈런지...ㅎㅎ 지금 사진을 넣어보고 느낀건데... 사진 편집이 원활하지가 않다. ㅡ,.ㅡ;; 뭐...실력없는 내가 적응해야지...에효...

아... 이 어플도 개행이 안되네요...ㅇ니;ㅏ럽조레보베3ㅗㄹ948ㅛ배ㅔㄷㄹ풰몸이;ㅏㅓ;ㄹ

줸장....

Posted by 쎄룽
:

아카이브 모드인 DB에서 백업을 받은 후 리스토어하기가 너무 어렵다...(물론 내가 몰라서 그런거지만)

복원은 쉽지만 DB가 살아나지 않는다. 쩝... 

원래 DB에서 아카이브 로그 마지막것을 가져온다. 안된다...헐...

이것 저것 만져보다 

DB2 ROLLFORWARD DB "DB명" QUERY STATUS

를 입력하면 롤포워딩 복구를 하는데 필요한 아카이브 로그명을 갈켜준다.

해당 로그를 가져와서 롤포워드 하면 된다. 

후후훗....정말이지... DB는 넘어려워...ㅋ
Posted by 쎄룽
:

파일 압축

Computer Ref./JAVA 2010. 11. 8. 19:07 |

Java - Zip 파일 형식 압축및 압축풀기(한글깨짐방지 - jazzlib 사용)

Posted 2010/04/14 18:29, Filed under: Language/JAVA

import java.util.zip.ZipEntry;

import java.util.zip.ZipOutputStream; 

#java에서 지원하는 ZipEntry, zipOutputStream 을 사용 하면 경로 내의 디렉토리명, 파일명에서 한글을 사용할경우 깨지는 현상이 발생.


jazzlib 라이브러리를 사용하면 한글깨짐 문제가 해결됩니다.

import net.sf.jazzlib.ZipEntry;

import net.sf.jazzlib.ZipOutputStream; 


jazzlib 는 http://jazzlib.sourceforge.net 여기에서 다운로드 할수있습니다.

또는 아래에서 다운 하세요.


jar 파일 :

 

unknown.gif jazzlib.jar (112)


 


 


아래 내용 출처 :

http://cafe.naver.com/itmecca.cafe?iframe_url=/ArticleRead.nhn%3Farticleid=1737


###################### ZipUtils.java ######################


import java.io.ByteArrayInputStream;

import java.io.ByteArrayOutputStream;

import java.io.File;

import java.io.FileInputStream;

import java.io.FileOutputStream;


import net.sf.jazzlib.ZipEntry;

import net.sf.jazzlib.ZipInputStream;

import net.sf.jazzlib.ZipOutputStream;


/**

* FileName : ZipUtils.java

* Comment  : # 인자값 내용

   # createZipFile(압축할디렉토리위치, 저장될zip파일의 경로를 포함한파일명, 디렉토리 없을시 생성여부)

*/

public class ZipUtils {

    private static final byte[] buf = new byte[1024];

    

    /**

    * Comment  : 생성될 ZIP파일의 경로에 디렉토리가 없을경우 에러  발생

    */

    public static void createZipFile(String targetPath, String zipPath)throws Exception{

        createZipFile(targetPath, zipPath, false);

    }

    

    /**

    * Comment  : zip 파일을 생성.

    */

    public static void createZipFile(String targetPath, String zipPath, boolean isDirCre)throws Exception{

        File fTargetPath = new File(targetPath);

        File[] files = null;

        

        if(fTargetPath.isDirectory()){

            files = fTargetPath.listFiles();

        }else{

            files = new File[1];

            files[0] = fTargetPath;

        }

        

        File path = new File(zipPath);

        File dir = null;

        dir = new File(path.getParent());

        if(isDirCre){

            dir.mkdirs();

        }

        

        ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(path));

        

        // zip 파일 압축

        makeZipFile(files, zipOut, "");

        

        // stream을 닫음으로서 zip 파일 생성

        zipOut.close();

        

    }

    

    

    /**

    * Comment  : # 일부 파일들을 배열로 설정하여 zip 파일 생성

    * ex) String[] arrZip = new String[]{"C:\\aaa.txt", "C:\\bbb.txt", "C:\\ccc.txt"}

    *     ZipUtils.createZipFile(arrZip, "C:\\test.zip");

    */

    public static void createZipFile(String[] targetFiles, String zipPath)throws Exception{

        createZipFile(targetFiles, zipPath, false);

    }

    

    /**

    * Comment  : # 일부 파일들을 배열로 설정하여 zip 파일 생성 (디렉토리 생성여부 선택)

    */

    public static void createZipFile(String[] targetFiles, String zipPath, boolean isDirCre)throws Exception{

        File[] files = new File[targetFiles.length];

        for(int i = 0; i < files.length; i++){

            files[i] = new File(targetFiles[i]);

        }

        

        File path = new File(zipPath);

        File dir = null;

        dir = new File(path.getParent());

        if(isDirCre){

            // 디렉토리가 없을경우 생성

            dir.mkdirs();

        }

        

        // zip 파일의 outputStream

        ZipOutputStream zipOut = new ZipOutputStream(new FileOutputStream(path));

        

        // zip 파일 압축

        makeZipFile(files, zipOut, "");

        

        // stream을 닫음으로서 zip 파일 생성

        zipOut.close();

    }

    

    

    /**

    * Comment  : zip 파일의 압축을 해제

    */

    public static void unZipFile(String targetZip, String completeDir)throws Exception{

        unZipFile(targetZip, completeDir, false);

    }    

    

    /**

    * Comment  : 

    */

    public static void unZipFile(String targetZip, String completeDir, boolean isDirCre)throws Exception{

        ZipInputStream in = null;

        

        try{

            File fCompleteDir = null;

            fCompleteDir = new File(completeDir);

            if(isDirCre){

                // 디렉토리가 없을경우 생성

                fCompleteDir.mkdirs();

            }

            

            // zip 파일의 input stream을 읽어들임

            in = new ZipInputStream(new FileInputStream(targetZip));

            ZipEntry entry = null;

            

            // input stream내의 압축된 파일들을 하나씩 읽어들임.

            while((entry = in.getNextEntry()) != null){

                System.out.println("entry : " + entry);

                // zip 파일의 구조와 동일하게 가기위해 로컬의 디렉토리 구조를 만듬.

                String entryName = entry.getName();

                if(entry.getName().lastIndexOf("/") > 0){

                    String mkDirNm = entryName.substring(0, entryName.lastIndexOf("/"));

                    System.out.println("mkDirNm : " + mkDirNm);

                    new File(completeDir + mkDirNm).mkdirs();

                }

                // 해제할 각각 파일의 output stream을 생성

                FileOutputStream out = new FileOutputStream(completeDir + entry.getName());

                

                int bytes_read;

                while((bytes_read = in.read(buf)) != -1){

                    System.out.println("bytes_read : " + bytes_read);

                    out.write(buf, 0, bytes_read);

                }

                // 하나의 파일이 압축해제됨

                out.close();

            }

        }catch(Exception e){

            throw new Exception(e);

        }finally{

            // 모든 파일의 압축이 해제되면 input stream을 닫는다.

            in.close();

        }

    }

    

    // byte 배열을 받아서 압축된 byte배열을 리턴

    public static byte[] compressToZip(byte[] src)throws Exception{

        byte[] retSrc = null;

        ByteArrayOutputStream baos = null;

        

        try{

            // zip 파일의 output Stream

            ByteArrayInputStream bais = new ByteArrayInputStream(src);

            baos = new ByteArrayOutputStream();

            ZipOutputStream zos = new ZipOutputStream(baos) ;

            

            zos.putNextEntry(new ZipEntry("temp.tmp"));

            

            int bytes_read = 0;

            // 전달받은 src를 압축하여 파일에 씀

            while((bytes_read = bais.read(buf)) != -1){

                zos.write(buf, 0, bytes_read);

            }

            bais.close();

            zos.close();

            

            // 스트림을 닫은후 byte배열을 얻어옴

            retSrc = baos.toByteArray();

        }catch(Exception e){

            throw new Exception(e);

        }finally{

            baos.close();

        }

        

        return retSrc;

    }

    

    // 압축된 byte 배열을 받아서 zipPath위치에 zip 파일을 생성한다.

    private static void makeZipFile(byte[] src, String zipPath)throws Exception{

        FileOutputStream fos = null;

        ByteArrayInputStream bais = null;

        

        try{

            fos = new FileOutputStream(zipPath);

            bais = new ByteArrayInputStream(src);

            

            int bytes_read = 0;

            while((bytes_read = bais.read(buf)) != -1){

                fos.write(buf, 0, bytes_read);

            }

            

        }catch(Exception e){

            throw new Exception(e);

        }finally{

            fos.close();

            bais.close();

        }

    }

    

    // 압축된 byte 배열의 압축을 해제하여 byte배열로 리턴

    public static byte[] unZip(byte[] src)throws Exception{

        

        byte[] retSrc = null;

        ByteArrayOutputStream baos = null;

        ZipInputStream zis = null;

        int bytes_read = 0;

        

        try{

            zis = new ZipInputStream(new ByteArrayInputStream(src));

            baos = new ByteArrayOutputStream();

            

            zis.getNextEntry(); // entry는 하나밖에 없음을 보장

            while((bytes_read = zis.read(buf)) != -1){

                baos.write(buf, 0, bytes_read);

            }

            

            retSrc = baos.toByteArray();

        }catch(Exception e){

            throw new Exception(e);

        }finally{

            baos.close();

            zis.close();

        }

        

        return retSrc;

    }

    

    // 문자열을 압축하여 byte배열로 리턴(UTF-8)

    public static byte[] compressToZip(String src)throws Exception{

        return compressToZip(src.getBytes("UTF-8"));

    }

    

    // byte배열을 압축하여 zip 파일로 생성

    public static void srcToZipFile(byte[] src, String zipPath)throws Exception{

        byte[] retSrc = null;

        // 압축

        retSrc = compressToZip(src);

        

        // 파일로 만듬

        makeZipFile(retSrc, zipPath);

    }

    

    // byte 배열을 압축하여 zip 파일로 생성

    public static void srcToZipFile(String src, String zipPath)throws Exception{

        byte[] retSrc = null;

        

        // 압축

        retSrc = compressToZip(src.getBytes("UTF-8"));

        

        // 파일로 만듬

        makeZipFile(retSrc, zipPath);

    }

    

    // 압축된 zip파일을 해제후  byte배열로 리턴

    public static byte[] zipFileToSrc(String zipPath)throws Exception{

        byte[] retSrc = null;

        

        return retSrc;

    }

    

    public static void makeZipFile(File[] files, ZipOutputStream zipOut, String targetDir) throws Exception{

        for(int i = 0; i < files.length; i++){

            File compPath = new File(files[i].getPath());


            if(compPath.isDirectory()){

                File[] subFiles = compPath.listFiles();

                makeZipFile(subFiles, zipOut, targetDir+compPath.getName()+"/");

                continue;

            }


            FileInputStream in = new FileInputStream(compPath);

            zipOut.putNextEntry(new ZipEntry(targetDir+"/"+files[i].getName()));


            int data;


            while((data = in.read(buf)) > 0){

                zipOut.write(buf, 0, data);    

            }

            zipOut.closeEntry();

            in.close();

        }

    }

    

    public static void main(String[] arr) throws Exception{

        // 압축하기

        try {

            ZipUtils.createZipFile("D:\\02.TEMP\\backup2", "D:\\02.TEMP\\AAAA\\backup2_한글지원2.zip", true);

            //ZipUtils.unZipFile("D:\\02.TEMP\\backup2_aa.zip", "D:\\02.TEMP\\mkDirNm\\", true);

            

        /*

            // 문자열의 압축과 해제

            String str = "테스트333 데이터입니다.";

            byte[] src = str.getBytes("UTF-8");

            src = ZipUtils.compressToZip(src);

            byte[] retSrc = ZipUtils.unZip(src);

            System.out.println(new String(retSrc, "UTF-8"));

        */

        } catch (Exception e) {

            throw new Exception(e);

        }

    }

}



Posted by 쎄룽
:
맥북에서 넷빈즈를 사용해야할 일이 있어서 사용하는데...

이런... 자동완성? 기능이 안된다...헐퀴...

ctrl+space 없이 어떻게 이클립스와 넷빈즈를 사용한단 말인가...

컨트롤 스페이스를 죽어라 눌러봤지만... 스팟라이트만 죽어라 켜진다.

잠깐 생각해보니.... 그렇다... 스팟라이트랑 단축키가 겹쳐서 그런거다!!

"시스템환경설정" 에서 단축키 대체 후 사용하면 된다.ㅎㅎㅎ


Posted by 쎄룽
:

table/index 정보및 통계정보를 추출하는 명령.
> db2look -d  DB명 -e -t 테이블명 -o 파일명.ddl
> db2look -d  DB명 -m -t 테이블명 -o 파일명.mimic
Posted by 쎄룽
:

뭐하는건지 자세히는 몰라도..(통계정보 수집 이라고만 알고있다)...
요거 돌리면 db 작업이 좀 빨라 진다!! 고마운것...ㅎㅎㅎ

db2 runstats on table 테이블명  with distribution and detailed indexes all 

시간이 좀 걸리니 한산한 시간에 주기적( 한달정도)으로 돌려주자.

Posted by 쎄룽
:
아이폰에대해 첨음으로 포스팅하네염. 소개해드릴 어플은 이곳이 티스토리인지라... 티스토리인지라 전용 블로깅 어플 iTistory 입니다.
지금 이포스팅도 아이폰에서하고있습죠. ㅠㅠ 사실 좀 힘드네여.



시작화면입니다.

정말 간단하게 구성되어있네요.
글쓰기만되구요, 글에 사진과 현위치를 넣을수 있네요.(이글이 올라가봐야 알겠지만서두...)
그리고 작성한 블로그를 아이폰에 저장 할수있는 것 같군요.( 올려봐야 알겠지만서두...)

참그리고 어플을 처음시작할때 계정 로그인을 하는데 그냥은안되고
pc에서 블로그 환경 설정에서 BlogAPI라는걸 사용하더록 설정해주셔야 합니다.

아이폰으로 이걸 다쓰자니 좀힘들긴하지만 간단한 맛집이나 직찍 블로깅할때 괜찮을것같군여.


요건 샘플로 넣어봤습니다.


iPhone 에서 작성된 글입니다.
Posted by 쎄룽
: