思庫

jerrypop.egloos.com

포토로그 마이가든



5분 청소



5분간의 청소가
어떤 의미 있는 역할을 할까
?
청소하는 양 자체는 그리 많지 않을 것이다
.
그러나 5분이라는 시간은 당신을 '움직이게' 만든다
.
그리고 이것은 가장 어려운 부분이기도 하다
.
하기 싫은 일을 시작하는 것이 그것을 지속하는 것보다

더 어려운 법이다. 아마 당신은 주변이 생각보다

빨리 깨끗해지는 것을 보고 놀랄 것이다
.
싱크대 청소에서 시작했지만 곧이어

욕실과 거실도 깨끗해져

있을 테니까
.


-
칩 히스의《스위치 Switch》중에서 -


커피로 인한 두통




Weekend Headache

Those migraineurs who experience "weekend" headaches or headaches precipitated by oversleeping should try to awaken at the same time on weekends as they do during the week and to maintain a regular sleep pattern throughout the entire week. Moreover, it is essential for the migraine sufferer to get enough sleep, as fatigue can provoke a headache. In fact, fatigue is one of the most common triggers of migraine headaches.

A sudden stopping of the use of caffeine can lead to abrupt vasodilation and a "caffeine withdrawal" headache. Caffeine is also a stimulant, which can add a letdown feeling after the effect wears off. This kind of headache is common in heavy coffee drinkers. One of the factors contributing to "weekend" or "holiday" headaches may be caffeine withdrawal. If a person normally consumes large amounts of caffeine-containing substances during the week, a withdrawal or ìreboundî headache may occur on weekends or holidays if similar amounts are not consumed. The pain producing mechanism of the headache is probably due to the vasodilation of cranial arteries. The headache may be a persistent, generalized one that lasts for weeks. A gradual withdrawal from caffeine containing substances can help to reduce the severity of the withdrawal headache.

http://www.headaches.org/education/Headache_Topic_Sheets/Weekend_Headache


Justice 공부중.

정언명령(categorical imperative)

categorical은 "확고한", "단정적인" 이라는 뜻으로, categorical imperative는 결국
"절대적인명령"을 나타낸다.

가언명령(hypothetical imperative)

hypothetical은 "if" 라는 가정을 뜻하는 것으로,
hypothetical imperative는 if you want x, then do y.
와 같이 조건에 따라 내려지는 명령을 말한다.
그러므로 약간 의역적으로 풀이해서 "조건부명령"이 맞지 않나 생각해본다.

그러므로 정언명령과 가언명령을 좀 이해하기 쉽게 설명해보자면,
"절대적명령"과 "조건부명령"으로 이해할 수 있겠다.

inclination

justice라는 책의 칸트부분에서 이 단어를 풀이하길 "끌림"이라고 하였는데,
이는 "의도"가 맞다. motive가 duty vs inclination의 두가지로 나뉘는데
이를 "의무적동기"와 "의도적동기"로 풀이하는게 맞을것이다.


ListView에서 Delete. SharePoint

 

CORE.js 기본이 되는 모든 JavaScript들이 들어 있는듯 합니다. 아마도 코어에 모든 기능을 모아놓고, 그걸 기반으로 서로 다른 팀들이 개발을 했나봅니다.

 

리스트에서 선택된 아이템의 Delete 위해선 다음에서 힌트를 얻을수 있습니다.

 

 

function HandleItemDelete(ei, ctxNum)

{ULSrLq:;

if (ei.keyCode==Sys.UI.Key.del)

{

var ctxCur=window["ctx"+ctxNum];

{ var defd; try { defd=typeof(inplview.DeleteSelectedItems); } catch (e) { defd='undefined'; } if (defd !='undefined') { inplview.DeleteSelectedItems(ctxCur); } else { var str="inplview.DeleteSelectedItems"; var rg=str.split('.'); if (rg.length > 1) { var fnd=function () {ULSrLq:; inplview.DeleteSelectedItems(ctxCur); }; EnsureScript(rg[0], defd, fnd); } }};

return false;

}

}

 

