IE UserAgent 문제

언어/Javascript 2009/07/10 17:26
자세한 내용 : http://blogs.msdn.com/ie/archive/2009/01/09/the-internet-explorer-8-user-agent-string-updated-edition.aspx

The Trident/4.0 User-Agent String

In order to help users visit sites that block the “MSIE 8.0” user-agent string, IE8 will send the “MSIE 7.0” version information when viewing sites with Compatibility View enabled. As Scott described last August, a new “Trident” token in the User-Agent string allows your code to detect Internet Explorer 8 clients even when they are using the Compatibility View feature.

IE8 on Windows Vista (Compatibility View)

Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Trident/4.0)

IE8 on Windows Vista

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)

As noted in the Best Practices for detecting the IE version, we recommend that web developers do not block access to content based on the user-agent string of the browser. If you must offer different content to different versions of the browser due to improved capabilities, you should ensure that future versions of the browser are not blocked.

Serving content based solely on the user-agent string is often an unreliable way to detect the full capabilities of the browser, because the user might have adjusted some settings, such as disabling script or extensions.

The Windows 7 User-Agent String

On Windows 7, IE8 will send the User-Agent string with the new Windows NT version token.

IE8 on Windows 7

Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0)


IE8이 IE7 호환성 보기로 동작할때 navigator.userAgent 찍어보니 MSIE값이 7.0으로 나오고 화면은 깨져보여서 싯급했다.. 흑..

설정

트랙백

댓글

Mocha UI

언어/Javascript 2009/05/07 22:12
아악.. 쓴 글이 다 날아갔어요 크롬에서 썻더니... OTL 한번찍고..

Mocha UI
Mootools를 기반으로 한 UI개발 라이브러리입니다.
나온지는 꽤 됀것 같네요. 일단 크로스브라우징을 지원하며 IE8에서의 테스트도 하는 중인것같네요.
아직 0.9버전이지만, IE8이 정식으로 릴리즈 되면 1.0버전을 내놓을 것이라고 하는군요~
Canvas태그를 이용해 곡선이나 그림자등을 손쉽게 구현할 수 있게 해줍니다.
IE에서는 Canvas태그를 지원하진 않지만 동일한 기능을 구현할 수 있도록 ExplorerCanvas 를 이용하여 IE에서도 구현이 가능하네요. 
하.. 깔끔한 디자인 간결한 html 좋군여!


사이트 : http://mochaui.com/

설정

트랙백

댓글

회전하면서 가속도

언어/ActionScript 3.0 2009/04/10 18:43
점점 미친듯이 회전.

package {
import flash.display.Sprite;
import flash.events.Event;
[SWF(width="800", height="600", backgroundColor="#ffffff", framerate="30")]

public class oscillation extends Sprite
{
private var _sprite:Sprite;
private var _angle:Number = 0;
private var _xRadius:Number = 100;
private var _yRadius:Number = 100;
private var _vx:Number = 0;
private var _vy:Number = 0;
private var _ax:Number = .02;
private var _ay:Number = .2;
public function oscillation()
{
_sprite = new Sprite();
_sprite.graphics.beginFill(0x0000ff, 100);
_sprite.graphics.drawCircle(0, 0, 25);
_sprite.graphics.endFill();
_sprite.x = 0;
_sprite.y = 100;
addChild(_sprite);
addEventListener(Event.ENTER_FRAME, onEnterFrame);
}
public function onEnterFrame(event:Event):void
{
_sprite.x = 200 + Math.sin(_angle) * _xRadius;
_sprite.y = 200 + Math.cos(_angle) * _yRadius;
_ax += .01;
_angle += _ax;
}
}
}

수학적 머리가 나빠서 힘드네요 하악.
하고싶은건 이게 아닌데;ㅁ;

설정

트랙백

댓글

개인 데이터 완전 삭제 보안프로그램

언어 2009/02/15 00:24
개인의 데이터를 완전 삭제해주는 보안 프로그램 유폼입니다.
데이터를 영구 삭제해줌으로써 개인 데이터의 보안을 지켜준답니다.
100% 완전무료판 유폼 라이트가 공개되어 소개해드립니다.


오~ 씸플한 UI~ 우리엄마도 쓸수있을 정도로 간단해서 좋군요~
라이트판은 위와 같이 간단하게 구성되어있습니다. 결제하고도 한번 사용해봐야겠어요.

이 이미지를 누르시면 다운로드를 시작합니다.


위는 대략적인 유폼 설명입니다. 어떤 프로그램인지는 마음의 평화 유폼이라는 부분에서 적절히 설명되고 있군요~! 개인 자료가 많으신 본좌님들 노트북 중고로 넘기시기 전에 이용하셔도 좋겠네요 크크 이렇게 좋은 무료 프로그램이 많이 나와서 많이 이용할 수 있으면 좋겠습니다.
ㅋ ㅑㅋ ㅑㅋ ㅑ.. 국산이 조아용~!

ps. 저랑 친한 한모씨는 이 프로그램을 보더니 바로 결제해서 사용하는군요.
그의 하드엔 야동만 300기가라는 추측을 해 봅니다. ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ

설정

트랙백

댓글

GNB 때문에 골치..

언어/Javascript 2009/01/11 12:54
GNB 기능 중 레이어를 띄워야하는데..

아흑..

일단 지금 생각으로는

<gnb/>
<iframe>
<frameset/>
</iframe>

의 구조를 생각해본다능.. frameset에서 계속 iframe의 높이 조절을 위한 스크립트를 하나 추가.

하지만 왠지 기억에 iframe때문에 IE에서 세로 스크롤바가 생겻던 것 같은 기억이 난다.

흑흑...

테스트는 쇼핑갔다와서.. =33
GnB

