위 코드는 실행되지 않는다. 그 이유는 첫번째 라인에서 String returnUrl 을 초기화 해 주지 않았기 때문이다. String은 class형태이기 때문에 call by reference의 형태를 띠며 try catch에서 설정된 String의 값이 블록을 벗어나면서 메모리 영역이 반환되므로 가르치는 곳이 0이 되버린다.

question mark(?)를 이용하여 xml에서  현재 테마에 맞춰 값을 설정 할 수 있다.

?android:textColorSecondary

?android:attr/textColorSecondary

동일한 의미이며 values/attrs.xml에 설정된 attribute를 이용하는데 이때 해당하는 attribute에 대한 세부 설정은 theme_base.xml에 설정되어있다.

android-support-v7-appcompat 

를 예시로 들면 

•res/layout/abc_action_bar_home.xml 
android:src="?attr/homeAsUpIndicator"

res/values/attrs.xml
<!-- Specifies a drawable to use for the 'home as up' indicator. --> <attr name="homeAsUpIndicator" format="reference"/>

res/values/themes_base.xml
<item name="homeAsUpIndicator">@drawable/abc_ic_ab_back_holo_dark</item>

위와 같은 방식으로 사용하고 있다.

아래는 구글API 가이드의 Accessing Resources 이다.

Referencing style attributes

A style attribute resource allows you to reference the value of an attribute in the currently-applied theme. Referencing a style attribute allows you to customize the look of UI elements by styling them to match standard variations supplied by the current theme, instead of supplying a hard-coded value. Referencing a style attribute essentially says, "use the style that is defined by this attribute, in the current theme."

To reference a style attribute, the name syntax is almost identical to the normal resource format, but instead of the at-symbol (@), use a question-mark (?), and the resource type portion is optional. For instance:

?[<package_name>:][<resource_type>/]<resource_name>

For example, here's how you can reference an attribute to set the text color to match the "primary" text color of the system theme:

<EditText id="text"
   
android:layout_width="fill_parent"
   
android:layout_height="wrap_content"
   
android:textColor="?android:textColorSecondary"
   
android:text="@string/hello_world" />

Here, the android:textColor attribute specifies the name of a style attribute in the current theme. Android now uses the value applied to the android:textColorSecondary style attribute as the value for android:textColor in this widget. Because the system resource tool knows that an attribute resource is expected in this context, you do not need to explicitly state the type (which would be ?android:attr/textColorSecondary)—you can exclude the attr type.


출처: http://developer.android.com/intl/ko/guide/topics/resources/accessing-resources.html

http://stackoverflow.com/a/4771871/5182144

https://github.com/koush/android-support-v7-appcompat

http://stackoverflow.com/q/15008150/5182144

uri로 xmlns:android=“http://schemas.android.com/apk/res/android”를 쓰겠다는 의미로 저 uri의 정보를 가져다 쓰겠다는 의미

To understand why xmlns:android=“http://schemas.android.com/apk/res/android” must be the first in the layout xml file We shall understand the components using an example

Sample::

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/container" >    
</FrameLayout>

Uniform Resource Indicator(URI)

  • In computing, a uniform resource identifier (URI) is a string of characters used to identify a name of a resource.
  • Such identification enables interaction with representations of the resource over a network, typically the World Wide Web, using specific protocols.

Ex:http://schemas.android.com/apk/res/android:id is the URI here


XML Namespace:

  • XML namespaces are used for providing uniquely named elements and attributes in an XML document. xmlns:android describes the android namespace.
  • Its used like this because this is a design choice by google to handle the errors at compile time.
  • Also suppose we write our own textview widget with different features compared to android textview, android namespace helps to distinguish between our custom textview widget and android textview widget

출처 : http://stackoverflow.com/a/25758222

xml layout의 tools attribute 는 어떤 activity와 관련되어 있는지 알려준다. Menifest에 테마를 정의하고 있을 시 어떤 테마와 관련이 있는지 editor에게 알려준다. 패키지 이름을 prefix로 가지고 있다. 아래는 참고 자료 원문이다.

tools:context

This attribute is typically set on the root element in a layout XML file, and records which activity the layout is associated with (at designtime, since obviously a layout can be used by more than one layout). This will for example be used by the layout editor to guess a default theme, since themes are defined in the Manifest and are associated with activities, not layouts. You can use the same dot prefix as in manifests to just specify the activity class without the full application package name as a prefix.

출처: http://tools.android.com/tech-docs/tools-attributes

1. all 매크로 관용구

#define all(v) (v).begin(), (v).end()


ex) sort(all(a));
a.erase(unique(all(a)), a.end());
b.insert(b.end(), all(a));

2. FOREACH 매크로

#define FOREACH(it, v) \
  for(__typeof((v).begin()) it = (v).begin(); it != (v).end(); ++it)

ex) FOREACH(it, VectorString)
   cout << *it <<endl;



- F6 : 상단바로 포커스 이동 (한번 누르면 주소창 두번 누르면 북마크바)

- alt + D, ctrl + L : 주소창으로 포커스 이동

- 검색엔진 선택
    google.com
    naver.com
    daum.net
    github.com
    youtube.com
    등등 검색엔진 주소를 주소창에 입력 한 후 스페이스바나 Tab 키를 통해 선택

- URL 입력 후 alt + Enter : 새 탭에서 URL 열기

- ctrl + N : 새 창 열기

