반응형


<a href="#" onclick="excelDown('파일명')" ; return false;">


<script type="text/javascript">

$( document ).ready( function(){

function excelDown(file){

alert('다운로드 시작');

location.href="pool_bond_download.jsp?file="+file;

}

});

</script>

요건 오류가 났다 함수를 못찾음;;


<script type="text/javascript">

function excelDown(file){

alert('다운로드 시작');

location.href="pool_bond_download.jsp?file="+file;

}

</script>


요건 정상 실행 뭐지?? 


검색해보니..


http://stackoverflow.com/questions/1055767/why-can-i-not-define-functions-in-jquerys-document-ready


함수명 = functin() {}  요러케 

혹은

function 함수명() {}

함수명();


요렇게 써야 한다고 함 ~


그래서 수정했더니 잘됨 아주 잘됨 ~


$( document ).ready( function(){

excelDown =function (file){

alert('다운로드 시작');

location.href="pool_bond_download.jsp?file="+file;

}

});


크크




반응형
반응형



디비 필드에 업로드 된 파일명을 | 구분자로 넣었다


1_파일.xls|2_파일.xls|3_파일.xls|


split 으로 배열화 

String  attach_files_Array[] = new String[3];  //4개 까지만 ~쓸꺼임


attach_files_Array = attach_files.split("[|]");


요로케롬 하면 

ex) 차곡차곡 잘린다 

1_파일.xls

2_파일.xls

3_파일.xls


루프로 돌리면서 비교


<%for(int i =0; i < attach_files_Array.length; i++){ %>

     <%if (attach_files_Array[i].matches("^1.*")){  // 정규식 ^ 첫번째값 검색%>

        <li>1번째파일 있음</li>

     <%}else if(attach_files_Array[i].matches("^2.*")){ %>

           <li>2번째파일 있음</li>

<%}else{ %>                <li>파일없음</li>

 <%}%>

<%}%>



만족스릅다 ~ 




개발좀 술술 풀리게 해주세요~

반응형
반응형

test.jsp


<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>

<!DOCTYPE html>

<html lang="ko">

<head>

<meta charset="utf-8">

</head>

<body>


<%!public static boolean isNaN(String str) {

    boolean check = true;

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

        if (!Character.isDigit(str.charAt(i))) {

            check = false;

            break;

        } // end if

    } //end for

    return check;

} //isNaN%>


<% 

String idx ="";

idx =request.getParameter("idx");


if(  idx == null || idx.equals("")  || idx .equals("null") || !isNaN(idx)){

out.println("<script> alert('잘못된 접근입니다.'); history.back();</script>");      

}


%>

</body>

</html>


넘어온 값이 없거나 

숫자 타입이 아니라면 잘못된 접근

반응형
반응형

내 개발서버로 우리집에 24시간 켜있을 PC이다 ㅎㅎㅎ

 

 

 

 

 

조립 배송까지 32만원 ~!!! 저전력이라고 하니 기대가 됨

 

 

 

 

진리에 SSD  추가 ㅎㅎㅎㅎ

공간이 부족하면 바이두 클라우드 !!!!!

클라우드 서비스가 좀더 많아졌으면 좋겠땅 ㅎㅎㅎ

 

HDMI 까찌 있고 usb 3.0 도 지원한다고 함 ㅎㅎ

 

메모리가 약간 부족하지만 램값이 떨어지면 추가예정 ~

 

어서 와라 ~~ 어서~~

 

 

반응형
반응형


LG G PRO 킷캣 업데이트 가


요번주에 된다고 한다 ㅎㅎㅎ


어여 되라 ~~~





크크크크

반응형
반응형

이미지 만들거나 ~ 다운로드


res > drawble 각 폴더에 이미지 삽입



해당 layout .xml 찾아가서

imageview > src  로 방금 삽입한 이미지 선택





이미지가 짤리거나 뒷 배경과 안어울리면


vlaues > string.xml 파일에 변수 추가


<color  name="splashcolor">#41828D</color>


그리고 Backgroud 에서 해당 변수 선택 




