달력

3

« 2024/3 »

  • 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

'분류 전체보기'에 해당되는 글 138

  1. 2009.12.01 한달남은 첫학기 1
  2. 2009.11.17 changing firefox changing cache and paths
  3. 2009.11.11 Changing JAVA jre
  4. 2009.10.10 find, unique, cumsum
  5. 2009.09.18 Finally clause
  6. 2009.08.24 Latex 변환하기 1
  7. 2009.07.27 Close to Me - Wally Lopez
  8. 2009.07.17 Middleware
  9. 2009.07.17 AIR 의 장점 2
  10. 2009.07.16 Flex 3 조각지식
2009. 12. 1. 16:34

한달남은 첫학기 일기2009. 12. 1. 16:34

학교에 온지 어연 삼개월,
그리고 어느새 첫학기가 끝나간다. 그래도 그동안 많은 일이 있었다. 파티를 쫒아다니며 재밌게 놀기도 하고 진정한 친구를 찾기 힘든데에 회의감도 느꼈다. 그리고 항상 곁에 있어준 사람의 소중함도 느끼게 되었다.

부모님과 오랜만에 하는 통화에 전화를 끊고 혼자 울기도 하고, 영어를 좀 더 잘하고자 혼자 이래저래 잔꾀부리던 일도 있었다. 심지어 역효과까지도 겪었고.. 이젠 꽤나 익숙해져서 불편함을 못느끼고 있지만.

한국에서는 남에게 잘나보이고 문제생기지 않을 일만 하면 항상 행복했던거 같은데, 여기서는, 아니 어쩌면 내 나이에서는, 내 목표가 무엇이고 내가 원하는게 지금 무엇인지에 집중하는게 더 편하다는 것을 시행착오를 통해 깨달아가고 있다. 그만큼 정서적 안정감을 갖는 것 또한 중요하다.

그리고 지난 땡스기빙때는 아는 형들과, 그리고 교회에서 좋은 시간을 보냈지만, 'I love you, man'이라는 영화를 보고 난 후 영화내용과는 상관없지만 옛생각에 나는 또 우울함에 빠지고 만 적이 있다. 이게 아마 세 번째 우울함이었던거 같아 매디슨에서의.

다시는 우울함에 또 빠져들기 싫다. 내 삶을 컨트롤 하고 싶다. 그렇게 다짐하고 오늘도 잠을 청해볼까. 

아, 너무 안좋은 얘기만 잔뜩 써놨네, 좋은 끝맺음도 해야지. 첫학기에 TA의 그레이딩 압박을 거의 견뎌내고 드디어 다음학기부터는 RA를 할수 있게 되었다. 다음 학기면 머신러닝에 대한 기초도 쌓이고 슬슬 연구  참여 비중도 높아질 것이다.

앤소니 라빈스의 <무한능력> 에서 좋은 글 몇개를 발췌해 본다.
 - 우리 주변에 일어나는 일은 좋은일이든 나쁜일이든 이유와 목적이 존재하고, 그것들은 결국 우리에게 어떠한 형태로든 도움을 준다. (결국 나쁜일도 도움이 된다는 말.)
 - 실패란 없다. 오직 결과만이 있을 뿐이다.
:
Posted by Kwang-sung Jun
2009. 11. 17. 07:29

changing firefox changing cache and paths 삽질예방/Firefox2009. 11. 17. 07:29

firefox cache path changing!!

1.
type
about:config
in address bar.

2.
edit (or add if not exist)
browser.cache.disk.parent_directory
set value as
/scratch/firefox.cache

and then , make firefox.cache folder in /scratch (or, wherever you want)

now it works way faster than before... !!


3. one more

./mozilla -profilemanager
-> create a new account with directory in anywhere you want and delete default


citation:
http://kb.mozillazine.org/Profile_Manager#Accessing_the_Profile_Manager

:
Posted by Kwang-sung Jun
2009. 11. 11. 01:15

Changing JAVA jre 삽질예방/Java2009. 11. 11. 01:15


