분류 전체보기에 해당되는 글 936건
2010/02/06 :: Mork Sturcture (1)
2010/01/12 :: WFA 2nd Edition 주문 (1)
2009/12/31 :: 굿바이, 2009 (1)
2009/12/29 :: 빙판길 고수
2009/12/21 :: 3D영화와 두통
2009/12/17 :: 공부는 나의 힘
2009/12/07 :: 두통
/* 컨버팅 함수 만들었다.*/

int ConvertMorkStrToUnicode(const char* strIN, char *strOut, size_t outsize)
{
ASSERT(strIN);
int len = (int)strlen(strIN);

if (len > (int)outsize)
return -1;
int from=0, to=0;
char ch, cHigh, cLow;
while(len>from)
{
ch = strIN[from++];
switch(ch)
{
case 0x24: // '$': escape the next two hex bytes which encode a single octet
{
cHigh = strIN[from++];
cLow = strIN[from++];
cHigh = cHigh > 0x40 ? cHigh%0x37 : cHigh%0x30;
cLow  = cLow > 0x40 ? cLow%0x37 : cLow%0x30;
strOut[to++] = cHigh << 4 | cLow;
continue;
}
break;
case 0x5c: // '\\'
{
// CR,LF(#xD, #xA)
if (strIN[from] == 0x0d && strIN[from+1] == 0x0a) // escape line ending
{
from+=2;
continue;
}
ch = strIN[from++];
}
break;
case 0x29: // ')' End of literal
continue;
default:
break;
}
strOut[to++] = ch;
};
// terminate to null
strOut[to] = strOut[to+1] = 0;

return to;
}

이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/02/06 17:47 2010/02/06 17:47

 태그 : 
이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1093
Name
Password
Homepage
비밀글 (Secret)
Mork Sturcture
source : https://developer.mozilla.org/en/Mork_Structure
FireFox2에서 사용하는 history.dat 의 name(url title) 인코딩 참조

Literals

A Mork literal is a binary octet sequence encoded as plain text. Every byte becomes literally the next byte of the value, unless certain bytes are seen which have metacharacter status. (Why is there more than one metachar? Because it might shrink markup. Complexity here is worth some compression.)

  • ) - close paren - end of literal
  • $ - dollar - escape the next two hex bytes which encode a single octet
  • \ - backslash - if the next byte is either #xA or #xD, omit linebreak from literal; otherwise escape next byte. For example, \ removes metachar status from an immediately following \, $, or ).

The first metachar is close paren. A literal always appears at the tail end of a cell which is always terminated by a close paren ), so in practice every literal is terminated by ). The only way to get ) inside a literal is by escaping the ) byte one way or other.

The second metachar is dollar $, which allows you to encode any octet as two digits of hex. Some writers might encode all non-ascii octets this way, and the year 2000 version of Mozilla did this, but it's not required. You are never required to use $ to escape bytes when writing, but readers must escape hex following $ when $ itself is not escaped, say using \. (Why did I choose $ for this metachar? Because I thought URLs might be common Mork content, and I wanted to use a byte that might appear less often in URLs.)

The third metachar is backslash \, which was added to allow escaping metachars using C like syntax, and to allow line continuation in a C like manner so very long lines need not be generated unless a writer insists.

(If I was going to extend Mork for base 64, I'd probably extend the meaning of the $ metachar to understand a following non-hex byte was the start of a base 64 sequence. For example, ${ABC} might mean ABC was base 64 content. I've seen folks online bitch about Mozilla's verbose encoding of unicode under Mork using $ to encode every null byte. Why didn't you speak up during the year I discussed it online? In five years, why did no one tweak Mork so version 1.5 would do better? Why not just write unicode as raw binary, since Mork supports that? Why does Mork suck because no one spends an hour making changes? Whatever.)


이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/02/06 16:24 2010/02/06 16:24

 태그 : 
이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1092
sojins| 2010/02/06 16:33 | PERMALINK | EDIT/DEL | REPLY
// Hex Char to int ;-)
char cHign = 'D', cLow='0', cHex=0;
cHigh = cHigh > 0x40 ? cHigh%0x37 : cHigh%0x30;
cLow = cLow > 0x40 ? cLow%0x37 : cLow%0x30;
cHex = cHigh << 4 | cLow;
Name
Password
Homepage
비밀글 (Secret)
http://www.securitytechnet.com/std-algorithm/hash.html


이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/01/12 14:14 2010/01/12 14:14

이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1091
Name
Password
Homepage
비밀글 (Secret)
http://kangcom.com/sub/view.asp?topid=1&sku=2009F0195412

책 구매