설정

트랙백

댓글

꺄악! 2009년이라니!

언어/미투데이 2009/01/01 23:24
 오사카로 여행온 오파와 함께 오사카의 야경을 구경하기 위해 우메다 스카이 빌딩으로 가고 있었습니다. 일본사람들은 갑자기들 뛰어가더군요. 왜 뛰는지 몰랐기때문에 어그적어그적 뒤따라 뛰어갔습니다. 2009년 약 1분전 카운트다운때문에 뛴다는 것을 눈치채고 열심히 뛰었지만, 이미 카운트다운은 끝난 후였더군요.. orz
그렇게 저는 새해를 뛰면서 맞이하고, 새해에 가장 처음 한 일은 오사카시내를 바라보는 일이였습니다.
 2008년은 역시나 또 한번의 이직이 있었습니다. 올해는 이직하지 않기를.. 쭉쭉 길게 연명하기를 바래봅니다. 작년 한해를 돌이켜보니.. 편하게, 걱정없이, 안정된 생활을 했었던 것 같습니다. 2007년에는 고시원에서 고시원으로 또 원룸으로 몇번의 이사를 했고, 자취방에도 이것저것 없는 것들이 많아서 굉장히 불편하게 지낸시절도 있었지만, 2008년에 들어서는 아늑한 나의 집이라는 생각이 들정도로 자취방에 정이 들고, 동네가 편해지고, 서울이 편해지고, 주말이면 어디론가 훌쩍 떠났다가 올수 있게 도와주는 남자친구도 있었기에 인생에 있어서 그 어느때보다 걱정근심없이 편하게 안정되게 살았던 것 같습니다. 
 아! 한번의 수술은 있었지만 심각한 것은 아니였기에 수술받은 그날 좀 많이 아푸긴 했지만 그래도 지나고보니 뭐... 그저 그렇군요.. 흐흐 하지만 어찌나 아팟던지 다신 수술따위 받지 않겠다는 다짐까지 하게 만들었다는.. 2008년이 그래도 물흐르듯 흘러주고 너무 각박하게만 생각했던 서울에서 그래도 나름대로 숨통이 트일만하게 콧구녕에 바람도 많이 넣고 다녔고, 한강변에서 연까지 날려볼 정도로 여유롭게.. 늘 보고 싶었던 뮤지컬도 보고.. 쇼핑도 할만큼 해봤던 그런 한해였네요.
 2009년은 더 바라는게 없습니다. 이대로 쭉 걱정없이 살았으면, 즐겁게, 일도 열심히하고 내가 해야하는 공부도 열심히하고 아직 여전히 가족과는 떨어져서 혼자 사는 것이지만 이젠 더 익숙하게 잘 살았으면 하는 생각이 드네요.. 킥킥~ 2008년 하고 싶었던 공부는 더 많았는데, 방통대까지 다녀봤지만 어쩔수 없이 휴학하고 와서 많이 아쉽네요. 여기서 사이버대학교라도 다시 시작해보고 싶습니다. 2009년엔 어떤 일이 생길지 아직 잘 모르겠고, 두렵기도 하지만 큰일은 안생겼으면.. 하는 바램으로 1월 1일을 보내어봅니다.
 보고싶은 많은 사람들, 새로운 인연이 된 분들 모두 새해에 복 많이 받으시고, 행복하시기를 끄적여봅니다. 벌써 내 나이 27살이라니 믿기지 않습니다. 하지만 일본은 나이를 만으로 계산하니 저는 행복합니다..... 
그럼 이만~ 모두 새해 복 많이 받으세요~!

설정

트랙백

댓글

flex와 actionscript

언어/ActionScript 3.0 2008/10/18 19:35
초 간단한 마우스로 선그리기 예제.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="test()">
 <mx:Script>
  <![CDATA[
   public function test():void
   {  
    can.addEventListener(MouseEvent.MOUSE_DOWN, mouseDHandler);
    can.addEventListener(MouseEvent.MOUSE_UP, mouseUHandler);
    can.addEventListener(MouseEvent.MOUSE_MOVE, mouseMHandler);
   }
   
   private function mouseDHandler(ent:Event):void
   {
    can.graphics.lineStyle(5, 1, 1, true);
    can.graphics.moveTo(can.mouseX, can.mouseY);
    can.addEventListener(MouseEvent.MOUSE_MOVE, mouseMHandler);    
   }
   private function mouseUHandler(ent:Event):void
   {
    can.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMHandler);
   }
   private function mouseMHandler(ent:Event):void
   {
    draw(can.mouseX, can.mouseY);    
   }
   private function draw(x:int, y:int):void
   {
    can.graphics.lineTo(x, y);  
   }
  ]]>
 </mx:Script>
 <mx:Panel id="pnl" x="10" y="10" width="398" height="369" layout="absolute">
  <mx:Canvas x="0" y="0" width="378" height="329" id="can">
  </mx:Canvas>
 </mx:Panel>
</mx:Application>

"와서 이미지 에디터 개발해볼래요?" 한마디에 " 네!!!!!!!! " 하고 달려온 회사.
(아.. 오가는 대화는 더 많았다는 ㅡ0ㅡ)
flex개발을 하기 위해 2주동안 안돌아가는 머리로 힘들었습니다..
도대체가 이건 어떻게 되는건지 이해가 안되서, 저렇게 간단한 선 그리기 예제를,
이제서야 술술 코딩하게 되었습니다. 아직 많은게 부족하지만,
TNC에서 개발해보고싶었던 이미지 에디터, 그림판 같은 프로그램들의 개발을 열심히 해봐야겠어용..
왜냐하면.. 전 소중하니까요. ㅋ ㅑ~ ㅋㅋㅋ

