2018年7月15日 星期日

Android Studio 'no device connected' 問題解決

1.Android phone
-> 在setting中 點選手機版本5次 , open 開發者選項 ,將裡面的 debug mode打開


2.Android Studio
->在tools選項中, 選SDK manager ,選 SDK tools,安裝 google usb driver


3.Windows OS
-> 安裝 adb driver (http://adbdriver.com/downloads/)

2018年6月20日 星期三

linux 搜尋

該folder底下文字搜尋(包含檔案內的字眼): grep -r <search_word>  *


搜尋檔名: find . -name "*<search_word>*"

2018年5月24日 星期四

Git 刪除 branch

使用Git Bash here(right click on folder):
git checkout master

git branch -d XX_app
(check  the delete action:git branch ,  force delete: -d to -D ) 

git push origin --delete XX_app

如果發生 
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @


ssh-keygen -R 10.10.10.10 解決

再重新  git push origin --delete XX_app

Git 舊資料發生問題


git push origin --delete WW_App

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

解法:  ssh-keygen -R 10.10.10.10

Git 舊資料 push 到 新的IP or repository

Git 舊資料發生問題:
git push origin --delete WW_App

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is

解法:  ssh-keygen -R 10.10.10.10

Git 舊資料 push 到 新的IP or repository:

改repo位置
git remote set-url origin alex_lin@10.8.70.22:/data/git/Demo_app

確認成功與否
git remote -v

使用TotoriseGit or Git bash ,創造新的branch ,再切換到該branch

只需再push 上傳到git server(不需commit) ,因為push 可將 commit log 紀錄帶上去






2018年5月21日 星期一

Git 創造 branch

在本地機器上創建分支並切換到此分支:
$ git checkout -b [name_of_your_new_branch]

改變成此分支
$ git checkout [name_of_your_new_branch]

push 上傳此分支
$ git push origin [name_of_your_new_branch]

2018年5月14日 星期一

Teraterm 亂碼問題 解決

使用4.98 版本


將語言設為japanese


設定方式:




原因分析:
看人名  看起來teraterm的開發者為日本人,可能在開發時 將japanese設定為global english的全域設定,所以在設成其他語言時 會脫離英文語系而造成command的亂碼現象








2018年4月16日 星期一

2018年3月10日 星期六

失業補助金領取 程序

 選擇 台灣就業通的一家公司面試應徵,再
到就業服務站給人員作應徵開卡處理,回來之後 遞送應徵email
1.獲得面試通知
2.未獲通知,主動去電 詢問是否公司已應徵到人
ps:重點把 應徵結果 填寫在 應徵開卡上

再依照卡上的繳卡日期,回去就服站 交給人員處理,
成功後.獲得勞保薪資*0.6
的失業補助金

2018年3月5日 星期一

Google Play 設定

1.銀行:
     https://support.google.com/googleplay/android-developer/answer/7161440

2018年2月23日 星期五

Clion 編譯

針對 avs device sdk 編譯的import 設定:

1.generate out of source build
file -> settnigs



2.run SampleApp
 run -> edit configurations

2017年7月24日 星期一

Android 藍芽 搜尋

1.傳統藍芽搜尋,如果版本在6.0以上,則須在androidmanifest.xml加入

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
 

2017年7月21日 星期五

2017年7月13日 星期四

交通罰則

紅燈右轉不等於闖紅燈 法官判警方敗訴

http://www.chinatimes.com/realtimenews/20131231001943-260402


以公務員文書登載不實將他起訴
https://news.tvbs.com.tw/local/138494


交警開單 男怨:沒證據

http://www.appledaily.com.tw/appledaily/article/headline/20120609/34288456/



開單告發闖紅燈 警察沒證據、判免罰

http://news.ltn.com.tw/news/society/breakingnews/1775923



「眼睛就是攝影機」 警抓闖紅燈無效

http://news.ltn.com.tw/news/society/paper/831467


2017年6月15日 星期四

Android 在別的畫面(app) 去呼叫特定已開啟的App

AndroidMainfest.xml
-------------------
<activity    android:name=".main.Activity1"   
 android:configChanges="keyboard|keyboardHidden|orientation"
 android:label="@string/app_name"   
 android:screenOrientation="portrait"
  android:launchMode="singleInstance" <= 此行絕對不能加,會造成呼叫其他的app
> <!-- Prevents authorization dialog from closing when screen orientation is changed -->
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />

        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>


-------------------
可用BroadcastReceiver來收到廣播,再行處理,此方法每次呼叫 不會onCreate其activity

Intent intent = new Intent();
intent.setComponent(new ComponentName("com.captain.voice.alexa.mobile", 
"com.captain.voice.alexa.mobile.main.Audio_Record"));
intent.setFlags(Intent.FLAG_ACTIVITY_REORDER_TO_FRONT);
startActivity(intent);

網頁動畫效果

1.斜角度移動:
<div  id="move_bar2"  style="position:absolute;z-index:1;left:290px;top:240px">
<img  src="images/n/demo/mask1_back.jpg"  style="width:40%;"/>
</div>
---------------------------------

 $("#move_bar2").animate({left: "-=110",top: "+=60" }, 500);

2017年6月8日 星期四

OKHTTP 重要教學

1.同步與非同步傳輸模式
https://github.com/square/okhttp/wiki/Recipes

非同步(asy) 可以捕捉request失敗的狀況,再重傳.


2,Application與Network 的Response監聽方式
https://github.com/square/okhttp/wiki/Interceptors

Application較為正常