2016년 2월 29일 월요일

자바스크립트에서 1차원배열 선언과 배열사이즈


자바스크립트에서 1차원배열 선언과 배열사이즈

var arrBunji = new Array();
for(var i=0; i<10000; i++){
arrBunji[i] = i+"";
}
배열을 선언해주고, 기본값으로 셋팅해준다

...

var iArrBunjiSize = arrBunji.length;
alert(iArrBunjiSize);
배열의 사이즈를 출력해준다


...

<script>arrBunji[<?=$lcNum?>]="<?=$rowJibun[jibun]?>";</script>
PHP, 배열에 값을 넣어준다


즐거운 시간 보내세요~

생활영어회화 > 숙박장소(호텔 등)에서 쓰이는 간단 영어회화


생활영어회화 > 숙박할때 쓰이는 간단 생활영어회화

(호텔이나 모텔, 게스트하우스 등 숙박장소에서 사용)

* 숙박장소에서 쓰이는 생활영어회화 (간단인사와 숙박관련 영어회화내용)




안녕하세요~
Hello. 

어서오십시요- (-시간에 맞게 쓰세요.
)
Good morning! 
Good afternoon! 
Good evening!

만나서 반가워요
Nice to see you!

만나서 반가웠어요
It was good to see you!

제가 영어를 잘못해요.
미안해요
I can't speak English well
I am sorry

죄송하지만 잠시만기다려주시겠습니까?
Would you wait for a momnet?

체크인하고 싶어요 
I'd like to check in

어느 분 앞으로 예약되어 있나요?
Whose name is the reservation under?

저의 이름으로 예약했어요
It's in my name

객실이 몇호실이십니까?
What is your room number?

엘레베이터가 꽉찼어요
잠시만기다려주세요
The elevator is full
Please take next car

왼쪽에 엘레베이터가 있어요
The elevator is on the left

안녕히주무셨어요?
Did you sleep well?

저를 따라오십시요
Follow me please

왼쪽에 화장실이 있습니다
The bathroom is on the left

들어오세요~
Please come in!

괜찮으세요?
Are you alright?

필요한것이 있으시면 프론트에 문의해주시기바랍니다
Please ask to front desk if you need something

객실번호가 맞는지 확인하시기바랍니다
would you check the room number again?

잠시만 기다려주세요
Hold on please

Ok

위 기초생활영어 많은 도움이 되셨나요?

방문해 주셔서 감사해요~


2016년 2월 22일 월요일

안드로이드 팁 > 사진찍고 결과받기 예제소스 참고하세요~



안드로이드 팁 > 사진찍고 결과받기

요즘 스마트폰에서 풍경이나 음식점 등에서 사진찍어서 스마트폰으로 업로드하는 서비스가 많아서 그만큼 개발도 많이해요..
아래 소스를 활용하여 쉽게 구현하세요~

제목 : Intent MediaStore.ACTION_IMAGE_CAPTURE를 이용하여 사진찍어서 결과받기



소스)
private final static int ACT_TAKE_PIC = 1;

1. 원하는 곳에서 intent 호출해줘요
Intent cameraInt = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(cameraInt .ACT_TAKE_PIC);

2.결과를 받는부분
protected void onActivityResult(int requestCode, int resultCode, Intent data){
    super.onActivityResult(requestCode, resultCode, data);
    switch(requestCode){
        case ACT_TAKE_PIC:
        if(resultCode == RESULT_OK){
            try{
                (Bitmap)data.getExtras().get("data"); //썸네일이미지
            }catch(Exception e){
                ;
            }
        }
    }
}

3.썸네일 이미지 이외의 풀사이즈를 받기 위해서는 MediaStore.EXTRA_OUTPUT으로 uri를 지정해주세요~
intent 호출시에 아래부분을 추가해주세요~
File file =
 new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"/saveFolder/", "사진.jpg");
cameraInt .putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(file));

* 결과처리시 중요한 부분
사진선택시 메모리의 부족으로 호출한 액티비티가 dealloc될수 있음을 아셔야 해요~ 
또한 이 겨우에 onActivityResult() Intent data 값이 null이 들어 올 수도 있어요...
(Bitmap)data.getExtras().get(MediaStore.EXTRA_OUTPUT);

* Bitmap Uri에서 불러오기
File file =
  new File(Environment.getExternalStorageDirectory().getAbsolutePath()+"\saveFolder/", "사진.jpg");
Bitmap bm = Media.getBitmap(getContentResolver(), Uri.fromFile(file));

* ImageView에 Bitmap 설정
Bitmap bm = (Bitmap)data.getExtras().get("data");
imgPic.setImageBitmap(bm);
imgPic.setScaleType(ImageView.ScaleType.FIT_XY);

* 중요함수 및 오브젝트
getExternalStorageDirectory
MediaStore.EXTRA_OUTPUT
data.getExtras()