새로운걸 배우는건 재미있고 신나네용.. 열심히 해야겠어요 잇힝~♡

설정

트랙백

댓글

AJAX Interview Questions

언어/Javascript 2008/08/07 23:14

AJAX Interview Questions

What is AJAX?

Ajax is an acronym for “Asynchronous JavaScript And XML.” Web pages are endowed with snippets of code that can access remote services (like web services) and not refresh the page. This prevents “round tripping” which is the cause for display flicker and slow response times.


Is the server or the client in control in AJAX?

It depends. With AJAX the answer is more in between. Control can be more centralized in a server-side component or as a mix of client-side and server-side controllers.

Centralized server-side controller - When having a more centralized controller the key is to make sure the data in client-side page is in sync with that of the server. Some applications may keep all the state on the server and push all updates to client DOM via a simple JavaScript controller.
Client and server-side controllers - This architecture would use JavaScript to do all presentation related control, event processing, page manipulation, and rendering of model data on the client. The server-side would be responsible for things such as business logic and pushing updated model data to the client. In this case the server would not have intimate knowledge of the presentation short of the initial page that would be sent to the client page request.

There are some use cases where an entire AJAX application can be written in a single page. Keep in mind if you choose this type of architecture that navigation and bookmarking should be considered.


What is the XMLHttpRequest object?

How do I get the XMLHttpRequest object?

How do I abort the current XMLHttpRequest?

What is the role of Ajax in enhancing user experience?
AJAX is not a new technology but a combination of several existing technologies in a new way. These include HTML, CSS, DOM, XML, XSLT, XMLHttpRequest and Javascript. The acronym AJAX stands for Asynchronous Javascript and XML. AJAX is based on open standards supported by many browsers and platforms. AJAX is a new paradigm for building web application.


How can I call a Java method from Javascript?
Which browsers support AJAX?

Is there any way that an AJAX object can get back a record set?

You could build an XML document out of your recordset and send that back to the server, say you had a redord set for a “user” with the following details (name, surname, age, email), you could build an xml document like this:

Code:


Byron
Tymvios
25
email@address.com


User
Someone
39
myAddy@address.com

You can add as many records as you have in your recordset, then once the client has received it you can use javascript to iterate over the ’s in the xml.


What are the different frameworks available In AJAX?

A good framework is “Zephyr”.
It is used with php and seems to be very easy to use.
Prototype.JS Framework is available with detailed documentation, its very easy to handle AJAX and JavaScript, Introduce $ concept its very simple, For Ajax specially u don’t need to check cross broswer, Open, Close and error handling through traditional AJAX.


Who invented AJAX?

Microsoft first implemented the XMLHTTPRequest object in Internet Explorer 5 for Windows as an ActiveX object. It is the term coined after this support.

Asynchronous javascript and XML. Nobody invented AJAX, Jesse James Garrett of Adaptive Path coined the phrase early 2005 - but the tech was already in place much earlier than that.


Does Java have support for Comet style server-side push?

Are there any security issues with AJAX?

JavaScript is in plain view to the user with by selecting view source of the page. JavaScript can not access the local filesystem without the user’s permission. An AJAX interaction can only be made with the servers-side component from which the page was loaded. A proxy pattern could be used for AJAX interactions with external services.

You need to be careful not to expose your application model in such as way that your server-side components are at risk if a nefarious user to reverse engineer your application. As with any other web application, consider using HTTPS to secure the connection when confidential information is being exchanged


Should I use an HTTP GET or POST for my AJAX calls?
AJAX requests should use an HTTP GET request when retrieving data where the data will not change for a given request URL. An HTTP POST should be used when state is updated on the server. This is in line with HTTP idempotency recommendations and is highly recommended for a consistent web application architecture


Does AJAX work with Java?




겐도님 답변좀. 이라고 하면 혼나겠지용-.-

설정

트랙백

댓글

미유님의 2008년 4월 15일 미투데이 ~(-_-)~

언어/미투데이 2008/04/16 04:38
  • 목숨건 등산어익후 후덜덜 ㅠㅠ 2008-04-11 10:00:58
  • 마우스 왔땅! 근데 플라스틱 마우스를 쓰다가 갑자기 마우스가바뀌니 손끝에 먼지가 낀것 같은 느낌이 든다 어쨋든 무선마우스 우왕ㅋ굳ㅋ (무선마우스) 2008-04-11 23:47:48
  • 아이팟터치를 지를려고 한다 각인을 포기하고 바로 구매를 위한 출동을.. (지름신 아이팟터치) 2008-04-12 12:25:18
  • 남친에게 햅틱 뽐뿌를 넣었다. 5월엔 햅틱이 손에 들어올껏 같다 푸후후후후후훌 (햅틱) 2008-04-12 12:25:59
  • 배드민턴 한번 쳤다고 이렇게 삭신이 쑤시다니. (중력을무시하는속도의배드민턴) 2008-04-14 19:25:57
  • OSXDEV BootCamp 2008소니의 시대가 가고 나에게 맥의 시대가 오는것 같다. 터치의 지름과 함께 세미나 신천완료 무브무브무브 (osxdev_bootcamp_2008 맥북업는데어쩌지ㅠㅠ) 2008-04-14 22:34:59
  • 아.. 근데 시험전날이 세미나..... ㅇ ㅏ ㅇ ㅏㅇ ㅏ (이럴수가) 2008-04-14 22:37:34
  • 터치는 안오고 터치 액정 스티커만 왔다 힝 (otl) 2008-04-15 12:39:47
  • 친구추천 눌렀더니 추천친구에 여자가 반이 넘는다. 잘못된거 아닐까? (남자추천해죠요!) 2008-04-15 12:41:32
  • 미투데이 링크 새창으로 띄워달라! 링크누르고 무심결에 창을 닫아버리면 미투데이에 오기위해 다시 브라우저를 띄우고 url을 입력해야해요.. (미투데이건의) 2008-04-15 20:05:28
  • 개발테스트때문에 flash player를 삭제했더니 네이버 증권에서 현재 코스피 확인이 안되서 답답하다 2008-04-15 20:08:51

