'Programming'에 해당되는 글 67건
- 2011/11/04 volatile(C# 참조)
- 2011/07/19 Javascript - document.execCommand Method
- 2011/07/07 Hooking on C#
- 2011/03/29 C# - Diroctory Copy (Recursive method)
- 2011/03/27 Q&A - Send a None exist email with SmtpClient(C#)
- 2011/03/12 Lua - MessageFrame:AddMessage
- 2011/02/25 C# 'this' keyword - Extension Method
- 2011/02/23 Lua - Control Statement
- 2009/07/07 PHP - Detects what compression file uses
- 2009/06/29 Visual C++ 6 Unleashed
SingleTone Pattern을 적용하기 위해 volatile이란 키워드가 있는걸 알게 되었습니다.
목적에 맞는 코딩이 중요하니깐 꼭 알아둬야겠네요..
volatile(C# 참조)
일반적으로 volatile 한정자는 액세스를 serialize할 때 lock 문(C# 참조) 문을 사용하지 않고 여러 스레드에서 액세스하는 필드에 사용됩니다. 다중 스레드 시나리오에서 volatile을 사용하는 방법의 예제는 방법: 스레드 만들기 및 종료(C# 프로그래밍 가이드)를 참조하십시오.
volatile 키워드는 다음과 같은 형식의 필드에 적용할 수 있습니다.
-
참조 형식
-
안전하지 않은 컨텍스트의 포인터 형식 포인터 자체는 volatile일 수 있는 반면 포인터가 가리키는 개체는 volatile일 수 없습니다. 즉, "volatile 개체에 대한 포인터"를 선언할 수 없습니다.
-
sbyte, byte, short, ushort, int, uint, char, float 및 bool 같은 정수 계열 형식
-
정수 계열 형식을 기반으로 한 열거형
-
참조 형식으로 알려진 제네릭 형식 매개 변수
volatile 키워드는 클래스 또는 구조체의 필드에만 적용할 수 있습니다. 로컬 변수는 volatile로 선언할 수 없습니다.
'.NET > C#' 카테고리의 다른 글
| volatile(C# 참조) (0) | 2011/11/04 |
|---|---|
| Win32 to .NET Framework API MAP (0) | 2011/09/08 |
| Visual Studio - Windows Service Build Event (0) | 2011/08/17 |
| Hooking on C# (0) | 2011/07/07 |
| C# SMTP Send use GMAIL (0) | 2011/04/14 |
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
Javascript 의 execCommand 명령어로 할 수 있는 외부 기능이 많습니다.
물론 앞으로는 없어질 추세에 있고, 브라우저 호환성에 좋지 않지만,
아직까지는, 그리고 한국에서는 활용도가 있는 편이기 때문에 혹시나하는 일에 사용될 수도 있겠죠.
이 스크립트 메소드를 이용해서 쓸 수 있는 명령들이 잘 정리되어 있는 페이지가 있어 연결합니다.
참고 주소 : http://koxo.com/lang/js/method/commandIdentifiers.html
http://msdn.microsoft.com/en-us/library/ms536419(VS.85).aspx
| 2D-Position | 절대적으로 위치된 엘레멘트를 드래그로 이동이킬 수 있도록 한다. |
| AbsolutePosition | 엘레멘트의 position 속성을 절대적(absolute)으로 설정한다. |
| BackColor | 현재 선택의 배경색을 반환하거나 설정한다. |
| Bold | 현재 선택의 글자를 굵은(bold) 글자와 보통 글자로 변경(toggle)시킨다. |
| ClearAuthenticationCache | 캐쉬(cache)로부터 승인된 인승서들은 제거한다. execCommand에만 적용된다. |
| Copy | 현재 선택을 클립보드로 복사한다. |
| CreateBookmark | 북마크(bookmark) anchor를 생성하거나 현재 선택이나 삽입점애 대한 북마크 앤커의 이름을 반환한다. |
| CreateLink | 현재 선택에 연결(hyperlink)을 삽입하거나, 사용자가 주소(URL)를 삽입할 수 있도록 대화창을 디스플레이한다. |
| Cut | 현재 선택을 잘라내기하여 클립보드로 복사한다(잘라내기). |
| Delete | 현재 선택을 삭제한다. |
| FontName | 현재 선택을 위한 글꼴 이름을 반환하거나 설정한다. |
| FontSize | 현재 선택을 위한 글꼴 크기을 반환하거나 설정한다. |
| ForeColor | 현재 선택을 위한 글자 색상을 반환하거나 설정한다. |
| FormatBlock | 현재 블럭 양식화 태그를 설정한다. |
| Indent | 현재 선택을 들여쓰기 한단계만큼 들여쓰기 한다. |
| InsertButton | 현재 선택된 택스트에 단추제어를 덮어쓰기한다. |
| InsertFieldset | 현재 선택에 박스를 덮어쓰기한다. |
| InsertHorizontalRule | 현재 선택에 수평줄를 덮어쓰기한다. |
| InsertIFrame | 현재 선택에 인라인 프레임(IFRAME)을 덮어쓰기한다. |
| InsertImage | 현재 선택에 이미지를 덮어쓰기한다. |
| InsertInputButton | 현재 선택에 입력 단추 제어를 덮어쓰기한다. |
| InsertInputCheckbox | 현재 선택에 입력 체크박스 제어를 덮어쓰기한다. |
| InsertInputFileUpload | 현재 선택에 입력 파일 업로드 제어를 덮어쓰기한다. |
| InsertInputHidden | 현재 선택에 감풔진 입력 제어를 덮어쓰기한다. |
| InsertInputImage | 현재 선택에 이미지 입력 제어를 덮어쓰기한다. |
| InsertInputPassword | 현재 선택에 암호 입력 제어를 덮어쓰기한다. |
| InsertInputRadio | 현재 선택에 레디오 입력 단추 제어를 덮어쓰기한다. |
| InsertInputReset | 현재 선택에 재설정 입력 제어를 덮어쓰기한다. |
| InsertInputSubmit | 현재 선택에 송신 입력 제어를 덮어쓰기한다. |
| InsertInputText | 현재 선택에 텍스트 입력 제어를 덮어쓰기한다. |
| InsertMarquee | 현재 선택에 빈 마퀴(MARQUEE)를 덮어쓰기한다. |
| InsertOrderedList | 현재 선택에 번호있는 목록(OL)과 보통 블럭양식으로 변경(toggle)시킨다. |
| InsertParagraph | 현재 선택에 줄바꿈을 덮어쓰기한다. |
| InsertSelectDropdown | 현재 선택의 드롭다운 선택제어을 덮어쓰기한다. |
| InsertSelectListbox | 현재 선택의 목록 박스 선택제어을 덮어쓰기한다. |
| InsertTextArea | 현재 선택에 복수줄 텍스트 입력 제어를 덮어쓰기한다. |
| InsertUnorderedList | 현재 선택에 번호없는 목록(UL)과 보통 블럭양식으로 변경(toggle)시킨다. |
| Italic | 현재 선택을 위한 이태릭 글꼴과 보통 글꼴로 변경(toggle)시킨다. |
| JustifyCenter | 현재 선택이 위치된 블럭에서 중앙에 위치시킨다. |
| JustifyLeft | 현재 선택이 위치된 블럭에서 왼쪽에 위치시킨다. |
| JustifyRight | 현재 선택이 위치된 블럭에서 오른쪽에 위치시킨다. |
| LiveResize | MSHTML 편집기가, 완성되었을 때 업데이트하는 대신, 크기 변경이나 이동 작업 중 모양을 계속적으로 업데이트 한다. |
| MultipleSelection | 사용자가 SHIFT나 CTRL 키를 누르고 선택할 때, 한개이상의 선택항목을 선택할 수 있게한다. |
| Outdent | 현재 선택을 들여쓰기 한단계만큼 내 쓰기(왼쪽으로 이동) 한다. |
| OverWrite | 택스트 입력 필드를 삽입모드과 수정모드(덮어씌움)으로 변경(toggle)시킨다. |
| Paste | 현재 선택의 내용을 클립보드의 내용으로 덮어쓰기한다(붙여넣기). |
| 현재의 페이지를 인쇄할 수 있도록 사용자에게 인쇄 대화창을 열어준다. | |
| Refresh | 현재의 문서을 새로고침한다. |
| RemoveFormat | 현재 선택의 양식 태그를 제거한다. |
| SaveAs | 현재의 문서을 다른이름으로 저장한다. |
| SelectAll | 현재의 문서 전체를 선택하여 반전시킨다. |
| UnBookmark | 현재의 선택으로부터 북마크를 제거한다. |
| Underline | 현재 선택을 위한 밑줄친 글꼴과 보통 글꼴로 변경(toggle)시킨다. |
| Unlink | 현재의 선택으로부터 연결을 제거한다. |
| Unselect | 현재의 선택을 제거한다. |
'Web > JavaScript' 카테고리의 다른 글
| Javascript - document.execCommand Method (0) | 2011/07/19 |
|---|---|
| Javascript - Ajax module on OWA(MS Outlook Web Apps.) (0) | 2011/03/15 |
| for Javascript (0) | 2011/03/08 |
| Javascript - Selection text of web page (0) | 2011/03/05 |
| Persisting Collapsible TOC State (0) | 2011/03/02 |
| Add Twitter to your blog (2) | 2010/11/05 |
C#에서 Global hooking은 .NET Framework 차원에서 지원하지 않는다고 합니다.
그러나, WH_KEYBOARD_LL 과 WH_MOUSE_LL hooking의 global hook이 가능하다고 하네요.
참고할만한 사이트..
ex) 1. How to set a Windows hook in Visual C# .NET
2. Processing Global Mouse and Keyboard Hooks in C#
3. Using Hooks from C#
'.NET > C#' 카테고리의 다른 글
| Win32 to .NET Framework API MAP (0) | 2011/09/08 |
|---|---|
| Visual Studio - Windows Service Build Event (0) | 2011/08/17 |
| Hooking on C# (0) | 2011/07/07 |
| C# SMTP Send use GMAIL (0) | 2011/04/14 |
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
| Q&A - Send a None exist email with SmtpClient(C#) (0) | 2011/03/27 |
http://www.codeproject.com/KB/files/copydirectoriesrecursive.aspx
Directory.Copy 로는 쉽게 복사가 되지 않는데 위 재귀 방법으로 구현하면 되겠네요.
너무 글이 짧은가;; ㅋㅋ
'.NET > C#' 카테고리의 다른 글
| Hooking on C# (0) | 2011/07/07 |
|---|---|
| C# SMTP Send use GMAIL (0) | 2011/04/14 |
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
| Q&A - Send a None exist email with SmtpClient(C#) (0) | 2011/03/27 |
| C# 'this' keyword - Extension Method (0) | 2011/02/25 |
| Last.fm API and Facebook API for .NET (0) | 2010/11/01 |
http://hoons.kr/Board.aspx?Name=QACSHAP&Mode=2&BoardIdx=42400
Question
안녕하세요
웹에서 메일을 발송할때 SmtpCilent 를 사용해서 메일을 발송하는데요~
만약 받는 메일 주소가 잘못된 주소여서 전송이 안 됐을때 로그를 남기려고 합니다.
근데 SmtpFailedRecipientsException 이 부분에선 잡히지가 않는거 같아서요...
없는 메일주소로 발송을 해보면... 큐에 잠깐 들어갔다가 배드 메일로 빠지고 아무런 오류도 남질 않습니다.
회원들중에 잘못된 메일 주소를 등록한 회원이라면 메일주소를 초기화 시켜주려고 하는데요
어떻게 로그를 남길 방법이 없을까요?
해결 방법이 있으면 조언좀 부탁드립니다!!
수고하세요^^
Answer
일단 발생하는 시차가 생기는데요.
발송 시 오류는 프로그램에서 Catch가 될 텐데
발송 후 오류는 프로그램에서 잡지 못할 수 있어요. (예: 메일주소 틀린경우, 메일 박스 꽉찬 경우 등)
익셉션의 ex.StatusCode 가 MailboxBusy일 때는 몇 초 후 다시 보내면 되는데,
그 외에는 오류 로그로 남겨서 찾아보시면 될 것 같네요.
참고 URL : http://hanssens.org/post/SmtpFailedRecipientsException-Catch-undeliverable-mail.aspx
'.NET > C#' 카테고리의 다른 글
| C# SMTP Send use GMAIL (0) | 2011/04/14 |
|---|---|
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
| Q&A - Send a None exist email with SmtpClient(C#) (0) | 2011/03/27 |
| C# 'this' keyword - Extension Method (0) | 2011/02/25 |
| Last.fm API and Facebook API for .NET (0) | 2010/11/01 |
| Windows Service Debugging (0) | 2009/10/21 |
ref : http://www.wowwiki.com/API_ScrollingMessageFrame_AddMessage
Outputs text to a local MessageFrame, with optional color id.- Updated in 2.4.2
MessageFrame에 문자열을 출력한다, 옵션으로 색상 아이디를 포함해서. - 2.4.2 버전부터 지원
MessageFrame:AddMessage(text[,r,g,b[,id][,addToStart]]);
Parameters
Arguments
- (String text, Number red, Number green, Number blue, Number id, Boolean addToStart)
-
- text
- The string message to output
- r
- The intensity of the red component. A number between 0.0 and 1.0
- g
- The intensity of the green component. A number between 0.0 and 1.0
- b
- The intensity of the blue component. A number between 0.0 and 1.0
- id
- A number that classifies the line of text, for later changing the color
- addToStart
- Boolean - Set to true to add the message to the start of the MessageFrame as if it was the first printed message - New in 2.4.2.
Returns
-
- nil
Example
DEFAULT_CHAT_FRAME:AddMessage("Testing", 1.0, 0.0, 0.0);
Outputs "Testing" on a single line in your default chat window -- in red.
DEFAULT_CHAT_FRAME:AddMessage("AddOn Loaded!", 0.0, 1.0, 0.0, nil, true);
Outputs "AddOn Loaded!" at the start of your default chat window -- in green.
Escape Sequences
It is also possible to control the text of parts of lines in the MessageFrame with escape sequences in text.
Set color
Syntax:
|cAARRGGBB colored text
Example:
|cFFFF0000This Will Be In Red
Reset color
Syntax:
|cAARRGGBB colored text |r uncolored text
Example:
|cFF00FF00In Green|rDefault Color
See also
'Program > Lua' 카테고리의 다른 글
| Lua - MessageFrame:AddMessage (0) | 2011/03/12 |
|---|---|
| Lua - Control Statement (0) | 2011/02/23 |
(* over .NET Framework 3.5)
ref url. http://weblogs.asp.net/scottgu/archive/2007/03/13/new-orcas-language-feature-extension-methods.aspx
this 키워드를 통해 기존에 존재하는 Object의 Static 메소드를 추가한 것 처럼 만들 수 있다.
public static class ScottGuExtensions
{
public static bool IsValidEmailAddress(this string s)
{
Regex regex = new Regex(@"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$");
return regex.IsMatch(s);
}
}
스캇 구슬희 형님의 VS에서 인텔리센스 되는 모습..

'.NET > C#' 카테고리의 다른 글
| C# - Diroctory Copy (Recursive method) (0) | 2011/03/29 |
|---|---|
| Q&A - Send a None exist email with SmtpClient(C#) (0) | 2011/03/27 |
| C# 'this' keyword - Extension Method (0) | 2011/02/25 |
| Last.fm API and Facebook API for .NET (0) | 2010/11/01 |
| Windows Service Debugging (0) | 2009/10/21 |
| Unicode 한글 코드 표 (0) | 2009/09/27 |
* Compare
if (left < right) then
elseif (left == right) then
else
end
* Loop
for i = 1, 10, 1 do
end
* Loop for array
for item in expression do
end
* Function definition
function foo()
end
* Print message
print("Hello world!")
** Wow Register
this:RegisterEvent("PLAYER_TARGET_CHANGED")
'Program > Lua' 카테고리의 다른 글
| Lua - MessageFrame:AddMessage (0) | 2011/03/12 |
|---|---|
| Lua - Control Statement (0) | 2011/02/23 |
유명한 MySQL 관리 툴이죠. phpMyAdmin 소스를 보던 중 좋은 내용을 발췌합니다.
libraries\import.lib.php 파일에 있던 내용이고요.
코드는 아래와 같습니다.
/**
* Detects what compression filse uses
*
* @param string filename to check
* @return string MIME type of compression, none for none
* @access public
*/
function PMA_detectCompression($filepath)
{
$file = @fopen($filepath, 'rb');
if (!$file) {
return FALSE;
}
$test = fread($file, 4);
$len = strlen($test);
fclose($file);
if ($len >= 2 && $test[0] == chr(31) && $test[1] == chr(139)) {
return 'application/gzip';
}
if ($len >= 3 && substr($test, 0, 3) == 'BZh') {
return 'application/bzip2';
}
if ($len >= 4 && $test == "PK\003\004") {
return 'application/zip';
}
return 'none';
}
'Program > PHP' 카테고리의 다른 글
| PHP - Detects what compression file uses (0) | 2009/07/07 |
|---|---|
| PHP on IIS 7.0, 6.0, 5.1 with Fast CGI (0) | 2009/02/01 |
| PHP : natsort() Natural order sorting 로 숫자를 제대로 정렬 (0) | 2007/05/25 |
| PHP 성능 최적화를 위한 방향 (0) | 2007/05/22 |
간만에 정말 유용한 사이트를 찾은 것 같다.
뭐 자주 볼일은 없는 C++ 이지만,
Visual C++ 6 관련된 내용을 보게 된다면 거의 바이블이나 마찬가지인 사이트이다.
정말 내용이 방대한 -_ -;;
책을 안가지고 계시다면!!
여기를 한번 보면 좋을듯 후훗~
(아래 링크들은 Shift + Click 으로 봐주시길 ^ ^)
http://www.informit.com/library/
http://www.informit.com/library/library.aspx?b=Visual_C_PlusPlus
Visual C++ 6 Unleashed
Visual C++ 6 Unleashed provides comprehensive coverage of the core topics for Visual C++ 6 programming. This book skips the beginning level material and jumps right in to Visual C++.
Table of Contents
Copyright
About the Authors
About the Contributors
Acknowledgments
Tell Us What You Think!
Introduction
How to Use This Book
What You Need to Use This Book
What's New in Visual C++ 6.0
Contacting the Main Author
Part I: Introduction
Chapter 1. The Visual C++ 6.0 Environment
Part II: MFC Programming
Chapter 2. MFC Class Library Overview
Chapter 3. MFC Message Handling Mechanism
Chapter 4. The Document View Architecture
Chapter 5. Creating and Using Dialog Boxes
Chapter 6. Working with Device Contexts and GDI Objects
Chapter 7. Creating and Using Property Sheets
Chapter 8. Working with the File System
Chapter 9. Using Serialization with File and Archive Objects
Part III: Internet Programming with MFC
Chapter 10. MFC and the Internet Server API (ISAPI)
Chapter 11. The WinInet API
Chapter 12. MFC HTML Support
Part IV: Advanced Programming Topics
Chapter 13. Using the Standard C++ Library
Chapter 14. Error Detection and Exception Handling Techniques
Chapter 15. Debugging and Profiling Strategies
Chapter 16. Multithreading
Chapter 17. Using Scripting and Other Tools to Automate the Visual C++ IDE
Part V: Database Programming
Chapter 18. Creating Custom AppWizards
Chapter 19. Database Overview
Chapter 20. ODBC Programming
Chapter 21. MFC Database Classes
Chapter 22. Using OLE DB
Chapter 23. Programming with ADO
Part VI: MFC Support for COM and ActiveX
Chapter 24. Overview of COM and Active Technologies
Chapter 25. Active Documents
Chapter 26. Active Containers
Chapter 27. Active Servers
Chapter 28. ActiveX Controls
Part VII: Using the Active Template Library
Chapter 29. ATL Architecture
Chapter 30. Creating COM Objects Using ATL
Chapter 31. Creating ActiveX Controls Using ATL
Chapter 32. Using ATL to Create MTS and COM+ Components
Part VIII: Finishing Touches
Chapter 33. Adding Windows Help
Part IX: Appendix
'Program' 카테고리의 다른 글
| C++ 용량이 큰 소스파일에서 상단에 설정하는 내용 (0) | 2010/04/20 |
|---|---|
| Your files are always in sync - DropBox.com (0) | 2009/10/10 |
| Visual C++ 6 Unleashed (0) | 2009/06/29 |
| Visual Studio에서 " " 따옴표로 묶은 문자열만 잡기 (0) | 2009/02/13 |
| Editplus의 정규표현식 사용 문자열 바꾸기 (3) | 2009/02/13 |
| Visual Studio Add-in CopySourceAsHtml (0) | 2008/04/15 |


Prev



