html 특수 코드표...
jsp 에서 '(' 치환하려는데.. 요놈이 치환이 안되서 깽판좀 쳤다..ㅠㅠ
'공부거리 > HTML' 카테고리의 다른 글
| 테이블 마우스 오버 및 아웃시 색상변경 (0) | 2012.02.28 |
|---|---|
| 웹표준, 웹접근성 검사 사이트 (0) | 2012.01.25 |
| input 박스 숫자만 입력받기 (0) | 2011.12.23 |
| [Script]팝업 띄우기 (0) | 2011.12.08 |
| 스크립트로 추정되는 정규식(?) (0) | 2011.11.10 |
html 특수 코드표...
jsp 에서 '(' 치환하려는데.. 요놈이 치환이 안되서 깽판좀 쳤다..ㅠㅠ
| 테이블 마우스 오버 및 아웃시 색상변경 (0) | 2012.02.28 |
|---|---|
| 웹표준, 웹접근성 검사 사이트 (0) | 2012.01.25 |
| input 박스 숫자만 입력받기 (0) | 2011.12.23 |
| [Script]팝업 띄우기 (0) | 2011.12.08 |
| 스크립트로 추정되는 정규식(?) (0) | 2011.11.10 |
후우... params 로 값 넘겨서 작업 페이지에서 받은뒤에 처리함.. 그리고 화면에 뿌린 데이터를 가져와서 그걸로 처리...
ps. 일하면서.. 만들었다... 슬프다..ㅠㅠ
| 이미지 롤링 or 미니 팝업 롤링 (0) | 2013.06.19 |
|---|---|
| [j쿼리,스크립트]부모창 값 가져오기, 전달하기 (0) | 2012.10.15 |
| 일정 시간마다 스크립트 실행 하는 함수 (0) | 2012.09.11 |
| iframe Height 자동 리사이징 (0) | 2012.05.24 |
| 모바일 웹페이지 이동 스크립트 (0) | 2012.05.10 |
|
|
public ArrayList<HashMap<String, String>> getlist(){ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>();//하나로 만들 arraylist 선언try{conn = getConnection();//커넥션을 불러오는 사용자 함수.Statement stmt = conn.createStatement();rs = stmt.executeQuery("SELECT CODE, NAME FROM TEST ORDER BY CODE");//data를 가져와서.while(rs.next()){HashMap<String,String> sidmap = new HashMap<String,String>();//그때그때 해시맵을 선언해 주어야 함.(키 값이 계속 동일 함으로)sidmap.put("code", rs.getString("CODE"));sidmap.put("name", rs.getString("NAME"));//두개의 키 두개의 값list.add(sidmap);//리스트에 추가.} return list;}catch(Exception e){e.printStackTrace();}finally{disConnection();//커넥션 종료하는 사용자 함수.} return null;} |
|
|
<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%><%@ page language="java" import="java.util.*" %><!-- Arraylist와 hashmap을 쓰기위해 --><jsp:useBean id="getlist" class="test.list" scope="page" /><!-- 디비에서 값 가져오는 클래스 --><%ArrayList<HashMap<String, String>> list = new ArrayList<HashMap<String, String>>(); list = getlist.getlist();%><body><table><tr> <td class="mx_td"><select name="s_id"> <% for(int i=0; i<list.size(); i++) {%><option value="<%=list.get(i).get("code")%>"><%=list.get(i).get("name")%></option><%} %></select></td> </tr></table></body> |
| 배열 리스트 사용법..? (0) | 2012.10.31 |
|---|---|
| 달력 만들기 (0) | 2012.09.27 |
| text 파일 작성하기 (0) | 2012.09.10 |
| JAVA 코드 분석 툴(잠재적 위험도 등) (0) | 2012.08.25 |
| java 형변환 모음 (0) | 2012.01.10 |
일정 시간마다 동일한 함수를 실행하는 함수.
그리고 그 함수를 멈추는 함수.
자동실행 되게 셋팅하고
마우스 포커스 온 되면 멈추고 포커스 아웃되면 재실행 시키는 방식으로 활용
| [j쿼리,스크립트]부모창 값 가져오기, 전달하기 (0) | 2012.10.15 |
|---|---|
| [jquery]제이쿼리 사용한 백그라운드 실행..쉽다..ㅠㅠ (0) | 2012.09.18 |
| iframe Height 자동 리사이징 (0) | 2012.05.24 |
| 모바일 웹페이지 이동 스크립트 (0) | 2012.05.10 |
| 숫자 체크 (0) | 2012.04.09 |
파일 쓰기..
ps. 읽기도 완벽히 익혀야돼..ㅠㅠ
| 달력 만들기 (0) | 2012.09.27 |
|---|---|
| ArrayList 안에 HashMap 넣어쓰기(HashMapList??) (0) | 2012.09.11 |
| JAVA 코드 분석 툴(잠재적 위험도 등) (0) | 2012.08.25 |
| java 형변환 모음 (0) | 2012.01.10 |
| DATE 현재시간 및 하루전 시간 (0) | 2011.12.21 |
출처 - http://302.pe.kr/295
| ArrayList 안에 HashMap 넣어쓰기(HashMapList??) (0) | 2012.09.11 |
|---|---|
| text 파일 작성하기 (0) | 2012.09.10 |
| java 형변환 모음 (0) | 2012.01.10 |
| DATE 현재시간 및 하루전 시간 (0) | 2011.12.21 |
| 간단 게시판 리스트 출력 소스 (0) | 2011.12.19 |
2012년 7월 8일 오후...
길냥이가 집 옆의 물길에 있길래.. 가서 열심히 찍었습니다...
| 이순신대교 주간 야간? (0) | 2012.06.03 |
|---|---|
| 우우..여러장 찍었는데 나온건 몇장 없다니 슬프다.. (0) | 2012.05.28 |
아이디 값별로 온클릭 효과를 주는것이 아닌
온클릭 리스너가 작동할때 버튼의 아이디 값을 체크해서
아이디 값별로 구분 해서 실행 가능한 소스 부분..
이런거도 되네..ㅋ
private OnClickListener click = new OnClickListener() {
public void onClick(View v) {
switch(v.getId()) {
case R.id.btn_site:
AlertDialog.Builder builder = new AlertDialog.Builder(XMLParsingActivity.this);
builder.setTitle("지역선택");
builder.setSingleChoiceItems(site, checkedItem, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
checkedItem = which;
}
});
builder.setNegativeButton("취 소", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
}
});
builder.setPositiveButton("선 택", new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int which) {
select_site = site[checkedItem];
}
});
builder.show();
break;
case R.id.btn_parsing:
Parsing(select_site);
break;
}
}
};
| 안드로이드 HttpClient 통신 예제 (0) | 2012.06.18 |
|---|---|
| 안드로이드 기능키에 대한 설정 (0) | 2012.05.10 |
| 상단바 숨기기 or 전체화면 (2) | 2012.05.10 |
| [안드로이드]SharedPreferences 기본 예제 (0) | 2011.12.05 |
| [안드로이드]Intent 를 이용한 Date 주고받기 (0) | 2011.11.16 |
//get방식
/*
HttpClient client = new DefaultHttpClient();
String url = "http://localhost:8080";
HttpGet get = new HttpGet(url);
HttpResponse response = client.execute(get);
HttpEntity resEntity = response.getEntity();
if(resEntity != null){
Log.w("reponse", EntityUtils.toString(resEntity));
}
*/
//post방식
/*
HttpClient client = new DefaultHttpClient();
String postUrl = "http://222.jsp";
HttpPost post = new HttpPost(postUrl);
List params = new ArrayList();
params.add(new BasicNameValuePair("deliveryDate", "1111111111"));
UrlEncodedFormEntity ent = new UrlEncodedFormEntity(params, HTTP.UTF_8);
post.setEntity(ent);
HttpResponse responsePost = client.execute(post);
HttpEntity resEntity = responsePost.getEntity();
if(resEntity != null){
Log.w("Response", EntityUtils.toString(resEntity));
}
*/
| 안드로이드 버튼 효과에 대한 설정 (0) | 2012.06.19 |
|---|---|
| 안드로이드 기능키에 대한 설정 (0) | 2012.05.10 |
| 상단바 숨기기 or 전체화면 (2) | 2012.05.10 |
| [안드로이드]SharedPreferences 기본 예제 (0) | 2011.12.05 |
| [안드로이드]Intent 를 이용한 Date 주고받기 (0) | 2011.11.16 |
HTTP 환경변수의 HTTP_REFERER를 이용해봅시다'ㅂ'
(import javax.servlet.http.HttpServletRequest;)
각 언어별로 HTTP_REFERER를 확인하는 방법은 아래와 같습니다. 리턴값은 스트링이구요.
ASP => Request.ServerVariables("HTTP_REFERER")
PHP => $_SERVER['HTTP_REFERER']
JSP => request.getHeader("REFERER")
HTTP_REFERER의 값의 유무와 각 웹서버의 로그파일을 이용해서
어떻게 방문했는지를 추출할 수 있습니다.
1. 주소창에 주소를 입력해서 들어오는 경우
- HTTP_REFERER의 값이 없음
ex)strReferPath = Trim(Request.Servervariables("HTTP_REFERER"))
strReferPath == null ? 1 : 0 -> 1이 반환 되겠져
2. '즐겨찾기'를 이용해서 들어오는 경우(IE의 경우)
- HTTP_REFERER의 값이 없음
- 로그파일에 ..../favicon.ico로그가 먼저 남는다.
- 이는 IE가 즐겨찾기를 눌러서 사이트를 방문할 경우 favicon.ico 요청을 하고, 해당 URL의 요청을 하기때문입니다.
3. 링크를 통해서 들어오는 경우.(쉽게 말해서 <a>태그를 통해)
- HTTP_REFERER에 이전 URL정보가 들어있음.
이렇게 3가지 패턴으로 어느정도 확인을 할 수가 있습니다만-!
자바스크립트로 location.href를 통해 설정된 주소로 들어왔을경우
이전의 주소를 알아 낼 수 없다는 거겠죠; 그 밖에도 여러가지가 있겠지만...
| PHP 문자열 함수 (0) | 2013.05.29 |
|---|---|
| [PHP] $_SERVER[] 값 (0) | 2013.04.04 |
| 이클립스+php셋팅 (0) | 2012.05.11 |
| PHP 게시판 리스트 샘플 소스 (0) | 2011.12.19 |
| PHP3 문법 기초 (0) | 2011.10.12 |
아우... 찍었는데 대각선에서 찍었더니 수평이 안맞아..ㅠㅠ...수평계는 맞춰놓고 찍었지만..
| 우리집 어린 길냥이... (0) | 2012.07.09 |
|---|---|
| 우우..여러장 찍었는데 나온건 몇장 없다니 슬프다.. (0) | 2012.05.28 |
우우... 열심히ㅣ 찍었쥐만.. 나온건 그닥이네요... 뭐 초짜의 슬픔인가..
고양이는 풀 오토로 찍었고
야경은 iso 100 , f5.6 , 6~10초 대로 찍어서 나온것들중
흔들리지 않게 나온것만 뽑앗씁눼닥..ㅎㅎ
| 우리집 어린 길냥이... (0) | 2012.07.09 |
|---|---|
| 이순신대교 주간 야간? (0) | 2012.06.03 |
<script type="text/javascript">
function resizeHeight(id)
{
var the_height = document.getElementById(id).contentWindow.document.body.scrollHeight;
document.getElementById(id).height = the_height + 30;
}
</script>
<iframe src="#" id="commentFrame"frameborder="0" onLoad="resizeHeight('commentFrame');"></iframe>
| [jquery]제이쿼리 사용한 백그라운드 실행..쉽다..ㅠㅠ (0) | 2012.09.18 |
|---|---|
| 일정 시간마다 스크립트 실행 하는 함수 (0) | 2012.09.11 |
| 모바일 웹페이지 이동 스크립트 (0) | 2012.05.10 |
| 숫자 체크 (0) | 2012.04.09 |
| 날짜 유효성 검사 (0) | 2012.03.07 |
Step 1: Download and Install Eclipse
Go to http://www.eclipse.org/download and download 'Eclipse Classic' (Don't download Eclipse PHP package), at the time of writing this Indigo (3.7) was the most current release.
Once downloaded, un tar ball/unzip and install Eclipse.
Next start up eclipse and choose your workspace folder.
Step 2: Settings up PHP PDT Plugin
Alright once you have Eclipse up and running, your going to want to navigate to 'Help > Install New Software'.
This will bring you to a screen like so