이 글은 asukaily님의 2008년 4월 11일에서 2008년 4월 15일까지의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 4월 10일 미투데이 ~(-_-)~

언어/미투데이 2008/04/11 04:38
  • Hannal: 신기하군요 많이 자면 고와지나 보네요. 고운 순두부 느낌. (순두부래엄워나) 2008-04-08 17:00:18
  • 태그를 적다보니 드는 생각.. 태그의 사용이 변질되어 가는 느낌.. (글의 덧글 같은 성격으로 바뀐것같은 ..ㅡㅡㅋ) (태그-_-) 2008-04-08 17:01:26
  • 나 이번달에 동생에게 갈 뱅기표, 동생이 제발 사달라는 전자사전, 무선마우스, 화장품.. 나 이번달에 왜이래 미쳤나봐 ㅡ,.ㅡ (돈돈돈돈돈돈돈) 2008-04-08 23:56:36
  • 미투지뢰찾기 고급에서 148초를 기록했습니다. (me2app me2minesweeper) 2008-04-09 00:02:53
  • 밤이 되면 될수록 또렷해지는 정신..ㅡㅡ 오늘도 어김없구나 (낮에좀또렷하면안돼겐니) 2008-04-09 01:58:39
  • 싸이월드하는 넷상의 아주 평범한 내친구들(Geek이란 단어도 모르는)은 왜 미투데이나 블로그를 하지 않는것일까ㅡㅡ? (어렵낭) 2008-04-09 03:15:31
  • 밀린강의 들으러 홈페이지에 접속했다. 정검중이다. 아왜 (쫌!) 2008-04-09 12:17:13
  • 징징님이 지뢰찾기 순위 보여주면서 자극하는 바람에 마우스까지 질렀다 (압) 2008-04-09 12:19:03
  • 오늘 노트북 확인차 노트북들고 용산갔다가 용팔이로 오해받았다 (컴퓨터안팔아~) 2008-04-09 16:26:04
  • 미투지뢰찾기 초급에서 5초를 기록했습니다. (me2app me2minesweeper) 2008-04-10 00:33:10
  • 뽀개버리고 싶은 욕구 억압 (다시사려면귀찬잖아) 2008-04-10 13:36:37
  • 남자친구랑 싸우고 미투데이로 이야기하고 있다. 우리가 바로 웹2.0 커플인가-_-? (웹2 0커플3 0나오면끝인고다) 2008-04-10 17:05:08
  • 김건모 되고송네이버되고~ 인터넷 하면 되고~보니 조만간 핸드폰에 내장된 브라우저도 지원해야할것 같다는 생각을 했다. (지원하면되고~) 2008-04-10 23:25:52

이 글은 asukaily님의 2008년 4월 8일에서 2008년 4월 10일까지의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 4월 7일 미투데이 ~(-_-)~

언어/미투데이 2008/04/08 04:37
  • 팔 모가지가 끈어질라한다 농담삼아 내일 비가 오려나 했는데 정말 비온다고해서 충격...ㅠㅠ (아이고내팔모가지) 2008-04-02 00:02:54
  • ie 6에서 일어나는 심각성 초초초 버그 해결했다. 아니 근데 그거 고칠려다가 다른것도 고쳐졌다. 이런 경사가 있나 2008-04-02 17:54:43
  • 미투데이에 분명히 삭제 버튼이 있었는데 어디있었는지..? 내가 까먹은건지 사라진건지.. (삭제버튼어딧쎄요) 2008-04-02 17:56:17
  • 지나간 일은 아무리 해도 돌이킬수 없으니 그냥 잊어버리세요. (울엄마지갑잃어버렸넹~(-_-)~) 2008-04-02 18:05:15
  • 미투데이에서 로그아웃 후 친구들은 페이지에서 탭 dnd시 파폭에서 버그가 있다. 전체 페이지가 투명하게 나타났다 사라지는데 ie에서는 그런 현상이없다. 의도인가 ㅡ,.ㅡ 난몰라잉 (미투데이파폭버그) 2008-04-02 21:21:44
  • 글을 쓰세요를 그냥 쓰세요로 봣다 (시들어가는내눈) 2008-04-03 17:04:46
  • 팀장님 이클립스를 쓰니 모니터가 너무 쫍아요! ㅠ0ㅠ (와이드하고싶어라) 2008-04-03 18:16:09
  • 금요일금요일금요일금요일금요일금요일금요일금요일은 밀린 강의 듣는날 ㅡ,.ㅡ (뷁) 2008-04-04 10:21:23
  • 미투지뢰찾기 초급에서 11초를 기록했습니다. (me2app me2minesweeper) 2008-04-05 14:50:45
  • 집에 벌레 출현, 귀에 바퀴벌레가 들어가서 고생한 이력이 있는 나로써는 오늘 밤에 잠은 다 잤다. (벌레새퀴때문에잠은다잤네) 2008-04-07 23:34:30

이 글은 asukaily님의 2008년 4월 1일에서 2008년 4월 7일까지의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 3월 23일 미투데이 ~(-_-)~

