Multiple annotations found at this line:

- The resource R.string.hello_world appears to be unused

- "hello_world" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "en-rGB" (English: United Kingdom), 

"en-rIN" (English: India), "es" (Spanish), "es-rUS" (Spanish: United States), "et-rEE" (Estonian: Estonia), "fa" (Persian), "fi" (Finnish), "fr" (French), "fr-rCA" (French: Canada), "hi" (Hindi), "hr" (Croatian), 

"hu" (Hungarian), "hy-rAM" (Armenian: Armenia), "in" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ka-rGE" (Georgian: Georgia), "km-rKH" (Khmer: Cambodia), "ko" (Korean), "lo-rLA" (Lao: Lao 

People's Democratic Republic), "lt" (Lithuanian), "lv" (Latvian), "mn-rMN" (Mongolian: Mongolia), "ms-rMY" (Malay: Malaysia), "nb" (Norwegian Bokmål), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "pt-

rPT" (Portuguese: Portugal), "ro" (Romanian), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sr" (Serbian), "sv" (Swedish), "sw" (Swahili), "th" (Thai), "tl" (Tagalog), "tr" (Turkish), "uk" (Ukrainian), "vi" (Vietnamese), "zh-

rCN" (Chinese: China), "zh-rHK" (Chinese: Hong Kong), "zh-rTW" (Chinese: Taiwan, Province of China), "zu" (Zulu)




1. 프로젝트 > Properties > Android Lint Prefereces


2. trans 로 검색


3. 검색된 목록에서 


ExtraTranslation 항목 클릭 > 우측 하단에 Severity : Fatal --> Warning 등 다른 것으로 변경

MissingTranslation 항목 클릭 > 우측 하단에 Severity : Fatal --> Warning 등 다른 것으로 변경


적용




끝.

블로그 이미지

엘로드넷

,

"app_name" is not translated in "af" (Afrikaans), "am" (Amharic), "ar" (Arabic), "bg" (Bulgarian), "ca" (Catalan), "cs" (Czech), "da" (Danish), "de" (German), "el" (Greek), "en-rGB" (English: United Kingdom), "en-

 rIN" (English: India), "es" (Spanish), "es-rUS" (Spanish: United States), "et-rEE" (Estonian: Estonia), "fa" (Persian), "fi" (Finnish), "fr" (French), "fr-rCA" (French: Canada), "hi" (Hindi), "hr" (Croatian), 

 "hu" (Hungarian), "hy-rAM" (Armenian: Armenia), "in" (Indonesian), "it" (Italian), "iw" (Hebrew), "ja" (Japanese), "ka-rGE" (Georgian: Georgia), "km-rKH" (Khmer: Cambodia), "ko" (Korean), "lo-rLA" (Lao: Lao 

 People's Democratic Republic), "lt" (Lithuanian), "lv" (Latvian), "mn-rMN" (Mongolian: Mongolia), "ms-rMY" (Malay: Malaysia), "nb" (Norwegian Bokmål), "nl" (Dutch), "pl" (Polish), "pt" (Portuguese), "pt-

 rPT" (Portuguese: Portugal), "ro" (Romanian), "ru" (Russian), "sk" (Slovak), "sl" (Slovene), "sr" (Serbian), "sv" (Swedish), "sw" (Swahili), "th" (Thai), "tl" (Tagalog), "tr" (Turkish), "uk" (Ukrainian), "vi" (Vietnamese), 

 "zh-rCN" (Chinese: China), "zh-rHK" (Chinese: Hong Kong), "zh-rTW" (Chinese: Taiwan, Province of China), "zu" (Zulu)




1. 프로젝트 > Properties > Android Lint Prefereces


2. trans 로 검색


3. 검색된 목록에서 


ExtraTranslation 항목 클릭 > 우측 하단에 Severity : Fatal --> Warning 등 다른 것으로 변경

MissingTranslation 항목 클릭 > 우측 하단에 Severity : Fatal --> Warning 등 다른 것으로 변경


적용




끝.

블로그 이미지

엘로드넷

,

<!doctype HTML>

<html>

  <head>

    <meta charset="utf-8">

    <meta http-equiv="X-UA-Compatible" content="IE=edge" />

    <title>KakaoLink Demo(Web Button) - Kakao Javascript SDK</title>

    <script src="https://developers.kakao.com/sdk/js/kakao.min.js"></script>

  </head>

  <body>

    <h3>카카오톡 링크는 카카오톡 앱이 설치되어 있는 모바일 기기에서만 전송 가능합니다.</h3>

    <a id="kakao-link-btn" href="javascript:;">

      <img src="http://dn.api1.kage.kakao.co.kr/14/dn/btqa9B90G1b/GESkkYjKCwJdYOkLvIBKZ0/o.jpg" />

    </a>


    <script>

    // 사용할 앱의 Javascript 키를 설정해 주세요.

    Kakao.init('3e786f8df14fcfc89d159421a6a7c9b6');


    // 카카오톡 링크 버튼을 생성합니다. 처음 한번만 호출하면 됩니다.

    Kakao.Link.createTalkLinkButton({

      container: '#kakao-link-btn',

      label: '카카오링크 샘플에 오신 것을 환영합니다.',

      image: {

        src: 'http://dn.api1.kage.kakao.co.kr/14/dn/btqaWmFftyx/tBbQPH764Maw2R6IBhXd6K/o.jpg',

        width: '300',

        height: '200'

      },

      webButton: {

        text: '카카오 디벨로퍼스',

        url: 'https://dev.kakao.com/docs/js' // 앱 설정의 웹 플랫폼에 등록한 도메인의 URL이어야 합니다.

      }

    });

    </script>

  </body>

</html>




출처 : https://developers.kakao.com/docs/js/demos/link-web

블로그 이미지

엘로드넷

,
안드로이드 네이버 밴드 공유


try {
	PackageManager manager = context.getPackageManager();
	Intent i = manager.getLaunchIntentForPackage("com.nhn.android.band");
} catch (PackageManager.NameNotFoundException e) {
	// 밴드앱 설치되지 않은 경우 구글 플레이 설치페이지로 이동
	Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse("market://details?id=com.nhn.android.band"));
	activity.startActivity(intent);
	return;  
}