If you look twords the top of that window you will see a drop down that says 'Wok With', click that and select '--All Available Sites--'.
Next you are going to want to search for 'PHP', this will list the same plugin in three different categories. Just select the first one that says 'PHP Development Tools (PDT)...' and then click 'Next' and run though the install process. Its is pretty straight forward. It will ask you to restart Eclipse click 'Restart Now'. Thats it you now have the PHP PDT plugin installed. This plugin by its self is not super useful because of the way the it is encased in Exlipses 'project' mentality.
From here on out when ever I say go and install new software, you should follow these steps.
Step 3: Install Remote System
You are going to follow the same instruction as above, but you are going to search for 'Remote System', remeber to select '--All Available Sites--' in the 'work with' drop down. Click 'Remote System Explorer End-User Runtime' and 'Remote System Explorer User Actions' and run through the install process like before.

Step 4: Install Theme Switcher (Optional)
The setup for the theme switch is same as the above EXCEPT next to the 'work with' drop down you will see a 'add' button, click that. Fill out the form and enter this as the 'Location':
http://eclipse-color-theme.github.com/update

click ok, and in the list of available plugins to install you should only see one choice 'Eclipse Color Theme'. Check the box and run through the install process, it may give you a warning about installing software from outside sources, just click ok and continue.
Once Eclipse Theme is install you can navigate to Ecplise Preference, on mac they are in 'Eclipse > Preferences', on windows I think they are in 'File > Preferences'.
This will open a window with tons of options. All I want you to be aware of at this point is under 'General > Appearance > Color Theme'. This was added by the theme plugin. Here you can change your theme to what ever you prefer.