언어/미투데이 2008/03/24 04:39
  • 저녁을 보통으로 먹었더니 위가 늘어났는지 허전해서 맥스봉 두개나 먹었다. (맥스봉) 2008-03-23 23:27:41
  • 정보처리 기사 실기를 준비하는 남자친구랑 문제집으로 한판떳다. 근데 난 그거 배운적없는데!!! 좀 인정해주지! (나쁜것아) 2008-03-23 23:28:55

이 글은 asukaily님의 2008년 3월 23일의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 3월 22일 미투데이 ~(-_-)~

언어/미투데이 2008/03/23 04:37
  • 윤도현의 러브레터에 카니발이 나와서 공부에 집중이 안됀다 (카니발짱좋아) 2008-03-22 00:41:42
  • 윗층에서 쿵쾅거리고 소리지르고 이상한 소리가 들린다 딥따 무섭다 2008-03-22 01:00:24
  • 아직도 여전히 무섭다. 작은 소리에 귀를 쫑긋하게 되고 극도의 초긴장상태로 예민해졌다 (이사갈꺼야 집에갈까ㅠㅠ) 2008-03-22 01:33:27
  • 잠은오는데 잠들지를 못하겠다. (불안한이밤) 2008-03-22 01:33:47

이 글은 asukaily님의 2008년 3월 22일의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 3월 21일 미투데이 ~(-_-)~

언어/미투데이 2008/03/22 04:39
  • 오늘은 금요일이라 신난다 덩실덩실 ~(-_-)~ (프라이데이) 2008-03-21 10:07:43
  • 동생 노트북이 맛이 가버렸다.. 그럴줄알고 내가 60만원짜리 사준거지.. 아무리 좋은 노트북이라해도 내동생손에 가면 남아나는게 없다. (그동생은의외로여동생) 2008-03-21 10:09:07
  • setAttribute, getAttribute로 style을 뽑아썼더니 ie에서는 지원해주질 않는다ㅡㅡ; 결국 node..style.cssText 로 뽑고 여기따가 넣었는데 웹표준인지는 찾아봐야징~ (setattribute getattribute) 2008-03-21 12:57:17
  • 과식하지말아야한다 ㅠㅠ 혼자살면서 느는건 식탐뿐~ (식탐이왜이리) 2008-03-21 15:09:40
  • 코막힌다 질식 ㅠ_ㅠ (이죽일놈의감기) 2008-03-21 23:04:02

이 글은 asukaily님의 2008년 3월 21일의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 3월 20일 미투데이 ~(-_-)~

언어/미투데이 2008/03/21 04:37
  • 아침에 스팸+김치+밥+콜라 먹고 출근했다. 아침먹기 시작인데, 어째 구성이 안먹느니만 못한것 같아...ㅠㅠ (아침밥) 2008-03-20 10:07:15
  • 이대로라면 목구녕이 불타오를것 같다 아 목아퍼~~~~~~~~~ (목아퍼) 2008-03-20 10:07:40
  • 제네시스 쿠페http://videos.streetfire.net/video/B0EEFBC5-F3EE-43F3-9BB1-9A640112822E.htm (제네시스쿠페) 2008-03-20 11:37:00
  • 아놔 이거 링크 어떻게 거는거지 ㅡㅡ; 제네시스 쿠페.. 앞모습이 아반떼와 비슷한것 같다.. (제네시스쿠페 링크어찌걸어요) 2008-03-20 11:37:36
  • 우와 나 미투 친구 4명! 싸이월드는 100명넘는데 친구가 많아져야 더 재밌겠다. (나친구많아요) 2008-03-20 15:30:15
  • 아직도 목이 타고 있어요 ~(-_-)~ (뜻뜻한봄날의감기) 2008-03-20 21:21:06
  • 오늘은 밀린 전기세 내는날.. 한전아저씨.. 저 오늘냈어요 우리집 전기 끈으면 안돼요 ㅠㅠ (무서운한전 저번엔바로끈더라) 2008-03-20 21:22:06
  • 남자친구가 자취생에게 좋은 레드홀릭떡볶이를 안사줘서 내가 직접 주문했다. 이번주 일요일은 아침점심저녁 떡볶이다. (레드홀릭 떡볶이왜안사줘!!) 2008-03-20 23:30:46

이 글은 asukaily님의 2008년 3월 20일의 미투데이 내용입니다.

설정

트랙백

댓글

미유님의 2008년 3월 19일 미투데이 ~(-_-)~

언어/미투데이 2008/03/20 04:37
  • 미투데이, 왜 내글은 배달안해주는건뎅 ㅠㅠ (글배달해죠) 2008-03-19 10:27:43
  • 모가지가 너무 아프다 이거 뭐야 이거 자고 나면 더해! (모가지가아파슬픈미유님) 2008-03-19 23:15:19
  • 미투데이가 오늘은 글을 배달해줄까ㅡㅡ? (미투데이 글배달) 2008-03-19 23:15:38
  • 헉 이거 쓰고나선 못지우는건가? 우왕ㅋ굳ㅋ (못지우는 미투데이 우왕ㅋ굳ㅋ) 2008-03-19 23:16:06
  • 강의들어야하는 왜이렇게 귀찮을 2008-03-19 23:20:03
  • 까 ... 엔터쳐버렸는데 글이 저장되버렸다.. ㅠㅠ (지우게해줘) 2008-03-19 23:20:16
  • 오늘같은 날은 가만히 누워있고 싶다. 하지만 달려야한다. (오늘도달려라) 2008-03-19 23:20:49

이 글은 asukaily님의 2008년 3월 19일의 미투데이 내용입니다.

설정

트랙백

댓글

닷넷 관련 Naming Rule

언어/C#.NET 2006/09/07 18:20

Naming Conventions for .NET / C# Projects

Martin Zahn, Akadia AG, 20.03.2003


The original of this document was developed by the Microsoft special interest group. We made some addons.