이미지 처리 부분은 이런데,,,, 여러번 해보시면서 시행착오를 좀 겪으셔야 여러분의 것이 될 수 있어요...
이미지 회전하는  부분도 있고, 이미지의 일부분만 캡춰해서 오는 부분도 있으니 이리저리 코딩해서 돌려보세요~

즐거운 시간 보내세요~


2016년 2월 17일 수요일

인사나 안부시의 기초생활영어회화를 배워보세요~



인사나 안부시의 기초생활영어회화를 배워보세요~



기초생활영어회화
친구나 지인들 만날때 인사를 하거나 어떻게 지내?, 안녕하세요~, 요즘사업은 잘되나요? 건강 어떠세요? 등 많이 있는데, 이런 기초적인 생활영어를 아래 참고해보세요~

* 안녕하세요
  Hello (평소에 인사할때 안녕하세요~)
  Good morning (아침인사 안녕하세요~), 
  Good afternoon (점심인사 안녕하세요~), 
  Good evening (저녁인사 안녕하세요~)

  How are you today? (안녕하세요? 잘지내시나요?)
  Fine, thanks. And you? (네 덕분에 잘 지내고 있어요. 당신은요?)

  How's business? 사업은 어떠세요?
  Same as usual. 여전해요.

  How are things with you today? (오늘은 어떠세요?)
  Pretty good. How about you? (아주 좋아요. 당신은 어때요?)

  What's new with you?  (별일 없으세요?)
  Nothing in particular. (별로 특별한 일은 없어요)

  Aren't you Angel-1004?  (엔젤1004 아니니?)
  Hello. It's a surprise to meet you here. (안녕 여기서 만나다니 뜻밖이야)
  What brings you here?  (여기엔 웬일이세요?)

* 잘 자요~
  Good night~
  
* 어떻게 지내세요?
  How are you doing?

* 만나서 반가워요
  Glad to meet you    반갑다고 인사할때 영어회화
  Nice to meet you    반갑다고 인사할때 영어회화 
처음 뵙겠습니다. 저는 천사1004라고 해요.
   Pleased to meet you. My name is Angel1004

인사나 안부물을시 사용되는 기초생활영어회화였어요... 조금이라도 도움이 되셨나요? 
도움이 되었길 바래요~

Have a nice day (즐거운 시간 보내세요~)

2016년 2월 13일 토요일

android tip intent를 이용한 이메일 보내기


안드로이드 개발 팁

제목 : Intent를 이용한 이메일 보내기
여러개의 파일을 첨부하여 보내기 위한 좋은 방법이니 참고하세요~
예제소스)
Intent sendIntent = new Intent(Intent.ACTION_SEND);
sendIntent.putExtra(Intent.EXTRA_SUBJECT, "");
sendIntent.setType("text/csv");
sendIntent.putExtra(Intent.EXTRA_EMAIL, "");
sendIntent.putExtra(Intent.EXTRA_TEXT, "");
startActivity(Intent.createChooser(sendIntent, "메일 발송"));
overridePendingTransition(R.anim.fade, R.anim.hold);
핵심키워드
Intent.ACTION_SEND
Intent.EXTRA_SUBJECT
Intent.EXTRA_EMAIL
Intent.EXTRA_TEXT
createChooser
overridePendingTransition
안드로이드에서 Intent를 이용하여 메일보내는 아주 쉬운 방법이나 copy and paste를 이용하여 많이 활용하세요~
안드로이드에서 여러파일을 첨부하여 보내기위한 괜찮은 소스이니 많이 이용하세요~
즐거운 시간 보내세요~

2016년 2월 4일 목요일

android tip 여러개의 파일 메일로 전송하는 방법



안드로이드 개발 팁



android tip 여러개의 파일 메일로 전송하는 방법

여러개의 파일을 첨부하여 보내기 위한 좋은 방법이니 참고하세요~

예제소스)

final Intent emailIt = new Intent(android.content.Intent.ACTION_SEND_MULTIPLE);
emailIt.setType("plain/text");
emailIt.putExtra(android.content.Intent.EXTRA_EMAILnew String[]{""}); //수신자
emailIt.putExtra(android.content.Intent.EXTRA_CC, new String[]{""}); //참조
emailIt.putExtra(Intent.EXTRA_SUBJECT, "제목");
emailIt.putExtra(Intent.EXTRA_TEXT, "내용");

ArrayList ur = new ArrayList();
for(String file : sendList) //sendList = 파일경로가 들어있는 배열
{
File fileIn = new File(file)
Uri u = Uri.fromFile(fileIn);
ur.add(u);
}
emailIt.putParcelableArrayListExtra(Intent.EXTRA_STREAM, ur);
startActivity(Intent.createChooser(emailIt, "Send email....."));


Intent.EXTRA_EMAIL TIP
Intent.EXTRA_CC TIP

안드로이드에서 여러파일 첨부해서 메일발송하는 방법인데 괜찮은 소스이니 많이 이용하세요~

즐거운 시간 보내세요~