原创 Gerrit開發配置指南¶

Gerrit開發配置指南¶準備工作:地址映射¶Windows下: C:\WINDOWS\system32\drivers\etc\hostsLinux下: /etc/hosts 命令:sudo v

原创 Ubuntu中的在文件中查找和替換命令

1、查找find /home/guo/bin -name /*.txt | xargs grep 'jdbc'查找 /home/guo/bin 目錄下所有後綴爲.txt 的文件(PS:/* 轉義* 爲統配符

原创 Linux下tr命令詳解

引自 :http://www.2cto.com/os/201201/117822.htmltr是translate的簡寫,通過這個單詞,你大概也能猜到它是幹什麼的了吧!沒錯,它可以用一個字符串來替換另一個字

原创 Linux下管道刪除

Linux下管道刪除find -name *.log | xargs -n 1000 rm -rf

原创 repo 下載

curl http://git-repo.googlecode.com/files/repo-1.12 > ~/reposudo cp -r repo /usr/local/bin/cd /usr

原创 Ubuntu下 ssh : connect to host localhost port 22:Connection refused

Ubuntu下測試ssh時使用ssh localhost 命令,出現錯誤提示connect to host localhost port 22:Connection refused造成這個錯誤的原因可能是s

原创 ubuntu右上角的網絡連接圖標消失解決辦法 (20

sudo service network-manager stopsudo rm /var/lib/NetworkManager/NetworkManager.statesudo service netwo

原创 設置在當前文件夾內打開終端

sudo apt-get install nautilus-open-terminal設置在當前文件夾內打開終端,安裝工具·需重啓!

原创 git 升級

sudo add-apt-repository ppa:git-core/ppasudo apt-get updatesudo apt-get install git-core curl

原创 android2.3權限問題

android2.3相對於2.2來說,有個最大的變化就是權限管理模塊的更新,導致明明有root權限,但是無法執行很多底層命令和api,舉例:在終端上su到root用戶,執行ls等命令都會報沒有權限。

原创 Android權限控制代碼分析

前在文章介紹過android系統管理層次:http://www.2cto.com/kf/201204/127682.html ,這裏就核心代碼分析一下android系統充分利用了linux的用戶權限管理方法

原创 Activity的四種加載模式:

Activity的四種加載模式:1、standard :系統的默認模式,一次跳轉即會生成一個新的實例。假設有一個activity命名爲Act1,執行語句: startActivity(new Intent(

原创 Android中string.xml使用總結

<b></b>加粗字體 <i></i> 斜體字體 <u></u> 給字體加下劃線 \n 換行 \u0020表示空格 \u2026表示省略號 使用<b>和<b>來打印出<b></b> 這樣的文字;“<”表示“

原创 android shape的使用

<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android"

原创 轉:adb shell start中啓動activity和service

命令窗口通過adb shell 進入android 的Linux命令界面,輸入am -help看到如下信息:我們可以通過命令啓動android中的Activity,Service,BroadcastRece