This document explains the naming conventions that should be used with .NET projects.

A consistent naming pattern is one of the most important elements of predictability and discoverability in a managed class library. Widespread use and understanding of these naming guidelines should eliminate unclear code and make it easier for developers to understand shared code.

Capitalization Styles Defined

We define three types of capitalization styles:

Pascal case

The first letter in the identifier and the first letter of each subsequent concatenated word are capitalized.

Example:

BackColor, DataSet

Camel case

The first letter of an identifier is lowercase and the first letter of each subsequent concatenated word is capitalized.

Example:

numberOfDays, isValid

Uppercase

All letters in the identifier are capitalized.

Example:

ID, PI

Hungarian Type Notation Defined

Hungarian notation is any of a variety of standards for organizing a computer program by selecting a schema for naming your variables so that their type is readily available to someone familiar with the notation. It is in fact a commenting technique.

Example:

strFirstName, iNumberOfDays

There are different opinions about using this kind of type notation in programming nowadays. Some say that it뭩 useful, and it should be used everywhere to enhance clarity of your code. Others say it just obfuscates your code, because it has no real advantage in modern programming environments.

Our point of view is a moderated one: use it wisely, meaning, we only use Hungarian notation for private or local variables, that are only accessible and interesting to the programmer of the class.

Don뭪 use it with public variables, properties or parameters in methods, because they are exposed to the outside world. Someone who uses your classes and accesses properties of your class, is not interested in type, but just wants to use them.

In the .NET framework, there are a lot of types, so we extended and adapted the Hungarian notation with our own type notation.

Naming Guidelines

1).  Private Variables (Fields in C#) Naming Guidelines

Naming guidelines

Prefix private variables with a "_" and Hungarian-style notation.

Case guidelines

Use camel case as a general rule, or uppercase for very small words

Example:

_strFirstName, _dsetEmployees

// Field
private OleDbConnection _connection;

// Property
public OleDbConnection Connection
{
 
get { return _connection; }
 
set { _connection = value; }
}

2).  Local Variables Naming Guidelines

Naming guidelines

Prefix private or local variables with Hungarian-style notation.

Case guidelines

Use camel case as a general rule, or uppercase for very small words

Example:

strFirstName, dsetEmployees

3).  Namespace Naming Guidelines

Naming guidelines

The general rule for naming namespaces is to use the company name followed by the technology name and optionally the feature and design as follows:

CompanyName.TechnologyName[.Feature][.Design]

Prefixing namespace names with a company name or other well-established brand avoids the possibility of two published namespaces having the same name. Use a stable, recognized technology name at the second level of a hierarchical name.

Example:

Akadia.Traffic, System.Web.UI, System.Windows.Forms

Case guidelines

Use Pascal case as a general rule, or uppercase for very small words.

Example:

System.Windows.Forms, System.Web.UI

4).  Class Naming Guidelines

Naming guidelines

Use a noun or noun phrase to name a class.
Do not use a type prefix, such as C for class, on a class name.
Do not use the underscore character (_).

Case guidelines

Use Pascal case. Example:

FileStream, Button

5).  Interface Naming Guidelines

Naming guidelines

Prefix interface names with the letter "I", to indicate that the type is an interface.
Do not use the underscore character (_).

Case guidelines

Use Pascal case. Example:

IServiceProvider, IFormatable

6).  Parameter Naming Guidelines

Naming guidelines

Use descriptive parameter names. Parameter names should be descriptive enough that the name of the parameter and its type can be used to determine its meaning in most scenarios. To distinguish parameters from other variables the prefix "p" should be used.

Do not prefix parameter names with Hungarian type notation.

Do not use a prefix for parameter names of an event handler and exceptions.

Case guidelines

Use camel case. Example:

pTypeName, pNumberOfItems

7).  Method Naming Guidelines

Naming guidelines

Use verbs or verb phrases to name methods.

Case guidelines

Use Pascal case. Example:

RemoveAll(), GetCharAt()

8).  Property / Enumerations Naming Guidelines

Naming guidelines

Use a noun or noun phrase to name properties.
Do not use Hungarian notation.

Case guidelines

Use Pascal case. Example:

BackColor, NumberOfItems

9).  Event Naming Guidelines

Naming guidelines

Use an EventHandler suffix on event handler names.

Specify two parameters named sender and e. The sender parameter represents the object that raised the event. The sender parameter is always of type object, even if it is possible to use a more specific type. The state associated with the event is encapsulated in an instance of an event class named "e". Use an appropriate and specific event class for the e parameter type.

Name an event argument class with the EventArgs suffix.

Case guidelines

Use Pascal case. Example:

public delegate void MouseEventHandler(object sender, MouseEventArgs e);

9).  Exception Naming Guidelines

Naming guidelines

Event handlers in Visual Studio .NET tend to use an "e" parameter for the event parameter to the call. To ensure we avoid a conflict, we will use "ex" as a standard variable name for an Exception object.

Example

catch (Exception ex)
{
  // Handle Exception
}

10).   Constant Naming Guidelines

The names of variables declared class constants should be all uppercase with words separated by underscores. It is recommended to use a grouping naming schema.

Example (for group AP_WIN):

AP_WIN_MIN_WIDTH, AP_WIN_MAX_WIDTH, AP_WIN_MIN_HIGHT, AP_WIN_MAX_HIGHT

11). C# Primitive Type Notation

sbyte   sy
short   s
int     i
long    l
byte    y
ushort  us
uint    ui
ulong   ul
float   f
double  d
decimal dec
bool    b
char    c

12).  Visual Control Type Notation