String serviceDomain = "www.myapp.net"; //  연동 서비스 도메인
String encodedText = "%ED%85%8C%EC%8A%A4%ED%8A%B8+%EB%B3%B8%EB%AC%B8"; // 글 본문 (utf-8 urlencoded)
Uri uri = Uri.parse("bandapp://create/post?text" + encodedText + "&route=" + serviceDomain);
Intent intent = new Intent(Intent.ACTION_VIEW, uri);
activity.startActivity(intent);	


출처 : https://developers.band.us/developers/ko/docs/share#format_app





블로그 이미지

엘로드넷

,

php, 아파치 에러로그 Use of undefined constant ~~~



[Wed Apr 29 20:30:12 2015] [error] [client 123.123.123.123] PHP Notice:  Use of undefined constant ~~~~~~~ assumed '



위와 같은 로그가 쌓인다.


프로그램은 잘 작동하고 있다.


자세히 보면 assumed 이하에서처럼 따옴표로 둘러라는 말이 나온다.


디비에서 해당 배열변수에 값을 할당하는 부분을 찾아서 따옴표를 붙여 준다.


아래와 같이.


$sql = "select id, ~~~~~~";

$result = mysql_query($sql);

$data = mysql_fetch_array($result);


원래 : $id = $data[id];

수정 : $id = $data['id'];




끝.


블로그 이미지

엘로드넷

,

php, 아파치 로그 [error] [client xxx.xxx.xxx.xxx] PHP Notice:  Use of undefined index 에러가 쌓일 때.



tail -f error_log 해보면 


[Wed Apr 29 20:30:12 2015] [error] [client 123.123.123.123] PHP Notice:  Undefined index page in /~~~~ 과 같은 로그가 계속 쌓이는 것을 볼 수 있다.


그런데 해당 페이지는 전혀 문제가 없다. 로그만 쌓일 뿐이다.


괜히 로그 파일만 쌓이니 해결해 주자.




원인 : 보통 php변수를 선언할 때엔 변수 선언과 동시에 값을 대입하는데 GET, POST 변수인 경우엔 변수 선언시 아직 값이 할당되지 않은 경우가 있다.


즉, 


1.  $page = $_GET['page'];

2.  if(!$page){

3.     $page = 1;

4.  }


위와 같이 선언한 경우에는 2페이지로 넘어가기 전 1페이지만 호출시 $_GET['page'] 값이 없게 된다. 

그래서 1번줄에 에러가 나는 것이다.


물론 프로그램 동작시에는 문제가 없지만 php설정에 따라 로그를 남기게 된다.


null 값으로 변수를 선언했다는 이유임.



해결방법1) : 변수선언시 isset 으로 확인 (권장방법)


php.net 에서 권고하는 방법은, 변수선언을 다음과 같이 해준다.


1번 행을, 아래와 같이 선언해준다.


1.  $page = (isset($_GET['page']) ? $_GET['page'] : null);



다음과 같이 해도 됨.
$page = (isset($page) ? $page : null);



해결방법2) : php.ini 수정 (권장하진 않지만 동일한 효과)


서버를 손볼 수 있다면 php.ini 파일을 열어 수정해 준다.


php.ini 파일을 열고 아래와 같은 부분을 찾는다.


;error_reporting = E_ALL & ~E_NOTICE

;

;   - Show all errors, except for notices

;

;error_reporting = E_ALL & ~E_NOTICE | E_STRICT

;

;   - Show only errors

;

;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR

;

;   - Show all errors, except coding standards warnings

;

error_reporting  =  E_ALL



이 부분을 아래와 같이 주석을 바꿔준다.




error_reporting = E_ALL & ~E_NOTICE

;

;   - Show all errors, except for notices

