ffmpeg(2.6) rockplayer android 下编译 小记.
最近因为一些需求,开始学习 ffmgeg 在android 上使用.
使用的环境:
1,VMware V8 虚似机 安装的 FedoraV18 系统.(下载地址,请baidu),虚似机,最好有20-30G的空间,ndk解压占用,1.5G android-ndk-r10b
2,android-ndk32-r10b-linux-x86.tar.tar 下载地址(目前 天C 的力量,所以 http://developer.android.com/sdk/index.html 无法打开 ):
http://wear.techbrood.com/tools/sdk/ndk/index.html(据说 sdk是同步的.)
3,ffmpeg-2.6.tar.bz2
下载地址:http://ffmpeg.org/download.html#releases
4,rockplayer_ffmpeg_git_20100418.zip
rockplayer 是什么?
Rockplayer受益于开源项目,也回报开源社区。
1.7.0开始使用的FFmpeg库
包含了取自git master repository的FFmpeg源码、RockPlayer使用的脚本。脚本内含详细的文档。
1.7.0之前使用的FFmpeg库
包含了FFmpeg源码,NDK需要的android.mk。请根据需要注释或放出所需要的变量组,更多说明见zip包里的readme.rockplayer。
- ...
下载地址:http://www.rockplayer.com/download/rockplayer_ffmpeg_git_20100418.zip
5,SSH Secure Shell Client 连接linux .(baidu SSH Secure Shell Client 下载).
感谢:
褐色狸花猫 的文章 <FFmpeg在Android上的移植之第一步>:http://blog.sina.com.cn/s/blog_69a04cf40100x1fr.html
ROMAN10 的文章 <How to Build FFmpeg for Android> :http://www.roman10.net/how-to-build-ffmpeg-for-android/
http://stackoverflow.com/questions/24853599/compiling-ffmpeg-2-3-with-android-ndk-r10
http://www.roman10.net/how-to-build-android-applications-based-on-ffmpeg-by-an-example/
开始:
1,解压 ndk.使用 tar 命令解压 android-ndk32-r10b-linux-x86.tar.tar 包 (tar --help 查看帮助) 解压到指定位置,\
本例中是:/home/android-ndk-r10b .
2,解压 ffmpge,或 rockplayer . (unzip --help)
本例中是:/home/test

3,build ffmpeg 或rockplayer .
3.1 ffmpeg 的 build_andriod_ffmpeg_right.sh 是:
正确sh
#!/bin/bash ######################################################
# FFmpeg builds script for Android+ARM platform
#
# This script is released under term of
# CDDL (http://www.opensource.org/licenses/cddl1)
# Wrote by pinxue (~@gmail.com) from RockPlayer.com
# 2010-8 ~ 2011-4
###################################################### ######################################################
# Usage:
# put this script in top of FFmpeg source tree
# ./build_android
#
# It generates binary for following architectures:
# ARMv6
# ARMv6+VFP
# ARMv7+VFPv3-d16 (Tegra2)
# ARMv7+Neon (Cortex-A8)
#
# Customizing:
# 1. Feel free to change ./configure parameters for more features
# 2. To adapt other ARM variants
# set $CPU and $OPTIMIZE_CFLAGS
# call build_one
###################################################### NDK=/home/android-ndk-r10b
PLATFORM=$NDK/platforms/android-18/arch-arm/
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 function build_one
{
./configure --target-os=linux \
--prefix=$PREFIX \
--enable-cross-compile \
--extra-libs="-lgcc" \
--arch=arm \
--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--nm=$PREBUILT/bin/arm-linux-androideabi-nm \
--sysroot=$PLATFORM \
--extra-cflags=" -O3 -fpic -DANDROID -DHAVE_SYS_UIO_H=1 -Dipv6mr_interface=ipv6mr_ifindex -fasm -Wno-psabi -fno-short-enums -fno-strict-aliasing -finline-limit=300 $OPTIMIZE_CFLAGS " \
--disable-shared \
--enable-static \
--extra-ldflags="-Wl,-rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -nostdlib -lc -lm -ldl -llog" \
--disable-everything \
--enable-demuxer=mov \
--enable-demuxer=h264 \
--disable-ffplay \
--enable-protocol=file \
--enable-avformat \
--enable-avcodec \
--enable-decoder=rawvideo \
--enable-decoder=mjpeg \
--enable-decoder=h263 \
--enable-decoder=mpeg4 \
--enable-decoder=h264 \
--enable-parser=h264 \
--disable-network \
--enable-zlib \
--disable-avfilter \
--disable-avdevice \
$ADDITIONAL_CONFIGURE_FLAG make clean
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-common --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.8/libgcc.a
} # arm v6
CPU=armv6
OPTIMIZE_CFLAGS="-marm -march=$CPU"
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one #arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one #arm v7vfp
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "
PREFIX=./android/$CPU-vfp
ADDITIONAL_CONFIGURE_FLAG=
build_one #arm v7n
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8"
PREFIX=./android/$CPU-v7n
ADDITIONAL_CONFIGURE_FLAG=--enable-neon
build_one #arm v6+vfp
CPU=armv6
OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU"
PREFIX=./android/${CPU}_vfp
ADDITIONAL_CONFIGURE_FLAG=
build_one
rockplayer 的 build_andriod_rockplayer_right.sh 是:
正确sh
#!/bin/bash ######################################################
# FFmpeg builds script for Android+ARM platform
#
# This script is released under term of
# CDDL (http://www.opensource.org/licenses/cddl1)
# Wrote by pinxue (~@gmail.com) from RockPlayer.com
# 2010-8 ~ 2011-4
###################################################### ######################################################
# Usage:
# put this script in top of FFmpeg source tree
# ./build_android
#
# It generates binary for following architectures:
# ARMv6
# ARMv6+VFP
# ARMv7+VFPv3-d16 (Tegra2)
# ARMv7+Neon (Cortex-A8)
#
# Customizing:
# 1. Feel free to change ./configure parameters for more features
# 2. To adapt other ARM variants
# set $CPU and $OPTIMIZE_CFLAGS
# call build_one
###################################################### NDK=/home/android-ndk-r10b
PLATFORM=$NDK/platforms/android-18/arch-arm/
PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86 function build_one_r6
{
./configure \
--disable-shared \
--enable-static \
--enable-gpl \
--enable-version3 \
--enable-nonfree \
--disable-doc \
--disable-ffmpeg \
--disable-ffplay \
--disable-ffprobe \
--disable-ffserver \
--disable-avdevice \
--disable-avfilter \
--disable-postproc \
--enable-small \
--cross-prefix=$PREBUILT/bin/arm-linux-androideabi- \
--enable-cross-compile \
--target-os=linux \
--extra-cflags="-I$PLATFORM/usr/include" \
--extra-ldflags="-L$PLATFORM/usr/lib -nostdlib" \
--arch=arm \
--disable-symver \
--disable-debug \
--disable-stripping \
$ADDITIONAL_CONFIGURE_FLAG
sed -i 's/HAVE_LRINT 0/HAVE_LRINT 1/g' config.h
sed -i 's/HAVE_LRINTF 0/HAVE_LRINTF 1/g' config.h
sed -i 's/HAVE_ROUND 0/HAVE_ROUND 1/g' config.h
sed -i 's/HAVE_ROUNDF 0/HAVE_ROUNDF 1/g' config.h
sed -i 's/HAVE_TRUNC 0/HAVE_TRUNC 1/g' config.h
sed -i 's/HAVE_TRUNCF 0/HAVE_TRUNCF 1/g' config.h
make clean
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-common --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.8/libgcc.a
}
function build_one_r6_2
{
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-common --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.8/libgcc.a
} #arm armv6
CPU=armv6-a
OPTIMIZE_CFLAGS="-marm -march=$CPU"
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=
build_one_r6 #arm v7vfpv3
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfpv3-d16 -marm -march=$CPU "
PREFIX=./android/$CPU-vfpv3
ADDITIONAL_CONFIGURE_FLAG=
build_one_r6 #arm v7vfp
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "
PREFIX=./android/$CPU-vfp
ADDITIONAL_CONFIGURE_FLAG=
build_one_r6 #arm v7n
CPU=armv7-a
OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8"
PREFIX=./android/$CPU
ADDITIONAL_CONFIGURE_FLAG=--enable-neon
build_one_r6 #arm v6+vfp
CPU=armv6
OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU"
PREFIX=./android/${CPU}_vfp
ADDITIONAL_CONFIGURE_FLAG=
build_one_r6 #arm v7vfp
#CPU=armv7-a
#OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU "
#PREFIX=./android/$CPU-vfp
#ADDITIONAL_CONFIGURE_FLAG=
#build_one
#arm v7n
#CPU=armv7-a
#OPTIMIZE_CFLAGS="-mfloat-abi=softfp -mfpu=neon -marm -march=$CPU -mtune=cortex-a8"
#PREFIX=./android/$CPU
#ADDITIONAL_CONFIGURE_FLAG=--enable-neon
#build_one
#arm v6+vfp
#CPU=armv6
#OPTIMIZE_CFLAGS="-DCMP_HAVE_VFP -mfloat-abi=softfp -mfpu=vfp -marm -march=$CPU"
#PREFIX=./android/${CPU}_vfp
#ADDITIONAL_CONFIGURE_FLAG=
#build_one
将 build_andriod_rockplayer_right.sh 放入 /home/test/rockplayer 目录下.
将 build_andriod_ffmpeg_right.sh 放入 /home/test/ffmpeg-2.6 目录下.
//给执行的权限
[root@localhost ffmpeg-2.6]# chmod 777 build_andriod_ffmpeg_right.sh
//执行
[root@localhost ffmpeg-2.6]# ./build_andriod_ffmpeg_right.sh
经过等待就可以见结果了.
INSTALL libavutil/libavutil.a
INSTALL doc/ffprobe.1
INSTALL doc/ffprobe-all.1
INSTALL doc/ffmpeg-utils.1
INSTALL doc/ffmpeg-scaler.1
INSTALL doc/ffmpeg-resampler.1
INSTALL doc/ffmpeg-codecs.1
INSTALL doc/ffmpeg-bitstream-filters.1
INSTALL doc/ffmpeg-formats.1
INSTALL doc/ffmpeg-protocols.1
INSTALL doc/libavutil.3
INSTALL doc/libswscale.3
INSTALL doc/libswresample.3
INSTALL doc/libavcodec.3
INSTALL doc/libavformat.3
INSTALL doc/ffprobe.1
INSTALL doc/ffprobe-all.1
INSTALL doc/ffmpeg-utils.1
INSTALL doc/ffmpeg-scaler.1
INSTALL doc/ffmpeg-resampler.1
INSTALL doc/ffmpeg-codecs.1
INSTALL doc/ffmpeg-bitstream-filters.1
INSTALL doc/ffmpeg-formats.1
INSTALL doc/ffmpeg-protocols.1
INSTALL doc/libavutil.3
INSTALL doc/libswscale.3
INSTALL doc/libswresample.3
INSTALL doc/libavcodec.3
INSTALL doc/libavformat.3
CP ffprobe
STRIP ffprobe
INSTALL install-progs-yes
INSTALL ffprobe
[root@localhost ffmpeg-2.6]#
编译结果:
在这个目录中"PREFIX=./android/$CPU ".


rockplayer 的so文件,比ffmpeg的so文件小了一半.
可以开始在android 中开整了.....-_-......
说明可能出现的错误:
Q1:PLATFORM=$NDK/platforms/android-18/arch-arm/
选择不同android对应的平台:


Q2:PREBUILT=$NDK/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86
选择可执行的文件:

arm-linux-androideabi-4.8 这个版本要与
function build_one 中或 function build_one_r6 中
最后:
make clean
make -j4 install
$PREBUILT/bin/arm-linux-androideabi-ar d libavcodec/libavcodec.a inverse.o
$PREBUILT/bin/arm-linux-androideabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a libswscale/libswscale.a -lc -lm -lz -ldl -llog --warn-common --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-linux-androideabi/4.8/libgcc.a
}
这个版本相对应.
不然会报
/home/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-ld: error: cannot open /home/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.1/libgcc.a: No such file or directory
/home/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/bin/arm-linux-androideabi-ld: error: cannot open /home/android-ndk-r10b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86/lib/gcc/arm-linux-androideabi/4.1/libgcc.a: No such file or directory
libavcodec/error_resilience.c:725: error: undefined reference to '__aeabi_idivmod'
libavcodec/error_resilience.c:1177: error: undefined reference to '__aeabi_idiv'
libavcodec/error_resilience.c:1178: error: undefined reference to '__aeabi_idiv'
libavcodec/error_resilience.c:1179: error: undefined reference to '__aeabi_idiv'
libavcodec/error_resilience.c:1180: error: undefined reference to '__aeabi_idiv'
libavcodec/error_resilience.c:403: error: undefined reference to '__aeabi_idivmod'
./libavutil/mem.h:95: error: undefined reference to '__aeabi_uidiv'
./libavutil/mem.h:95: error: undefined reference to '__aeabi_uidiv'
libavcodec/error_resilience.c:220: error: undefined reference to '__aeabi_uidiv'
libavcodec/error_resilience.c:224: error: undefined reference to '__aeabi_ldivmod'
libavcodec/h263dec.c:634: error: undefined reference to '__aeabi_idivmod'
libavcodec/h264.c:466: error: undefined reference to '__aeabi_idivmod'
libavcodec/h264_ps.c:495: error: undefined reference to '__aeabi_uidiv'
libavcodec/h264_slice.c:1754: error: undefined reference to '__aeabi_uidivmod'
libavcodec/mpeg4videodec.c:2320: error: undefined reference to '__aeabi_ldivmod'
libavcodec/mpeg4videodec.c:2307: error: undefined reference to '__aeabi_ldivmod'
libavcodec/mpeg4videodec.c:2308: error: undefined reference to '__aeabi_ldivmod'
libavformat/dump.c:121: error: undefined reference to '__aeabi_uldivmod'
libavformat/dump.c:123: error: undefined reference to '__aeabi_uldivmod'
libavformat/dump.c:121: error: undefined reference to '__aeabi_uldivmod'
libavformat/dump.c:123: error: undefined reference to '__aeabi_uldivmod'
libavformat/dump.c:93: error: undefined reference to '__aeabi_l2d'
libavformat/dump.c:99: error: undefined reference to '__aeabi_l2d'
libavformat/dump.c:93: error: undefined reference to '__aeabi_l2d'
libavformat/dump.c:99: error: undefined reference to '__aeabi_l2d'
libavformat/mov.c:2517: error: undefined reference to '__aeabi_uidivmod'
libavformat/mov.c:2517: error: undefined reference to '__aeabi_uidivmod'
libavformat/utils.c:2282: error: undefined reference to '__aeabi_l2f'
libavutil/camellia.c:139: error: undefined reference to '__aeabi_llsl'
libavutil/camellia.c:139: error: undefined reference to '__aeabi_llsr'
libavutil/camellia.c:140: error: undefined reference to '__aeabi_llsl'
libavutil/camellia.c:140: error: undefined reference to '__aeabi_llsr'
libavutil/eval.c:211: error: undefined reference to '__aeabi_d2ulz'
libavutil/eval.c:211: error: undefined reference to '__aeabi_ul2d'
libavutil/eval.c:287: error: undefined reference to '__aeabi_d2lz'
libavutil/eval.c:287: error: undefined reference to '__aeabi_d2lz'
libavutil/eval.c:211: error: undefined reference to '__aeabi_d2ulz'
libavutil/eval.c:211: error: undefined reference to '__aeabi_ul2d'
libavutil/eval.c:287: error: undefined reference to '__aeabi_d2lz'
libavutil/eval.c:287: error: undefined reference to '__aeabi_d2lz'
libavutil/timecode.c:64: error: undefined reference to '__aeabi_uidivmod'
libswscale/utils.c:299: error: undefined reference to '__aeabi_llsl'
Q3:gcc is unable to create an executable file.
If gcc is a cross-compiler, use the --enable-cross-compile option.
Only do this if you know what cross compiling means.
C compiler test failed.
sh 中 gcc的路径配置出错.
"--cc=$PREBUILT/bin/arm-linux-androideabi-gcc \"
arm-linux-androideabi-gcc 是 gcc for android apk 里的一个linux可执行文件
winhex arm-linux-androideabi-gcc 这个文件可见:

可参考: hhhbbb 的文章<elf格式分析> :http://blog.csdn.net/hhhbbb/article/details/6855004
Q4:错误error: undefined reference to 'atexit' ,noexecstack: unknown -z option,
unknown --warn-once
$PREBUILT/bin/arm-eabi-ld -rpath-link=$PLATFORM/usr/lib -L$PLATFORM/usr/lib -soname libffmpeg.so -shared -nostdlib -z,noexecstack -Bsymbolic --whole-archive --no-undefined -o $PREFIX/libffmpeg.so libavcodec/libavcodec.a libavformat/libavformat.a libavutil/libavutil.a -lc -lm -lz -ldl -llog --warn-once --dynamic-linker=/system/bin/linker $PREBUILT/lib/gcc/arm-eabi/4.4.0/libgcc.a
"-z,noexecstack" 语法错误
通过 arm-eabi-ld --help可知(可能不同的版本,命令参数不同.)
应是 -z noexecstack
--warn-once 改为 --warn-common
有问题的sh文件:
http://roman10.net/src/build_android_r6.txt
Q5:其它错误信息,怎么查看:
详细的错误信息: ffmpeg/config.log 可以查看
ffmpeg(2.6) rockplayer android 下编译 小记.的更多相关文章
- 【转】Android下编译jni库的二种方法(含示例)
原文网址:http://blog.sina.com.cn/s/blog_3e3fcadd01011384.html 总结如下:两种方法是:1)使用Android源码中的Make系统2)使用NDK(从N ...
- 【转】Android下编译jni库的二种方法(含示例) -- 不错
原文网址:http://blog.sina.com.cn/s/blog_3e3fcadd01011384.html 总结如下:两种方法是:1)使用Android源码中的Make系统2)使用NDK(从N ...
- 【记录一个问题】libtask无法在android下编译通过
源码来自:https://github.com/msteinert/libtask 首先是asm.S无法编译通过. 其次,编译context.c出现这些错误: .//context.c:124:19: ...
- linux下编译ffmpeg 引入外部库x264
Found no assembler Minimum version is nasm-2.13 If you really want to compile without asm, configure ...
- Android 环境下编译FFmpeg
Android 环境下编译FFmpeg 开发环境:Ubuntu 12.04.2 LTS , android-sdk-linux, android-ndk-r8e 一 .X264 编译 1. X2 ...
- 编译Android下可用的FFmpeg+x264
编译Android下可用的FFmpeg+x264 编译x264: 下载最新版的x264 ftp://ftp.videolan.org/pub/videolan/x264/snapshots/ 1.解压 ...
- [原]如何用Android NDK编译FFmpeg
我们知道在Ubuntu下直接编译FFmpeg是很简单的,主要是先执行./configure,接着执行make命令来编译,完了紧接着执行make install执行安装.那么如何使用Android的ND ...
- 手把手图文并茂教你用Android Studio编译FFmpeg库并移植
转载请把头部出处链接和尾部二维码一起转载,本文出自逆流的鱼yuiop:http://blog.csdn.net/hejjunlin/article/details/52661331 之前曾写过一篇&l ...
- 一步步实现windows版ijkplayer系列文章之四——windows下编译ijkplyer版ffmpeg
一步步实现windows版ijkplayer系列文章之一--Windows10平台编译ffmpeg 4.0.2,生成ffplay 一步步实现windows版ijkplayer系列文章之二--Ijkpl ...
随机推荐
- 使用Xcode HeaderDoc和Doxygen文档化你的Objective-C和Swift代码
在一个应用的整个开发过程中涉及到了无数的步骤.其中一些是应用的说明,图片的创作,应用的实现,和实现过后的测试阶段.写代码可能组成了这个过程的绝大部分,因为正是它给了应用生命,但是这样还不够,与它同等重 ...
- 【Tomcat】tomcat报连接超时错误
程序一直报这个错误 [getui-server][ERROR] [2016-03-17 10:50:00] getui.task.HftMongoInfoTask.execute(137) | --H ...
- R语言爬虫初尝试-基于RVEST包学习
注意:这文章是2月份写的,拉勾网早改版了,代码已经失效了,大家意思意思就好,主要看代码的使用方法吧.. 最近一直在用且有维护的另一个爬虫是KINDLE 特价书爬虫,blog地址见此: http://w ...
- 【转】搞不清FastCgi与php-fpm之间是个什么样的关系?
我在网上查fastcgi与php-fpm的关系,查了快一周了,基本看了个遍,真是众说纷纭,没一个权威性的定义. 网上有的说,fastcgi是一个协议,php-fpm实现了这个协议: 有的说,php-f ...
- sublime 编译运行C程序
{ "cmd": ["gcc", "${file}", "-o","${file_path}/${file_b ...
- .net WebServer例
新建.asmx页面 using System; using System.Collections.Generic; using System.Linq; using System.Web; using ...
- Java NIO工作原理
数据通信流程: 通过selector.select()阻塞方法获取到感兴趣事件的key,根据key定位到channel,通过channel的读写操作进行数据通信.channel的read或者write ...
- CentOS防火墙iptables的配置方法详解
CentOS系统也是基于linux中的它的防火墙其实就是iptables了,下面我来介绍在CentOS防火墙iptables的配置教程,希望此教程对各位朋友会有所帮助. iptables是与Linux ...
- Json序列化与反序列化
参考:http://www.cnblogs.com/caofangsheng/p/5687994.html#commentform 下载链接:http://download.csdn.net/deta ...
- tc674div1b
题意:给出n个孩子的初始位置,和每个孩子开始的朝向(左或者右),然后孩子的行走规则是,速度始终为1,两人相遇则两人立即转身背向而行. 现在有q次询问,每次问编号为i的孩子在时间t距离原点的距离.返回所 ...