Monday, August 23, 2010

Ubunt10.04LTS使用Git下载Android源代码

安装Git

sudo apt-get install git-core curl

curl是一个利用URL语法在命令行下工作的文件传输工具,会在后面安装Repo的时候用到。

安装Repo

首先确保在当前用户的主目录下创建一个/bin目录(如果没有的话),然后把它(~/bin)加到PATH环境变量中
接下来通过curl来下载Repo脚本,保存到~/bin/repo文件中

curl http://android.git.kernel.org/repo >~/bin/repo

给repo可执行权限

chmod a+x ~/bin/repo

初始化版本库

如果是想把Android当前主线上最新版本的所有的sourcecode拿下来,我们需要repo的帮助。
先建立一个目录,比如~/android,进去以后用repo init命令即可。

repo init -u git://android.git.kernel.org/platform/manifest.git

最后会看到 repo initialized in /android这样的提示,就说明本地的版本库已经初始化完毕。

下载Android代码

repo sync

Tags: Linux, Google, Android


Wednesday, August 18, 2010

搜索引擎爬虫的User Agent

Baidu(百度)

Baiduspider+(+http://www.baidu.com/search/spider.htm),gzip(gfe),gzip(gfe)

Baiduspider+(+http://www.baidu.jp/spider/),gzip(gfe),gzip(gfe)

Bing(必应)

msnbot/2.0b (+http://search.msn.com/msnbot.htm),gzip(gfe)

Youdao(有道)

Mozilla/5.0 (compatible; YoudaoBot/1.0; http://www.youdao.com/help/webmaster/spider/; ),gzip(gfe)

Yahoo!(雅虎)

Mozilla/5.0 (compatible; Yahoo! Slurp/3.0; http://help.yahoo.com/help/us/ysearch/slurp),gzip(gfe)

Mozilla/5.0 (compatible; Yahoo! Slurp China; http://misc.yahoo.com.cn/help.html),gzip(gfe),gzip(gfe)

Google(谷歌)

Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html),gzip(gfe)

Googlebot-Image/1.0,gzip(gfe)

Sogou(搜狗)

Sogou web spider/4.0(+http://www.sogou.com/docs/help/webmasters.htm#07),gzip(gfe),gzip(gfe)

Sogou Pic Spider/3.0(+http://www.sogou.com/docs/help/webmasters.htm#07),gzip(gfe)

Yandex

Mozilla/5.0 (compatible; YandexBot/3.0; +http://yandex.com/bots),gzip(gfe),gzip(gfe)

Alexa

ia_archiver (+http://www.alexa.com/site/help/webmasters; crawler@alexa.com),gzip(gfe)

Sina iAsk(新浪爱问)

SAMSUNG-SGH-E250/1.0 Profile/MIDP-2.0 Configuration/CLDC-1.1 UP.Browser/6.2.3.3.c.1.101 (GUI) MMP/2.0(iaskspider +http://iask.com/help/help_index.html),gzip(gfe),gzip(gfe)

Tags: Google


Thursday, July 15, 2010

Google Appengine的一些问题

http://code.google.com/p/googleappengine/issues/detail?id=161

文件数量: 3000

单个文件大小: 10 MB

150 MB max combined size of code files
10 MB max individual size of any file
1000 files max per directory (not counting files in subdirectories)

为了减少文件数目可用以下办法zip压缩一下,修改app.yaml

- url: /ckeditor/.*
  script: $PYTHON_LIB/google/appengine/ext/zipserve

- url: /microemulator/.*
  script: $PYTHON_LIB/google/appengine/ext/zipserve

有人说只支持一个zip压缩包,我试了下,不只支持一个,多个没问题.

Tags: Google


Wednesday, February 03, 2010

google Map取得经纬度坐标的方法

打开Google地图,在浏览器地址栏输入:

javascript:void(prompt('',gApplication.getMap().getCenter())); 
然后按回车键(Enter),这时,你将得到一个弹出的输入框,这个坐标就是你需要找的经度和纬度。

Tags: Google


Saturday, November 01, 2008

Google 地图

我的Google 地图 是烟台大学的位置

Tags: Google