Step 5: Install Drupal plugin (Optional)
I work a lot with the content management system Drupal and thought it would be nice to note that there is an Drupal Eclipse Plugin.
To install the plugin it is going to be similar to the theme plugin above. Navigate to 'Help > Install New Software' and add a new site like above and enter the location as:
http://xtnd.us/downloads/eclipse
Again after adding this new location you will be prompted with only once choice. Just select 'Drupal for Eclipse' and run though the setup.

Step 6: Configuring PHP
By defualt in Eclipse 3.7 and greater php file will not automatically open in Eclipse.
Go to 'Eclipse >Preferences' (Mac) or 'File > Preferences'(Windows) and then go to 'general > editors > file associations'.

click the add button on the left and enter '*.php' with out the quotes.

After you hit ok you will see a list of editors below. Click on 'PHP Editor' and then click the default button on the right. And then click ok.

Step 7: Configuring Remote System Explorer
First thing you need to do is add the Remote System Explorer perspective to your eclipse workspace.
Go to 'Window > Open Perspective > Other'. now look for Remote System Explorer and add that.

Now you will have a new tab in your Eclipse workspace. By defualt you can browse and edit local files on your hard drive with RSE.

Now the fun part setting up a new conennection.Clcik the little down arrow in the 'Remote System' tab and select 'New Connection'