Assembly                                asm
Boolean                                 bln
Button                                  btn
Char                                    ch
CheckBox                                cbx
ComboBox                                cmb
Container                               ctr
DataColumn                              dcol
DataGrid                                dgrid
DataGridDateTimePickerColumn            dgdtpc
DataGridTableStyle                      dgts
DataGridTextBoxColumn                   dgtbc
DataReader                              dreader
DataRow                                 drow
DataSet                                 dset
DataTable                               dtable
DateTime                                date
Dialog                                  dialog

DialogResult                            dr
Double                                  dbl
Exception                               ex
GroupBox                                gbx
HashTable                               htbl
ImageList                               iml
Integer                                 int
Label                                   lbl
ListBox                                 lbx
ListView                                lv
MarshallByRefObject                     rmt
Mainmenu                                mm
MenuItem                                mi
MDI-Frame                               frame
MDI-Sheet                               sheet

NumericUpDown                           nud
Panel                                   pnl
PictureBox                              pbx
RadioButton                             rbtn
SDI-Form                                form
SqlCommand                              sqlcom
SqlCommandBuilder                       sqlcomb
SqlConnection                           sqlcon
SqlDataAdapter                          sqlda
StatusBar                               stb
String                                  str
StringBuilder                           strb
TabControl                              tabctrl
TabPage                                 tabpage
TextBox                                 tbx
ToolBar                                 tbr
ToolBarButton                           tbb
Timer                                   tmr
UserControl                             usr
WindowsPrincipal                        wpl

설정

트랙백

댓글

ASP에서DOM을 이용한 XML 문서 다루기(1)

언어/XML 2006/03/26 07:43
 
------------
asptest.xml
------------
<?xml version="1.0" encoding="euc-kr"?>
<도서>
<신청내역>
<신청인>홍길동</신청인>
<제목>OracleJava</제목>
<수량>2</수량>
<금액>14,000원</금액>
</신청내역>
<신청내역>
<신청인>이종철</신청인>
<제목>XML 5일완성</제목>
<수량>3</수량>
<금액>19,000원</금액>
</신청내역>
</도서>


------------
asptest.asp
------------
<%@ language=VBScript %>
<html>
<meta-equiv="Content-Type" content="text/html; charset=euc-kr" />
<head><title>asptest.asp</title></head>
<body>
<%
dim myDomObj, myRec, myHTML, i
'XML DOM 객체를 생성
set myDomObj = Server.CreateObject("Microsoft.XMLDOM")
myDomObj.async=false
'DOM 객체에 asptest.xml 파일을 로딩한다.
myDomObj.load Server.MapPath("asptest.xml")
//현재노드의 위치를 루트엘리먼트에 위치시킴
set myRec = myDomObj.documentElement
for  i=0 to  myRec.childNodes.Length-1
myHTML = myHTML & myRec.childNodes(i).text & "<hr>"
next
response.write myHTML
set myDomObj=nothing
%>
</body>
</html>

설정

트랙백

댓글

메소드와 속성 및 특성

언어/XML 2006/03/26 07:42
XML 생성

XML.appendChild() 메소드
지정된 객체의 자식 목록 끝에 노드 추가
XML.createElement() 메소드
새로운 XML 요소 생성
XML.createTextNode() 메소드
새로운 XML 텍스트 노드 생성
예)myXML = new XML();
node = myXML.createElement("주소록");
name = myXML.createElement("이름");
ntext = myXML.createTextNode("누군가");
name.appendChild(ntext);
node.appendChild(name);
tel = myXML.createElement("전화번호");
ttext = myXML.createTextNode("054-000-0000");
tel.appendChild(ttext);
node.appendChild(tel);
myXML.appendChild(node);
trace(myXML);

※ 결과:<주소록><이름>누군가<전화번호>054-000-0000

XML 복제

XML.cloneNode(true or false) 메소드
지정된 노드를 복제하고 선택 및 반복적으로 모든 자식 복제
true면 자식의 노드까지 복사되고 false면 노드만 복사
예) myXML = new XML();
node = myXML.createElement("주소록");
name = myXML.createElement("이름");
text = myXML.createTextNode("누군가");
name.appendChild(text);
node.appendChild(name);
myXML.appendChild(node);
trace(myXML);
copyXMLt = myXML.cloneNode(true);
copyXMLf = name.cloneNode(false);
trace(copyXMLt);
trace(copyXMLf);

※ 결과:<주소록><이름>누군가
<주소록><이름>누군가
<이름 />

XML 특정 노드의 존재 유뮤 확인

XML.hasChildNodes() 메소드
지정된 노드에 자식 노드 유무에 따라 True 및 False 반환
예) myXML = new XML();
node = myXML.createElement("주소록");
name = myXML.createElement("이름");
text = myXML.createTextNode("누군가");
name.appendChild(text);
node.appendChild(name);
myXML.appendChild(node);
trace(myXML);
if(myXML.hasChildNodes) {
trace("자식노드가 존재합니다");
} else {
trace("자식노드가 존재하지 않습니다");
}

※ 결과:<주소록><이름>누군가
자식노드가 존재합니다

XML 문서 해석

XML.parseXML(source) 메소드
XML 문서를 지정된 XML 객체 트리로 파싱
※ source는 문자열이며 source안에는 Spacebar, Tab, Enter가 들어가면 안된다.
예) myXML = new XML();
source = "<주소록><이름>누군가"
myXML.parseXML(source);
trace(myXML);

※ 결과:<주소록><이름>누군가

외부 XML문서 불러오기

XML.load("URL") 메소드()
URL의 XML 문서 로드 후 XML 계층 구조로 변환
XML.onLoad 이벤트 핸들러
load 및 sendAndLoad에 대한 지정된 함수(콜백 함수) 호출
예1)function loadEnd(){
trace(this);
}
myXML = new XML();
myXML.onLoad = loadEnd;
myXML.load("주소록.xml");

