본문 바로가기
[android] JavaScript Bridge android, JavaScript Bridge JavaScript Bridge 하이브리드 앱을 만들 때 사용되는 방식으로, HTML 에서 어떤 function call 을 하면 android webview 에서 catch 가능하다. WebView.setJavaScriptEnabled( true );WebView.addJavascriptInterface( new MyBridge(), "AppInterface" ); private class MyBridge{public void functionName( String arg ){// do sth..}} function callAndroidFunction(){window.AppInterface.functionName();} 반대로 App 에서 JavaScrip.. 2014. 3. 17.
[CSS] Less 란 무엇인가? [CSS] Less 란 무엇인가? Less 란 무엇인가? Less 는 CSS pre-processor 이다.CSS language 의 확장판으로, variable, mixin, function 등의 추가적인 기능을 제공하는 언어이다.유지보수가 더 좋고, theme 을 지정할 수 있고, 확장성도 좋다. ex) @base : #f938ab; .box-shadow(@style, @c) when (iscolor(@c)){-webkit-box-shadow:@style @c;-moz-box-shadow: @style @c;-box-shadow: @style @c;} .box-shadow(@style, @alpha: 50%) when (isnumber(@alpha)){.box-shadow(@style, rgba(0,.. 2014. 2. 10.
[PHP] Tutorial, 객체 지향 PHP, Tutorial, 객체 지향 =====PHP 에서 클래스, 속성, 연산 만들기 class classname{ var $attribute1; function operation1( $param1 ){ }} =====생성자 __construct() 라는 이름을 가진다. =====소멸자 __destruct() 라는 이름을 가진다. =====생성 new 를 이용하여 생성한다. =====클래스 속성 사용하기 instance->attributeName 으로 접근한다. =====GET, SET 함수 __get, __set 함수를 가진다.해당 attribute 에 접근하면 자동으로 get, set 함수가 불리게 된다. =====private 와 public 으로 접근 제어하기 기본은 public. private.. 2013. 11. 15.
[java/tutorial] regexp 에 대해 알아보자. Regular Expression ( regexp ) 에 대해 알아보자. Regular Expression 이 뭐야? String 에 대한 검색 패턴을 정의한 것을 Regular Expression ( 정규식 ) 이라 부른다. Regular Expression 은 보통 축약형으로 Regexp 라고 부른다. Regexp 는 string 의 일부분을 찾고, 수정하는 등의 작업을 하는 데 쓰인다. Regexp 는 String의 왼쪽에서 오른쪽으로 적용되며, 한번 match 된 string 의 일부는 그 다음 검색에서 제외된다. Java, Perl, Groovy 등 대부분의 언어에서 지원되지만, 그 문법과 사용 형태 등은 언어마다 조금씩 다르다. 일반적인 사용 기호 . : 어떤 문자든 match ^regexp .. 2013. 6. 26.
[VB6] Function 만들기. ( Subprocedure ) Function 만들기. ( Subprocedure ) [이전강좌] Built-in Function 들에 대해 공부해보자. Public Function functionName( Arg As DataType, ... ) As DataType 위와 같은 형태로 정의한다. ex)Public Function MySummation( FirstVar As Integer, SecondVar As Integer ) As IntegerMySummation = FirstVar + SecondVarEnd Function 함수값과 같은 값이 return 된다. SubProcedure 의 약자인 Sub 도 Function 과 거의 동일한 작업을 하는데,Syntax 는 똑같고, Function 위치에 Sub 이 대신 들어간다. .. 2013. 6. 9.
[VB6] Form(Component) 관련 Event 와 Function들 Form(Component) 관련 Event 와 Function들 [이전강좌] VB의 특징과 장점에 대해 알고 싶나요? 이곳을 클릭 VB6 Form ( Component ) 관련 대표 Event 들 ClickDblClick : 더블클릭DragDropGetFocusKeyDownKeyPressKeyUpLostFocusMouseDownMouseUp LoadUnload VB6 Form ( Component ) 관련 대표 Function 들 AddItemList 나 Combobox 에 Item 을 추가할 때 사용된다. DragDrag & Drop Action 에 대한 Callback HideForm 을 숨긴다. MoveForm 의 위치를 이동한다. PrintForm 에 Text 를 쓴다. SetFocusForm .. 2013. 5. 28.
[JavaScript/Tutorial] Closure 와 Function.bind 의 사용. Closure와 Function.bind 의 사용 [이전강좌] Scope. var 없이 변수 정의하면? Global variable 접근방법은? Closure Closure 는 Scope 의 확장판으로 이해할 수 있다. Function 에 Parameter 형태로 Variable 을 전달하여, 해당 변수를 Local 화 시키는 것도 Closure이고, Outer scope 접속을 위해 임의의 variable 에 this 를 저장한 후, sub procedure 를 실행하는 형태도 Closure 하고 한다. // 변수 로컬화 closure var localizeFunction = function( localizedIndex ){ return function(){ alert( localizedIndex );.. 2013. 5. 26.
[JavaScript/Tutorial] this 란 무엇인가? this 가 가르키는 건 무엇인가? 주의사항은? this 란 무엇인가? this 가 가르키는 건 무엇인가? 주의사항은? [이전강좌] typeof 사용시의 주의사항, array type 판별코드. this 란 무엇인가? this 키워드는, 해당 function 을 invoke 한 object 를 가르키는 데 사용된다. this 가 가르키는 것은 어떻게 판별하는가? 1. Function.call 이나 Function.apply 를 통해 function call 을 하게 되면, call() 이나 apply() 의 첫번쨰 argument 가 this 가 된다. 만약 Function.call 이나 Function,apply 의 첫번째 argument 로 null 이나 undefined 가 들어왔다면 this는 global object 를 참조한다. 2. 만약 .. 2013. 5. 24.
[JavaScript/Tutorial] typeof 사용시의 주의사항, array type 판별코드. typeof 사용시 주의사항, array type 판별코드 [이전강좌] Function 정의 방법 typeof 사용시 주의사항 typeof operator 를 사용하면, 그 값이 string type 으로 return 된다.이 중에서 조심해야 할 data type 은 array 와 null type 이다. typeof function // "function"typeof object // "object"typeof array // "object" - 주의!!typeof string // "string"typeof number // "number"typeof null // "object" - 주의!! array 판별 코드 typeof operator 만 이용해서는, 검사하는 변수가 object 인지, arr.. 2013. 5. 23.
반응형