'전체'에 해당되는 글 15건
- 2009/06/02 flickr test
- 2009/01/29 엑셀 매크로 SaveAs 메소드의 파일형식
- 2008/10/28 페이지 구하는 알고리즘(수정중)
- 2008/07/01 ASP에서 문자열 연결을 빠르게 하는 방법 & 스크립트 수행 속도 측정
- 2008/06/27 ASP에서 큰따옴표 출력하기 : chr(34)
- 2008/06/27 ASP Encode/Decode Functions
- 2008/06/26 get이나 post로 넘어왔을 때, 값이 있는지 체크
- 2008/06/22 MSSQL 2005에 필드 암호화 하기
- 2008/06/13 성공을 위한 21가지 조언 (21 Suggestions for Success)
- 2008/06/13 Try...Catch 문 ASP에서 사용하기
| Member name | Description |
|---|---|
| xlAddIn | Microsoft Office Excel Add-In. |
| xlCSV | Comma separated value. |
| xlCSVMac | Comma separated value. |
| xlCSVMSDOS | Comma separated value. |
| xlCSVWindows | Comma separated value. |
| xlCurrentPlatformText | Specifies a type of text format |
| xlDBF2 | Dbase 2 format. |
| xlDBF3 | Dbase 3 format. |
| xlDBF4 | Dbase 4 format. |
| xlDIF | Data Interchange format. |
| xlExcel2 | Excel version 2.0. |
| xlExcel2FarEast | Excel version 2.0 far east. |
| xlExcel3 | Excel version 3.0. |
| xlExcel4 | Excel version 4.0. |
| xlExcel4Workbook | Excel version 4.0. Workbook format. |
| xlExcel5 | Excel version 5.0. |
| xlExcel7 | Excel 95. |
| xlExcel9795 | Excel version 95 and 97. |
| xlHtml | Web page format. |
| xlIntlAddIn | Microsoft Office Excel Add-In international format. |
| xlIntlMacro | Deprecated format. |
| xlSYLK | Symbolic link format. |
| xlTemplate | Excel template format. |
| xlTextMac | Specifies a type of text format. |
| xlTextMSDOS | Specifies a type of text format. |
| xlTextPrinter | .prn 형식 (공백으로 데이터 분리) |
| xlTextWindows | Specifies a type of text format. |
| xlUnicodeText | Specifies a type of text format. |
| xlWebArchive | MHT format. |
| xlWJ2WD1 | Deprecated format. |
| xlWJ3 | Deprecated format. |
| xlWJ3FJ3 | Deprecated format. |
| xlWK1 | Lotus 1-2-3 format. |
| xlWK1ALL | Lotus 1-2-3 format. |
| xlWK1FMT | Lotus 1-2-3 format. |
| xlWK3 | Lotus 1-2-3 format. |
| xlWK3FM3 | Lotus 1-2-3 format. |
| xlWK4 | Lotus 1-2-3 format. |
| xlWKS | Lotus 1-2-3 format. |
| xlWorkbookNormal | Excel workbook format. |
| xlWorks2FarEast | Microsoft Works 2.0 format |
| xlWQ1 | Quattro Pro format. |
| xlXMLSpreadsheet | Excel Spreadsheet format. |
| xlOpenXMLWorkbookMacroEnabled(추가) | Excel 매크로 사용 통합 문서(.xlsm) |
- 원래 문자열을 복사한다.
- 연결시킬 새로운 문자열을 그 끝에 추가한다.
- 원래 문자열을 새롭게 완성한 문자열로 대치시킨다.
상당히 긴 문자열의 경우 수행속도가 상당히 느려질 것 같다.
해결 방법은, 합칠 문자열을 배열에 담아 join으로 한꺼번에 합친다.
스크립트 수행 속도를 측정하기 위해서 timer() 함수를 사용한다.
timer()함수는 현재 시간을 자정에서 시작하여 지난 시간을 초단위로 리턴한다.
자세한 내용은,
출처: 개발::ASP에서 문자열 연결을 빠르게 하는 방법(http://blog.eloitcube.co.kr/47)
%>"<% 이런식으로 ASP 태그를 닫아서 출력해주거나
chr(34) 함수를 이용하여 캐릭터 코드를 변환시켜서 출력해주는 수 밖에 없다.
#2008.10.28 추가
큰 따옴표를 "" 두개로 묶어주면 된다. MSSQL도 string 안에 작은 따옴표를 사용하고 싶다면 '' 두개 붙여주면 된다.
str = "<a href=""/"">home</a>"
이런식이다.
ASP Encode/Decode Functions
Methods for encoding and deconding text in various formats.
Server.URLEncode
Used for encoding data that will be passed via a querystring variable. A querystring variable is anything following the question mark (?) in the URL (location) field of your browser. You create querystring variables when you perform a redirect or build a hyperlink to another page on your site.
<a href="page2.asp?name=Joe+Schmoe">here</a>
<%
Response.Redirect "page2.asp?ID=3"
%>In the example above, the hyperlink contains a variable named "name" which has a value of "Joe Schmoe" (the space is encoded as "+") In the Response.Redirect statement, we have a querystring variabled named "ID" with a value of 3. To perform a URL encode on a variable (for purposes of passing this variable to another page) use the following:
<a href="page2.asp?name=<%= Server.URLEncode(sName) %>">
here</a>
<%
Response.Redirect "page2.asp?ID=" &_
Server.URLEncode(nID)
%>
URLDecode
For some reason, Microsoft did not include a URL decode function with Active Server Pages. Most likely, this was because the decoding of querystring variables is done automatically for you when you access the querystring object:
<%= Request.QueryString("name") %>
For those of you who are desperately in need of this function:
' -----------------------------------------
' URL decode to retrieve the original value
Function URLDecode(sConvert)
Dim aSplit
Dim sOutput
Dim I
If IsNull(sConvert) Then
URLDecode = ""
Exit Function
End If
' convert all pluses to spaces
sOutput = REPLACE(sConvert, "+", " ")
' next convert %hexdigits to the character
aSplit = Split(sOutput, "%")
If IsArray(aSplit) Then
sOutput = aSplit(0)
For I = 0 to UBound(aSplit) - 1
sOutput = sOutput & _
Chr("&H" & Left(aSplit(i + 1), 2)) &_
Right(aSplit(i + 1), Len(aSplit(i + 1)) - 2)
Next
End If
URLDecode = sOutput
End Function
Server.HTMLEncode
This useful built-in function is very useful for encoding text that should be displayed in a form input. By "form input" we mean a web form control such as a text input, select or textarea control.
You may have noticed that certain characters cause the HTML on your web form to be interpretted incorrectly. Specifically, the HTML tag characters "<" and ">" can have this effect as well as the quote character (") which is used to encapsulate values.
<input type="text" value="<%= Server.HTMLEncode(sValue) %>">This simple value shows you how easy it is to safely include any value within a web form control.
<textarea name="sample" width=38 height=10>
<%= Server.HTMLEncode(sValue) %>
</textarea>
HTMLDecode
Just like with the URLDecode function described previously, Microsoft, in its infinite wisdom decided not to include an HTMLDecode function with their Server component. It is a relatively simple matter to decode this test data (although I haven't had a need to do this so far.) For completeness sake, here is an HTMLDecode function you may use:
Function HTMLDecode(sText)
Dim I
sText = Replace(sText, """, Chr(34))
sText = Replace(sText, "<" , Chr(60))
sText = Replace(sText, ">" , Chr(62))
sText = Replace(sText, "&" , Chr(38))
sText = Replace(sText, " ", Chr(32))
For I = 1 to 255
sText = Replace(sText, "&#" & I & ";", Chr(I))
Next
HTMLDecode = sText
End Function
출처 : ASP Encode/Decode Functions
예전에는 php에서 이전페이지에서 넘어온, get이나 post로 넘어온 값을 가지고 처리해할 때,
바로 변수이름을 주거나 $_POST 배열을 그냥 읽었다.
예를 들어 name=janghyuk 이란 값을 post로 넘기게 되면,
$name 으로도 접근이 가능했었다. 하지만 이건 보안상 위험한 문제이고,
$_POST["name"] 으로 받는 것이 좋으나, 있는지 없는지 체크를 하지 않고 받으면
"" , empty string 으로 받아지게 된다.
아예 post로 해당 값이 들어왔는지 체크를 하기 위해서,
if( array_key_exists( 'name', $_POST ) ) 로 체크하면 확실히 넘어왔는지 여부를 가릴 수 있다.
하지만 mssql에는 다른 함수가 있다.
== 암호화 하여 튜플 삽입하기 ==
INSERT INTO MEMBERSHIP values('rE', pwdencrypt('1234'))
== 암호화된 튜플 검색하기 ==
SELECT UID FROM MEMBERSHIP WHERE 1 = pwdcompare('1111', PASSWORD)
// Return one more UID or nothing
SELECT pwdcompare('1111', PASSWORD) FROM MEMBERSHIP WHERE UID = 'rE'
// Return [0 | 1]
by H. Jackson Brown Jr.
- 적절한 사람(right person)과 결혼해라. 이 한번의 결정은 당신의 행복, 혹은 불행의 90%를 결정할 것이다.
- 당신이 즐겁게 할 수 있고, 당신의 재능과 시간이 아깝지 않은 일을 해라.
- 사람들의 기대보다 더 많이, 즐겁게 줘라.
- 당신은 당신이 아는 사람 중 가장 긍정적이고 활기찬 사람이 되어라.
- 당신 스스로와 다른 사람들을 용서하여라.
- 관대하라.
- 감사하는 마음을 가져라.
- 인내하고, 인내하고, 인내하라.
- 심지어 가장 적은 월급에 대하여도 돈을 아낄 수 있도록 자제심을 길러라.
- 당신이 받고 싶은 대우로 남들을 대하라.
- 지속적인 개선을 위하여 노력하라.
- 우수함(quality)을 위하여 노력하라.
- 행복은 소유나 권력, 혹은 특권이 아니라 당신이 사랑하고 존경하는 사람들과의 관계에서 온다는 것을 기억하라.
- 충성스러우라.
- 진솔하라.
- 스스로 (변화를) 시작할 수 있는 사람이 되어라.
- 때로는 틀린다 할지라도, 결단력을 갖추어라.
- 남들을 탓하지 말고, 당신 삶의 모든 영역에 있어서 책임감을 지녀라.
- 대담하고 용감해져라. 훗날 인생을 돌이켜보면, 한 것들 보다는 안해본 것들에 대하여 후회하게 마련이다.
- 당신이 사랑하는 사람들을 잘 대해주어라.
- 당신의 어머니가 자랑스러워 하지 않을 일은 삼가라.
원문:
- Marry the right person. This one decision will determine 90% of your happiness or misery.
- Work at something you enjoy and that's worthy of your time and talent.
- Give people more than they expect and do it cheerfully.
- Become the most positive and enthusiastic person you know.
- Be forgiving of yourself and others.
- Be generous.
- Have a grateful heart.
- Persistence, persistence, persistence.
- Discipline yourself to save money on even the most modest salary.
- Treat everyone you meet like you want to be treated.
- Commit yourself to constant improvement.
- Commit yourself to quality.
- Understand that happiness is not based on possessions, power or prestige, but on relationships with people you love and respect.
- Be loyal.
- Be honest.
- Be a self-starter.
- Be decisive even if it means you'll sometimes be wrong.
- Stop blaming others. Take responsibility for every area of your life.
- Be bold and courageous. When you look back on your life, you'll regret the things you didn't do more than the ones you did.
- Take good care of those you love.
- Don't do anything that wouldn't make your Mom proud.
출처: http://dotty.org/2698906
하지만 방법이 있다.
On Error Resume Next '// ERROR CHECKING
If err <> 0 Then '// ERROR OCCURRED
'// 에러처리
End If
On Error Goto 0 '// Clear Errors
On Error Resume Next '// NEW ERROR CHECKING