inplview 대해 직접 Delete 명령을 내리는 군요.


Javascript String Replace All


javascript의 replace를

var tmpStr = "me, me, me";
tmpStr = tmpStr.replace("me", "you");

와 같이 사용하면 --> "you, me, me" 로 되지만,

tmpStr.replace(/me/g, "you")를 사용하면 --> "you, you, you" 로 변환함.

물론, 첫번째 파라메터는 정규표현식.

SharePoint 2010에서의 IE6 경고창

마스터페이지에서 아래 컨트롤을 제거하면됨.
 

<SharePoint:WarnOnUnsupportedBrowsers runat="server"/>


SharePoint Session State 활성화

SharePoint에서 Session State활성화

SharePoint는 Default로 Session이 꺼져있다.
세션변수를 사용하려면? 다음과 같이.

http://www.tonytestasworld.com/post/2008/01/03/Howto-Sharepoint-Enable-Session-State-if-not-enabled.aspx


 
  1. pages태그의 enableSessionState="true"로 설정
  2. system.webServer/modules 태그 아래 <remove name="Session" /> 커멘트 처리 --> <remove name="Session" />

SharePoint Filter 사용법, wildcard 검색 SharePoint

URL에 다음과 같은 파라메터를 붙여서 데이타 필터링이 가능함.

- 하나의 필드에 대한 or 검색(1개만 사용가능함)
/AllItems.aspx?FilterName=필드명&FilterMultiValue=*A*;*B*

- 여러필드에 대한 검색
/AllItems.aspx?FilterName=CCC&FilterMultiValue=*Q&FilterField1=LinkTitle&FilterValue1=Hello


- Equal에 해당하는 필터는 다음과 같은 형식으로 여러개 걸수 있음.

FilterField1/FilterValue1
FilterField2/FilterValue2
...
FilterFieldN/FilterValueN

 


Javascript에서의 null 과 undefined

1. null은 값이다.

단, Context에 따라 변하는 값임. 숫자로 취급할때는 0, 문자로 취급될때는 "null", Boolean으로 취급될때는 false 임.

2. DOM 엘레먼트의 쿼리결과에 null이 사용됨.

var myDomElement = getElementById("DOMElement");

null은 위와 같이 DOM의 Element를 Qeury하였을 경우 존재하지 않을 경우 그 결과값으로서의 null이 리턴됨. (항상)

3. "undefined"는 현재실행시점 이전에 다른 자바스크립트나 라이브러리가 변수(또는 오브젝트)를 선언하여 값을 할당하였는지를 판단하는데 사용함. 주로 typeof를 이용하여 "undefined" 인지 확인함.

4. var a = null 과 같이 null은 변수의 초기화를 위해서 사용할 수 있음.

5. var b; 만 되어있을 경우 typeof(b)는 "undefined" 임.

6. var b = null; 일 경우 typeof(b)는 "object"임.


ATL - CWindow

 

ATL 다시 들여다보니 재밌는게 보입니다. CWindow라는 건데, 원문에는 다음과 같이 되어 있군요.

 

Class CWindow allows you to use a window. Once you attach a window to a CWindow object, you can then call CWindow methods to manipulate the window. CWindow also contains an HWND operator to convert a CWindow object to an HWND. Thus you can pass a CWindow object to any function that requires a handle to a window. You can easily mix CWindow method calls and Win32 function calls, without creating any temporary objects.

 

Pasted from <http://msdn.microsoft.com/en-us/library/b2731578.aspx>

 

말인즉슨, 윈도우 핸들을 구해서 이를 CWindow에다 Attach하면 CWindow가 생명력을 갖게되어 CWindow 내의 멤버들을 호출하거나 사용할 있다는 겁니다. 영화의 한장면이 연상되는 군요. 재밌는 컨셉인것 같습니다. 언제 유용하게 사용할 있나요? 아마도 IE 상에서 돌아가는 ActiveX에서 유용하게 사용할 있을 같습니다


1 2