(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>UserName</key> | |
<string>jenkins</string> | |
<key>Label</key> | |
<string>org.jenkins-ci.jenkins</string> | |
<key>EnvironmentVariables</key> | |
<dict> |
/*jshint node:true*/ | |
var fs = require('fs'), | |
http = require('http'), | |
path = require('path'), | |
port = 1338, | |
dir = '.'; | |
http.createServer(function (request, response) { | |
var filePath = path.join(dir, path.basename(request.url)); | |
if (path.extname(request.url) !== '.mp4' || !fs.existsSync(filePath)) return throw404(); |
import android.annotation.TargetApi; | |
import android.content.Context; | |
import android.graphics.Matrix; | |
import android.graphics.drawable.Drawable; | |
import android.os.Build; | |
import android.util.AttributeSet; | |
import android.widget.ImageView; | |
/** | |
* Created by chris on 7/27/16. |
package com.example.overlay; | |
public class Entry { | |
private final int imageResId; | |
private final String title; | |
public Entry( int imageResId, String title ) { | |
this.imageResId = imageResId; |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
此处主要参考 http://harryhsu.logdown.com/posts/198416-build-ffmpeg-on-mac-os-109 | |
根据我的编译过程做了适当修改 | |
1. Download NDK | |
https://developer.android.com/tools/sdk/ndk/index.html | |
我下载的版本是android-ndk-r10,不同的版本在下面的build脚中本需要修改的地方大致相同. | |
2. Download ffmpeg source code | |
下载 ffmpeg(http://www.ffmpeg.org/download.html) | |
推荐 git clone git://source.ffmpeg.org/ffmpeg.git ffmpeg |
public class CountingFileRequestBody extends RequestBody { | |
private static final int SEGMENT_SIZE = 2048; // okio.Segment.SIZE | |
private final File file; | |
private final ProgressListener listener; | |
private final String contentType; | |
public CountingFileRequestBody(File file, String contentType, ProgressListener listener) { | |
this.file = file; |
public static Bitmap toGrayScale(Bitmap bmpOriginal) { | |
int width, height; | |
height = bmpOriginal.getHeight(); | |
width = bmpOriginal.getWidth(); | |
Bitmap bmpGrayscale = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888); | |
Canvas c = new Canvas(bmpGrayscale); | |
Paint paint = new Paint(); | |
ColorMatrix cm = new ColorMatrix(); |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on