Right click on project name and choose properties -> Run/Debug Settings -> Edit (or duplicate and edit) -> JRE tab
:
Posted by Kwang-sung Jun
2009. 10. 10. 08:13

find, unique, cumsum 삽질예방/Matlab2009. 10. 10. 08:13

>> A = magic(3)
A =
     8     1     6
     3     5     7
     4     9     2

>> find(A>5)
ans =
     1
     6
     7
     8

>> [I,J] = find(A>5)
I =
     1
     3
     1
     2
J =
     1
     2
     3
     3

>> [I,J] = find(A==3)
I =
     2
J =
     1


>> A = [1 1 1; 2 2 2; 1 1 1];
>> unique(A,'rows')
ans =
     1     1     1
     2     2     2

>> unique(A)
ans =
     1
     2

find "help cumsum". (maybe useful when converting multinomial distru to cumulative one.
:
Posted by Kwang-sung Jun
2009. 9. 18. 06:45

Finally clause 삽질예방/Java2009. 9. 18. 06:45


even if another exception is thrown in catch block, finally block is executed before 2nd exception is caught.

Therefore, "every" time control enters try block, finally block is reserved to be run (after finishing try{} and when finished catching. if it is not caught there, then finally block is executed and then jump)

here is a good example.

static void f(int k, int[] A, String S) {
int j = 1 / k;
int len = A.length + 1;
char c;

try {
c = S.charAt(0);
if (k == 10) j = A[3];
} catch (ArrayIndexOutOfBoundsException ex) {
System.out.println("array error");
throw new InternalError();
} catch (ArithmeticException ex) {
System.out.println("arithmetic error");
} catch (NullPointerException ex) {
System.out.println("null ptr");
} finally {
System.out.println("in finally clause");
}
System.out.println("after try block");
}

Part A: Assume that variable X is an array of int that has been initialized to be of length 3. For each of the following calls to method f, say what (if anything) is printed by f and what, if any, uncaught exceptions are thrown by f.

  1. f(0, X, "hi")
  2. f(10, X, "")
  3. f(10, X, "bye")
  4. f(10, X, null)

The answer is following.


:
Posted by Kwang-sung Jun
2009. 8. 24. 12:16

Latex 변환하기 삽질예방/Latex2009. 8. 24. 12:16

dvi파일 생성
latex hello.tex

ps로 변환
dvips hello.dvi -o hello.ps

** dvi to pdf straight
dvipdfm -o hello.pdf hello.dvi

ps를 pf로 변환
ps2pdf hello.ps hello.pdf

top matter
=> 타이틀, 저자 정보, 생성날짜 등...

\\
-> 뉴 라인           
:
Posted by Kwang-sung Jun
2009. 7. 27. 16:17

Close to Me - Wally Lopez 음악2009. 7. 27. 16:17



오랜만에 음악 포스팅. 개인적으로 신나는 하우스 음악을 좋아합니다. 물론 저도 영어도 배울겸 팝송, 힙합을 좋아하면 괜찮겠다는 생각을 많이 합니다만, 손이가는건 어쩔 수 없나봅니다.

When you lie down on my bed, my whole body lose control.
When you wake up close to me, I wanna stay whole life with you.

:
Posted by Kwang-sung Jun
2009. 7. 17. 16:59

Middleware 개념2009. 7. 17. 16:59

운영체제와 어플리케이션 중간에 위치하면서 주로 여러 머신에 여러 process들이 수행되는 것을 관리하고 분산시켜주는 역할을 한다. 특히 운영체제에 독립적으로 이러한 기능을 제공해주게 된다.예제로는 Database system을 들 수 있다.
Middleware generally consists of a library of functions, and enables a number of applications

:
Posted by Kwang-sung Jun
2009. 7. 17. 16:58

AIR 의 장점 개념2009. 7. 17. 16:58

로컬 파일시스템과의 접근이 용이하면서도 웹으로의 접근또한 용이하다.
-> 몇몇 로컬 작업이 필요하거나 더 편한 경우에 유용해진다. RIA에 쓰이던
편리한 기능들을 그대로 데스크탑 어플리케이션에 적용할 수 있다.
:
Posted by Kwang-sung Jun
2009. 7. 16. 17:42

Flex 3 조각지식 삽질예방/Flex2009. 7. 16. 17:42

팝업 확인 버튼 띄우기
import mx.controls.Alert;
Alert.show('LinkButton selected!');


Application 클래스

<mx:Application  ...> 내부에서 application이라고 하면 Application에 대한 인스턴스, 즉 자기자신을 나타낸다.
Application 클래스는 싱글톤으로써, 자기자신에 대한 객체 참조를 Application.application이라는 static 멤버변수에 집어넣는다.


for each 반복문

var ary:Array = [1, 2, 3, 4];
var a:int;
for each (a in ary) {
    // do something...
}


[Bindable] 은 대체 무슨 역할???

  • [Bindable] 바로 아래에 선언된 set/get함수(프로퍼티)나 클래스가 변동되었을 때 이를 바인딩하고있는 다른 객체들에게 notify해준다.
  • data binding expression ==> {}로 감싼 수식을 말한다. 이 안에서는 & 대신 &amp;를 사용하여야 한다.
  • XMXL로 작성하는 것은 자동으로 Bindable 범주내로 들어가는 듯 하다. MXML에서 자동으로 해주는 건지 그것들이 UIComponent이기 때문인지는 아직 알 수 없다. (UIComponent이기 때문인 것 같다.)
  • 결국 [Bindable]은 바로 아래에 있는 property가 바인딩의 source로 등록되게 해준다. 만약 기존 UIComponent의 property라면 굳이 안해줘도 도리 것이다. source로 등록되어 있으며 property값 변화가 일어나는 이벤트가 일어날 때 source에서 destination으로 값 복사를 해준다. property값 변화가 일어나는 이벤트는 직접 지정 가능하다. 직접 지정하면 setter함수 내에서 자신이 값 복사 시점을 직접 상세히 지정해줄 수 있다.


Property 직접 bind 시키기 / 함수로 바인드시키기

   
BindingUtils.bindSetter(bindFunc, textIn, 'text');
    // 원래 String대신에 Object인자로 받게 됨.
    public function bindFunc(src:String):void {
        textOut.text=String(src);
    }
       
또는
    BindingUtils.bindProperty(textIn, 'text', this, ['textOut', 'text']);

textIn은 텍스트 인풋을 받는 곳이고, textOut은 그냥 레이블이다...

XML 코딩에서 :
<mx:Text id="myText" text="{user.name.firstName.text}" />

액션 스크립트:
bindProperty(myText, "text", user, ["name", "firstName", "text"]);
 => user["name"]["firstName"]["text"] 와 같이 번역된다.!!!


ArrayCollection을 bind 시키기

얘는 직접 멤버를 컨트롤하기 힘드므로,
ary.addEventListener(CollectionEvent.COLLECTION_CHANGE, collChange);

을 추가시켜 주어야 한다.           
그리고 함수에서는
   
public function collChange(e:CollectionEvent):void {
        Button(aryBox.getChildAt(e.location)).label =
 ary.getItemAt(e.location).toString();
}

와 같이 한다. e.location은 변화가 발생된 인덱스를 말한다.


fillColor 바꾸기

css 프로퍼티나, Design모드에서는 해당 항목을 0x000000, 0x000000 라고 하면 그라데이션으로 색을 줄 수 있다.
만약 직접 세팅하고 싶다면
btn.setStyle('fillColors', [0x000000, 0x000000]);

라고하면 된다.


String

'a'.charCodeAt(0);

'a'자체가 스트링이다.

String.fromCharCode(65)
을 이용하면, 직접 아스키코드로부터 캐릭터를 얻어낼 수 있다. 캐릭터 타입은 따로 없고, String을 이용하면 될 것 같다.


Array

            var tmp:Array = [];
            tmp[0] = 3;
            tmp[1] = 3;
            trace('length: ', tmp.length);
말그대로 그냥 동적인 배열.
:
Posted by Kwang-sung Jun