- ctrl + T : 새 탭 열기

- ctrl + W, ctrl + F4, 마우스 휠로 탭 클릭 : 현재 탭 닫기

- alt + F4 : 현재 창 닫기

- shift + ctrl + B : 북마크바 보이기/숨기기

- ctrl + D : 현재 페이지 북마크에 추가

- ctrl + shift + T : 최근 닫았던 탭을 다시 열기

- ctrl + 1~9 : 현재 열려있는 탭 중 입력한 번호의 순서의 탭 활성화

- ctrl + 링크 클릭 : 새 탭에서 클릭한 링크 열기

- shift + 링크 클릭 : 새 창에서 클릭한 링크 열기

- ctrl + shift + N : 새 시크릿 창

- F12, ctrl + shift + J : 개발자 도구 열기

- alt + home : 홈페이지로

1. Front-End 영역 (Client)
  - HTML5, CSS3, JavaScript
  - 현재 엄청나게 부각되고 있다.

2. Back-End 영역 (Server)
  - Java, C++, c#, 등등

3. 스마트티비 자동차까지도 브라우져 플랫폼이 올라감
  - 프론트 엔드 영역의 중요해 짐

라이브러리 

프레임워크


툴 (생산성 향상을 위한 도구)

브라우져에서 지원 : 크롬, 사파리

네트워크: Fiddler

형상관리: github

package:

task/build: grunt

test:


네이버 개발을 예로

요구사항 분석
Framework, Library 선정
개발환경 준비 (bower 이용)
설계 (UI의 영역을 기준으로 설계)
개발/테스트 (타깃을 선정하여 테스트->모든 기기마다 다 확인이 불가하므로)
배포환경 준비 (JS,CSS 머지 및 압축,이미지 최적화)


원하는 것을 어떻게 얻는가

1. RSS 피드
  - HTML5Rock.com
  - 블로그

2. 메일링 서비스
  - Java weekly
  - etc

    

http://helloworld.naver.com/helloworld/900758

만인의 연인 알고리즘, 치명적인 매력 분석

1. 오늘 강연의 주된 내용

  1) 전산과에서 왜 미적분, 선형대수, 확률 통계를 배우나요?

  2) 얼마나 공부해야 알고리즘 고수가 되나요?

  3) 수학 공부는 얼마나 해야하나요?

2. 다른사람과 비교하지 말고 본인이 스스로 만족 할 수 있을 정도로 해라

3. 상황에 따라 필요한 능력이 다르다네
  - 모든 컴퓨터과학/ 프로그래밍분야에서 높은 수준을 요구하진 않는다
   BUT!! 하나도 필요하지 않을 순 없다.

4. MITOPENCOURSEWARE
  - MIT에서 제공하는 강좌 참고할 것

5. Machine Learning
  - PCA N차원 정보를 2차원 정보로 만들어 줍니다.
  - 무인 자동차도 만들수 있다. 


http://helloworld.naver.com/helloworld/900758

D2 대학생 세미나

발표자료는 Helloworld에 올라와요!

협업개발 플랫폼

http://github vs http://yobi.io

오픈소스 관련 세미나 및 프로젝트 참여기회

http://d2fest.kr


1강 산넘어 산, 음원서비스 <세이렌> 개발기

1. 기본 원칙

  1) Data Visualization으로 시작
    - 분야에 대한 관심과 공부를 지속하다보니 세이렌이라는 프로그램을 만들 수 있게됨

  2) 대안을 찾을 때 최대한 많은 대안을 찾고 항상 고려해 둘 것


2. 프로젝트 과정에서의 시련

  1) 새로운 프로젝트 시작 과정에서의 정보 탐색
    - 새롭게 시작 할 때 공부해야 할 부분이 많았음

3. 프로젝트간 도움된 것

  1) Spring

  2) MyBatis
    - java DB 관리

  3) jQuery
    - JavaScript 코드 편하게

  4) Bootstrap
    - css편하게 쓸 수 있도록 도움
    - 디자인 혹은 UI

  5) D3.js

  6) THREE.js


4. 프로젝트에서 얻은것

  1) 지금할 수 있는 것 보다는 하고 싶은 것을 목표로
    - 기획과정에서는 제약 받지 않고 생각해 볼 것

  2) Project Scope
    - 주제와 목적이 명확해야 한다.

  3) 확장성, 재사용성, 변동가능성을 고려

  4) 형상관리 Tool
    - Github, Bucket

  5) 코딩 컨벤션

  6) 피드백 받기


http://helloworld.naver.com/helloworld/900758

스마트폰이 느려진 것 같다고 규혁이한데 물어봤더니 프로세스 확인을 해보라고 했는데

나는 바보라 그런거 모른다고 대답하니 돌아오는건 리눅스 공부하란 얘기 ㅠㅠㅠㅠ

그래서 책도 추천을 받아버렸다.

1. 안드로이드 스마트폰에서 리눅스 터미널을 띄우는 방법
  1번 방법. 쉘 터미널을 까시오
  2번 방법. Abd로 하시오
  (둘다 아직 무슨얘긴지 모르니 차차 찾아봐야지)

2. 리눅스 책을 구입하도록 하자

3. 리눅스 기본 사용법
  - http://kyuhyuk.kr/310
  - http://kyuhyuk.kr/308
  - http://kyuhyuk.kr/309
   (여기 참고하겠사옵니다 !)

+ Recent posts