글쓰기 안되서 다시 썼다 -_ㅜ
이올린에 북마크하기(0) 이올린에 추천하기(0)
2010/01/12 11:26 2010/01/12 11:26

이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1090
sojins| 2010/01/25 14:37 | PERMALINK | EDIT/DEL | REPLY
책 도착.
Name
Password
Homepage
비밀글 (Secret)
굿바이, 2009
올해 우여곡절 참 많았다.

내년엔
올해를 액땜삼아

쭉쭉~ 뻗어나갔으면.

모두모두 새해 복 많이~
대박나시옵소서~

(- -)(_ _) 꾸벅
이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/12/31 14:55 2009/12/31 14:55

이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1089
earman| 2010/01/02 02:16 | PERMALINK | EDIT/DEL | REPLY
수고 많았소.
내년에도 잘…
Name
Password
Homepage
비밀글 (Secret)
어제 오늘 출근길에는 밤새 내린 눈 때문에 곧곧에 빙판이 생겨 있었다.

내일 낮까지 눈 예보가 있는 걸 보면. 내일 아침도 비슷할 것 같다.

평소보다 약간 일찍 집에서 나와서 걷다보니
구두 신고 조심조심 걸어가시는 아버님이 눈에 띄셨다.
아무래도 이분은 나보다 빙판길 경력이 20년 정도는 앞서시는 분이실게다.

미끌 미끌 뒤뚱 뒤뚱
그러나 날쎈...!

아라한 장풍 대작전에서나 보던. 무림의 은둔고수?!

이 아저씨 뒤를 졸졸 따라서 가다보니 생각보다 일찍 지하철역까지 갈 수 있었다.

열심히 연마해서
나보다 20년쯤 뒤진 꼬맹이들에게 전수해야할 기술일까? ^^


이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/12/29 09:05 2009/12/29 09:05

 태그 : 
이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1088
Name
Password
Homepage
비밀글 (Secret)
'아바타'를 3D로 관람했다.

난시가 있는 사람에게 3D영화는 무리인 듯하다 ㅠ.ㅠ
어제 오후 1시에 봤는데. 아직도 어지럽다 -_ㅜ

3D영화가 많이 좋아졌다고는 하지만...
두통과 메스꺼움을 동반하기때문에
장시간 휴식이 필요하다.

영화 자체는 재밌었다.
제임스 카메룬 감독이, 터미네이터의 마커스를 이뻐라 하는 건가 싶었다.
그 배우 참 맘에 든다.

아직 휴식이 덜 된 것 같은데. 출근해서 모니터 보고 있으려니
토할거 같다 ㅠ.ㅠ


이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/12/21 13:08 2009/12/21 13:08

 태그 : 
이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1087
Name
Password
Homepage
비밀글 (Secret)
학교 공부 마치고, 2년쯤 쉬었다.
다시 한번 해봐야 겠길래. 매일 비슷한 책 읽으며 진도 안나가는 것도 좀 찜찜하고 해서...
오늘 등록했다.

중소기업경영론 수업이 마음에 들어서 경영으로 결정했다.
이번엔 학점도 좀 받아서 학비 안내고 다녔으면 좋겠는데. 글쎄...?

내년엔 할일이 생겨서 좋다.
늦었다고 생각할 때가 가장 빠른 것 같다.

올해 찜찜한 것들은. 올해로 땡 쳐버렸으면.
화이팅~!
이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/12/17 16:02 2009/12/17 16:02

이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1086
Name
Password
Homepage
비밀글 (Secret)
두통

매일 아침이 별로 상쾌하지 않다

즐거운 일?
어떤 게 그런 일인지 모르겠다.

괜찮다고 생각하고 있다.
아마
괜찮을 것이다.

그래.
꼭.
즐거울 필요는 없을지도 모른다.

좀 있음 새해인데. 올해 구질한 것들은 다 털어버렸으면;;

이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/12/07 00:54 2009/12/07 00:54

이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1085
Name
Password
Homepage
비밀글 (Secret)
manifest authoring error c1010001: Values of attribute 'level' not equal in different manifest snippets


프로젝트 속성 > 링커 > 매니페스트 파일

UAC(사용자 계정 컨트롤) 사용: 예
UAC 실행 수준                     : requireAdministrator (default=asInvoker)

* vc 2005에서 강제로 포함한 경우에는 에러 나니까... 적용한 파일을 지우고 설정하면 됨.


이올린에 북마크하기(0) 이올린에 추천하기(0)
2009/11/16 15:59 2009/11/16 15:59

이 글의 관련글(Trackback) 주소 :: http://www.sojins.net/tt/sojins/trackback/1084
Name
Password
Homepage
비밀글 (Secret)