끝읏~~



반응형
반응형

JPG 이미지에 백그라운드 색깔 코드가 궁금했다..


혹시 하고 검색해봤는데 서비스가 있다 ㅎㅎㅎ



http://html-color-codes.info/colors-from-image/


이미지 업로드 후 원하는 부분 클릭하면 color-code 나온당 ㅎㅎ




반응형
반응형



첫번째


플젝

Clean 


GEN > 안에 생긴 패키지폴더 삭제

빌드 ~


두번째

AndroidManifest.xml 


패키지명 현재 패키지와 맞나 비교



패키지명에 오타가 있었음 ;;;;;










반응형
반응형




Splash.class 작성


import android.app.Activity;

import android.os.Bundle;

import android.os.Handler;


public class Splash extends Activity{

@Override

protected void onCreate(Bundle savedInstanceState) {

// TODO Auto-generated method stub

super.onCreate(savedInstanceState);

setContentView(R.layout.splash);

         

       Handler hd = new Handler();

       hd.postDelayed(new Runnable() {

 

           @Override

           public void run() {

               finish();       // 3 초후 이미지를 닫아버림

           }

       }, 3000);

}


}


MainActivity.class


 setContentView(R.layout.main); 

// 위 소스 아래부분에  splash.class 호출

 startActivity(new Intent(this,Splash.class));


3초가 로딩 후 메인화면 뿌려짐

AndroidManifest.xml


기존 activity 태그 위에 아래 태그 삽입

<activity android:name=".Splash" android:theme="@android:style/Theme.NoTitleBar" />  


res > layout 폴더 아래

splash.xml 추가


<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"

    android:layout_width="match_parent"

    android:layout_height="match_parent" 

    android:background="@drawable/ic_launcher">

 </RelativeLayout>


끝~~ 



반응형
반응형


** 중요한것 제일 처음 comit 할때 comit & push 꼭 해야함

안그러면 로컬 comit 되어서 github 로 올릴수 없음 !!!!



프로젝트 선택

마우스 오른쪽

Team..

Share Project


Create 버튼 

적당한 프로젝트명 입력


Finish ~


로컬에 GIT 생성 완료 !!!



프로젝트에서 마우스 오른쪽 버튼을 클릭한 후 [Team -> Add to Index] (1) 

Add to Index 명령을 실행하고 나서는 프로젝트의 하위 폴더 및 파일에 ‘?’ 표시에서 ‘*’ 표시로 변경됩니다.


프로젝트에서 마우스 오른쪽 버튼을 클릭한 후 [Team -> Commit ...] (1) 항목을 클릭합니다.

Commit message 를 입력한 후 [Commit] 버튼을 클릭하면 프로젝트가 정상적으로 Git 로컬 저장소에 반영되게 됩니다.


---여기 까지 로컬 GIT 에 저장 완료 !!! ------------------------------------------------------------



프로젝트 Push

Git Server 에 프로젝트를 공유하기 위해서는 프로젝트에서 마우스 오른쪽 버튼을 클릭한 후 

[Team > REMOTE > Push ...] (1) 항목을 클릭합니다.


URI (1) 항목에 Git Server 의 저장소 주소를 입력한 후 

Authentication (2) 항목에는 발급받은 Git Server 의 계정을 입력하신후에 [Next >] 버튼을 클릭합니다.

* Store in Secure Store 체크시 계정이 저장됨


Source ref (1) 항목을 ‘refs/heads/master‘ 로 선택하시면 Destination ref (2) 항목도 자동으로 ‘refs/heads/master’ 로 만들어 집니다. [Add Spec] (3) 버튼을 클릭합니다.


[Add Spec] 버튼을 클릭한 후에는 Specifications for push (1) 영역에 정상적으로 등록이 되었는지 확인한 후 [Next >] 버튼 또는 [Finish] 버튼을 클릭하여 Git Server 로 프로젝트 공유 설정을 마칠수 있습니다.


참고한 URL 

http://blog.naver.com/dlsdnd345?Redirect=Log&logNo=130178953049


반응형

+ Recent posts