This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdint.h> | |
#include <string.h> | |
// 本质上是一个“环状”俄罗斯方块,以及每一层只有一个中心是实心的方块 | |
// 状态共 80bit: 15bit + 60bit + 5bit | |
// 15bit: 积木有没有被使用 | |
// 60bit: 对应位置有没有填满,为 12*5 点阵 | |
// 5bit: 内层有没有被填满 | |
// 状态转移: 找到最左下角的空位,尝试放置下一块积木 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
VideoSendStream | |
VideoSendStreamImpl::VideoSendStreamImpl | |
video_stream_encoder_->SetSink register VideoSendStreamImpl::OnEncodedImage callback (output) | |
VideoSendStream::SetSource | |
video_stream_encoder_->SetSource(source, degradation_preference); | |
register rtc::VideoSourceInterface<VideoFrame>* source (input) | |
VideoStreamEncoder procedure | |
OnFrame: encoder_queue_.PostTask(EncodeTask) | |
in task: EncodeVideoFrame() video_sender_.AddVideoFrame(frame) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// qemu run arm | |
// https://www.raspberrypi.org/forums/viewtopic.php?f=91&t=112259 | |
qemu-system-arm -kernel kernel-qemu-4.1.7-jessie -cpu arm1176 -m 256 -M versatilepb -serial stdio -append "root=/dev/sda2 panic=1 rootfstype=ext4 rw" -hda 2015-09-24-raspbian-jessie.img | |
// qemu machine list | |
Supported machines are: | |
akita Akita PDA (PXA270) | |
borzoi Borzoi PDA (PXA270) | |
canon-a1100 Canon PowerShot A1100 IS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local P = {} | |
P.reject = function (err) | |
return P.new(function (fulfill, reject) | |
reject(err) | |
end) | |
end | |
P.resolve = function (r) | |
return P.new(function (fulfill, reject) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Source: http://tamsler.blogspot.com/2009/02/patching-with-git-diff.html | |
# If you want to create a patch file via "git diff" | |
# that can be applied using "patch -p0 < patchfile" use the following command: | |
git diff --no-prefix > patchfile | |
# then apply the patch | |
patch -p0 < patchfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE busconfig PUBLIC | |
"-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN" | |
"http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd"> | |
<busconfig> | |
<!-- Only root or user avahi can own the Avahi service --> | |
<policy user="avahi"> | |
<allow own="org.freedesktop.Avahi"/> | |
</policy> | |
<policy user="root"> |