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 out..
(* 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에..
Ref : http://www.lua.org/manual/5.1/ * 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")
유명한 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 =..
간만에 정말 유용한 사이트를 찾은 것 같다. 뭐 자주 볼일은 없는 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 By MICKEY WILLIAMS and David Bennett More Information Visual C++ 6 Unleashed provides comprehe..
C# : Unit Class - File Size 변환 이전에 올렸던 Length 단위에 이어 두번째 File Size 관련된 단위입니다. 귀찮았는데 막상 파일사이즈를 보여야 할 일이 있어서 간단히 Property 를 이용해서 작성해 봤네요. C# 프로퍼티(Property)의 가장 적절한 예가 아닌가 생각됩니다. ㅋㅋㅋ 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76..
CodeProject에 올라온 코드를 보던 중 유용한 클래스를 발견했다. 딱 보아도 한눈에 알 수 있는 길이 관련된 클래스 원본 길이 단위의 값을 넣고, 원하는 길위 단위로 값을 읽어오기만하면, 길이를 원하는 형식으로 변경할 수 있다. 꽤 유용하게 써먹을 듯?? 훗~ public class Length { public enum UNITS{FEET=0,KM,METER,MILES} private double meter = 0; private double km = 0; private double ft = 0; private double miles = 0; public double Meter { get { return this.meter; } set { this.meter=value; this.km=this.m..