The next screen shows you all diffecent types of connection. I am going to walk through setting up a ssh connection. So on the next screen select 'SSh Only' and select Next.

the next screen you will need to enter in your host. I am not going to show a picture of this step.
Now you have a new connection in your 'Remote System' tab if you unfold it you will see 'My home' and 'Root'. By default RSE gives you these two file filters to choose from.

If you want to add another filter you want to right click on 'Sftp Files' and go to 'New > Filter'.

Next you will enter in the file location you would like to start from, like /home/test. Select next, give the filter and name and click ok.
Step 8: Fixing PHP autocomplete with Remote System Explorer
The last step is fixing the php autocomplete feature. To do this you are going to have edit a hidden file in your workspace folder. But first we are going to enable hidden files on RSE. Go to 'Eclipse > Preferences' (Mac) or 'File > Preferences' (Windows) and then unfold 'Remote Systems > Files'.

Check 'Show Hidden Files' and click ok.
Now we are going to use RSE to edit an eclipse RSE .project file. So in your 'Remote System' tab open up your local files and navigate to you workspace folder. Look for a folder called 'RemoteSystemsTempFiles' and open that. Now you are going to edit the '.project' file. Open up that file.
You are going to add two line in between the <natures> tag, those lines are
1 2 | <nature>org.eclipse.wst.jsdt.core.jsNature</nature><nature>org.eclipse.php.core.PHPNature</nature> |