예2)myXML = new XML();
myXML.onLoad = function loadEnd() {
trace(this);
}
myXML.load("주소록.xml");


XML 문서의 특정 노드 접근

XML.firstChild 속성
지정된 노드의 목록에서 첫번째 자식 노드 참조(읽기)
XML.lastChild 속성
지정된 노드의 목록에서 마지막 자식 노드 참조(읽기)
XML.nextSibling 속성
부모 노드의 자식 목록에서 다음 형제 노드 참조(읽기)
XML.previousSibling 속성
부모 노드의 자식 목록에서 이전 형제 노드 참조(읽기)
XML.parentNode 속성
지정된 노드의 부모 노드 참조(읽기)

XML.nodeName 속성
XML객체의 노드 이름을 가져오거나 반환(읽기/쓰기)
XML.nodeValue 속성
XML 객체의 노드 값(Value) 반환(읽기/쓰기)

XML.nodeType 속성
노드 값을 가져오거나 반환. 형태가 '노드'면 1, '텍스트'면 3 반환(읽기/쓰기)

XML 문서 속성 사용

XML.attributes 컬렉션
지정된 노드의 모든 속성을 포함하는 관련 배열 반환(읽기/쓰기)
예)myXML = new XML();
source = "<주소록 이름= '누군가' 전화번호='어딘가'>";
myXML.parseXML(source);

myXML.firstChild.attributes.이름 //참조
myXML.firstChild.attributes.전화번호="054-000-0000" //수정

XML.getBytesLoaded() 메소드
지정된 XML 문서용으로 로드된 바이트 수 반환

XML.getBytesTotal() 메소드
XML 문서의 크기를 바이트 수로 반환

XML.insertBefore() 메소드
지정된 노드의 자식 목록에서 기존 노드 앞에 노드 삽입

XML.removeNode() 메소드
지정된 노드를 부모에서 제거

XML.send() 메소드
지정된 XML 객체를 URL로 전송

XML.sendAndLoad() 메소드
지정된 XML 객체를 URL로 보내고
서버 응답을 다른 XML객체에 로드

XML.toString() 메소드
지정된 로드와 자식을 XML 텍스트로 변환
XML.contentType 속성
서버에 전송된 Mime 유형 표현(읽기/쓰기)

XML.docTypeDecl 속성
XML 문서의 Doctype 선언에 대한 정보 설정 및 반환(읽기/쓰기)

XML.ignoreWhite 속성
true로 설정되면
공백만 포함한 텍스트 노드는 파싱 과정에서 삭제(읽기/쓰기)

XML.loaded 속성
지정된 XML 객체가 로드되었는지 확인(읽기)

XML.status 속성
XML 문서 파싱 작업의 성공 또는 실패를 나타내는 숫자 상태 코드 반환(읽기)

XML.xmlDecl 속성
XML 문서의 문서 선언에 대한 정보 설정 및 반환(읽기/쓰기)
XML.childNodes 컬렉션
지정된 노드의 자식 노드를 배열 형식으로 참조 가능하게 만들어 줌(읽기)

XML.onData 이벤트 핸들러
서버에서 XML 텍스트를 완전히 로드한 경우 또는 다운로드할 때 오류가 발생한 경우 호출되는 콜백 함수

설정

트랙백

댓글

XML 노드 생성

언어/XML 2006/03/26 07:37
Set objXML = Server.CreateObject("Microsoft.XMLDOM")
objXML.async = False
server.MapPath(abc.xml) 'XML 읽어오기

If blnFileExist = False Then 'XML 파일이 생성되지 않았다면 XML을 생성함
   objXML.appendChild(objXML.createProcessingInstruction("xml","version=""1.0"""))
   objXML.appendChild(objXML.createElement("abc"))
   intID = 1
Else
    intID = objXML.documentElement.childNodes( _
    objXML.documentElement.childNodes.length - 1).childNodes(0).text + 1
End If

Set objXMLv = objXML.createElement("def") '노드 추가 부분
  objXMLv.appendChild(objXML.createElement("ID"))
 objXMLv.appendChild(objXML.createElement("strKorName"))
 objXMLv.appendChild(objXML.createElement("strEngName"))

 objXMLv.childNodes(0).text = intID '값 추가
  objXMLv.childNodes(1).text = Request.Form("txtKorName")
 objXMLv.childNodes(2).text = Request.Form("txtEngName")
 objXML.documentElement.appendChild(objXMLv.cloneNode(True))
 objXML.save(server.MapPath("abc.xml"))

   Set objXMLv = Nothing
   Set objXML = Nothing[/HTML][/CODE]


XML 코드

   <?xml version="1.0" encoding="euc-kr" ?>
   <abc>
   <def>
   <ID>1</ID>
   <strKorName>이쁜이</strKorName>
   <strEngName>beautiful girl</strEngName>
   </def>
   <def>
   <ID>2</ID>
   <strKorName>못난이</strKorName>
   <strEngName>bad girl</strEngName>
   </def>
   </abc>

설정

트랙백

댓글

파일업로드시 접근권한 문제 해결법(XP)

언어/C#.NET 2006/03/04 17:07

닷넷으로 파일 업로드 다운로드 기능을 구현하던 중

폴더의 권한을 설정해줄때 폴더 속성에서 보안 탭이 없을 경우

폴더 옵션 - 보기 - 모든 사용자에게 동일한 폴더 공유 권한을 지정(권장)

이것의 체크를 해제해 주면 보안 탭이 보이며, 권한을 설정하면 된다.

고쟉 이것때문에 왠 OTL이였단 말인가..-_-^

설정

트랙백

댓글