2012年10月1日
摘要: 以下内容来自Android NDK文档<ANDROID_NDK_HOME>/docs/ANDROID-MK.htmlOverview:An Android.mk file is written to describe your sources to thebuild system. More specifically:- The file is really a tiny GNU Makefile fragment that will be parsed one or more times by the build system. As such, you should try t 阅读全文
posted @ 2012-10-01 11:55 Anthony Li 阅读(4178) 评论(0) 推荐(0) 编辑
  2012年9月30日
摘要: 参考:Android NDK,sample/hello-jni示例项目系统环境:Ubuntu 12.04 LTS 32-bit1、准备工作打开Eclipse,新建Android项目:Application Name: HelloJNIProject Name: HelloJNIPackage Name: com.example.hellojniActivity: MainActivityActivity Layout: activity_main.xml修改activity_main.xml,为<TextView/>标签,添加"android:id"属性,删除“ 阅读全文
posted @ 2012-09-30 18:45 Anthony Li 阅读(785) 评论(0) 推荐(0) 编辑
  2012年9月29日
摘要: 1、准备工作安装Android SDK(步骤省略……)安装ant工具sudo apt-get install ant2、创建应用Andrioid SDK中,<ANDROID_HOME>/tools/android,提供了创建Android应用命令,如下图所示:创建目录MyProject,切换当前目录到MyProject目录下mkdir MyProjectcd MyProject使用android创建Android应用android create project -n MyProject -t android-16 -p . -k com.example.myproject -a M 阅读全文
posted @ 2012-09-29 12:00 Anthony Li 阅读(455) 评论(0) 推荐(0) 编辑
  2012年9月27日
摘要: 1、查看usb设备终端输入lsusb我的手机是HTC Desire对应的是,最后一项:Bus 001 Device 004: ID 0bb4:0c87 High Tech Computer Corp. Desire (debug)记录下idVendor,即0bb42、新建.rules文件sudo gedit /etc/udev/rules.d/50-android.rules输入如下内容: SUBSYSTEM=="usb",ATTR{idVendor}=="0bb4",MODE="0666"Save保存3、重启udevsudo /et 阅读全文
posted @ 2012-09-27 16:34 Anthony Li 阅读(1441) 评论(0) 推荐(0) 编辑
摘要: 1、准备工作a.安装Sun JDKapt-get install sun-java6-jdkb.下载Eclipse在Eclipse官网 http://www.eclipse.org/downloads/ 下载Eclipse Classic我使用的操作系统是ubuntu 12.04 LTS 32-bit,选择Linux 32 Bit下载成功,获得.tar.gz文件解压.tar.gz文件tar -zxvf eclipse-SDK-4.2-linux-gtk.tar.gz移动文件夹eclipse到/usr/libmv eclipse /usr/libc.下载Android SDK在Android官网 阅读全文
posted @ 2012-09-27 15:46 Anthony Li 阅读(4331) 评论(0) 推荐(1) 编辑
  2012年9月16日
摘要: erl(1) User Commands erl(1)NAME erl - The Erlang EmulatorDESCRIPTION The erl program starts an Erlang runtime system. The exact details (for example, whether erl is a script or a program and which other programs it calls) are system-dependent. Windows users probably wants to use the werl program ins 阅读全文
posted @ 2012-09-16 17:06 Anthony Li 阅读(2022) 评论(0) 推荐(0) 编辑
  2012年9月14日
摘要: ibrowseibrowse is a HTTP client written in erlang.(ibrowse是一个使用Erlang写的HTTP客户端。)项目地址:https://github.com/cmullaparthi/ibrowse准备工作:1、下载源代码使用Git获取元代码,在终端执行命令:git clone https://github.com/cmullaparthi/ibrowse.git2、编译源代码使用rebar构建工具编译源代码:./rebar compile编译成功,会在ebin文件夹下生成.beam和.app文件(rebar是一款Erlang项目构建工具,之后 阅读全文
posted @ 2012-09-14 23:56 Anthony Li 阅读(1243) 评论(0) 推荐(0) 编辑
  2012年9月9日
摘要: 开源项目:https://github.com/tonyg/erlang-rfc4627/Git checkout之后,在src文件夹下找到文件“rfc4627.erl”。JSON维基百科:http://en.wikipedia.org/wiki/JSONRFC4627:http://tools.ietf.org/html/rfc4627Joe Armstrong对JSON数据数据映射的描述:http://erlang.org/pipermail/erlang-questions/2005-November/017805.html截取一段: JSON Obj = type obj() ... 阅读全文
posted @ 2012-09-09 22:04 Anthony Li 阅读(3134) 评论(0) 推荐(0) 编辑
  2012年9月5日
摘要: 1、启动方式一:启动inets应用,一个缺省profile的管理进程将被启动。inets:start().方式二:运行时,动态启动profile停止profile。动态启动profile:{ok, Pid} = inets:start(httpc, [{profile, foo}]).动态停止profile:inets:stop(httpc, foo).或inets:stop(httpc, Pid).2、设置httpc:set_options() -> ok | {error, Reason}参考:http://www.erlang.org/doc/man/httpc.html#set_ 阅读全文
posted @ 2012-09-05 21:30 Anthony Li 阅读(3431) 评论(0) 推荐(0) 编辑
摘要: 初始化工作:1、(可选)启动Erlang时,设置根目录的位置: erl -mnesia dir Dir用你要存储schema的目录来代替Dir。示例:erl -mnesia dir '"db"'2、建立schema: mnesia:create_schema(DiscNodes) -> ok | {error, Reason}官方文档:http://www.erlang.org/doc/man/mnesia.html#create_schema-1关于schema的更多细节,参考《Erlang Programming》第295页 Configuring 阅读全文
posted @ 2012-09-05 15:06 Anthony Li 阅读(2299) 评论(0) 推荐(0) 编辑

博客园博客已停止更新,博客地址:dyinigbleed.com