출처 - http://onlybible.tistory.com/7514
| PHP 문자열 함수 (0) | 2013.05.29 |
|---|---|
| [PHP] $_SERVER[] 값 (0) | 2013.04.04 |
| php,jsp,asp 이전 페이지 URL 얻어오기 (0) | 2012.06.14 |
| PHP 게시판 리스트 샘플 소스 (0) | 2011.12.19 |
| PHP3 문법 기초 (0) | 2011.10.12 |
<script type="text/javascript">
var uAgent = navigator.userAgent.toLowerCase();
//모바일 기기 추가시 등록
var mobilePhones = new Array('iphone','ipod','ipad','android','blackberry','windows ce',
'nokia','webos','opera mini','sonyericsson','opera mobi','iemobile', 'windows phone');
var isMobile = false;
for(var i=0;i < mobilePhones.length ; i++){
if(uAgent.indexOf(mobilePhones[i]) > -1){
isMobile = true;
break;
}
}
//모바일 기기가 아닌경우 특정 페이지로 GOGO
if(!isMobile || document.referrer.substr(0,19) == "http://m.ystour.kr/"){
window.location.href = "여기에 pc용 페이지";
}else{
window.location.href = "여기에 모바일 페이지";
}
</script>
출처 - http://blog.naver.com/soccerma?Redirect=Log&logNo=140119375246
ps. 모바일 기기에서 pc버전 버튼 눌렀을 경우 예외처리 추가
ps2. for문 소스 소실 부분 추가
| 일정 시간마다 스크립트 실행 하는 함수 (0) | 2012.09.11 |
|---|---|
| iframe Height 자동 리사이징 (0) | 2012.05.24 |
| 숫자 체크 (0) | 2012.04.09 |
| 날짜 유효성 검사 (0) | 2012.03.07 |
| 스크립트 정규식 소스 조금 (0) | 2012.01.10 |
@Override
public boolean onKeyDown(int keyCode, KeyEvent event){
if(keyCode==KeyEvent.KEYCODE_BACK){
뒤로가기키 눌렀을때 작동할것을 적는것..ㅋ
return true;
}
return super.onKeyDown(keyCode, event);
}
| 안드로이드 버튼 효과에 대한 설정 (0) | 2012.06.19 |
|---|---|
| 안드로이드 HttpClient 통신 예제 (0) | 2012.06.18 |
| 상단바 숨기기 or 전체화면 (2) | 2012.05.10 |
| [안드로이드]SharedPreferences 기본 예제 (0) | 2011.12.05 |
| [안드로이드]Intent 를 이용한 Date 주고받기 (0) | 2011.11.16 |
안드로이드 어플 상단바 없애기 or 전체 화면 모드
android:theme="@android:style/Theme.NoTitleBar"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
<activity
android:name=".WebViewActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
>
<!-- android:theme="@android:style/Theme.NoTitleBar" -->
<!-- 타이틀바만 없애는것과 둘다 없애는것. -->
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
ps. 저만 보려고 스크랩을 하던거라 위치를 안적어놨네요
위 옵션 추가하는 파일은 AndroidManifest.xml 파일에서 추가하시면 됩니다.
| 안드로이드 HttpClient 통신 예제 (0) | 2012.06.18 |
|---|---|
| 안드로이드 기능키에 대한 설정 (0) | 2012.05.10 |
| [안드로이드]SharedPreferences 기본 예제 (0) | 2011.12.05 |
| [안드로이드]Intent 를 이용한 Date 주고받기 (0) | 2011.11.16 |
| [안드로이드] 인트로 화면 만들기 (0) | 2011.11.14 |
function checknum(chk_no){
var pattern = /^[0-9]+$/; //숫자패턴을 정해줌
var chk = document.frm.No1.value;
if(!pattern.test(chk)) //만약 값이 숫자가 아니면~
{
alert(!"숫자만 입력할 수 있습니다!");
document.frm.No1.value = "";
document.frm.No1.focus();
return;
}
if(pattern.test(chk) && document.frm.Coupon_No.value.length==7) //숫자이면서 자릿수가 7자리면
{
document.frm.No2.focus(); 다음 입력칸으로 포커스이동!
}
}
| iframe Height 자동 리사이징 (0) | 2012.05.24 |
|---|---|
| 모바일 웹페이지 이동 스크립트 (0) | 2012.05.10 |
| 날짜 유효성 검사 (0) | 2012.03.07 |
| 스크립트 정규식 소스 조금 (0) | 2012.01.10 |
| [스크립트]체크박스 전체 선택/해제 (0) | 2011.12.20 |
| 모바일 웹페이지 이동 스크립트 (0) | 2012.05.10 |
|---|---|
| 숫자 체크 (0) | 2012.04.09 |
| 스크립트 정규식 소스 조금 (0) | 2012.01.10 |
| [스크립트]체크박스 전체 선택/해제 (0) | 2011.12.20 |
| [스크립트]window.open() 스크립트 옵션 및 예제 (0) | 2011.12.15 |
| ASP 엑셀 다운로드 (0) | 2012.02.29 |
|---|
list.asp
<!--엑셀파일다운로드-->
<form name="excel_form" action="excel.asp" method="post">
<INPUT TYPE="hidden" name="sql" value="<%=sql%>">
<%
' Writes a link to the newly created excel in the browser
response.write "<a href='#' onclick='javascript:document.excel_form.submit();'><font color=red>특정 이력 사항</font></a> 엑셀 리스트 | 작성된 시간: " & now() & "<br>"
%>
</form>
</tr>
<!--//엑셀파일다운로드-->
excel.asp
<!--#Include virtual=/include/DBconn.asp-->
<%
Response.Buffer = TRUE
Response.ContentType = "application/vnd.ms-excel"
Response.CacheControl="public"
Response.AddHeader "Content-Disposition", "attachment;filename=특정이력사항.xls"
''''''''''''''''''''' 리스트 가져오기''''''''''''''''''''''''''''''''''''''''''
sql=request("sql")
'response.write sql
'response.end
'set result = dbConn.execute(sql)
set Result = server.createobject("adodb.recordset")
Result.open sql, DB, 1
no=Result.RecordCount
response.write "<font size=10>"& Result("buse_name") &"-"& Result("jiwon_type") &"</font>"
if not result.eof then
response.write "<table border=0 cellspacing=1 cellpadding=15 width=98% height=55 bgcolor='#454545'>"
response.write "<tr>"
response.write "<td bgcolor='F3F3F3'>No.</td>"
response.write "<td bgcolor='F3F3F3'>이름</td>"
response.write "<td bgcolor='F3F3F3'>생년월일</td>"
response.write "<td bgcolor='F3F3F3'>최종졸업학교</td>"
response.write "<td bgcolor='F3F3F3'>전공</td>"
response.write "<td bgcolor='F3F3F3'>졸업년도</td>"
response.write "<td bgcolor='F3F3F3'>서류전형</td>"
response.write "<td bgcolor='F3F3F3'>인적성검사</td>"
response.write "<td bgcolor='F3F3F3'>1차면접</td>"
response.write "<td bgcolor='F3F3F3'>2차면접</td>"
response.write "<td bgcolor='F3F3F3'>3차면접</td>"
response.write "<td bgcolor='F3F3F3'>경력</td>"
response.write "</tr>"
for i=1 to result.recordcount
'서류 합격 여부
If result("pass")<>"" Then
pass=result("pass")
If pass="ok" Then
pass_result="합격"
ElseIf pass="no" Then
pass_result="불합격"
End If
End If
'최종학교명
If result("s_name1") <>"" Then
school_name= result("s_name1")
school_major=result("s_major1")
gra_year=Left(result("s_year_E1") ,4)
ElseIf result("s_name2") <>"" Then
school_name= result("s_name2")
school_major=result("s_major2")
gra_year=Left(result("s_year_E2") ,4)
ElseIf result("s_name3") <>"" Then
school_name= result("s_name3")
school_major=result("s_major3")
gra_year=Left(result("s_year_E3") ,4)
End If
'전형별 점수
SQL="select * from result where mem_id=" & result("idx")
Set rs=server.createobject("ADODB.RECORDSET")
rs.open sql,db,1,1
If Not rs.eof then
If rs("t_point")<>"" then
t_point=rs("t_point")
Else
t_point="미응시"
End If
If rs("f_point")<>"" then
f_point=rs("f_point")
Else
f_point="미응시"
End if
If rs("s_point")<>"" then
s_point=rs("s_point")
Else
s_point="미응시"
End if
If rs("th_point")<>"" then
th_point=rs("th_point")
Else
th_point="미응시"
End if
End If
'경력사항
If result("com_name1")<>"" Then
company=result("com_name1")
com_S1=result("com_S1")
com_E1=result("com_E1")
work=company & "("&com_S1&"~"&com_E1&")"
End If
If result("com_name2")<>"" Then
company2=result("com_name2")
com_S2=result("com_S2")
com_E2=result("com_E2")
work=work & "," & company2 & "("&com_S2&"~"&com_E2&")"
End If
If result("com_name3")<>"" Then
company3=result("com_name3")
com_S3=result("com_S3")
com_E3=result("com_E3")
work=work & "," & company3 & "("&com_S3&"~"&com_E3&")"
End If
If result("com_name4")<>"" Then
company3=result("com_name4")
com_S4=result("com_S4")
com_E4=result("com_E4")
work=work & "," & company4 & "("&com_S4&"~"&com_E4&")"
End If
response.write "<tr>"
response.write "<td bgcolor='FFFFFF'>" & i & "</td>"
response.write "<td bgcolor='FFFFFF'>" & result("u_name_H") & "</td>"
response.write "<td bgcolor='FFFFFF'>" & left(left(result("juminno"),6),2) &" 년 "& Right(left(result("juminno"),4),2) &" 월</td>"
response.write "<td bgcolor='FFFFFF'>" & school_name & "</td>"
response.write "<td bgcolor='FFFFFF'>" & school_major & "</td>"
response.write "<td bgcolor='FFFFFF'>" & gra_year & " 년</td>"
response.write "<td bgcolor='FFFFFF'>" & pass_result & "</td>"
response.write "<td bgcolor='FFFFFF'>" & t_point & "</td>"
response.write "<td bgcolor='FFFFFF'>" & f_point & "</td>"
response.write "<td bgcolor='FFFFFF'>" & s_point & "</td>"
response.write "<td bgcolor='FFFFFF'>" & th_point & "</td>"
response.write "<td bgcolor='FFFFFF'>" & work & "</td>"
result.movenext
response.write "</tr>"
next
response.write "</table>"
end if
%>
페이지 결과를 엑셀파일로 저장하고 싶을때...
페이지 상단에 아래와 같은 코드를 넣으면 됩니다.
즉 웹브라우져에게 ContentType 를 엑셀이라고 알려주면 저장하거나 바로 웹브라우져에서 엑셀을 보여주거나
사용자의 설정에 따라 다르게 보여줄겁니다.
Response.Buffer = False
Response.Expires=0
FileName = ""
Response.AddHeader "Content-Disposition","attachment;filename=" & FileName
Response.ContentType = "application/vnd.ms-excel" '''= 엑셀로 출력
Response.CacheControl = "public"
그외
엑셀 : application/vnd.ms-excel
워드 : application/vnd.ms-word
파워포인트 : application/vnd.ms-powerpoint
덧 : Response.Buffer = False 와 Response.CacheControl = "public" 의 역할은 데이터를 버퍼링 하지 않고
바로 다운로드 창이 떠서 저장하기를 누르면 그때 데이터를 받아오도록 하는 기능입니다.
| asp - mssql - 함수모음 (0) | 2012.03.07 |
|---|
onmouseover="this.style.backgroundColor='#E1E1E1'" onmouseout="this.style.backgroundColor=''"
style="cursor: hand;" <-- 요건 웹표준 위반..
style="cursor:pointer;" <-- 요게 맞는거
추가하고.
마우스 내렸을시
onmouseout="$(this).attr('bgcolor','#ffffff')"
마우스 올렷을시
onmouseover="$(this).attr('bgcolor','#d0ffee')"
ex)
< table>
< tr bgcolor="#ffffff" style="cursor:cursor;" onmouseout="$(this).attr('bgcolor','#ffffff');" onmouseover="$(this).attr('bgcolor','#d0ffee');" >
<td>
가나다라마바사아자차카타파하
</td>
</tr>
< /table>
| html 특수코드 목록 (0) | 2012.09.20 |
|---|---|
| 웹표준, 웹접근성 검사 사이트 (0) | 2012.01.25 |
| input 박스 숫자만 입력받기 (0) | 2011.12.23 |
| [Script]팝업 띄우기 (0) | 2011.12.08 |
| 스크립트로 추정되는 정규식(?) (0) | 2011.11.10 |
1. http://validator.w3.org/unicorn/
W3C에서 제공하는 통합 웹표준 검사기입니다. 어설프게 한글을 지원합니다...
역시 W3C에서 제공하고, HTML, XHTML 등 웹문서의 웹표준만을 검사합니다. 철저히 영어...
이건 KLDP에서 제공하는 위 사이트의 한국어 사이트입니다. 비공식 사이트이긴하지만 왠만큼 한국어를 지원합니다.
4, http://validator.w3.org/checklink
W3C에서 제공하는 사이트로 깨진 링크가 있는지를 검사합니다. 이것도 철저히 영어..
5. http://validator.kldp.org/checklink
위의 한국어 사이트로 KLDP에서 제공합니다.(비공식)
6. http://jigsaw.w3.org/css-validator/
이것도 W3C에서 제공하며, CSS의 웹표준을 검사합니다. ㅠㅜ 한국어 지원..ㅇㅅㅇ
. http://css-validator.kldp.org/
이것도 역시 KLDP에서 제공하는 위 사이트의 한국어 사이트입니다.(비공식) 근데 이미 위에서 한국어 지원...
8. http://validator.w3.org/mobile/
모바일 사이트의 웹표준을 검사하는 사이트입니다.(W3C에서 제공, 영어)
여기는 웹표준 보단 웹접근성에 초점을 맞춘것 같네요. 물론 영어입니다.
10. https://developers.google.com/pagespeed/
구글에서 제공하고 웹표준 보단 최적화 쪽입니다. 그리고 영어..
11. http://www.wah.or.kr/Achive/Kadowah.asp
웹 접근성 연구소에서 제공하는 접근성 검사 프로그램입니다. 설치를 해야합니다..
출처 - http://joyfui.wo.tc/771
| html 특수코드 목록 (0) | 2012.09.20 |
|---|---|
| 테이블 마우스 오버 및 아웃시 색상변경 (0) | 2012.02.28 |
| input 박스 숫자만 입력받기 (0) | 2011.12.23 |
| [Script]팝업 띄우기 (0) | 2011.12.08 |
| 스크립트로 추정되는 정규식(?) (0) | 2011.11.10 |
문자관련 함수
lower(문자) : 소문자로
upper(문자) : 대문자로
initcap(문자) : 첫글자만 대문자로
concat(문자,문자) : 두문자 연결
substr(문자열,시작숫자,갯수) : 시작숫자부터 갯수 만큼 문자 추출
instr(문자열,찾을문자,시작위치,몇번째) : 찾을문자가 몇번째에 있나? 숫자 반환
length(문자열) : 문자열 문자갯수 반환
lpad(문자열,최대길이,채울문자) : 왼쪽문자 채움
rpad( '' ) : 오른쪽 채움
숫자관련 함수
round(숫자,자릿수) : 자릿수 0-> 소수첫째자리에서 반올림, 자릿수 1-> 소수 둘째짜리에서 반올림
자릿수 -1 -> 정수 1의자리에서 반올림
trunc(숫자,자릿수) : 내림
mod(숫자,숫자) : 나머지
날짜관련 함수
select sysdate : sysdate는 현재 시각을 의미
months_between(날짜, 날짜) : 두 날짜사이의 개월 차이를 반환
add_month(날짜,숫자) : 월에 더한다.
next_day(날짜,요일) : 1=일요일, 7=토요일 날짜이후에 해당하는 요일의 날짜를 반환
last_day(날짜) : 날짜의 월에 마지막 날짜를 반환.
round(날짜,자릿수) : 자릿수는 day,month,year 해당하는 까지 나타냄. 기본값 day.
trunc(날짜,자릿수) : 반올림과 동일
변환 함수
to_char(인자,['문자열 형식']) : 문자로 변환, 문자열 형식대로 변환 가능
ex) 날짜 yy-mm/mon/month-dd hh/hh12/hh24:mi:ss , am/pm, ddsp->영문
숫자 9->숫자위치,0->0으로채움, L->지역화폐
to_number(인자) : 숫자로 변환
to_date(인자) : 날짜로 변환
RR 날짜 타입= 50년 기준 00~49 는 2000년도 // 50~99 1900년도
널관련 함수(인자끼리는 모두 값은 데이터형이여야한다.)
NVL(대상,대상이 널이면 반환할값)
NYL2(대상,널이아니면,널이면)
NULLIF(인자1,인자2) : 두인자가 같은 값이면 널을 반환, 아니면 인자1 값 반환
COALESCE(1,2,3,4,5,6......) : 널이 아닌 인자의 값을 반환.
CASE 대상 WHEN 비교값 THEN 반환값 ELSE 반환값 END : ELSE 구문 없으면 널값 반환
DECODE(대상,비교값,반환값,비교값,반환값,ELSE반환값) : 케이스문을 콤마로만 구분.
날짜표시 함수
tz_offset(타임존명칭) : asia/seoul 한국의 타임셋표시해줌.
그룹 함수 : count(*) 을 제외한 널값에 대해서는 아예 계산에 포함하지 않음. 구문에 distinct 가능,group by시 중첩가능
count()
sum()
avg()
max()
min()
stddev() : 표준편차
variance() : 분산
| PostGresql 백업 복구 (0) | 2013.05.16 |
|---|---|
| [ORACLE] 함수 모음집 (0) | 2011.12.22 |
| [오라클] 특수문자 코드 (0) | 2011.12.14 |
| SQL - INSERT문, DELETE문, UPDATE문 (0) | 2011.10.27 |
| ArrayList 안에 HashMap 넣어쓰기(HashMapList??) (0) | 2012.09.11 |
|---|---|
| text 파일 작성하기 (0) | 2012.09.10 |
| JAVA 코드 분석 툴(잠재적 위험도 등) (0) | 2012.08.25 |
| DATE 현재시간 및 하루전 시간 (0) | 2011.12.21 |
| 간단 게시판 리스트 출력 소스 (0) | 2011.12.19 |
String removeTags(input)HTML tag부분을 없애준다 |
|
function removeTags(input) { return input.replace(/<[^>]+>/g, ""); }; |
| example> var str = "<b>Tmax</b> <i>soft</i>"; result>document.write(str +"<br>"); document.write(removeTags(str)); Tmax soft Tmax soft |
String String.trim()문자열의 앞뒤 공백을 없애준다. |
|
String.prototype.trim = function() { return this.replace(/^\s+|\s+$/g, ''); }; |
| example> var str = " untrimed string "; result>document.write("========" + str+ "==============<br>"); document.write("========" + str.trim() + "=============="); ======== untrimed string ============== ========untrimed string============== |
String String.capitalize()단어의 첫 글자를 대문자로 바꿔준다. |
|
String.prototype.capitalize = function() { return this.replace(/\b([a-z])/g, function($1){ return $1.toUpperCase(); }) ; }; |
| example> var str = "korea first world best"; result>document.write(str.capitalize()); Korea First World Best |
String number_format(input)입력된 숫자를 ,를 찍은 형태로 돌려준다 |
|
function number_format(input){ var input = String(input); var reg = /(\-?\d+)(\d{3})($|\.\d+)/; if(reg.test(input)){ return input.replace(reg, function(str, p1,p2,p3){ return number_format(p1) + "," + p2 + "" + p3; } ); }else{ return input; } } |
| example> document.write(number_format(1234562.12) + "<br>"); result>document.write(number_format("-9876543.21987")+ "<br>"); document.write(number_format("-123456789.12")+ "<br>"); 1,234,562.12 -9,876,543.21987 -123,456,789.12 |
| 숫자 체크 (0) | 2012.04.09 |
|---|---|
| 날짜 유효성 검사 (0) | 2012.03.07 |
| [스크립트]체크박스 전체 선택/해제 (0) | 2011.12.20 |
| [스크립트]window.open() 스크립트 옵션 및 예제 (0) | 2011.12.15 |
| [SCRIPT] 라디오 버튼 자동 선택 (0) | 2011.12.12 |
function langcheck_eng(str){
var pattern = /[^(a-zA-Z)]/; //영문만 허용
if(pattern.test(str)){
return false;//영문만 가능합니다
}else{
return true;//정상
}
}
function langcheck_eng_num(str){
var pattern = /[^(a-zA-Z0-9)]/; //영문,숫자만 허용
if(pattern.test(str)){
return false;//불합격
}else{
return true;//정상
}
}
function langcheck_num(str){
var pattern = /[^(0-9)]/; //숫자만 허용
if(pattern.test(str)){
return false;//불합격
}else{
return true;//정상
}
}
function isNumber(upw) {
var chk_num = upw.search(/[0-9]/g);
if(chk_num < 0) {
return false;
}
return true;
}
| 테이블 마우스 오버 및 아웃시 색상변경 (0) | 2012.02.28 |
|---|---|
| 웹표준, 웹접근성 검사 사이트 (0) | 2012.01.25 |
| [Script]팝업 띄우기 (0) | 2011.12.08 |
| 스크립트로 추정되는 정규식(?) (0) | 2011.11.10 |
| [JavaScript] 알아두면 좋은 함수 (0) | 2011.11.10 |
| PostGresql 백업 복구 (0) | 2013.05.16 |
|---|---|
| 오라클 SQL 함수 (0) | 2012.01.20 |
| [오라클] 특수문자 코드 (0) | 2011.12.14 |
| SQL - INSERT문, DELETE문, UPDATE문 (0) | 2011.10.27 |
| ArrayList 안에 HashMap 넣어쓰기(HashMapList??) (0) | 2012.09.11 |
|---|---|
| text 파일 작성하기 (0) | 2012.09.10 |
| JAVA 코드 분석 툴(잠재적 위험도 등) (0) | 2012.08.25 |
| java 형변환 모음 (0) | 2012.01.10 |
| 간단 게시판 리스트 출력 소스 (0) | 2011.12.19 |
| 숫자 체크 (0) | 2012.04.09 |
|---|---|
| 날짜 유효성 검사 (0) | 2012.03.07 |
| 스크립트 정규식 소스 조금 (0) | 2012.01.10 |
| [스크립트]window.open() 스크립트 옵션 및 예제 (0) | 2011.12.15 |
| [SCRIPT] 라디오 버튼 자동 선택 (0) | 2011.12.12 |