;

;error_reporting = E_ALL & ~E_NOTICE | E_STRICT

;

;   - Show only errors

;

;error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR

;

;   - Show all errors, except coding standards warnings

;

;error_reporting  =  E_ALL



저장하고 아파치를 재시작하면 된다.


끝.




'PHP' 카테고리의 다른 글

php 5.4 split to explode  (0) 2016.01.27
PHP 5.3이상에서 변경되는 함수들  (0) 2015.07.24
php, 아파치 에러로그 Use of undefined constant ~~~  (0) 2015.04.29
PHP : email주소 유효성 체크  (0) 2015.04.18
PHP 확장자 구하기  (0) 2015.04.18
블로그 이미지

엘로드넷

,

영원, 永遠, eternal




네이버 국어사전에는 아래와 같이 나온다.


  1. 1.
    어떤 상태가 끝없이 이어짐. 또는 시간을 초월하여 변하지 아니.
    영원 사랑
  2. 2.
    <철학> 보편적인 진리처럼  의미나 타당성이 시간을 초월하는 것.
  3. 3.
    <철학> ()이나 진실성처럼 시간을 초월하여 존재하는 것.


네이버 영어사전에는 아래와 같이 나온다


[명사] eternity[형용사] eternalpermanenteverlastingperennial(literary) perpetual



정리해 보면,

1. 초월 : 시공초월
2. 무한 : 끝이 없음
3. 불변 : 변하지 않음
4. 불멸 : 죽지 않음





블로그 이미지

엘로드넷

,

안드로이드 EditText 부에 포커스 주고 키보드를 띄우자



1. 포커스 주기 : 레이아웃 xml  파일에서


EditText 뷰에         


<requestFocus />


를 추가해줌.


아래와 같이.




        <EditText

           android:id="@+id/messageText"

           android:layout_width="match_parent"

           android:layout_height="154dp"

           android:layout_alignParentLeft="true"

           android:layout_alignParentRight="true"

           android:layout_below="@+id/button1"

           android:background="#ffffff"

           android:ems="10"

           android:height="160dp"

           android:hint="회원들에게 전할 소식을 남기세요"

           android:inputType="textMultiLine"

           android:padding="10dp"

           android:textSize="16sp"

           android:textStyle="normal" >


        <requestFocus />

    </EditText>





2. 키보드 올리기(보이기) : EditText뷰가 포함되어 있는 액티비티 파일에서


private EditText editText;


editText = (EditText) findViewById(R.id.messageText);

editText.requestFocus();

//키보드 보이게 하는 부분

InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);

imm.toggleSoftInput(InputMethodManager.SHOW_FORCED, InputMethodManager.HIDE_IMPLICIT_ONLY);





3. 키보드를 숨기려면?

InputMethodManager immhide = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);

immhide.toggleSoftInput(InputMethodManager.HIDE_IMPLICIT_ONLY, 0);



블로그 이미지

엘로드넷

,

사각형 레이아웃의 위, 아래에 가는 선을 넣을려고 하는 것임



 




1. border.xml 파일을 아래처럼 만든다

파일위치 : /res/drawable-hdpi/border.xml



<?xml version="1.0" encoding="utf-8"?>

 <layer-list xmlns:android="http://schemas.android.com/apk/res/android">


<item> 

    <shape android:shape="rectangle">

      <solid android:color="#d7d7d7" /> 

    </shape>

  </item>   

    <item android:top="1dp" android:bottom="1dp">  

    <shape android:shape="rectangle"> 

      <solid android:color="#ffffff" />

    </shape>

  </item>    


 </layer-list> 


아래처럼 위, 아래, 왼쪽, 오른쪽..

android:top="1dp"     //위쪽
android:bottom="1dp"  //아래쪽
android:left="1dp"    //왼쪽
android:right="1dp"   //오른쪽



2. 적용할 레이아웃에 백그라운드로 적용한다.


파일위치 : /layout/activity_main.xml


<LinearLayout android:id="@+id/linear_layout5"

     android:layout_width="match_parent"

     android:layout_height="wrap_content"

     android:orientation="horizontal" 

     android:background="@drawable/border"

     

     >



위처럼 아래내용을 적용하고자 하는 레이아웃의 백그라운드에 추가해 주면 된다.


android:background="@drawable/border"




3. 끝.





블로그 이미지

엘로드넷

,

대한사람 대한으로 길이 보전하세


대한 = 大韓


- 큰 민족, 위대한 민족의 뜻

- 한반도, 삼한(마한. 진한, 변한)

韓(馯-간) 과 동일의미이며 동이족을 지칭 (동이족은 산스크리트어로 위대한 민족이라는 뜻)

고종황제가 우리나라의 국호를 "大韓"으로 지음


대한사람 => 대한의 사람 => 위대한 민족의 사람

대한으로 => 위대한 민족으로



위대한 민족의 대한사람들이여 위대한 민족으로 보전하세




블로그 이미지

엘로드넷

,